@tuned-tensor/cli 0.14.0 → 0.15.0

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 CHANGED
@@ -1,35 +1,38 @@
1
1
  # tt - Tuned Tensor CLI
2
2
 
3
- `tt` is one terminal for local Tuned Tensor workflows:
4
-
5
- - a laptop-local conversational agent;
6
- - CUDA fine-tuning, held-out evaluation, artifact verification, model
7
- activation, and OpenAI-compatible serving on hardware you control.
8
-
9
- ## Cloud sunset
10
-
11
- This release unregisters the hosted API commands (`tt auth`, `tt publish`,
12
- `tt push`, `tt balance`, `tt topup`, `tt cloud`, and the rest of the managed
13
- tree). The modules remain in the repository so they can be restored later.
14
- `tt local …` is kept as a hidden alias. `tt run` is also retained as a hidden
15
- compatibility alias for the canonical adapter pipeline; new scripts should use
16
- `tt pipeline run --spec tunedtensor.json`.
17
-
18
- ## Migrating from 0.11
19
-
20
- `0.13` is the local-only CLI. If you are coming from `0.11.0`:
21
-
22
- - Run `tt` for the conversational workflow, `tt pipeline run` for explicit or
23
- automated execution, and `tt serve` for the serving lifecycle. `tt run` and
24
- `tt local …` remain hidden compatibility aliases.
25
- - Hosted account commands (`tt auth`, `tt publish`, `tt push`, and the rest)
26
- are unregistered.
27
- - `Qwen/Qwen3.5-2B` is pinned to Hugging Face snapshot
28
- `15852e8c16360a2fea060d615a32b45270f8a8fc`. Prefetch, train, eval, and serve
29
- reject any other revision.
30
- - `tt serve active` fails unless an adapter is activated. Activation requires
31
- a `generalRegression` suite in `local-runner.json`.
32
- - `tt info` reports `status: local`.
3
+ `tt` is the local agent and CLI for Tuned Tensor. Use it to converse, run
4
+ workflows on your laptop or in the cloud, inspect metrics, and check account
5
+ usage. The web app is the dashboard for reviewing cloud runs and published
6
+ local evidence.
7
+
8
+ Local training, evaluation, inspection, and serving need no TT access token.
9
+ Agent inference is a separate choice:
10
+
11
+ - **Managed:** sign in once with `tt auth login`. TT reuses your access token
12
+ through the Tuned Tensor model proxy. The server selects the model; no
13
+ OpenRouter key or model selection is needed.
14
+ - **Bring your own:** use your own OpenRouter or other provider credentials
15
+ and choose the model. Your requests go directly to that provider. TT does
16
+ not apply its managed model policy to BYO requests.
17
+
18
+ A saved BYO selection stays selected after TT login. Switch back with
19
+ `tt agent configure --provider tunedtensor` or `/model tunedtensor/managed`.
20
+ Inference choice is independent of whether a training workflow runs locally or
21
+ in the cloud. Cloud account operations always require a TT access token.
22
+
23
+ ## Unified commands
24
+
25
+ Local workflows remain the default: `tt pipeline run`, `tt runs list`,
26
+ `tt models list`, and `tt serve`. Cloud workflows are explicit:
27
+ `tt cloud runs start`, `tt cloud runs list`, and `tt cloud models list`.
28
+ `tt usage` reports managed agent allowance and usage; `tt balance` reports
29
+ cloud training credits. `tt publish` uploads local run evidence to the dashboard.
30
+
31
+ TT includes the former TT Local runtime. `tt local …` and `tt run` remain
32
+ hidden compatibility aliases; new scripts should use root commands and
33
+ `tt pipeline run --spec tunedtensor.json`. Existing token-free local projects
34
+ and saved BYO provider settings continue to work. Cloud operations previously
35
+ hidden in the local-only release are available under `tt cloud`.
33
36
 
34
37
  ## Install
35
38
 
@@ -78,35 +81,53 @@ npm link
78
81
  ## Conversational terminal
79
82
 
80
83
  The interactive agent harness and conversation state run on your laptop.
81
- Inference runs through the provider/model you select, which may be a
82
- local endpoint or a remote provider.
84
+ Inference uses the TT managed model or a BYO provider you select. A BYO
85
+ provider may be a local endpoint or a remote service.
83
86
 
84
87
  Run `tt` to open the primary conversational workflow. The agent can inspect the
85
88
  project, derive the canonical pipeline from `tunedtensor.json`, present the
86
- resolved plan, and prepare a sealed dry-run for `/approve`. Workflow commands such
87
- as `runs list` and `doctor` also work immediately. Chat waits until you choose a
88
- provider and model from inside the shell:
89
+ resolved plan, and prepare a sealed dry-run for `/approve`. Workflow commands
90
+ such as `runs list` and `doctor` work immediately without any credentials.
89
91
 
90
- ```text
91
- tt v0.13.1-beta.2
92
- agent not configured · workflow model base
93
- ctrl+c stop/clear · ctrl+d exit · /help commands · tab complete
92
+ For managed inference, save your TT access token with hidden input:
93
+
94
+ ```bash
95
+ tt auth login
96
+ tt
97
+ ```
98
+
99
+ Get a token from the dashboard's **Settings → API Keys** page. You can also
100
+ set `TUNED_TENSOR_API_KEY` in CI. When there is no saved BYO selection, TT
101
+ selects `tunedtensor/managed` automatically. In the shell, `/login tunedtensor`
102
+ saves the same account token. Managed inference requires no OpenRouter key
103
+ or additional login. The server controls the model and request limits.
104
+ `tt usage` shows the configured daily allowance and reported usage.
94
105
 
95
- Use /model to choose a provider and model. Workflow commands work now.
96
- › /model
97
- › /login openai
98
- › /model openai
99
- › /model openai/gpt-5.6-sol
106
+ For BYO OpenRouter inference:
107
+
108
+ ```text
109
+ › /login openrouter
110
+ › /model openrouter/<model-id>
100
111
  ```
101
112
 
102
- Use `/login` to save a provider API key. The shell asks which provider, then
103
- prompts for the key with hidden input and stores it under TT's local agent
104
- config. `/login <provider>` skips the provider prompt.
105
- `tt` does not accept provider secrets as flags and does not read
106
- `~/.pi/agent/`. `/model` and `/login` show OpenAI and OpenRouter.
107
- Other catalog providers remain available if you type their id.
108
- Unauthenticated entries are marked `auth required`. Local endpoints such as
109
- Ollama still need a placeholder `apiKey` in `models.json`.
113
+ `/login` asks which provider, then prompts for the TT access token or BYO
114
+ provider key with hidden input. `/login <provider>` skips the provider prompt.
115
+ `/model openrouter` lists the bundled catalog, but you can select any OpenRouter model ID, including one
116
+ newer than that catalog. OpenRouter validates the selected ID. New IDs use
117
+ conservative context/output defaults; custom metadata can be supplied in
118
+ `~/.tuned-tensor/agent/models.json`. For a model without reasoning support,
119
+ configure it with
120
+ `tt agent configure --provider openrouter --model <model-id> --thinking off`.
121
+ BYO inference is billed by your provider.
122
+
123
+ Provider keys are stored under TT's local agent config, separately from the
124
+ account token. The managed provider never stores your TT token in provider
125
+ files and does not accept endpoint/model overrides in `models.json`; use a
126
+ separate BYO provider for custom endpoints. `tt` does not read `~/.pi/agent/`.
127
+ `/model` and `/login` feature Tuned Tensor, OpenAI, and OpenRouter. Other
128
+ catalog providers remain available by ID. Unauthenticated entries are marked
129
+ `auth required`. Local endpoints such as Ollama use a placeholder `apiKey` in
130
+ `models.json` and need no TT account.
110
131
 
111
132
  Before the shell opens, `tt` performs a short, non-blocking npm version check.
112
133
  If a newer stable release is available it recommends
@@ -117,8 +138,8 @@ After a model is selected, the banner shows it and ordinary sentences go to
117
138
  the agent:
118
139
 
119
140
  ```text
120
- tt v0.13.1-beta.2
121
- agent anthropic/claude-sonnet-4-5 · workflow model base
141
+ tt v0.15.0
142
+ agent tunedtensor/managed · workflow model base
122
143
  ctrl+c stop/clear · ctrl+d exit · /help commands · tab complete
123
144
 
124
145
  Ask TT anything. Known commands run directly.
@@ -182,20 +203,21 @@ A changed workspace or spec requires a new review.
182
203
 
183
204
  Useful shell controls include `/help`, `/status`, `/context`, `/model`,
184
205
  `/login`, `/cd`, `/clear`, and `/exit`.
185
- The shell banner and `/context` surface the assistant's configured provider and
186
- model (`agent provider/model`) separately from the workflow model, so the
187
- model answering your prompts is always visible. `/model` shows and changes the
188
- laptop-local TT agent model: run it with no arguments to list providers and the
189
- two suggested models (GPT-5.6 Sol and DeepSeek V4 Flash), `/model <provider>`
190
- to list that provider's models, search
191
- with `/model <query>` (only the closest matches are shown), or switch with
192
- `/model <provider>/<model>` (for example `/model anthropic/claude-sonnet-4-5`).
193
- `/login` asks which provider to authenticate, then prompts for that provider's
194
- API key with hidden input. `/login <provider>` skips the provider prompt.
206
+ The shell banner and `/context` show the inference selection (`agent
207
+ provider/model`) separately from the workflow model. The managed alias identifies
208
+ inference through the server-selected model. Run `/model` with no arguments to
209
+ list the managed option and suggested BYO models, `/model <provider>` to list
210
+ that provider's models, or `/model <query>` to search. Switch with
211
+ `/model <provider>/<model>`, including `/model tunedtensor/managed` to return
212
+ to managed inference.
213
+ For managed inference, `tt agent configure --provider tunedtensor` needs no
214
+ model argument. For BYO inference, both provider and model are required.
195
215
  The equivalent non-interactive commands are `tt agent models`,
196
216
  `tt agent configure`, and `tt agent status`.
197
- `tt agent configure --thinking` accepts `off`, `minimal`, `low`, `medium`,
198
- `high`, `xhigh`, or `max`. Selection metadata can be overridden per process with
217
+ For BYO models, `tt agent configure --thinking` accepts `off`, `minimal`, `low`, `medium`,
218
+ `high`, `xhigh`, or `max`; managed inference uses the server's reasoning policy
219
+ and leaves the CLI thinking option off. Selection metadata can be overridden
220
+ per process with
199
221
  `TUNED_TENSOR_AGENT_PROVIDER`, `TUNED_TENSOR_AGENT_MODEL`, and
200
222
  `TUNED_TENSOR_AGENT_THINKING`. These values are not credentials.
201
223
  The shell keeps normal terminal scrollback and command history only for the
@@ -260,8 +282,8 @@ When `--config` is omitted, `pipeline run` uses `local-runner.json` beside the
260
282
  selected spec when that file exists.
261
283
 
262
284
  `--only` and `--skip` preserve dependency safety: a selected step cannot refer
263
- to an omitted predecessor. Cloud-targeted steps fail closed unless you pass
264
- `--dry-run`. Foundation documents are local-only. The TT agent may describe,
285
+ to an omitted predecessor. Cloud-targeted pipeline steps can be inspected with `--dry-run`; actual
286
+ cloud execution uses `tt cloud runs`, described below. Foundation documents are local-only. The TT agent may describe,
265
287
  validate, and prepare a sealed pipeline action; only deterministic `/approve`
266
288
  handling can execute it.
267
289
 
@@ -273,6 +295,61 @@ scheduler, RNG, counters, and token cursor. See
273
295
  [Long foundation runs](docs/local-runtime/foundation-long-runs.md) before an
274
296
  unattended job.
275
297
 
298
+ ## Cloud runs and account reporting
299
+
300
+ Use the same TT token for cloud operations and managed inference. A BYO model
301
+ selection continues to work while you operate cloud runs with that token.
302
+
303
+ ```bash
304
+ tt auth login
305
+ tt cloud push --file tunedtensor.json
306
+ tt cloud runs estimate <spec-id>
307
+ tt cloud runs start <spec-id>
308
+ tt cloud runs watch <run-id>
309
+ tt cloud runs report <run-id>
310
+ tt cloud runs list
311
+ tt cloud models list
312
+ tt usage
313
+ tt balance
314
+ ```
315
+
316
+ Use the spec ID returned by `push`. `tt cloud specs`, `tt cloud datasets`,
317
+ `tt cloud label`, and `tt cloud models` expose the corresponding account
318
+ operations; each command's `--help` documents its arguments. Cloud foundation
319
+ training and dispatching cloud-targeted pipeline JSON are not supported;
320
+ `tt cloud runs` uses the hosted adapter workflow.
321
+
322
+ With a TT token, the local agent can inspect cloud resources, run reports,
323
+ balances, transactions, and managed usage. It can prepare cloud spec edits for
324
+ `/approve`. Those proposals show the API origin and remain bound to the token
325
+ and origin used during preparation. After changing either, return to the
326
+ original account and origin or prepare a new proposal. Starting or cancelling
327
+ cloud training remains an explicit direct
328
+ CLI command. Without a TT token these account tools are unavailable, while
329
+ local workflow commands and BYO inference continue to work.
330
+
331
+ `tt usage` reports the server-configured daily managed inference allowance.
332
+ Each provider completion, including a tool follow-up, consumes one request;
333
+ failed and cancelled requests also count. Token/cost coverage shows which
334
+ requests have provider usage reports, so incomplete reporting is not mistaken
335
+ for zero consumption. The displayed provider cost is informational, not a
336
+ charge to cloud training credits. BYO provider usage is separate. `tt balance`
337
+ shows cloud training credits and recent transactions; `tt topup` opens checkout.
338
+
339
+ Publish a local report for review in the dashboard:
340
+
341
+ ```bash
342
+ tt publish <local-run-id> --dry-run
343
+ tt publish <local-run-id>
344
+ tt cloud runs archive <published-run-id>
345
+ ```
346
+
347
+ Publishing shows the upload before confirmation and includes the spec, metrics,
348
+ prompts, and example model outputs. Archiving is supported for inactive local
349
+ reports published to the dashboard. Local model weights stay on your machine.
350
+ Use `--json` with reporting commands for scripts. `TUNED_TENSOR_URL` or
351
+ `--base-url` selects an alternate Tuned Tensor API deployment.
352
+
276
353
  ## Quick start
277
354
 
278
355
  Create a local project on an NVIDIA host:
@@ -314,7 +391,8 @@ Nemotron path is intended for DGX Spark-class unified memory, uses activation
314
391
  checkpointing, and adapts bounded shared attention/Mamba projections rather
315
392
  than every routed expert matrix. Muse Glimmer is a vision-language checkpoint
316
393
  whose text tower is fine-tuned through the image-text-to-text loader with the
317
- vision tower frozen and unused. Evaluation and serving may use CPU. Training
394
+ vision tower frozen and unused. Evaluation may use CPU; packaged local
395
+ serving requires Linux and NVIDIA CUDA. Training
318
396
  artifacts, datasets, and model weights remain on the execution host.
319
397
 
320
398
  Activation is optional and requires the run to pass a configured
@@ -256,7 +256,7 @@ async function writeArtifactManifest(artifacts, options = {}) {
256
256
  let model;
257
257
  if (options.model) {
258
258
  if (options.model.framework !== "transformers-peft" || options.model.servable !== true || options.model.artifact_kind === "file" && options.model.format !== "tar.gz" || options.model.artifact_kind === "directory" && options.model.format !== "huggingface-directory") {
259
- throw new Error("TT Local model artifacts must be verified, servable Transformers PEFT adapters.");
259
+ throw new Error("TT local model artifacts must be verified, servable Transformers PEFT adapters.");
260
260
  }
261
261
  if (options.model.base_model_artifact_uri === void 0 !== (options.model.base_model_fingerprint === void 0)) {
262
262
  throw new Error("Model contracts must record a local base-model URI and fingerprint together.");
@@ -744,7 +744,7 @@ function assertCertifiedBaseModelConfig(value, label = "base-model config.json",
744
744
  return;
745
745
  }
746
746
  throw new Error(
747
- `${label} is not a certified TT Local base-model architecture.`
747
+ `${label} is not a certified TT base-model architecture.`
748
748
  );
749
749
  }
750
750
  function localModelArtifactPath(uri) {
@@ -5848,4 +5848,4 @@ export {
5848
5848
  formatAgentHostBlock,
5849
5849
  assessHardware
5850
5850
  };
5851
- //# sourceMappingURL=chunk-VRDDO2FP.js.map
5851
+ //# sourceMappingURL=chunk-YGN26POJ.js.map