@tangle-network/tcloud 0.4.12 → 0.4.13
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 +13 -11
- package/dist/cli.cjs +2 -2
- package/dist/cli.js +2 -2
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tcloud
|
|
2
2
|
|
|
3
|
-
TypeScript SDK and CLI for [Tangle
|
|
3
|
+
TypeScript SDK and CLI for [Tangle Router](https://router.tangle.tools): model routing, sandbox-backed agent calls, operator routing, and anonymous payments via ShieldedCredits.
|
|
4
4
|
|
|
5
5
|
Zero framework dependencies. Pure `fetch` + SSE. Works in Node.js, Deno, Bun, and edge runtimes.
|
|
6
6
|
|
|
@@ -37,21 +37,23 @@ Zero framework dependencies. Pure `fetch` + SSE. Works in Node.js, Deno, Bun, an
|
|
|
37
37
|
## Installation
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
npm install tcloud
|
|
40
|
+
npm install @tangle-network/tcloud
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Or run the CLI directly:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
npx tcloud chat "What is Tangle?"
|
|
46
|
+
npx @tangle-network/tcloud chat "What is Tangle?"
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
Do not install unscoped `tcloud`. It is unrelated to Tangle.
|
|
50
|
+
|
|
49
51
|
## SDK
|
|
50
52
|
|
|
51
53
|
### Quick Start
|
|
52
54
|
|
|
53
55
|
```ts
|
|
54
|
-
import { TCloud } from 'tcloud'
|
|
56
|
+
import { TCloud } from '@tangle-network/tcloud'
|
|
55
57
|
|
|
56
58
|
// Set model at client creation — explicit and consistent.
|
|
57
59
|
const client = new TCloud({
|
|
@@ -159,7 +161,7 @@ console.log(completion.choices[0].message.content)
|
|
|
159
161
|
Anonymous inference with no API key. Uses EIP-712 SpendAuth signatures — the operator verifies payment without learning your identity.
|
|
160
162
|
|
|
161
163
|
```ts
|
|
162
|
-
import { TCloud } from 'tcloud'
|
|
164
|
+
import { TCloud } from '@tangle-network/tcloud'
|
|
163
165
|
|
|
164
166
|
const client = TCloud.shielded()
|
|
165
167
|
const answer = await client.ask('Hello from the shadows')
|
|
@@ -361,10 +363,10 @@ tcloud auth status # Check current auth
|
|
|
361
363
|
### Chat
|
|
362
364
|
|
|
363
365
|
```bash
|
|
364
|
-
tcloud chat "Explain zero-knowledge proofs"
|
|
365
|
-
tcloud chat -m meta-llama/llama-4-maverick "Hello"
|
|
366
|
-
tcloud chat --private "Anonymous request" # ShieldedCredits mode
|
|
367
|
-
tcloud chat # Interactive mode
|
|
366
|
+
npx @tangle-network/tcloud chat "Explain zero-knowledge proofs"
|
|
367
|
+
npx @tangle-network/tcloud chat -m meta-llama/llama-4-maverick "Hello"
|
|
368
|
+
npx @tangle-network/tcloud chat --private "Anonymous request" # ShieldedCredits mode
|
|
369
|
+
npx @tangle-network/tcloud chat # Interactive mode
|
|
368
370
|
```
|
|
369
371
|
|
|
370
372
|
### Browse
|
|
@@ -409,8 +411,8 @@ tcloud config --model gpt-4o-mini
|
|
|
409
411
|
Environment variables:
|
|
410
412
|
- `TANGLE_API_KEY` — API key (primary). One key for router + sandbox + all Tangle products.
|
|
411
413
|
- `TCLOUD_API_KEY` — Deprecated alias, still honored for backwards compatibility.
|
|
412
|
-
- `
|
|
413
|
-
- `
|
|
414
|
+
- `TANGLE_ROUTER_URL` — Override CLI router URL.
|
|
415
|
+
- `TCLOUD_API_URL` — Deprecated CLI router URL alias.
|
|
414
416
|
|
|
415
417
|
## OpenAI SDK Compatibility
|
|
416
418
|
|
package/dist/cli.cjs
CHANGED
|
@@ -2025,8 +2025,8 @@ function loadConfig() {
|
|
|
2025
2025
|
...fileConfig,
|
|
2026
2026
|
...process.env.TANGLE_ROUTER_URL ? { apiUrl: process.env.TANGLE_ROUTER_URL.replace(/\/v1\/?$/, "") } : {},
|
|
2027
2027
|
...process.env.TCLOUD_API_URL ? { apiUrl: process.env.TCLOUD_API_URL.replace(/\/v1\/?$/, "") } : {},
|
|
2028
|
-
...process.env.
|
|
2029
|
-
...process.env.
|
|
2028
|
+
...process.env.TCLOUD_API_KEY ? { apiKey: process.env.TCLOUD_API_KEY } : {},
|
|
2029
|
+
...process.env.TANGLE_API_KEY ? { apiKey: process.env.TANGLE_API_KEY } : {}
|
|
2030
2030
|
};
|
|
2031
2031
|
}
|
|
2032
2032
|
function saveConfig(c) {
|
package/dist/cli.js
CHANGED
|
@@ -29,8 +29,8 @@ function loadConfig() {
|
|
|
29
29
|
...fileConfig,
|
|
30
30
|
...process.env.TANGLE_ROUTER_URL ? { apiUrl: process.env.TANGLE_ROUTER_URL.replace(/\/v1\/?$/, "") } : {},
|
|
31
31
|
...process.env.TCLOUD_API_URL ? { apiUrl: process.env.TCLOUD_API_URL.replace(/\/v1\/?$/, "") } : {},
|
|
32
|
-
...process.env.
|
|
33
|
-
...process.env.
|
|
32
|
+
...process.env.TCLOUD_API_KEY ? { apiKey: process.env.TCLOUD_API_KEY } : {},
|
|
33
|
+
...process.env.TANGLE_API_KEY ? { apiKey: process.env.TANGLE_API_KEY } : {}
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
function saveConfig(c) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/tcloud",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "TypeScript SDK and CLI for Tangle
|
|
3
|
+
"version": "0.4.13",
|
|
4
|
+
"description": "TypeScript SDK and CLI for Tangle Router, Sandbox, model routing, and agent service calls",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -95,18 +95,23 @@
|
|
|
95
95
|
"url": "git+https://github.com/tangle-network/tcloud.git",
|
|
96
96
|
"directory": "packages/tcloud"
|
|
97
97
|
},
|
|
98
|
-
"homepage": "https://
|
|
98
|
+
"homepage": "https://router.tangle.tools/docs",
|
|
99
99
|
"keywords": [
|
|
100
100
|
"tangle",
|
|
101
101
|
"ai",
|
|
102
102
|
"llm",
|
|
103
103
|
"inference",
|
|
104
104
|
"decentralized",
|
|
105
|
+
"agent-runtime",
|
|
106
|
+
"sandbox",
|
|
107
|
+
"browser-agent",
|
|
108
|
+
"x402",
|
|
105
109
|
"openai",
|
|
106
110
|
"sdk",
|
|
107
111
|
"cli",
|
|
108
112
|
"privacy",
|
|
109
|
-
"shielded-credits"
|
|
113
|
+
"shielded-credits",
|
|
114
|
+
"tangle-router"
|
|
110
115
|
],
|
|
111
116
|
"engines": {
|
|
112
117
|
"node": ">=18"
|