qriton 0.4.1 → 0.5.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 +165 -31
- package/dist/qriton.js +2172 -639
- package/docs/hlm-setup.md +105 -0
- package/docs/hlm.md +356 -0
- package/docs/workspace-trust.md +68 -0
- package/examples/hlm/forgepack/README.md +37 -0
- package/examples/hlm/forgepack/bin/release-readiness.mjs +84 -0
- package/examples/hlm/forgepack/package.json +13 -0
- package/examples/hlm/forgepack/test/release-readiness.test.mjs +119 -0
- package/package.json +7 -2
- package/release/contract.json +3 -3
package/README.md
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
# Qriton CLI
|
|
2
2
|
|
|
3
|
-
A coding agent for your terminal
|
|
4
|
-
|
|
5
|
-
It is also home to **[Qriton HLM](https://hlm.qriton.com/)**, our own open models: run them on your machine and teach them, correct them or make them forget, with every change checked and reversible.
|
|
3
|
+
A coding agent for your terminal and paired iPhone, running on infrastructure you control. Use a local model on your own machine, or any major model API, in the same session: your conversation, approvals and project memory stay with the work when you switch models.
|
|
6
4
|
|
|
5
|
+
Use **[Qriton HLM](https://hlm.qriton.com/)** to work with Qriton's published models in the same project: set up a Python runtime, download verified weights, edit runner code, and inspect saved results.
|
|
7
6
|
```bash
|
|
8
7
|
npm install -g qriton
|
|
9
8
|
```
|
|
10
9
|
|
|
11
|
-
## What's new in 0.
|
|
10
|
+
## What's new in 0.5.0
|
|
12
11
|
|
|
13
|
-
- **
|
|
14
|
-
- **
|
|
15
|
-
- **
|
|
16
|
-
- **
|
|
17
|
-
- **Safer by default.** Stricter rules for which commands run without asking, and a clearer approval for each one.
|
|
12
|
+
- **Guided HLM setup.** Preview and install a Python runtime and starter project for supported HLM5 models.
|
|
13
|
+
- **Editable model projects.** Work on runner code, execute registered commands, and review saved outputs from the CLI or coding assistant.
|
|
14
|
+
- **HLM facts in coding tasks.** Discover saved facts and verify their current answers with local model inference.
|
|
15
|
+
- **Clearer recovery.** File tools provide guidance for recoverable path mistakes, and transient Ollama failures use the configured retry policy.
|
|
18
16
|
|
|
19
17
|
## Get started
|
|
20
18
|
|
|
@@ -43,38 +41,96 @@ On a smaller machine, `qriton --light` runs a lighter session: a smaller context
|
|
|
43
41
|
|
|
44
42
|
## Qriton HLM
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
Create a workspace for a supported HLM5 model. Guided setup requires Python
|
|
45
|
+
3.10–3.12; model weights are downloaded separately from Hugging Face.
|
|
47
46
|
|
|
48
47
|
```bash
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
qriton hlm
|
|
48
|
+
mkdir my-hlm-project
|
|
49
|
+
cd my-hlm-project
|
|
50
|
+
qriton hlm setup # list supported models
|
|
51
|
+
qriton hlm setup hlm5-1b # preview runtime and project setup
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Review the plan, then copy its printed apply command, including the fingerprint:
|
|
55
55
|
|
|
56
56
|
```text
|
|
57
|
-
|
|
57
|
+
qriton hlm setup hlm5-1b apply <fingerprint>
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
Download the model and run it:
|
|
61
|
+
|
|
60
62
|
```bash
|
|
61
|
-
qriton hlm
|
|
62
|
-
qriton hlm
|
|
63
|
-
qriton hlm
|
|
64
|
-
qriton hlm
|
|
63
|
+
qriton hlm fetch hlm5-1b
|
|
64
|
+
qriton hlm doctor
|
|
65
|
+
qriton hlm run hlm5-1b -- --prompt "Once upon a time" --tokens 16
|
|
66
|
+
qriton hlm runs
|
|
65
67
|
```
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
Setup creates an environment and editable Python code inside your workspace.
|
|
70
|
+
Open Qriton there and ask it to inspect or change
|
|
71
|
+
`.qriton/hlm/project/model/run.py`, run the model, and review its output.
|
|
72
|
+
Start a new coding session after setup to load the updated settings.
|
|
73
|
+
The guided runtime uses CPU inference. See the [setup guide](docs/hlm-setup.md)
|
|
74
|
+
for interpreter selection, disk requirements, and supported platforms.
|
|
75
|
+
|
|
76
|
+
| Model | Download size | Workbench support |
|
|
77
|
+
|---|---:|---|
|
|
78
|
+
| `hlm5-1b` | 4.2 GB | Completion and memory edits |
|
|
79
|
+
| `hlm5-1b-hybrid` | 4.2 GB | Completion and memory edits |
|
|
80
|
+
| `hlm5-3b` | 10.8 GB | Completion |
|
|
81
|
+
|
|
82
|
+
**Existing projects.** Select a compatible registry with `hlm.projectRegistry`
|
|
83
|
+
in user configuration, then run Qriton in that model workspace:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
qriton hlm projects # browse registered projects
|
|
87
|
+
qriton hlm project <id> # inspect a runner and required files
|
|
88
|
+
qriton hlm run <id> # execute its registered command
|
|
89
|
+
qriton hlm runs # review saved outcomes
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The coding assistant can inspect and edit these projects and request approval
|
|
93
|
+
to run their commands. Other architectures and custom checkpoints need their
|
|
94
|
+
own loaders and registered runners. See [existing model projects](docs/hlm.md#work-with-existing-model-projects).
|
|
95
|
+
|
|
96
|
+
**Editable memory.** The 1B models support checked, reversible single-token
|
|
97
|
+
answers at exact prompts, with up to 32 fact addresses per overlay. Base weights
|
|
98
|
+
stay frozen. Preview checks the proposed answer, retained facts, and control
|
|
99
|
+
prompts before an edit can be applied. These checks do not establish general
|
|
100
|
+
learning or accuracy on paraphrased questions. Forgetting deactivates an edit
|
|
101
|
+
and retains its history.
|
|
102
|
+
|
|
103
|
+
```text
|
|
104
|
+
memorize "The capital of Veldoria is" " Paris"
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Save that line as `edit.hlm`, provide a control suite, then use:
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
qriton hlm preview hlm5-1b edit.hlm controls.json
|
|
111
|
+
qriton hlm apply <proposal-id>
|
|
112
|
+
qriton hlm facts hlm5-1b
|
|
113
|
+
qriton hlm read hlm5-1b <fact-id> <revision>
|
|
114
|
+
qriton hlm restore <proposal-id>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
See the [HLM guide](docs/hlm.md) for control examples, corrections, restoration,
|
|
118
|
+
and [using facts in conversation](docs/hlm.md#manage-an-hlm-fact-through-conversation).
|
|
119
|
+
HLM supplies a separate model workbench; your selected coding provider still
|
|
120
|
+
handles the conversation and code changes. Saved fact routing and fresh native
|
|
121
|
+
model reads are separate operations.
|
|
72
122
|
|
|
73
|
-
|
|
123
|
+
These commands also work after `/hlm` in terminal or paired-phone chat.
|
|
124
|
+
On a `qriton serve` host, the models and Python runtime stay on the host; the
|
|
125
|
+
phone provides the conversation and approvals. See the
|
|
126
|
+
[phone workflow](docs/hlm.md#use-hlm-from-your-iphone).
|
|
127
|
+
Published models are available on [Hugging Face](https://huggingface.co/qriton).
|
|
74
128
|
|
|
75
129
|
## What stays on your machine
|
|
76
130
|
|
|
77
|
-
|
|
131
|
+
Running Ollama on this computer keeps chat inference local. A remote Ollama server or hosted model receives the conversation and selected code context; search, embedding, mesh and mobile services also have their own destinations. Choosing a local chat model alone does not disable those services. API keys are stored in the macOS Keychain, libsecret on Linux, or a private file, never in your project or configuration.
|
|
132
|
+
|
|
133
|
+
For a paired phone with a configured gateway, pushes contain generic status such as "Approval waiting" by default, plus session/approval identifiers. Setting `"mobile": { "preview": true }` in user configuration opts into content previews, which travel through the gateway and Apple's push service (APNs). Push requests obey Qriton's HTTP network policy. They are separate from the encrypted mesh messages.
|
|
78
134
|
|
|
79
135
|
Qriton's file tools only work inside the project folder you started it in. Commands run only as your approval mode allows, and a command you approve runs with your own permissions, so read it before you say yes. Simple reads inside the project run without asking.
|
|
80
136
|
|
|
@@ -121,6 +177,32 @@ qriton --image screenshot.png "what is wrong here"
|
|
|
121
177
|
|
|
122
178
|
While Qriton works you can type an addition or correction and press Enter; it joins the task at the next safe step. `Esc` interrupts. `Ctrl+C` twice or `/exit` quits.
|
|
123
179
|
|
|
180
|
+
### Code from your iPhone
|
|
181
|
+
|
|
182
|
+
After configuring the [mesh](#several-qritons-on-one-network) and pairing the Qriton iPhone app with `qriton mesh pair`, leave a host running in the project you want to work on:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
qriton -C ~/code/your-project serve
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Open that host in the app, send a coding task and review its proposed changes and command approvals. The work runs on the host with its configured coding model and workspace tools. Use `/project` to see current changes and previous work, then choose a conversation to resume. Use **Stop** to interrupt an active task or workbench command.
|
|
189
|
+
|
|
190
|
+
Type `/hlm` to inspect and use the host's Qriton models alongside that coding workflow. Model files, input files and Python runtimes live on the host; the phone supplies the conversation, choices and approvals. These slash commands are available on a `qriton serve` host; a terminal session shared with `/share` has a different command interface.
|
|
191
|
+
|
|
192
|
+
### Pick up unfinished work
|
|
193
|
+
|
|
194
|
+
Run this in your project when you return to it:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
qriton project # current Git changes, recent tasks and last recorded checks
|
|
198
|
+
qriton resume <session-id> # use an id from the overview to continue that conversation
|
|
199
|
+
qriton project json # the same overview as structured data
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The overview runs offline without loading a model or requesting credentials. It reads sessions for this workspace and reports missing Git or session history directly. Older conversations without a saved outcome show that the outcome is unknown. Recorded checks describe that earlier turn; they do not certify the files currently on disk.
|
|
203
|
+
|
|
204
|
+
Inside a session, use `/project`, then `/resume <session-id>`. The same commands work from a paired phone connected to a serving host; its overview offers resume choices. Resuming opens the conversation so you can continue the work under your current approvals.
|
|
205
|
+
|
|
124
206
|
### Approval modes
|
|
125
207
|
|
|
126
208
|
| Mode | File changes | Commands |
|
|
@@ -136,18 +218,25 @@ At an approval: `y` approves once, `n` rejects, `a` always allows what the promp
|
|
|
136
218
|
|
|
137
219
|
For `-p` runs nobody is there to approve, so actions that would need approval are rejected. Use `--mode auto-edit` to allow file edits, or `--mode full-auto` for unattended commands.
|
|
138
220
|
|
|
221
|
+
For changes made through file tools, the completion report records recognized check commands after the latest edit. `passed` means those commands exited zero; it does not assess test coverage or prove the change correct. Failed checks are reported, and another edit clears the earlier check results. Unrecognized commands and changes with no checks remain `unverified`; documentation-only edits do not trigger a test reminder.
|
|
222
|
+
|
|
139
223
|
## Memory
|
|
140
224
|
|
|
141
225
|
Qriton keeps a memory of your project across sessions: conventions, decisions, facts that were hard to find. Ask it to remember something, or use `/remember`. Corrections keep the earlier wording, and forgotten facts can be restored.
|
|
142
226
|
|
|
227
|
+
When a proposed fact matches an existing memory, automatic capture keeps the existing wording if it differs. Agent `remember` calls also preserve matched user-supplied, pinned or higher-confidence facts; explicit corrections use `update_memory` under the current approval mode. Agent corrections record the agent as their source. Matching does not detect every contradiction, so review important memories. Forgetting retains history for restoration and is not secure deletion.
|
|
228
|
+
|
|
143
229
|
```text
|
|
144
230
|
/remember prices are integer euro cents, never floats
|
|
145
231
|
/memory what is stored, recent entries
|
|
146
232
|
/recall <query> search memory
|
|
147
233
|
/forget <id> drop a memory (/restore <id> brings it back)
|
|
234
|
+
/graph see your project memory as an interactive graph
|
|
148
235
|
```
|
|
149
236
|
|
|
150
|
-
|
|
237
|
+
`/graph`, or `qriton memory graph` from the shell, opens your project's memory in the browser: what qriton knows, how the pieces connect, what was corrected and when. Select a memory to see its history and connections, or to copy the command that forgets or restores it (`qriton memory forget <id>` works from the shell too). The page itself is a single private file that works offline and cannot change anything. `qriton memory graph json`, `dot` or `mermaid` exports it for other tools.
|
|
238
|
+
|
|
239
|
+
Memory is stored locally per project. Recalled facts become context for your selected chat model, and semantic recall sends text to the configured embedding service. With the local embedding model installed (`qriton pull bge-m3`), recall also finds related facts that use different words.
|
|
151
240
|
|
|
152
241
|
## Commands
|
|
153
242
|
|
|
@@ -158,18 +247,19 @@ Type `/` for suggestions. The most used:
|
|
|
158
247
|
| `/help` | all commands and shortcuts |
|
|
159
248
|
| `/model <name>`, `/models` | switch or browse models |
|
|
160
249
|
| `/mode <mode>`, `/auto [on\|off]` | change approval mode |
|
|
250
|
+
| `/project` | current changes, recent work and recorded checks |
|
|
161
251
|
| `/sessions`, `/resume [id]` | browse and continue past conversations |
|
|
162
252
|
| `/memory`, `/remember`, `/recall`, `/forget` | project memory |
|
|
163
|
-
| `/hlm` | run and edit Qriton HLM models |
|
|
253
|
+
| `/hlm` | run and edit Qriton HLM models; `/hlm overview` shows local setup and next steps |
|
|
164
254
|
| `/servers`, `/server <url>` | find or select an Ollama server |
|
|
165
255
|
| `/image <path>` | attach a screenshot to your next message |
|
|
166
256
|
| `/compact` | summarise the conversation to free space |
|
|
167
257
|
| `/stats`, `/usage` | speed, context use, token and cost log |
|
|
168
258
|
| `/unload` | free the memory local models are using |
|
|
169
|
-
| `/theme light\|dark` | colours
|
|
259
|
+
| `/theme auto\|light\|dark` | colours: auto matches your terminal's background |
|
|
170
260
|
| `/clear` | start over |
|
|
171
261
|
|
|
172
|
-
From the shell: `qriton hlm`, `qriton models`, `qriton sessions`, `qriton usage`, `qriton doctor`, `qriton capabilities`.
|
|
262
|
+
From the shell: `qriton project`, `qriton hlm`, `qriton models`, `qriton sessions`, `qriton usage`, `qriton doctor`, `qriton capabilities`.
|
|
173
263
|
|
|
174
264
|
## Configuration
|
|
175
265
|
|
|
@@ -212,10 +302,54 @@ qriton mesh join <code> # every other machine
|
|
|
212
302
|
|
|
213
303
|
Then set `"mesh": { "enabled": true, "name": "laptop" }` in `~/.qriton/config.json` on each machine. Interactive sessions join the mesh; one-off `-p` runs stay private. In a session, `/peers` shows who is online (machine, project, model, busy or idle, and a fingerprint), `/tell <peer> <text>` sends a message, and `/mesh scan` finds NATS servers on your network. The model can also list peers and send messages; sending asks for approval unless you run in `full-auto`.
|
|
214
304
|
|
|
215
|
-
**
|
|
305
|
+
**Mesh messages are end-to-end encrypted.** Each machine has its own keys, and every mesh message is encrypted and signed before it leaves, so the NATS server, or anyone on the network, sees only random bytes on random-looking channels. Direct messages can be read by their recipient only, not even by other machines in the group. The invite code contains the group secret, so pass it only over a channel you trust. A relay on the internet also needs `tls://`, and per-machine keys (`qriton mesh status` prints the one to add to the server).
|
|
216
306
|
|
|
217
307
|
A received message is shown to you and waits for `/accept`. With `"accept": "auto"` it joins the task queue on its own, so qritons can coordinate work without you in the loop. Either way it is labelled as coming from another agent, never from you: it grants no permission, and every action still goes through your approvals. The mesh is off unless you configure it, and a project can never turn it on.
|
|
218
308
|
|
|
309
|
+
Incoming messages also pass through the Shield. You always see every message; the Shield only decides whether it may join the task on its own:
|
|
310
|
+
- **Unflagged messages** behave as described above.
|
|
311
|
+
- **Flagged messages from machines you trust** are never held back. List those machines' ids (shown by `/peers`) in `"trusted"` in your user config, and the warning travels with the message to you and to the agent. The one exception is a possible credential: it waits for `/accept`, so a secret never reaches a model without you choosing it.
|
|
312
|
+
- **Flagged messages from any other member** never join by themselves. They wait for `/accept`, or cannot be accepted at all in Shield `block` mode or when they contain a possible credential.
|
|
313
|
+
|
|
314
|
+
Trust is the machine's id, which each message proves with its signature, so a message cannot borrow a trusted machine's name.
|
|
315
|
+
|
|
316
|
+
Pattern checks can be fooled, so they are not the last line of defence. Once a message from another qriton joins a conversation, trusted or not, that conversation holds **outside input**, and the status line says so:
|
|
317
|
+
- **Every action asks you:** writes, commands, commits, memory changes and mesh sends, in any approval mode including `full-auto`.
|
|
318
|
+
- **Network tools ask too:** web search, fetch and research could carry data out in their arguments, so they ask as well.
|
|
319
|
+
- **No session-wide approvals:** "allow for this session" is not offered, and earlier grants do not apply.
|
|
320
|
+
- **Local reading and thinking stay free:** the agent can still read files, reason and draft on its own.
|
|
321
|
+
|
|
322
|
+
A model that is talked into something by that text still cannot act on it without you. The mark lasts until `/clear`, because the text stays in the model's context, and a resumed conversation containing such a message is marked again.
|
|
323
|
+
|
|
324
|
+
## A signed agent on the web
|
|
325
|
+
|
|
326
|
+
Websites are starting to tell known agents from anonymous bots. With Web Bot Auth, the IETF draft that Cloudflare, Google and others are testing, qriton can sign its page fetches (`fetch_url`, `research`). A site can then recognise this agent and apply its own policy, instead of blocking it or treating it as a scraper posing as a browser.
|
|
327
|
+
|
|
328
|
+
```sh
|
|
329
|
+
qriton agent # this agent's key id, and whether signing is on
|
|
330
|
+
qriton agent directory ./site # the public key, ready to host
|
|
331
|
+
qriton agent check # a signed request to Cloudflare's test endpoint, explained
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
To turn it on:
|
|
335
|
+
1. Host the key directory at an https address you control, at `https://agent.example.com/.well-known/http-message-signatures-directory`. `qriton agent directory` writes it, with a `web.config` for IIS.
|
|
336
|
+
2. Set this in `~/.qriton/config.json`, listing the sites that should know who you are:
|
|
337
|
+
```json
|
|
338
|
+
{ "webAgent": { "sign": true, "directory": "https://agent.example.com", "sites": ["shop.example", "*.gov.example"] } }
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Page fetches to those sites, over https only, then carry an Ed25519 signature over the target host, valid for one minute, plus a `Signature-Agent` header pointing at your directory. They identify as `qriton/<version> (+https://agent.example.com)`.
|
|
342
|
+
|
|
343
|
+
Every other site sees an anonymous browser request, exactly as before. A redirect is decided again for each site it passes through, and a signature never travels on to a site that is not listed. `"*"` signs everywhere, but only if you write it.
|
|
344
|
+
|
|
345
|
+
Identifying as an agent also tells a site it may serve you a page written for agents, with hidden instructions. So a page fetched while identified counts as outside input: until `/clear`, every action in that conversation asks you first. One key can serve several machines: copy `~/.qriton/web-agent.json` between them, so sites cannot tell the machines apart.
|
|
346
|
+
|
|
347
|
+
- **The key:** it belongs to this installation. It is kept privately in `~/.qriton/web-agent.json`, separate from mesh keys; only the public half is published.
|
|
348
|
+
- **Off by default,** and even when on, it only signs for the sites you list.
|
|
349
|
+
- **User settings only:** a project cannot change it.
|
|
350
|
+
- **Standard format:** signatures match the RFC 9421 and draft test vectors, and Cloudflare's test endpoint accepts them as well-formed.
|
|
351
|
+
- **Recognition:** sites recognise the key once the directory is published, and for Cloudflare, once the agent is registered.
|
|
352
|
+
|
|
219
353
|
## Teams and managed machines
|
|
220
354
|
|
|
221
355
|
Administrators can restrict network destinations, allowed approval modes and which project settings apply, and can run commands in a network-isolated container. For the deployment guide, write to **cli@qriton.com**.
|