@quireco/cli 0.0.6 → 0.0.9
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 +62 -78
- package/dist/{cli-D7sefGte.mjs → cli-C2HyQykL.mjs} +4911 -4501
- package/dist/index.mjs +1 -1
- package/dist/quire.mjs +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -28,40 +28,44 @@ vp pack
|
|
|
28
28
|
node dist/quire.mjs --help
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
##
|
|
31
|
+
## Project runbook
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Project-specific target guidance lives in `.quire/runbook.md`. The runbook is a committed Markdown file for deployments, local URLs, mobile app IDs, verification commands, safety rules, setup scripts, test accounts, and runner requirements. Quire does not pre-classify every run as web, mobile, or code before the agent starts; it gives the agent the runbook path, caller context, runtime capabilities, and request so the agent can resolve the target or report the smallest missing context.
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
quire env init --web # prompt for a web target
|
|
37
|
-
quire env init --web --base-url http://localhost:3000 # non-interactive web target
|
|
38
|
-
quire env init --mobile --ios # scaffold a mobile target
|
|
39
|
-
quire env # print the resolved target
|
|
40
|
-
quire env --json # machine-readable form
|
|
35
|
+
Create or refresh the runbook with:
|
|
41
36
|
|
|
42
|
-
|
|
43
|
-
quire
|
|
44
|
-
quire env unset device
|
|
37
|
+
```bash
|
|
38
|
+
quire setup
|
|
45
39
|
```
|
|
46
40
|
|
|
47
|
-
|
|
41
|
+
A typical runbook includes sections like:
|
|
48
42
|
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
quire env init --web --env prod --base-url https://app.example.com
|
|
52
|
-
quire "Verify checkout" --env prod
|
|
53
|
-
```
|
|
43
|
+
```markdown
|
|
44
|
+
# Quire runbook
|
|
54
45
|
|
|
55
|
-
|
|
46
|
+
## How to choose a target
|
|
56
47
|
|
|
57
|
-
-
|
|
58
|
-
|
|
48
|
+
If the user says prod, use the production deployment in read-only mode.
|
|
49
|
+
If the user asks for local verification, use the provided URL or `$QUIRE_WEB_URL`.
|
|
50
|
+
Do not guess ports or app IDs.
|
|
59
51
|
|
|
60
|
-
|
|
52
|
+
## Deployments
|
|
53
|
+
|
|
54
|
+
### dev
|
|
55
|
+
|
|
56
|
+
URL: https://dev.example.com
|
|
57
|
+
Safe for test accounts.
|
|
58
|
+
|
|
59
|
+
## Verification procedures
|
|
60
|
+
|
|
61
|
+
Run `vp check` for static checks and `vp test` for unit tests.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The removed `quire env` command now prints a migration message that points to `.quire/runbook.md`.
|
|
61
65
|
|
|
62
66
|
## Doctor
|
|
63
67
|
|
|
64
|
-
`quire doctor` diagnoses the current setup before you start an investigation. It checks identity (auth + model broker), workspace
|
|
68
|
+
`quire doctor` diagnoses the current setup before you start an investigation. It checks identity (auth + model broker), workspace runbook state, and run state (runs root writable, no stuck runs):
|
|
65
69
|
|
|
66
70
|
```bash
|
|
67
71
|
quire doctor # human-readable report, grouped by section
|
|
@@ -69,9 +73,7 @@ quire doctor --json # structured report for agents/CI
|
|
|
69
73
|
quire doctor --strict # exit non-zero on warnings as well as failures
|
|
70
74
|
```
|
|
71
75
|
|
|
72
|
-
Each check has a stable `id` (e.g. `auth.present`, `
|
|
73
|
-
|
|
74
|
-
Target reachability runs by default: web environments are probed with a HEAD request, iOS local environments check `xcrun simctl list devices booted`, Android local checks `adb devices`, and Appium providers ping `/status`.
|
|
76
|
+
Each check has a stable `id` (e.g. `auth.present`, `auth.valid`, `runbook.present`, `runbook.readable`, `runs.rootWritable`) so coding agents can act on specific failures without parsing prose. Failing checks include a `fix.command` you can run to resolve them. Exit code is `0` when all checks pass (or only warnings in non-strict mode) and `1` otherwise.
|
|
75
77
|
|
|
76
78
|
## Investigations
|
|
77
79
|
|
|
@@ -93,58 +95,55 @@ Coding agents and scripts should use `--json`. JSON mode returns a durable run h
|
|
|
93
95
|
|
|
94
96
|
```bash
|
|
95
97
|
quire investigate "Reproduce the checkout crash" --json
|
|
96
|
-
cat issue.md | quire investigate --
|
|
97
|
-
quire
|
|
98
|
+
cat issue.md | quire investigate --json
|
|
99
|
+
quire status <run-id> --json
|
|
100
|
+
quire watch <run-id>
|
|
98
101
|
```
|
|
99
102
|
|
|
100
103
|
Continue a previous session when the first run needs more context or a retry:
|
|
101
104
|
|
|
102
105
|
```bash
|
|
103
106
|
quire continue <run-id> "Use the seeded buyer account and retry checkout"
|
|
104
|
-
printf 'Fixture account: buyer@example.com\n' | quire continue <run-id> --
|
|
107
|
+
printf 'Fixture account: buyer@example.com\n' | quire continue <run-id> --json
|
|
105
108
|
```
|
|
106
109
|
|
|
107
|
-
`continue` starts a new linked run, forks the prior
|
|
110
|
+
`continue` starts a new linked run, forks the prior harness-native session when available, and injects the previous transcript, handoff, evidence summary, and new caller context. The original run remains immutable.
|
|
108
111
|
|
|
109
|
-
`investigate` carries a deliberately small flag surface
|
|
112
|
+
`investigate` carries a deliberately small flag surface. Target context belongs in the prompt, `--url`, `$QUIRE_WEB_URL`, and `.quire/runbook.md`. Piped stdin is read automatically when stdin is a pipe or redirected file. If a positional prompt is also present, the prompt steers the piped context. The run-level flags are:
|
|
110
113
|
|
|
111
|
-
- `--stdin` reads plain-text investigation context from stdin. If a positional prompt is also present, stdin is treated as additional context.
|
|
112
114
|
- `--json` reserves stdout for the started run handle JSON only and uses automation-safe fail-fast behavior.
|
|
113
115
|
- `--detach` starts the run without attaching to the live log.
|
|
114
|
-
- `--
|
|
115
|
-
- `--
|
|
116
|
-
- `--url <url>` overrides the configured web `baseUrl` for one run.
|
|
117
|
-
- `--env <name>` uses `.quire/environments/<name>.json` instead of the default `.quire/environment.json`.
|
|
116
|
+
- `--headed` shows the browser window when browser automation is used.
|
|
117
|
+
- `--url <url>` provides an explicit caller-context URL for one run. It does not force the run to be a web target; the agent still resolves what the URL means from the request and runbook.
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
The top-level prompt form and the explicit investigate command are equivalent:
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
quire
|
|
123
|
-
quire
|
|
124
|
-
quire handoff <run-id> # alias for `quire runs handoff`
|
|
122
|
+
quire "Verify checkout before I approve this PR"
|
|
123
|
+
quire investigate "Verify checkout before I approve this PR"
|
|
125
124
|
```
|
|
126
125
|
|
|
127
|
-
|
|
126
|
+
Run lifecycle operations are top-level verbs: `quire status <run-id>`, `quire watch <run-id>`, `quire cancel <run-id>`, and `quire sync <run-id>`. The plural `quire runs` command lists recent runs.
|
|
128
127
|
|
|
129
|
-
Each run writes
|
|
130
|
-
Runs also store a local Pi session under the run directory so `quire continue` can resume prior context without syncing raw prompts, completions, or provider credentials.
|
|
128
|
+
Each run writes a small artifact contract under `~/.local/share/quire/runs/<workspace-key>/<run-id>/` by default:
|
|
131
129
|
|
|
132
|
-
|
|
130
|
+
```text
|
|
131
|
+
run/
|
|
132
|
+
status.json
|
|
133
|
+
progress.jsonl
|
|
134
|
+
handoff.md
|
|
135
|
+
evidence/
|
|
136
|
+
.harness-sessions/
|
|
137
|
+
<session-id>.jsonl
|
|
138
|
+
```
|
|
133
139
|
|
|
134
|
-
- `
|
|
135
|
-
- `evidence[]` with optional run-local artifact paths
|
|
136
|
-
- `reproductionSteps[]` and `journeysTried[]`
|
|
137
|
-
- `environment.notes[]` and `environment.blockers[]`
|
|
138
|
-
- `codeReferences[]` with likely edit targets, optional symbols/lines, rationale, and confidence
|
|
139
|
-
- `verification.commands[]` and `verification.manualSteps[]` with expected outcomes
|
|
140
|
-
- `recommendedActions[]` and `suspectedFiles[]` for backwards-compatible summaries
|
|
140
|
+
Set `QUIRE_RUNS_DIR` to override the run-artifact root. `status.json` is Quire-owned operational state: lifecycle status, run metadata, request metadata, sync state, harness-session pointers, and final handoff/result JSON. `progress.jsonl` is the user-visible narrated timeline that powers `quire watch` and synced case events. `handoff.md` is the durable user-facing output. `evidence/` contains artifacts referenced by the progress stream or handoff. Harness-native transcripts live in hidden `.harness-sessions/` files and are referenced from `status.json`; they are private implementation state, not the public Quire run ledger.
|
|
141
141
|
|
|
142
|
-
|
|
143
|
-
Use `quire runs handoff <run-id> --wait` when a human or coding agent needs a compact markdown brief with summary, evidence, likely source files, verification commands, and a ready-to-use next prompt.
|
|
142
|
+
Local investigations run the Pi agent loop on your machine. Quire prefers local Pi/OpenAI Codex provider auth when it is configured, then local GitHub Copilot auth, then Quire Credits through Quire's authenticated broker. Quire-owned provider auth is read from `~/.local/share/quire/model-auth.json` by default, with compatibility fallback to Pi's existing auth file. Set `QUIRE_MODEL_AUTH_PATH` to override the Quire-owned model auth file. `quire login` associates local runs with your Quire account for identity, wallet access, run upload, and future hosted workflows; personal model-provider auth remains a separate local-provider concern.
|
|
144
143
|
|
|
145
|
-
|
|
144
|
+
The investigation runtime defaults to GPT-5.5 with medium thinking effort for local ChatGPT/Codex auth, local GitHub Copilot auth, and Quire Credits brokered through Cloudflare AI Gateway.
|
|
146
145
|
|
|
147
|
-
|
|
146
|
+
Authenticated runs fetch remote Quire run add-ons at startup. Run add-ons can include an Agent Skills-compatible skill pack, a Quire MCP gateway configured in the web app, and non-authoritative team or user guidance. The CLI-owned run instructions, safety contract, progress protocol, and handoff protocol remain authoritative. Quire includes the `agent-browser` skill by default, then layers dashboard-uploaded skills on top. The CLI downloads skill ZIPs only when the server hash changes, verifies them, unpacks them under `~/.local/share/quire/skill-packs/`, and attaches the unpacked root to Pi through native `additionalSkillPaths` so skills follow Pi's normal progressive-disclosure behavior. If an MCP gateway is present, the CLI exposes it as the Pi custom tool `quire_mcp_call`; tool execution is brokered through the authenticated Quire API and is limited to safe allowlisted tools. Run metadata records run-instruction ids/hashes, run add-on ids/hashes, skill pack id/hash/source, and MCP gateway id/hash/tool metadata, not raw prompts, raw skill instructions, resource files, provider credentials, or API tokens.
|
|
148
147
|
|
|
149
148
|
Use `quire connect chatgpt` when you want Quire to connect ChatGPT/Codex subscription auth without using the Pi CLI first:
|
|
150
149
|
|
|
@@ -155,6 +154,14 @@ quire connect chatgpt --no-open
|
|
|
155
154
|
|
|
156
155
|
This starts Pi's OpenAI Codex OAuth flow and writes Pi-compatible credentials to Quire's local model-auth store. Existing Pi users do not need this step because Quire still reads Pi's existing auth file as a fallback.
|
|
157
156
|
|
|
157
|
+
Use `quire connect copilot` when you want Quire to connect GitHub Copilot subscription auth. Pass `--github-enterprise <url-or-domain>` for GitHub Enterprise, or omit it for the interactive prompt and press Enter for github.com.
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
quire connect copilot
|
|
161
|
+
quire connect copilot --github-enterprise company.ghe.com
|
|
162
|
+
quire connect copilot --github-enterprise company.ghe.com --json
|
|
163
|
+
```
|
|
164
|
+
|
|
158
165
|
Web investigations use the `agent-browser` package bundled with `@quireco/cli`; a separate global `agent-browser` install is not required. A usable Chrome/Chromium installation is still required for local browser automation unless the run uses an external browser provider or explicit executable path.
|
|
159
166
|
|
|
160
167
|
Remote agents can use an environment-scoped API token instead of browser login:
|
|
@@ -189,7 +196,7 @@ Use `quire whoami --json` to check the authenticated account and hosted model-so
|
|
|
189
196
|
"modelId": "gpt-4.1-mini",
|
|
190
197
|
"status": "succeeded",
|
|
191
198
|
"totalTokens": 13,
|
|
192
|
-
"runId": "
|
|
199
|
+
"runId": "run_9x4mdq7p2h8kc6nv4apz",
|
|
193
200
|
"createdAt": "2026-05-18T06:00:00.000Z"
|
|
194
201
|
}
|
|
195
202
|
]
|
|
@@ -198,26 +205,3 @@ Use `quire whoami --json` to check the authenticated account and hosted model-so
|
|
|
198
205
|
```
|
|
199
206
|
|
|
200
207
|
The hosted status is a redacted summary from Quire's server-side model-source API. It does not include provider credentials, sealed envelopes, raw tokens, prompts, or completions. Local `quire investigate` can use local Pi/OpenAI auth when configured; Quire Credits and hosted/Slack-triggered execution use Quire-managed billing.
|
|
201
|
-
|
|
202
|
-
Example web environment (write with `quire env init --web` and edit via `quire env set`):
|
|
203
|
-
|
|
204
|
-
```json
|
|
205
|
-
{
|
|
206
|
-
"version": 1,
|
|
207
|
-
"app": { "kind": "web", "baseUrl": "http://localhost:3000" }
|
|
208
|
-
}
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
Example mobile environment:
|
|
212
|
-
|
|
213
|
-
```json
|
|
214
|
-
{
|
|
215
|
-
"version": 1,
|
|
216
|
-
"app": {
|
|
217
|
-
"kind": "mobile",
|
|
218
|
-
"platform": "ios",
|
|
219
|
-
"provider": "local",
|
|
220
|
-
"appId": "com.example.app"
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
```
|