bazilion 0.17.0 → 0.19.0
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.js +859 -79
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +4657 -552
- package/dist/daemon.js.map +1 -1
- package/dist/migrations/0001_init.sql +249 -3
- package/dist/web/client/assets/{ChatPane-BI3QVX2A.js → ChatPane-DCyGcqdh.js} +1 -1
- package/dist/web/client/assets/ConfirmDialog-C908TxS5.js +1 -0
- package/dist/web/client/assets/{FieldRow-swJ5qn2h.js → FieldRow-CELqI-1V.js} +1 -1
- package/dist/web/client/assets/{ProductionTeamPolicyEditor-LGw1UuF-.js → ProductionTeamPolicyEditor-DnTcWhG8.js} +2 -2
- package/dist/web/client/assets/{ProfileCommunicationEditor-raoau_YB.js → ProfileCommunicationEditor-BVIEaW3s.js} +1 -1
- package/dist/web/client/assets/{ResultSourceConversation-BEwkhFog.js → ResultSourceConversation-4gbZCh_s.js} +1 -1
- package/dist/web/client/assets/TeamTabs-V17b45X5.js +1 -0
- package/dist/web/client/assets/{TemplatesTabs-BX5hhEJ7.js → TemplatesTabs-BMK3Qok_.js} +1 -1
- package/dist/web/client/assets/{UnsavedChangesGuard-CVJtmR1D.js → UnsavedChangesGuard-BaE-UzyS.js} +1 -1
- package/dist/web/client/assets/{_id-BkYrUP0R.js → _id-BU1l9gP7.js} +1 -1
- package/dist/web/client/assets/{_id-DHqq2W34.js → _id-BVANQm00.js} +1 -1
- package/dist/web/client/assets/{_id-BQPOE3gj.js → _id-Bvh5LyUv.js} +1 -1
- package/dist/web/client/assets/{_id-CriixlZD.js → _id-CArZR-IO.js} +1 -1
- package/dist/web/client/assets/{_id-DmEVZIlx.js → _id-tUkSe5li.js} +1 -1
- package/dist/web/client/assets/{activity-Bzr8R18n.js → activity-CWCnqjqj.js} +1 -1
- package/dist/web/client/assets/{agents-DF4NALmJ.js → agents-CX4STmGK.js} +1 -1
- package/dist/web/client/assets/{agents-13oafeOA.js → agents-CdCnhH06.js} +1 -1
- package/dist/web/client/assets/{approvals-DsG0Ijls.js → approvals-CnNpwG78.js} +1 -1
- package/dist/web/client/assets/{attention-DG7K25mz.js → attention-CEE-wWrx.js} +1 -1
- package/dist/web/client/assets/chevron-right-CvCEwfSl.js +1 -0
- package/dist/web/client/assets/{config-DAaDbFhS.js → config-CSEtI-dq.js} +1 -1
- package/dist/web/client/assets/{inbox-C9e7QjsX.js → inbox-MYnBtPdF.js} +1 -1
- package/dist/web/client/assets/index-Ct31TjS-.js +52 -0
- package/dist/web/client/assets/{learning-23arTd21.js → learning-BIR5FTgQ.js} +1 -1
- package/dist/web/client/assets/login-DIeceuOs.js +1 -0
- package/dist/web/client/assets/{mcp-Cdx9qAl8.js → mcp-CX3kJpGu.js} +1 -1
- package/dist/web/client/assets/{members-fotOz4rR.js → members-DlhSjye1.js} +1 -1
- package/dist/web/client/assets/{memory-C7UznVot.js → memory-CsDd6b2l.js} +1 -1
- package/dist/web/client/assets/{policy-CactLW1X.js → policy-DkWDhG0x.js} +1 -1
- package/dist/web/client/assets/{results-DqEuYnQH.js → results-BHdhNHJJ.js} +1 -1
- package/dist/web/client/assets/review-Dyw47eM1.js +1 -0
- package/dist/web/client/assets/routes-DtYD4WJL.js +1 -0
- package/dist/web/client/assets/{services-xEANwZAu.js → services-WUlW7oEo.js} +1 -1
- package/dist/web/client/assets/{skills-CamV6wYM.js → skills-jNoUfUSZ.js} +1 -1
- package/dist/web/client/assets/styles-DCX6QTqJ.css +2 -0
- package/dist/web/client/assets/{teams-B12dMSjW.js → teams-C1kYRrtP.js} +1 -1
- package/dist/web/client/assets/{teams-CbH43zSG.js → teams-D3FaSKE7.js} +1 -1
- package/dist/web/client/assets/{telegram-muIql4u-.js → telegram-D86AO6V9.js} +1 -1
- package/dist/web/client/assets/{tokens-DGFmApdF.js → tokens-B42KDisP.js} +1 -1
- package/dist/web/client/assets/{triggers-D8n3sCBW.js → triggers-yEfWnQ_K.js} +1 -1
- package/dist/web/client/assets/verifications-DrHQEQFx.js +2 -0
- package/dist/web/client/assets/{welcome-CMHWRZhs.js → welcome-D8IbF_P0.js} +1 -1
- package/dist/web/client/assets/{x-BGCHwZOH.js → x-CXKABZ7C.js} +1 -1
- package/dist/web/server/assets/{TeamTabs-DQXh-3ij.js → TeamTabs-Dg4v6x0-.js} +4 -0
- package/dist/web/server/assets/{_id-DDyA9CGX.js → _id--onriuvj.js} +1 -1
- package/dist/web/server/assets/{_id-XkxlX036.js → _id-D2bDA1iV.js} +1 -1
- package/dist/web/server/assets/{_id-Dw3gKOGv.js → _id-DL-SnSnK.js} +1 -1
- package/dist/web/server/assets/{_id-DSPFJMzf.js → _id-Dab2CVtO2.js} +1 -1
- package/dist/web/server/assets/{_id-DtJn-yzu.js → _id-EAjRXNbD.js} +2 -2
- package/dist/web/server/assets/{_id-CPfILjMa.js → _id-bVispdh-.js} +1 -1
- package/dist/web/server/assets/{_tanstack-start-manifest_v-vOXRfKJD.js → _tanstack-start-manifest_v-BcTOb0oj.js} +87 -77
- package/dist/web/server/assets/{activity-pYQPT3QT.js → activity-CLDAy6rk.js} +1 -1
- package/dist/web/server/assets/{activity-BX1jZBPQ.js → activity-Cu7zKPGD.js} +1 -1
- package/dist/web/server/assets/{activity-bozPMU2v.js → activity-Dn50vkQP.js} +2 -2
- package/dist/web/server/assets/{agents-BKBfW700.js → agents-CdB2kuNN.js} +1 -1
- package/dist/web/server/assets/{agents-CVCfxnE2.js → agents-DfHcb2H2.js} +1 -1
- package/dist/web/server/assets/{approvals-C3ya6B6U.js → approvals-Bq846WaP.js} +1 -1
- package/dist/web/server/assets/{attention-l28hGCHS.js → attention-Sm-U7s_0.js} +1 -1
- package/dist/web/server/assets/{auth-AvDFNeOv.js → auth-PB5dVyvX.js} +1 -1
- package/dist/web/server/assets/{config-BWKn4XII.js → config-BNGTBu80.js} +1 -1
- package/dist/web/server/assets/{daemon-client-Cgx-YW4l.js → daemon-client-CWQvck6B.js} +50 -0
- package/dist/web/server/assets/{git-review-f_uta4Mx.js → git-review-C_h_tezf.js} +1 -1
- package/dist/web/server/assets/{inbox-BBZiOOQs.js → inbox-DJoU-bla.js} +1 -1
- package/dist/web/server/assets/{learning-CheVay1i.js → learning-DVb0I_3Z.js} +1 -1
- package/dist/web/server/assets/{mcp-DCBDmNtQ.js → mcp-CeZqOiDG.js} +1 -1
- package/dist/web/server/assets/{members-C5FQruRZ.js → members-Bd0OtiTr.js} +1 -1
- package/dist/web/server/assets/{members-C2He8mrU.js → members-CcYjuqxB.js} +1 -1
- package/dist/web/server/assets/{members-C_2xB9pr.js → members-xSXoYUOd.js} +2 -2
- package/dist/web/server/assets/{memory-rmiFNj7T.js → memory-CH2yNT89.js} +1 -1
- package/dist/web/server/assets/{memory-BTcmf0sD.js → memory-UP6AsRkO.js} +2 -2
- package/dist/web/server/assets/{memory-4tI-UbOf.js → memory-lo2vHRNw.js} +1 -1
- package/dist/web/server/assets/{policy-C3D2Q1EA.js → policy-B62WXIFo.js} +1 -1
- package/dist/web/server/assets/{policy-BGILKGHz.js → policy-Bze9Krhg.js} +2 -2
- package/dist/web/server/assets/{policy-DS7LGe--.js → policy-DrRKinMr.js} +1 -1
- package/dist/web/server/assets/{results-_6K_zXQS.js → results-BFqs2iOu.js} +1 -1
- package/dist/web/server/assets/{results-Cgx7SrFt.js → results-CzZk50Fu.js} +2 -2
- package/dist/web/server/assets/{results-C6H42tjq.js → results-fT2zyiJx.js} +1 -1
- package/dist/web/server/assets/review-CvUPk4HA.js +38 -0
- package/dist/web/server/assets/review-DYcYdUTv.js +859 -0
- package/dist/web/server/assets/review-packets-e36PsTSX.js +172 -0
- package/dist/web/server/assets/{router-ElARvZzI.js → router-NYhuYQCd.js} +34 -27
- package/dist/web/server/assets/{routes-BgMvLvS-.js → routes-RdppWPiW.js} +1 -1
- package/dist/web/server/assets/{services-yHZroxsi.js → services-Dgu7dcTC.js} +1 -1
- package/dist/web/server/assets/{skills--bIKID1Q.js → skills-DL7UIWa8.js} +1 -1
- package/dist/web/server/assets/{teams-BbRfuVXY.js → teams-Cmn7mdx9.js} +1 -1
- package/dist/web/server/assets/{teams--a956vWL.js → teams-DiC-MBg4.js} +1 -1
- package/dist/web/server/assets/{telegram-4kMxRtVZ.js → telegram-CLOFnLjF.js} +1 -1
- package/dist/web/server/assets/{tokens-BYwTN9JZ.js → tokens-BVva7GHu.js} +1 -1
- package/dist/web/server/assets/{triggers-BM6mzLuH.js → triggers-D4orksJq.js} +1 -1
- package/dist/web/server/assets/verification-C1SHMTX8.js +97 -0
- package/dist/web/server/assets/verifications-C_ycXrPK.js +26 -0
- package/dist/web/server/assets/verifications-Ci49n2Km.js +281 -0
- package/dist/web/server/server.js +87 -35
- package/dist/worker.js +597 -6
- package/dist/worker.js.map +1 -1
- package/package.json +3 -3
- package/dist/web/client/assets/ConfirmDialog-Qam6Ut08.js +0 -1
- package/dist/web/client/assets/TeamTabs-BDdTLGIf.js +0 -1
- package/dist/web/client/assets/chevron-right-DFqFHtLy.js +0 -1
- package/dist/web/client/assets/createServerFn-Dzfjt7mA.js +0 -3
- package/dist/web/client/assets/index-Dsstm2hf.js +0 -50
- package/dist/web/client/assets/login-BIXnBsuj.js +0 -1
- package/dist/web/client/assets/review-CnBSYclb.js +0 -1
- package/dist/web/client/assets/routes-COxMuwVz.js +0 -1
- package/dist/web/client/assets/styles-C6br2xxl.css +0 -2
- package/dist/web/server/assets/review-DHhiL-JQ.js +0 -393
- package/dist/web/server/assets/review-DSTMCwP4.js +0 -14
package/dist/cli.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { defineCommand as
|
|
4
|
+
import { defineCommand as defineCommand38, runCommand, showUsage } from "citty";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "bazilion",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.19.0",
|
|
10
10
|
description: "Multi-agent runtime CLI \u2014 spawn LLM agents, manage profiles/teams/skills, and run the local daemon.",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
repository: {
|
|
@@ -188,6 +188,60 @@ function createClient(cfg) {
|
|
|
188
188
|
input
|
|
189
189
|
)
|
|
190
190
|
},
|
|
191
|
+
/**
|
|
192
|
+
* Specialist verification of a captured code change (BAZ-044).
|
|
193
|
+
*
|
|
194
|
+
* Creating a request does not execute anything: the verification state machine claims and runs
|
|
195
|
+
* it, and a blocked capture comes back as a typed blocker rather than an error.
|
|
196
|
+
*/
|
|
197
|
+
verifications: (teamId) => {
|
|
198
|
+
const base = `/api/teams/${encodeURIComponent(teamId)}/verifications`;
|
|
199
|
+
return {
|
|
200
|
+
list: () => request("GET", base),
|
|
201
|
+
show: (requestId) => request("GET", `${base}/${encodeURIComponent(requestId)}`),
|
|
202
|
+
create: (input) => request("POST", base, input),
|
|
203
|
+
cancel: (requestId) => request("POST", `${base}/${encodeURIComponent(requestId)}/cancel`)
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
/**
|
|
207
|
+
* Revision-bound review packets (BAZ-043).
|
|
208
|
+
*
|
|
209
|
+
* A packet binds one captured revision. Findings are append-only, and resolving one requires an
|
|
210
|
+
* explicit decision or a named later revision — a moved line proves nothing.
|
|
211
|
+
*/
|
|
212
|
+
reviewPackets: (teamId) => {
|
|
213
|
+
const base = `/api/teams/${encodeURIComponent(teamId)}/reviews`;
|
|
214
|
+
const item = (packetId2) => `${base}/${encodeURIComponent(packetId2)}`;
|
|
215
|
+
return {
|
|
216
|
+
list: () => request("GET", base),
|
|
217
|
+
show: (packetId2) => request("GET", item(packetId2)),
|
|
218
|
+
create: (input) => request("POST", base, input),
|
|
219
|
+
addFinding: (packetId2, input) => request("POST", `${item(packetId2)}/findings`, input),
|
|
220
|
+
resolveFinding: (packetId2, findingId, input) => request(
|
|
221
|
+
"POST",
|
|
222
|
+
`${item(packetId2)}/findings/${encodeURIComponent(findingId)}/resolve`,
|
|
223
|
+
input
|
|
224
|
+
),
|
|
225
|
+
recordConclusion: (packetId2, input) => request("POST", `${item(packetId2)}/conclusion`, input),
|
|
226
|
+
export: (packetId2) => request("GET", `${item(packetId2)}/export`),
|
|
227
|
+
/**
|
|
228
|
+
* Publish the export as a durable artifact through BAZ-034's contract. `held` and `denied` are
|
|
229
|
+
* outcomes, not errors: the bytes exist and stay unreadable, and an approval names them.
|
|
230
|
+
*/
|
|
231
|
+
deliverExport: (packetId2) => request("POST", `${item(packetId2)}/export/deliver`),
|
|
232
|
+
reportState: (packetId2, input) => request("POST", `${item(packetId2)}/reported`, input),
|
|
233
|
+
/**
|
|
234
|
+
* Resolve what a file link would do. Read-only: no editor runs unless `openLink` is called, and
|
|
235
|
+
* the link itself says which host it names and whether it is the reviewed revision or the live file.
|
|
236
|
+
*/
|
|
237
|
+
link: (packetId2, options) => {
|
|
238
|
+
const params = new URLSearchParams({ path: options.path });
|
|
239
|
+
if (options.line !== void 0) params.set("line", String(options.line));
|
|
240
|
+
return request("GET", `${item(packetId2)}/link?${params}`);
|
|
241
|
+
},
|
|
242
|
+
openLink: (packetId2, options) => request("POST", `${item(packetId2)}/link/open`, options)
|
|
243
|
+
};
|
|
244
|
+
},
|
|
191
245
|
/** Read-only Git change review and bounded source snapshots (BAZ-042). */
|
|
192
246
|
repositoryReview: (teamId) => {
|
|
193
247
|
const base = `/api/teams/${encodeURIComponent(teamId)}/review`;
|
|
@@ -2290,6 +2344,42 @@ function invalidateRestoredCodingEvidence(db, payload, targetHome) {
|
|
|
2290
2344
|
WHERE state = 'retained' AND expires_at <= ?`
|
|
2291
2345
|
).run(restoredAt, restoredAt);
|
|
2292
2346
|
db.prepare("DELETE FROM source_snapshots WHERE expires_at <= ?").run(restoredAt);
|
|
2347
|
+
db.prepare("DELETE FROM verification_requests WHERE expires_at <= ?").run(restoredAt);
|
|
2348
|
+
db.prepare(
|
|
2349
|
+
`UPDATE verification_requests SET state = 'blocked'
|
|
2350
|
+
WHERE state IN ('pending', 'awaiting_approval')
|
|
2351
|
+
AND NOT EXISTS (SELECT 1 FROM source_snapshots snapshot
|
|
2352
|
+
WHERE snapshot.snapshot_id = verification_requests.snapshot_id
|
|
2353
|
+
AND snapshot.team_id = verification_requests.team_id
|
|
2354
|
+
AND snapshot.expires_at > ?)`
|
|
2355
|
+
).run(restoredAt);
|
|
2356
|
+
db.prepare(
|
|
2357
|
+
`UPDATE verification_attempts
|
|
2358
|
+
SET state = 'uncertain', finished_at = ?, lease_owner = NULL, lease_expires_at = NULL,
|
|
2359
|
+
error = 'execution was interrupted by a backup restore'
|
|
2360
|
+
WHERE finished_at IS NULL`
|
|
2361
|
+
).run(restoredAt);
|
|
2362
|
+
const invalidated = db.prepare(
|
|
2363
|
+
`SELECT DISTINCT attempt.request_id AS request_id
|
|
2364
|
+
FROM verification_check_outcomes outcome
|
|
2365
|
+
JOIN verification_attempts attempt ON attempt.id = outcome.attempt_id
|
|
2366
|
+
WHERE outcome.state IN ('succeeded', 'failed', 'timed_out', 'cancelled')`
|
|
2367
|
+
).all();
|
|
2368
|
+
db.prepare(
|
|
2369
|
+
`UPDATE verification_check_outcomes
|
|
2370
|
+
SET state = 'unknown', command_id = NULL, exit_code = NULL, finished_at = ?
|
|
2371
|
+
WHERE state IN ('succeeded', 'failed', 'timed_out', 'cancelled', 'not_executed')`
|
|
2372
|
+
).run(restoredAt);
|
|
2373
|
+
const reopen = db.prepare(`UPDATE verification_requests SET state = 'uncertain' WHERE id = ?`);
|
|
2374
|
+
const invalidateAttempt = db.prepare(
|
|
2375
|
+
`UPDATE verification_attempts
|
|
2376
|
+
SET state = 'uncertain', error = 'evidence was invalidated by a backup restore'
|
|
2377
|
+
WHERE request_id = ? AND state IN ('completed', 'failed')`
|
|
2378
|
+
);
|
|
2379
|
+
for (const row2 of invalidated) {
|
|
2380
|
+
invalidateAttempt.run(row2.request_id);
|
|
2381
|
+
reopen.run(row2.request_id);
|
|
2382
|
+
}
|
|
2293
2383
|
db.prepare("UPDATE workspace_writers SET state = 'recovery', recovery_mode = 'restored'").run();
|
|
2294
2384
|
const teams = db.prepare("SELECT id FROM teams").all();
|
|
2295
2385
|
const rebase = db.prepare("UPDATE workspace_writers SET root_path = ? WHERE team_id = ?");
|
|
@@ -2371,7 +2461,7 @@ function pauseRestoredUserQueue(database) {
|
|
|
2371
2461
|
// src/backup-schema.ts
|
|
2372
2462
|
import { createHash } from "crypto";
|
|
2373
2463
|
var CANONICAL_MIGRATION = "0001_init";
|
|
2374
|
-
var CANONICAL_SCHEMA_HASH = "
|
|
2464
|
+
var CANONICAL_SCHEMA_HASH = "da37324d58fa517941ec0557529d00a7a812413f9fda7e5d611287ad42b47595";
|
|
2375
2465
|
var CANONICAL_OBJECTS = [
|
|
2376
2466
|
["table", "team_coding_environments"],
|
|
2377
2467
|
["table", "workspace_writers"],
|
|
@@ -2384,6 +2474,28 @@ var CANONICAL_OBJECTS = [
|
|
|
2384
2474
|
["table", "source_snapshots"],
|
|
2385
2475
|
["index", "source_snapshots_retention"],
|
|
2386
2476
|
["index", "source_snapshots_team_time"],
|
|
2477
|
+
["table", "review_packets"],
|
|
2478
|
+
["index", "review_packets_team_time"],
|
|
2479
|
+
["index", "review_packets_reviewer_dispatch"],
|
|
2480
|
+
["index", "review_packets_retention"],
|
|
2481
|
+
["table", "review_findings"],
|
|
2482
|
+
["index", "review_findings_packet"],
|
|
2483
|
+
["index", "review_findings_unresolved"],
|
|
2484
|
+
["table", "review_conclusions"],
|
|
2485
|
+
["index", "review_conclusions_packet"],
|
|
2486
|
+
["table", "review_attempts"],
|
|
2487
|
+
["index", "review_attempts_one_open_per_packet"],
|
|
2488
|
+
["index", "review_attempts_lease"],
|
|
2489
|
+
["table", "verification_requests"],
|
|
2490
|
+
["index", "verification_requests_team_time"],
|
|
2491
|
+
["index", "verification_requests_recipient_dispatch"],
|
|
2492
|
+
["index", "verification_requests_retention"],
|
|
2493
|
+
["table", "verification_checks"],
|
|
2494
|
+
["table", "verification_attempts"],
|
|
2495
|
+
["index", "verification_attempts_one_open_per_request"],
|
|
2496
|
+
["index", "verification_attempts_lease"],
|
|
2497
|
+
["table", "verification_check_outcomes"],
|
|
2498
|
+
["index", "verification_check_outcomes_command"],
|
|
2387
2499
|
["table", "notification_settings"],
|
|
2388
2500
|
["table", "notification_receipts"],
|
|
2389
2501
|
["index", "notification_receipts_state"],
|
|
@@ -2401,6 +2513,8 @@ var CANONICAL_OBJECTS = [
|
|
|
2401
2513
|
["table", "agent_conversations"],
|
|
2402
2514
|
["table", "agent_conversation_selection"],
|
|
2403
2515
|
["index", "agent_results_team_time"],
|
|
2516
|
+
["index", "agent_results_session_source"],
|
|
2517
|
+
["index", "agent_results_packet_source"],
|
|
2404
2518
|
["index", "agent_triggers_agent"],
|
|
2405
2519
|
["index", "agent_triggers_enabled"],
|
|
2406
2520
|
["index", "agent_loop_break_events_agent_time"],
|
|
@@ -5619,7 +5733,7 @@ var skillCommand = defineCommand25({
|
|
|
5619
5733
|
// src/commands/team.ts
|
|
5620
5734
|
import { readFileSync as readFileSync11 } from "fs";
|
|
5621
5735
|
import { stdin as stdin2 } from "process";
|
|
5622
|
-
import { defineCommand as
|
|
5736
|
+
import { defineCommand as defineCommand32 } from "citty";
|
|
5623
5737
|
|
|
5624
5738
|
// src/commands/team-coding-log.ts
|
|
5625
5739
|
import { defineCommand as defineCommand26 } from "citty";
|
|
@@ -6175,20 +6289,466 @@ var teamPolicyCommand = defineCommand28({
|
|
|
6175
6289
|
});
|
|
6176
6290
|
|
|
6177
6291
|
// src/commands/team-review.ts
|
|
6292
|
+
import { defineCommand as defineCommand30 } from "citty";
|
|
6293
|
+
|
|
6294
|
+
// src/commands/team-review-packet.ts
|
|
6178
6295
|
import { defineCommand as defineCommand29 } from "citty";
|
|
6179
|
-
var slug = {
|
|
6296
|
+
var slug = { id: { type: "positional", required: true, description: "Team slug" } };
|
|
6297
|
+
var packetId = {
|
|
6298
|
+
packetId: { type: "positional", required: true, description: "Review packet id" }
|
|
6299
|
+
};
|
|
6300
|
+
var SEVERITIES = ["blocker", "major", "minor", "info"];
|
|
6301
|
+
function printReport(report) {
|
|
6302
|
+
const packet = report.packet;
|
|
6303
|
+
const requester = packet.requester.kind === "agent" ? `agent ${packet.requester.agentId}` : "operator";
|
|
6304
|
+
console.log(`${packet.id} ${packet.state}${report.applicability.stale ? " (stale)" : ""}`);
|
|
6305
|
+
console.log(
|
|
6306
|
+
` change: snapshot ${packet.snapshot.id} (base ${packet.snapshot.baseOid.slice(0, 12)}${packet.snapshot.complete ? "" : ", INCOMPLETE COVERAGE"})`
|
|
6307
|
+
);
|
|
6308
|
+
console.log(` reviewer: ${packet.reviewerAgentId ?? "(none \u2014 nothing delegated)"}`);
|
|
6309
|
+
console.log(` asked by: ${requester}`);
|
|
6310
|
+
console.log(
|
|
6311
|
+
` applicability: ${report.applicability.comparison === "identical" ? "unchanged since capture" : `${report.applicability.comparison} (never a pass)`}`
|
|
6312
|
+
);
|
|
6313
|
+
if (packet.summary) console.log(` summary: ${packet.summary}`);
|
|
6314
|
+
console.log(
|
|
6315
|
+
` exported: ${packet.exportedAt ? `revision ${packet.exportRevision?.slice(0, 12)}` : "not exported"}`
|
|
6316
|
+
);
|
|
6317
|
+
if (report.findings.length === 0) {
|
|
6318
|
+
console.log(" findings: none recorded");
|
|
6319
|
+
} else {
|
|
6320
|
+
console.log(" findings:");
|
|
6321
|
+
for (const finding of report.findings) {
|
|
6322
|
+
const lines = finding.lineStart === null ? "" : `:${finding.lineStart}${finding.lineEnd && finding.lineEnd !== finding.lineStart ? `-${finding.lineEnd}` : ""}`;
|
|
6323
|
+
const resolution = finding.resolution ? ` resolved(${finding.resolution.kind})` : finding.state === "unverified" ? " UNVERIFIED \u2014 not correlated to the reviewed revision" : "";
|
|
6324
|
+
console.log(` [${finding.severity}] ${finding.path}${lines}${resolution} ${finding.note}`);
|
|
6325
|
+
}
|
|
6326
|
+
}
|
|
6327
|
+
if (report.conclusions.length === 0) {
|
|
6328
|
+
console.log(" conclusions: none \u2014 a packet with findings is not yet a review");
|
|
6329
|
+
} else {
|
|
6330
|
+
for (const conclusion of report.conclusions) {
|
|
6331
|
+
const who = conclusion.reviewer.kind === "agent" ? conclusion.reviewer.agentId : "operator";
|
|
6332
|
+
console.log(
|
|
6333
|
+
` conclusion: ${conclusion.conclusion} (${who})${conclusion.note ? ` \u2014 ${conclusion.note}` : ""}`
|
|
6334
|
+
);
|
|
6335
|
+
}
|
|
6336
|
+
}
|
|
6337
|
+
const { facts } = report;
|
|
6338
|
+
const reported = Object.entries(facts.reported).filter(([, value]) => value !== null).map(([key, value]) => `${key}=${value} (reported)`);
|
|
6339
|
+
console.log(
|
|
6340
|
+
` facts: change prepared=${facts.changePrepared} checks current=${facts.checksCurrent} reviewed=${facts.reviewed}`
|
|
6341
|
+
);
|
|
6342
|
+
if (reported.length > 0) console.log(` ${reported.join(" ")}`);
|
|
6343
|
+
console.log(
|
|
6344
|
+
" note: a review conclusion is not acceptance, and this command never commits, pushes, merges or deploys"
|
|
6345
|
+
);
|
|
6346
|
+
}
|
|
6347
|
+
var createCmd3 = defineCommand29({
|
|
6348
|
+
meta: { name: "create", description: "Capture a review packet for a retained revision" },
|
|
6349
|
+
args: {
|
|
6350
|
+
...slug,
|
|
6351
|
+
snapshot: {
|
|
6352
|
+
type: "string",
|
|
6353
|
+
required: true,
|
|
6354
|
+
description: "BAZ-042 snapshot id to review (see `team review snapshots`)"
|
|
6355
|
+
},
|
|
6356
|
+
reviewer: {
|
|
6357
|
+
type: "string",
|
|
6358
|
+
description: "Agent who should review. Omit for an operator-only packet (nothing is delegated)"
|
|
6359
|
+
},
|
|
6360
|
+
summary: { type: "string", description: "What the change is for, in the requester\u2019s words" },
|
|
6361
|
+
json: { type: "boolean", description: "Emit the packet as JSON" }
|
|
6362
|
+
},
|
|
6363
|
+
async run({ args: args2 }) {
|
|
6364
|
+
const client = createClient2();
|
|
6365
|
+
try {
|
|
6366
|
+
const response = await client.reviewPackets(args2.id).create({
|
|
6367
|
+
snapshotId: args2.snapshot,
|
|
6368
|
+
reviewerAgentId: args2.reviewer ?? null,
|
|
6369
|
+
summary: args2.summary ?? null
|
|
6370
|
+
});
|
|
6371
|
+
if (args2.json) {
|
|
6372
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6373
|
+
return;
|
|
6374
|
+
}
|
|
6375
|
+
printReport(response.report);
|
|
6376
|
+
} catch (error) {
|
|
6377
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6378
|
+
process.exit(1);
|
|
6379
|
+
}
|
|
6380
|
+
}
|
|
6381
|
+
});
|
|
6382
|
+
var listCmd10 = defineCommand29({
|
|
6383
|
+
meta: { name: "list", description: "List review packets for a Team" },
|
|
6384
|
+
args: { ...slug, json: { type: "boolean", description: "Emit JSON" } },
|
|
6385
|
+
async run({ args: args2 }) {
|
|
6386
|
+
const client = createClient2();
|
|
6387
|
+
const response = await client.reviewPackets(args2.id).list();
|
|
6388
|
+
if (args2.json) {
|
|
6389
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6390
|
+
return;
|
|
6391
|
+
}
|
|
6392
|
+
if (response.packets.length === 0) {
|
|
6393
|
+
console.log("no review packets");
|
|
6394
|
+
return;
|
|
6395
|
+
}
|
|
6396
|
+
const rows = [
|
|
6397
|
+
["ID", "STATE", "REVIEWER", "FINDINGS", "OPEN", "CONCLUSION", "CHANGE"],
|
|
6398
|
+
...response.packets.map((entry3) => [
|
|
6399
|
+
entry3.packet.id,
|
|
6400
|
+
entry3.packet.state,
|
|
6401
|
+
entry3.packet.reviewerAgentId ?? "(none)",
|
|
6402
|
+
String(entry3.counts.findings),
|
|
6403
|
+
String(entry3.counts.unresolved),
|
|
6404
|
+
entry3.conclusion ?? "\u2014",
|
|
6405
|
+
entry3.packet.snapshot.id.slice(0, 12)
|
|
6406
|
+
])
|
|
6407
|
+
];
|
|
6408
|
+
for (const line of columnize(rows)) console.log(line);
|
|
6409
|
+
console.log(
|
|
6410
|
+
"\nA packet of an older revision stays listed; `packet show` reports whether it is stale."
|
|
6411
|
+
);
|
|
6412
|
+
}
|
|
6413
|
+
});
|
|
6414
|
+
var showCmd5 = defineCommand29({
|
|
6415
|
+
meta: { name: "show", description: "Show one review packet, its findings and its conclusions" },
|
|
6416
|
+
args: { ...slug, ...packetId, json: { type: "boolean", description: "Emit JSON" } },
|
|
6417
|
+
async run({ args: args2 }) {
|
|
6418
|
+
const client = createClient2();
|
|
6419
|
+
try {
|
|
6420
|
+
const response = await client.reviewPackets(args2.id).show(args2.packetId);
|
|
6421
|
+
if (args2.json) {
|
|
6422
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6423
|
+
return;
|
|
6424
|
+
}
|
|
6425
|
+
printReport(response.report);
|
|
6426
|
+
} catch (error) {
|
|
6427
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6428
|
+
process.exit(1);
|
|
6429
|
+
}
|
|
6430
|
+
}
|
|
6431
|
+
});
|
|
6432
|
+
var findingCmd = defineCommand29({
|
|
6433
|
+
meta: { name: "finding", description: "Record a finding against the packet\u2019s captured revision" },
|
|
6434
|
+
args: {
|
|
6435
|
+
...slug,
|
|
6436
|
+
...packetId,
|
|
6437
|
+
path: { type: "string", required: true, description: "Repository-relative path" },
|
|
6438
|
+
severity: { type: "string", required: true, description: SEVERITIES.join(" | ") },
|
|
6439
|
+
note: { type: "string", required: true, description: "What is wrong, with evidence" },
|
|
6440
|
+
lines: {
|
|
6441
|
+
type: "string",
|
|
6442
|
+
description: 'Line context as "start" or "start-end". Context only: never identity.'
|
|
6443
|
+
},
|
|
6444
|
+
json: { type: "boolean", description: "Emit JSON" }
|
|
6445
|
+
},
|
|
6446
|
+
async run({ args: args2 }) {
|
|
6447
|
+
if (!SEVERITIES.includes(args2.severity)) {
|
|
6448
|
+
console.error(`severity must be one of: ${SEVERITIES.join(", ")}`);
|
|
6449
|
+
process.exit(1);
|
|
6450
|
+
}
|
|
6451
|
+
const [start, end] = (args2.lines ?? "").split("-");
|
|
6452
|
+
const body = {
|
|
6453
|
+
path: args2.path,
|
|
6454
|
+
severity: args2.severity,
|
|
6455
|
+
note: args2.note,
|
|
6456
|
+
...start ? { lineStart: Number(start) } : {},
|
|
6457
|
+
...end ? { lineEnd: Number(end) } : {}
|
|
6458
|
+
};
|
|
6459
|
+
const client = createClient2();
|
|
6460
|
+
try {
|
|
6461
|
+
const response = await client.reviewPackets(args2.id).addFinding(args2.packetId, body);
|
|
6462
|
+
if (args2.json) {
|
|
6463
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6464
|
+
return;
|
|
6465
|
+
}
|
|
6466
|
+
console.log(
|
|
6467
|
+
`finding recorded against revision ${response.report.packet.snapshot.id.slice(0, 12)}`
|
|
6468
|
+
);
|
|
6469
|
+
printReport(response.report);
|
|
6470
|
+
} catch (error) {
|
|
6471
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6472
|
+
process.exit(1);
|
|
6473
|
+
}
|
|
6474
|
+
}
|
|
6475
|
+
});
|
|
6476
|
+
var resolveCmd = defineCommand29({
|
|
6477
|
+
meta: { name: "resolve", description: "Resolve a finding with explicit proof" },
|
|
6478
|
+
args: {
|
|
6479
|
+
...slug,
|
|
6480
|
+
...packetId,
|
|
6481
|
+
findingId: { type: "positional", required: true, description: "Finding id" },
|
|
6482
|
+
kind: {
|
|
6483
|
+
type: "string",
|
|
6484
|
+
required: true,
|
|
6485
|
+
description: "explicit (a decision) | linked_revision (a named later revision)"
|
|
6486
|
+
},
|
|
6487
|
+
note: { type: "string", required: true, description: "How it was resolved" },
|
|
6488
|
+
json: { type: "boolean", description: "Emit JSON" }
|
|
6489
|
+
},
|
|
6490
|
+
async run({ args: args2 }) {
|
|
6491
|
+
if (args2.kind !== "explicit" && args2.kind !== "linked_revision") {
|
|
6492
|
+
console.error("kind must be `explicit` or `linked_revision`");
|
|
6493
|
+
process.exit(1);
|
|
6494
|
+
}
|
|
6495
|
+
const client = createClient2();
|
|
6496
|
+
try {
|
|
6497
|
+
const response = await client.reviewPackets(args2.id).resolveFinding(args2.packetId, args2.findingId, {
|
|
6498
|
+
resolutionKind: args2.kind,
|
|
6499
|
+
resolutionNote: args2.note
|
|
6500
|
+
});
|
|
6501
|
+
if (args2.json) {
|
|
6502
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6503
|
+
return;
|
|
6504
|
+
}
|
|
6505
|
+
printReport(response.report);
|
|
6506
|
+
} catch (error) {
|
|
6507
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6508
|
+
process.exit(1);
|
|
6509
|
+
}
|
|
6510
|
+
}
|
|
6511
|
+
});
|
|
6512
|
+
var concludeCmd = defineCommand29({
|
|
6513
|
+
meta: { name: "conclude", description: "Record the reviewer\u2019s conclusion for this revision" },
|
|
6514
|
+
args: {
|
|
6515
|
+
...slug,
|
|
6516
|
+
...packetId,
|
|
6517
|
+
conclusion: {
|
|
6518
|
+
type: "string",
|
|
6519
|
+
required: true,
|
|
6520
|
+
description: "changes_requested | commented | recommended"
|
|
6521
|
+
},
|
|
6522
|
+
note: { type: "string", description: "Why" },
|
|
6523
|
+
json: { type: "boolean", description: "Emit JSON" }
|
|
6524
|
+
},
|
|
6525
|
+
async run({ args: args2 }) {
|
|
6526
|
+
const allowed = ["changes_requested", "commented", "recommended"];
|
|
6527
|
+
if (!allowed.includes(args2.conclusion)) {
|
|
6528
|
+
console.error(`conclusion must be one of: ${allowed.join(", ")}`);
|
|
6529
|
+
process.exit(1);
|
|
6530
|
+
}
|
|
6531
|
+
const client = createClient2();
|
|
6532
|
+
try {
|
|
6533
|
+
const response = await client.reviewPackets(args2.id).recordConclusion(args2.packetId, {
|
|
6534
|
+
conclusion: args2.conclusion,
|
|
6535
|
+
note: args2.note ?? null
|
|
6536
|
+
});
|
|
6537
|
+
if (args2.json) {
|
|
6538
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6539
|
+
return;
|
|
6540
|
+
}
|
|
6541
|
+
printReport(response.report);
|
|
6542
|
+
} catch (error) {
|
|
6543
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6544
|
+
process.exit(1);
|
|
6545
|
+
}
|
|
6546
|
+
}
|
|
6547
|
+
});
|
|
6548
|
+
var snapshotCmd = defineCommand29({
|
|
6549
|
+
meta: { name: "snapshots", description: "List retained revisions that could be reviewed" },
|
|
6550
|
+
args: { ...slug, json: { type: "boolean", description: "Emit JSON" } },
|
|
6551
|
+
async run({ args: args2 }) {
|
|
6552
|
+
const client = createClient2();
|
|
6553
|
+
const list8 = await client.repositoryReview(args2.id).snapshots();
|
|
6554
|
+
if (args2.json) {
|
|
6555
|
+
console.log(JSON.stringify(list8, null, 2));
|
|
6556
|
+
return;
|
|
6557
|
+
}
|
|
6558
|
+
if (list8.snapshots.length === 0) {
|
|
6559
|
+
console.log("no retained revisions \u2014 capture one with `team review capture`");
|
|
6560
|
+
return;
|
|
6561
|
+
}
|
|
6562
|
+
const rows = [
|
|
6563
|
+
["SNAPSHOT", "CAPTURED", "ENTRIES", "COMPLETE"],
|
|
6564
|
+
...list8.snapshots.map((snapshot) => [
|
|
6565
|
+
snapshot.snapshotId.slice(0, 16),
|
|
6566
|
+
new Date(snapshot.createdAt).toISOString(),
|
|
6567
|
+
String(snapshot.entryCount),
|
|
6568
|
+
snapshot.complete ? "yes" : "NO"
|
|
6569
|
+
])
|
|
6570
|
+
];
|
|
6571
|
+
for (const line of columnize(rows)) console.log(line);
|
|
6572
|
+
}
|
|
6573
|
+
});
|
|
6574
|
+
var reportedCmd = defineCommand29({
|
|
6575
|
+
meta: {
|
|
6576
|
+
name: "reported",
|
|
6577
|
+
description: "Record an operator-reported external state (never verified by Bazilion)"
|
|
6578
|
+
},
|
|
6579
|
+
args: {
|
|
6580
|
+
...slug,
|
|
6581
|
+
...packetId,
|
|
6582
|
+
state: {
|
|
6583
|
+
type: "positional",
|
|
6584
|
+
required: true,
|
|
6585
|
+
description: "committed | pushed | pullRequest | merged | deployed | productionAccepted"
|
|
6586
|
+
},
|
|
6587
|
+
reference: {
|
|
6588
|
+
type: "string",
|
|
6589
|
+
description: "What the operator is pointing at: a commit id, a URL, a release name. Omit to clear it."
|
|
6590
|
+
},
|
|
6591
|
+
json: { type: "boolean", description: "Emit JSON" }
|
|
6592
|
+
},
|
|
6593
|
+
async run({ args: args2 }) {
|
|
6594
|
+
const client = createClient2();
|
|
6595
|
+
try {
|
|
6596
|
+
const response = await client.reviewPackets(args2.id).reportState(args2.packetId, {
|
|
6597
|
+
state: args2.state,
|
|
6598
|
+
reference: args2.reference ?? null
|
|
6599
|
+
});
|
|
6600
|
+
if (args2.json) {
|
|
6601
|
+
console.log(JSON.stringify(response, null, 2));
|
|
6602
|
+
return;
|
|
6603
|
+
}
|
|
6604
|
+
const reported = Object.entries(response.report.packet.reported).filter(([, value]) => value !== null).map(([key, value]) => `${key}=${value}`);
|
|
6605
|
+
console.log(
|
|
6606
|
+
`recorded (reported, not verified): ${reported.length > 0 ? reported.join(" ") : "nothing reported"}`
|
|
6607
|
+
);
|
|
6608
|
+
console.log(
|
|
6609
|
+
"Bazilion did not check this: there is no code-host integration, so it is whatever you reported."
|
|
6610
|
+
);
|
|
6611
|
+
} catch (error) {
|
|
6612
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6613
|
+
process.exit(1);
|
|
6614
|
+
}
|
|
6615
|
+
}
|
|
6616
|
+
});
|
|
6617
|
+
var linkCmd = defineCommand29({
|
|
6618
|
+
meta: {
|
|
6619
|
+
name: "link",
|
|
6620
|
+
description: "Resolve where a file link points, and where it would open"
|
|
6621
|
+
},
|
|
6622
|
+
args: {
|
|
6623
|
+
...slug,
|
|
6624
|
+
...packetId,
|
|
6625
|
+
path: { type: "string", required: true, description: "Changed path in the reviewed revision" },
|
|
6626
|
+
line: { type: "string", description: "Line to point at" },
|
|
6627
|
+
open: {
|
|
6628
|
+
type: "boolean",
|
|
6629
|
+
description: "Actually open it on the daemon host (requires a configured editor)"
|
|
6630
|
+
},
|
|
6631
|
+
json: { type: "boolean", description: "Emit JSON" }
|
|
6632
|
+
},
|
|
6633
|
+
async run({ args: args2 }) {
|
|
6634
|
+
const client = createClient2();
|
|
6635
|
+
const options = {
|
|
6636
|
+
path: args2.path,
|
|
6637
|
+
...args2.line ? { line: Number(args2.line) } : {}
|
|
6638
|
+
};
|
|
6639
|
+
try {
|
|
6640
|
+
if (args2.open) {
|
|
6641
|
+
const { link: link2, result } = await client.reviewPackets(args2.id).openLink(args2.packetId, options);
|
|
6642
|
+
console.log(result.opened ? `opened: ${result.detail}` : `not opened: ${result.detail}`);
|
|
6643
|
+
console.log(`host: ${link2.host.daemon ?? "unknown"} (owns the workspace)`);
|
|
6644
|
+
return;
|
|
6645
|
+
}
|
|
6646
|
+
const { link } = await client.reviewPackets(args2.id).link(args2.packetId, options);
|
|
6647
|
+
if (args2.json) {
|
|
6648
|
+
console.log(JSON.stringify(link, null, 2));
|
|
6649
|
+
return;
|
|
6650
|
+
}
|
|
6651
|
+
console.log(`copy: ${link.copyTarget}`);
|
|
6652
|
+
console.log(`host: ${link.host.daemon ?? "unknown"} (owns the workspace)`);
|
|
6653
|
+
console.log(`file: ${link.hostPath ?? "(not part of the reviewed revision)"}`);
|
|
6654
|
+
console.log(
|
|
6655
|
+
`mode: ${link.mode === "live" ? "the reviewed revision (the tree still matches the capture)" : link.mode === "stale" ? "the CURRENT file \u2014 the tree moved since the capture" : "unknown"}`
|
|
6656
|
+
);
|
|
6657
|
+
console.log(`open: ${link.canOpen ? link.command : "not configured on the daemon host"}`);
|
|
6658
|
+
for (const note of link.notes) console.log(` note: ${note}`);
|
|
6659
|
+
} catch (error) {
|
|
6660
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6661
|
+
process.exit(1);
|
|
6662
|
+
}
|
|
6663
|
+
}
|
|
6664
|
+
});
|
|
6665
|
+
var exportCmd = defineCommand29({
|
|
6666
|
+
meta: { name: "export", description: "Print the patch and handoff text for a packet\u2019s revision" },
|
|
6667
|
+
args: {
|
|
6668
|
+
...slug,
|
|
6669
|
+
...packetId,
|
|
6670
|
+
patch: { type: "boolean", description: "Print only the unified patch" },
|
|
6671
|
+
deliver: {
|
|
6672
|
+
type: "boolean",
|
|
6673
|
+
description: "Publish the export as a durable artifact for the requesting Agent (subject to policy)"
|
|
6674
|
+
},
|
|
6675
|
+
handoff: { type: "boolean", description: "Print only the handoff text" },
|
|
6676
|
+
json: { type: "boolean", description: "Emit the export as JSON" }
|
|
6677
|
+
},
|
|
6678
|
+
async run({ args: args2 }) {
|
|
6679
|
+
const client = createClient2();
|
|
6680
|
+
try {
|
|
6681
|
+
if (args2.deliver) {
|
|
6682
|
+
const { delivery } = await client.reviewPackets(args2.id).deliverExport(args2.packetId);
|
|
6683
|
+
if (delivery.kind === "delivered") {
|
|
6684
|
+
console.log(`delivered: ${delivery.resultName} (result ${delivery.resultId})`);
|
|
6685
|
+
console.log(
|
|
6686
|
+
delivery.noticeHeld ? "the requester\u2019s notice is held for approval; the artifact itself is available" : "the requester was told where to find it"
|
|
6687
|
+
);
|
|
6688
|
+
} else if (delivery.kind === "held") {
|
|
6689
|
+
console.log(`held for approval: ${delivery.detail}`);
|
|
6690
|
+
console.log(`result ${delivery.resultId} stays unreadable until it is released`);
|
|
6691
|
+
} else {
|
|
6692
|
+
console.log(`not delivered (${delivery.kind}): ${delivery.detail}`);
|
|
6693
|
+
}
|
|
6694
|
+
return;
|
|
6695
|
+
}
|
|
6696
|
+
const { export: result } = await client.reviewPackets(args2.id).export(args2.packetId);
|
|
6697
|
+
if (args2.json) {
|
|
6698
|
+
console.log(JSON.stringify(result, null, 2));
|
|
6699
|
+
return;
|
|
6700
|
+
}
|
|
6701
|
+
if (args2.patch || !args2.handoff)
|
|
6702
|
+
console.log(result.patch || "(no patch: see the handoff limitations)");
|
|
6703
|
+
if (!args2.patch) {
|
|
6704
|
+
if (!args2.handoff) console.log("");
|
|
6705
|
+
console.log(result.handoff);
|
|
6706
|
+
}
|
|
6707
|
+
if (!args2.patch && result.limitations.length > 0) {
|
|
6708
|
+
console.error(
|
|
6709
|
+
`
|
|
6710
|
+
handoff names ${result.limitations.length} limitation(s), and a conclusion is not acceptance`
|
|
6711
|
+
);
|
|
6712
|
+
}
|
|
6713
|
+
} catch (error) {
|
|
6714
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
6715
|
+
process.exit(1);
|
|
6716
|
+
}
|
|
6717
|
+
}
|
|
6718
|
+
});
|
|
6719
|
+
var teamReviewPacketCommand = defineCommand29({
|
|
6720
|
+
meta: {
|
|
6721
|
+
name: "packet",
|
|
6722
|
+
description: "Revision-bound review packets: captured revision, findings, conclusion and handoff"
|
|
6723
|
+
},
|
|
6724
|
+
subCommands: {
|
|
6725
|
+
create: createCmd3,
|
|
6726
|
+
list: listCmd10,
|
|
6727
|
+
show: showCmd5,
|
|
6728
|
+
finding: findingCmd,
|
|
6729
|
+
resolve: resolveCmd,
|
|
6730
|
+
conclude: concludeCmd,
|
|
6731
|
+
reported: reportedCmd,
|
|
6732
|
+
link: linkCmd,
|
|
6733
|
+
export: exportCmd,
|
|
6734
|
+
snapshots: snapshotCmd
|
|
6735
|
+
}
|
|
6736
|
+
});
|
|
6737
|
+
|
|
6738
|
+
// src/commands/team-review.ts
|
|
6739
|
+
var slug2 = {
|
|
6180
6740
|
id: { type: "positional", required: true, description: "Team slug" }
|
|
6181
6741
|
};
|
|
6182
6742
|
function printIssues(changes) {
|
|
6183
6743
|
for (const issue of changes.issues) console.log(`note: ${issue.code}: ${issue.message}`);
|
|
6184
6744
|
}
|
|
6185
|
-
var
|
|
6745
|
+
var showCmd6 = defineCommand30({
|
|
6186
6746
|
meta: {
|
|
6187
6747
|
name: "show",
|
|
6188
6748
|
description: "List changes since a baseline (read-only)"
|
|
6189
6749
|
},
|
|
6190
6750
|
args: {
|
|
6191
|
-
...
|
|
6751
|
+
...slug2,
|
|
6192
6752
|
base: {
|
|
6193
6753
|
type: "string",
|
|
6194
6754
|
description: "Comparison base: branch, tag or commit id (default HEAD)"
|
|
@@ -6247,13 +6807,13 @@ var showCmd5 = defineCommand29({
|
|
|
6247
6807
|
printIssues(changes);
|
|
6248
6808
|
}
|
|
6249
6809
|
});
|
|
6250
|
-
var captureCmd =
|
|
6810
|
+
var captureCmd = defineCommand30({
|
|
6251
6811
|
meta: {
|
|
6252
6812
|
name: "capture",
|
|
6253
6813
|
description: "Capture a bounded source snapshot for a Team (read-only)"
|
|
6254
6814
|
},
|
|
6255
6815
|
args: {
|
|
6256
|
-
...
|
|
6816
|
+
...slug2,
|
|
6257
6817
|
base: { type: "string", description: "Comparison base (default HEAD)" },
|
|
6258
6818
|
include: {
|
|
6259
6819
|
type: "string",
|
|
@@ -6290,9 +6850,9 @@ var captureCmd = defineCommand29({
|
|
|
6290
6850
|
for (const issue of snapshot.issues) console.log(` note: ${issue.code}: ${issue.message}`);
|
|
6291
6851
|
}
|
|
6292
6852
|
});
|
|
6293
|
-
var snapshotsCmd =
|
|
6853
|
+
var snapshotsCmd = defineCommand30({
|
|
6294
6854
|
meta: { name: "snapshots", description: "List retained source snapshots for a Team" },
|
|
6295
|
-
args: { ...
|
|
6855
|
+
args: { ...slug2, json: { type: "boolean", description: "Emit JSON" } },
|
|
6296
6856
|
async run({ args: args2 }) {
|
|
6297
6857
|
const client = createClient2();
|
|
6298
6858
|
const list8 = await client.repositoryReview(args2.id).snapshots();
|
|
@@ -6314,10 +6874,10 @@ var snapshotsCmd = defineCommand29({
|
|
|
6314
6874
|
for (const line of columnize(rows)) console.log(line);
|
|
6315
6875
|
}
|
|
6316
6876
|
});
|
|
6317
|
-
var
|
|
6877
|
+
var snapshotCmd2 = defineCommand30({
|
|
6318
6878
|
meta: { name: "snapshot", description: "Show one retained source snapshot" },
|
|
6319
6879
|
args: {
|
|
6320
|
-
...
|
|
6880
|
+
...slug2,
|
|
6321
6881
|
snapshot: { type: "positional", required: true, description: "Snapshot id" },
|
|
6322
6882
|
json: { type: "boolean", description: "Emit JSON" }
|
|
6323
6883
|
},
|
|
@@ -6340,21 +6900,240 @@ var snapshotCmd = defineCommand29({
|
|
|
6340
6900
|
for (const line of columnize(rows)) console.log(line);
|
|
6341
6901
|
}
|
|
6342
6902
|
});
|
|
6343
|
-
var teamReviewCommand =
|
|
6903
|
+
var teamReviewCommand = defineCommand30({
|
|
6344
6904
|
meta: {
|
|
6345
6905
|
name: "review",
|
|
6346
6906
|
description: "Read-only Git change review and bounded source snapshots"
|
|
6347
6907
|
},
|
|
6348
6908
|
subCommands: {
|
|
6349
|
-
show:
|
|
6909
|
+
show: showCmd6,
|
|
6350
6910
|
capture: captureCmd,
|
|
6351
6911
|
snapshots: snapshotsCmd,
|
|
6352
|
-
snapshot:
|
|
6912
|
+
snapshot: snapshotCmd2,
|
|
6913
|
+
packet: teamReviewPacketCommand
|
|
6914
|
+
}
|
|
6915
|
+
});
|
|
6916
|
+
|
|
6917
|
+
// src/commands/team-verify.ts
|
|
6918
|
+
import { defineCommand as defineCommand31 } from "citty";
|
|
6919
|
+
var slug3 = {
|
|
6920
|
+
id: { type: "positional", required: true, description: "Team slug" }
|
|
6921
|
+
};
|
|
6922
|
+
var OUTCOME_GLYPH = {
|
|
6923
|
+
not_executed: "not run",
|
|
6924
|
+
succeeded: "ok",
|
|
6925
|
+
failed: "FAIL",
|
|
6926
|
+
skipped: "skipped",
|
|
6927
|
+
blocked: "blocked",
|
|
6928
|
+
timed_out: "timeout",
|
|
6929
|
+
cancelled: "cancelled",
|
|
6930
|
+
unknown: "unknown"
|
|
6931
|
+
};
|
|
6932
|
+
function latestAttempt(report) {
|
|
6933
|
+
return [...report.attempts].sort((a, b) => b.attemptNumber - a.attemptNumber)[0];
|
|
6934
|
+
}
|
|
6935
|
+
function printReport2(report) {
|
|
6936
|
+
const { request } = report;
|
|
6937
|
+
const requester = request.requester.kind === "agent" ? `agent ${request.requester.agentId}` : "operator";
|
|
6938
|
+
console.log(`${request.id} ${request.state}`);
|
|
6939
|
+
console.log(
|
|
6940
|
+
` change: snapshot ${request.snapshot.id} (base ${request.snapshot.baseOid.slice(0, 12)}${request.snapshot.complete ? "" : ", INCOMPLETE COVERAGE"})`
|
|
6941
|
+
);
|
|
6942
|
+
console.log(` specialist: ${request.recipientAgentId} requested by: ${requester}`);
|
|
6943
|
+
console.log(` environment: ${request.environment.image} (shell ${request.environment.sandbox})`);
|
|
6944
|
+
console.log(
|
|
6945
|
+
` applicability: ${report.applicability.comparison === "identical" ? "unchanged since capture" : `${report.applicability.comparison} (never a pass)`}`
|
|
6946
|
+
);
|
|
6947
|
+
if (request.summary) console.log(` requested: ${request.summary}`);
|
|
6948
|
+
const attempt = latestAttempt(report);
|
|
6949
|
+
const outcomes = new Map((attempt?.outcomes ?? []).map((outcome) => [outcome.ordinal, outcome]));
|
|
6950
|
+
console.log(" checks:");
|
|
6951
|
+
for (const check of report.checks) {
|
|
6952
|
+
const outcome = outcomes.get(check.ordinal);
|
|
6953
|
+
const state = outcome?.state ?? "not_executed";
|
|
6954
|
+
const receipt = outcome?.commandId ? ` receipt ${outcome.commandId}` : outcome?.receiptUnavailable ? " receipt no longer available" : "";
|
|
6955
|
+
const exit = outcome?.exitCode === null || outcome?.exitCode === void 0 ? "" : ` exit ${outcome.exitCode}`;
|
|
6956
|
+
console.log(
|
|
6957
|
+
` [${check.ordinal}] ${OUTCOME_GLYPH[state]}${exit}${receipt} ${check.command} (${check.purpose})`
|
|
6958
|
+
);
|
|
6959
|
+
}
|
|
6960
|
+
const writes = attempt?.observedWrites;
|
|
6961
|
+
if (writes?.undeclaredPaths.length) {
|
|
6962
|
+
const declared = writes.declaredPaths.length ? writes.declaredPaths.join(", ") : "none declared";
|
|
6963
|
+
console.log(
|
|
6964
|
+
` wrote outside the declared output paths (${declared}): ${writes.undeclaredPaths.join(", ")}${writes.truncated ? " \u2026" : ""}`
|
|
6965
|
+
);
|
|
6966
|
+
} else if (writes?.comparison === "unknown") {
|
|
6967
|
+
console.log(
|
|
6968
|
+
" writes: could not be established (the tree could not be compared to the capture)"
|
|
6969
|
+
);
|
|
6970
|
+
}
|
|
6971
|
+
if (attempt?.error) console.log(` note: ${attempt.error}`);
|
|
6972
|
+
if (!attempt) console.log(" note: no attempt has run yet");
|
|
6973
|
+
}
|
|
6974
|
+
var createCmd4 = defineCommand31({
|
|
6975
|
+
meta: {
|
|
6976
|
+
name: "create",
|
|
6977
|
+
description: "Capture a verification request against a snapshot (does not run checks)"
|
|
6978
|
+
},
|
|
6979
|
+
args: {
|
|
6980
|
+
...slug3,
|
|
6981
|
+
agent: { type: "string", required: true, description: "Team member who will verify" },
|
|
6982
|
+
snapshot: { type: "string", required: true, description: "BAZ-042 snapshot id to verify" },
|
|
6983
|
+
check: {
|
|
6984
|
+
type: "string",
|
|
6985
|
+
required: true,
|
|
6986
|
+
description: 'A check as "<command> :: <purpose> [:: <cwd>] [:: <timeoutSeconds>]". Repeat up to eight times.'
|
|
6987
|
+
},
|
|
6988
|
+
summary: { type: "string", description: "Optional acceptance summary for the specialist" },
|
|
6989
|
+
writable: {
|
|
6990
|
+
type: "string",
|
|
6991
|
+
description: "Declared writable output path for checks. Repeat for each path."
|
|
6992
|
+
},
|
|
6993
|
+
json: { type: "boolean", description: "Emit the request as JSON" }
|
|
6994
|
+
},
|
|
6995
|
+
async run({ args: args2 }) {
|
|
6996
|
+
const raw = collectFlagValues(process.argv, "check");
|
|
6997
|
+
if (raw.length === 0) {
|
|
6998
|
+
console.error("at least one --check is required");
|
|
6999
|
+
process.exit(1);
|
|
7000
|
+
}
|
|
7001
|
+
const checks = raw.map((value) => {
|
|
7002
|
+
const [command, purpose, cwd, timeoutSeconds] = value.split("::").map((part) => part.trim());
|
|
7003
|
+
if (!command || !purpose) {
|
|
7004
|
+
console.error(`a check needs a command and a purpose: ${value}`);
|
|
7005
|
+
process.exit(1);
|
|
7006
|
+
}
|
|
7007
|
+
const seconds = timeoutSeconds ? Number(timeoutSeconds) : 120;
|
|
7008
|
+
if (!Number.isFinite(seconds) || seconds < 1 || seconds > 300) {
|
|
7009
|
+
console.error(`a check timeout must be 1-300 seconds: ${value}`);
|
|
7010
|
+
process.exit(1);
|
|
7011
|
+
}
|
|
7012
|
+
return {
|
|
7013
|
+
command,
|
|
7014
|
+
purpose,
|
|
7015
|
+
cwd: cwd || ".",
|
|
7016
|
+
timeoutMs: Math.round(seconds * 1e3)
|
|
7017
|
+
};
|
|
7018
|
+
});
|
|
7019
|
+
const writablePaths = collectFlagValues(process.argv, "writable");
|
|
7020
|
+
const client = createClient2();
|
|
7021
|
+
try {
|
|
7022
|
+
const response = await client.verifications(args2.id).create({
|
|
7023
|
+
recipientAgentId: args2.agent,
|
|
7024
|
+
snapshotId: args2.snapshot,
|
|
7025
|
+
checks,
|
|
7026
|
+
summary: args2.summary ?? null,
|
|
7027
|
+
...writablePaths.length > 0 ? { writablePaths } : {}
|
|
7028
|
+
});
|
|
7029
|
+
if ("blocked" in response) {
|
|
7030
|
+
console.error(`blocked (${response.blocked.reason}): ${response.blocked.detail}`);
|
|
7031
|
+
process.exit(1);
|
|
7032
|
+
}
|
|
7033
|
+
if (args2.json) {
|
|
7034
|
+
console.log(JSON.stringify(response.request, null, 2));
|
|
7035
|
+
return;
|
|
7036
|
+
}
|
|
7037
|
+
console.log(
|
|
7038
|
+
`captured ${response.request.request.id} (state ${response.request.request.state})`
|
|
7039
|
+
);
|
|
7040
|
+
console.log("the specialist is admitted by the verification scheduler; nothing has run yet");
|
|
7041
|
+
} catch (error) {
|
|
7042
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
7043
|
+
process.exit(1);
|
|
7044
|
+
}
|
|
7045
|
+
}
|
|
7046
|
+
});
|
|
7047
|
+
var listCmd11 = defineCommand31({
|
|
7048
|
+
meta: { name: "list", description: "List verification requests for a Team" },
|
|
7049
|
+
args: {
|
|
7050
|
+
...slug3,
|
|
7051
|
+
json: { type: "boolean", description: "Emit JSON" }
|
|
7052
|
+
},
|
|
7053
|
+
async run({ args: args2 }) {
|
|
7054
|
+
const client = createClient2();
|
|
7055
|
+
const response = await client.verifications(args2.id).list();
|
|
7056
|
+
if (args2.json) {
|
|
7057
|
+
console.log(JSON.stringify(response, null, 2));
|
|
7058
|
+
return;
|
|
7059
|
+
}
|
|
7060
|
+
if (response.requests.length === 0) {
|
|
7061
|
+
console.log("no verification requests");
|
|
7062
|
+
return;
|
|
7063
|
+
}
|
|
7064
|
+
const rows = [
|
|
7065
|
+
["ID", "STATE", "SPECIALIST", "CHANGE"],
|
|
7066
|
+
...response.requests.map((entry3) => [
|
|
7067
|
+
entry3.request.id,
|
|
7068
|
+
entry3.request.state,
|
|
7069
|
+
entry3.request.recipientAgentId,
|
|
7070
|
+
entry3.request.snapshot.id.slice(0, 12)
|
|
7071
|
+
])
|
|
7072
|
+
];
|
|
7073
|
+
for (const line of columnize(rows)) console.log(line);
|
|
7074
|
+
console.log("run `bazilion team verify show <slug> <id>` for a request's current applicability");
|
|
7075
|
+
}
|
|
7076
|
+
});
|
|
7077
|
+
var showCmd7 = defineCommand31({
|
|
7078
|
+
meta: { name: "show", description: "Show one verification request and its evidence" },
|
|
7079
|
+
args: {
|
|
7080
|
+
...slug3,
|
|
7081
|
+
requestId: { type: "positional", required: true, description: "Verification request id" },
|
|
7082
|
+
json: { type: "boolean", description: "Emit JSON" }
|
|
7083
|
+
},
|
|
7084
|
+
async run({ args: args2 }) {
|
|
7085
|
+
const client = createClient2();
|
|
7086
|
+
try {
|
|
7087
|
+
const response = await client.verifications(args2.id).show(args2.requestId);
|
|
7088
|
+
if (args2.json) {
|
|
7089
|
+
console.log(JSON.stringify(response, null, 2));
|
|
7090
|
+
return;
|
|
7091
|
+
}
|
|
7092
|
+
printReport2(response.request);
|
|
7093
|
+
} catch (error) {
|
|
7094
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
7095
|
+
process.exit(1);
|
|
7096
|
+
}
|
|
7097
|
+
}
|
|
7098
|
+
});
|
|
7099
|
+
var cancelCmd2 = defineCommand31({
|
|
7100
|
+
meta: { name: "cancel", description: "Cancel a pending or running verification request" },
|
|
7101
|
+
args: {
|
|
7102
|
+
...slug3,
|
|
7103
|
+
requestId: { type: "positional", required: true, description: "Verification request id" },
|
|
7104
|
+
json: { type: "boolean", description: "Emit JSON" }
|
|
7105
|
+
},
|
|
7106
|
+
async run({ args: args2 }) {
|
|
7107
|
+
const client = createClient2();
|
|
7108
|
+
try {
|
|
7109
|
+
const response = await client.verifications(args2.id).cancel(args2.requestId);
|
|
7110
|
+
if (args2.json) {
|
|
7111
|
+
console.log(JSON.stringify(response, null, 2));
|
|
7112
|
+
return;
|
|
7113
|
+
}
|
|
7114
|
+
console.log(`cancelled or cancelled-pending: ${response.request.request.id}`);
|
|
7115
|
+
printReport2(response.request);
|
|
7116
|
+
} catch (error) {
|
|
7117
|
+
console.error(error instanceof Error ? error.message : String(error));
|
|
7118
|
+
process.exit(1);
|
|
7119
|
+
}
|
|
7120
|
+
}
|
|
7121
|
+
});
|
|
7122
|
+
var verifyCommand = defineCommand31({
|
|
7123
|
+
meta: {
|
|
7124
|
+
name: "verify",
|
|
7125
|
+
description: "Specialist verification of a captured code change (BAZ-044)"
|
|
7126
|
+
},
|
|
7127
|
+
subCommands: {
|
|
7128
|
+
create: createCmd4,
|
|
7129
|
+
list: listCmd11,
|
|
7130
|
+
show: showCmd7,
|
|
7131
|
+
cancel: cancelCmd2
|
|
6353
7132
|
}
|
|
6354
7133
|
});
|
|
6355
7134
|
|
|
6356
7135
|
// src/commands/team.ts
|
|
6357
|
-
var addCmd2 =
|
|
7136
|
+
var addCmd2 = defineCommand32({
|
|
6358
7137
|
meta: {
|
|
6359
7138
|
name: "add",
|
|
6360
7139
|
description: "Register a team at ~/.bazilion/teams/<slug>/ (use --link to point at an existing tree)"
|
|
@@ -6378,7 +7157,7 @@ var addCmd2 = defineCommand30({
|
|
|
6378
7157
|
console.log(`registered team ${g.id} at ${g.path}`);
|
|
6379
7158
|
}
|
|
6380
7159
|
});
|
|
6381
|
-
var
|
|
7160
|
+
var listCmd12 = defineCommand32({
|
|
6382
7161
|
meta: { name: "list", description: "List teams" },
|
|
6383
7162
|
async run() {
|
|
6384
7163
|
const client = createClient2();
|
|
@@ -6391,7 +7170,7 @@ var listCmd10 = defineCommand30({
|
|
|
6391
7170
|
for (const line of columnize(rows)) console.log(line);
|
|
6392
7171
|
}
|
|
6393
7172
|
});
|
|
6394
|
-
var rmCmd5 =
|
|
7173
|
+
var rmCmd5 = defineCommand32({
|
|
6395
7174
|
meta: { name: "rm", description: "Remove a team registration" },
|
|
6396
7175
|
args: {
|
|
6397
7176
|
id: { type: "positional", required: true }
|
|
@@ -6412,7 +7191,7 @@ async function readStdin() {
|
|
|
6412
7191
|
for await (const chunk of stdin2) chunks.push(chunk);
|
|
6413
7192
|
return Buffer.concat(chunks).toString("utf8");
|
|
6414
7193
|
}
|
|
6415
|
-
var userMdShowCmd =
|
|
7194
|
+
var userMdShowCmd = defineCommand32({
|
|
6416
7195
|
meta: { name: "show", description: "Print the team's USER.md" },
|
|
6417
7196
|
args: { id: { type: "positional", required: true } },
|
|
6418
7197
|
async run({ args: args2 }) {
|
|
@@ -6422,7 +7201,7 @@ var userMdShowCmd = defineCommand30({
|
|
|
6422
7201
|
if (g.userMd && !g.userMd.endsWith("\n")) process.stdout.write("\n");
|
|
6423
7202
|
}
|
|
6424
7203
|
});
|
|
6425
|
-
var userMdSetCmd =
|
|
7204
|
+
var userMdSetCmd = defineCommand32({
|
|
6426
7205
|
meta: {
|
|
6427
7206
|
name: "set",
|
|
6428
7207
|
description: "Replace the team's USER.md (from --file, --from-stdin, or inline text)"
|
|
@@ -6448,7 +7227,7 @@ var userMdSetCmd = defineCommand30({
|
|
|
6448
7227
|
console.log(`updated USER.md for team ${args2.id} (${content.length} bytes)`);
|
|
6449
7228
|
}
|
|
6450
7229
|
});
|
|
6451
|
-
var userMdClearCmd =
|
|
7230
|
+
var userMdClearCmd = defineCommand32({
|
|
6452
7231
|
meta: { name: "clear", description: "Clear the team's USER.md to empty" },
|
|
6453
7232
|
args: { id: { type: "positional", required: true } },
|
|
6454
7233
|
async run({ args: args2 }) {
|
|
@@ -6458,7 +7237,7 @@ var userMdClearCmd = defineCommand30({
|
|
|
6458
7237
|
console.log(`cleared USER.md for team ${args2.id}`);
|
|
6459
7238
|
}
|
|
6460
7239
|
});
|
|
6461
|
-
var userMdCmd =
|
|
7240
|
+
var userMdCmd = defineCommand32({
|
|
6462
7241
|
meta: { name: "user-md", description: "View or edit a team's USER.md" },
|
|
6463
7242
|
subCommands: {
|
|
6464
7243
|
show: userMdShowCmd,
|
|
@@ -6466,7 +7245,7 @@ var userMdCmd = defineCommand30({
|
|
|
6466
7245
|
clear: userMdClearCmd
|
|
6467
7246
|
}
|
|
6468
7247
|
});
|
|
6469
|
-
var topicFormatShowCmd =
|
|
7248
|
+
var topicFormatShowCmd = defineCommand32({
|
|
6470
7249
|
meta: { name: "show", description: "Print the team's Telegram topic-name template" },
|
|
6471
7250
|
args: { id: { type: "positional", required: true } },
|
|
6472
7251
|
async run({ args: args2 }) {
|
|
@@ -6475,7 +7254,7 @@ var topicFormatShowCmd = defineCommand30({
|
|
|
6475
7254
|
console.log(g.telegramTopicNameFormat ?? "(default naming)");
|
|
6476
7255
|
}
|
|
6477
7256
|
});
|
|
6478
|
-
var topicFormatSetCmd =
|
|
7257
|
+
var topicFormatSetCmd = defineCommand32({
|
|
6479
7258
|
meta: {
|
|
6480
7259
|
name: "set",
|
|
6481
7260
|
description: "Set the topic-name template. Tokens: {agent.name} {team.name} {team.slug} (must include {agent.name})"
|
|
@@ -6495,7 +7274,7 @@ var topicFormatSetCmd = defineCommand30({
|
|
|
6495
7274
|
console.log(`set topic-name template for team ${args2.id}: ${g.telegramTopicNameFormat}`);
|
|
6496
7275
|
}
|
|
6497
7276
|
});
|
|
6498
|
-
var topicFormatClearCmd =
|
|
7277
|
+
var topicFormatClearCmd = defineCommand32({
|
|
6499
7278
|
meta: { name: "clear", description: "Clear the template (revert to built-in naming)" },
|
|
6500
7279
|
args: { id: { type: "positional", required: true } },
|
|
6501
7280
|
async run({ args: args2 }) {
|
|
@@ -6505,7 +7284,7 @@ var topicFormatClearCmd = defineCommand30({
|
|
|
6505
7284
|
console.log(`cleared topic-name template for team ${args2.id}`);
|
|
6506
7285
|
}
|
|
6507
7286
|
});
|
|
6508
|
-
var topicFormatCmd =
|
|
7287
|
+
var topicFormatCmd = defineCommand32({
|
|
6509
7288
|
meta: {
|
|
6510
7289
|
name: "topic-format",
|
|
6511
7290
|
description: "View or edit a team's Telegram forum-topic name template"
|
|
@@ -6516,7 +7295,7 @@ var topicFormatCmd = defineCommand30({
|
|
|
6516
7295
|
clear: topicFormatClearCmd
|
|
6517
7296
|
}
|
|
6518
7297
|
});
|
|
6519
|
-
var contextCmd =
|
|
7298
|
+
var contextCmd = defineCommand32({
|
|
6520
7299
|
meta: {
|
|
6521
7300
|
name: "context",
|
|
6522
7301
|
description: "Inspect repository instructions, Git state and command suggestions"
|
|
@@ -6563,15 +7342,16 @@ var contextCmd = defineCommand30({
|
|
|
6563
7342
|
console.log(` ${issue.code}${issue.path ? `: ${safe2(issue.path)}` : ""} \u2014 ${issue.message}`);
|
|
6564
7343
|
}
|
|
6565
7344
|
});
|
|
6566
|
-
var teamCommand =
|
|
7345
|
+
var teamCommand = defineCommand32({
|
|
6567
7346
|
meta: { name: "team", description: "Manage teams (collaboration contexts)" },
|
|
6568
7347
|
subCommands: {
|
|
6569
7348
|
environment: teamEnvironmentCommand,
|
|
6570
7349
|
log: teamCodingLogCommand,
|
|
6571
7350
|
review: teamReviewCommand,
|
|
7351
|
+
verify: verifyCommand,
|
|
6572
7352
|
context: contextCmd,
|
|
6573
7353
|
add: addCmd2,
|
|
6574
|
-
list:
|
|
7354
|
+
list: listCmd12,
|
|
6575
7355
|
rm: rmCmd5,
|
|
6576
7356
|
"user-md": userMdCmd,
|
|
6577
7357
|
"topic-format": topicFormatCmd,
|
|
@@ -6581,7 +7361,7 @@ var teamCommand = defineCommand30({
|
|
|
6581
7361
|
|
|
6582
7362
|
// src/commands/team-template.ts
|
|
6583
7363
|
import { readFileSync as readFileSync12 } from "fs";
|
|
6584
|
-
import { defineCommand as
|
|
7364
|
+
import { defineCommand as defineCommand33 } from "citty";
|
|
6585
7365
|
function jsonFile(path) {
|
|
6586
7366
|
try {
|
|
6587
7367
|
return JSON.parse(readFileSync12(path, "utf8"));
|
|
@@ -6609,7 +7389,7 @@ function printTeam(detail) {
|
|
|
6609
7389
|
console.log(line);
|
|
6610
7390
|
}
|
|
6611
7391
|
}
|
|
6612
|
-
var list7 =
|
|
7392
|
+
var list7 = defineCommand33({
|
|
6613
7393
|
meta: { name: "list", description: "List canonical Team templates" },
|
|
6614
7394
|
args: { json: { type: "boolean", description: "Emit stable JSON" } },
|
|
6615
7395
|
async run({ args: args2 }) {
|
|
@@ -6623,7 +7403,7 @@ var list7 = defineCommand31({
|
|
|
6623
7403
|
console.log(line);
|
|
6624
7404
|
}
|
|
6625
7405
|
});
|
|
6626
|
-
var show6 =
|
|
7406
|
+
var show6 = defineCommand33({
|
|
6627
7407
|
meta: { name: "show", description: "Show a canonical Team template" },
|
|
6628
7408
|
args: {
|
|
6629
7409
|
id: { type: "positional", required: true },
|
|
@@ -6637,7 +7417,7 @@ var show6 = defineCommand31({
|
|
|
6637
7417
|
else printTeam(detail);
|
|
6638
7418
|
}
|
|
6639
7419
|
});
|
|
6640
|
-
var exportCommand2 =
|
|
7420
|
+
var exportCommand2 = defineCommand33({
|
|
6641
7421
|
meta: {
|
|
6642
7422
|
name: "export",
|
|
6643
7423
|
description: "Export a portable versioned Team-template document to stdout"
|
|
@@ -6677,7 +7457,7 @@ function printImportDiff(current, document) {
|
|
|
6677
7457
|
for (const value of diff2.added) console.log(` + ${value}`);
|
|
6678
7458
|
for (const value of diff2.removed) console.log(` - ${value}`);
|
|
6679
7459
|
}
|
|
6680
|
-
var importCommand2 =
|
|
7460
|
+
var importCommand2 = defineCommand33({
|
|
6681
7461
|
meta: {
|
|
6682
7462
|
name: "import",
|
|
6683
7463
|
description: "Validate, diff, and explicitly apply a portable Team-template document"
|
|
@@ -6758,7 +7538,7 @@ var importCommand2 = defineCommand31({
|
|
|
6758
7538
|
);
|
|
6759
7539
|
}
|
|
6760
7540
|
});
|
|
6761
|
-
var teamTemplateCommand =
|
|
7541
|
+
var teamTemplateCommand = defineCommand33({
|
|
6762
7542
|
meta: {
|
|
6763
7543
|
name: "team-template",
|
|
6764
7544
|
description: "Inspect and exchange canonical Team templates"
|
|
@@ -6767,8 +7547,8 @@ var teamTemplateCommand = defineCommand31({
|
|
|
6767
7547
|
});
|
|
6768
7548
|
|
|
6769
7549
|
// src/commands/telegram.ts
|
|
6770
|
-
import { defineCommand as
|
|
6771
|
-
var setCmd2 =
|
|
7550
|
+
import { defineCommand as defineCommand34 } from "citty";
|
|
7551
|
+
var setCmd2 = defineCommand34({
|
|
6772
7552
|
meta: {
|
|
6773
7553
|
name: "set",
|
|
6774
7554
|
description: "Save bot token + supergroup chat ID (paired write)"
|
|
@@ -6786,7 +7566,7 @@ var setCmd2 = defineCommand32({
|
|
|
6786
7566
|
console.log(`saved \xB7 token ${state.botTokenPreview} \xB7 chat ${state.chatId}`);
|
|
6787
7567
|
}
|
|
6788
7568
|
});
|
|
6789
|
-
var clearCmd =
|
|
7569
|
+
var clearCmd = defineCommand34({
|
|
6790
7570
|
meta: {
|
|
6791
7571
|
name: "clear",
|
|
6792
7572
|
description: "Remove stored bot token + chat ID"
|
|
@@ -6797,7 +7577,7 @@ var clearCmd = defineCommand32({
|
|
|
6797
7577
|
console.log("cleared");
|
|
6798
7578
|
}
|
|
6799
7579
|
});
|
|
6800
|
-
var
|
|
7580
|
+
var showCmd8 = defineCommand34({
|
|
6801
7581
|
meta: {
|
|
6802
7582
|
name: "show",
|
|
6803
7583
|
description: "Show what credentials are stored (token is masked)"
|
|
@@ -6818,7 +7598,7 @@ var showCmd6 = defineCommand32({
|
|
|
6818
7598
|
}
|
|
6819
7599
|
}
|
|
6820
7600
|
});
|
|
6821
|
-
var reconnectCmd =
|
|
7601
|
+
var reconnectCmd = defineCommand34({
|
|
6822
7602
|
meta: {
|
|
6823
7603
|
name: "reconnect",
|
|
6824
7604
|
description: "Apply a pending supergroup chat-id migration + re-activate the bot"
|
|
@@ -6829,7 +7609,7 @@ var reconnectCmd = defineCommand32({
|
|
|
6829
7609
|
console.log(`reconnected \xB7 chat ${state.chatId}`);
|
|
6830
7610
|
}
|
|
6831
7611
|
});
|
|
6832
|
-
var configCmd =
|
|
7612
|
+
var configCmd = defineCommand34({
|
|
6833
7613
|
meta: {
|
|
6834
7614
|
name: "config",
|
|
6835
7615
|
description: "Manage Telegram credentials (bot token + chat ID)"
|
|
@@ -6837,10 +7617,10 @@ var configCmd = defineCommand32({
|
|
|
6837
7617
|
subCommands: {
|
|
6838
7618
|
set: setCmd2,
|
|
6839
7619
|
clear: clearCmd,
|
|
6840
|
-
show:
|
|
7620
|
+
show: showCmd8
|
|
6841
7621
|
}
|
|
6842
7622
|
});
|
|
6843
|
-
var healthCmd =
|
|
7623
|
+
var healthCmd = defineCommand34({
|
|
6844
7624
|
meta: {
|
|
6845
7625
|
name: "health",
|
|
6846
7626
|
description: "Run the four-step preflight against the Telegram Bot API"
|
|
@@ -6879,7 +7659,7 @@ var healthCmd = defineCommand32({
|
|
|
6879
7659
|
if (!allOk) process.exitCode = 1;
|
|
6880
7660
|
}
|
|
6881
7661
|
});
|
|
6882
|
-
var botStatusCmd =
|
|
7662
|
+
var botStatusCmd = defineCommand34({
|
|
6883
7663
|
meta: {
|
|
6884
7664
|
name: "status",
|
|
6885
7665
|
description: "Show polling state of the live bot"
|
|
@@ -6904,7 +7684,7 @@ var botStatusCmd = defineCommand32({
|
|
|
6904
7684
|
if (!p.running) process.exitCode = 1;
|
|
6905
7685
|
}
|
|
6906
7686
|
});
|
|
6907
|
-
var botRestartCmd =
|
|
7687
|
+
var botRestartCmd = defineCommand34({
|
|
6908
7688
|
meta: {
|
|
6909
7689
|
name: "restart",
|
|
6910
7690
|
description: "Force-restart the bot (tears down + brings up from current creds)"
|
|
@@ -6915,7 +7695,7 @@ var botRestartCmd = defineCommand32({
|
|
|
6915
7695
|
console.log("restart requested");
|
|
6916
7696
|
}
|
|
6917
7697
|
});
|
|
6918
|
-
var botCmd =
|
|
7698
|
+
var botCmd = defineCommand34({
|
|
6919
7699
|
meta: {
|
|
6920
7700
|
name: "bot",
|
|
6921
7701
|
description: "Inspect / control the live polling bot"
|
|
@@ -6925,7 +7705,7 @@ var botCmd = defineCommand32({
|
|
|
6925
7705
|
restart: botRestartCmd
|
|
6926
7706
|
}
|
|
6927
7707
|
});
|
|
6928
|
-
var bindCmd =
|
|
7708
|
+
var bindCmd = defineCommand34({
|
|
6929
7709
|
meta: {
|
|
6930
7710
|
name: "bind",
|
|
6931
7711
|
description: "Create a Telegram topic for an agent (manual fallback for /talk)"
|
|
@@ -6943,7 +7723,7 @@ var bindCmd = defineCommand32({
|
|
|
6943
7723
|
console.log(` ${result.deepLink}`);
|
|
6944
7724
|
}
|
|
6945
7725
|
});
|
|
6946
|
-
var unbindCmd =
|
|
7726
|
+
var unbindCmd = defineCommand34({
|
|
6947
7727
|
meta: {
|
|
6948
7728
|
name: "unbind",
|
|
6949
7729
|
description: "Clear an agent's Telegram topic binding (topic stays in Telegram as orphan)"
|
|
@@ -6957,7 +7737,7 @@ var unbindCmd = defineCommand32({
|
|
|
6957
7737
|
console.log(`unbound agent ${args2.agent}`);
|
|
6958
7738
|
}
|
|
6959
7739
|
});
|
|
6960
|
-
var listBindingsCmd =
|
|
7740
|
+
var listBindingsCmd = defineCommand34({
|
|
6961
7741
|
meta: {
|
|
6962
7742
|
name: "list",
|
|
6963
7743
|
description: "List agents and their Telegram topic bindings"
|
|
@@ -6985,7 +7765,7 @@ var listBindingsCmd = defineCommand32({
|
|
|
6985
7765
|
}
|
|
6986
7766
|
}
|
|
6987
7767
|
});
|
|
6988
|
-
var allowCmd =
|
|
7768
|
+
var allowCmd = defineCommand34({
|
|
6989
7769
|
meta: { name: "allow", description: "Add a Telegram user id to the allowlist" },
|
|
6990
7770
|
args: {
|
|
6991
7771
|
userId: { type: "positional", required: true, description: "Numeric Telegram user id" },
|
|
@@ -7001,7 +7781,7 @@ var allowCmd = defineCommand32({
|
|
|
7001
7781
|
console.log(`allowed ${u.userId} (${u.role})`);
|
|
7002
7782
|
}
|
|
7003
7783
|
});
|
|
7004
|
-
var denyCmd =
|
|
7784
|
+
var denyCmd = defineCommand34({
|
|
7005
7785
|
meta: { name: "deny", description: "Remove a Telegram user id from the allowlist" },
|
|
7006
7786
|
args: { userId: { type: "positional", required: true } },
|
|
7007
7787
|
async run({ args: args2 }) {
|
|
@@ -7010,7 +7790,7 @@ var denyCmd = defineCommand32({
|
|
|
7010
7790
|
console.log(`removed ${args2.userId}`);
|
|
7011
7791
|
}
|
|
7012
7792
|
});
|
|
7013
|
-
var allowedCmd =
|
|
7793
|
+
var allowedCmd = defineCommand34({
|
|
7014
7794
|
meta: { name: "allowed", description: "List allowlisted Telegram users" },
|
|
7015
7795
|
async run() {
|
|
7016
7796
|
const client = createClient2();
|
|
@@ -7025,7 +7805,7 @@ var allowedCmd = defineCommand32({
|
|
|
7025
7805
|
}
|
|
7026
7806
|
}
|
|
7027
7807
|
});
|
|
7028
|
-
var pairingCreateCmd =
|
|
7808
|
+
var pairingCreateCmd = defineCommand34({
|
|
7029
7809
|
meta: { name: "create", description: "Generate a one-time Telegram owner pairing code" },
|
|
7030
7810
|
async run() {
|
|
7031
7811
|
const result = await createClient2().post(
|
|
@@ -7036,7 +7816,7 @@ var pairingCreateCmd = defineCommand32({
|
|
|
7036
7816
|
console.log("send `/pair <code>` in the configured \u2699 bazilion service topic");
|
|
7037
7817
|
}
|
|
7038
7818
|
});
|
|
7039
|
-
var pairingStatusCmd =
|
|
7819
|
+
var pairingStatusCmd = defineCommand34({
|
|
7040
7820
|
meta: { name: "status", description: "Show Telegram owner pairing status" },
|
|
7041
7821
|
async run() {
|
|
7042
7822
|
const result = await createClient2().get("/api/config/telegram/pairing");
|
|
@@ -7047,14 +7827,14 @@ var pairingStatusCmd = defineCommand32({
|
|
|
7047
7827
|
console.log(`expires: ${new Date(result.challengeExpiresAt).toISOString()}`);
|
|
7048
7828
|
}
|
|
7049
7829
|
});
|
|
7050
|
-
var pairingCancelCmd =
|
|
7830
|
+
var pairingCancelCmd = defineCommand34({
|
|
7051
7831
|
meta: { name: "cancel", description: "Cancel the active Telegram pairing code" },
|
|
7052
7832
|
async run() {
|
|
7053
7833
|
await createClient2().del("/api/config/telegram/pairing/challenge");
|
|
7054
7834
|
console.log("pairing challenge cancelled");
|
|
7055
7835
|
}
|
|
7056
7836
|
});
|
|
7057
|
-
var pairingResetCmd =
|
|
7837
|
+
var pairingResetCmd = defineCommand34({
|
|
7058
7838
|
meta: { name: "reset", description: "Revoke the Telegram owner and require re-pairing" },
|
|
7059
7839
|
args: {
|
|
7060
7840
|
yes: { type: "boolean", description: "Confirm destructive owner reset", required: true }
|
|
@@ -7065,7 +7845,7 @@ var pairingResetCmd = defineCommand32({
|
|
|
7065
7845
|
console.log("Telegram owner reset; ingress is closed until re-paired");
|
|
7066
7846
|
}
|
|
7067
7847
|
});
|
|
7068
|
-
var pairingCmd =
|
|
7848
|
+
var pairingCmd = defineCommand34({
|
|
7069
7849
|
meta: { name: "pairing", description: "Manage single-owner Telegram pairing" },
|
|
7070
7850
|
subCommands: {
|
|
7071
7851
|
create: pairingCreateCmd,
|
|
@@ -7074,7 +7854,7 @@ var pairingCmd = defineCommand32({
|
|
|
7074
7854
|
reset: pairingResetCmd
|
|
7075
7855
|
}
|
|
7076
7856
|
});
|
|
7077
|
-
var telegramCommand =
|
|
7857
|
+
var telegramCommand = defineCommand34({
|
|
7078
7858
|
meta: {
|
|
7079
7859
|
name: "telegram",
|
|
7080
7860
|
description: "Telegram integration: credentials, health, bot lifecycle, bindings, access"
|
|
@@ -7095,7 +7875,7 @@ var telegramCommand = defineCommand32({
|
|
|
7095
7875
|
});
|
|
7096
7876
|
|
|
7097
7877
|
// src/commands/token.ts
|
|
7098
|
-
import { defineCommand as
|
|
7878
|
+
import { defineCommand as defineCommand35 } from "citty";
|
|
7099
7879
|
import qrcode from "qrcode-terminal";
|
|
7100
7880
|
function tokenRow(t) {
|
|
7101
7881
|
const last = t.lastUsedAt ? new Date(t.lastUsedAt).toISOString() : "(never)";
|
|
@@ -7124,7 +7904,7 @@ function resolveQrServer(override) {
|
|
|
7124
7904
|
}
|
|
7125
7905
|
return url.origin;
|
|
7126
7906
|
}
|
|
7127
|
-
var
|
|
7907
|
+
var createCmd5 = defineCommand35({
|
|
7128
7908
|
meta: { name: "create", description: "Mint a new web token (shown once)" },
|
|
7129
7909
|
args: {
|
|
7130
7910
|
label: { type: "positional", required: true, description: "Human-readable label" },
|
|
@@ -7167,7 +7947,7 @@ var createCmd3 = defineCommand33({
|
|
|
7167
7947
|
qrcode.generate(pairUrl, { small: true }, (qr) => console.log(qr));
|
|
7168
7948
|
}
|
|
7169
7949
|
});
|
|
7170
|
-
var
|
|
7950
|
+
var listCmd13 = defineCommand35({
|
|
7171
7951
|
meta: { name: "list", description: "List web tokens" },
|
|
7172
7952
|
args: {
|
|
7173
7953
|
all: { type: "boolean", description: "Include revoked tokens" }
|
|
@@ -7183,7 +7963,7 @@ var listCmd11 = defineCommand33({
|
|
|
7183
7963
|
for (const line of columnize(tokens.map(tokenRow))) console.log(line);
|
|
7184
7964
|
}
|
|
7185
7965
|
});
|
|
7186
|
-
var showLocalCmd =
|
|
7966
|
+
var showLocalCmd = defineCommand35({
|
|
7187
7967
|
meta: {
|
|
7188
7968
|
name: "show-local",
|
|
7189
7969
|
description: "Print the bootstrap web token stored in ~/.bazilion/auth.json"
|
|
@@ -7193,7 +7973,7 @@ var showLocalCmd = defineCommand33({
|
|
|
7193
7973
|
console.log(readAuthFile(paths.authFile).token);
|
|
7194
7974
|
}
|
|
7195
7975
|
});
|
|
7196
|
-
var revokeCmd2 =
|
|
7976
|
+
var revokeCmd2 = defineCommand35({
|
|
7197
7977
|
meta: { name: "revoke", description: "Revoke a web token" },
|
|
7198
7978
|
args: {
|
|
7199
7979
|
id: { type: "positional", required: true }
|
|
@@ -7204,19 +7984,19 @@ var revokeCmd2 = defineCommand33({
|
|
|
7204
7984
|
console.log(`revoked token ${args2.id}`);
|
|
7205
7985
|
}
|
|
7206
7986
|
});
|
|
7207
|
-
var tokenCommand =
|
|
7987
|
+
var tokenCommand = defineCommand35({
|
|
7208
7988
|
meta: { name: "token", description: "Manage web tokens for API/CLI clients" },
|
|
7209
7989
|
subCommands: {
|
|
7210
|
-
create:
|
|
7211
|
-
list:
|
|
7990
|
+
create: createCmd5,
|
|
7991
|
+
list: listCmd13,
|
|
7212
7992
|
revoke: revokeCmd2,
|
|
7213
7993
|
"show-local": showLocalCmd
|
|
7214
7994
|
}
|
|
7215
7995
|
});
|
|
7216
7996
|
|
|
7217
7997
|
// src/commands/trigger.ts
|
|
7218
|
-
import { defineCommand as
|
|
7219
|
-
var addCmd3 =
|
|
7998
|
+
import { defineCommand as defineCommand36 } from "citty";
|
|
7999
|
+
var addCmd3 = defineCommand36({
|
|
7220
8000
|
meta: { name: "add", description: "Add an interval / cron trigger to an agent" },
|
|
7221
8001
|
args: {
|
|
7222
8002
|
agent: { type: "positional", required: true },
|
|
@@ -7264,7 +8044,7 @@ function triggerRow(t) {
|
|
|
7264
8044
|
const msgPreview = t.message.length > 60 ? `${t.message.slice(0, 60)}\u2026` : t.message;
|
|
7265
8045
|
return [t.id, state, spec, `last: ${last}`, `"${msgPreview}"`];
|
|
7266
8046
|
}
|
|
7267
|
-
var
|
|
8047
|
+
var listCmd14 = defineCommand36({
|
|
7268
8048
|
meta: { name: "list", description: "List triggers for an agent" },
|
|
7269
8049
|
args: {
|
|
7270
8050
|
agent: { type: "positional", required: true }
|
|
@@ -7281,7 +8061,7 @@ var listCmd12 = defineCommand34({
|
|
|
7281
8061
|
for (const line of columnize(triggers.map(triggerRow))) console.log(line);
|
|
7282
8062
|
}
|
|
7283
8063
|
});
|
|
7284
|
-
var rmCmd6 =
|
|
8064
|
+
var rmCmd6 = defineCommand36({
|
|
7285
8065
|
meta: { name: "rm", description: "Delete a trigger" },
|
|
7286
8066
|
args: {
|
|
7287
8067
|
id: { type: "positional", required: true }
|
|
@@ -7292,7 +8072,7 @@ var rmCmd6 = defineCommand34({
|
|
|
7292
8072
|
console.log(`removed trigger ${args2.id}`);
|
|
7293
8073
|
}
|
|
7294
8074
|
});
|
|
7295
|
-
var enableCmd3 =
|
|
8075
|
+
var enableCmd3 = defineCommand36({
|
|
7296
8076
|
meta: { name: "enable", description: "Enable a trigger" },
|
|
7297
8077
|
args: {
|
|
7298
8078
|
id: { type: "positional", required: true }
|
|
@@ -7304,7 +8084,7 @@ var enableCmd3 = defineCommand34({
|
|
|
7304
8084
|
console.log(`enabled trigger ${args2.id}`);
|
|
7305
8085
|
}
|
|
7306
8086
|
});
|
|
7307
|
-
var disableCmd3 =
|
|
8087
|
+
var disableCmd3 = defineCommand36({
|
|
7308
8088
|
meta: { name: "disable", description: "Disable a trigger" },
|
|
7309
8089
|
args: {
|
|
7310
8090
|
id: { type: "positional", required: true }
|
|
@@ -7316,7 +8096,7 @@ var disableCmd3 = defineCommand34({
|
|
|
7316
8096
|
console.log(`disabled trigger ${args2.id}`);
|
|
7317
8097
|
}
|
|
7318
8098
|
});
|
|
7319
|
-
var historyCmd =
|
|
8099
|
+
var historyCmd = defineCommand36({
|
|
7320
8100
|
meta: { name: "history", description: "Show recent dispatches for a trigger" },
|
|
7321
8101
|
args: {
|
|
7322
8102
|
id: { type: "positional", required: true },
|
|
@@ -7344,11 +8124,11 @@ var historyCmd = defineCommand34({
|
|
|
7344
8124
|
for (const line of columnize(rows)) console.log(line);
|
|
7345
8125
|
}
|
|
7346
8126
|
});
|
|
7347
|
-
var triggerCommand =
|
|
8127
|
+
var triggerCommand = defineCommand36({
|
|
7348
8128
|
meta: { name: "trigger", description: "Manage scheduled agent triggers" },
|
|
7349
8129
|
subCommands: {
|
|
7350
8130
|
add: addCmd3,
|
|
7351
|
-
list:
|
|
8131
|
+
list: listCmd14,
|
|
7352
8132
|
rm: rmCmd6,
|
|
7353
8133
|
enable: enableCmd3,
|
|
7354
8134
|
disable: disableCmd3,
|
|
@@ -7360,7 +8140,7 @@ var triggerCommand = defineCommand34({
|
|
|
7360
8140
|
import { existsSync as existsSync7, lstatSync as lstatSync4, readdirSync as readdirSync2, realpathSync as realpathSync2, rmSync as rmSync4 } from "fs";
|
|
7361
8141
|
import { homedir as homedir2 } from "os";
|
|
7362
8142
|
import { isAbsolute as isAbsolute2, join as join6, parse as parse2, relative as relative2, resolve as resolve5, sep } from "path";
|
|
7363
|
-
import { defineCommand as
|
|
8143
|
+
import { defineCommand as defineCommand37 } from "citty";
|
|
7364
8144
|
function makeLineReader() {
|
|
7365
8145
|
let buffer = "";
|
|
7366
8146
|
let ended = false;
|
|
@@ -7447,7 +8227,7 @@ function assertSafeUninstallHome(home) {
|
|
|
7447
8227
|
}
|
|
7448
8228
|
return target;
|
|
7449
8229
|
}
|
|
7450
|
-
var uninstallCommand =
|
|
8230
|
+
var uninstallCommand = defineCommand37({
|
|
7451
8231
|
meta: {
|
|
7452
8232
|
name: "uninstall",
|
|
7453
8233
|
description: "Wipe bazilion state from ~/.bazilion (or BAZILION_HOME)"
|
|
@@ -7551,7 +8331,7 @@ var uninstallCommand = defineCommand35({
|
|
|
7551
8331
|
|
|
7552
8332
|
// src/index.ts
|
|
7553
8333
|
var VERSION = package_default.version;
|
|
7554
|
-
var main =
|
|
8334
|
+
var main = defineCommand38({
|
|
7555
8335
|
meta: {
|
|
7556
8336
|
name: "bazilion",
|
|
7557
8337
|
version: VERSION,
|