bazilion 0.26.1 → 0.50.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 +405 -244
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +1572 -749
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/ConfigPage-_FY--9PB.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-BblXqMVb.js +1 -0
- package/dist/web/client/assets/ConnectionsView-BZHJysCa.js +1 -0
- package/dist/web/client/assets/FieldRow-k05wfDy9.js +1 -0
- package/dist/web/client/assets/SectionTabs-DlfXtepS.js +1 -0
- package/dist/web/client/assets/{SkillFindings-8LX6bYf_.js → SkillFindings-CHf5ZGY0.js} +1 -1
- package/dist/web/client/assets/SpawnDialog-C-Ujb4bC.js +1 -0
- package/dist/web/client/assets/TeamForm-D6EAAF7m.js +1 -0
- package/dist/web/client/assets/TeamThread-DpUOwMoi.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-DTUP7hwu.js +1 -0
- package/dist/web/client/assets/_id-C94dgBDe.js +1 -0
- package/dist/web/client/assets/_id-CxmEfoEp.js +1 -0
- package/dist/web/client/assets/agents-C-bJ5R_0.js +1 -0
- package/dist/web/client/assets/agents-odqBNx-A.js +1 -0
- package/dist/web/client/assets/api-CPzQ_z9m.js +1 -0
- package/dist/web/client/assets/arrow-right-Dyta3p06.js +1 -0
- package/dist/web/client/assets/attention-D0e7o7fh.js +1 -0
- package/dist/web/client/assets/chevron-right-B2YEg9rw.js +1 -0
- package/dist/web/client/assets/config-B7Y5MtpM.js +3 -0
- package/dist/web/client/assets/createLucideIcon-Cgab8gqu.js +1 -0
- package/dist/web/client/assets/index-CNVw44IE.js +54 -0
- package/dist/web/client/assets/link-ClwtaO_E.js +1 -0
- package/dist/web/client/assets/login-Br1F4rQx.js +1 -0
- package/dist/web/client/assets/mcp-B8bIAY6k.js +1 -0
- package/dist/web/client/assets/routes-BZdlkRdC.js +76 -0
- package/dist/web/client/assets/save-ZqeB_I-c.js +1 -0
- package/dist/web/client/assets/{services-B2f7e5jV.js → services-CPJxDrVG.js} +1 -1
- package/dist/web/client/assets/skills-DE_kQQGj.js +1 -0
- package/dist/web/client/assets/style-BWShXY3e.js +7 -0
- package/dist/web/client/assets/styles-Tney8jZq.css +2 -0
- package/dist/web/client/assets/teams-AcuSLc3I.js +1 -0
- package/dist/web/client/assets/teams-tRamPg7O.js +1 -0
- package/dist/web/client/assets/telegram-Ku69-GAv.js +1 -0
- package/dist/web/client/assets/tokens-DuLNZMgi.js +1 -0
- package/dist/web/client/assets/welcome-CrQk6n6I.js +1 -0
- package/dist/web/server/assets/{ConfigPage-CGld_wCK.js → ConfigPage-DSLM5CLw.js} +2 -2
- package/dist/web/server/assets/{ConfirmDialog-LdVlEanK.js → ConfirmDialog-CvLZgbfY.js} +1 -1
- package/dist/web/server/assets/ConnectionsView-DVLNH81Y.js +708 -0
- package/dist/web/server/assets/{FieldRow-Dah2KKqo.js → FieldRow-DQBzMtcR.js} +4 -4
- package/dist/web/server/assets/{Page-CMSYKXWJ.js → Page-KIL1CsME.js} +1 -1
- package/dist/web/server/assets/Rail-D8LhjS38.js +756 -0
- package/dist/web/server/assets/{SectionTabs-CqFg9Vwx.js → SectionTabs-CNcvxbR8.js} +1 -16
- package/dist/web/server/assets/{SkillFindings-Bd6e81Wu.js → SkillFindings-DX8lCMG7.js} +1 -1
- package/dist/web/server/assets/{SpawnDialog-BGNaMfFb.js → SpawnDialog-Brmkl_ll.js} +24 -6
- package/dist/web/server/assets/{TeamForm-C93tpn9r.js → TeamForm-CvQAs2FA.js} +1 -1
- package/dist/web/server/assets/TeamThread-BNJi6gPM.js +205 -0
- package/dist/web/server/assets/{UnsavedChangesGuard-Dm4a27_5.js → UnsavedChangesGuard-B3Lpl08z.js} +8 -4
- package/dist/web/server/assets/{TeamPolicyEditor-BHS3J0R9.js → _id-BH1631a8.js} +114 -263
- package/dist/web/server/assets/{_id-sW6zXrTP.js → _id-CA3QO7J5.js} +1 -1
- package/dist/web/server/assets/{_id-lOVnT5sS.js → _id-CO1PgvyG.js} +5 -5
- package/dist/web/server/assets/{_id-B0x1ffz3.js → _id-DIXUiIaB.js} +1 -1
- package/dist/web/server/assets/{_id-ByiXeIPS.js → _id-E2N4gZ4O.js} +2 -2
- package/dist/web/server/assets/{_id-Bdf_Rg62.js → _id-TVruGcOd.js} +1 -1
- package/dist/web/server/assets/_tanstack-start-manifest_v-BVfrV7LQ.js +191 -0
- package/dist/web/server/assets/{agents-BNPkidbH.js → agents-BnWgFo6o.js} +1 -1
- package/dist/web/server/assets/{agents-BK8OmB8g.js → agents-C63VycUw.js} +2 -2
- package/dist/web/server/assets/{agents-D4tqK1kH.js → agents-CalSKogx.js} +14 -15
- package/dist/web/server/assets/{agents-Cn9GkXFX.js → agents-CdZvooeQ.js} +1 -1
- package/dist/web/server/assets/{agents-lOqc6VGd.js → agents-DPZVni4Q.js} +1 -1
- package/dist/web/server/assets/{agents-DycxHDt8.js → agents-DrkEwIpR.js} +8 -8
- package/dist/web/server/assets/{attention-DULVjdmF.js → attention-BbE4yc-V.js} +1 -1
- package/dist/web/server/assets/{attention-YWnLKA2E.js → attention-Cr7puThv.js} +1 -1
- package/dist/web/server/assets/{attention-BIm455bC.js → attention-DIyX3VMB.js} +6 -6
- package/dist/web/server/assets/{auth-DiN92ydD.js → auth-dJnrFW6y.js} +1 -1
- package/dist/web/server/assets/{config-C1VB28se.js → config-3tPtOmPE.js} +1 -1
- package/dist/web/server/assets/{config-BNEgu7WG.js → config-DJGZiPBJ.js} +13 -13
- package/dist/web/server/assets/{config-TdVqnqNL.js → config-rUqhMjIs.js} +1 -1
- package/dist/web/server/assets/{daemon-client-DL2ik2Em.js → daemon-client-B_ZRIIrT.js} +2 -1
- package/dist/web/server/assets/{mcp-BwmpNQPN.js → mcp-C97uAZe1.js} +1 -1
- package/dist/web/server/assets/{mcp-B09_O05r.js → mcp-Cf7KzOJ9.js} +9 -9
- package/dist/web/server/assets/{mcp-CqdTfXcn.js → mcp-DE14q5c0.js} +1 -1
- package/dist/web/server/assets/{router-BI9gmY3S.js → router-w2yPgmC1.js} +412 -259
- package/dist/web/server/assets/routes-1FEodTRm.js +16 -0
- package/dist/web/server/assets/routes-B6AO0LjK.js +57 -0
- package/dist/web/server/assets/routes-D1NHwz6f.js +7644 -0
- package/dist/web/server/assets/{services-tCfB1B83.js → services-BjroGXgC.js} +4 -4
- package/dist/web/server/assets/{services-Q9HYQXXB.js → services-Cdk40QHq.js} +1 -1
- package/dist/web/server/assets/{services-BLvAvb8g.js → services-DsHRLL8q.js} +1 -1
- package/dist/web/server/assets/{skills-BZg_txbf.js → skills-CA17GjuZ.js} +1 -1
- package/dist/web/server/assets/{skills-C7fqRPna.js → skills-DC1OTc8n.js} +11 -11
- package/dist/web/server/assets/{skills-C_g8IKag.js → skills-h5aHa7Q8.js} +1 -1
- package/dist/web/server/assets/style-GYDODk2F.js +178 -0
- package/dist/web/server/assets/{teams-D4CaU76n.js → teams-Bm63mbTt.js} +1 -1
- package/dist/web/server/assets/{teams-DX2HmKqi.js → teams-BxnvFTyn.js} +1 -1
- package/dist/web/server/assets/{teams-BS-oweRl.js → teams-Cg-QQWpH.js} +23 -15
- package/dist/web/server/assets/{teams-BHkhnt6b.js → teams-D6Tx-Jyn.js} +1 -1
- package/dist/web/server/assets/{teams-BSflKBP8.js → teams-OzHTyVi9.js} +6 -6
- package/dist/web/server/assets/{teams-CNyB5nM9.js → teams-YrmyutM4.js} +1 -1
- package/dist/web/server/assets/{telegram-CrJiygCX.js → telegram-BJ4l_TA_.js} +6 -6
- package/dist/web/server/assets/{telegram-C4v1HhyJ.js → telegram-Gy7_9yih.js} +1 -1
- package/dist/web/server/assets/{telegram-BUdnc8oF.js → telegram-xU-vXgef.js} +1 -1
- package/dist/web/server/assets/{tokens-DqldzPUq.js → tokens-ByPTGFBQ.js} +1 -1
- package/dist/web/server/assets/{tokens-B1twAJdd.js → tokens-CEdl8puR.js} +1 -1
- package/dist/web/server/assets/{tokens-DdjEyALj.js → tokens-CsqoRt5T.js} +10 -10
- package/dist/web/server/assets/{welcome-D0d38Pzx.js → welcome-O6Rjd7yO.js} +1 -1
- package/dist/web/server/assets/workspace-DeEYMPDX.js +658 -0
- package/dist/web/server/server.js +20 -72
- package/dist/worker.js +51 -7
- package/dist/worker.js.map +1 -1
- package/package.json +1 -2
- package/dist/web/client/assets/AgentAvatar-DWx-bM6n.js +0 -1
- package/dist/web/client/assets/ChatPane-DOV_HJg-.js +0 -72
- package/dist/web/client/assets/ConfigPage-Dfu9DzFX.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-536ziJ5P.js +0 -1
- package/dist/web/client/assets/FieldRow-z1JqCdqn.js +0 -1
- package/dist/web/client/assets/ResultCard-X4nTbjYY.js +0 -1
- package/dist/web/client/assets/SectionTabs-DXHzXmmb.js +0 -1
- package/dist/web/client/assets/SpawnDialog-DoZl-yes.js +0 -1
- package/dist/web/client/assets/SpawnTeamModal-C638hEoN.js +0 -1
- package/dist/web/client/assets/TeamForm-C-WzvOl4.js +0 -1
- package/dist/web/client/assets/TeamPolicyEditor-CSKBx0oK.js +0 -7
- package/dist/web/client/assets/UnsavedChangesGuard-GC-vzw7h.js +0 -1
- package/dist/web/client/assets/_id-BKLynswT.js +0 -1
- package/dist/web/client/assets/_id-BYM_NORr.js +0 -1
- package/dist/web/client/assets/_id-Cxa98a9m.js +0 -1
- package/dist/web/client/assets/_id-D4hV1U1t.js +0 -1
- package/dist/web/client/assets/agent-actions-CXQCoxKO.js +0 -1
- package/dist/web/client/assets/agents-BxPS1_Bp.js +0 -1
- package/dist/web/client/assets/agents-GozAWW-l.js +0 -1
- package/dist/web/client/assets/attention-Cz9rZcrr.js +0 -1
- package/dist/web/client/assets/chevron-right-CPAb1zac.js +0 -1
- package/dist/web/client/assets/config-9vv9Lipb.js +0 -3
- package/dist/web/client/assets/inbox-DHLArXxl.js +0 -1
- package/dist/web/client/assets/index-1YXquAq8.js +0 -52
- package/dist/web/client/assets/learning-PvtXm8Ne.js +0 -1
- package/dist/web/client/assets/login-DIJpNQFo.js +0 -1
- package/dist/web/client/assets/mcp-pKBL0xIf.js +0 -1
- package/dist/web/client/assets/members-DHWsgsEs.js +0 -1
- package/dist/web/client/assets/memory-CEVppPyU.js +0 -1
- package/dist/web/client/assets/plus-BaIRdB10.js +0 -1
- package/dist/web/client/assets/policy-DEh4BLSw.js +0 -1
- package/dist/web/client/assets/preload-helper-eUUcpe2S.js +0 -1
- package/dist/web/client/assets/results-DgJPjEZF.js +0 -1
- package/dist/web/client/assets/review-BbshafTQ.js +0 -1
- package/dist/web/client/assets/route-Ccb8v41z.js +0 -1
- package/dist/web/client/assets/route-D1d6kCEV.js +0 -1
- package/dist/web/client/assets/routes-g7V4ru7T.js +0 -1
- package/dist/web/client/assets/settings-B6elpcYm.js +0 -1
- package/dist/web/client/assets/skills-CngE7TF8.js +0 -1
- package/dist/web/client/assets/styles-xUnZ-ep_.css +0 -2
- package/dist/web/client/assets/teams-BdJZXOan.js +0 -1
- package/dist/web/client/assets/teams-c496ISsT.js +0 -1
- package/dist/web/client/assets/telegram-B_-hK6EC.js +0 -1
- package/dist/web/client/assets/tokens-CKz8gx4-.js +0 -1
- package/dist/web/client/assets/triggers-DCEPciGW.js +0 -1
- package/dist/web/client/assets/welcome-D-zVOLGA.js +0 -1
- package/dist/web/server/assets/AgentAvatar-8gTAy_tP.js +0 -37
- package/dist/web/server/assets/ChatPane-De_FPEoD.js +0 -1887
- package/dist/web/server/assets/ResultCard-CZn1w4KA.js +0 -97
- package/dist/web/server/assets/Sidebar-puq47KyR.js +0 -430
- package/dist/web/server/assets/SpawnTeamModal-C6GbfScI.js +0 -97
- package/dist/web/server/assets/_id-BR6tnR6I.js +0 -23
- package/dist/web/server/assets/_id-Bm611NQz.js +0 -13
- package/dist/web/server/assets/_id-D5UCoyES.js +0 -359
- package/dist/web/server/assets/_id-DHx5UmmL.js +0 -12
- package/dist/web/server/assets/_id-DLpGmOVm.js +0 -19
- package/dist/web/server/assets/_id-Y5ctILG2.js +0 -13
- package/dist/web/server/assets/_id-dDA0pdVo.js +0 -54
- package/dist/web/server/assets/_tanstack-start-manifest_v-B8u80HjK.js +0 -292
- package/dist/web/server/assets/agent-actions-BBdFVdoa.js +0 -20
- package/dist/web/server/assets/api-WWxPqx67.js +0 -85
- package/dist/web/server/assets/inbox-4Vj5jTT8.js +0 -245
- package/dist/web/server/assets/inbox-D4IqUv3l.js +0 -38
- package/dist/web/server/assets/inbox-Dle24AfV.js +0 -23
- package/dist/web/server/assets/learning-BScq7VbO.js +0 -12
- package/dist/web/server/assets/learning-CBWFEnhg.js +0 -263
- package/dist/web/server/assets/learning-DWAKevhF.js +0 -25
- package/dist/web/server/assets/members-B8QBF6TF.js +0 -12
- package/dist/web/server/assets/members-DsF02Wp7.js +0 -12
- package/dist/web/server/assets/members-tWZA9b15.js +0 -36
- package/dist/web/server/assets/memory-BNN0b-0x.js +0 -12
- package/dist/web/server/assets/memory-CTl1E1Rm.js +0 -267
- package/dist/web/server/assets/memory-CV5uCBb2.js +0 -12
- package/dist/web/server/assets/policy-C9M6zV6w.js +0 -79
- package/dist/web/server/assets/policy-h-6NpU3m.js +0 -19
- package/dist/web/server/assets/policy-xEw9X0DK.js +0 -12
- package/dist/web/server/assets/results-D3A3UA4d.js +0 -182
- package/dist/web/server/assets/results-D6Ui5S8D.js +0 -12
- package/dist/web/server/assets/results-DWmxvfyn.js +0 -15
- package/dist/web/server/assets/review-CyQky-WQ.js +0 -40
- package/dist/web/server/assets/review-Sq0GGcPV.js +0 -322
- package/dist/web/server/assets/review-XWbSF8cF.js +0 -12
- package/dist/web/server/assets/route-BErtkz6t.js +0 -19
- package/dist/web/server/assets/route-CLoV-An_.js +0 -48
- package/dist/web/server/assets/route-WQ19JkBa.js +0 -19
- package/dist/web/server/assets/route-dEK_2GLj.js +0 -203
- package/dist/web/server/assets/route-iHTkhO81.js +0 -16
- package/dist/web/server/assets/route-zs8uUQtB.js +0 -16
- package/dist/web/server/assets/routes-081s4n24.js +0 -45
- package/dist/web/server/assets/routes-CWo5WPsr.js +0 -15
- package/dist/web/server/assets/routes-Cqp1ufHm.js +0 -56
- package/dist/web/server/assets/settings-CVaGv-xF.js +0 -12
- package/dist/web/server/assets/settings-D9viV-86.js +0 -561
- package/dist/web/server/assets/settings-DaZNZ_CC.js +0 -27
- package/dist/web/server/assets/triggers-B7LW784F.js +0 -214
- package/dist/web/server/assets/triggers-C5sMCZXv2.js +0 -12
- package/dist/web/server/assets/triggers-DMfVdImD.js +0 -12
- package/dist/web/client/assets/{TeamPolicyEditor-DLioOiRN.css → style-DLioOiRN.css} +0 -0
- package/dist/web/server/assets/{start-DTX6aKCi.js → start-DhW7sy23.js} +1 -1
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 defineCommand40, 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.50.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: {
|
|
@@ -50,7 +50,6 @@ var package_default = {
|
|
|
50
50
|
"@earendil-works/pi-mcp": "1.5.2",
|
|
51
51
|
"@hono/node-server": "^2.0.6",
|
|
52
52
|
"@mozilla/readability": "^0.6.0",
|
|
53
|
-
"@playwright/browser-chromium": "^1.61.0",
|
|
54
53
|
"@tanstack/react-router": "1.170.18",
|
|
55
54
|
"@tobilu/qmd": "^2.5.3",
|
|
56
55
|
"@xyflow/react": "^12.11.2",
|
|
@@ -81,8 +80,8 @@ var package_default = {
|
|
|
81
80
|
}
|
|
82
81
|
};
|
|
83
82
|
|
|
84
|
-
// src/commands/
|
|
85
|
-
import { defineCommand
|
|
83
|
+
// src/commands/activity.ts
|
|
84
|
+
import { defineCommand } from "citty";
|
|
86
85
|
|
|
87
86
|
// ../../packages/client/src/index.ts
|
|
88
87
|
var ApiClientError = class extends Error {
|
|
@@ -158,7 +157,7 @@ function createClient(cfg) {
|
|
|
158
157
|
input
|
|
159
158
|
)
|
|
160
159
|
},
|
|
161
|
-
/** Git change review: changes since a base, diffs, and
|
|
160
|
+
/** Git change review: changes since a base, diffs, who wrote them, and review feedback. */
|
|
162
161
|
repositoryReview: (teamId) => {
|
|
163
162
|
const base2 = `/api/teams/${encodeURIComponent(teamId)}/review`;
|
|
164
163
|
return {
|
|
@@ -167,6 +166,7 @@ function createClient(cfg) {
|
|
|
167
166
|
if (options.base !== void 0) params.set("base", options.base);
|
|
168
167
|
if (options.patches) params.set("patches", "1");
|
|
169
168
|
if (options.path !== void 0) params.set("path", options.path);
|
|
169
|
+
if (options.authors) params.set("authors", "1");
|
|
170
170
|
const suffix = params.size ? `?${params}` : "";
|
|
171
171
|
return request("GET", `${base2}${suffix}`);
|
|
172
172
|
},
|
|
@@ -404,6 +404,55 @@ function findingLines(findings) {
|
|
|
404
404
|
);
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
// src/commands/activity.ts
|
|
408
|
+
function activityState(activity) {
|
|
409
|
+
if (activity.questions > 0) {
|
|
410
|
+
return `needs you: ${activity.questions} question${activity.questions === 1 ? "" : "s"}`;
|
|
411
|
+
}
|
|
412
|
+
if (activity.approvals > 0) {
|
|
413
|
+
return `needs you: ${activity.approvals} command${activity.approvals === 1 ? "" : "s"} to approve`;
|
|
414
|
+
}
|
|
415
|
+
if (activity.working) {
|
|
416
|
+
if (!activity.step) return "working";
|
|
417
|
+
return activity.step.target ? `working: ${activity.step.tool} ${activity.step.target}` : `working: ${activity.step.tool}`;
|
|
418
|
+
}
|
|
419
|
+
if (activity.queuePaused) return "follow-ups paused";
|
|
420
|
+
return "idle";
|
|
421
|
+
}
|
|
422
|
+
var activityCommand = defineCommand({
|
|
423
|
+
meta: {
|
|
424
|
+
name: "activity",
|
|
425
|
+
description: "Show what every Agent is doing and what waits for you"
|
|
426
|
+
},
|
|
427
|
+
args: {
|
|
428
|
+
team: { type: "string", description: "Only Agents of this Team" },
|
|
429
|
+
json: jsonFlag
|
|
430
|
+
},
|
|
431
|
+
async run({ args }) {
|
|
432
|
+
const client = createClient2();
|
|
433
|
+
const [activity, agents] = await Promise.all([
|
|
434
|
+
client.get("/api/activity"),
|
|
435
|
+
client.get("/api/agents")
|
|
436
|
+
]);
|
|
437
|
+
const shown = activity.agents.filter((entry2) => !args.team || entry2.teamId === args.team);
|
|
438
|
+
if (args.json) return printJson({ agents: shown });
|
|
439
|
+
const names = new Map(agents.map((agent) => [agent.id, agent.name]));
|
|
440
|
+
printRows(
|
|
441
|
+
shown.map((entry2) => [
|
|
442
|
+
names.get(entry2.agentId) ?? entry2.agentId.slice(0, 8),
|
|
443
|
+
entry2.teamId,
|
|
444
|
+
terminalSafe(activityState(entry2)),
|
|
445
|
+
entry2.lastActivityAt ? new Date(entry2.lastActivityAt).toISOString() : "",
|
|
446
|
+
entry2.results ? `${entry2.results} file${entry2.results === 1 ? "" : "s"}` : ""
|
|
447
|
+
]),
|
|
448
|
+
"(no agents)"
|
|
449
|
+
);
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
// src/commands/agent.ts
|
|
454
|
+
import { defineCommand as defineCommand7 } from "citty";
|
|
455
|
+
|
|
407
456
|
// src/errors.ts
|
|
408
457
|
var UsageError = class extends Error {
|
|
409
458
|
};
|
|
@@ -451,15 +500,15 @@ function exitCodeForError(err) {
|
|
|
451
500
|
}
|
|
452
501
|
|
|
453
502
|
// src/commands/agent-browser.ts
|
|
454
|
-
import { defineCommand } from "citty";
|
|
455
|
-
var statusCmd =
|
|
503
|
+
import { defineCommand as defineCommand2 } from "citty";
|
|
504
|
+
var statusCmd = defineCommand2({
|
|
456
505
|
meta: { name: "status", description: "Show the agent's browser status (never starts it)" },
|
|
457
506
|
args: { id: agentArg },
|
|
458
507
|
async run({ args }) {
|
|
459
508
|
printJson(await createClient2().getAgentBrowser(args.id));
|
|
460
509
|
}
|
|
461
510
|
});
|
|
462
|
-
var stopCmd =
|
|
511
|
+
var stopCmd = defineCommand2({
|
|
463
512
|
meta: { name: "stop", description: "Stop the agent's browser (the profile is kept)" },
|
|
464
513
|
args: { id: agentArg },
|
|
465
514
|
async run({ args }) {
|
|
@@ -467,7 +516,7 @@ var stopCmd = defineCommand({
|
|
|
467
516
|
console.log(`stopped the browser of agent ${args.id} (profile kept)`);
|
|
468
517
|
}
|
|
469
518
|
});
|
|
470
|
-
var resetCmd =
|
|
519
|
+
var resetCmd = defineCommand2({
|
|
471
520
|
meta: {
|
|
472
521
|
name: "reset",
|
|
473
522
|
description: "Stop the agent's browser and DELETE its profile (cookies, logins)"
|
|
@@ -490,7 +539,7 @@ var resetCmd = defineCommand({
|
|
|
490
539
|
console.log(`reset the browser of agent ${args.id}: stopped, profile removed`);
|
|
491
540
|
}
|
|
492
541
|
});
|
|
493
|
-
var browserCommand =
|
|
542
|
+
var browserCommand = defineCommand2({
|
|
494
543
|
meta: { name: "browser", description: "The agent's managed browser: status, stop, reset" },
|
|
495
544
|
subCommands: { status: statusCmd, stop: stopCmd, reset: resetCmd }
|
|
496
545
|
});
|
|
@@ -500,7 +549,7 @@ import { writeFileSync } from "node:fs";
|
|
|
500
549
|
import { basename as basename3 } from "node:path";
|
|
501
550
|
import { stdin, stdout } from "node:process";
|
|
502
551
|
import { createInterface as createInterface2 } from "node:readline/promises";
|
|
503
|
-
import { defineCommand as
|
|
552
|
+
import { defineCommand as defineCommand3 } from "citty";
|
|
504
553
|
|
|
505
554
|
// src/question-prompt.ts
|
|
506
555
|
function hasAnswerControl(text) {
|
|
@@ -708,7 +757,7 @@ async function streamTurn(client, agentId, request, prompts = {}) {
|
|
|
708
757
|
}
|
|
709
758
|
}
|
|
710
759
|
}
|
|
711
|
-
var chatCommand =
|
|
760
|
+
var chatCommand = defineCommand3({
|
|
712
761
|
meta: {
|
|
713
762
|
name: "chat",
|
|
714
763
|
description: "Send one message to an agent, or one per line of piped input"
|
|
@@ -778,7 +827,7 @@ var chatCommand = defineCommand2({
|
|
|
778
827
|
});
|
|
779
828
|
|
|
780
829
|
// src/commands/agent-context.ts
|
|
781
|
-
import { defineCommand as
|
|
830
|
+
import { defineCommand as defineCommand4 } from "citty";
|
|
782
831
|
function formatBytes(n) {
|
|
783
832
|
if (n < 1024) return `${n} B`;
|
|
784
833
|
if (n < 1024 * 1024) return `${(n / 1024).toFixed(1)} KiB`;
|
|
@@ -787,7 +836,7 @@ function formatBytes(n) {
|
|
|
787
836
|
function estimateTokens(chars) {
|
|
788
837
|
return Math.ceil(Math.max(0, chars) / 4);
|
|
789
838
|
}
|
|
790
|
-
var chatTrimCmd =
|
|
839
|
+
var chatTrimCmd = defineCommand4({
|
|
791
840
|
meta: {
|
|
792
841
|
name: "chat-trim",
|
|
793
842
|
description: "Keep the first N messages of an agent's chat history; drop the rest"
|
|
@@ -811,7 +860,7 @@ var chatTrimCmd = defineCommand3({
|
|
|
811
860
|
);
|
|
812
861
|
}
|
|
813
862
|
});
|
|
814
|
-
var chatContextCmd =
|
|
863
|
+
var chatContextCmd = defineCommand4({
|
|
815
864
|
meta: {
|
|
816
865
|
name: "chat-context",
|
|
817
866
|
description: "Break down what consumes the agent's context window"
|
|
@@ -887,7 +936,7 @@ var chatContextCmd = defineCommand3({
|
|
|
887
936
|
console.log(`TOTAL: ${fmt(ctx.totals.chars, ctx.totals.tokens)}`);
|
|
888
937
|
}
|
|
889
938
|
});
|
|
890
|
-
var chatCompactCmd =
|
|
939
|
+
var chatCompactCmd = defineCommand4({
|
|
891
940
|
meta: {
|
|
892
941
|
name: "chat-compact",
|
|
893
942
|
description: "Summarize the head of an agent's chat log, preserving the tail verbatim"
|
|
@@ -926,9 +975,9 @@ var contextCommands = {
|
|
|
926
975
|
};
|
|
927
976
|
|
|
928
977
|
// src/commands/agent-learning.ts
|
|
929
|
-
import { defineCommand as
|
|
978
|
+
import { defineCommand as defineCommand5 } from "citty";
|
|
930
979
|
var proposalArg = positional("Proposal id or prefix");
|
|
931
|
-
var reviewConfigCmd =
|
|
980
|
+
var reviewConfigCmd = defineCommand5({
|
|
932
981
|
meta: { name: "review-config", description: "Inspect or configure reviewed learning" },
|
|
933
982
|
args: {
|
|
934
983
|
id: agentArg,
|
|
@@ -963,7 +1012,7 @@ var reviewConfigCmd = defineCommand4({
|
|
|
963
1012
|
console.log(`turns since last review: ${config.turnsSinceLast}`);
|
|
964
1013
|
}
|
|
965
1014
|
});
|
|
966
|
-
var reviewCmd =
|
|
1015
|
+
var reviewCmd = defineCommand5({
|
|
967
1016
|
meta: { name: "review", description: "Enqueue a reviewed-learning pass" },
|
|
968
1017
|
args: { id: agentArg },
|
|
969
1018
|
async run({ args }) {
|
|
@@ -973,7 +1022,7 @@ var reviewCmd = defineCommand4({
|
|
|
973
1022
|
console.log(`review ${response.review.id} ${response.review.status}`);
|
|
974
1023
|
}
|
|
975
1024
|
});
|
|
976
|
-
var reviewsCmd =
|
|
1025
|
+
var reviewsCmd = defineCommand5({
|
|
977
1026
|
meta: { name: "reviews", description: "List reviewed-learning history" },
|
|
978
1027
|
args: {
|
|
979
1028
|
id: agentArg,
|
|
@@ -995,7 +1044,7 @@ var reviewsCmd = defineCommand4({
|
|
|
995
1044
|
);
|
|
996
1045
|
}
|
|
997
1046
|
});
|
|
998
|
-
var lessonsCmd =
|
|
1047
|
+
var lessonsCmd = defineCommand5({
|
|
999
1048
|
meta: { name: "lessons", description: "List reviewed lesson proposals" },
|
|
1000
1049
|
args: {
|
|
1001
1050
|
id: agentArg,
|
|
@@ -1025,7 +1074,7 @@ async function locateProposal(id) {
|
|
|
1025
1074
|
throw new Error(`lesson proposal not found: ${id}`);
|
|
1026
1075
|
}
|
|
1027
1076
|
function lessonDecisionCmd(decision) {
|
|
1028
|
-
return
|
|
1077
|
+
return defineCommand5({
|
|
1029
1078
|
meta: { name: decision, description: `${decision} a reviewed lesson proposal` },
|
|
1030
1079
|
args: {
|
|
1031
1080
|
id: proposalArg,
|
|
@@ -1042,7 +1091,7 @@ function lessonDecisionCmd(decision) {
|
|
|
1042
1091
|
}
|
|
1043
1092
|
});
|
|
1044
1093
|
}
|
|
1045
|
-
var lessonEditCmd =
|
|
1094
|
+
var lessonEditCmd = defineCommand5({
|
|
1046
1095
|
meta: { name: "edit", description: "Edit a pending reviewed lesson proposal" },
|
|
1047
1096
|
args: {
|
|
1048
1097
|
id: proposalArg,
|
|
@@ -1061,7 +1110,7 @@ var lessonEditCmd = defineCommand4({
|
|
|
1061
1110
|
console.log(`updated ${response.proposal.id} v${response.proposal.version}`);
|
|
1062
1111
|
}
|
|
1063
1112
|
});
|
|
1064
|
-
var lessonCmd =
|
|
1113
|
+
var lessonCmd = defineCommand5({
|
|
1065
1114
|
meta: { name: "lesson", description: "Edit or decide a reviewed lesson proposal" },
|
|
1066
1115
|
subCommands: {
|
|
1067
1116
|
edit: lessonEditCmd,
|
|
@@ -1079,9 +1128,9 @@ var learningCommands = {
|
|
|
1079
1128
|
};
|
|
1080
1129
|
|
|
1081
1130
|
// src/commands/agent-skills.ts
|
|
1082
|
-
import { defineCommand as
|
|
1131
|
+
import { defineCommand as defineCommand6 } from "citty";
|
|
1083
1132
|
var skillArg = positional("Skill name");
|
|
1084
|
-
var addCmd =
|
|
1133
|
+
var addCmd = defineCommand6({
|
|
1085
1134
|
meta: { name: "add", description: "Attach a skill to an agent" },
|
|
1086
1135
|
args: {
|
|
1087
1136
|
agent: agentArg,
|
|
@@ -1097,7 +1146,7 @@ var addCmd = defineCommand5({
|
|
|
1097
1146
|
console.log(`attached skill ${args.skill} to ${args.agent}`);
|
|
1098
1147
|
}
|
|
1099
1148
|
});
|
|
1100
|
-
var rmCmd =
|
|
1149
|
+
var rmCmd = defineCommand6({
|
|
1101
1150
|
meta: { name: "rm", description: "Detach a skill from an agent" },
|
|
1102
1151
|
args: { agent: agentArg, skill: skillArg },
|
|
1103
1152
|
async run({ args }) {
|
|
@@ -1105,13 +1154,13 @@ var rmCmd = defineCommand5({
|
|
|
1105
1154
|
console.log(`detached skill ${args.skill} from ${args.agent}`);
|
|
1106
1155
|
}
|
|
1107
1156
|
});
|
|
1108
|
-
var agentSkillCommand =
|
|
1157
|
+
var agentSkillCommand = defineCommand6({
|
|
1109
1158
|
meta: { name: "skill", description: "Attach/detach skills on an agent" },
|
|
1110
1159
|
subCommands: { add: addCmd, rm: rmCmd }
|
|
1111
1160
|
});
|
|
1112
1161
|
|
|
1113
1162
|
// src/commands/agent.ts
|
|
1114
|
-
var spawnCmd =
|
|
1163
|
+
var spawnCmd = defineCommand7({
|
|
1115
1164
|
meta: { name: "spawn", description: "Spawn an agent from a profile into a team" },
|
|
1116
1165
|
args: {
|
|
1117
1166
|
profile: { type: "string", required: true, description: "Profile id" },
|
|
@@ -1136,7 +1185,7 @@ var spawnCmd = defineCommand6({
|
|
|
1136
1185
|
console.log(`dir: ${agent.dir}`);
|
|
1137
1186
|
}
|
|
1138
1187
|
});
|
|
1139
|
-
var editCmd =
|
|
1188
|
+
var editCmd = defineCommand7({
|
|
1140
1189
|
meta: {
|
|
1141
1190
|
name: "edit",
|
|
1142
1191
|
description: "Edit agent settings (name, model override, reasoning level, telegram mirror)"
|
|
@@ -1178,7 +1227,7 @@ var editCmd = defineCommand6({
|
|
|
1178
1227
|
console.log(`updated agent ${agent.id} (${agent.name})`);
|
|
1179
1228
|
}
|
|
1180
1229
|
});
|
|
1181
|
-
var listCmd =
|
|
1230
|
+
var listCmd = defineCommand7({
|
|
1182
1231
|
meta: { name: "list", description: "List agents" },
|
|
1183
1232
|
args: {
|
|
1184
1233
|
all: { type: "boolean", description: "Include archived agents" },
|
|
@@ -1199,7 +1248,7 @@ var listCmd = defineCommand6({
|
|
|
1199
1248
|
);
|
|
1200
1249
|
}
|
|
1201
1250
|
});
|
|
1202
|
-
var showCmd =
|
|
1251
|
+
var showCmd = defineCommand7({
|
|
1203
1252
|
meta: { name: "show", description: "Show agent details" },
|
|
1204
1253
|
args: { id: agentArg },
|
|
1205
1254
|
async run({ args }) {
|
|
@@ -1216,7 +1265,7 @@ var showCmd = defineCommand6({
|
|
|
1216
1265
|
for (const s of r.skills) console.log(` ${s}`);
|
|
1217
1266
|
}
|
|
1218
1267
|
});
|
|
1219
|
-
var archiveCmd =
|
|
1268
|
+
var archiveCmd = defineCommand7({
|
|
1220
1269
|
meta: { name: "archive", description: "Archive an agent" },
|
|
1221
1270
|
args: { id: agentArg },
|
|
1222
1271
|
async run({ args }) {
|
|
@@ -1224,7 +1273,7 @@ var archiveCmd = defineCommand6({
|
|
|
1224
1273
|
console.log(`archived agent ${args.id}`);
|
|
1225
1274
|
}
|
|
1226
1275
|
});
|
|
1227
|
-
var unarchiveCmd =
|
|
1276
|
+
var unarchiveCmd = defineCommand7({
|
|
1228
1277
|
meta: { name: "unarchive", description: "Restore an archived agent to idle" },
|
|
1229
1278
|
args: { id: agentArg },
|
|
1230
1279
|
async run({ args }) {
|
|
@@ -1232,7 +1281,7 @@ var unarchiveCmd = defineCommand6({
|
|
|
1232
1281
|
console.log(`unarchived agent ${args.id}`);
|
|
1233
1282
|
}
|
|
1234
1283
|
});
|
|
1235
|
-
var deleteCmd =
|
|
1284
|
+
var deleteCmd = defineCommand7({
|
|
1236
1285
|
meta: { name: "delete", description: "Permanently delete an agent and its data" },
|
|
1237
1286
|
args: { id: agentArg },
|
|
1238
1287
|
async run({ args }) {
|
|
@@ -1240,7 +1289,7 @@ var deleteCmd = defineCommand6({
|
|
|
1240
1289
|
console.log(`deleted agent ${args.id}`);
|
|
1241
1290
|
}
|
|
1242
1291
|
});
|
|
1243
|
-
var cancelCmd =
|
|
1292
|
+
var cancelCmd = defineCommand7({
|
|
1244
1293
|
meta: {
|
|
1245
1294
|
name: "cancel",
|
|
1246
1295
|
description: "Abort the agent's running turn; waiting follow-ups are paused"
|
|
@@ -1254,7 +1303,7 @@ var cancelCmd = defineCommand6({
|
|
|
1254
1303
|
}
|
|
1255
1304
|
}
|
|
1256
1305
|
});
|
|
1257
|
-
var moveCmd =
|
|
1306
|
+
var moveCmd = defineCommand7({
|
|
1258
1307
|
meta: { name: "move", description: "Move an agent to a different team" },
|
|
1259
1308
|
args: { agent: agentArg, team: teamArg },
|
|
1260
1309
|
async run({ args }) {
|
|
@@ -1263,7 +1312,7 @@ var moveCmd = defineCommand6({
|
|
|
1263
1312
|
console.log(`moved ${args.agent} to team ${args.team}`);
|
|
1264
1313
|
}
|
|
1265
1314
|
});
|
|
1266
|
-
var agentCommand =
|
|
1315
|
+
var agentCommand = defineCommand7({
|
|
1267
1316
|
meta: { name: "agent", description: "Manage agent instances" },
|
|
1268
1317
|
subCommands: {
|
|
1269
1318
|
spawn: spawnCmd,
|
|
@@ -1284,8 +1333,8 @@ var agentCommand = defineCommand6({
|
|
|
1284
1333
|
});
|
|
1285
1334
|
|
|
1286
1335
|
// src/commands/attention.ts
|
|
1287
|
-
import { defineCommand as
|
|
1288
|
-
var list =
|
|
1336
|
+
import { defineCommand as defineCommand8 } from "citty";
|
|
1337
|
+
var list = defineCommand8({
|
|
1289
1338
|
meta: { name: "list", description: "List operator attention items" },
|
|
1290
1339
|
args: {
|
|
1291
1340
|
state: { type: "string", default: "open", description: "open, acknowledged or all" },
|
|
@@ -1314,7 +1363,7 @@ var list = defineCommand7({
|
|
|
1314
1363
|
console.error(`warning: ${source.kind} unavailable: ${source.error}`);
|
|
1315
1364
|
}
|
|
1316
1365
|
});
|
|
1317
|
-
var summary =
|
|
1366
|
+
var summary = defineCommand8({
|
|
1318
1367
|
meta: { name: "summary", description: "Summarize open attention items" },
|
|
1319
1368
|
args: { json: jsonFlag },
|
|
1320
1369
|
async run({ args }) {
|
|
@@ -1327,7 +1376,7 @@ var summary = defineCommand7({
|
|
|
1327
1376
|
}
|
|
1328
1377
|
});
|
|
1329
1378
|
function mutation(name) {
|
|
1330
|
-
return
|
|
1379
|
+
return defineCommand8({
|
|
1331
1380
|
meta: { name, description: `${name} one informational attention item` },
|
|
1332
1381
|
args: {
|
|
1333
1382
|
key: positional("Attention item key"),
|
|
@@ -1347,7 +1396,7 @@ function mutation(name) {
|
|
|
1347
1396
|
}
|
|
1348
1397
|
});
|
|
1349
1398
|
}
|
|
1350
|
-
var acknowledgeAll =
|
|
1399
|
+
var acknowledgeAll = defineCommand8({
|
|
1351
1400
|
meta: { name: "acknowledge-all", description: "Acknowledge all open informational items" },
|
|
1352
1401
|
args: { yes: { type: "boolean", description: "Required confirmation" }, json: jsonFlag },
|
|
1353
1402
|
async run({ args }) {
|
|
@@ -1362,7 +1411,7 @@ var acknowledgeAll = defineCommand7({
|
|
|
1362
1411
|
function context(item) {
|
|
1363
1412
|
return [item.agentName, item.teamName].filter(Boolean).join(" / ") || "system";
|
|
1364
1413
|
}
|
|
1365
|
-
var attentionCommand =
|
|
1414
|
+
var attentionCommand = defineCommand8({
|
|
1366
1415
|
meta: { name: "attention", description: "Inspect the operator attention center" },
|
|
1367
1416
|
subCommands: {
|
|
1368
1417
|
list,
|
|
@@ -1375,7 +1424,7 @@ var attentionCommand = defineCommand7({
|
|
|
1375
1424
|
|
|
1376
1425
|
// src/commands/auth.ts
|
|
1377
1426
|
import { openaiCodexProvider } from "@earendil-works/pi-ai/providers/openai-codex";
|
|
1378
|
-
import { defineCommand as
|
|
1427
|
+
import { defineCommand as defineCommand9 } from "citty";
|
|
1379
1428
|
var CLI_OPENAI_LOGIN_TIMEOUT_MS = 10 * 6e4;
|
|
1380
1429
|
function answerCliOpenAIPrompt(prompt, loginMethod, login, input = process.stdin, output = process.stdout) {
|
|
1381
1430
|
if (prompt.type === "select") {
|
|
@@ -1413,7 +1462,7 @@ function formatExpiry(ms) {
|
|
|
1413
1462
|
const d = new Date(ms);
|
|
1414
1463
|
return d.toISOString().replace(/\.\d+Z$/, "Z");
|
|
1415
1464
|
}
|
|
1416
|
-
var openaiLoginCmd =
|
|
1465
|
+
var openaiLoginCmd = defineCommand9({
|
|
1417
1466
|
meta: {
|
|
1418
1467
|
name: "login",
|
|
1419
1468
|
description: "Connect your ChatGPT account via OAuth"
|
|
@@ -1473,7 +1522,7 @@ var openaiLoginCmd = defineCommand8({
|
|
|
1473
1522
|
console.log(" bazilion provider models-set openai-codex <model>");
|
|
1474
1523
|
}
|
|
1475
1524
|
});
|
|
1476
|
-
var openaiLogoutCmd =
|
|
1525
|
+
var openaiLogoutCmd = defineCommand9({
|
|
1477
1526
|
meta: {
|
|
1478
1527
|
name: "logout",
|
|
1479
1528
|
description: "Forget the stored ChatGPT OAuth credentials"
|
|
@@ -1484,7 +1533,7 @@ var openaiLogoutCmd = defineCommand8({
|
|
|
1484
1533
|
console.log("disconnected ChatGPT OAuth credentials");
|
|
1485
1534
|
}
|
|
1486
1535
|
});
|
|
1487
|
-
var openaiStatusCmd =
|
|
1536
|
+
var openaiStatusCmd = defineCommand9({
|
|
1488
1537
|
meta: {
|
|
1489
1538
|
name: "status",
|
|
1490
1539
|
description: "Show ChatGPT OAuth connection status"
|
|
@@ -1501,7 +1550,7 @@ var openaiStatusCmd = defineCommand8({
|
|
|
1501
1550
|
console.log(`access token expires: ${formatExpiry(status.expiresAt)}`);
|
|
1502
1551
|
}
|
|
1503
1552
|
});
|
|
1504
|
-
var openaiCmd =
|
|
1553
|
+
var openaiCmd = defineCommand9({
|
|
1505
1554
|
meta: {
|
|
1506
1555
|
name: "openai",
|
|
1507
1556
|
description: "Manage ChatGPT (OAuth) authentication"
|
|
@@ -1512,7 +1561,7 @@ var openaiCmd = defineCommand8({
|
|
|
1512
1561
|
status: openaiStatusCmd
|
|
1513
1562
|
}
|
|
1514
1563
|
});
|
|
1515
|
-
var authCommand =
|
|
1564
|
+
var authCommand = defineCommand9({
|
|
1516
1565
|
meta: {
|
|
1517
1566
|
name: "auth",
|
|
1518
1567
|
description: "OAuth-based provider authentication (ChatGPT account, etc.)"
|
|
@@ -1545,7 +1594,7 @@ import { DatabaseSync as DatabaseSync2 } from "node:sqlite";
|
|
|
1545
1594
|
import { Readable } from "node:stream";
|
|
1546
1595
|
import { pipeline } from "node:stream/promises";
|
|
1547
1596
|
import { Decrypter, Encrypter } from "age-encryption";
|
|
1548
|
-
import { defineCommand as
|
|
1597
|
+
import { defineCommand as defineCommand10 } from "citty";
|
|
1549
1598
|
import { extract, list as list2 } from "tar";
|
|
1550
1599
|
|
|
1551
1600
|
// ../daemon/src/core/db/schema.ts
|
|
@@ -1696,7 +1745,7 @@ function assertDaemonStopped(home) {
|
|
|
1696
1745
|
}
|
|
1697
1746
|
|
|
1698
1747
|
// src/commands/backup.ts
|
|
1699
|
-
var createCmd =
|
|
1748
|
+
var createCmd = defineCommand10({
|
|
1700
1749
|
meta: { name: "create", description: "Download a backup of the Bazilion home" },
|
|
1701
1750
|
args: {
|
|
1702
1751
|
output: {
|
|
@@ -1730,8 +1779,8 @@ var createCmd = defineCommand9({
|
|
|
1730
1779
|
const partial = `${output}.partial`;
|
|
1731
1780
|
const fd = openSync(partial, "wx", 384);
|
|
1732
1781
|
try {
|
|
1733
|
-
const [
|
|
1734
|
-
const written = args.recipient ? await encrypter.encrypt(
|
|
1782
|
+
const [archive2, check] = res.body.tee();
|
|
1783
|
+
const written = args.recipient ? await encrypter.encrypt(archive2) : archive2;
|
|
1735
1784
|
await Promise.all([
|
|
1736
1785
|
pipeline(Readable.fromWeb(written), createWriteStream(partial, { fd })),
|
|
1737
1786
|
// A response cut short can still end cleanly: read the archive through to its end.
|
|
@@ -1848,7 +1897,7 @@ function installRestoredHome(staged, home) {
|
|
|
1848
1897
|
console.warn(`warning: could not delete the previous home at ${previous}; remove it by hand`);
|
|
1849
1898
|
}
|
|
1850
1899
|
}
|
|
1851
|
-
var restoreCmd =
|
|
1900
|
+
var restoreCmd = defineCommand10({
|
|
1852
1901
|
meta: {
|
|
1853
1902
|
name: "restore",
|
|
1854
1903
|
description: "Restore a backup into the Bazilion home (stop the daemon first)"
|
|
@@ -1871,17 +1920,17 @@ var restoreCmd = defineCommand9({
|
|
|
1871
1920
|
mkdirSync2(dirname2(home), { recursive: true });
|
|
1872
1921
|
const staging = mkdtempSync(join3(dirname2(home), ".bazilion-restore-"));
|
|
1873
1922
|
try {
|
|
1874
|
-
const
|
|
1923
|
+
const archive2 = join3(staging, "backup.tar.gz");
|
|
1875
1924
|
if (isAgeEncrypted(file)) {
|
|
1876
1925
|
if (!args.identity) throw new Error("this backup is encrypted; pass --identity <file>");
|
|
1877
|
-
await decrypt(file,
|
|
1926
|
+
await decrypt(file, archive2, args.identity);
|
|
1878
1927
|
} else {
|
|
1879
|
-
copyFileSync(file,
|
|
1928
|
+
copyFileSync(file, archive2);
|
|
1880
1929
|
}
|
|
1881
|
-
await checkArchive(
|
|
1930
|
+
await checkArchive(archive2);
|
|
1882
1931
|
const staged = join3(staging, "home");
|
|
1883
1932
|
mkdirSync2(staged, { mode: 448 });
|
|
1884
|
-
await extract({ file:
|
|
1933
|
+
await extract({ file: archive2, cwd: staged, strict: true, preservePaths: true });
|
|
1885
1934
|
chmodSync(staged, 448);
|
|
1886
1935
|
for (const name of ["auth.json", "bazilion.db"]) chmodSync(join3(staged, name), 384);
|
|
1887
1936
|
checkDatabase(staged);
|
|
@@ -1894,13 +1943,13 @@ var restoreCmd = defineCommand9({
|
|
|
1894
1943
|
console.log("start the daemon with: bazilion serve");
|
|
1895
1944
|
}
|
|
1896
1945
|
});
|
|
1897
|
-
var backupCommand =
|
|
1946
|
+
var backupCommand = defineCommand10({
|
|
1898
1947
|
meta: { name: "backup", description: "Back up and restore the Bazilion home" },
|
|
1899
1948
|
subCommands: { create: createCmd, restore: restoreCmd }
|
|
1900
1949
|
});
|
|
1901
1950
|
|
|
1902
1951
|
// src/commands/completion.ts
|
|
1903
|
-
import { defineCommand as
|
|
1952
|
+
import { defineCommand as defineCommand11 } from "citty";
|
|
1904
1953
|
async function walk(cmd, path, out) {
|
|
1905
1954
|
const subsRaw = cmd.subCommands ?? {};
|
|
1906
1955
|
const subNames = Object.keys(subsRaw);
|
|
@@ -2005,7 +2054,7 @@ function fishScript(flat) {
|
|
|
2005
2054
|
`;
|
|
2006
2055
|
}
|
|
2007
2056
|
function completionCommand(main2) {
|
|
2008
|
-
return
|
|
2057
|
+
return defineCommand11({
|
|
2009
2058
|
meta: {
|
|
2010
2059
|
name: "completion",
|
|
2011
2060
|
description: "Print a shell completion script (bash, zsh, or fish)"
|
|
@@ -2030,13 +2079,13 @@ function completionCommand(main2) {
|
|
|
2030
2079
|
}
|
|
2031
2080
|
|
|
2032
2081
|
// src/commands/config.ts
|
|
2033
|
-
import { defineCommand as
|
|
2082
|
+
import { defineCommand as defineCommand12 } from "citty";
|
|
2034
2083
|
function displayValue(f) {
|
|
2035
2084
|
if (!f.set) return "(unset)";
|
|
2036
2085
|
if (f.kind === "secret") return f.preview ?? "(set)";
|
|
2037
2086
|
return f.value ?? "(set)";
|
|
2038
2087
|
}
|
|
2039
|
-
var listCmd2 =
|
|
2088
|
+
var listCmd2 = defineCommand12({
|
|
2040
2089
|
meta: {
|
|
2041
2090
|
name: "list",
|
|
2042
2091
|
description: "List every configurable field (credentials + URLs) across all services"
|
|
@@ -2062,7 +2111,7 @@ ${svc.displayName}: ${svc.status}`);
|
|
|
2062
2111
|
}
|
|
2063
2112
|
}
|
|
2064
2113
|
});
|
|
2065
|
-
var setCmd =
|
|
2114
|
+
var setCmd = defineCommand12({
|
|
2066
2115
|
meta: {
|
|
2067
2116
|
name: "set",
|
|
2068
2117
|
description: "Set a configurable field (auto-routes to secrets or plaintext store)"
|
|
@@ -2080,7 +2129,7 @@ var setCmd = defineCommand11({
|
|
|
2080
2129
|
console.log(`${state.envVar} (${state.kind}): ${displayValue(state)}`);
|
|
2081
2130
|
}
|
|
2082
2131
|
});
|
|
2083
|
-
var rmCmd2 =
|
|
2132
|
+
var rmCmd2 = defineCommand12({
|
|
2084
2133
|
meta: { name: "rm", description: "Remove a configurable field value" },
|
|
2085
2134
|
args: {
|
|
2086
2135
|
envVar: positional("Env var name to clear")
|
|
@@ -2090,7 +2139,7 @@ var rmCmd2 = defineCommand11({
|
|
|
2090
2139
|
console.log(`removed ${args.envVar}`);
|
|
2091
2140
|
}
|
|
2092
2141
|
});
|
|
2093
|
-
var configCommand =
|
|
2142
|
+
var configCommand = defineCommand12({
|
|
2094
2143
|
meta: {
|
|
2095
2144
|
name: "config",
|
|
2096
2145
|
description: "Service settings: credentials (stored encrypted) and URLs/IDs (plaintext)"
|
|
@@ -2103,9 +2152,9 @@ var configCommand = defineCommand11({
|
|
|
2103
2152
|
});
|
|
2104
2153
|
|
|
2105
2154
|
// src/commands/conversation.ts
|
|
2106
|
-
import { defineCommand as
|
|
2155
|
+
import { defineCommand as defineCommand13 } from "citty";
|
|
2107
2156
|
var conversationArg = positional("Conversation id");
|
|
2108
|
-
var list3 =
|
|
2157
|
+
var list3 = defineCommand13({
|
|
2109
2158
|
meta: { name: "list", description: "List conversations; the active one receives new messages" },
|
|
2110
2159
|
args: {
|
|
2111
2160
|
agent: agentArg,
|
|
@@ -2131,7 +2180,7 @@ var list3 = defineCommand12({
|
|
|
2131
2180
|
console.log(line);
|
|
2132
2181
|
}
|
|
2133
2182
|
});
|
|
2134
|
-
var show =
|
|
2183
|
+
var show = defineCommand13({
|
|
2135
2184
|
meta: { name: "show", description: "Read a conversation without making it active" },
|
|
2136
2185
|
args: { agent: agentArg, id: conversationArg, json: jsonFlag },
|
|
2137
2186
|
async run({ args }) {
|
|
@@ -2141,7 +2190,7 @@ var show = defineCommand12({
|
|
|
2141
2190
|
for (const message of body.messages) console.log(`[${message.role}] ${message.content}`);
|
|
2142
2191
|
}
|
|
2143
2192
|
});
|
|
2144
|
-
var newConversation =
|
|
2193
|
+
var newConversation = defineCommand13({
|
|
2145
2194
|
meta: {
|
|
2146
2195
|
name: "new",
|
|
2147
2196
|
description: "Start a new conversation and make it active; earlier ones stay readable"
|
|
@@ -2160,7 +2209,7 @@ var newConversation = defineCommand12({
|
|
|
2160
2209
|
console.log(`Conversation ${conversation.id}: ${conversation.title} (active)`);
|
|
2161
2210
|
}
|
|
2162
2211
|
});
|
|
2163
|
-
var rename =
|
|
2212
|
+
var rename = defineCommand13({
|
|
2164
2213
|
meta: { name: "rename", description: "Rename a conversation" },
|
|
2165
2214
|
args: {
|
|
2166
2215
|
agent: agentArg,
|
|
@@ -2177,9 +2226,26 @@ var rename = defineCommand12({
|
|
|
2177
2226
|
console.log(body.conversation.title);
|
|
2178
2227
|
}
|
|
2179
2228
|
});
|
|
2180
|
-
var
|
|
2181
|
-
meta: {
|
|
2182
|
-
|
|
2229
|
+
var select = defineCommand13({
|
|
2230
|
+
meta: {
|
|
2231
|
+
name: "select",
|
|
2232
|
+
description: "Switch to an earlier conversation: new messages continue it"
|
|
2233
|
+
},
|
|
2234
|
+
args: { agent: agentArg, id: conversationArg, json: jsonFlag },
|
|
2235
|
+
async run({ args }) {
|
|
2236
|
+
const body = await createClient2().post(
|
|
2237
|
+
apiPath("agents", args.agent, "conversations", args.id, "select")
|
|
2238
|
+
);
|
|
2239
|
+
if (args.json) return printJson(body);
|
|
2240
|
+
console.log(`Conversation ${body.conversation.id}: ${body.conversation.title} (active)`);
|
|
2241
|
+
}
|
|
2242
|
+
});
|
|
2243
|
+
var conversationCommand = defineCommand13({
|
|
2244
|
+
meta: {
|
|
2245
|
+
name: "conversation",
|
|
2246
|
+
description: "List, read, start, rename and switch Agent conversations"
|
|
2247
|
+
},
|
|
2248
|
+
subCommands: { list: list3, show, new: newConversation, rename, select }
|
|
2183
2249
|
});
|
|
2184
2250
|
|
|
2185
2251
|
// src/commands/dashboard.ts
|
|
@@ -2187,19 +2253,19 @@ import { spawn as spawn2 } from "node:child_process";
|
|
|
2187
2253
|
import { existsSync as existsSync4 } from "node:fs";
|
|
2188
2254
|
import { connect } from "node:net";
|
|
2189
2255
|
import { join as join5 } from "node:path";
|
|
2190
|
-
import { defineCommand as
|
|
2256
|
+
import { defineCommand as defineCommand15 } from "citty";
|
|
2191
2257
|
|
|
2192
2258
|
// src/commands/serve.ts
|
|
2193
2259
|
import { spawn } from "node:child_process";
|
|
2194
2260
|
import { existsSync as existsSync3 } from "node:fs";
|
|
2195
2261
|
import { join as join4 } from "node:path";
|
|
2196
|
-
import { defineCommand as
|
|
2262
|
+
import { defineCommand as defineCommand14 } from "citty";
|
|
2197
2263
|
var bundledDaemonEntry = join4(import.meta.dirname, "daemon.js");
|
|
2198
2264
|
var daemonEntry = existsSync3(bundledDaemonEntry) ? bundledDaemonEntry : join4(import.meta.dirname, "..", "..", "..", "daemon", "src", "index.ts");
|
|
2199
2265
|
function nodeArgs(entry2) {
|
|
2200
2266
|
return entry2.endsWith(".ts") ? ["--import", import.meta.resolve("tsx/esm"), entry2] : [entry2];
|
|
2201
2267
|
}
|
|
2202
|
-
var serveCommand =
|
|
2268
|
+
var serveCommand = defineCommand14({
|
|
2203
2269
|
meta: {
|
|
2204
2270
|
name: "serve",
|
|
2205
2271
|
description: "Start the bazilion daemon (HTTP API)"
|
|
@@ -2321,7 +2387,7 @@ function spawnProcess(label2, entry2, env) {
|
|
|
2321
2387
|
stdio: "inherit"
|
|
2322
2388
|
});
|
|
2323
2389
|
}
|
|
2324
|
-
var dashboardCommand =
|
|
2390
|
+
var dashboardCommand = defineCommand15({
|
|
2325
2391
|
meta: {
|
|
2326
2392
|
name: "dashboard",
|
|
2327
2393
|
description: "Start the bazilion daemon and bundled web UI"
|
|
@@ -2434,8 +2500,8 @@ var dashboardCommand = defineCommand14({
|
|
|
2434
2500
|
});
|
|
2435
2501
|
|
|
2436
2502
|
// src/commands/doctor.ts
|
|
2437
|
-
import { defineCommand as
|
|
2438
|
-
var doctorCommand =
|
|
2503
|
+
import { defineCommand as defineCommand16 } from "citty";
|
|
2504
|
+
var doctorCommand = defineCommand16({
|
|
2439
2505
|
meta: { name: "doctor", description: "Diagnose your bazilion install" },
|
|
2440
2506
|
async run() {
|
|
2441
2507
|
const r = await createClient2().get("/api/health/details");
|
|
@@ -2584,7 +2650,7 @@ function checkLine(label2, condition, hint) {
|
|
|
2584
2650
|
}
|
|
2585
2651
|
|
|
2586
2652
|
// src/commands/inbox.ts
|
|
2587
|
-
import { defineCommand as
|
|
2653
|
+
import { defineCommand as defineCommand17 } from "citty";
|
|
2588
2654
|
var messageArg = positional("Message id");
|
|
2589
2655
|
function decodeText(payload) {
|
|
2590
2656
|
try {
|
|
@@ -2601,7 +2667,7 @@ function messageRow(m) {
|
|
|
2601
2667
|
const preview = text.length > 60 ? `${text.slice(0, 60)}\u2026` : text;
|
|
2602
2668
|
return [m.id, state, when, `from:${m.fromAgentId.slice(0, 8)}`, `"${preview}"`];
|
|
2603
2669
|
}
|
|
2604
|
-
var listCmd3 =
|
|
2670
|
+
var listCmd3 = defineCommand17({
|
|
2605
2671
|
meta: { name: "list", description: "List messages in an agent inbox" },
|
|
2606
2672
|
args: {
|
|
2607
2673
|
agent: positional("Recipient agent id or prefix"),
|
|
@@ -2614,7 +2680,7 @@ var listCmd3 = defineCommand16({
|
|
|
2614
2680
|
printRows(messages.map(messageRow), args.unread ? "(no unread messages)" : "(inbox empty)");
|
|
2615
2681
|
}
|
|
2616
2682
|
});
|
|
2617
|
-
var showCmd2 =
|
|
2683
|
+
var showCmd2 = defineCommand17({
|
|
2618
2684
|
meta: { name: "show", description: "Show a single message in full" },
|
|
2619
2685
|
args: { id: messageArg },
|
|
2620
2686
|
async run({ args }) {
|
|
@@ -2631,7 +2697,7 @@ var showCmd2 = defineCommand16({
|
|
|
2631
2697
|
console.log(decodeText(m.payload));
|
|
2632
2698
|
}
|
|
2633
2699
|
});
|
|
2634
|
-
var readCmd =
|
|
2700
|
+
var readCmd = defineCommand17({
|
|
2635
2701
|
meta: { name: "read", description: "Mark a message as read" },
|
|
2636
2702
|
args: { id: messageArg },
|
|
2637
2703
|
async run({ args }) {
|
|
@@ -2639,7 +2705,7 @@ var readCmd = defineCommand16({
|
|
|
2639
2705
|
console.log(`marked read: ${args.id}`);
|
|
2640
2706
|
}
|
|
2641
2707
|
});
|
|
2642
|
-
var loopBreaksCmd =
|
|
2708
|
+
var loopBreaksCmd = defineCommand17({
|
|
2643
2709
|
meta: { name: "loop-breaks", description: "List stopped agent-message chains" },
|
|
2644
2710
|
args: {
|
|
2645
2711
|
agent: agentArg,
|
|
@@ -2662,7 +2728,7 @@ var loopBreaksCmd = defineCommand16({
|
|
|
2662
2728
|
);
|
|
2663
2729
|
}
|
|
2664
2730
|
});
|
|
2665
|
-
var inboxCommand =
|
|
2731
|
+
var inboxCommand = defineCommand17({
|
|
2666
2732
|
meta: { name: "inbox", description: "Inspect agent inboxes" },
|
|
2667
2733
|
subCommands: {
|
|
2668
2734
|
list: listCmd3,
|
|
@@ -2674,7 +2740,7 @@ var inboxCommand = defineCommand16({
|
|
|
2674
2740
|
|
|
2675
2741
|
// src/commands/login.ts
|
|
2676
2742
|
import { existsSync as existsSync5, readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "node:fs";
|
|
2677
|
-
import { defineCommand as
|
|
2743
|
+
import { defineCommand as defineCommand18 } from "citty";
|
|
2678
2744
|
function normalizeServer(raw) {
|
|
2679
2745
|
let url;
|
|
2680
2746
|
try {
|
|
@@ -2698,7 +2764,7 @@ async function verifyToken(server, token) {
|
|
|
2698
2764
|
throw new Error("server canonical private origin does not match --server");
|
|
2699
2765
|
}
|
|
2700
2766
|
}
|
|
2701
|
-
var loginCommand =
|
|
2767
|
+
var loginCommand = defineCommand18({
|
|
2702
2768
|
meta: {
|
|
2703
2769
|
name: "login",
|
|
2704
2770
|
description: "Save a remote bazilion server + token pair to auth.json"
|
|
@@ -2746,7 +2812,7 @@ var loginCommand = defineCommand17({
|
|
|
2746
2812
|
});
|
|
2747
2813
|
|
|
2748
2814
|
// src/commands/mcp.ts
|
|
2749
|
-
import { defineCommand as
|
|
2815
|
+
import { defineCommand as defineCommand19 } from "citty";
|
|
2750
2816
|
var serverArg = positional("MCP server id");
|
|
2751
2817
|
function serverRow(s) {
|
|
2752
2818
|
const where = s.transport === "stdio" ? `${s.command} ${s.args.join(" ")}`.trim() : s.url ?? "";
|
|
@@ -2759,7 +2825,7 @@ function serverRow(s) {
|
|
|
2759
2825
|
where
|
|
2760
2826
|
];
|
|
2761
2827
|
}
|
|
2762
|
-
var addCmd2 =
|
|
2828
|
+
var addCmd2 = defineCommand19({
|
|
2763
2829
|
meta: { name: "add", description: "Register an MCP server" },
|
|
2764
2830
|
args: {
|
|
2765
2831
|
name: { type: "positional", required: true, description: "Unique name ([a-zA-Z0-9_])" },
|
|
@@ -2784,14 +2850,14 @@ var addCmd2 = defineCommand18({
|
|
|
2784
2850
|
console.log(`${server.id} ${server.name} ${server.transport}`);
|
|
2785
2851
|
}
|
|
2786
2852
|
});
|
|
2787
|
-
var listCmd4 =
|
|
2853
|
+
var listCmd4 = defineCommand19({
|
|
2788
2854
|
meta: { name: "list", description: "List MCP servers" },
|
|
2789
2855
|
async run() {
|
|
2790
2856
|
const { servers } = await createClient2().get("/api/mcp-servers");
|
|
2791
2857
|
printRows(servers.map(serverRow), "(no MCP servers)");
|
|
2792
2858
|
}
|
|
2793
2859
|
});
|
|
2794
|
-
var showCmd3 =
|
|
2860
|
+
var showCmd3 = defineCommand19({
|
|
2795
2861
|
meta: { name: "show", description: "Show one MCP server" },
|
|
2796
2862
|
args: { id: serverArg },
|
|
2797
2863
|
async run({ args }) {
|
|
@@ -2801,7 +2867,7 @@ var showCmd3 = defineCommand18({
|
|
|
2801
2867
|
printJson(server);
|
|
2802
2868
|
}
|
|
2803
2869
|
});
|
|
2804
|
-
var rmCmd3 =
|
|
2870
|
+
var rmCmd3 = defineCommand19({
|
|
2805
2871
|
meta: { name: "rm", description: "Delete an MCP server" },
|
|
2806
2872
|
args: { id: serverArg },
|
|
2807
2873
|
async run({ args }) {
|
|
@@ -2809,7 +2875,7 @@ var rmCmd3 = defineCommand18({
|
|
|
2809
2875
|
console.log(`removed MCP server ${args.id}`);
|
|
2810
2876
|
}
|
|
2811
2877
|
});
|
|
2812
|
-
var enableCmd =
|
|
2878
|
+
var enableCmd = defineCommand19({
|
|
2813
2879
|
meta: { name: "enable", description: "Enable an MCP server" },
|
|
2814
2880
|
args: { id: serverArg },
|
|
2815
2881
|
async run({ args }) {
|
|
@@ -2817,7 +2883,7 @@ var enableCmd = defineCommand18({
|
|
|
2817
2883
|
console.log(`enabled MCP server ${args.id}`);
|
|
2818
2884
|
}
|
|
2819
2885
|
});
|
|
2820
|
-
var disableCmd =
|
|
2886
|
+
var disableCmd = defineCommand19({
|
|
2821
2887
|
meta: { name: "disable", description: "Disable an MCP server" },
|
|
2822
2888
|
args: { id: serverArg },
|
|
2823
2889
|
async run({ args }) {
|
|
@@ -2825,7 +2891,7 @@ var disableCmd = defineCommand18({
|
|
|
2825
2891
|
console.log(`disabled MCP server ${args.id}`);
|
|
2826
2892
|
}
|
|
2827
2893
|
});
|
|
2828
|
-
var testCmd =
|
|
2894
|
+
var testCmd = defineCommand19({
|
|
2829
2895
|
meta: { name: "test", description: "Connect to a server and list its tools" },
|
|
2830
2896
|
args: { id: serverArg },
|
|
2831
2897
|
async run({ args }) {
|
|
@@ -2838,7 +2904,7 @@ var testCmd = defineCommand18({
|
|
|
2838
2904
|
for (const t of tools) console.log(` ${t.name} ${t.description}`);
|
|
2839
2905
|
}
|
|
2840
2906
|
});
|
|
2841
|
-
var mcpCommand =
|
|
2907
|
+
var mcpCommand = defineCommand19({
|
|
2842
2908
|
meta: { name: "mcp", description: "Manage MCP servers" },
|
|
2843
2909
|
subCommands: {
|
|
2844
2910
|
add: addCmd2,
|
|
@@ -2852,10 +2918,10 @@ var mcpCommand = defineCommand18({
|
|
|
2852
2918
|
});
|
|
2853
2919
|
|
|
2854
2920
|
// src/commands/memory.ts
|
|
2855
|
-
import { defineCommand as
|
|
2921
|
+
import { defineCommand as defineCommand20 } from "citty";
|
|
2856
2922
|
var keyArg = positional("Memory key (path under memory/, ending in .md)");
|
|
2857
2923
|
var entryPath = (team, key) => apiPath("teams", team, "memory", ...key.split("/"));
|
|
2858
|
-
var writeCmd =
|
|
2924
|
+
var writeCmd = defineCommand20({
|
|
2859
2925
|
meta: { name: "write", description: "Write an entry into a team's shared memory" },
|
|
2860
2926
|
args: { team: teamArg, key: keyArg, content: positional("Content to write") },
|
|
2861
2927
|
async run({ args }) {
|
|
@@ -2865,7 +2931,7 @@ var writeCmd = defineCommand19({
|
|
|
2865
2931
|
console.log(`wrote ${entry2.key} (${entry2.content.length} bytes)`);
|
|
2866
2932
|
}
|
|
2867
2933
|
});
|
|
2868
|
-
var readCmd2 =
|
|
2934
|
+
var readCmd2 = defineCommand20({
|
|
2869
2935
|
meta: { name: "read", description: "Read an entry from a team's shared memory" },
|
|
2870
2936
|
args: { team: teamArg, key: keyArg },
|
|
2871
2937
|
async run({ args }) {
|
|
@@ -2873,7 +2939,7 @@ var readCmd2 = defineCommand19({
|
|
|
2873
2939
|
console.log(entry2.content);
|
|
2874
2940
|
}
|
|
2875
2941
|
});
|
|
2876
|
-
var searchCmd =
|
|
2942
|
+
var searchCmd = defineCommand20({
|
|
2877
2943
|
meta: { name: "search", description: "Search a team's shared memory" },
|
|
2878
2944
|
args: {
|
|
2879
2945
|
team: teamArg,
|
|
@@ -2895,7 +2961,7 @@ var searchCmd = defineCommand19({
|
|
|
2895
2961
|
}
|
|
2896
2962
|
}
|
|
2897
2963
|
});
|
|
2898
|
-
var listCmd5 =
|
|
2964
|
+
var listCmd5 = defineCommand20({
|
|
2899
2965
|
meta: { name: "list", description: "List all entries in a team's shared memory" },
|
|
2900
2966
|
args: { team: teamArg },
|
|
2901
2967
|
async run({ args }) {
|
|
@@ -2909,7 +2975,7 @@ var listCmd5 = defineCommand19({
|
|
|
2909
2975
|
}
|
|
2910
2976
|
}
|
|
2911
2977
|
});
|
|
2912
|
-
var rmCmd4 =
|
|
2978
|
+
var rmCmd4 = defineCommand20({
|
|
2913
2979
|
meta: { name: "rm", description: "Remove an entry from a team's shared memory" },
|
|
2914
2980
|
args: { team: teamArg, key: keyArg },
|
|
2915
2981
|
async run({ args }) {
|
|
@@ -2917,7 +2983,7 @@ var rmCmd4 = defineCommand19({
|
|
|
2917
2983
|
console.log(`removed ${args.key}`);
|
|
2918
2984
|
}
|
|
2919
2985
|
});
|
|
2920
|
-
var memoryCommand =
|
|
2986
|
+
var memoryCommand = defineCommand20({
|
|
2921
2987
|
meta: {
|
|
2922
2988
|
name: "memory",
|
|
2923
2989
|
description: "Manage a team's shared memory (BM25-indexed markdown notes)"
|
|
@@ -2932,7 +2998,7 @@ var memoryCommand = defineCommand19({
|
|
|
2932
2998
|
});
|
|
2933
2999
|
|
|
2934
3000
|
// src/commands/notification.ts
|
|
2935
|
-
import { defineCommand as
|
|
3001
|
+
import { defineCommand as defineCommand21 } from "citty";
|
|
2936
3002
|
function print(settings2, json) {
|
|
2937
3003
|
if (json) {
|
|
2938
3004
|
printJson(settings2);
|
|
@@ -2945,14 +3011,14 @@ function print(settings2, json) {
|
|
|
2945
3011
|
if (!settings2.telegramReady)
|
|
2946
3012
|
console.log("telegram: not connected \u2014 notices go out once the bot runs");
|
|
2947
3013
|
}
|
|
2948
|
-
var settings =
|
|
3014
|
+
var settings = defineCommand21({
|
|
2949
3015
|
meta: { name: "settings", description: "Show the Telegram attention notification settings" },
|
|
2950
3016
|
args: { json: jsonFlag },
|
|
2951
3017
|
async run({ args }) {
|
|
2952
3018
|
print(await createClient2().notifications.settings(), args.json);
|
|
2953
3019
|
}
|
|
2954
3020
|
});
|
|
2955
|
-
var configure =
|
|
3021
|
+
var configure = defineCommand21({
|
|
2956
3022
|
meta: {
|
|
2957
3023
|
name: "configure",
|
|
2958
3024
|
description: "Change the settings; options left out keep their current value"
|
|
@@ -2984,7 +3050,7 @@ var configure = defineCommand20({
|
|
|
2984
3050
|
print(updated, args.json);
|
|
2985
3051
|
}
|
|
2986
3052
|
});
|
|
2987
|
-
var notificationCommand =
|
|
3053
|
+
var notificationCommand = defineCommand21({
|
|
2988
3054
|
meta: {
|
|
2989
3055
|
name: "notification",
|
|
2990
3056
|
description: "Send new Attention items to the Telegram service topic"
|
|
@@ -3020,7 +3086,7 @@ var PROFILE_FILES = [
|
|
|
3020
3086
|
];
|
|
3021
3087
|
|
|
3022
3088
|
// src/commands/profile.ts
|
|
3023
|
-
import { defineCommand as
|
|
3089
|
+
import { defineCommand as defineCommand22 } from "citty";
|
|
3024
3090
|
var profileArg = positional("Profile id");
|
|
3025
3091
|
function splitCsv(v) {
|
|
3026
3092
|
if (!v) return void 0;
|
|
@@ -3032,7 +3098,7 @@ function parseSkillsMode(v) {
|
|
|
3032
3098
|
if (v === "all" || v === "selected") return v;
|
|
3033
3099
|
throw new Error(`--skills-mode must be 'all' or 'selected', got '${v}'`);
|
|
3034
3100
|
}
|
|
3035
|
-
var createCmd2 =
|
|
3101
|
+
var createCmd2 = defineCommand22({
|
|
3036
3102
|
meta: { name: "create", description: "Create a new profile" },
|
|
3037
3103
|
args: {
|
|
3038
3104
|
id: positional("Profile slug"),
|
|
@@ -3096,7 +3162,7 @@ var createCmd2 = defineCommand21({
|
|
|
3096
3162
|
console.log(`created profile ${profile.id} at ${profile.dir}`);
|
|
3097
3163
|
}
|
|
3098
3164
|
});
|
|
3099
|
-
var listCmd6 =
|
|
3165
|
+
var listCmd6 = defineCommand22({
|
|
3100
3166
|
meta: { name: "list", description: "List profiles" },
|
|
3101
3167
|
async run() {
|
|
3102
3168
|
const list7 = await createClient2().get("/api/profiles");
|
|
@@ -3106,7 +3172,7 @@ var listCmd6 = defineCommand21({
|
|
|
3106
3172
|
);
|
|
3107
3173
|
}
|
|
3108
3174
|
});
|
|
3109
|
-
var showCmd4 =
|
|
3175
|
+
var showCmd4 = defineCommand22({
|
|
3110
3176
|
meta: { name: "show", description: "Show profile details" },
|
|
3111
3177
|
args: { id: profileArg },
|
|
3112
3178
|
async run({ args }) {
|
|
@@ -3128,7 +3194,7 @@ var showCmd4 = defineCommand21({
|
|
|
3128
3194
|
}
|
|
3129
3195
|
}
|
|
3130
3196
|
});
|
|
3131
|
-
var editCmd2 =
|
|
3197
|
+
var editCmd2 = defineCommand22({
|
|
3132
3198
|
meta: { name: "edit", description: "Open a profile file in $EDITOR" },
|
|
3133
3199
|
args: {
|
|
3134
3200
|
id: profileArg,
|
|
@@ -3169,7 +3235,7 @@ var editCmd2 = defineCommand21({
|
|
|
3169
3235
|
}
|
|
3170
3236
|
}
|
|
3171
3237
|
});
|
|
3172
|
-
var updateCmd =
|
|
3238
|
+
var updateCmd = defineCommand22({
|
|
3173
3239
|
meta: {
|
|
3174
3240
|
name: "update",
|
|
3175
3241
|
description: "Update profile settings (name, model, skills-mode, skills)"
|
|
@@ -3200,7 +3266,7 @@ var updateCmd = defineCommand21({
|
|
|
3200
3266
|
console.log(`updated profile ${profile.id}`);
|
|
3201
3267
|
}
|
|
3202
3268
|
});
|
|
3203
|
-
var deleteCmd2 =
|
|
3269
|
+
var deleteCmd2 = defineCommand22({
|
|
3204
3270
|
meta: { name: "delete", description: "Permanently delete a profile and its files" },
|
|
3205
3271
|
args: { id: profileArg },
|
|
3206
3272
|
async run({ args }) {
|
|
@@ -3208,7 +3274,7 @@ var deleteCmd2 = defineCommand21({
|
|
|
3208
3274
|
console.log(`deleted profile ${args.id}`);
|
|
3209
3275
|
}
|
|
3210
3276
|
});
|
|
3211
|
-
var profileCommand =
|
|
3277
|
+
var profileCommand = defineCommand22({
|
|
3212
3278
|
meta: { name: "profile", description: "Manage profiles" },
|
|
3213
3279
|
subCommands: {
|
|
3214
3280
|
create: createCmd2,
|
|
@@ -3221,9 +3287,9 @@ var profileCommand = defineCommand21({
|
|
|
3221
3287
|
});
|
|
3222
3288
|
|
|
3223
3289
|
// src/commands/provider.ts
|
|
3224
|
-
import { defineCommand as
|
|
3290
|
+
import { defineCommand as defineCommand23 } from "citty";
|
|
3225
3291
|
var providerArg = positional("Provider id (e.g. anthropic)");
|
|
3226
|
-
var listCmd7 =
|
|
3292
|
+
var listCmd7 = defineCommand23({
|
|
3227
3293
|
meta: {
|
|
3228
3294
|
name: "list",
|
|
3229
3295
|
description: "List all providers with enabled/disabled state and curated model counts"
|
|
@@ -3244,7 +3310,7 @@ var listCmd7 = defineCommand22({
|
|
|
3244
3310
|
);
|
|
3245
3311
|
}
|
|
3246
3312
|
});
|
|
3247
|
-
var modelsCmd =
|
|
3313
|
+
var modelsCmd = defineCommand23({
|
|
3248
3314
|
meta: {
|
|
3249
3315
|
name: "models",
|
|
3250
3316
|
description: "Show curated + catalog + live models for one provider"
|
|
@@ -3272,7 +3338,7 @@ var modelsCmd = defineCommand22({
|
|
|
3272
3338
|
}
|
|
3273
3339
|
}
|
|
3274
3340
|
});
|
|
3275
|
-
var modelsSetCmd =
|
|
3341
|
+
var modelsSetCmd = defineCommand23({
|
|
3276
3342
|
meta: {
|
|
3277
3343
|
name: "models-set",
|
|
3278
3344
|
description: "Replace the curated model list for a provider (comma-separated)"
|
|
@@ -3293,7 +3359,7 @@ var modelsSetCmd = defineCommand22({
|
|
|
3293
3359
|
for (const t of saved.movedTemplates) console.log(`template ${t.id} now uses ${t.model}`);
|
|
3294
3360
|
}
|
|
3295
3361
|
});
|
|
3296
|
-
var enableCmd2 =
|
|
3362
|
+
var enableCmd2 = defineCommand23({
|
|
3297
3363
|
meta: { name: "enable", description: "Toggle a provider on so agents can use it" },
|
|
3298
3364
|
args: { name: providerArg },
|
|
3299
3365
|
async run({ args }) {
|
|
@@ -3304,7 +3370,7 @@ var enableCmd2 = defineCommand22({
|
|
|
3304
3370
|
console.log(`${res.name}: enabled`);
|
|
3305
3371
|
}
|
|
3306
3372
|
});
|
|
3307
|
-
var disableCmd2 =
|
|
3373
|
+
var disableCmd2 = defineCommand23({
|
|
3308
3374
|
meta: {
|
|
3309
3375
|
name: "disable",
|
|
3310
3376
|
description: "Toggle a provider off \u2014 agents will refuse its model strings"
|
|
@@ -3318,7 +3384,7 @@ var disableCmd2 = defineCommand22({
|
|
|
3318
3384
|
console.log(`${res.name}: disabled`);
|
|
3319
3385
|
}
|
|
3320
3386
|
});
|
|
3321
|
-
var testCmd2 =
|
|
3387
|
+
var testCmd2 = defineCommand23({
|
|
3322
3388
|
meta: { name: "test", description: "Send a single chat to a model and print the reply" },
|
|
3323
3389
|
args: {
|
|
3324
3390
|
model: positional("Model string, e.g. anthropic:claude-opus-4-8"),
|
|
@@ -3334,7 +3400,7 @@ var testCmd2 = defineCommand22({
|
|
|
3334
3400
|
}
|
|
3335
3401
|
}
|
|
3336
3402
|
});
|
|
3337
|
-
var providerCommand =
|
|
3403
|
+
var providerCommand = defineCommand23({
|
|
3338
3404
|
meta: { name: "provider", description: "Manage and test LLM providers" },
|
|
3339
3405
|
subCommands: {
|
|
3340
3406
|
list: listCmd7,
|
|
@@ -3347,7 +3413,7 @@ var providerCommand = defineCommand22({
|
|
|
3347
3413
|
});
|
|
3348
3414
|
|
|
3349
3415
|
// src/commands/question.ts
|
|
3350
|
-
import { defineCommand as
|
|
3416
|
+
import { defineCommand as defineCommand24 } from "citty";
|
|
3351
3417
|
function questionAnswer(args) {
|
|
3352
3418
|
const count = Number(args.choice !== void 0) + Number(args.text !== void 0) + Number(args.skip === true);
|
|
3353
3419
|
if (count !== 1) throw new Error("Specify exactly one of --choice, --text, or --skip");
|
|
@@ -3360,10 +3426,10 @@ function questionAnswer(args) {
|
|
|
3360
3426
|
if (!/^[1-4]$/.test(args.choice ?? "")) throw new Error("--choice must be a number from 1 to 4");
|
|
3361
3427
|
return { kind: "choice", index: Number(args.choice) - 1 };
|
|
3362
3428
|
}
|
|
3363
|
-
var questionCommand =
|
|
3429
|
+
var questionCommand = defineCommand24({
|
|
3364
3430
|
meta: { name: "question", description: "List and answer an Agent's waiting questions" },
|
|
3365
3431
|
subCommands: {
|
|
3366
|
-
list:
|
|
3432
|
+
list: defineCommand24({
|
|
3367
3433
|
meta: { name: "list", description: "Questions the Agent is waiting on" },
|
|
3368
3434
|
args: { agent: agentArg, json: jsonFlag },
|
|
3369
3435
|
async run({ args }) {
|
|
@@ -3376,7 +3442,7 @@ var questionCommand = defineCommand23({
|
|
|
3376
3442
|
}
|
|
3377
3443
|
}
|
|
3378
3444
|
}),
|
|
3379
|
-
answer:
|
|
3445
|
+
answer: defineCommand24({
|
|
3380
3446
|
meta: { name: "answer", description: "Answer a waiting question" },
|
|
3381
3447
|
args: {
|
|
3382
3448
|
agent: agentArg,
|
|
@@ -3394,9 +3460,9 @@ var questionCommand = defineCommand23({
|
|
|
3394
3460
|
});
|
|
3395
3461
|
|
|
3396
3462
|
// src/commands/queue.ts
|
|
3397
|
-
import { defineCommand as
|
|
3463
|
+
import { defineCommand as defineCommand25 } from "citty";
|
|
3398
3464
|
var itemArg = positional("Follow-up id");
|
|
3399
|
-
var list4 =
|
|
3465
|
+
var list4 = defineCommand25({
|
|
3400
3466
|
meta: {
|
|
3401
3467
|
name: "list",
|
|
3402
3468
|
description: "Show waiting, running and failed follow-ups, and whether a turn is running"
|
|
@@ -3406,7 +3472,7 @@ var list4 = defineCommand24({
|
|
|
3406
3472
|
printJson(await createClient2().queue(args.agent).list());
|
|
3407
3473
|
}
|
|
3408
3474
|
});
|
|
3409
|
-
var add =
|
|
3475
|
+
var add = defineCommand25({
|
|
3410
3476
|
meta: { name: "add", description: "Queue a follow-up; it runs after the current turn" },
|
|
3411
3477
|
args: {
|
|
3412
3478
|
agent: agentArg,
|
|
@@ -3420,7 +3486,7 @@ var add = defineCommand24({
|
|
|
3420
3486
|
);
|
|
3421
3487
|
}
|
|
3422
3488
|
});
|
|
3423
|
-
var edit =
|
|
3489
|
+
var edit = defineCommand25({
|
|
3424
3490
|
meta: { name: "edit", description: "Replace the text of a waiting follow-up" },
|
|
3425
3491
|
args: {
|
|
3426
3492
|
agent: agentArg,
|
|
@@ -3431,7 +3497,7 @@ var edit = defineCommand24({
|
|
|
3431
3497
|
printJson(await createClient2().queue(args.agent).edit(args.id, args.message));
|
|
3432
3498
|
}
|
|
3433
3499
|
});
|
|
3434
|
-
var remove =
|
|
3500
|
+
var remove = defineCommand25({
|
|
3435
3501
|
meta: { name: "remove", description: "Remove a follow-up that is not running" },
|
|
3436
3502
|
args: { agent: agentArg, id: itemArg },
|
|
3437
3503
|
async run({ args }) {
|
|
@@ -3439,7 +3505,7 @@ var remove = defineCommand24({
|
|
|
3439
3505
|
}
|
|
3440
3506
|
});
|
|
3441
3507
|
function control(paused) {
|
|
3442
|
-
return
|
|
3508
|
+
return defineCommand25({
|
|
3443
3509
|
meta: {
|
|
3444
3510
|
name: paused ? "pause" : "resume",
|
|
3445
3511
|
description: paused ? "Start no further follow-ups" : "Start waiting follow-ups again"
|
|
@@ -3450,20 +3516,21 @@ function control(paused) {
|
|
|
3450
3516
|
}
|
|
3451
3517
|
});
|
|
3452
3518
|
}
|
|
3453
|
-
var queueCommand =
|
|
3519
|
+
var queueCommand = defineCommand25({
|
|
3454
3520
|
meta: { name: "queue", description: "Follow-ups: input that waits for the Agent\u2019s current turn" },
|
|
3455
3521
|
subCommands: { list: list4, add, edit, remove, pause: control(true), resume: control(false) }
|
|
3456
3522
|
});
|
|
3457
3523
|
|
|
3458
3524
|
// src/commands/result.ts
|
|
3459
3525
|
import { closeSync as closeSync2, fsyncSync, openSync as openSync2, unlinkSync, writeFileSync as writeFileSync5 } from "node:fs";
|
|
3460
|
-
import { defineCommand as
|
|
3526
|
+
import { defineCommand as defineCommand26 } from "citty";
|
|
3461
3527
|
var idArg = positional("Result id");
|
|
3462
|
-
var list5 =
|
|
3528
|
+
var list5 = defineCommand26({
|
|
3463
3529
|
meta: { name: "list", description: "List saved results" },
|
|
3464
3530
|
args: {
|
|
3465
3531
|
team: { type: "string", description: "Only results of this Team" },
|
|
3466
3532
|
agent: { type: "string", description: "Only results of this Agent" },
|
|
3533
|
+
conversation: { type: "string", description: "Only results delivered in this conversation" },
|
|
3467
3534
|
limit: { type: "string", default: "50", description: "Page size" },
|
|
3468
3535
|
offset: { type: "string", default: "0", description: "Results to skip" },
|
|
3469
3536
|
json: jsonFlag
|
|
@@ -3472,6 +3539,7 @@ var list5 = defineCommand25({
|
|
|
3472
3539
|
const query = new URLSearchParams({ limit: args.limit, offset: args.offset });
|
|
3473
3540
|
if (args.team) query.set("teamId", args.team);
|
|
3474
3541
|
if (args.agent) query.set("agentId", args.agent);
|
|
3542
|
+
if (args.conversation) query.set("sessionId", args.conversation);
|
|
3475
3543
|
const body = await createClient2().get(`/api/results?${query}`);
|
|
3476
3544
|
if (args.json) return printJson(body);
|
|
3477
3545
|
if (!body.results.length) return console.log("(no saved results)");
|
|
@@ -3490,7 +3558,7 @@ var list5 = defineCommand25({
|
|
|
3490
3558
|
console.log(`${body.offset + 1}\u2013${body.offset + body.results.length} of ${body.total}`);
|
|
3491
3559
|
}
|
|
3492
3560
|
});
|
|
3493
|
-
var show2 =
|
|
3561
|
+
var show2 = defineCommand26({
|
|
3494
3562
|
meta: { name: "show", description: "Show a saved result: who saved it, where and when" },
|
|
3495
3563
|
args: { id: idArg },
|
|
3496
3564
|
async run({ args }) {
|
|
@@ -3500,7 +3568,7 @@ var show2 = defineCommand25({
|
|
|
3500
3568
|
printJson(result);
|
|
3501
3569
|
}
|
|
3502
3570
|
});
|
|
3503
|
-
var download =
|
|
3571
|
+
var download = defineCommand26({
|
|
3504
3572
|
meta: { name: "download", description: "Download a saved result to an explicit new file" },
|
|
3505
3573
|
args: {
|
|
3506
3574
|
id: idArg,
|
|
@@ -3512,20 +3580,49 @@ var download = defineCommand25({
|
|
|
3512
3580
|
},
|
|
3513
3581
|
async run({ args }) {
|
|
3514
3582
|
const bytes = await createClient2().binary(apiPath("results", args.id, "download"));
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3583
|
+
saveNew(args.output, bytes);
|
|
3584
|
+
console.log(`Saved ${bytes.byteLength} bytes to ${args.output}`);
|
|
3585
|
+
}
|
|
3586
|
+
});
|
|
3587
|
+
function saveNew(path, bytes) {
|
|
3588
|
+
const fd = openSync2(path, "wx", 384);
|
|
3589
|
+
try {
|
|
3590
|
+
writeFileSync5(fd, bytes);
|
|
3591
|
+
fsyncSync(fd);
|
|
3592
|
+
} catch (error) {
|
|
3524
3593
|
closeSync2(fd);
|
|
3594
|
+
unlinkSync(path);
|
|
3595
|
+
throw error;
|
|
3596
|
+
}
|
|
3597
|
+
closeSync2(fd);
|
|
3598
|
+
}
|
|
3599
|
+
var archive = defineCommand26({
|
|
3600
|
+
meta: {
|
|
3601
|
+
name: "archive",
|
|
3602
|
+
description: "Download every saved result of a Team, an Agent or a conversation as one zip"
|
|
3603
|
+
},
|
|
3604
|
+
args: {
|
|
3605
|
+
team: { type: "string", description: "Results of this Team" },
|
|
3606
|
+
agent: { type: "string", description: "Results of this Agent" },
|
|
3607
|
+
conversation: { type: "string", description: "Results delivered in this conversation" },
|
|
3608
|
+
output: {
|
|
3609
|
+
type: "string",
|
|
3610
|
+
required: true,
|
|
3611
|
+
description: "Destination .zip path; existing files are never overwritten"
|
|
3612
|
+
}
|
|
3613
|
+
},
|
|
3614
|
+
async run({ args }) {
|
|
3615
|
+
const query = new URLSearchParams();
|
|
3616
|
+
if (args.team) query.set("teamId", args.team);
|
|
3617
|
+
if (args.agent) query.set("agentId", args.agent);
|
|
3618
|
+
if (args.conversation) query.set("sessionId", args.conversation);
|
|
3619
|
+
if (query.size === 0) throw new Error("Pass --team, --agent or --conversation");
|
|
3620
|
+
const bytes = await createClient2().binary(`/api/results/archive?${query}`);
|
|
3621
|
+
saveNew(args.output, bytes);
|
|
3525
3622
|
console.log(`Saved ${bytes.byteLength} bytes to ${args.output}`);
|
|
3526
3623
|
}
|
|
3527
3624
|
});
|
|
3528
|
-
var rm =
|
|
3625
|
+
var rm = defineCommand26({
|
|
3529
3626
|
meta: { name: "rm", description: "Delete a saved result" },
|
|
3530
3627
|
args: { id: idArg, yes: { type: "boolean", description: "Required confirmation" } },
|
|
3531
3628
|
async run({ args }) {
|
|
@@ -3534,19 +3631,20 @@ var rm = defineCommand25({
|
|
|
3534
3631
|
console.log("Saved file deleted.");
|
|
3535
3632
|
}
|
|
3536
3633
|
});
|
|
3537
|
-
var resultCommand =
|
|
3634
|
+
var resultCommand = defineCommand26({
|
|
3538
3635
|
meta: { name: "result", description: "Find, download and delete saved Agent results" },
|
|
3539
3636
|
subCommands: {
|
|
3540
3637
|
list: list5,
|
|
3541
3638
|
show: show2,
|
|
3542
3639
|
download,
|
|
3640
|
+
archive,
|
|
3543
3641
|
rm
|
|
3544
3642
|
}
|
|
3545
3643
|
});
|
|
3546
3644
|
|
|
3547
3645
|
// src/commands/send.ts
|
|
3548
|
-
import { defineCommand as
|
|
3549
|
-
var sendCommand =
|
|
3646
|
+
import { defineCommand as defineCommand27 } from "citty";
|
|
3647
|
+
var sendCommand = defineCommand27({
|
|
3550
3648
|
meta: {
|
|
3551
3649
|
name: "send",
|
|
3552
3650
|
description: "Send a message from one agent to another"
|
|
@@ -3569,7 +3667,7 @@ var sendCommand = defineCommand26({
|
|
|
3569
3667
|
});
|
|
3570
3668
|
|
|
3571
3669
|
// src/commands/session.ts
|
|
3572
|
-
import { defineCommand as
|
|
3670
|
+
import { defineCommand as defineCommand28 } from "citty";
|
|
3573
3671
|
function row(session) {
|
|
3574
3672
|
return [
|
|
3575
3673
|
session.id,
|
|
@@ -3579,14 +3677,14 @@ function row(session) {
|
|
|
3579
3677
|
`expires: ${new Date(session.expiresAt).toISOString()}`
|
|
3580
3678
|
];
|
|
3581
3679
|
}
|
|
3582
|
-
var listCmd8 =
|
|
3680
|
+
var listCmd8 = defineCommand28({
|
|
3583
3681
|
meta: { name: "list", description: "List browser sessions" },
|
|
3584
3682
|
async run() {
|
|
3585
3683
|
const { sessions } = await createClient2().get("/api/sessions");
|
|
3586
3684
|
printRows(sessions.map(row), "(no active browser sessions)");
|
|
3587
3685
|
}
|
|
3588
3686
|
});
|
|
3589
|
-
var revokeCmd =
|
|
3687
|
+
var revokeCmd = defineCommand28({
|
|
3590
3688
|
meta: { name: "revoke", description: "Revoke (delete) one browser session" },
|
|
3591
3689
|
args: { id: positional("Session id") },
|
|
3592
3690
|
async run({ args }) {
|
|
@@ -3594,7 +3692,7 @@ var revokeCmd = defineCommand27({
|
|
|
3594
3692
|
console.log(`revoked browser session ${args.id}`);
|
|
3595
3693
|
}
|
|
3596
3694
|
});
|
|
3597
|
-
var sessionCommand =
|
|
3695
|
+
var sessionCommand = defineCommand28({
|
|
3598
3696
|
meta: { name: "session", description: "Manage browser sessions" },
|
|
3599
3697
|
subCommands: { list: listCmd8, revoke: revokeCmd }
|
|
3600
3698
|
});
|
|
@@ -3602,7 +3700,7 @@ var sessionCommand = defineCommand27({
|
|
|
3602
3700
|
// src/commands/skill.ts
|
|
3603
3701
|
import { existsSync as existsSync6, readFileSync as readFileSync8, statSync } from "node:fs";
|
|
3604
3702
|
import { basename as basename4, resolve as resolve3 } from "node:path";
|
|
3605
|
-
import { defineCommand as
|
|
3703
|
+
import { defineCommand as defineCommand29 } from "citty";
|
|
3606
3704
|
function printFindings(title, findings) {
|
|
3607
3705
|
const flagged = Object.entries(findings).filter(([, list7]) => list7.length > 0);
|
|
3608
3706
|
if (flagged.length === 0) return;
|
|
@@ -3613,7 +3711,7 @@ function printFindings(title, findings) {
|
|
|
3613
3711
|
for (const line of findingLines(list7)) console.log(` ${line}`);
|
|
3614
3712
|
}
|
|
3615
3713
|
}
|
|
3616
|
-
var listCmd9 =
|
|
3714
|
+
var listCmd9 = defineCommand29({
|
|
3617
3715
|
meta: { name: "list", description: "List installed skills (or those attached to an agent)" },
|
|
3618
3716
|
args: {
|
|
3619
3717
|
agent: { type: "string", description: "Filter to skills attached to this agent" }
|
|
@@ -3643,7 +3741,7 @@ var listCmd9 = defineCommand28({
|
|
|
3643
3741
|
);
|
|
3644
3742
|
}
|
|
3645
3743
|
});
|
|
3646
|
-
var importCmd =
|
|
3744
|
+
var importCmd = defineCommand29({
|
|
3647
3745
|
meta: {
|
|
3648
3746
|
name: "import",
|
|
3649
3747
|
description: "Import skills from openclaw, a directory, or a local .zip archive"
|
|
@@ -3686,7 +3784,7 @@ var importCmd = defineCommand28({
|
|
|
3686
3784
|
printFindings("confirmed scan findings:", result.findings ?? {});
|
|
3687
3785
|
}
|
|
3688
3786
|
});
|
|
3689
|
-
var rmCmd5 =
|
|
3787
|
+
var rmCmd5 = defineCommand29({
|
|
3690
3788
|
meta: { name: "rm", description: "Remove an installed skill" },
|
|
3691
3789
|
args: { name: positional("Skill name") },
|
|
3692
3790
|
async run({ args }) {
|
|
@@ -3694,7 +3792,7 @@ var rmCmd5 = defineCommand28({
|
|
|
3694
3792
|
console.log(`removed skill ${args.name}`);
|
|
3695
3793
|
}
|
|
3696
3794
|
});
|
|
3697
|
-
var skillCommand =
|
|
3795
|
+
var skillCommand = defineCommand29({
|
|
3698
3796
|
meta: { name: "skill", description: "Manage the skill library" },
|
|
3699
3797
|
subCommands: {
|
|
3700
3798
|
list: listCmd9,
|
|
@@ -3706,10 +3804,10 @@ var skillCommand = defineCommand28({
|
|
|
3706
3804
|
// src/commands/team.ts
|
|
3707
3805
|
import { readFileSync as readFileSync9 } from "node:fs";
|
|
3708
3806
|
import { stdin as stdin2 } from "node:process";
|
|
3709
|
-
import { defineCommand as
|
|
3807
|
+
import { defineCommand as defineCommand34 } from "citty";
|
|
3710
3808
|
|
|
3711
3809
|
// src/commands/team-environment.ts
|
|
3712
|
-
import { defineCommand as
|
|
3810
|
+
import { defineCommand as defineCommand30 } from "citty";
|
|
3713
3811
|
function print2(status) {
|
|
3714
3812
|
console.log(
|
|
3715
3813
|
`sandbox: ${status.sandboxMode}${status.sandboxMode === "off" ? " (defaults unused)" : ""}`
|
|
@@ -3717,13 +3815,13 @@ function print2(status) {
|
|
|
3717
3815
|
console.log(`image: ${status.image ?? `${status.defaultImage} (installation default)`}`);
|
|
3718
3816
|
console.log(`cwd: ${status.cwd}`);
|
|
3719
3817
|
}
|
|
3720
|
-
var teamEnvironmentCommand =
|
|
3818
|
+
var teamEnvironmentCommand = defineCommand30({
|
|
3721
3819
|
meta: {
|
|
3722
3820
|
name: "environment",
|
|
3723
3821
|
description: "A Team's Docker sandbox defaults: local image and working directory"
|
|
3724
3822
|
},
|
|
3725
3823
|
subCommands: {
|
|
3726
|
-
show:
|
|
3824
|
+
show: defineCommand30({
|
|
3727
3825
|
meta: { name: "show", description: "Show a Team's Docker sandbox defaults" },
|
|
3728
3826
|
args: { team: teamArg, json: jsonFlag },
|
|
3729
3827
|
async run({ args }) {
|
|
@@ -3732,7 +3830,7 @@ var teamEnvironmentCommand = defineCommand29({
|
|
|
3732
3830
|
else print2(status);
|
|
3733
3831
|
}
|
|
3734
3832
|
}),
|
|
3735
|
-
set:
|
|
3833
|
+
set: defineCommand30({
|
|
3736
3834
|
meta: { name: "set", description: "Set a Team's Docker sandbox defaults" },
|
|
3737
3835
|
args: {
|
|
3738
3836
|
team: teamArg,
|
|
@@ -3761,8 +3859,54 @@ var teamEnvironmentCommand = defineCommand29({
|
|
|
3761
3859
|
}
|
|
3762
3860
|
});
|
|
3763
3861
|
|
|
3862
|
+
// src/commands/team-messages.ts
|
|
3863
|
+
import { defineCommand as defineCommand31 } from "citty";
|
|
3864
|
+
function decodeText2(payload) {
|
|
3865
|
+
try {
|
|
3866
|
+
const parsed = JSON.parse(payload);
|
|
3867
|
+
if (typeof parsed.text === "string") return parsed.text;
|
|
3868
|
+
} catch {
|
|
3869
|
+
}
|
|
3870
|
+
return payload;
|
|
3871
|
+
}
|
|
3872
|
+
var teamMessagesCommand = defineCommand31({
|
|
3873
|
+
meta: {
|
|
3874
|
+
name: "messages",
|
|
3875
|
+
description: "List the messages the Agents of a Team sent and received, newest first"
|
|
3876
|
+
},
|
|
3877
|
+
args: {
|
|
3878
|
+
id: teamArg,
|
|
3879
|
+
limit: { type: "string", default: "50", description: "Messages to show (at most 500)" },
|
|
3880
|
+
json: jsonFlag
|
|
3881
|
+
},
|
|
3882
|
+
async run({ args }) {
|
|
3883
|
+
const client = createClient2();
|
|
3884
|
+
const [thread, agents] = await Promise.all([
|
|
3885
|
+
client.get(
|
|
3886
|
+
`${apiPath("teams", args.id, "messages")}?limit=${encodeURIComponent(args.limit)}`
|
|
3887
|
+
),
|
|
3888
|
+
client.get("/api/agents?includeArchived=true")
|
|
3889
|
+
]);
|
|
3890
|
+
if (args.json) return printJson(thread);
|
|
3891
|
+
const names = new Map(agents.map((agent) => [agent.id, agent.name]));
|
|
3892
|
+
const name = (id) => names.get(id) ?? id.slice(0, 8);
|
|
3893
|
+
printRows(
|
|
3894
|
+
thread.messages.map((message) => {
|
|
3895
|
+
const text = decodeText2(message.payload).replace(/\s+/g, " ").trim();
|
|
3896
|
+
return [
|
|
3897
|
+
new Date(message.createdAt).toISOString(),
|
|
3898
|
+
`${name(message.fromAgentId)} -> ${name(message.toAgentId)}`,
|
|
3899
|
+
message.readAt ? "read" : "NEW",
|
|
3900
|
+
terminalSafe(text.length > 80 ? `${text.slice(0, 80)}\u2026` : text)
|
|
3901
|
+
];
|
|
3902
|
+
}),
|
|
3903
|
+
"(no messages between Agents yet)"
|
|
3904
|
+
);
|
|
3905
|
+
}
|
|
3906
|
+
});
|
|
3907
|
+
|
|
3764
3908
|
// src/commands/team-policy.ts
|
|
3765
|
-
import { defineCommand as
|
|
3909
|
+
import { defineCommand as defineCommand32 } from "citty";
|
|
3766
3910
|
function label(policy, endpoint) {
|
|
3767
3911
|
if (endpoint === OUTSIDE_TEAM) return "outside";
|
|
3768
3912
|
return policy.members.find((agent) => agent.id === endpoint)?.name ?? endpoint;
|
|
@@ -3780,7 +3924,7 @@ function resolveEndpoint(policy, value) {
|
|
|
3780
3924
|
}
|
|
3781
3925
|
throw new Error(`${value} is not a member of Team ${policy.teamId} (or outside)`);
|
|
3782
3926
|
}
|
|
3783
|
-
var show3 =
|
|
3927
|
+
var show3 = defineCommand32({
|
|
3784
3928
|
meta: { name: "show", description: "Show a Team's policy mode, members and allow edges" },
|
|
3785
3929
|
args: { team: teamArg, json: jsonFlag },
|
|
3786
3930
|
async run({ args }) {
|
|
@@ -3800,7 +3944,7 @@ var show3 = defineCommand30({
|
|
|
3800
3944
|
console.log(line);
|
|
3801
3945
|
}
|
|
3802
3946
|
});
|
|
3803
|
-
var mode =
|
|
3947
|
+
var mode = defineCommand32({
|
|
3804
3948
|
meta: {
|
|
3805
3949
|
name: "mode",
|
|
3806
3950
|
description: "Set a Team to open (members talk freely) or restricted (allow edges only)"
|
|
@@ -3816,7 +3960,7 @@ var mode = defineCommand30({
|
|
|
3816
3960
|
}
|
|
3817
3961
|
});
|
|
3818
3962
|
function edgeCommand(name) {
|
|
3819
|
-
return
|
|
3963
|
+
return defineCommand32({
|
|
3820
3964
|
meta: {
|
|
3821
3965
|
name,
|
|
3822
3966
|
description: name === "allow" ? "Let one endpoint message another (a member name or id, or outside)" : "Remove an allow edge"
|
|
@@ -3846,7 +3990,7 @@ function edgeCommand(name) {
|
|
|
3846
3990
|
}
|
|
3847
3991
|
});
|
|
3848
3992
|
}
|
|
3849
|
-
var teamPolicyCommand =
|
|
3993
|
+
var teamPolicyCommand = defineCommand32({
|
|
3850
3994
|
meta: { name: "policy", description: "Who may message whom inside and across a Team" },
|
|
3851
3995
|
subCommands: {
|
|
3852
3996
|
show: show3,
|
|
@@ -3857,7 +4001,7 @@ var teamPolicyCommand = defineCommand30({
|
|
|
3857
4001
|
});
|
|
3858
4002
|
|
|
3859
4003
|
// src/commands/team-review.ts
|
|
3860
|
-
import { defineCommand as
|
|
4004
|
+
import { defineCommand as defineCommand33 } from "citty";
|
|
3861
4005
|
var base = {
|
|
3862
4006
|
type: "string",
|
|
3863
4007
|
description: "Comparison base: branch, tag, commit id or revision such as HEAD~1 (default HEAD)"
|
|
@@ -3865,7 +4009,7 @@ var base = {
|
|
|
3865
4009
|
function printIssues(changes) {
|
|
3866
4010
|
for (const issue of changes.issues) console.log(`note: ${issue.code}: ${issue.message}`);
|
|
3867
4011
|
}
|
|
3868
|
-
var showCmd5 =
|
|
4012
|
+
var showCmd5 = defineCommand33({
|
|
3869
4013
|
meta: {
|
|
3870
4014
|
name: "show",
|
|
3871
4015
|
description: "List changes since a baseline, or print one file diff (read-only)"
|
|
@@ -3883,7 +4027,8 @@ var showCmd5 = defineCommand31({
|
|
|
3883
4027
|
const client = createClient2();
|
|
3884
4028
|
const review = await client.repositoryReview(args.id).changes({
|
|
3885
4029
|
...args.base ? { base: args.base } : {},
|
|
3886
|
-
...args.patch ? { patches: true, path: args.patch } : args.json ? { patches: true } : {}
|
|
4030
|
+
...args.patch ? { patches: true, path: args.patch } : args.json ? { patches: true } : {},
|
|
4031
|
+
authors: !args.patch
|
|
3887
4032
|
});
|
|
3888
4033
|
if (args.json) return printJson(review);
|
|
3889
4034
|
const changes = review.changes;
|
|
@@ -3908,7 +4053,8 @@ var showCmd5 = defineCommand31({
|
|
|
3908
4053
|
change.status,
|
|
3909
4054
|
change.previousPath ? `${change.previousPath} -> ${change.path}` : change.path,
|
|
3910
4055
|
change.binary ? "binary" : change.addedLines === null ? "" : `${change.addedLines}+ ${change.deletedLines ?? 0}-`,
|
|
3911
|
-
change.contentOmitted ?? ""
|
|
4056
|
+
change.contentOmitted ?? "",
|
|
4057
|
+
review.authors?.[change.path] ? `by ${review.authors[change.path]?.agentName}` : ""
|
|
3912
4058
|
]),
|
|
3913
4059
|
"(no changes since baseline)"
|
|
3914
4060
|
);
|
|
@@ -3922,31 +4068,44 @@ var showCmd5 = defineCommand31({
|
|
|
3922
4068
|
printIssues(changes);
|
|
3923
4069
|
}
|
|
3924
4070
|
});
|
|
3925
|
-
var feedbackCmd =
|
|
4071
|
+
var feedbackCmd = defineCommand33({
|
|
3926
4072
|
meta: {
|
|
3927
4073
|
name: "feedback",
|
|
3928
|
-
description: "Queue
|
|
4074
|
+
description: "Queue a comment about a changed file, or one of its lines, for an Agent (diff excerpt, note)"
|
|
3929
4075
|
},
|
|
3930
4076
|
args: {
|
|
3931
4077
|
id: teamArg,
|
|
3932
4078
|
path: { type: "string", required: true, description: "Changed path the feedback is about" },
|
|
3933
4079
|
agent: { type: "string", required: true, description: "Team member to send it to" },
|
|
3934
4080
|
note: { type: "string", description: "Your comment" },
|
|
4081
|
+
line: {
|
|
4082
|
+
type: "string",
|
|
4083
|
+
description: "Line of the file as it is now; the diff around it is sent instead of the top"
|
|
4084
|
+
},
|
|
3935
4085
|
base
|
|
3936
4086
|
},
|
|
3937
4087
|
async run({ args }) {
|
|
3938
4088
|
const client = createClient2();
|
|
4089
|
+
const line = args.line === void 0 ? void 0 : Number(args.line);
|
|
4090
|
+
if (line !== void 0 && (!Number.isSafeInteger(line) || line < 1)) {
|
|
4091
|
+
throw new Error("--line must be a line number starting at 1");
|
|
4092
|
+
}
|
|
3939
4093
|
const queued = await client.repositoryReview(args.id).feedback({
|
|
3940
|
-
path: args.path,
|
|
3941
4094
|
agentId: args.agent,
|
|
3942
|
-
|
|
4095
|
+
comments: [
|
|
4096
|
+
{
|
|
4097
|
+
path: args.path,
|
|
4098
|
+
...line === void 0 ? {} : { line },
|
|
4099
|
+
...args.note ? { note: args.note } : {}
|
|
4100
|
+
}
|
|
4101
|
+
],
|
|
3943
4102
|
...args.base ? { base: args.base } : {}
|
|
3944
4103
|
});
|
|
3945
4104
|
console.log(`queued ${queued.item.id} for ${args.agent} (${queued.item.status})`);
|
|
3946
4105
|
console.log(queued.message);
|
|
3947
4106
|
}
|
|
3948
4107
|
});
|
|
3949
|
-
var teamReviewCommand =
|
|
4108
|
+
var teamReviewCommand = defineCommand33({
|
|
3950
4109
|
meta: {
|
|
3951
4110
|
name: "review",
|
|
3952
4111
|
description: "Git change review: changes since a base, diffs, and file feedback"
|
|
@@ -3958,7 +4117,7 @@ var teamReviewCommand = defineCommand31({
|
|
|
3958
4117
|
});
|
|
3959
4118
|
|
|
3960
4119
|
// src/commands/team.ts
|
|
3961
|
-
var addCmd3 =
|
|
4120
|
+
var addCmd3 = defineCommand34({
|
|
3962
4121
|
meta: {
|
|
3963
4122
|
name: "add",
|
|
3964
4123
|
description: "Register a team at ~/.bazilion/teams/<slug>/ (use --link to point at an existing tree)"
|
|
@@ -3981,7 +4140,7 @@ var addCmd3 = defineCommand32({
|
|
|
3981
4140
|
console.log(`registered team ${team.id} at ${team.path}`);
|
|
3982
4141
|
}
|
|
3983
4142
|
});
|
|
3984
|
-
var listCmd10 =
|
|
4143
|
+
var listCmd10 = defineCommand34({
|
|
3985
4144
|
meta: { name: "list", description: "List teams" },
|
|
3986
4145
|
async run() {
|
|
3987
4146
|
const list7 = await createClient2().get("/api/teams");
|
|
@@ -3991,7 +4150,7 @@ var listCmd10 = defineCommand32({
|
|
|
3991
4150
|
);
|
|
3992
4151
|
}
|
|
3993
4152
|
});
|
|
3994
|
-
var rmCmd6 =
|
|
4153
|
+
var rmCmd6 = defineCommand34({
|
|
3995
4154
|
meta: {
|
|
3996
4155
|
name: "rm",
|
|
3997
4156
|
description: "Delete an empty team and its workspace directory (a --link target is kept)"
|
|
@@ -4007,7 +4166,7 @@ async function readStdin() {
|
|
|
4007
4166
|
for await (const chunk of stdin2) chunks.push(chunk);
|
|
4008
4167
|
return Buffer.concat(chunks).toString("utf8");
|
|
4009
4168
|
}
|
|
4010
|
-
var userMdShowCmd =
|
|
4169
|
+
var userMdShowCmd = defineCommand34({
|
|
4011
4170
|
meta: { name: "show", description: "Print the team's USER.md" },
|
|
4012
4171
|
args: { id: teamArg },
|
|
4013
4172
|
async run({ args }) {
|
|
@@ -4016,7 +4175,7 @@ var userMdShowCmd = defineCommand32({
|
|
|
4016
4175
|
if (team.userMd && !team.userMd.endsWith("\n")) process.stdout.write("\n");
|
|
4017
4176
|
}
|
|
4018
4177
|
});
|
|
4019
|
-
var userMdSetCmd =
|
|
4178
|
+
var userMdSetCmd = defineCommand34({
|
|
4020
4179
|
meta: {
|
|
4021
4180
|
name: "set",
|
|
4022
4181
|
description: "Replace the team's USER.md (from --file, --from-stdin, or inline text)"
|
|
@@ -4038,7 +4197,7 @@ var userMdSetCmd = defineCommand32({
|
|
|
4038
4197
|
console.log(`updated USER.md for team ${args.id} (${content.length} bytes)`);
|
|
4039
4198
|
}
|
|
4040
4199
|
});
|
|
4041
|
-
var userMdClearCmd =
|
|
4200
|
+
var userMdClearCmd = defineCommand34({
|
|
4042
4201
|
meta: { name: "clear", description: "Clear the team's USER.md to empty" },
|
|
4043
4202
|
args: { id: teamArg },
|
|
4044
4203
|
async run({ args }) {
|
|
@@ -4047,7 +4206,7 @@ var userMdClearCmd = defineCommand32({
|
|
|
4047
4206
|
console.log(`cleared USER.md for team ${args.id}`);
|
|
4048
4207
|
}
|
|
4049
4208
|
});
|
|
4050
|
-
var userMdCmd =
|
|
4209
|
+
var userMdCmd = defineCommand34({
|
|
4051
4210
|
meta: { name: "user-md", description: "View or edit a team's USER.md" },
|
|
4052
4211
|
subCommands: {
|
|
4053
4212
|
show: userMdShowCmd,
|
|
@@ -4055,7 +4214,7 @@ var userMdCmd = defineCommand32({
|
|
|
4055
4214
|
clear: userMdClearCmd
|
|
4056
4215
|
}
|
|
4057
4216
|
});
|
|
4058
|
-
var topicFormatShowCmd =
|
|
4217
|
+
var topicFormatShowCmd = defineCommand34({
|
|
4059
4218
|
meta: { name: "show", description: "Print the team's Telegram topic-name template" },
|
|
4060
4219
|
args: { id: teamArg },
|
|
4061
4220
|
async run({ args }) {
|
|
@@ -4063,7 +4222,7 @@ var topicFormatShowCmd = defineCommand32({
|
|
|
4063
4222
|
console.log(team.telegramTopicNameFormat ?? "(default naming)");
|
|
4064
4223
|
}
|
|
4065
4224
|
});
|
|
4066
|
-
var topicFormatSetCmd =
|
|
4225
|
+
var topicFormatSetCmd = defineCommand34({
|
|
4067
4226
|
meta: {
|
|
4068
4227
|
name: "set",
|
|
4069
4228
|
description: "Set the topic-name template. Tokens: {agent.name} {team.name} {team.slug} (must include {agent.name})"
|
|
@@ -4082,7 +4241,7 @@ var topicFormatSetCmd = defineCommand32({
|
|
|
4082
4241
|
console.log(`set topic-name template for team ${args.id}: ${team.telegramTopicNameFormat}`);
|
|
4083
4242
|
}
|
|
4084
4243
|
});
|
|
4085
|
-
var topicFormatClearCmd =
|
|
4244
|
+
var topicFormatClearCmd = defineCommand34({
|
|
4086
4245
|
meta: { name: "clear", description: "Clear the template (revert to built-in naming)" },
|
|
4087
4246
|
args: { id: teamArg },
|
|
4088
4247
|
async run({ args }) {
|
|
@@ -4091,7 +4250,7 @@ var topicFormatClearCmd = defineCommand32({
|
|
|
4091
4250
|
console.log(`cleared topic-name template for team ${args.id}`);
|
|
4092
4251
|
}
|
|
4093
4252
|
});
|
|
4094
|
-
var topicFormatCmd =
|
|
4253
|
+
var topicFormatCmd = defineCommand34({
|
|
4095
4254
|
meta: {
|
|
4096
4255
|
name: "topic-format",
|
|
4097
4256
|
description: "View or edit a team's Telegram forum-topic name template"
|
|
@@ -4102,11 +4261,12 @@ var topicFormatCmd = defineCommand32({
|
|
|
4102
4261
|
clear: topicFormatClearCmd
|
|
4103
4262
|
}
|
|
4104
4263
|
});
|
|
4105
|
-
var teamCommand =
|
|
4264
|
+
var teamCommand = defineCommand34({
|
|
4106
4265
|
meta: { name: "team", description: "Manage teams (collaboration contexts)" },
|
|
4107
4266
|
subCommands: {
|
|
4108
4267
|
environment: teamEnvironmentCommand,
|
|
4109
4268
|
review: teamReviewCommand,
|
|
4269
|
+
messages: teamMessagesCommand,
|
|
4110
4270
|
add: addCmd3,
|
|
4111
4271
|
list: listCmd10,
|
|
4112
4272
|
rm: rmCmd6,
|
|
@@ -4118,7 +4278,7 @@ var teamCommand = defineCommand32({
|
|
|
4118
4278
|
|
|
4119
4279
|
// src/commands/team-template.ts
|
|
4120
4280
|
import { readFileSync as readFileSync10 } from "node:fs";
|
|
4121
|
-
import { defineCommand as
|
|
4281
|
+
import { defineCommand as defineCommand35 } from "citty";
|
|
4122
4282
|
var templateArg = positional("Template id");
|
|
4123
4283
|
function endpointLabel(template, end) {
|
|
4124
4284
|
return end === "outside" ? "outside" : `${end}:${template.slots[end]?.agentName ?? "?"}`;
|
|
@@ -4162,7 +4322,7 @@ function document(template) {
|
|
|
4162
4322
|
edges: template.edges
|
|
4163
4323
|
};
|
|
4164
4324
|
}
|
|
4165
|
-
var list6 =
|
|
4325
|
+
var list6 = defineCommand35({
|
|
4166
4326
|
meta: { name: "list", description: "List Team templates" },
|
|
4167
4327
|
args: { json: jsonFlag },
|
|
4168
4328
|
async run({ args }) {
|
|
@@ -4176,7 +4336,7 @@ var list6 = defineCommand33({
|
|
|
4176
4336
|
console.log(line);
|
|
4177
4337
|
}
|
|
4178
4338
|
});
|
|
4179
|
-
var show4 =
|
|
4339
|
+
var show4 = defineCommand35({
|
|
4180
4340
|
meta: { name: "show", description: "Show a Team template" },
|
|
4181
4341
|
args: { id: templateArg, json: jsonFlag },
|
|
4182
4342
|
async run({ args }) {
|
|
@@ -4185,7 +4345,7 @@ var show4 = defineCommand33({
|
|
|
4185
4345
|
else printTemplate(template);
|
|
4186
4346
|
}
|
|
4187
4347
|
});
|
|
4188
|
-
var create =
|
|
4348
|
+
var create = defineCommand35({
|
|
4189
4349
|
meta: { name: "create", description: "Create an empty Team template" },
|
|
4190
4350
|
args: {
|
|
4191
4351
|
id: positional("Template slug"),
|
|
@@ -4197,7 +4357,7 @@ var create = defineCommand33({
|
|
|
4197
4357
|
console.log(`created Team template ${created.id}`);
|
|
4198
4358
|
}
|
|
4199
4359
|
});
|
|
4200
|
-
var exportCommand =
|
|
4360
|
+
var exportCommand = defineCommand35({
|
|
4201
4361
|
meta: { name: "export", description: "Print a Team template as JSON for editing or import" },
|
|
4202
4362
|
args: { id: templateArg },
|
|
4203
4363
|
async run({ args }) {
|
|
@@ -4205,7 +4365,7 @@ var exportCommand = defineCommand33({
|
|
|
4205
4365
|
printJson(document(template));
|
|
4206
4366
|
}
|
|
4207
4367
|
});
|
|
4208
|
-
var importCommand =
|
|
4368
|
+
var importCommand = defineCommand35({
|
|
4209
4369
|
meta: {
|
|
4210
4370
|
name: "import",
|
|
4211
4371
|
description: "Create a Team template from JSON, or replace the one with the same id"
|
|
@@ -4228,7 +4388,7 @@ var importCommand = defineCommand33({
|
|
|
4228
4388
|
);
|
|
4229
4389
|
}
|
|
4230
4390
|
});
|
|
4231
|
-
var rm2 =
|
|
4391
|
+
var rm2 = defineCommand35({
|
|
4232
4392
|
meta: { name: "rm", description: "Delete a Team template (spawned Teams are unaffected)" },
|
|
4233
4393
|
args: { id: templateArg },
|
|
4234
4394
|
async run({ args }) {
|
|
@@ -4236,7 +4396,7 @@ var rm2 = defineCommand33({
|
|
|
4236
4396
|
console.log(`deleted Team template ${args.id}`);
|
|
4237
4397
|
}
|
|
4238
4398
|
});
|
|
4239
|
-
var spawn4 =
|
|
4399
|
+
var spawn4 = defineCommand35({
|
|
4240
4400
|
meta: {
|
|
4241
4401
|
name: "spawn",
|
|
4242
4402
|
description: "Spawn one Agent per slot into a Team; an unknown Team slug creates the Team"
|
|
@@ -4260,7 +4420,7 @@ var spawn4 = defineCommand33({
|
|
|
4260
4420
|
);
|
|
4261
4421
|
}
|
|
4262
4422
|
});
|
|
4263
|
-
var save =
|
|
4423
|
+
var save = defineCommand35({
|
|
4264
4424
|
meta: {
|
|
4265
4425
|
name: "save",
|
|
4266
4426
|
description: "Save a live Team's members, edges, mode and USER.md as a new template"
|
|
@@ -4279,7 +4439,7 @@ var save = defineCommand33({
|
|
|
4279
4439
|
console.log(`saved Team ${args.team} as template ${saved.id} (${saved.slots.length} slots)`);
|
|
4280
4440
|
}
|
|
4281
4441
|
});
|
|
4282
|
-
var teamTemplateCommand =
|
|
4442
|
+
var teamTemplateCommand = defineCommand35({
|
|
4283
4443
|
meta: { name: "team-template", description: "Reusable Team rosters with their allow edges" },
|
|
4284
4444
|
subCommands: {
|
|
4285
4445
|
list: list6,
|
|
@@ -4294,9 +4454,9 @@ var teamTemplateCommand = defineCommand33({
|
|
|
4294
4454
|
});
|
|
4295
4455
|
|
|
4296
4456
|
// src/commands/telegram.ts
|
|
4297
|
-
import { defineCommand as
|
|
4457
|
+
import { defineCommand as defineCommand36 } from "citty";
|
|
4298
4458
|
var telegramUserArg = positional("Numeric Telegram user id");
|
|
4299
|
-
var setCmd2 =
|
|
4459
|
+
var setCmd2 = defineCommand36({
|
|
4300
4460
|
meta: {
|
|
4301
4461
|
name: "set",
|
|
4302
4462
|
description: "Save bot token + supergroup chat ID (paired write)"
|
|
@@ -4314,7 +4474,7 @@ var setCmd2 = defineCommand34({
|
|
|
4314
4474
|
console.log(`saved \xB7 token ${state.botTokenPreview} \xB7 chat ${state.chatId}`);
|
|
4315
4475
|
}
|
|
4316
4476
|
});
|
|
4317
|
-
var clearCmd =
|
|
4477
|
+
var clearCmd = defineCommand36({
|
|
4318
4478
|
meta: {
|
|
4319
4479
|
name: "clear",
|
|
4320
4480
|
description: "Remove stored bot token + chat ID"
|
|
@@ -4325,7 +4485,7 @@ var clearCmd = defineCommand34({
|
|
|
4325
4485
|
console.log("cleared");
|
|
4326
4486
|
}
|
|
4327
4487
|
});
|
|
4328
|
-
var showCmd6 =
|
|
4488
|
+
var showCmd6 = defineCommand36({
|
|
4329
4489
|
meta: {
|
|
4330
4490
|
name: "show",
|
|
4331
4491
|
description: "Show what credentials are stored (token is masked)"
|
|
@@ -4346,7 +4506,7 @@ var showCmd6 = defineCommand34({
|
|
|
4346
4506
|
}
|
|
4347
4507
|
}
|
|
4348
4508
|
});
|
|
4349
|
-
var reconnectCmd =
|
|
4509
|
+
var reconnectCmd = defineCommand36({
|
|
4350
4510
|
meta: {
|
|
4351
4511
|
name: "reconnect",
|
|
4352
4512
|
description: "Apply a pending supergroup chat-id migration + re-activate the bot"
|
|
@@ -4357,7 +4517,7 @@ var reconnectCmd = defineCommand34({
|
|
|
4357
4517
|
console.log(`reconnected \xB7 chat ${state.chatId}`);
|
|
4358
4518
|
}
|
|
4359
4519
|
});
|
|
4360
|
-
var configCmd =
|
|
4520
|
+
var configCmd = defineCommand36({
|
|
4361
4521
|
meta: {
|
|
4362
4522
|
name: "config",
|
|
4363
4523
|
description: "Manage Telegram credentials (bot token + chat ID)"
|
|
@@ -4368,7 +4528,7 @@ var configCmd = defineCommand34({
|
|
|
4368
4528
|
show: showCmd6
|
|
4369
4529
|
}
|
|
4370
4530
|
});
|
|
4371
|
-
var healthCmd =
|
|
4531
|
+
var healthCmd = defineCommand36({
|
|
4372
4532
|
meta: {
|
|
4373
4533
|
name: "health",
|
|
4374
4534
|
description: "Run the four-step preflight against the Telegram Bot API"
|
|
@@ -4398,7 +4558,7 @@ var healthCmd = defineCommand34({
|
|
|
4398
4558
|
if (!allOk) process.exitCode = 1;
|
|
4399
4559
|
}
|
|
4400
4560
|
});
|
|
4401
|
-
var botStatusCmd =
|
|
4561
|
+
var botStatusCmd = defineCommand36({
|
|
4402
4562
|
meta: {
|
|
4403
4563
|
name: "status",
|
|
4404
4564
|
description: "Show polling state of the live bot"
|
|
@@ -4423,7 +4583,7 @@ var botStatusCmd = defineCommand34({
|
|
|
4423
4583
|
if (!p.running) process.exitCode = 1;
|
|
4424
4584
|
}
|
|
4425
4585
|
});
|
|
4426
|
-
var botRestartCmd =
|
|
4586
|
+
var botRestartCmd = defineCommand36({
|
|
4427
4587
|
meta: {
|
|
4428
4588
|
name: "restart",
|
|
4429
4589
|
description: "Force-restart the bot (tears down + brings up from current creds)"
|
|
@@ -4434,7 +4594,7 @@ var botRestartCmd = defineCommand34({
|
|
|
4434
4594
|
console.log("restart requested");
|
|
4435
4595
|
}
|
|
4436
4596
|
});
|
|
4437
|
-
var botCmd =
|
|
4597
|
+
var botCmd = defineCommand36({
|
|
4438
4598
|
meta: {
|
|
4439
4599
|
name: "bot",
|
|
4440
4600
|
description: "Inspect / control the live polling bot"
|
|
@@ -4444,7 +4604,7 @@ var botCmd = defineCommand34({
|
|
|
4444
4604
|
restart: botRestartCmd
|
|
4445
4605
|
}
|
|
4446
4606
|
});
|
|
4447
|
-
var bindCmd =
|
|
4607
|
+
var bindCmd = defineCommand36({
|
|
4448
4608
|
meta: {
|
|
4449
4609
|
name: "bind",
|
|
4450
4610
|
description: "Create a Telegram topic for an agent (manual fallback for /talk)"
|
|
@@ -4459,7 +4619,7 @@ var bindCmd = defineCommand34({
|
|
|
4459
4619
|
console.log(` ${result.deepLink}`);
|
|
4460
4620
|
}
|
|
4461
4621
|
});
|
|
4462
|
-
var unbindCmd =
|
|
4622
|
+
var unbindCmd = defineCommand36({
|
|
4463
4623
|
meta: {
|
|
4464
4624
|
name: "unbind",
|
|
4465
4625
|
description: "Clear an agent's Telegram topic binding (topic stays in Telegram as orphan)"
|
|
@@ -4470,7 +4630,7 @@ var unbindCmd = defineCommand34({
|
|
|
4470
4630
|
console.log(`unbound agent ${args.agent}`);
|
|
4471
4631
|
}
|
|
4472
4632
|
});
|
|
4473
|
-
var listBindingsCmd =
|
|
4633
|
+
var listBindingsCmd = defineCommand36({
|
|
4474
4634
|
meta: {
|
|
4475
4635
|
name: "list",
|
|
4476
4636
|
description: "List agents and their Telegram topic bindings"
|
|
@@ -4498,7 +4658,7 @@ var listBindingsCmd = defineCommand34({
|
|
|
4498
4658
|
}
|
|
4499
4659
|
}
|
|
4500
4660
|
});
|
|
4501
|
-
var allowCmd =
|
|
4661
|
+
var allowCmd = defineCommand36({
|
|
4502
4662
|
meta: { name: "allow", description: "Add a Telegram user id to the allowlist" },
|
|
4503
4663
|
args: {
|
|
4504
4664
|
userId: telegramUserArg,
|
|
@@ -4514,7 +4674,7 @@ var allowCmd = defineCommand34({
|
|
|
4514
4674
|
console.log(`allowed ${u.userId} (${u.role})`);
|
|
4515
4675
|
}
|
|
4516
4676
|
});
|
|
4517
|
-
var denyCmd =
|
|
4677
|
+
var denyCmd = defineCommand36({
|
|
4518
4678
|
meta: { name: "deny", description: "Remove a Telegram user id from the allowlist" },
|
|
4519
4679
|
args: { userId: telegramUserArg },
|
|
4520
4680
|
async run({ args }) {
|
|
@@ -4523,7 +4683,7 @@ var denyCmd = defineCommand34({
|
|
|
4523
4683
|
console.log(`removed ${args.userId}`);
|
|
4524
4684
|
}
|
|
4525
4685
|
});
|
|
4526
|
-
var allowedCmd =
|
|
4686
|
+
var allowedCmd = defineCommand36({
|
|
4527
4687
|
meta: { name: "allowed", description: "List allowlisted Telegram users" },
|
|
4528
4688
|
async run() {
|
|
4529
4689
|
const client = createClient2();
|
|
@@ -4538,7 +4698,7 @@ var allowedCmd = defineCommand34({
|
|
|
4538
4698
|
}
|
|
4539
4699
|
}
|
|
4540
4700
|
});
|
|
4541
|
-
var pairingCreateCmd =
|
|
4701
|
+
var pairingCreateCmd = defineCommand36({
|
|
4542
4702
|
meta: { name: "create", description: "Generate a one-time Telegram owner pairing code" },
|
|
4543
4703
|
async run() {
|
|
4544
4704
|
const result = await createClient2().post(
|
|
@@ -4549,7 +4709,7 @@ var pairingCreateCmd = defineCommand34({
|
|
|
4549
4709
|
console.log("send `/pair <code>` in the configured \u2699 bazilion service topic");
|
|
4550
4710
|
}
|
|
4551
4711
|
});
|
|
4552
|
-
var pairingStatusCmd =
|
|
4712
|
+
var pairingStatusCmd = defineCommand36({
|
|
4553
4713
|
meta: { name: "status", description: "Show Telegram owner pairing status" },
|
|
4554
4714
|
async run() {
|
|
4555
4715
|
const result = await createClient2().get("/api/config/telegram/pairing");
|
|
@@ -4560,14 +4720,14 @@ var pairingStatusCmd = defineCommand34({
|
|
|
4560
4720
|
console.log(`expires: ${new Date(result.challengeExpiresAt).toISOString()}`);
|
|
4561
4721
|
}
|
|
4562
4722
|
});
|
|
4563
|
-
var pairingCancelCmd =
|
|
4723
|
+
var pairingCancelCmd = defineCommand36({
|
|
4564
4724
|
meta: { name: "cancel", description: "Cancel the active Telegram pairing code" },
|
|
4565
4725
|
async run() {
|
|
4566
4726
|
await createClient2().del("/api/config/telegram/pairing/challenge");
|
|
4567
4727
|
console.log("pairing challenge cancelled");
|
|
4568
4728
|
}
|
|
4569
4729
|
});
|
|
4570
|
-
var pairingResetCmd =
|
|
4730
|
+
var pairingResetCmd = defineCommand36({
|
|
4571
4731
|
meta: { name: "reset", description: "Revoke the Telegram owner and require re-pairing" },
|
|
4572
4732
|
args: {
|
|
4573
4733
|
yes: { type: "boolean", description: "Confirm destructive owner reset", required: true }
|
|
@@ -4578,7 +4738,7 @@ var pairingResetCmd = defineCommand34({
|
|
|
4578
4738
|
console.log("Telegram owner reset; ingress is closed until re-paired");
|
|
4579
4739
|
}
|
|
4580
4740
|
});
|
|
4581
|
-
var pairingCmd =
|
|
4741
|
+
var pairingCmd = defineCommand36({
|
|
4582
4742
|
meta: { name: "pairing", description: "Manage single-owner Telegram pairing" },
|
|
4583
4743
|
subCommands: {
|
|
4584
4744
|
create: pairingCreateCmd,
|
|
@@ -4587,7 +4747,7 @@ var pairingCmd = defineCommand34({
|
|
|
4587
4747
|
reset: pairingResetCmd
|
|
4588
4748
|
}
|
|
4589
4749
|
});
|
|
4590
|
-
var telegramCommand =
|
|
4750
|
+
var telegramCommand = defineCommand36({
|
|
4591
4751
|
meta: {
|
|
4592
4752
|
name: "telegram",
|
|
4593
4753
|
description: "Telegram integration: credentials, health, bot lifecycle, bindings, access"
|
|
@@ -4608,7 +4768,7 @@ var telegramCommand = defineCommand34({
|
|
|
4608
4768
|
});
|
|
4609
4769
|
|
|
4610
4770
|
// src/commands/token.ts
|
|
4611
|
-
import { defineCommand as
|
|
4771
|
+
import { defineCommand as defineCommand37 } from "citty";
|
|
4612
4772
|
function tokenRow(t) {
|
|
4613
4773
|
const last = t.lastUsedAt ? new Date(t.lastUsedAt).toISOString() : "(never)";
|
|
4614
4774
|
const expired = t.expiresAt !== null && t.expiresAt <= Date.now();
|
|
@@ -4616,7 +4776,7 @@ function tokenRow(t) {
|
|
|
4616
4776
|
const expires = t.expiresAt ? new Date(t.expiresAt).toISOString() : "(never)";
|
|
4617
4777
|
return [t.id, t.kind, state, t.label, `expires: ${expires}`, `last: ${last}`];
|
|
4618
4778
|
}
|
|
4619
|
-
var createCmd3 =
|
|
4779
|
+
var createCmd3 = defineCommand37({
|
|
4620
4780
|
meta: { name: "create", description: "Mint a new device token with full access (shown once)" },
|
|
4621
4781
|
args: {
|
|
4622
4782
|
label: positional("Human-readable label"),
|
|
@@ -4644,7 +4804,7 @@ var createCmd3 = defineCommand35({
|
|
|
4644
4804
|
console.log("store the token now \u2014 it is not recoverable later.");
|
|
4645
4805
|
}
|
|
4646
4806
|
});
|
|
4647
|
-
var listCmd11 =
|
|
4807
|
+
var listCmd11 = defineCommand37({
|
|
4648
4808
|
meta: { name: "list", description: "List web tokens" },
|
|
4649
4809
|
args: {
|
|
4650
4810
|
all: { type: "boolean", description: "Include revoked tokens" }
|
|
@@ -4656,7 +4816,7 @@ var listCmd11 = defineCommand35({
|
|
|
4656
4816
|
printRows(tokens.map(tokenRow), "(no tokens)");
|
|
4657
4817
|
}
|
|
4658
4818
|
});
|
|
4659
|
-
var showLocalCmd =
|
|
4819
|
+
var showLocalCmd = defineCommand37({
|
|
4660
4820
|
meta: {
|
|
4661
4821
|
name: "show-local",
|
|
4662
4822
|
description: "Print the bootstrap web token stored in ~/.bazilion/auth.json"
|
|
@@ -4666,7 +4826,7 @@ var showLocalCmd = defineCommand35({
|
|
|
4666
4826
|
console.log(readAuthFile(paths.authFile).token);
|
|
4667
4827
|
}
|
|
4668
4828
|
});
|
|
4669
|
-
var revokeCmd2 =
|
|
4829
|
+
var revokeCmd2 = defineCommand37({
|
|
4670
4830
|
meta: { name: "revoke", description: "Revoke a web token and its browser sessions" },
|
|
4671
4831
|
args: { id: positional("Token id") },
|
|
4672
4832
|
async run({ args }) {
|
|
@@ -4674,7 +4834,7 @@ var revokeCmd2 = defineCommand35({
|
|
|
4674
4834
|
console.log(`revoked token ${args.id}`);
|
|
4675
4835
|
}
|
|
4676
4836
|
});
|
|
4677
|
-
var tokenCommand =
|
|
4837
|
+
var tokenCommand = defineCommand37({
|
|
4678
4838
|
meta: { name: "token", description: "Manage web tokens for API/CLI clients" },
|
|
4679
4839
|
subCommands: {
|
|
4680
4840
|
create: createCmd3,
|
|
@@ -4685,12 +4845,12 @@ var tokenCommand = defineCommand35({
|
|
|
4685
4845
|
});
|
|
4686
4846
|
|
|
4687
4847
|
// src/commands/trigger.ts
|
|
4688
|
-
import { defineCommand as
|
|
4848
|
+
import { defineCommand as defineCommand38 } from "citty";
|
|
4689
4849
|
var triggerArg = positional("Trigger id");
|
|
4690
4850
|
function spec(t) {
|
|
4691
4851
|
return t.kind === "interval" ? `every ${t.intervalSec}s` : `cron "${t.cronExpr}"`;
|
|
4692
4852
|
}
|
|
4693
|
-
var addCmd4 =
|
|
4853
|
+
var addCmd4 = defineCommand38({
|
|
4694
4854
|
meta: { name: "add", description: "Add an interval / cron trigger to an agent" },
|
|
4695
4855
|
args: {
|
|
4696
4856
|
agent: agentArg,
|
|
@@ -4737,7 +4897,7 @@ function triggerRow(t) {
|
|
|
4737
4897
|
const msgPreview = t.message.length > 60 ? `${t.message.slice(0, 60)}\u2026` : t.message;
|
|
4738
4898
|
return [t.id, state, spec(t), `last: ${last}`, `"${msgPreview}"`];
|
|
4739
4899
|
}
|
|
4740
|
-
var listCmd12 =
|
|
4900
|
+
var listCmd12 = defineCommand38({
|
|
4741
4901
|
meta: { name: "list", description: "List triggers for an agent" },
|
|
4742
4902
|
args: { agent: agentArg },
|
|
4743
4903
|
async run({ args }) {
|
|
@@ -4747,7 +4907,7 @@ var listCmd12 = defineCommand36({
|
|
|
4747
4907
|
printRows(triggers.map(triggerRow), "(no triggers)");
|
|
4748
4908
|
}
|
|
4749
4909
|
});
|
|
4750
|
-
var rmCmd7 =
|
|
4910
|
+
var rmCmd7 = defineCommand38({
|
|
4751
4911
|
meta: { name: "rm", description: "Delete a trigger" },
|
|
4752
4912
|
args: { id: triggerArg },
|
|
4753
4913
|
async run({ args }) {
|
|
@@ -4755,7 +4915,7 @@ var rmCmd7 = defineCommand36({
|
|
|
4755
4915
|
console.log(`removed trigger ${args.id}`);
|
|
4756
4916
|
}
|
|
4757
4917
|
});
|
|
4758
|
-
var enableCmd3 =
|
|
4918
|
+
var enableCmd3 = defineCommand38({
|
|
4759
4919
|
meta: { name: "enable", description: "Enable a trigger" },
|
|
4760
4920
|
args: { id: triggerArg },
|
|
4761
4921
|
async run({ args }) {
|
|
@@ -4764,7 +4924,7 @@ var enableCmd3 = defineCommand36({
|
|
|
4764
4924
|
console.log(`enabled trigger ${args.id}`);
|
|
4765
4925
|
}
|
|
4766
4926
|
});
|
|
4767
|
-
var disableCmd3 =
|
|
4927
|
+
var disableCmd3 = defineCommand38({
|
|
4768
4928
|
meta: { name: "disable", description: "Disable a trigger" },
|
|
4769
4929
|
args: { id: triggerArg },
|
|
4770
4930
|
async run({ args }) {
|
|
@@ -4773,7 +4933,7 @@ var disableCmd3 = defineCommand36({
|
|
|
4773
4933
|
console.log(`disabled trigger ${args.id}`);
|
|
4774
4934
|
}
|
|
4775
4935
|
});
|
|
4776
|
-
var historyCmd =
|
|
4936
|
+
var historyCmd = defineCommand38({
|
|
4777
4937
|
meta: { name: "history", description: "Show recent runs of a trigger" },
|
|
4778
4938
|
args: {
|
|
4779
4939
|
id: triggerArg,
|
|
@@ -4797,7 +4957,7 @@ var historyCmd = defineCommand36({
|
|
|
4797
4957
|
);
|
|
4798
4958
|
}
|
|
4799
4959
|
});
|
|
4800
|
-
var triggerCommand =
|
|
4960
|
+
var triggerCommand = defineCommand38({
|
|
4801
4961
|
meta: { name: "trigger", description: "Manage scheduled agent triggers" },
|
|
4802
4962
|
subCommands: {
|
|
4803
4963
|
add: addCmd4,
|
|
@@ -4813,7 +4973,7 @@ var triggerCommand = defineCommand36({
|
|
|
4813
4973
|
import { existsSync as existsSync7, lstatSync, readdirSync as readdirSync2, rmdirSync, rmSync as rmSync4 } from "node:fs";
|
|
4814
4974
|
import { homedir as homedir2 } from "node:os";
|
|
4815
4975
|
import { join as join7 } from "node:path";
|
|
4816
|
-
import { defineCommand as
|
|
4976
|
+
import { defineCommand as defineCommand39 } from "citty";
|
|
4817
4977
|
var RESET_ENTRIES = [
|
|
4818
4978
|
"profiles",
|
|
4819
4979
|
"agents",
|
|
@@ -4827,7 +4987,7 @@ var RESET_ENTRIES = [
|
|
|
4827
4987
|
"auth.json"
|
|
4828
4988
|
];
|
|
4829
4989
|
var ALL_ENTRIES = [...RESET_ENTRIES, "skills"];
|
|
4830
|
-
var uninstallCommand =
|
|
4990
|
+
var uninstallCommand = defineCommand39({
|
|
4831
4991
|
meta: {
|
|
4832
4992
|
name: "uninstall",
|
|
4833
4993
|
description: "Delete the Bazilion data in ~/.bazilion (or BAZILION_HOME)"
|
|
@@ -4884,7 +5044,7 @@ var uninstallCommand = defineCommand37({
|
|
|
4884
5044
|
|
|
4885
5045
|
// src/index.ts
|
|
4886
5046
|
var VERSION = package_default.version;
|
|
4887
|
-
var main =
|
|
5047
|
+
var main = defineCommand40({
|
|
4888
5048
|
meta: {
|
|
4889
5049
|
name: "bazilion",
|
|
4890
5050
|
version: VERSION,
|
|
@@ -4896,6 +5056,7 @@ var main = defineCommand38({
|
|
|
4896
5056
|
team: teamCommand,
|
|
4897
5057
|
"team-template": teamTemplateCommand,
|
|
4898
5058
|
agent: agentCommand,
|
|
5059
|
+
activity: activityCommand,
|
|
4899
5060
|
attention: attentionCommand,
|
|
4900
5061
|
result: resultCommand,
|
|
4901
5062
|
conversation: conversationCommand,
|