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