@quireco/cli 0.0.2 → 0.0.4

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
@@ -30,10 +30,11 @@ node dist/quire.mjs --help
30
30
 
31
31
  ## Workspace target (`quire env`)
32
32
 
33
- `quire env` manages the `.quire/environment.json` file that tells Quire what application to investigate. Configure the target once, then `investigate` will pick it up automatically:
33
+ `quire env` manages the workspace target that tells Quire what application to investigate. Configure the default target once, then `investigate` will pick it up automatically:
34
34
 
35
35
  ```bash
36
- quire env init --web --base-url http://localhost:3000 # scaffold a web target
36
+ quire env init --web # prompt for a web target
37
+ quire env init --web --base-url http://localhost:3000 # non-interactive web target
37
38
  quire env init --mobile --ios # scaffold a mobile target
38
39
  quire env # print the resolved target
39
40
  quire env --json # machine-readable form
@@ -43,6 +44,14 @@ quire env set kind=mobile platform=android # switch web → mobi
43
44
  quire env unset device
44
45
  ```
45
46
 
47
+ Named environments live under `.quire/environments/<name>.json` and are selected with `--env`:
48
+
49
+ ```bash
50
+ quire env init --web --env local
51
+ quire env init --web --env prod --base-url https://app.example.com
52
+ quire "Verify checkout" --env prod
53
+ ```
54
+
46
55
  `set` accepts one or more `key=value` pairs and validates the result against the schema before writing. Valid keys depend on `kind`:
47
56
 
48
57
  - **Web**: `baseUrl`
@@ -66,7 +75,21 @@ Target reachability runs by default: web environments are probed with a HEAD req
66
75
 
67
76
  ## Investigations
68
77
 
69
- The primary interface is text-in, durable-run-handle-out. `investigate` starts a background run and returns immediately so coding agents do not need to keep a subprocess open for long investigations:
78
+ The primary interface is text-in investigation. For humans, `quire "..."` starts an investigation and attaches to the live run log:
79
+
80
+ ```bash
81
+ quire "Reproduce the checkout crash"
82
+ quire ask "Verify the login page loads"
83
+ quire investigate "Reproduce the checkout crash"
84
+ ```
85
+
86
+ Use `--detach` to start the run in the background and print run-control commands without attaching:
87
+
88
+ ```bash
89
+ quire investigate "Reproduce the checkout crash" --detach
90
+ ```
91
+
92
+ Coding agents and scripts should use `--json`. JSON mode returns a durable run handle immediately, never prompts, and keeps stdout machine-readable:
70
93
 
71
94
  ```bash
72
95
  quire investigate "Reproduce the checkout crash" --json
@@ -77,25 +100,63 @@ quire report <run-id> --wait --json
77
100
  `investigate` carries a deliberately small flag surface — everything that describes the target (platform, provider, device, app id, etc.) lives in `.quire/environment.json` via `quire env`. The run-level flags are:
78
101
 
79
102
  - `--stdin` reads plain-text investigation context from stdin. If a positional prompt is also present, stdin is treated as additional context.
80
- - `--json` reserves stdout for the started run handle JSON only.
81
- - `--watch` attaches to the live run log after starting the investigation. Ctrl-C detaches.
103
+ - `--json` reserves stdout for the started run handle JSON only and uses automation-safe fail-fast behavior.
104
+ - `--detach` starts the run without attaching to the live log.
105
+ - `--watch` attaches to the live run log after starting the investigation. Human mode watches by default; this is mainly useful with `--json`. Ctrl-C detaches.
82
106
  - `--headed` shows the browser window for web targets.
83
107
  - `--url <url>` overrides the configured web `baseUrl` for one run.
84
- - `--no-sync` keeps an authenticated run local instead of uploading it to the Quire web app. Default behavior syncs evidence-tier artifacts.
108
+ - `--env <name>` uses `.quire/environments/<name>.json` instead of the default `.quire/environment.json`.
85
109
 
86
110
  Top-level shortcuts mirror the most common run subcommands:
87
111
 
88
112
  ```bash
89
113
  quire watch <run-id> # alias for `quire runs watch`
90
114
  quire report <run-id> # alias for `quire runs report`
115
+ quire handoff <run-id> # alias for `quire runs handoff`
91
116
  ```
92
117
 
93
- Less common run operations stay under the canonical `runs` namespace: `quire runs status|cancel|list|sync ...`.
118
+ Less common run operations stay under the canonical `runs` namespace: `quire runs status|cancel|list ...`.
119
+
120
+ Each run writes `metadata.json`, `report.json`, `handoff.md`, and raw `emit-report.json` under `~/.quire/runs/<workspace-key>/<run-id>/` by default. Set `QUIRE_RUNS_DIR` to override the run-artifact root.
121
+
122
+ `report.json` is the structured source of truth. The stable top-level fields include:
94
123
 
95
- Each run writes `metadata.json`, `report.json`, and raw `emit-report.json` under `~/.quire/runs/<workspace-key>/<run-id>/` by default. Set `QUIRE_RUNS_DIR` to override the run-artifact root.
124
+ - `triage`, `summary`, `confidence`, and `likelyCause`
125
+ - `evidence[]` with optional run-local artifact paths
126
+ - `reproductionSteps[]` and `journeysTried[]`
127
+ - `environment.notes[]` and `environment.blockers[]`
128
+ - `codeReferences[]` with likely edit targets, optional symbols/lines, rationale, and confidence
129
+ - `verification.commands[]` and `verification.manualSteps[]` with expected outcomes
130
+ - `recommendedActions[]` and `suspectedFiles[]` for backwards-compatible summaries
131
+
132
+ Use `quire runs report <run-id> --wait --json` when another agent needs the full structured payload.
133
+ 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.
96
134
 
97
135
  Local investigations run the Pi agent loop on your machine. Quire prefers local Pi/OpenAI Codex provider auth when it is configured, then falls back to Quire Credits through Quire's authenticated broker. Quire-owned provider auth is read from `~/.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.
98
136
 
137
+ The investigation runtime defaults to GPT-5.5 with medium thinking effort for both local ChatGPT/Codex auth and Quire Credits brokered through Cloudflare AI Gateway.
138
+
139
+ Use `quire connect chatgpt` when you want Quire to connect ChatGPT/Codex subscription auth without using the Pi CLI first:
140
+
141
+ ```bash
142
+ quire connect chatgpt
143
+ quire connect chatgpt --no-open
144
+ ```
145
+
146
+ 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.
147
+
148
+ 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.
149
+
150
+ Remote agents can use an environment-scoped API token instead of browser login:
151
+
152
+ ```bash
153
+ export QUIRE_API_TOKEN=qk_...
154
+ quire whoami --json
155
+ quire investigate "Verify this PR" --json
156
+ ```
157
+
158
+ API tokens are created in the web app under Settings → API Tokens. The CLI sends them with `X-Quire-API-Key`, uses `QUIRE_API_URL` when pointing at a non-production Quire app, and syncs runs under the token's environment name so Cursor Cloud, Codex, and CI activity can be grouped separately from direct human sessions.
159
+
99
160
  ## Hosted Model-Source Status
100
161
 
101
162
  Use `quire whoami --json` to check the authenticated account and hosted model-source status before relying on remote Quire Credits behavior:
@@ -6,7 +6,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
7
  var __getProtoOf = Object.getPrototypeOf;
8
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
9
10
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
11
+ var __exportAll = (all, no_symbols) => {
12
+ let target = {};
13
+ for (var name in all) __defProp(target, name, {
14
+ get: all[name],
15
+ enumerable: true
16
+ });
17
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
18
+ return target;
19
+ };
10
20
  var __copyProps = (to, from, except, desc) => {
11
21
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
12
22
  key = keys[i];
@@ -21,6 +31,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
31
  value: mod,
22
32
  enumerable: true
23
33
  }) : target, mod));
34
+ var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
35
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
25
36
  //#endregion
26
- export { __require as n, __toESM as r, __commonJSMin as t };
37
+ export { __toCommonJS as a, __require as i, __esmMin as n, __toESM as o, __exportAll as r, __commonJSMin as t };