@reasontrail/cli 0.1.0 → 0.1.1
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/CHANGELOG.md +14 -0
- package/README.md +115 -86
- package/package.json +8 -2
- package/runtime/reasontrail-runtime.mjs +3798 -2058
- package/src/build-info.json +1 -1
- package/src/cli.mjs +205 -9
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.1 - 2026-09-13
|
|
4
|
+
|
|
5
|
+
- Ships the production-proven ReasonTrail Runtime `0.3.2` using protocol `3`.
|
|
6
|
+
- Accepts the canonical `reasontrail.worker-result.v1` file-change vocabulary
|
|
7
|
+
(`ADDED`, `MODIFIED`, `DELETED`, `RENAMED`) and normalizes the reviewed legacy
|
|
8
|
+
aliases emitted by coding providers before submission.
|
|
9
|
+
- Supports lockfile-bound dependency preparation in disposable Git workspaces,
|
|
10
|
+
with explicit public-network authorization and Linux Bubblewrap containment.
|
|
11
|
+
- Documents the current hosted endpoint, device login, Runtime lifecycle,
|
|
12
|
+
Mission evidence/review path, human gates, upgrades, and clean uninstall.
|
|
13
|
+
|
|
14
|
+
This release does not include unrelated Conversation or provider-usage fixes.
|
package/README.md
CHANGED
|
@@ -1,140 +1,169 @@
|
|
|
1
1
|
# ReasonTrail CLI and Mission Runtime
|
|
2
2
|
|
|
3
|
-
The official command-line interface and execution runtime for
|
|
3
|
+
The official command-line interface and execution runtime for
|
|
4
|
+
[ReasonTrail](https://reasontrail.ai): shared project memory and supervised
|
|
5
|
+
Mission execution.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
`@reasontrail/cli` is the only public ReasonTrail npm package. It contains the
|
|
8
|
+
`reasontrail` CLI and a self-contained ReasonTrail Runtime; there is no separate
|
|
9
|
+
runtime package or download.
|
|
10
|
+
|
|
11
|
+
## Install and verify
|
|
12
|
+
|
|
13
|
+
Requirements: Node.js 20 or newer.
|
|
6
14
|
|
|
7
15
|
```bash
|
|
8
|
-
npm install -g @reasontrail/cli
|
|
16
|
+
npm install -g @reasontrail/cli@latest
|
|
17
|
+
reasontrail --version
|
|
18
|
+
reasontrail --help
|
|
9
19
|
```
|
|
10
20
|
|
|
11
|
-
|
|
21
|
+
CLI release `0.1.1` includes ReasonTrail Runtime `0.3.2`, protocol `3`.
|
|
12
22
|
|
|
13
|
-
##
|
|
23
|
+
## Connect to hosted ReasonTrail
|
|
14
24
|
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npm install -g @reasontrail/cli
|
|
18
|
-
```
|
|
25
|
+
Configure the named production profile, then use device login:
|
|
19
26
|
|
|
20
|
-
### 2. Configure a named profile
|
|
21
27
|
```bash
|
|
22
|
-
reasontrail config endpoint
|
|
28
|
+
reasontrail config endpoint https://app.reasontrail.ai/api/mcp --profile production
|
|
29
|
+
reasontrail auth login --device --profile production
|
|
30
|
+
reasontrail status --profile production
|
|
23
31
|
```
|
|
24
32
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
33
|
+
Device login prints a short-lived browser link and code. Sign in, approve the
|
|
34
|
+
displayed project permissions, and return to the terminal. The CLI stores the
|
|
35
|
+
issued credential in the system credential store or its owner-only profile
|
|
36
|
+
directory. Do not put credentials in command arguments, transcripts, or Git.
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
Every server-capable production command requires `--profile production`.
|
|
39
|
+
Interactive commands ask you to type `PRODUCTION`; noninteractive commands also
|
|
40
|
+
require the narrow `--confirm-production` flag.
|
|
41
|
+
|
|
42
|
+
From the Git checkout associated with your ReasonTrail project, bind and verify
|
|
43
|
+
it:
|
|
30
44
|
|
|
31
45
|
```bash
|
|
32
|
-
reasontrail
|
|
46
|
+
reasontrail . --project your-project --profile production
|
|
47
|
+
reasontrail status --profile production
|
|
33
48
|
```
|
|
34
49
|
|
|
35
|
-
|
|
36
|
-
`~/.config/reasontrail/profiles/<profile>/credentials.json` with mode `0600`.
|
|
37
|
-
Legacy unprofiled credentials are not loaded.
|
|
50
|
+
## Project memory commands
|
|
38
51
|
|
|
39
|
-
### 4. Connect your repository
|
|
40
52
|
```bash
|
|
41
|
-
|
|
42
|
-
reasontrail
|
|
53
|
+
reasontrail search --query "migration decisions" --profile production
|
|
54
|
+
reasontrail context --request "Continue the current task" --profile production
|
|
55
|
+
reasontrail context --request "Inspect repository evidence" --deep --profile production
|
|
43
56
|
```
|
|
44
|
-
Binds the current Git repository only inside the selected profile.
|
|
45
57
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
58
|
+
Use `reasontrail update --profile production` with a structured reviewed outcome
|
|
59
|
+
on standard input to submit discoveries and task outcomes to the Brain.
|
|
60
|
+
|
|
61
|
+
## Mission Runtime
|
|
62
|
+
|
|
63
|
+
The Runtime runs on the workstation or build server that owns the repository. It
|
|
64
|
+
connects outbound to ReasonTrail over HTTPS, creates a disposable Git workspace,
|
|
65
|
+
prepares lockfile-bound dependencies under the selected network policy, invokes
|
|
66
|
+
the configured coding agent, and returns structured results and evidence. It
|
|
67
|
+
does not open an inbound port or expose an arbitrary remote-command endpoint.
|
|
68
|
+
|
|
69
|
+
Create a Runtime under **Settings → Execution Infrastructure**, choose the
|
|
70
|
+
project and machine-local repository path, then copy the generated enrollment
|
|
71
|
+
command. Its production form is:
|
|
53
72
|
|
|
54
|
-
### 6. Verify setup
|
|
55
73
|
```bash
|
|
56
|
-
reasontrail
|
|
74
|
+
reasontrail runtime enroll \
|
|
75
|
+
--profile production \
|
|
76
|
+
--url https://app.reasontrail.ai \
|
|
77
|
+
--token <runtime-token> \
|
|
78
|
+
--execution-root <separate-private-directory> \
|
|
79
|
+
--workspace <generated-project-id>=<local-repository-path>
|
|
80
|
+
|
|
81
|
+
reasontrail runtime start --profile production
|
|
57
82
|
```
|
|
58
|
-
Verifies backend connection, authentication, repository binding, and project context availability.
|
|
59
83
|
|
|
60
|
-
|
|
84
|
+
The generated command supplies the opaque project id; users do not look it up or
|
|
85
|
+
edit an internal file. Runtime credentials are shown once and must not be
|
|
86
|
+
committed or copied into project configuration.
|
|
61
87
|
|
|
62
|
-
|
|
88
|
+
Dependency network access defaults to `disabled`. For a project whose checked-in
|
|
89
|
+
lockfile needs anonymous public packages, explicitly authorize that policy when
|
|
90
|
+
enrolling or starting:
|
|
63
91
|
|
|
64
92
|
```bash
|
|
65
|
-
|
|
66
|
-
reasontrail --version
|
|
67
|
-
reasontrail doctor --profile development
|
|
93
|
+
reasontrail runtime start --profile production --dependency-network public
|
|
68
94
|
```
|
|
69
95
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
96
|
+
Runtime `0.3.2` requires Linux Bubblewrap for dependency preparation. Package
|
|
97
|
+
installs run inside the disposable workspace with a private cache and a minimal
|
|
98
|
+
read-only host/toolchain view. Private registries and inherited package-manager,
|
|
99
|
+
cloud, SSH, database, and Runtime credentials are not supported by this policy.
|
|
74
100
|
|
|
75
|
-
|
|
101
|
+
### Worker result contract
|
|
76
102
|
|
|
77
|
-
|
|
103
|
+
Runtime workers return `reasontrail.worker-result.v1`. File changes use the
|
|
104
|
+
canonical values `ADDED`, `MODIFIED`, `DELETED`, and `RENAMED`. Runtime `0.3.2`
|
|
105
|
+
normalizes the reviewed provider aliases `CREATED`, `UPDATED`, `REMOVED`, and
|
|
106
|
+
`MOVED` for backward compatibility; those aliases are not the API contract.
|
|
78
107
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- `reasontrail search --profile development --query "<term>"` — Search your project Brain.
|
|
83
|
-
- `reasontrail update --profile development` — Submit structured findings and discoveries (via stdin JSON) to the Brain.
|
|
84
|
-
- `reasontrail doctor --profile development` — Diagnostics without transcript synchronization.
|
|
85
|
-
- `reasontrail sync codex --profile development` — Local preview only; does not initialize MCP or load credentials.
|
|
86
|
-
- `reasontrail sync codex --profile development --apply` — Explicitly synchronize eligible sessions.
|
|
87
|
-
- `reasontrail install --platform <claude|codex|agy>` — Manually install assistant skill.
|
|
88
|
-
- `reasontrail uninstall --platform <claude|codex|agy>` — Remove assistant skill.
|
|
108
|
+
`reasontrail runtime status --profile production` reports the local enrollment;
|
|
109
|
+
the Execution Infrastructure page is authoritative for live `ONLINE` status,
|
|
110
|
+
runtime version, protocol, worker availability, and readiness.
|
|
89
111
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this guard.
|
|
112
|
+
The Runtime runs in the foreground. Stop that local process with your terminal's
|
|
113
|
+
interrupt and start it again with `reasontrail runtime start`; persisted Missions
|
|
114
|
+
and evidence remain in ReasonTrail. To pause or continue a Mission itself, use:
|
|
94
115
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- `reasontrail decide <mission-id> <gate-id> <answer>` — Answer a human decision gate.
|
|
116
|
+
```bash
|
|
117
|
+
reasontrail run stop <mission-id> --profile production
|
|
118
|
+
reasontrail run resume <mission-id> --profile production
|
|
119
|
+
```
|
|
100
120
|
|
|
101
|
-
|
|
121
|
+
## Human gates and completion
|
|
102
122
|
|
|
103
|
-
|
|
123
|
+
Missions can pause asynchronously for provider recovery, review decisions, or
|
|
124
|
+
completion approval. Keep the Mission page open: it updates while the Mission is
|
|
125
|
+
running and presents the next required action without a normal manual refresh.
|
|
126
|
+
After evidence and independent review pass, select **Approve and complete the
|
|
127
|
+
mission** when that gate appears.
|
|
104
128
|
|
|
105
|
-
|
|
129
|
+
## Upgrade
|
|
106
130
|
|
|
107
|
-
|
|
108
|
-
- Runs locally on your workstation or build server.
|
|
109
|
-
- Connects **outbound** to ReasonTrail over HTTPS.
|
|
110
|
-
- Requires **no inbound firewall/NAT ports** or public IP addresses.
|
|
111
|
-
- Claims assignments, runs local worker coding agents (Claude Code, Codex), verifies work, and submits diffs and evidence.
|
|
131
|
+
Stop the foreground Runtime, install the current package, verify it, and restart:
|
|
112
132
|
|
|
113
|
-
### 1. Enroll Machine
|
|
114
133
|
```bash
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
134
|
+
npm install -g @reasontrail/cli@latest
|
|
135
|
+
reasontrail --version
|
|
136
|
+
reasontrail doctor --profile production
|
|
137
|
+
reasontrail runtime start --profile production
|
|
119
138
|
```
|
|
120
139
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
140
|
+
The existing profile, login, Runtime enrollment, and project bindings remain in
|
|
141
|
+
place. `reasontrail upgrade` is reserved and is not the supported updater.
|
|
142
|
+
|
|
143
|
+
## Uninstall
|
|
125
144
|
|
|
126
|
-
### 3. Start Runtime
|
|
127
145
|
```bash
|
|
128
|
-
reasontrail runtime
|
|
146
|
+
reasontrail runtime logout --profile production
|
|
147
|
+
reasontrail auth logout --profile production
|
|
148
|
+
npm uninstall -g @reasontrail/cli
|
|
129
149
|
```
|
|
130
150
|
|
|
131
|
-
|
|
151
|
+
Runtime logout removes the local enrollment only. Revoke the Runtime credential
|
|
152
|
+
and any MCP token in ReasonTrail if the machine should no longer connect. npm
|
|
153
|
+
uninstall does not delete ReasonTrail projects, Missions, Work, Tasks, evidence,
|
|
154
|
+
or other customer data; it also leaves local profile data available for a later
|
|
155
|
+
reinstall.
|
|
156
|
+
|
|
157
|
+
## Local development profile
|
|
158
|
+
|
|
159
|
+
Self-hosted development uses an explicitly separate loopback-only profile:
|
|
160
|
+
|
|
132
161
|
```bash
|
|
133
|
-
reasontrail
|
|
162
|
+
reasontrail config endpoint http://127.0.0.1:3000/api/mcp --profile development
|
|
163
|
+
reasontrail auth login --device --profile development
|
|
164
|
+
reasontrail status --profile development
|
|
134
165
|
```
|
|
135
166
|
|
|
136
|
-
---
|
|
137
|
-
|
|
138
167
|
## License
|
|
139
168
|
|
|
140
169
|
Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reasontrail/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "ReasonTrail CLI and Mission Runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -12,14 +12,20 @@
|
|
|
12
12
|
"skills",
|
|
13
13
|
"runtime",
|
|
14
14
|
"README.md",
|
|
15
|
+
"CHANGELOG.md",
|
|
15
16
|
"LICENSE"
|
|
16
17
|
],
|
|
17
18
|
"engines": {
|
|
18
19
|
"node": ">=20"
|
|
19
20
|
},
|
|
20
21
|
"homepage": "https://reasontrail.ai",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "git+https://github.com/joaquimpsoares/reasontrail.git",
|
|
25
|
+
"directory": "packages/reasontrail-cli"
|
|
26
|
+
},
|
|
21
27
|
"bugs": {
|
|
22
|
-
"url": "https://reasontrail
|
|
28
|
+
"url": "https://github.com/joaquimpsoares/reasontrail/issues"
|
|
23
29
|
},
|
|
24
30
|
"license": "Apache-2.0",
|
|
25
31
|
"keywords": [
|