qriton 0.3.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.
@@ -0,0 +1,68 @@
1
+ # Workspace configuration trust
2
+
3
+ Qriton requires an explicit grant before applying a project's `.qriton/config.json`. This includes existing project configuration. Without a valid grant, startup stops before loading credentials, contacting providers, or starting an optional Python runtime. A workspace without project configuration uses user/default settings without a grant.
4
+
5
+ ## Review and grant
6
+
7
+ Run these commands in the intended workspace, or supply `-C /path/to/project` to each command:
8
+
9
+ ```sh
10
+ qriton trust show
11
+ ```
12
+
13
+ The offline report displays the canonical workspace, configuration file, a SHA-256 fingerprint, current trust status, and configuration with secret fields and URL credentials/query values redacted. Review the actual file, especially approval mode, shell rules, provider endpoints, model selection, and HLM/Energy executable and source paths. Then use the fingerprint you reviewed:
14
+
15
+ ```sh
16
+ qriton trust grant <fingerprint>
17
+ qriton doctor policy
18
+ ```
19
+
20
+ Replace `<fingerprint>` with the reported 64-character value. A stale or incorrect value is rejected. Do not automate approval by piping a freshly computed fingerprint straight into `grant`; that skips review of what the configuration authorizes.
21
+
22
+ Trust is bound to the canonical workspace and the exact configuration bytes. A symlink alias for the same workspace shares its grant; a different workspace cannot reuse it. Editing configuration, including formatting, requires review and a new grant. Removing the file returns new invocations to user/default configuration. Creating, changing, or removing it during an active session stops subsequent guarded operations and requires a restart.
23
+
24
+ ```sh
25
+ qriton trust revoke
26
+ ```
27
+
28
+ Revocation takes effect at the next execution boundary, including after a pending tool approval. It does not undo completed actions or terminate a subprocess already running. Revoke remains available when project configuration or the receipt is malformed. Plan mode cannot grant trust; revocation is allowed.
29
+
30
+ Receipts live in `$QRITON_HOME/trust/`, normally `~/.qriton/trust/`, with private files and atomic replacement. The state directory and resolved user configuration must be outside the active workspace. Project configuration must be a bounded regular file inside that workspace; symlinked configuration files are rejected.
31
+
32
+ ## Effective policy
33
+
34
+ `qriton doctor policy` works offline even when project configuration is untrusted. `/policy` displays the loaded session's settings in chat. Reports show whether project configuration was applied, current trust status, whether a restart is needed, allowed approval modes, and each setting's origin: default, environment, user, trusted project, invocation, or a runtime change.
35
+
36
+ Untrusted project overrides are not merged into an inspection configuration. `qriton trust show` displays the proposed project values separately. Inspection configurations cannot execute actions. `qriton config init` writes user settings/defaults without copying project permissions or endpoints into global configuration.
37
+
38
+ The regular precedence remains defaults/environment defaults, user configuration, trusted project configuration, and invocation overrides. `QRITON_MODEL` overrides configured model selection before an explicit `--model`; `OLLAMA_HOST` overrides the configured Ollama endpoint. Launcher-managed limits apply after merging. `--yolo` changes approval mode within those limits and does not grant workspace trust.
39
+
40
+ ## Launcher-managed limits
41
+
42
+ A trusted launcher can set `QRITON_POLICY` to an absolute path outside the workspace:
43
+
44
+ ```json
45
+ {
46
+ "version": 1,
47
+ "allowedModes": ["suggest", "plan"],
48
+ "allowProjectConfig": true
49
+ }
50
+ ```
51
+
52
+ ```sh
53
+ QRITON_POLICY=/absolute/path/to/managed-policy.json qriton -C /path/to/project
54
+ ```
55
+
56
+ `allowedModes` is a nonempty list drawn from `suggest`, `auto-edit`, `full-auto`, and `plan`. The default allows all four. A disallowed configured or requested mode fails explicitly; Qriton does not silently choose another. The same check applies to `--mode`, `--yolo`, `/mode`, agent dispatch, and resume. Saved sessions cannot restore an older permission grant.
57
+
58
+ `allowProjectConfig: false` prevents project settings from being applied even if a receipt already exists, and prevents new grants. Project configuration is still read for inspection and validated as a bounded JSON object; malformed files cause an error. This switch does not disable reading repository instruction files as task context.
59
+
60
+ The optional `network` block adds [destination limits and hosted-fallback controls](network-policy.md). Every applicable user and managed network policy must permit a request; project configuration cannot set network policy. Only the documented policy fields and `version` are accepted. Invalid, missing, or unreadable selected policy files fail closed. Changing or removing a loaded policy causes subsequent guarded actions to stop until Qriton is restarted. Keep the policy file, launcher environment, and user-state location under the administrator's control when using these limits for a managed deployment.
61
+
62
+ ## Scope of these controls
63
+
64
+ This feature authorizes configuration. It does not approve every repository file, establish that project instructions are safe, or bind the contents of an executable named by a trusted path. Repository instructions cannot grant programmatic permissions; they remain model context and can still contain prompt injection.
65
+
66
+ CLI startup, interactive commands, agent mode changes, tool execution after approval, and background model/memory work check the loaded trust and policy. Internal programmatic callers that construct a `Config` directly are trusted host code; the public CLI uses the guarded loader.
67
+
68
+ The implemented managed limits cover approval modes, project-configuration loading, and [HTTP destination policy](network-policy.md). [Session conflicts and save failures](session-recovery.md) also have recovery handling. This grant does not provide OS isolation or organization-wide memory administration. Restricted network profiles block unconfined shell, Git and Python execution. In unrestricted mode, shell commands run with the user's OS privileges. Application checks do not contain arbitrary code that already has access to the same account.
@@ -0,0 +1,3 @@
1
+ # Preview a small, seeded edit before selecting its candidate checkpoint.
2
+ # This changes a weight matrix; it does not assert a semantic fact was learned.
3
+ inject 0 42 0.00001
@@ -0,0 +1,8 @@
1
+ {
2
+ "maxControlLossIncrease": 0.1,
3
+ "cases": [
4
+ { "name": "target-example", "role": "target", "text": "The capital of France is Paris." },
5
+ { "name": "control-story", "role": "control", "text": "Once upon a time there was a small village." },
6
+ { "name": "control-science", "role": "control", "text": "Water freezes when the temperature falls." }
7
+ ]
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "controls": [
3
+ "Veldoria's capital city is",
4
+ "The capital of France is",
5
+ "Once upon a time there was",
6
+ "Water freezes when the temperature"
7
+ ]
8
+ }
@@ -0,0 +1 @@
1
+ correct "The capital of Veldoria is" " London"
@@ -0,0 +1 @@
1
+ forget "The capital of Veldoria is"
@@ -0,0 +1,2 @@
1
+ # A fictional fact. The leading space is part of the target token.
2
+ memorize "The capital of Veldoria is" " Paris"
@@ -0,0 +1,2 @@
1
+ # A fictional project convention for testing alongside another fact.
2
+ memorize "The default language for Project Cedar is" " Python"
@@ -0,0 +1,3 @@
1
+ # This target is unreachable along the default certified direction on the pinned 1B trunk.
2
+ # Preview should refuse it while preserving the active facts.
3
+ correct "The capital of Veldoria is" " Rome"
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "qriton",
3
+ "version": "0.3.0",
4
+ "description": "Qriton CLI is a terminal coding agent that runs on infrastructure you control. Local models or any major model API, with a memory record, HLM, and Energy Language.",
5
+ "type": "module",
6
+ "bin": {
7
+ "qriton": "./dist/qriton.js",
8
+ "qr": "./dist/qriton.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "README.md",
13
+ "docs/energy.md",
14
+ "docs/hlm.md",
15
+ "docs/workspace-trust.md",
16
+ "docs/session-recovery.md",
17
+ "docs/terminal-interaction.md",
18
+ "docs/network-policy.md",
19
+ "docs/shield.md",
20
+ "docs/production-operations.md",
21
+ "examples/energy",
22
+ "examples/hlm",
23
+ "containers/runner.Dockerfile",
24
+ "LICENSE",
25
+ "THIRD_PARTY_NOTICES.md",
26
+ "release/contract.json",
27
+ "release/qriton-ed25519.spki.pem"
28
+ ],
29
+ "engines": {
30
+ "node": "^22.16.0 || >=24.0.0"
31
+ },
32
+ "scripts": {
33
+ "build": "node build.mjs",
34
+ "dev": "node build.mjs --watch",
35
+ "start": "node dist/qriton.js",
36
+ "typecheck": "tsc --noEmit",
37
+ "prepublishOnly": "node scripts/release-check.mjs --for-publish",
38
+ "publish:release": "node scripts/publish.mjs",
39
+ "test": "node test-runner.mjs",
40
+ "bench:retrieval": "node bench/memory/run-retrieval.mjs",
41
+ "release:check": "node scripts/release-check.mjs",
42
+ "bench:coding": "node bench/coding/run.mjs"
43
+ },
44
+ "dependencies": {
45
+ "@anthropic-ai/sdk": "0.125.0",
46
+ "@qriton/hopfield-anomaly": "4.0.1",
47
+ "@qriton/shield": "3.3.0",
48
+ "ink": "7.1.1",
49
+ "openai": "7.15.0",
50
+ "react": "19.3.0",
51
+ "string-width": "8.2.0",
52
+ "undici": "7.29.1"
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "^24.0.0",
56
+ "@types/react": "^19.2.0",
57
+ "esbuild": "^0.28.2",
58
+ "typescript": "^5.9.0"
59
+ },
60
+ "keywords": [
61
+ "ollama",
62
+ "xai",
63
+ "grok",
64
+ "anthropic",
65
+ "claude",
66
+ "openai",
67
+ "agent",
68
+ "cli",
69
+ "tui",
70
+ "local-llm",
71
+ "coding-agent",
72
+ "terminal"
73
+ ],
74
+ "license": "MIT",
75
+ "homepage": "https://qriton.com",
76
+ "repository": {
77
+ "type": "git",
78
+ "url": "git+https://github.com/qriton/qriton.git"
79
+ },
80
+ "bugs": {
81
+ "url": "https://github.com/qriton/qriton/issues"
82
+ },
83
+ "author": "Marius Dima",
84
+ "publishConfig": {
85
+ "access": "public"
86
+ }
87
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": "0.3.0",
3
+ "supportedCodingModel": "local Ollama, plus xAI, Anthropic, OpenAI, and OpenAI-compatible APIs",
4
+ "codingEvidence": "One session keeps its transcript, tools, and memory graph across those providers. HLM and Energy Language are separate local workbenches.",
5
+ "localModels": "Optional. A bare qriton command still starts the configured local model. Local models are not the supported coding path.",
6
+ "executionDefault": "host",
7
+ "hostExecution": "Approved commands run on this machine.",
8
+ "containerImage": {
9
+ "digest": "sha256:1254282e6b7f02875d8b1991052ac71a682f01bf652ee5babb61b8a4b243409e",
10
+ "status": "not-accepted",
11
+ "reason": "Optional container toolchain."
12
+ },
13
+ "publicKeySha256": "e9baa9aff6f2feda00844b24636468107d34d3e8afb5d05437d821f1ce97fbe6"
14
+ }
@@ -0,0 +1,3 @@
1
+ -----BEGIN PUBLIC KEY-----
2
+ MCowBQYDK2VwAyEAQb8R9fGrAs5nXuE7XWLLy5RemAl4GRuxXc+0HC442Lc=
3
+ -----END PUBLIC KEY-----