@quireco/cli 0.0.12 → 0.0.13
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/dist/{cli-CItUDOhU.mjs → cli-DIvpEXlX.mjs} +48 -35
- package/dist/index.mjs +1 -1
- package/dist/quire.mjs +6 -2
- package/package.json +1 -1
|
@@ -671,8 +671,17 @@ async function createInvestigationModelSessionDependencies({ runId, store = auth
|
|
|
671
671
|
fetchFn
|
|
672
672
|
});
|
|
673
673
|
}
|
|
674
|
-
async function
|
|
675
|
-
const
|
|
674
|
+
async function detectLocalInvestigationModelSource(options = {}) {
|
|
675
|
+
const localModel = await createLocalModelSessionDependencies(options.localAuthStorage, options.env);
|
|
676
|
+
if (localModel === null || localModel.source === "quire_credits") return null;
|
|
677
|
+
return {
|
|
678
|
+
source: localModel.source,
|
|
679
|
+
provider: localModel.model.provider,
|
|
680
|
+
modelId: localModel.model.id
|
|
681
|
+
};
|
|
682
|
+
}
|
|
683
|
+
async function createLocalModelSessionDependencies(localAuthStorage, env = process.env) {
|
|
684
|
+
const localRegistries = (localAuthStorage === void 0 ? [AuthStorage.create(readQuireModelAuthPath(env)), AuthStorage.create()] : [localAuthStorage]).map((authStorage) => ({
|
|
676
685
|
authStorage,
|
|
677
686
|
modelRegistry: ModelRegistry.create(authStorage)
|
|
678
687
|
}));
|
|
@@ -690,8 +699,8 @@ async function createLocalModelSessionDependencies(localAuthStorage) {
|
|
|
690
699
|
}
|
|
691
700
|
return null;
|
|
692
701
|
}
|
|
693
|
-
function readQuireModelAuthPath() {
|
|
694
|
-
return defaultModelAuthPath();
|
|
702
|
+
function readQuireModelAuthPath(env = process.env) {
|
|
703
|
+
return defaultModelAuthPath(env);
|
|
695
704
|
}
|
|
696
705
|
function quireModelDefinition() {
|
|
697
706
|
return {
|
|
@@ -49504,6 +49513,13 @@ async function checkAuthValid(context, auth) {
|
|
|
49504
49513
|
}
|
|
49505
49514
|
}
|
|
49506
49515
|
async function checkAuthBroker(context, auth) {
|
|
49516
|
+
const localModelSource = await detectLocalInvestigationModelSource({ env: context.env });
|
|
49517
|
+
if (localModelSource !== null) return {
|
|
49518
|
+
id: "auth.broker",
|
|
49519
|
+
section: "identity",
|
|
49520
|
+
severity: "pass",
|
|
49521
|
+
message: `Local model provider connected (${formatLocalModelSource(localModelSource.source)}; ${localModelSource.provider}/${localModelSource.modelId}).`
|
|
49522
|
+
};
|
|
49507
49523
|
try {
|
|
49508
49524
|
return brokerToCheckResult(await fetchModelSourceBrokerStatus({
|
|
49509
49525
|
apiBaseUrl: auth.apiBaseUrl,
|
|
@@ -49520,6 +49536,9 @@ async function checkAuthBroker(context, auth) {
|
|
|
49520
49536
|
};
|
|
49521
49537
|
}
|
|
49522
49538
|
}
|
|
49539
|
+
function formatLocalModelSource(source) {
|
|
49540
|
+
return source === "local_openai_codex" ? "ChatGPT/Codex" : "GitHub Copilot";
|
|
49541
|
+
}
|
|
49523
49542
|
function brokerToCheckResult(status) {
|
|
49524
49543
|
if (status.requiredNextAction !== null) return {
|
|
49525
49544
|
id: "auth.broker",
|
|
@@ -49988,19 +50007,7 @@ async function runLogout(options) {
|
|
|
49988
50007
|
const DEFAULT_PUBLIC_BASE_URL = "https://quire.sh";
|
|
49989
50008
|
const SETUP_URL_PLACEHOLDER = "__QUIRE_SETUP_URL__";
|
|
49990
50009
|
const VERIFICATION_SKILL_URL_PLACEHOLDER = "__QUIRE_VERIFICATION_SKILL_URL__";
|
|
49991
|
-
const AGENT_SETUP_PROMPT = `Help me
|
|
49992
|
-
|
|
49993
|
-
Use or install the Quire CLI. If \`quire\` is unavailable, use \`npx @quireco/cli@latest\` for this setup or ask before installing it globally.
|
|
49994
|
-
|
|
49995
|
-
Load and follow the Quire setup skill from ${SETUP_URL_PLACEHOLDER}.
|
|
49996
|
-
|
|
49997
|
-
Check \`quire whoami --json\` and \`quire doctor --json\` using the same Quire command throughout setup. If account auth is missing, tell me exactly what I need to do, run \`quire login\` when browser auth is appropriate, and wait for me to finish. Do not ask me to paste secrets into chat.
|
|
49998
|
-
|
|
49999
|
-
After login, Quire Wallet is the default model source. If Wallet has balance, use it. If Wallet needs funds, show me the top-up action from \`quire whoami --json\` or open https://quire.sh/dashboard?settings=billing. If I prefer to use an existing subscription instead, help me connect ChatGPT/Codex with \`quire connect chatgpt\` or GitHub Copilot with \`quire connect copilot\`.
|
|
50000
|
-
|
|
50001
|
-
Inspect the project, ask focused questions for important missing runbook facts instead of writing placeholder unknowns, then create or update .quire/runbook.md with this repo's verification loop: target selection, local startup, browser/API/CLI/mobile checks, console/runtime signals, core flows, trusted commands, design/reference surfaces, auth/data setup, performance/accessibility expectations, and mutation-safety rules.
|
|
50002
|
-
|
|
50003
|
-
Update AGENTS.md with concise Quire notes. Rerun \`quire doctor\`, recover from sandbox write issues if needed, then start one small read-only smoke run with \`quire run --detach --json\`. Wait for a terminal result and report the synced Quire run link, local report/evidence path, and any blocker with the exact next action.`;
|
|
50010
|
+
const AGENT_SETUP_PROMPT = `Help me set up Quire for this repo. Use \`quire\` if available, otherwise \`npx @quireco/cli@latest\`. Load and follow ${SETUP_URL_PLACEHOLDER}. Guide any login/model setup with me, create the repo runbook, and run one setup smoke only if Quire doctor is healthy. Report the run link/evidence or exact blocker.`;
|
|
50004
50011
|
const QUIRE_VERIFY_SKILL_MARKDOWN = `---
|
|
50005
50012
|
name: verify
|
|
50006
50013
|
description: Verify claims, code changes, bug fixes, workflows, and release readiness with independent evidence. Use when asked to verify, QA, smoke test, prove a fix, or check non-trivial work before completion.
|
|
@@ -50024,17 +50031,17 @@ Do not use Quire for every tiny task. Usually skip independent verification for
|
|
|
50024
50031
|
|
|
50025
50032
|
If the caller explicitly asks for Quire or independent verification, do not substitute your own direct checks, web fetches, curl commands, tests, browser checks, or manual reasoning and claim that is equivalent. You may do basic preparation, but Quire itself must be invoked.
|
|
50026
50033
|
|
|
50027
|
-
|
|
50034
|
+
Required path: if this harness exposes a native subagent named \`quire\`, delegate the verification brief to that subagent and wait for its result. Do not decide the task is simple enough to run \`quire\` directly from the parent session when a native \`quire\` subagent is available. Use CLI fallback only when no native \`quire\` subagent is available.
|
|
50028
50035
|
|
|
50029
50036
|
If the caller asks whether the Quire agent/subagent path was used, answer from your actual invocation path. If you used a native \`quire\` child task/subagent, report that the native Quire subagent path was used even when \`quire wait\` returns metadata for an older run whose internal harness was \`pi\`, Codex, or another agent. Treat old run metadata as separate historical context, not as evidence that the current adapter path was not used.
|
|
50030
50037
|
|
|
50031
|
-
When communicating Quire results to the user,
|
|
50038
|
+
When communicating Quire results to the user, produce a compact verification report like a QA test run summary: verdict, checks run, pass/fail/blocked counts when available, known non-regressions, synced Quire run link from \`webUrl\`, \`caseUrl\`, or \`sync.caseUrl\`, report/handoff markdown path or excerpt, and useful artifacts such as screenshots, recordings, traces, console/network output, or other evidence.
|
|
50032
50039
|
|
|
50033
50040
|
## How to invoke Quire
|
|
50034
50041
|
|
|
50035
50042
|
Preferred order:
|
|
50036
50043
|
|
|
50037
|
-
1. If this harness exposes a native subagent named \`quire\`, delegate the verification brief to that subagent and wait for its result.
|
|
50044
|
+
1. If this harness exposes a native subagent named \`quire\`, delegate the verification brief to that subagent and wait for its result. This is mandatory when available.
|
|
50038
50045
|
2. If no native Quire subagent is available, run the CLI directly.
|
|
50039
50046
|
|
|
50040
50047
|
CLI fallback:
|
|
@@ -50077,8 +50084,9 @@ Return Quire's terminal handoff with:
|
|
|
50077
50084
|
- Verdict: pass, fail, blocked, partial, or setup-blocked
|
|
50078
50085
|
- Quire run id
|
|
50079
50086
|
- Quire web URL when present
|
|
50080
|
-
- What Quire verified
|
|
50081
|
-
- Key evidence, artifacts, report, or handoff excerpt
|
|
50087
|
+
- What Quire verified, including checks run and pass/fail/blocked counts when available
|
|
50088
|
+
- Key evidence, artifacts, report, screenshots, recordings, traces, or handoff excerpt
|
|
50089
|
+
- Known non-regressions or pre-existing issues, when relevant
|
|
50082
50090
|
- Follow-up actions for the implementation agent
|
|
50083
50091
|
`;
|
|
50084
50092
|
const QUIRE_DEBUG_SKILL_MARKDOWN = `---
|
|
@@ -50105,7 +50113,7 @@ Do not outsource implementation to Quire. Quire should not edit code. The parent
|
|
|
50105
50113
|
## Recommended invocation
|
|
50106
50114
|
|
|
50107
50115
|
1. Build or identify the best reproduction loop you can from the report.
|
|
50108
|
-
2. If this harness exposes a native subagent named \`quire\`, delegate a concise reproduction or verification brief to that subagent and wait for its handoff.
|
|
50116
|
+
2. If this harness exposes a native subagent named \`quire\`, delegate a concise reproduction or verification brief to that subagent and wait for its handoff. This is mandatory when available.
|
|
50109
50117
|
3. If no native \`quire\` subagent is available, use the Quire CLI fallback from ${VERIFICATION_SKILL_URL_PLACEHOLDER}.
|
|
50110
50118
|
4. Use Quire's result as evidence, not as a substitute for understanding the code path. When communicating the result, surface the synced Quire run link from \`webUrl\`, \`caseUrl\`, or \`sync.caseUrl\` when present, and mention useful report artifacts such as screenshots, recordings, traces, or the handoff markdown when they help the user review the diagnosis. If Quire reports blocked, preserve that honestly and fix the setup or ask for the missing environment.
|
|
50111
50119
|
|
|
@@ -50185,7 +50193,7 @@ When reporting whether the Quire agent/subagent path was used, answer only about
|
|
|
50185
50193
|
|
|
50186
50194
|
Terminal statuses are \`completed\`, \`failed\`, \`canceled\`, and \`stale\`. Quire can take several minutes while it inspects context, opens browsers, runs shell checks, captures evidence, and writes a handoff.
|
|
50187
50195
|
|
|
50188
|
-
6. Return \`finalHandoff.handoffMarkdown\` from \`quire wait --json\` when present. Include the synced Quire run link from \`webUrl\`, \`caseUrl\`, or \`sync.caseUrl\` when present
|
|
50196
|
+
6. Return \`finalHandoff.handoffMarkdown\` from \`quire wait --json\` when present. Include the synced Quire run link from \`webUrl\`, \`caseUrl\`, or \`sync.caseUrl\` when present. Format the result like a QA test run summary: verdict, checks run, pass/fail/blocked counts when available, report path or excerpt, screenshots, recordings, traces, console/network output, known non-regressions, and follow-up actions.
|
|
50189
50197
|
7. If Quire reports blocked, failed, stale, or untested checks, preserve that honestly and include the next action. Do not summarize blocked or untested assertions as passed.
|
|
50190
50198
|
8. If Quire cannot start because auth, model provider, wallet, browser, mobile, or target setup is missing, report setup-blocked with the exact reason and the next command Quire suggested.
|
|
50191
50199
|
|
|
@@ -50195,8 +50203,9 @@ When reporting whether the Quire agent/subagent path was used, answer only about
|
|
|
50195
50203
|
- Verdict: pass, fail, blocked, partial, or setup-blocked
|
|
50196
50204
|
- Quire run id
|
|
50197
50205
|
- Quire web URL when present
|
|
50198
|
-
- What Quire verified
|
|
50199
|
-
- Key evidence, artifacts, report, or handoff excerpt
|
|
50206
|
+
- What Quire verified, including checks run and pass/fail/blocked counts when available
|
|
50207
|
+
- Key evidence, artifacts, report, screenshots, recordings, traces, or handoff excerpt
|
|
50208
|
+
- Known non-regressions or pre-existing issues, when relevant
|
|
50200
50209
|
- Follow-up actions for the implementation agent
|
|
50201
50210
|
`;
|
|
50202
50211
|
const QUIRE_CURSOR_MARKDOWN = QUIRE_AGENT_MARKDOWN.replace("model: inherit\n---", "model: inherit\nreadonly: true\n---");
|
|
@@ -50228,7 +50237,7 @@ Workflow:
|
|
|
50228
50237
|
QUIRE_RUNS_DIR=$quire_runs_dir quire run --detach --json --url "<url>" "<verification request>"
|
|
50229
50238
|
QUIRE_RUNS_DIR=$quire_runs_dir quire wait "<run-id>" --json
|
|
50230
50239
|
|
|
50231
|
-
6. Return finalHandoff.handoffMarkdown from \`quire wait --json\` when present. Include the synced Quire run link from \`webUrl\`, \`caseUrl\`, or \`sync.caseUrl\` when present
|
|
50240
|
+
6. Return finalHandoff.handoffMarkdown from \`quire wait --json\` when present. Include the synced Quire run link from \`webUrl\`, \`caseUrl\`, or \`sync.caseUrl\` when present. Format the result like a QA test run summary: verdict, checks run, pass/fail/blocked counts when available, report path or excerpt, screenshots, recordings, traces, console/network output, known non-regressions, and follow-up actions.
|
|
50232
50241
|
7. If Quire reports blocked, failed, stale, or untested checks, preserve that honestly and include the next action. Do not summarize blocked or untested assertions as passed.
|
|
50233
50242
|
|
|
50234
50243
|
Return:
|
|
@@ -50236,8 +50245,9 @@ Return:
|
|
|
50236
50245
|
- Verdict: pass, fail, blocked, partial, or setup-blocked
|
|
50237
50246
|
- Quire run id
|
|
50238
50247
|
- Quire web URL when present
|
|
50239
|
-
- What Quire verified
|
|
50240
|
-
- Key evidence, artifacts, report, or handoff excerpt
|
|
50248
|
+
- What Quire verified, including checks run and pass/fail/blocked counts when available
|
|
50249
|
+
- Key evidence, artifacts, report, screenshots, recordings, traces, or handoff excerpt
|
|
50250
|
+
- Known non-regressions or pre-existing issues, when relevant
|
|
50241
50251
|
- Follow-up actions for the implementation agent
|
|
50242
50252
|
"""
|
|
50243
50253
|
`;
|
|
@@ -50277,7 +50287,7 @@ When reporting whether the Quire agent/subagent path was used, answer only about
|
|
|
50277
50287
|
QUIRE_RUNS_DIR=$quire_runs_dir quire wait "<run-id>" --json
|
|
50278
50288
|
\`\`\`
|
|
50279
50289
|
|
|
50280
|
-
6. Return \`finalHandoff.handoffMarkdown\` from \`quire wait --json\` when present. Include the synced Quire run link from \`webUrl\`, \`caseUrl\`, or \`sync.caseUrl\` when present
|
|
50290
|
+
6. Return \`finalHandoff.handoffMarkdown\` from \`quire wait --json\` when present. Include the synced Quire run link from \`webUrl\`, \`caseUrl\`, or \`sync.caseUrl\` when present. Format the result like a QA test run summary: verdict, checks run, pass/fail/blocked counts when available, report path or excerpt, screenshots, recordings, traces, console/network output, known non-regressions, and follow-up actions.
|
|
50281
50291
|
7. If Quire reports blocked, failed, stale, or untested checks, preserve that honestly and include the next action. Do not summarize blocked or untested assertions as passed.
|
|
50282
50292
|
|
|
50283
50293
|
## Return format
|
|
@@ -50286,8 +50296,9 @@ When reporting whether the Quire agent/subagent path was used, answer only about
|
|
|
50286
50296
|
- Verdict: pass, fail, blocked, partial, or setup-blocked
|
|
50287
50297
|
- Quire run id
|
|
50288
50298
|
- Quire web URL when present
|
|
50289
|
-
- What Quire verified
|
|
50290
|
-
- Key evidence, artifacts, report, or handoff excerpt
|
|
50299
|
+
- What Quire verified, including checks run and pass/fail/blocked counts when available
|
|
50300
|
+
- Key evidence, artifacts, report, screenshots, recordings, traces, or handoff excerpt
|
|
50301
|
+
- Known non-regressions or pre-existing issues, when relevant
|
|
50291
50302
|
- Follow-up actions for the implementation agent
|
|
50292
50303
|
`;
|
|
50293
50304
|
const SKILL_INSTALL_TARGETS = [
|
|
@@ -50380,9 +50391,11 @@ const setupCommand = defineCommand({
|
|
|
50380
50391
|
}
|
|
50381
50392
|
},
|
|
50382
50393
|
async run({ args }) {
|
|
50394
|
+
const noSkill = args["no-skill"] === true || args.noSkill === true;
|
|
50395
|
+
const noInteractive = args["no-interactive"] === true || args.noInteractive === true || args.interactive === false;
|
|
50383
50396
|
await runSetup({
|
|
50384
|
-
skill:
|
|
50385
|
-
interactive:
|
|
50397
|
+
skill: noSkill ? false : args.skill,
|
|
50398
|
+
interactive: !noInteractive
|
|
50386
50399
|
});
|
|
50387
50400
|
}
|
|
50388
50401
|
});
|
|
@@ -50745,7 +50758,7 @@ function formatWalletBalance(value) {
|
|
|
50745
50758
|
}
|
|
50746
50759
|
//#endregion
|
|
50747
50760
|
//#region package.json
|
|
50748
|
-
var version$1 = "0.0.
|
|
50761
|
+
var version$1 = "0.0.13";
|
|
50749
50762
|
//#endregion
|
|
50750
50763
|
//#region src/cli.ts
|
|
50751
50764
|
const subCommands = {
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ExitCode, n as main, r as CliError, t as cli } from "./cli-
|
|
1
|
+
import { i as ExitCode, n as main, r as CliError, t as cli } from "./cli-DIvpEXlX.mjs";
|
|
2
2
|
export { CliError, ExitCode, cli, main };
|
package/dist/quire.mjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { n as main } from "./cli-
|
|
2
|
+
import { n as main } from "./cli-DIvpEXlX.mjs";
|
|
3
3
|
//#region bin/quire.ts
|
|
4
|
-
|
|
4
|
+
main().catch((error) => {
|
|
5
|
+
const message = error instanceof Error ? error.stack ?? error.message : String(error);
|
|
6
|
+
console.error(message);
|
|
7
|
+
process.exitCode = 1;
|
|
8
|
+
});
|
|
5
9
|
//#endregion
|
|
6
10
|
export {};
|