lurqrun 0.1.8 → 0.1.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/dist/{auditHandler-VWCXSDVO.js → auditHandler-G7PHKMZR.js} +8 -8
- package/dist/autopilotInit-JO2SH5K3.js +266 -0
- package/dist/bin/lurq.js +45 -42
- package/dist/{browserAuth-J7APSD4P.js → browserAuth-PVYODBNR.js} +1 -1
- package/dist/{cache-AEAKCV4I.js → cache-ND4VOUVY.js} +2 -2
- package/dist/{check-2JTQDQA6.js → check-A3FJE62G.js} +5 -5
- package/dist/{checkUpgrade-5YW77OBL.js → checkUpgrade-Q4CV7GXG.js} +1 -1
- package/dist/{chunk-XBQA4I36.js → chunk-2LXYRDUN.js} +1 -1
- package/dist/{chunk-P6MIKSPY.js → chunk-2XMD4H2I.js} +1 -1
- package/dist/{chunk-4JHDSVIN.js → chunk-6353IJJ5.js} +1 -1
- package/dist/{chunk-DSROTZ3Z.js → chunk-64DPQSXV.js} +1 -1
- package/dist/{chunk-O4KHCV6I.js → chunk-64YOP5BQ.js} +4 -4
- package/dist/{chunk-NPVN2THM.js → chunk-75LMEMJ3.js} +1 -1
- package/dist/{chunk-TUXQ32WE.js → chunk-ABH4BTK4.js} +8 -7
- package/dist/{chunk-ZJMLQ37G.js → chunk-AHRDDKNO.js} +1 -1
- package/dist/{chunk-TDTYV6QI.js → chunk-AQ6IVSFB.js} +1 -1
- package/dist/{chunk-DM37MTOO.js → chunk-ETY4FSOW.js} +1 -1
- package/dist/{chunk-FDFPMBCA.js → chunk-FHRT32JH.js} +2 -2
- package/dist/{chunk-NYZU5NCW.js → chunk-GNNGXVCG.js} +1 -1
- package/dist/{chunk-QCRBX3LV.js → chunk-ILKYIVYV.js} +2 -2
- package/dist/{chunk-6L67QMCP.js → chunk-J3NUERU7.js} +1 -1
- package/dist/{chunk-BN3NM47Q.js → chunk-JGIJZJ3X.js} +3 -3
- package/dist/{chunk-BJT2LHAR.js → chunk-JJCQVOC6.js} +6 -6
- package/dist/{chunk-EYAKM6YN.js → chunk-KT7PWDNV.js} +1 -1
- package/dist/{chunk-72Y2FDVS.js → chunk-L3V7AVM6.js} +1 -1
- package/dist/{chunk-3676XOBU.js → chunk-M2CYYBAH.js} +12 -12
- package/dist/{chunk-B2UUYRBX.js → chunk-N2NYPTRU.js} +6 -6
- package/dist/{chunk-IFNONGRQ.js → chunk-N4TJO44E.js} +1 -1
- package/dist/{chunk-VGCDRK3S.js → chunk-NGMJQBOV.js} +1 -1
- package/dist/{chunk-64ZF7KO4.js → chunk-POHTPT37.js} +10 -10
- package/dist/{chunk-2O6Z37IT.js → chunk-PZZU3FQY.js} +6 -6
- package/dist/{chunk-EQCXENKZ.js → chunk-Q7CMOU5C.js} +2 -2
- package/dist/{chunk-OTJFHESY.js → chunk-SFY5MPJE.js} +1 -1
- package/dist/{chunk-A3TYI2TF.js → chunk-SWMWVK2R.js} +1 -1
- package/dist/{chunk-2WD4QAH4.js → chunk-TVOCVIM7.js} +1 -1
- package/dist/{chunk-FVYFV5HA.js → chunk-XA2SLNBR.js} +1 -1
- package/dist/{chunk-D3VTZS7V.js → chunk-XBTYJQEK.js} +1 -1
- package/dist/{chunk-ONDVTXUO.js → chunk-ZJ5XHA77.js} +1 -1
- package/dist/{client-MU4EUDZV.js → client-SJIWK4CK.js} +3 -3
- package/dist/{commands-UOOTMBKA.js → commands-6BBLN5N5.js} +28 -28
- package/dist/{compat-Q5DVPITN.js → compat-6B3CRT5F.js} +5 -5
- package/dist/{constants-DJFOFZ44.js → constants-HX3RTD6Q.js} +1 -1
- package/dist/{domains-VRT4BRVZ.js → domains-RKRPVP5A.js} +1 -1
- package/dist/{envCheck-KUPTORFQ.js → envCheck-IL22OTSC.js} +1 -1
- package/dist/{fetch-PJ3SC32M.js → fetch-GHIP3VHN.js} +3 -3
- package/dist/{firstTouch-COJCMOB3.js → firstTouch-M64T2MWF.js} +1 -1
- package/dist/{fix-3EDWNKW3.js → fix-Z7ZY55HB.js} +7 -7
- package/dist/{handlers-4Q37WIFT.js → handlers-GOXW2GWZ.js} +13 -13
- package/dist/{hook-NA66XJLC.js → hook-TWFLIDK3.js} +3 -3
- package/dist/{http-25GJ6SKK.js → http-7VF2RE2D.js} +49 -29
- package/dist/{ingestQueue-FSVJC3AA.js → ingestQueue-RSEPMORK.js} +9 -9
- package/dist/{install-G2HHXYJ2.js → install-55EPX34C.js} +4 -4
- package/dist/{installSkill-5TIMYIJZ.js → installSkill-A7KKPDMS.js} +2 -2
- package/dist/{mcp-PENLL2PK.js → mcp-CM6CDLHM.js} +5 -5
- package/dist/{mcpConfig-3LYPRY5Q.js → mcpConfig-FENV6NI7.js} +2 -2
- package/dist/{mcpHandlers-PO7GENA7.js → mcpHandlers-2UCLKMWN.js} +6 -6
- package/dist/{mcpScan-ULP626TQ.js → mcpScan-CKBQNK5H.js} +7 -7
- package/dist/{mcpScanWorkflow-27O44FOE.js → mcpScanWorkflow-NFUD3S7U.js} +2 -2
- package/dist/{mcpStack-ZNYIFXZ5.js → mcpStack-FLQ6XY2P.js} +1 -1
- package/dist/{packages-RWF2LXST.js → packages-2XRHNBJ7.js} +3 -3
- package/dist/{plan-SDILIDZT.js → plan-XRZS6C7Z.js} +14 -14
- package/dist/{policy-JAGNMQJI.js → policy-EQT43P7S.js} +2 -2
- package/dist/{probe-3IK646WN.js → probe-ZEZFNIQZ.js} +1 -1
- package/dist/{publicUpgrades-WTBGLDIK.js → publicUpgrades-JZEOV24A.js} +7 -7
- package/dist/{release-7IU2R4YG.js → release-EUOM5I3R.js} +3 -3
- package/dist/{remote-FN6225AH.js → remote-I5O43WAY.js} +2 -2
- package/dist/{sandbox-SAPSRKEI.js → sandbox-46TZNYZT.js} +3 -3
- package/dist/{server-OLTY3NYT.js → server-LROMHS62.js} +21 -21
- package/dist/{surface-JS2XU3U3.js → surface-CZMHQLV3.js} +3 -3
- package/dist/{surface-7MHE3RL7.js → surface-OH4TZR32.js} +7 -7
- package/dist/{surfaceHandlers-4B6TMZ34.js → surfaceHandlers-BDYRZMAC.js} +5 -5
- package/dist/{uninstall-I2IJP5JZ.js → uninstall-4E5YUDQO.js} +2 -2
- package/dist/{upgrade-FS26DJGG.js → upgrade-S72W7JVC.js} +3 -3
- package/dist/{upgradePlan-ZS5IOVMZ.js → upgradePlan-F3OUNL3E.js} +4 -4
- package/dist/{upkeepHandler-VFGYXJKB.js → upkeepHandler-7Q56A4UA.js} +1 -1
- package/dist/{watch-OCNEUXG6.js → watch-LZPOKWCL.js} +10 -10
- package/package.json +1 -1
- package/dist/autopilotInit-Q62MX5M6.js +0 -178
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { createRequire as __lurqCreateRequire } from 'node:module'; const require = __lurqCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
handleAudit
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-N2NYPTRU.js";
|
|
5
|
+
import "./chunk-FHRT32JH.js";
|
|
6
|
+
import "./chunk-JJCQVOC6.js";
|
|
7
|
+
import "./chunk-2XMD4H2I.js";
|
|
8
8
|
import "./chunk-6EQ3ARXA.js";
|
|
9
9
|
import "./chunk-SHCEBP3J.js";
|
|
10
10
|
import "./chunk-LEGPB7DO.js";
|
|
11
11
|
import "./chunk-Q5VPF4WI.js";
|
|
12
12
|
import "./chunk-QSL6QN5X.js";
|
|
13
13
|
import "./chunk-QUIMQ7YL.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-ZJ5XHA77.js";
|
|
15
|
+
import "./chunk-6353IJJ5.js";
|
|
16
16
|
import "./chunk-KYKSZ3XZ.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-J3NUERU7.js";
|
|
18
18
|
import "./chunk-3GHJR7XR.js";
|
|
19
19
|
import "./chunk-MYGSLK44.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-L3V7AVM6.js";
|
|
21
21
|
import "./chunk-I3M2KJXB.js";
|
|
22
22
|
export {
|
|
23
23
|
handleAudit
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { createRequire as __lurqCreateRequire } from 'node:module'; const require = __lurqCreateRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
WORKFLOW_PATH,
|
|
4
|
+
detectInstallCommand,
|
|
5
|
+
renderWorkflow
|
|
6
|
+
} from "./chunk-SWMWVK2R.js";
|
|
7
|
+
import {
|
|
8
|
+
bold,
|
|
9
|
+
dim,
|
|
10
|
+
green,
|
|
11
|
+
red,
|
|
12
|
+
yellow
|
|
13
|
+
} from "./chunk-4KCPOMG6.js";
|
|
14
|
+
import {
|
|
15
|
+
logger
|
|
16
|
+
} from "./chunk-MYGSLK44.js";
|
|
17
|
+
import {
|
|
18
|
+
resolveApiKey
|
|
19
|
+
} from "./chunk-J6XQ7OPZ.js";
|
|
20
|
+
import "./chunk-L3V7AVM6.js";
|
|
21
|
+
import {
|
|
22
|
+
init_esm_shims
|
|
23
|
+
} from "./chunk-I3M2KJXB.js";
|
|
24
|
+
|
|
25
|
+
// src/cli/autopilotInit.ts
|
|
26
|
+
init_esm_shims();
|
|
27
|
+
import { spawnSync } from "child_process";
|
|
28
|
+
var LOCKFILES = ["package-lock.json", "yarn.lock", "pnpm-lock.yaml", "bun.lockb", "bun.lock"];
|
|
29
|
+
var SETUP_BRANCH = "lurq/autopilot-setup";
|
|
30
|
+
var COMMIT_MESSAGE = "ci: lurq upgrade autopilot";
|
|
31
|
+
function parseRepoFromRemote(url) {
|
|
32
|
+
const trimmed = url.trim().replace(/\.git$/, "");
|
|
33
|
+
if (!trimmed) return null;
|
|
34
|
+
const match = (
|
|
35
|
+
// git@github.com:owner/name | ssh://git@github.com/owner/name
|
|
36
|
+
trimmed.match(/^(?:ssh:\/\/)?git@[^:/]+[:/]([^/]+)\/([^/]+)$/) ?? // https://github.com/owner/name
|
|
37
|
+
trimmed.match(/^https?:\/\/[^/]+\/([^/]+)\/([^/]+)$/)
|
|
38
|
+
);
|
|
39
|
+
if (!match) return null;
|
|
40
|
+
const [, owner, name] = match;
|
|
41
|
+
return owner && name ? `${owner}/${name}` : null;
|
|
42
|
+
}
|
|
43
|
+
function needsAgentCredential(mode) {
|
|
44
|
+
return mode === "pr";
|
|
45
|
+
}
|
|
46
|
+
function missingWorkflowScope(authStatus) {
|
|
47
|
+
const line = authStatus.split("\n").find((l) => /token scopes:/i.test(l));
|
|
48
|
+
return line !== void 0 && !/['"]workflow['"]/.test(line);
|
|
49
|
+
}
|
|
50
|
+
function parseMode(raw) {
|
|
51
|
+
if (!raw) return "fix";
|
|
52
|
+
if (raw === "comment" || raw === "fix" || raw === "pr") return raw;
|
|
53
|
+
throw new Error(`Unknown mode "${raw}". Use comment, fix, or pr.`);
|
|
54
|
+
}
|
|
55
|
+
function run(cmd, args, input, cwd) {
|
|
56
|
+
return spawnSync(cmd, args, { cwd, input, encoding: "utf8" });
|
|
57
|
+
}
|
|
58
|
+
function have(cmd) {
|
|
59
|
+
return run(cmd, ["--version"]).status === 0;
|
|
60
|
+
}
|
|
61
|
+
function errorText(res) {
|
|
62
|
+
return (res.stderr || res.stdout || "").trim().split("\n")[0] ?? "unknown error";
|
|
63
|
+
}
|
|
64
|
+
function ghApi(path, method = "GET", body) {
|
|
65
|
+
const args = ["api", "-X", method, path];
|
|
66
|
+
if (body !== void 0) args.push("--input", "-");
|
|
67
|
+
const res = run("gh", args, body === void 0 ? void 0 : JSON.stringify(body));
|
|
68
|
+
if (res.status !== 0) throw new Error(errorText(res));
|
|
69
|
+
return res.stdout.trim() ? JSON.parse(res.stdout) : null;
|
|
70
|
+
}
|
|
71
|
+
function setSecret(repo, name, value) {
|
|
72
|
+
const res = run("gh", ["secret", "set", name, "--repo", repo], value);
|
|
73
|
+
return res.status === 0 ? null : `could not set ${name}: ${errorText(res)}`;
|
|
74
|
+
}
|
|
75
|
+
function mintClaudeToken() {
|
|
76
|
+
const res = spawnSync("claude", ["setup-token"], {
|
|
77
|
+
stdio: ["inherit", "pipe", "inherit"],
|
|
78
|
+
encoding: "utf8"
|
|
79
|
+
});
|
|
80
|
+
if (res.status !== 0) return null;
|
|
81
|
+
const lines = (res.stdout ?? "").split("\n").map((l) => l.trim()).filter(Boolean);
|
|
82
|
+
const token = lines[lines.length - 1];
|
|
83
|
+
if (!token || token.includes(" ") || token.length < 20) return null;
|
|
84
|
+
return token;
|
|
85
|
+
}
|
|
86
|
+
function putWorkflow(repo, branch, content, sha) {
|
|
87
|
+
ghApi(`repos/${repo}/contents/${WORKFLOW_PATH}`, "PUT", {
|
|
88
|
+
message: COMMIT_MESSAGE,
|
|
89
|
+
content: Buffer.from(content).toString("base64"),
|
|
90
|
+
branch,
|
|
91
|
+
...sha ? { sha } : {}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
function openSetupPr(repo, base, content) {
|
|
95
|
+
const head = ghApi(`repos/${repo}/git/ref/heads/${base}`).object.sha;
|
|
96
|
+
try {
|
|
97
|
+
ghApi(`repos/${repo}/git/refs`, "POST", { ref: `refs/heads/${SETUP_BRANCH}`, sha: head });
|
|
98
|
+
} catch {
|
|
99
|
+
ghApi(`repos/${repo}/git/refs/heads/${SETUP_BRANCH}`, "PATCH", { sha: head, force: true });
|
|
100
|
+
}
|
|
101
|
+
putWorkflow(repo, SETUP_BRANCH, content, existingSha(repo, SETUP_BRANCH));
|
|
102
|
+
const res = run("gh", [
|
|
103
|
+
"pr",
|
|
104
|
+
"create",
|
|
105
|
+
"--repo",
|
|
106
|
+
repo,
|
|
107
|
+
"--base",
|
|
108
|
+
base,
|
|
109
|
+
"--head",
|
|
110
|
+
SETUP_BRANCH,
|
|
111
|
+
"--title",
|
|
112
|
+
COMMIT_MESSAGE,
|
|
113
|
+
"--body",
|
|
114
|
+
"Adds the lurq upgrade autopilot. Merge to turn it on; delete the file to turn it off. https://lurq.run/docs/autopilot"
|
|
115
|
+
]);
|
|
116
|
+
if (res.status !== 0) throw new Error(errorText(res));
|
|
117
|
+
return res.stdout.trim();
|
|
118
|
+
}
|
|
119
|
+
function existingSha(repo, branch) {
|
|
120
|
+
try {
|
|
121
|
+
return ghApi(`repos/${repo}/contents/${WORKFLOW_PATH}?ref=${branch}`).sha;
|
|
122
|
+
} catch {
|
|
123
|
+
return void 0;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
function initRepo(repo, mode, secrets, opts) {
|
|
127
|
+
try {
|
|
128
|
+
for (const [name, value] of Object.entries(secrets)) {
|
|
129
|
+
const err = setSecret(repo, name, value);
|
|
130
|
+
if (err) return { repo, outcome: "failed", detail: err };
|
|
131
|
+
}
|
|
132
|
+
const base = ghApi(`repos/${repo}`).default_branch;
|
|
133
|
+
const sha = existingSha(repo, base);
|
|
134
|
+
if (sha && !opts.force) {
|
|
135
|
+
return {
|
|
136
|
+
repo,
|
|
137
|
+
outcome: "exists",
|
|
138
|
+
detail: "workflow already committed (--force replaces it)"
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
const root = ghApi(`repos/${repo}/contents/?ref=${base}`).map(
|
|
142
|
+
(e) => e.name
|
|
143
|
+
);
|
|
144
|
+
const content = renderWorkflow({
|
|
145
|
+
mode,
|
|
146
|
+
installCommand: detectInstallCommand(LOCKFILES.filter((f) => root.includes(f)))
|
|
147
|
+
});
|
|
148
|
+
if (!opts.pr) {
|
|
149
|
+
try {
|
|
150
|
+
putWorkflow(repo, base, content, sha);
|
|
151
|
+
const started = run("gh", [
|
|
152
|
+
"workflow",
|
|
153
|
+
"run",
|
|
154
|
+
WORKFLOW_PATH.split("/").pop(),
|
|
155
|
+
"--repo",
|
|
156
|
+
repo
|
|
157
|
+
]);
|
|
158
|
+
return {
|
|
159
|
+
repo,
|
|
160
|
+
outcome: "committed",
|
|
161
|
+
detail: started.status === 0 ? "first run started" : "first run starts on schedule"
|
|
162
|
+
};
|
|
163
|
+
} catch {
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return { repo, outcome: "pull-request", detail: openSetupPr(repo, base, content) };
|
|
167
|
+
} catch (err) {
|
|
168
|
+
return { repo, outcome: "failed", detail: err instanceof Error ? err.message : String(err) };
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
async function runAutopilotInit(opts) {
|
|
172
|
+
const mode = parseMode(opts.mode);
|
|
173
|
+
let repos = (opts.repo ?? []).map((r) => r.trim()).filter(Boolean);
|
|
174
|
+
if (repos.length === 0) {
|
|
175
|
+
const remote = run("git", ["remote", "get-url", "origin"], void 0, opts.cwd);
|
|
176
|
+
const here = remote.status === 0 ? parseRepoFromRemote(remote.stdout) : null;
|
|
177
|
+
if (here) repos = [here];
|
|
178
|
+
}
|
|
179
|
+
if (repos.length === 0) {
|
|
180
|
+
logger.error("Could not work out which repository this is.");
|
|
181
|
+
logger.error("Pass one or more: lurq autopilot init --repo owner/a owner/b");
|
|
182
|
+
process.exitCode = 1;
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const apiKey = resolveApiKey(opts.apiKey);
|
|
186
|
+
if (!apiKey) {
|
|
187
|
+
logger.error(
|
|
188
|
+
"No lurq API key on this machine. Run `npx lurqrun setup` first, then this again."
|
|
189
|
+
);
|
|
190
|
+
process.exitCode = 1;
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
if (!have("gh")) {
|
|
194
|
+
logger.error("The GitHub CLI (`gh`) is not installed. https://cli.github.com");
|
|
195
|
+
process.exitCode = 1;
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const auth = run("gh", ["auth", "status"]);
|
|
199
|
+
if (auth.status !== 0) {
|
|
200
|
+
logger.error("`gh` is not signed in. Run `gh auth login`, then this again.");
|
|
201
|
+
process.exitCode = 1;
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (missingWorkflowScope(`${auth.stdout}
|
|
205
|
+
${auth.stderr}`)) {
|
|
206
|
+
logger.error(
|
|
207
|
+
"GitHub only lets a token write workflow files with the `workflow` scope. Add it:"
|
|
208
|
+
);
|
|
209
|
+
logger.error(" gh auth refresh -s workflow");
|
|
210
|
+
process.exitCode = 1;
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const secrets = { LURQ_API_KEY: apiKey };
|
|
214
|
+
const notes = [];
|
|
215
|
+
if (needsAgentCredential(mode) && opts.credential !== false) {
|
|
216
|
+
const token = have("claude") ? (logger.info(dim("Minting a Claude token \u2014 sign in when prompted.")), mintClaudeToken()) : null;
|
|
217
|
+
if (token) {
|
|
218
|
+
secrets.CLAUDE_CODE_OAUTH_TOKEN = token;
|
|
219
|
+
notes.push(
|
|
220
|
+
`${yellow("The Claude token expires one year from today, with no warning.")} An ANTHROPIC_API_KEY does not:
|
|
221
|
+
gh secret set ANTHROPIC_API_KEY --repo <owner/name>`
|
|
222
|
+
);
|
|
223
|
+
} else {
|
|
224
|
+
notes.push(
|
|
225
|
+
"pr mode needs an Anthropic credential and none was set. Per repo:\n gh secret set ANTHROPIC_API_KEY --repo <owner/name>"
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
if (!opts.json)
|
|
230
|
+
logger.info(
|
|
231
|
+
`${bold("mode")} ${mode} \xB7 ${repos.length} ${repos.length === 1 ? "repository" : "repositories"}
|
|
232
|
+
`
|
|
233
|
+
);
|
|
234
|
+
const results = [];
|
|
235
|
+
for (const repo of repos) {
|
|
236
|
+
const result = initRepo(repo, mode, secrets, opts);
|
|
237
|
+
results.push(result);
|
|
238
|
+
if (!opts.json)
|
|
239
|
+
logger.info(`${resultMark(result)} ${repo}${result.detail ? dim(` ${result.detail}`) : ""}`);
|
|
240
|
+
}
|
|
241
|
+
if (results.some((r) => r.outcome === "failed")) process.exitCode = 1;
|
|
242
|
+
if (opts.json) {
|
|
243
|
+
logger.info(JSON.stringify({ mode, results }, null, 2));
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
if (results.some((r) => r.outcome === "pull-request")) {
|
|
247
|
+
notes.push("Merge the pull requests above to turn those repositories on.");
|
|
248
|
+
}
|
|
249
|
+
if (results.some((r) => r.outcome === "committed") && !opts.repo?.length) {
|
|
250
|
+
notes.push("Committed on GitHub, not locally: `git pull` to see it in this checkout.");
|
|
251
|
+
}
|
|
252
|
+
for (const note of notes) logger.info(`
|
|
253
|
+
\xB7 ${note}`);
|
|
254
|
+
}
|
|
255
|
+
function resultMark(r) {
|
|
256
|
+
if (r.outcome === "failed") return red("\u2717");
|
|
257
|
+
if (r.outcome === "pull-request") return yellow("\u2197");
|
|
258
|
+
if (r.outcome === "exists") return dim("\xB7");
|
|
259
|
+
return green("\u2713");
|
|
260
|
+
}
|
|
261
|
+
export {
|
|
262
|
+
missingWorkflowScope,
|
|
263
|
+
needsAgentCredential,
|
|
264
|
+
parseRepoFromRemote,
|
|
265
|
+
runAutopilotInit
|
|
266
|
+
};
|
package/dist/bin/lurq.js
CHANGED
|
@@ -9,18 +9,18 @@ import {
|
|
|
9
9
|
import "../chunk-WHX2ZFCG.js";
|
|
10
10
|
import {
|
|
11
11
|
withSetupOnMissingKey
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-PZZU3FQY.js";
|
|
13
13
|
import {
|
|
14
14
|
yellow
|
|
15
15
|
} from "../chunk-4KCPOMG6.js";
|
|
16
16
|
import {
|
|
17
17
|
SUPPORTED_AGENTS
|
|
18
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-ETY4FSOW.js";
|
|
19
19
|
import "../chunk-LUAKDHLZ.js";
|
|
20
20
|
import {
|
|
21
21
|
logger
|
|
22
22
|
} from "../chunk-MYGSLK44.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-SFY5MPJE.js";
|
|
24
24
|
import {
|
|
25
25
|
readUserConfig,
|
|
26
26
|
resolveApiKey
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
SERVER_NAME,
|
|
33
33
|
VERSION,
|
|
34
34
|
package_default
|
|
35
|
-
} from "../chunk-
|
|
35
|
+
} from "../chunk-L3V7AVM6.js";
|
|
36
36
|
import {
|
|
37
37
|
__commonJS,
|
|
38
38
|
__require,
|
|
@@ -3081,7 +3081,7 @@ async function maintainHooks(argv2, now = Date.now()) {
|
|
|
3081
3081
|
if (config.autoHooks === false || !resolveApiKey()) return;
|
|
3082
3082
|
mkdirSync(join(stamp, ".."), { recursive: true });
|
|
3083
3083
|
writeFileSync(stamp, "");
|
|
3084
|
-
const skill = await import("../installSkill-
|
|
3084
|
+
const skill = await import("../installSkill-A7KKPDMS.js");
|
|
3085
3085
|
const invocation = skill.lurqInvocation();
|
|
3086
3086
|
if (!invocation.onPath) return;
|
|
3087
3087
|
const states = skill.agentSpecs().flatMap((spec) => {
|
|
@@ -3161,18 +3161,21 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3161
3161
|
program2.outputHelp();
|
|
3162
3162
|
return;
|
|
3163
3163
|
}
|
|
3164
|
-
const { runSetup } = await import("../install-
|
|
3164
|
+
const { runSetup } = await import("../install-55EPX34C.js");
|
|
3165
3165
|
await runSetup({});
|
|
3166
3166
|
});
|
|
3167
3167
|
program2.command("setup").aliases(["install", "login"]).description("one-time setup: store your API key, wire up your assistants and skills").option("--api-key <key>", "hosted API key (skips the prompt)").option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--agent <agent>", AGENT_CHOICES).option("--yes", "non-interactive: use flags/env and detected agents without prompting").option("--no-open", "don't launch a browser (headless boxes, SSH, CI)").addOption(new Option("--wait-for-signin").hideHelp()).action(
|
|
3168
3168
|
async (opts) => {
|
|
3169
|
-
const { runSetup } = await import("../install-
|
|
3169
|
+
const { runSetup } = await import("../install-55EPX34C.js");
|
|
3170
3170
|
await runSetup({ ...opts, noOpen: opts.open === false });
|
|
3171
3171
|
}
|
|
3172
3172
|
);
|
|
3173
3173
|
const autopilot = program2.command("autopilot").description("set up and inspect the upgrade autopilot for a repository");
|
|
3174
|
-
autopilot.command("init").description("
|
|
3175
|
-
|
|
3174
|
+
autopilot.command("init").description("turn the autopilot on for one or many repositories: secret, workflow, first run").option("--repo <owner/name...>", "one or more repositories (default: this checkout's origin)").option("--mode <mode>", "comment, fix, or pr (default: fix \u2014 opens PRs, needs no model)").option("--api-key <key>", "lurq API key (defaults to the stored one, then $LURQ_API_KEY)").option("--no-credential", "skip the Anthropic credential step in pr mode").option("--force", "replace a workflow that is already committed").option(
|
|
3175
|
+
"--pr",
|
|
3176
|
+
"open a pull request in each repository instead of committing to the default branch"
|
|
3177
|
+
).option("--json", "machine-readable summary").action(async (opts) => {
|
|
3178
|
+
const { runAutopilotInit } = await import("../autopilotInit-JO2SH5K3.js");
|
|
3176
3179
|
await runAutopilotInit(opts);
|
|
3177
3180
|
});
|
|
3178
3181
|
program2.command("logout").description("remove the stored API key from this machine").action(async () => {
|
|
@@ -3183,40 +3186,40 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3183
3186
|
);
|
|
3184
3187
|
});
|
|
3185
3188
|
program2.command("uninstall").description("undo setup: remove lurq's MCP entries, agent instructions and the stored key").option("--agent <agent>", `only this agent: ${AGENT_CHOICES}`).option("--yes", "remove without asking").action(async (opts) => {
|
|
3186
|
-
const { runUninstall } = await import("../uninstall-
|
|
3189
|
+
const { runUninstall } = await import("../uninstall-4E5YUDQO.js");
|
|
3187
3190
|
await runUninstall(opts);
|
|
3188
3191
|
});
|
|
3189
3192
|
const policy = program2.command("policy").description("keep your selection policy in a file: pull it, review it, push it");
|
|
3190
3193
|
policy.command("pull").argument("[file]", "write the policy here (default: stdout)").description("download the policy your agents are held to").option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--api-key <key>", "hosted API key (defaults to $LURQ_API_KEY)").action(async (file, opts) => {
|
|
3191
|
-
const { runPolicyPull } = await import("../policy-
|
|
3194
|
+
const { runPolicyPull } = await import("../policy-EQT43P7S.js");
|
|
3192
3195
|
await runPolicyPull(file, opts);
|
|
3193
3196
|
});
|
|
3194
3197
|
policy.command("push").argument("<file>", "policy JSON, as written by `lurq policy pull`").description("replace the policy with this file (needs a policy:write key)").option("--check", "validate the file only; send nothing (for PR checks)").option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--api-key <key>", "hosted API key (defaults to $LURQ_API_KEY)").action(async (file, opts) => {
|
|
3195
|
-
const { runPolicyPush } = await import("../policy-
|
|
3198
|
+
const { runPolicyPush } = await import("../policy-EQT43P7S.js");
|
|
3196
3199
|
await runPolicyPush(file, opts);
|
|
3197
3200
|
});
|
|
3198
3201
|
policy.command("history").description("who changed the policy, from where, and what changed").option("--json", "output the changes as JSON").option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--api-key <key>", "hosted API key (defaults to $LURQ_API_KEY)").action(async (opts) => {
|
|
3199
|
-
const { runPolicyHistory } = await import("../policy-
|
|
3202
|
+
const { runPolicyHistory } = await import("../policy-EQT43P7S.js");
|
|
3200
3203
|
await runPolicyHistory(opts);
|
|
3201
3204
|
});
|
|
3202
3205
|
policy.command("log").description("packages the policy refused, or warned about, grouped by rule").option("--days <n>", "look back this many days, 1 to 365 (default 30)").option("--json", "output the log as JSON").option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--api-key <key>", "hosted API key (defaults to $LURQ_API_KEY)").action(async (opts) => {
|
|
3203
|
-
const { runPolicyLog } = await import("../policy-
|
|
3206
|
+
const { runPolicyLog } = await import("../policy-EQT43P7S.js");
|
|
3204
3207
|
await runPolicyLog(opts);
|
|
3205
3208
|
});
|
|
3206
3209
|
program2.command("can").argument("[query...]", "what you are trying to do, in plain words").description("find the lurq capability for what you are trying to do").option("--json", "output matches as JSON").action(async (query, opts) => {
|
|
3207
|
-
const { runCan } = await import("../commands-
|
|
3210
|
+
const { runCan } = await import("../commands-6BBLN5N5.js");
|
|
3208
3211
|
runCan(query.join(" "), opts);
|
|
3209
3212
|
});
|
|
3210
3213
|
program2.command("evaluate").argument("<package>", "npm package name").description("full evidence read for one package (scores, signals, usage guide)").option("--json", "output JSON instead of a table").action(async (pkg, opts) => {
|
|
3211
|
-
const { runEvaluate } = await import("../commands-
|
|
3214
|
+
const { runEvaluate } = await import("../commands-6BBLN5N5.js");
|
|
3212
3215
|
await runEvaluate(pkg, opts);
|
|
3213
3216
|
});
|
|
3214
3217
|
program2.command("compare").argument("<packages...>", "2\u20135 npm package names").description("side-by-side comparison of packages, ranked by health").option("--json", "output JSON instead of a table").action(async (pkgs, opts) => {
|
|
3215
|
-
const { runCompare } = await import("../commands-
|
|
3218
|
+
const { runCompare } = await import("../commands-6BBLN5N5.js");
|
|
3216
3219
|
await runCompare(pkgs, opts);
|
|
3217
3220
|
});
|
|
3218
3221
|
program2.command("verify").argument("<package>", "npm package name").description("safety check: is this package real, healthy, and not risky?").option("--json", "output JSON instead of a table").action(async (pkg, opts) => {
|
|
3219
|
-
const { runVerify } = await import("../commands-
|
|
3222
|
+
const { runVerify } = await import("../commands-6BBLN5N5.js");
|
|
3220
3223
|
await runVerify(pkg, opts);
|
|
3221
3224
|
});
|
|
3222
3225
|
program2.command("usage").argument("<package>", "npm package name").description(
|
|
@@ -3227,7 +3230,7 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3227
3230
|
(v) => Math.max(0, parseInt(v, 10) || 0)
|
|
3228
3231
|
).option("--json", "output JSON").action(
|
|
3229
3232
|
async (pkg, opts) => {
|
|
3230
|
-
const { runUsage } = await import("../commands-
|
|
3233
|
+
const { runUsage } = await import("../commands-6BBLN5N5.js");
|
|
3231
3234
|
await runUsage(pkg, {
|
|
3232
3235
|
version: opts.target ?? opts.version,
|
|
3233
3236
|
known: opts.known,
|
|
@@ -3238,18 +3241,18 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3238
3241
|
}
|
|
3239
3242
|
);
|
|
3240
3243
|
program2.command("versions").argument("<package>", "npm package name").description("show the stored version timeline for a package").option("--json", "output JSON instead of a table").option("-n, --limit <n>", "how many versions to show (default 30)").action(async (pkg, opts) => {
|
|
3241
|
-
const { runVersions } = await import("../commands-
|
|
3244
|
+
const { runVersions } = await import("../commands-6BBLN5N5.js");
|
|
3242
3245
|
await runVersions(pkg, opts);
|
|
3243
3246
|
});
|
|
3244
3247
|
program2.command("compat").argument("<packages...>", "npm package names to check together").description(
|
|
3245
3248
|
"check whether a set of packages forms a coherent stack (peer/engine + recorded evidence)"
|
|
3246
3249
|
).option("--pin <name=version...>", "evaluate an exact version, e.g. --pin next=15").option("--json", "output JSON").action(async (pkgs, opts) => {
|
|
3247
|
-
const { runCompat } = await import("../commands-
|
|
3250
|
+
const { runCompat } = await import("../commands-6BBLN5N5.js");
|
|
3248
3251
|
await runCompat(pkgs, opts);
|
|
3249
3252
|
});
|
|
3250
3253
|
program2.command("upgrade-plan").argument("[dir]", "project directory (default: current)", ".").description("what is behind in this project, and what each upgrade removes from its API").option("--json", "output the plan as JSON (feed to `check-upgrade --plan`)").option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--api-key <key>", "hosted API key (defaults to $LURQ_API_KEY)").option("--repo <owner/name>", "apply this repo's policy (defaults to $GITHUB_REPOSITORY)").action(
|
|
3251
3254
|
async (dir, opts) => {
|
|
3252
|
-
const { buildUpgradePlan, formatUpgradePlan } = await import("../upgradePlan-
|
|
3255
|
+
const { buildUpgradePlan, formatUpgradePlan } = await import("../upgradePlan-F3OUNL3E.js");
|
|
3253
3256
|
const plan = await buildUpgradePlan(dir, {
|
|
3254
3257
|
url: opts.url,
|
|
3255
3258
|
apiKey: opts.apiKey,
|
|
@@ -3260,7 +3263,7 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3260
3263
|
);
|
|
3261
3264
|
program2.command("check-upgrade").argument("[dir]", "project directory to scan (default: current)", ".").description("do these upgrades remove symbols your code actually references?").option("--plan <file>", "targets from `upgrade-plan --json`").option("--upgrade <spec...>", "pkg@from..to (repeatable), e.g. commander@11.1.0..12.1.0").option("--json", "output the report as JSON").option("--exit-code", "exit 1 when the report is not safe (for CI)").option("--report", "send the result to your lurq dashboard (CI; needs an API key)").option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--api-key <key>", "hosted API key (defaults to $LURQ_API_KEY)").option("--no-types", "skip the type check (runtime surface only; faster)").action(
|
|
3262
3265
|
async (dir, opts) => {
|
|
3263
|
-
const { runCheckUpgrade } = await import("../checkUpgrade-
|
|
3266
|
+
const { runCheckUpgrade } = await import("../checkUpgrade-Q4CV7GXG.js");
|
|
3264
3267
|
await runCheckUpgrade(dir, opts);
|
|
3265
3268
|
}
|
|
3266
3269
|
);
|
|
@@ -3274,19 +3277,19 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3274
3277
|
"write SARIF for GitHub code scanning (upload with codeql-action/upload-sarif)"
|
|
3275
3278
|
).option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--api-key <key>", "hosted API key (defaults to $LURQ_API_KEY)").option("--repo <owner/name>", "apply this repo's policy (defaults to $GITHUB_REPOSITORY)").action(
|
|
3276
3279
|
async (dir, opts) => {
|
|
3277
|
-
const { runFix } = await import("../fix-
|
|
3280
|
+
const { runFix } = await import("../fix-Z7ZY55HB.js");
|
|
3278
3281
|
await runFix(dir, opts);
|
|
3279
3282
|
}
|
|
3280
3283
|
);
|
|
3281
3284
|
program2.command("check-release").argument("[dir]", "package directory (default: current)", ".").description("is the version you are about to publish honest about what changed?").option("--against <version>", "compare with this published version (default: latest)").option("--json", "output the check as JSON").option("--exit-code", "exit 1 when the bump is understated (for CI / prepublish)").action(async (dir, opts) => {
|
|
3282
|
-
const { checkRelease, formatReleaseCheck } = await import("../release-
|
|
3285
|
+
const { checkRelease, formatReleaseCheck } = await import("../release-EUOM5I3R.js");
|
|
3283
3286
|
const check = await checkRelease(dir, { against: opts.against });
|
|
3284
3287
|
console.log(opts.json ? JSON.stringify(check, null, 2) : formatReleaseCheck(check));
|
|
3285
3288
|
if (opts.exitCode && check.verdict !== "ok") process.exitCode = 1;
|
|
3286
3289
|
});
|
|
3287
3290
|
program2.command("check-env").argument("[dir]", "project directory to scan (default: current)", ".").description("which environment variables does this project read that nothing declares?").option("--json", "output the result as JSON").option("--exit-code", "exit 1 when anything is undeclared (for CI)").option("--sarif <file>", "write SARIF for GitHub code scanning").option("--limit <n>", "source files to read before stopping (default 5000)").action(
|
|
3288
3291
|
async (dir, opts) => {
|
|
3289
|
-
const { runEnvCheck } = await import("../envCheck-
|
|
3292
|
+
const { runEnvCheck } = await import("../envCheck-IL22OTSC.js");
|
|
3290
3293
|
await runEnvCheck(dir, opts);
|
|
3291
3294
|
}
|
|
3292
3295
|
);
|
|
@@ -3306,7 +3309,7 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3306
3309
|
"probe your MCP servers now instead of waiting for the worker (self-hosted index only)"
|
|
3307
3310
|
).option("--probe-budget <seconds>", "wall-clock ceiling for probing (default 90)").option("--json", "output JSON instead of a table").action(
|
|
3308
3311
|
async (dir, opts) => {
|
|
3309
|
-
const { runAudit } = await import("../commands-
|
|
3312
|
+
const { runAudit } = await import("../commands-6BBLN5N5.js");
|
|
3310
3313
|
await runAudit(dir, opts);
|
|
3311
3314
|
}
|
|
3312
3315
|
);
|
|
@@ -3326,7 +3329,7 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3326
3329
|
"--sarif <file>",
|
|
3327
3330
|
"write SARIF for GitHub code scanning (upload with codeql-action/upload-sarif)"
|
|
3328
3331
|
).action(async (dir, opts) => {
|
|
3329
|
-
const { runMcpScan } = await import("../mcpScan-
|
|
3332
|
+
const { runMcpScan } = await import("../mcpScan-CKBQNK5H.js");
|
|
3330
3333
|
await runMcpScan(dir, opts);
|
|
3331
3334
|
});
|
|
3332
3335
|
program2.command("mcp-ci").argument("[dir]", "repository directory (defaults to the current one)").description(
|
|
@@ -3339,23 +3342,23 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3339
3342
|
"--sarif",
|
|
3340
3343
|
"also file findings as GitHub code scanning alerts (needs code scanning enabled; adds security-events: write)"
|
|
3341
3344
|
).option("--no-issue", "do not maintain the pinned lurq dashboard issue").action(async (dir, opts) => {
|
|
3342
|
-
const { runMcpCi } = await import("../mcpScan-
|
|
3345
|
+
const { runMcpCi } = await import("../mcpScan-CKBQNK5H.js");
|
|
3343
3346
|
await runMcpCi(dir, opts);
|
|
3344
3347
|
});
|
|
3345
3348
|
program2.command("mcp-stack").argument("[dir]", "project directory (defaults to the current one)").description(
|
|
3346
3349
|
"do your configured MCP servers coexist? checks tool-name collisions and shadowing, live"
|
|
3347
3350
|
).option("--project-only", "read only config files in the project").option("--trust-project", "launch servers committed to the repository without asking").option("--timeout <seconds>", "per-server connect deadline (default 60)").option("--json", "output JSON instead of a table").action(
|
|
3348
3351
|
async (dir, opts) => {
|
|
3349
|
-
const { runMcpStack } = await import("../commands-
|
|
3352
|
+
const { runMcpStack } = await import("../commands-6BBLN5N5.js");
|
|
3350
3353
|
await runMcpStack(dir, opts);
|
|
3351
3354
|
}
|
|
3352
3355
|
);
|
|
3353
3356
|
program2.command("mcp-surface").argument("<server>", "npm package name of the MCP server").description("an MCP server's real tool contract: params and behaviour annotations").option("--version <v>", "exact version (defaults to the latest probed)").option("--json", "output JSON instead of a table").action(async (server, opts) => {
|
|
3354
|
-
const { runMcpSurface } = await import("../commands-
|
|
3357
|
+
const { runMcpSurface } = await import("../commands-6BBLN5N5.js");
|
|
3355
3358
|
await runMcpSurface(server, opts);
|
|
3356
3359
|
});
|
|
3357
3360
|
program2.command("mcp-drift").argument("<server>", "npm package name of the MCP server").description("what an MCP server changed between two versions (incl. silent + privilege drift)").requiredOption("--from <v>", "version you are on").requiredOption("--to <v>", "version you are moving to").option("--json", "output JSON instead of a table").action(async (server, opts) => {
|
|
3358
|
-
const { runMcpDrift } = await import("../commands-
|
|
3361
|
+
const { runMcpDrift } = await import("../commands-6BBLN5N5.js");
|
|
3359
3362
|
await runMcpDrift(server, opts);
|
|
3360
3363
|
});
|
|
3361
3364
|
program2.command("connect-check").argument("<server>", "endpoint URL, official registry name, or npm package name").description(
|
|
@@ -3364,25 +3367,25 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3364
3367
|
"--client <id>",
|
|
3365
3368
|
"one client: claude-code, claude-ai, chatgpt, cursor, vscode, codex, gemini-cli, \u2026"
|
|
3366
3369
|
).option("--json", "output JSON instead of a table").action(async (server, opts) => {
|
|
3367
|
-
const { runConnectCheck } = await import("../commands-
|
|
3370
|
+
const { runConnectCheck } = await import("../commands-6BBLN5N5.js");
|
|
3368
3371
|
await runConnectCheck(server, opts);
|
|
3369
3372
|
});
|
|
3370
3373
|
program2.command("mcp-pin").argument("<server>", "endpoint URL or official registry name of a remote MCP server").description(
|
|
3371
3374
|
"approve a remote MCP server as it is now; you are alerted when its tools or sign-in path change"
|
|
3372
3375
|
).option("--note <text>", "why it was approved, shown with the pin").option("--json", "output JSON").action(async (server, opts) => {
|
|
3373
|
-
const { runMcpPin } = await import("../commands-
|
|
3376
|
+
const { runMcpPin } = await import("../commands-6BBLN5N5.js");
|
|
3374
3377
|
await runMcpPin(server, opts);
|
|
3375
3378
|
});
|
|
3376
3379
|
program2.command("mcp-unpin").argument("<server>", "endpoint URL or official registry name").description("stop watching a pinned remote MCP server").action(async (server) => {
|
|
3377
|
-
const { runMcpUnpin } = await import("../commands-
|
|
3380
|
+
const { runMcpUnpin } = await import("../commands-6BBLN5N5.js");
|
|
3378
3381
|
await runMcpUnpin(server);
|
|
3379
3382
|
});
|
|
3380
3383
|
program2.command("mcp-pins").description("your pinned remote MCP servers, and which changed since you pinned them").option("--json", "output JSON").action(async (opts) => {
|
|
3381
|
-
const { runMcpPins } = await import("../commands-
|
|
3384
|
+
const { runMcpPins } = await import("../commands-6BBLN5N5.js");
|
|
3382
3385
|
await runMcpPins(opts);
|
|
3383
3386
|
});
|
|
3384
3387
|
program2.command("weights").description("show and explain the scoring weight model (health, quality, composite \u03BB)").option("--json", "output the weight model as JSON").action(async (opts) => {
|
|
3385
|
-
const { runWeights } = await import("../commands-
|
|
3388
|
+
const { runWeights } = await import("../commands-6BBLN5N5.js");
|
|
3386
3389
|
runWeights(opts);
|
|
3387
3390
|
});
|
|
3388
3391
|
program2.command("edit-weights").description("override, reset, or explain the scoring weights (layered over defaults)").option(
|
|
@@ -3392,12 +3395,12 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3392
3395
|
[]
|
|
3393
3396
|
).option("--reset", "remove all overrides and restore defaults").option("--explain <component>", "explain a component (e.g. adoption, quality, lambda)").option("--project", "write to project-local .lurq/weights.json instead of the user config").action(
|
|
3394
3397
|
async (opts) => {
|
|
3395
|
-
const { runEditWeights } = await import("../commands-
|
|
3398
|
+
const { runEditWeights } = await import("../commands-6BBLN5N5.js");
|
|
3396
3399
|
await runEditWeights(opts);
|
|
3397
3400
|
}
|
|
3398
3401
|
);
|
|
3399
3402
|
program2.command("install-skill").description("register lurq as an MCP server in supported AI assistants (scriptable)").option("--agent <agent>", AGENT_CHOICES, "claude-code").option("--api-key <key>", "hosted API key (remote install; default mode)").option("--url <url>", "hosted endpoint URL (defaults to the lurq service)").option("--local", "self-host: write a local stdio entry using your own DATABASE_URL").action(async (opts) => {
|
|
3400
|
-
const { runInstallSkill } = await import("../installSkill-
|
|
3403
|
+
const { runInstallSkill } = await import("../installSkill-A7KKPDMS.js");
|
|
3401
3404
|
await runInstallSkill(opts);
|
|
3402
3405
|
});
|
|
3403
3406
|
program2.command("hook").argument(
|
|
@@ -3410,15 +3413,15 @@ coding agent on this machine. Get a key at ${KEYS_URL}
|
|
|
3410
3413
|
).description(
|
|
3411
3414
|
"run as an agent hook: verify installs and suggest lurq where it helps (set up by `lurq setup`)"
|
|
3412
3415
|
).action(async (event, opts) => {
|
|
3413
|
-
const { runHook } = await import("../hook-
|
|
3416
|
+
const { runHook } = await import("../hook-TWFLIDK3.js");
|
|
3414
3417
|
await runHook(event, opts.agent);
|
|
3415
3418
|
});
|
|
3416
3419
|
program2.command("serve").description("start the MCP server over stdio (for agent integration)").action(async () => {
|
|
3417
|
-
const { startMcpServer } = await import("../server-
|
|
3420
|
+
const { startMcpServer } = await import("../server-LROMHS62.js");
|
|
3418
3421
|
await startMcpServer();
|
|
3419
3422
|
});
|
|
3420
3423
|
program2.command("serve-http").description("start the hosted MCP server over HTTP with API-key auth").option("--port <n>", "port to listen on (default: $PORT or 8080)", (v) => parseInt(v, 10)).action(async (opts) => {
|
|
3421
|
-
const { startHttpServer } = await import("../http-
|
|
3424
|
+
const { startHttpServer } = await import("../http-7VF2RE2D.js");
|
|
3422
3425
|
await startHttpServer({ port: opts.port });
|
|
3423
3426
|
});
|
|
3424
3427
|
return program2;
|
|
@@ -2,9 +2,9 @@ import { createRequire as __lurqCreateRequire } from 'node:module'; const requir
|
|
|
2
2
|
import {
|
|
3
3
|
cached,
|
|
4
4
|
invalidateCache
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J3NUERU7.js";
|
|
6
6
|
import "./chunk-MYGSLK44.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-L3V7AVM6.js";
|
|
8
8
|
import "./chunk-I3M2KJXB.js";
|
|
9
9
|
export {
|
|
10
10
|
cached,
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
getEndpointByUrl,
|
|
6
6
|
getEndpointsForServer,
|
|
7
7
|
listEndpointChanges
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-AHRDDKNO.js";
|
|
9
9
|
import {
|
|
10
10
|
getContract
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-2XMD4H2I.js";
|
|
12
12
|
import "./chunk-XGOV6KV4.js";
|
|
13
13
|
import "./chunk-63MUJNZL.js";
|
|
14
14
|
import "./chunk-QKGYDMWB.js";
|
|
@@ -18,9 +18,9 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
fetchServerManifest
|
|
20
20
|
} from "./chunk-LEGPB7DO.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-6353IJJ5.js";
|
|
22
22
|
import "./chunk-MYGSLK44.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-L3V7AVM6.js";
|
|
24
24
|
import {
|
|
25
25
|
init_esm_shims
|
|
26
26
|
} from "./chunk-I3M2KJXB.js";
|
|
@@ -2481,7 +2481,7 @@ async function handleConnectCheck(db, input, deps = {}) {
|
|
|
2481
2481
|
};
|
|
2482
2482
|
if (row.lastStatus) source = "probe";
|
|
2483
2483
|
} else if (deps.liveProbe) {
|
|
2484
|
-
const { probeEndpoint } = await import("./probe-
|
|
2484
|
+
const { probeEndpoint } = await import("./probe-ZEZFNIQZ.js");
|
|
2485
2485
|
const r2 = await probeEndpoint(query, {
|
|
2486
2486
|
fetch: deps.liveProbe.fetch,
|
|
2487
2487
|
budgetMs: deps.liveProbe.budgetMs ?? LIVE_BUDGET_MS
|