@tonbo/cli 0.0.5 → 0.0.7
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 +75 -9
- package/dist/bin/tonbo.js +1981 -0
- package/package.json +8 -5
- package/dist/src/api.d.ts +0 -70
- package/dist/src/api.js +0 -179
- package/dist/src/app.d.ts +0 -4
- package/dist/src/app.js +0 -113
- package/dist/src/auth.d.ts +0 -20
- package/dist/src/auth.js +0 -196
- package/dist/src/callback-page.d.ts +0 -23
- package/dist/src/callback-page.js +0 -145
- package/dist/src/commands.d.ts +0 -45
- package/dist/src/commands.js +0 -237
- package/dist/src/config.d.ts +0 -13
- package/dist/src/config.js +0 -46
- package/dist/src/contracts.d.ts +0 -3
- package/dist/src/contracts.js +0 -24
- package/dist/src/credentials.d.ts +0 -17
- package/dist/src/credentials.js +0 -90
- package/dist/src/declaration.d.ts +0 -10
- package/dist/src/declaration.js +0 -98
- package/dist/src/generated/contracts.d.ts +0 -188
- package/dist/src/generated/contracts.js +0 -226
- package/dist/src/http.d.ts +0 -6
- package/dist/src/http.js +0 -19
- package/dist/src/main.d.ts +0 -2
- package/dist/src/main.js +0 -9
- package/dist/src/progress.d.ts +0 -25
- package/dist/src/progress.js +0 -60
- package/dist/src/prompt.d.ts +0 -1
- package/dist/src/prompt.js +0 -10
- package/dist/src/source.d.ts +0 -8
- package/dist/src/source.js +0 -139
- package/dist/src/ssh-key.d.ts +0 -9
- package/dist/src/ssh-key.js +0 -36
- package/dist/src/ssh.d.ts +0 -3
- package/dist/src/ssh.js +0 -22
- package/dist/src/types.d.ts +0 -85
- package/dist/src/types.js +0 -1
package/README.md
CHANGED
|
@@ -7,32 +7,44 @@ npm install --global @tonbo/cli
|
|
|
7
7
|
tonbo --version
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
The
|
|
10
|
+
The CLI deploys an Agent directly from a local directory without requiring Git or Tonbo calls in the Agent source. Initialize the current directory interactively:
|
|
11
11
|
|
|
12
12
|
```console
|
|
13
13
|
tonbo init
|
|
14
|
-
?
|
|
14
|
+
? How should Tonbo run this project?
|
|
15
|
+
❯ PI CLI (`pi`) Run pi directly with AGENTS.md and optional project-local .pi resources.
|
|
16
|
+
PI SDK app Run a custom Node.js entrypoint built on the PI SDK.
|
|
15
17
|
Created .tonbo.
|
|
18
|
+
Harness: PI
|
|
19
|
+
Mode: PI CLI
|
|
16
20
|
Next: tonbo project create <slug>
|
|
17
21
|
```
|
|
18
22
|
|
|
23
|
+
Use the arrow keys to select an available execution target and Enter to confirm. `AGENTS.md` is Harness-neutral and never identifies PI by itself. When `.pi/settings.json` exists, the shared source inspector identifies the PI Harness, reports its project-local packages, and narrows the prompt to the native PI or PI SDK execution modes. Unsupported and planned Harnesses are not shown.
|
|
24
|
+
|
|
19
25
|
The generated `.tonbo` is TOML:
|
|
20
26
|
|
|
21
27
|
```toml
|
|
22
28
|
version = 1
|
|
23
29
|
|
|
24
|
-
[
|
|
25
|
-
mode = "managed"
|
|
30
|
+
[agent]
|
|
26
31
|
runtime = "pi"
|
|
27
32
|
|
|
33
|
+
[agent.driver]
|
|
34
|
+
kind = "native"
|
|
35
|
+
|
|
28
36
|
[inference]
|
|
29
37
|
model = "claude-sonnet-4-5"
|
|
38
|
+
```
|
|
30
39
|
|
|
31
|
-
|
|
32
|
-
|
|
40
|
+
The default inference model is written without prompting. Override it explicitly with `--model`. Automation must make ambiguous choices explicit; an existing declaration requires interactive confirmation or `--force`:
|
|
41
|
+
|
|
42
|
+
```console
|
|
43
|
+
tonbo init --harness pi --driver native
|
|
44
|
+
tonbo init --harness pi --driver command --agent-entry dist/agent.mjs
|
|
33
45
|
```
|
|
34
46
|
|
|
35
|
-
|
|
47
|
+
Then authenticate, bind the directory and deploy its current contents:
|
|
36
48
|
|
|
37
49
|
```console
|
|
38
50
|
tonbo login
|
|
@@ -63,9 +75,61 @@ ssh my-project@tonbo.sh
|
|
|
63
75
|
|
|
64
76
|
The SSH username selects the globally unique Project; the signed public key identifies the Tonbo user and is checked against Project membership and IAM at connection time. The shell and HTTP turns may coexist on the singleton runtime, allowing the shell to observe the Agent while it works. Session writer fencing protects durable conversation history; ordinary workspace files retain Linux process concurrency semantics.
|
|
65
77
|
|
|
66
|
-
The platform injects scoped inference access and
|
|
78
|
+
The platform injects scoped inference access and owns PI Session capture. Do not put a model-provider API key or a Tonbo credential in `.tonbo`.
|
|
79
|
+
|
|
80
|
+
Deploy snapshots regular files under `.tonbo`, excluding `.git`, `node_modules`, PI package caches, local environment files and patterns in `.tonboignore`. Equal contents produce the same revision. Coding tools start in the persistent Artifacts workspace, while `AGENTS.md` and trusted `.pi` extensions, skills, prompts and settings load from the uploaded revision.
|
|
81
|
+
|
|
82
|
+
## Supported PI project shapes
|
|
83
|
+
|
|
84
|
+
### 1. Project-local Agent
|
|
85
|
+
|
|
86
|
+
Keep the normal PI project layout. Tonbo runs the same `AGENTS.md`, `.pi/APPEND_SYSTEM.md`, `.pi/settings.json`, `.pi/extensions`, `.pi/skills` and `.pi/prompts` that local `pi` loads:
|
|
87
|
+
|
|
88
|
+
```console
|
|
89
|
+
pi
|
|
90
|
+
tonbo init
|
|
91
|
+
tonbo project create my-agent
|
|
92
|
+
tonbo deploy
|
|
93
|
+
tonbo run "Start the task."
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 2. PI Package project
|
|
97
|
+
|
|
98
|
+
Use PI's project-local package declaration as the single source of truth. A package is a PI resource, not another Tonbo execution mode: `tonbo init` recognizes `.pi/settings.json`, then the native PI driver loads the packages. Install an immutable package reference locally, verify it with PI, and deploy the project; Tonbo excludes `.pi/npm` and `.pi/git` caches and restores packages inside the isolated runtime:
|
|
99
|
+
|
|
100
|
+
```console
|
|
101
|
+
pi install -l npm:@acme/my-pi-agent@1.2.3
|
|
102
|
+
pi
|
|
103
|
+
tonbo init
|
|
104
|
+
tonbo deploy
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Remote npm packages must use an exact version. Git packages must use a full 40-character commit, for example `git:github.com/acme/my-pi-agent@0123456789abcdef0123456789abcdef01234567`. Movable tags, branches, ranges and `latest` fail deployment.
|
|
108
|
+
|
|
109
|
+
### 3. PI SDK app
|
|
110
|
+
|
|
111
|
+
Choose `PI SDK app` with the arrow selector, use `--driver command --agent-entry <file>` in automation, or declare a command driver directly:
|
|
112
|
+
|
|
113
|
+
```toml
|
|
114
|
+
version = 1
|
|
115
|
+
|
|
116
|
+
[agent]
|
|
117
|
+
runtime = "pi"
|
|
118
|
+
secrets = ["GITHUB_TOKEN"]
|
|
119
|
+
|
|
120
|
+
[agent.driver]
|
|
121
|
+
kind = "command"
|
|
122
|
+
protocol = "pi-rpc-v1"
|
|
123
|
+
command = ["node", "dist/agent.mjs"]
|
|
124
|
+
|
|
125
|
+
[build]
|
|
126
|
+
command = ["npm", "run", "build"]
|
|
127
|
+
|
|
128
|
+
[inference]
|
|
129
|
+
model = "claude-sonnet-4-5"
|
|
130
|
+
```
|
|
67
131
|
|
|
68
|
-
|
|
132
|
+
`tonbo deploy` runs the build command before creating the source snapshot. The entrypoint must keep stdout exclusively for PI RPC and send logs to stderr. It receives `PI_CODING_AGENT_MODULE`, `PI_CODING_AGENT_DIR`, `PI_CODING_AGENT_SESSION_DIR`, `TONBO_PI_SESSION_FILE`, `TONBO_PI_SESSION_ID`, `TONBO_PI_PROVIDER`, `TONBO_PI_MODEL` and `TONBO_PI_RPC_PROTOCOL`. Load the platform PI SDK from `PI_CODING_AGENT_MODULE`, open `TONBO_PI_SESSION_FILE`, create an `AgentSessionRuntime`, and pass it to `runRpcMode()`. This lets the app customize tools and runtime services without forking PI while preserving Tonbo's durable Session and Turn protocol.
|
|
69
133
|
|
|
70
134
|
For a non-interactive invocation, provide a current Tonbo CLI OAuth access token and an explicit Project:
|
|
71
135
|
|
|
@@ -79,6 +143,8 @@ Node.js 22 or newer is required. Human OAuth tokens are stored at `${XDG_CONFIG_
|
|
|
79
143
|
## Related design
|
|
80
144
|
|
|
81
145
|
- [Design documentation map](../../docs/design/README.md)
|
|
146
|
+
- [Agent source inspection and onboarding](../../docs/design/agent-source-onboarding.md)
|
|
147
|
+
- [Shared source inspector](../../packages/agent-source-inspector/README.md)
|
|
82
148
|
- [Project resource model](../../docs/design/project-resource-model.md)
|
|
83
149
|
- [ADR-0008: Tonbo CLI onboarding and credential boundaries](../../apps/user-center/docs/decisions/adr-0008-tonbo-cli-onboarding.md)
|
|
84
150
|
- [Management API v1](../../contracts/management/openapi-v1.yaml)
|