bazilion 0.55.0 → 0.57.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 +193 -37
- package/dist/cli.js.map +1 -1
- package/dist/daemon.js +1821 -788
- package/dist/daemon.js.map +1 -1
- package/dist/web/client/assets/AddProviderDialog-DwUu2FGE.js +1 -0
- package/dist/web/client/assets/AgentTemplateParts-C3BasVck.js +1 -0
- package/dist/web/client/assets/{Button-bTJUy9Qf.js → Button-CoKQRO-s.js} +1 -1
- package/dist/web/client/assets/ConfigPage-DFmHgEaL.js +1 -0
- package/dist/web/client/assets/ConfirmDialog-BCOfW63x.js +1 -0
- package/dist/web/client/assets/ConnectionsView-BbpY5YbI.js +1 -0
- package/dist/web/client/assets/ManagePage-BzyMHGqs.js +1 -0
- package/dist/web/client/assets/SectionTabs-C8H_LunZ.js +1 -0
- package/dist/web/client/assets/{Segmented-oPkAHPO1.js → Segmented-iylzLwE6.js} +1 -1
- package/dist/web/client/assets/SkillsParts-DoygBgF2.js +1 -0
- package/dist/web/client/assets/SpawnTeamModal-BVf4yN9X.js +1 -0
- package/dist/web/client/assets/TeamForm-Bfb5hVUX.js +1 -0
- package/dist/web/client/assets/TeamThread-BFmaBj82.js +1 -0
- package/dist/web/client/assets/UnsavedChangesGuard-BUsIHSxO.js +1 -0
- package/dist/web/client/assets/_id-BRD3kxrX.js +1 -0
- package/dist/web/client/assets/_id-BapVoTMJ.js +1 -0
- package/dist/web/client/assets/access-CqcKius1.js +1 -0
- package/dist/web/client/assets/{agent-actions-CUee6aJq.js → agent-actions-B-9KIwn6.js} +1 -1
- package/dist/web/client/assets/agents-BC_ITk28.js +1 -0
- package/dist/web/client/assets/agents-DQ8nQnD6.js +1 -0
- package/dist/web/client/assets/arrow-right-BqqfPqVi.js +1 -0
- package/dist/web/client/assets/attention-BnCihfi0.js +1 -0
- package/dist/web/client/assets/{bot-BCone8es.js → bot-BHky7KAX.js} +1 -1
- package/dist/web/client/assets/chart-column-DTsDbzL0.js +1 -0
- package/dist/web/client/assets/chevron-right-D1shxvdo.js +1 -0
- package/dist/web/client/assets/config-DYS8bkQl.js +1 -0
- package/dist/web/client/assets/{createLucideIcon-jxSFpY0Q.js → createLucideIcon-CZHSSDYA.js} +1 -1
- package/dist/web/client/assets/{download-Dy88XavQ.js → download-Dr0PgyMr.js} +1 -1
- package/dist/web/client/assets/es2015-DZDOQ3kj.js +41 -0
- package/dist/web/client/assets/{file-text-DPsZ8-h9.js → file-text-D6OTHixJ.js} +1 -1
- package/dist/web/client/assets/{images-QBh_rL8b.js → images-BULrW-FC.js} +1 -1
- package/dist/web/client/assets/index-CxXsZzDC.js +14 -0
- package/dist/web/client/assets/{key-round-C-I8fAG0.js → key-round-DmSZN0Kq.js} +1 -1
- package/dist/web/client/assets/{list-checks-C9Q-bjEi.js → list-checks-DdTdAQXS.js} +1 -1
- package/dist/web/client/assets/login-DFVsVP0s.js +1 -0
- package/dist/web/client/assets/{manage-BaIU5zKy.js → manage-CpXaObuS.js} +1 -1
- package/dist/web/client/assets/mcp-DslGDHmN.js +1 -0
- package/dist/web/client/assets/{message-square-Bwf9cHOx.js → message-square-B_pULba_.js} +1 -1
- package/dist/web/client/assets/{network-B3FA93gC.js → network-BqmVqC4_.js} +1 -1
- package/dist/web/client/assets/parts-C104qEuC.js +1 -0
- package/dist/web/client/assets/plus-CEKaHPBw.js +1 -0
- package/dist/web/client/assets/preload-helper-CZOd_z6l.js +1 -0
- package/dist/web/client/assets/routes-D1wFPm0n.js +85 -0
- package/dist/web/client/assets/skills-DmIo3vN3.js +1 -0
- package/dist/web/client/assets/{square-terminal-DaNLwvEs.js → square-terminal-CYfGBHPC.js} +1 -1
- package/dist/web/client/assets/style-CqkCFvvz.js +7 -0
- package/dist/web/client/assets/styles-C7NsCHeU.css +2 -0
- package/dist/web/client/assets/{system-CrTSr5_t.js → system-CUW9JZ9c.js} +1 -1
- package/dist/web/client/assets/teams-DJzYsuh9.js +1 -0
- package/dist/web/client/assets/teams-DrhG8KiS.js +1 -0
- package/dist/web/client/assets/telegram-Bk_kg8hb.js +1 -0
- package/dist/web/client/assets/tools-z9Ixmuu2.js +1 -0
- package/dist/web/client/assets/usage-DGe3x1m7.js +1 -0
- package/dist/web/client/assets/use-resource-qjIkNQDY.js +1 -0
- package/dist/web/client/assets/{users-round-BElBVSnw.js → users-round-cxQ5HF-C.js} +1 -1
- package/dist/web/client/assets/welcome-DDKqxHkF.js +1 -0
- package/dist/web/client/assets/{wrench-DotqSqSm.js → wrench-BLEJjETg.js} +1 -1
- package/dist/web/server/assets/{AddProviderDialog-BbpuvC2a.js → AddProviderDialog-CpLDHOcA.js} +6 -3
- package/dist/web/server/assets/AgentAvatar-8gTAy_tP.js +37 -0
- package/dist/web/server/assets/{AgentTemplateParts-Ce7snK3m.js → AgentTemplateParts-Dh9F_-T_.js} +7 -3
- package/dist/web/server/assets/Button-Dsnw22OF.js +17 -0
- package/dist/web/server/assets/{ConfigPage-qP9ejjuw.js → ConfigPage-CrxctbtN.js} +2 -2
- package/dist/web/server/assets/{ConfirmDialog-Z-uYbE9B.js → ConfirmDialog-C89B8qKM.js} +3 -1
- package/dist/web/server/assets/{ConnectionsView-CLIV7V5D.js → ConnectionsView-DslcKQmA.js} +9 -7
- package/dist/web/server/assets/Dialog-_Gt_Nt86.js +85 -0
- package/dist/web/server/assets/{ManagePage-BR9FwVZM.js → ManagePage-DGYNJ6XG.js} +2 -2
- package/dist/web/server/assets/{ModelMenu-D-hTgYOO.js → ModelMenu-DEJoYASj.js} +13 -1
- package/dist/web/server/assets/{SectionTabs-CWQ5orUW.js → SectionTabs--vMBvaUz.js} +9 -2
- package/dist/web/server/assets/{SkillsParts-DWpdydCJ.js → SkillsParts-CqS2B45v.js} +7 -3
- package/dist/web/server/assets/SpawnDialog-BNKj2Lup.js +127 -0
- package/dist/web/server/assets/{SpawnTeamModal-C-YMvoaB.js → SpawnTeamModal-zcLxtFOO.js} +6 -2
- package/dist/web/server/assets/{TeamForm-CL45gBdt.js → TeamForm-XFP0l2TB.js} +11 -5
- package/dist/web/server/assets/{TeamThread-CVVH6kKj.js → TeamThread-gYV_ToRM.js} +59 -12
- package/dist/web/server/assets/{UnsavedChangesGuard-CXK75QQp.js → UnsavedChangesGuard-CB_TugFF.js} +1 -1
- package/dist/web/server/assets/{_id-d2OwovYV.js → _id-517adSuB.js} +2 -2
- package/dist/web/server/assets/{_id-BKzOw78O.js → _id-BTyd2i5U.js} +1 -1
- package/dist/web/server/assets/{_id-8zsImuGa.js → _id-BsQnL9LV.js} +14 -9
- package/dist/web/server/assets/{_id-2I4CSMQj.js → _id-CyinHJam.js} +17 -11
- package/dist/web/server/assets/{_id-De3Bm0SG.js → _id-D4RFNqaJ.js} +2 -2
- package/dist/web/server/assets/{_id-BpfoPuTv.js → _id-josYXBx3.js} +2 -2
- package/dist/web/server/assets/_tanstack-start-manifest_v-w2xn07aY.js +275 -0
- package/dist/web/server/assets/{access-WWspT0v4.js → access-B97-94Wt.js} +1 -1
- package/dist/web/server/assets/{access-CyUoElTP.js → access-BdQmjMJV.js} +2 -2
- package/dist/web/server/assets/{access-CwZ27Wsl.js → access-Cc7fMMod.js} +7 -4
- package/dist/web/server/assets/activity-Czfq-5_F.js +471 -0
- package/dist/web/server/assets/{agent-actions-C07Cp5Ue.js → agent-actions-ChH7Mne4.js} +1 -1
- package/dist/web/server/assets/{agents-DCWEoaxY.js → agents-BL918wVc.js} +2 -2
- package/dist/web/server/assets/{agents-vuXrAv1j.js → agents-BlUZqqJn.js} +14 -8
- package/dist/web/server/assets/{agents-CRtMfKqX.js → agents-BzJFjA2i.js} +2 -2
- package/dist/web/server/assets/{agents-CwzhpDPm.js → agents-CjrkaEz8.js} +11 -8
- package/dist/web/server/assets/{agents-DQowl6Ly.js → agents-Tg3zkmQv.js} +2 -2
- package/dist/web/server/assets/{agents-DTub-rJk.js → agents-uw32jPWx.js} +2 -2
- package/dist/web/server/assets/{attention-Dki8rmGZ.js → attention-2unmuO-q.js} +1 -1
- package/dist/web/server/assets/{attention-BqCnJ1hg.js → attention-C94WWwQe.js} +2 -2
- package/dist/web/server/assets/{attention-DwGaur_w.js → attention-a_OmC6L3.js} +9 -7
- package/dist/web/server/assets/{auth-dJnrFW6y.js → auth-DuIqEAed.js} +1 -1
- package/dist/web/server/assets/{config-B9dJiji_.js → config-BG1KOtwA.js} +2 -2
- package/dist/web/server/assets/{config-D3MR2VjE.js → config-Bhem9XER.js} +10 -7
- package/dist/web/server/assets/{config-X7qWbbpH.js → config-D1Li_7Yt2.js} +1 -1
- package/dist/web/server/assets/createSsrRpc-6LHNEsSK.js +16 -0
- package/dist/web/server/assets/{daemon-client-B_ZRIIrT.js → daemon-client-D-NWKQto.js} +1 -1
- package/dist/web/server/assets/form-Bwsyt9OY.js +416 -0
- package/dist/web/server/assets/live-DbJeq6KP.js +263 -0
- package/dist/web/server/assets/{login-CRd1yTH5.js → login-BJdJ219n.js} +1 -1
- package/dist/web/server/assets/{login-ZN6KV8n-.js → login-C4lL4AxI.js} +2 -2
- package/dist/web/server/assets/{manage-Ce6cI4eW.js → manage-C7ReF2ZZ.js} +3 -2
- package/dist/web/server/assets/{mcp-CYQuYWGX.js → mcp-BFixpBQk.js} +2 -2
- package/dist/web/server/assets/{mcp-BQ15a9dG.js → mcp-BTZkDvdc.js} +7 -4
- package/dist/web/server/assets/{mcp-C97uAZe1.js → mcp-Ceg9gzKE.js} +1 -1
- package/dist/web/server/assets/open-groups-C89TEK85.js +12 -0
- package/dist/web/server/assets/{page-title-CVY-c2Pd.js → page-title-PTpFHXWo.js} +1 -1
- package/dist/web/server/assets/parts-B0wbj_yK.js +436 -0
- package/dist/web/server/assets/{router-CPdWGKQ5.js → router-Ci_9VxDk.js} +244 -104
- package/dist/web/server/assets/{routes-BPloBDc8.js → routes-CVrH9qgo.js} +3 -3
- package/dist/web/server/assets/{routes-Dw1K3TQw.js → routes-D9Mw1_VV.js} +1453 -403
- package/dist/web/server/assets/{routes-xDPesCQu.js → routes-DsuaDPTO.js} +3 -3
- package/dist/web/server/assets/{skills-DWzlT_hC.js → skills-BNbZ75am.js} +1 -1
- package/dist/web/server/assets/{skills-6VSpEORe.js → skills-BWwEFc4a.js} +2 -2
- package/dist/web/server/assets/{skills-D0xrNc2_.js → skills-D5rnOmKJ.js} +9 -7
- package/dist/web/server/assets/src-BeMh8Fze.js +113 -0
- package/dist/web/server/assets/{start-DhW7sy23.js → start-2MvkBRdC.js} +1 -1
- package/dist/web/server/assets/{style-aMybyKzc.js → style-B3l0Wtlf.js} +1 -1
- package/dist/web/server/assets/{system-B5sPgdQW.js → system-Cr4C-YRw.js} +2 -2
- package/dist/web/server/assets/{system-CXmiWyDG.js → system-DT7AU0e6.js} +3 -3
- package/dist/web/server/assets/{system-D3th6n2E.js → system-DsmXkgqn.js} +1 -1
- package/dist/web/server/assets/{teams-ClRBVSYU.js → teams-BeStcDvQ.js} +2 -2
- package/dist/web/server/assets/{teams-yF3I_Zjq.js → teams-CsEBLW8-.js} +14 -8
- package/dist/web/server/assets/{teams-Dq4RCxis.js → teams-Dix5XVIx.js} +2 -2
- package/dist/web/server/assets/{teams-iXiCnN2i.js → teams-DjE0swAZ.js} +10 -6
- package/dist/web/server/assets/{teams-70u1XQTr.js → teams-Rk_RED7X.js} +1 -1
- package/dist/web/server/assets/{teams-BopOP4x7.js → teams-u6m6JzuU.js} +1 -1
- package/dist/web/server/assets/{telegram-DwEgyR1x.js → telegram-BjqABrl-.js} +287 -273
- package/dist/web/server/assets/{telegram-CGol0CKX2.js → telegram-CQpF3EHA.js} +1 -1
- package/dist/web/server/assets/{telegram-D9U9c1MN.js → telegram-DhzHgDfg.js} +2 -2
- package/dist/web/server/assets/{tools-C-wwWjLI.js → tools-DC69leH7.js} +1 -1
- package/dist/web/server/assets/{tools-DflVIdDd.js → tools-Dn6RnOFu.js} +2 -2
- package/dist/web/server/assets/{tools-VPIKjr3y.js → tools-x_DQTQtE.js} +6 -4
- package/dist/web/server/assets/usage-4zMG0sab.js +465 -0
- package/dist/web/server/assets/usage-mvQegG4l.js +46 -0
- package/dist/web/server/assets/{use-resource-CbHGYti0.js → use-resource-BjN1uJoL.js} +10 -2
- package/dist/web/server/assets/{welcome-7DrYZVs6.js → welcome-BuE9FRf4.js} +2 -2
- package/dist/web/server/assets/{welcome-CxXMI4HI.js → welcome-DYw35wl5.js} +1 -1
- package/dist/web/server/assets/{welcome-966nOyyK.js → welcome-DrYbWGd_.js} +8 -6
- package/dist/web/server/assets/workspace-0XPILV1W.js +82 -0
- package/dist/web/server/server.js +20 -20
- package/dist/worker.js +143 -18
- package/dist/worker.js.map +1 -1
- package/package.json +1 -1
- package/dist/web/client/assets/AddProviderDialog-DfFOaCjC.js +0 -1
- package/dist/web/client/assets/AgentTemplateParts-IMJmAQjN.js +0 -1
- package/dist/web/client/assets/ConfigPage-CzLHZa5o.js +0 -1
- package/dist/web/client/assets/ConfirmDialog-Cu_evkgc.js +0 -1
- package/dist/web/client/assets/ConnectionsView-D7Fmutl2.js +0 -1
- package/dist/web/client/assets/ManagePage-BfvlCrmz.js +0 -1
- package/dist/web/client/assets/SectionTabs-D7kPQGoh.js +0 -1
- package/dist/web/client/assets/SkillsParts-BuTxcCam.js +0 -1
- package/dist/web/client/assets/SpawnTeamModal-B1UnOvtp.js +0 -1
- package/dist/web/client/assets/TeamForm-DbzxtRjj.js +0 -1
- package/dist/web/client/assets/TeamThread-jpsWq6vI.js +0 -1
- package/dist/web/client/assets/UnsavedChangesGuard-BfyU9v9i.js +0 -1
- package/dist/web/client/assets/_id-BCNBLF-2.js +0 -1
- package/dist/web/client/assets/_id-D8_H79U2.js +0 -1
- package/dist/web/client/assets/access-CDWe1Kwy.js +0 -1
- package/dist/web/client/assets/agents-sE686DTf.js +0 -1
- package/dist/web/client/assets/agents-yrur1NDa.js +0 -1
- package/dist/web/client/assets/arrow-right-U66krZnr.js +0 -1
- package/dist/web/client/assets/attention-DYEHDfmx.js +0 -1
- package/dist/web/client/assets/chevron-right-CuqJFXTe.js +0 -1
- package/dist/web/client/assets/config-BHv886pr.js +0 -1
- package/dist/web/client/assets/index-GOthyyE-.js +0 -14
- package/dist/web/client/assets/login-Dhe15Uuc.js +0 -1
- package/dist/web/client/assets/mcp-A_Eo7x3q.js +0 -1
- package/dist/web/client/assets/parts-CpIfn_BH.js +0 -41
- package/dist/web/client/assets/plus-CQPjc8uR.js +0 -1
- package/dist/web/client/assets/routes-CTg_yjbY.js +0 -85
- package/dist/web/client/assets/skills-CLjtYtkA.js +0 -1
- package/dist/web/client/assets/style-mjEbxhf5.js +0 -7
- package/dist/web/client/assets/styles-DzcEC3Rd.css +0 -2
- package/dist/web/client/assets/teams-Bhje5n2h.js +0 -1
- package/dist/web/client/assets/teams-Cbgw0Qhv.js +0 -1
- package/dist/web/client/assets/telegram-HtUczmaA.js +0 -1
- package/dist/web/client/assets/tools-BpjFvmoX.js +0 -1
- package/dist/web/client/assets/use-resource-BnvgCpBi.js +0 -1
- package/dist/web/client/assets/welcome-D47LKWYO.js +0 -1
- package/dist/web/server/assets/Rail-b6EbjBB-.js +0 -605
- package/dist/web/server/assets/SpawnDialog-3wNx0W1R.js +0 -1851
- package/dist/web/server/assets/_tanstack-start-manifest_v-kkY_s_uR.js +0 -256
- package/dist/web/server/assets/createSsrRpc-qesavJv-.js +0 -72
- package/dist/web/server/assets/public-origin-BpDkdS5Q.js +0 -34
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 defineCommand41, 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.57.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: {
|
|
@@ -2228,6 +2228,52 @@ var configCommand = defineCommand12({
|
|
|
2228
2228
|
}
|
|
2229
2229
|
});
|
|
2230
2230
|
|
|
2231
|
+
// ../../packages/api-types/src/entities.ts
|
|
2232
|
+
var OUTSIDE_TEAM = "outside";
|
|
2233
|
+
|
|
2234
|
+
// ../../packages/api-types/src/git-review.ts
|
|
2235
|
+
var REVIEW_LIMITS = {
|
|
2236
|
+
files: 1e3,
|
|
2237
|
+
fileBytes: 1024 * 1024,
|
|
2238
|
+
totalBytes: 16 * 1024 * 1024,
|
|
2239
|
+
patchBytes: 256 * 1024
|
|
2240
|
+
};
|
|
2241
|
+
|
|
2242
|
+
// ../../packages/api-types/src/profiles.ts
|
|
2243
|
+
var PROFILE_FILES = [
|
|
2244
|
+
"SOUL.md",
|
|
2245
|
+
"IDENTITY.md",
|
|
2246
|
+
"BOOTSTRAP.md",
|
|
2247
|
+
"AGENTS.md",
|
|
2248
|
+
"TOOLS.md"
|
|
2249
|
+
];
|
|
2250
|
+
|
|
2251
|
+
// ../../packages/api-types/src/results.ts
|
|
2252
|
+
var TEXT_PREVIEW_MAX_BYTES = 256 * 1024;
|
|
2253
|
+
var TEXT_EXTENSIONS = new Set(
|
|
2254
|
+
"txt md markdown csv tsv json jsonl ndjson yaml yml toml ini cfg conf log xml css scss js mjs cjs jsx ts tsx py rb go rs java kt swift c h cc cpp hpp cs php sh bash zsh fish ps1 sql r lua pl tex diff patch vue svelte graphql proto dockerfile makefile".split(" ")
|
|
2255
|
+
);
|
|
2256
|
+
|
|
2257
|
+
// ../../packages/api-types/src/usage.ts
|
|
2258
|
+
function formatCost(usd) {
|
|
2259
|
+
if (usd <= 0) return "$0.00";
|
|
2260
|
+
if (usd < 0.01) return "<$0.01";
|
|
2261
|
+
if (usd < 1e3) return `$${usd.toFixed(2)}`;
|
|
2262
|
+
return `$${Math.round(usd).toLocaleString("en-US")}`;
|
|
2263
|
+
}
|
|
2264
|
+
function usageSummary(usage) {
|
|
2265
|
+
const tokens = `${formatTokens(usage.totalTokens)} tokens`;
|
|
2266
|
+
if (usage.cost > 0) return `${formatCost(usage.cost)} \xB7 ${tokens}`;
|
|
2267
|
+
if (usage.totalTokens > 0 && usage.planTokens === usage.totalTokens) return `${tokens}, on a plan`;
|
|
2268
|
+
if (usage.totalTokens > 0 && usage.localTokens === usage.totalTokens) return `${tokens}, local`;
|
|
2269
|
+
return tokens;
|
|
2270
|
+
}
|
|
2271
|
+
function formatTokens(tokens) {
|
|
2272
|
+
if (tokens < 1e3) return String(Math.round(tokens));
|
|
2273
|
+
if (tokens < 1e6) return `${(tokens / 1e3).toFixed(tokens < 1e4 ? 1 : 0)}k`;
|
|
2274
|
+
return `${(tokens / 1e6).toFixed(tokens < 1e7 ? 1 : 0)}M`;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2231
2277
|
// src/commands/conversation.ts
|
|
2232
2278
|
import { defineCommand as defineCommand13 } from "citty";
|
|
2233
2279
|
var conversationArg = positional("Conversation id");
|
|
@@ -2247,23 +2293,65 @@ var list3 = defineCommand13({
|
|
|
2247
2293
|
if (args.json) return printJson(body);
|
|
2248
2294
|
if (!body.total) return console.log("(no conversations)");
|
|
2249
2295
|
for (const line of columnize([
|
|
2250
|
-
["id", "title", "active"],
|
|
2251
|
-
...body.conversations.map((item) =>
|
|
2252
|
-
item.id
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2296
|
+
["id", "title", "active", "used"],
|
|
2297
|
+
...body.conversations.map((item) => {
|
|
2298
|
+
const used = body.usage[item.id];
|
|
2299
|
+
return [
|
|
2300
|
+
item.id,
|
|
2301
|
+
item.title,
|
|
2302
|
+
item.id === body.selectedId ? "yes" : "",
|
|
2303
|
+
used ? usageSummary(used) : ""
|
|
2304
|
+
];
|
|
2305
|
+
})
|
|
2256
2306
|
]))
|
|
2257
2307
|
console.log(line);
|
|
2258
2308
|
}
|
|
2259
2309
|
});
|
|
2310
|
+
var search = defineCommand13({
|
|
2311
|
+
meta: {
|
|
2312
|
+
name: "search",
|
|
2313
|
+
description: "Find the messages that hold every word, in every Agent's conversations"
|
|
2314
|
+
},
|
|
2315
|
+
args: {
|
|
2316
|
+
query: positional('Words to find (quote several: "launch email")'),
|
|
2317
|
+
agent: { type: "string", description: "Only this Agent (id or name)" },
|
|
2318
|
+
limit: { type: "string", default: "20", description: "Most messages listed (up to 50)" },
|
|
2319
|
+
json: jsonFlag
|
|
2320
|
+
},
|
|
2321
|
+
async run({ args }) {
|
|
2322
|
+
const query = new URLSearchParams({ q: args.query, limit: args.limit });
|
|
2323
|
+
if (args.agent) query.set("agent", args.agent);
|
|
2324
|
+
const body = await createClient2().get(
|
|
2325
|
+
`/api/conversations/search?${query}`
|
|
2326
|
+
);
|
|
2327
|
+
if (args.json) return printJson(body);
|
|
2328
|
+
if (body.hits.length === 0) console.log("(no messages hold every word)");
|
|
2329
|
+
for (const hit of body.hits) {
|
|
2330
|
+
const when = hit.at ? new Date(hit.at).toISOString().slice(0, 16).replace("T", " ") : "";
|
|
2331
|
+
console.log(
|
|
2332
|
+
terminalSafe(
|
|
2333
|
+
`${hit.agentName} \xB7 ${hit.conversationTitle}${hit.active ? " (active)" : ""} \xB7 ${hit.role === "user" ? "you" : hit.agentName} ${when}`
|
|
2334
|
+
)
|
|
2335
|
+
);
|
|
2336
|
+
console.log(` ${terminalSafe(hit.snippet)}`);
|
|
2337
|
+
console.log(` bazilion conversation show ${hit.agentId.slice(0, 8)} ${hit.conversationId}`);
|
|
2338
|
+
}
|
|
2339
|
+
if (body.truncated) console.log(`Only the newest ${body.hits.length}; use --limit for more.`);
|
|
2340
|
+
if (body.unreadable > 0)
|
|
2341
|
+
console.log(
|
|
2342
|
+
`${body.unreadable} conversation${body.unreadable === 1 ? "" : "s"} could not be read.`
|
|
2343
|
+
);
|
|
2344
|
+
}
|
|
2345
|
+
});
|
|
2260
2346
|
var show = defineCommand13({
|
|
2261
2347
|
meta: { name: "show", description: "Read a conversation without making it active" },
|
|
2262
2348
|
args: { agent: agentArg, id: conversationArg, json: jsonFlag },
|
|
2263
2349
|
async run({ args }) {
|
|
2264
2350
|
const body = await createClient2().get(apiPath("agents", args.agent, "conversations", args.id));
|
|
2265
2351
|
if (args.json) return printJson(body);
|
|
2266
|
-
console.log(
|
|
2352
|
+
console.log(
|
|
2353
|
+
body.usage ? `${body.conversation.title} (${usageSummary(body.usage)})` : body.conversation.title
|
|
2354
|
+
);
|
|
2267
2355
|
for (const message of body.messages) console.log(`[${message.role}] ${message.content}`);
|
|
2268
2356
|
}
|
|
2269
2357
|
});
|
|
@@ -2322,7 +2410,7 @@ var conversationCommand = defineCommand13({
|
|
|
2322
2410
|
name: "conversation",
|
|
2323
2411
|
description: "List, read, start, rename and switch Agent conversations"
|
|
2324
2412
|
},
|
|
2325
|
-
subCommands: { list: list3, show, new: newConversation, rename, select }
|
|
2413
|
+
subCommands: { list: list3, show, new: newConversation, rename, select, search }
|
|
2326
2414
|
});
|
|
2327
2415
|
|
|
2328
2416
|
// src/commands/dashboard.ts
|
|
@@ -3139,28 +3227,6 @@ import { randomBytes } from "node:crypto";
|
|
|
3139
3227
|
import { readFileSync as readFileSync7, rmSync as rmSync3, writeFileSync as writeFileSync4 } from "node:fs";
|
|
3140
3228
|
import { tmpdir } from "node:os";
|
|
3141
3229
|
import { join as join6 } from "node:path";
|
|
3142
|
-
|
|
3143
|
-
// ../../packages/api-types/src/entities.ts
|
|
3144
|
-
var OUTSIDE_TEAM = "outside";
|
|
3145
|
-
|
|
3146
|
-
// ../../packages/api-types/src/git-review.ts
|
|
3147
|
-
var REVIEW_LIMITS = {
|
|
3148
|
-
files: 1e3,
|
|
3149
|
-
fileBytes: 1024 * 1024,
|
|
3150
|
-
totalBytes: 16 * 1024 * 1024,
|
|
3151
|
-
patchBytes: 256 * 1024
|
|
3152
|
-
};
|
|
3153
|
-
|
|
3154
|
-
// ../../packages/api-types/src/profiles.ts
|
|
3155
|
-
var PROFILE_FILES = [
|
|
3156
|
-
"SOUL.md",
|
|
3157
|
-
"IDENTITY.md",
|
|
3158
|
-
"BOOTSTRAP.md",
|
|
3159
|
-
"AGENTS.md",
|
|
3160
|
-
"TOOLS.md"
|
|
3161
|
-
];
|
|
3162
|
-
|
|
3163
|
-
// src/commands/profile.ts
|
|
3164
3230
|
import { defineCommand as defineCommand22 } from "citty";
|
|
3165
3231
|
var profileArg = positional("Profile id");
|
|
3166
3232
|
function splitCsv(v) {
|
|
@@ -4261,6 +4327,7 @@ var showCmd5 = defineCommand33({
|
|
|
4261
4327
|
...args.patch ? { patches: true, path: args.patch } : args.json ? { patches: true } : {},
|
|
4262
4328
|
authors: !args.patch
|
|
4263
4329
|
});
|
|
4330
|
+
if ("unavailable" in review) throw new Error(review.unavailable.message);
|
|
4264
4331
|
if (args.json) return printJson(review);
|
|
4265
4332
|
const changes = review.changes;
|
|
4266
4333
|
if (args.patch) {
|
|
@@ -5122,20 +5189,26 @@ var addCmd4 = defineCommand38({
|
|
|
5122
5189
|
console.log(`${trigger.id} ${spec(trigger)} ${trigger.enabled ? "enabled" : "disabled"}`);
|
|
5123
5190
|
}
|
|
5124
5191
|
});
|
|
5125
|
-
function triggerRow(t) {
|
|
5192
|
+
function triggerRow(t, next) {
|
|
5126
5193
|
const last = t.lastFiredAt ? new Date(t.lastFiredAt).toISOString() : "(never)";
|
|
5127
5194
|
const state = t.enabled ? "enabled" : "disabled";
|
|
5128
5195
|
const msgPreview = t.message.length > 60 ? `${t.message.slice(0, 60)}\u2026` : t.message;
|
|
5129
|
-
|
|
5196
|
+
const upcoming = typeof next === "number" ? new Date(next).toISOString() : "-";
|
|
5197
|
+
return [t.id, state, spec(t), `next: ${upcoming}`, `last: ${last}`, `"${msgPreview}"`];
|
|
5130
5198
|
}
|
|
5131
5199
|
var listCmd12 = defineCommand38({
|
|
5132
5200
|
meta: { name: "list", description: "List triggers for an agent" },
|
|
5133
5201
|
args: { agent: agentArg },
|
|
5134
5202
|
async run({ args }) {
|
|
5135
|
-
const { triggers } = await createClient2().get(
|
|
5203
|
+
const { triggers, nextRuns, schedulerOff } = await createClient2().get(
|
|
5136
5204
|
apiPath("agents", args.agent, "triggers")
|
|
5137
5205
|
);
|
|
5138
|
-
printRows(
|
|
5206
|
+
printRows(
|
|
5207
|
+
triggers.map((trigger) => triggerRow(trigger, nextRuns[trigger.id])),
|
|
5208
|
+
"(no triggers)"
|
|
5209
|
+
);
|
|
5210
|
+
if (schedulerOff && triggers.length > 0)
|
|
5211
|
+
console.log("The daemon runs no schedules: it was started with BAZILION_SCHEDULER=off.");
|
|
5139
5212
|
}
|
|
5140
5213
|
});
|
|
5141
5214
|
var rmCmd7 = defineCommand38({
|
|
@@ -5273,9 +5346,90 @@ var uninstallCommand = defineCommand39({
|
|
|
5273
5346
|
}
|
|
5274
5347
|
});
|
|
5275
5348
|
|
|
5349
|
+
// src/commands/usage.ts
|
|
5350
|
+
import { defineCommand as defineCommand40 } from "citty";
|
|
5351
|
+
function usageHeadline(report) {
|
|
5352
|
+
const period = report.days === null ? "everything saved" : report.days === 1 ? `today (${report.to})` : `the last ${report.days} days (${report.from} to ${report.to})`;
|
|
5353
|
+
return `Usage over ${period}, ${report.timeZone}`;
|
|
5354
|
+
}
|
|
5355
|
+
function totalsLines(totals) {
|
|
5356
|
+
const lines = [
|
|
5357
|
+
`Spent ${formatCost(totals.cost)}${totals.estimated ? " (estimated from catalog prices)" : ""}`,
|
|
5358
|
+
`Tokens ${formatTokens(totals.totalTokens)} in ${totals.calls} model call${totals.calls === 1 ? "" : "s"}`
|
|
5359
|
+
];
|
|
5360
|
+
if (totals.planTokens > 0) lines.push(`On a plan ${formatTokens(totals.planTokens)} tokens`);
|
|
5361
|
+
if (totals.localTokens > 0) lines.push(`Local ${formatTokens(totals.localTokens)} tokens`);
|
|
5362
|
+
if (totals.unpricedTokens > 0)
|
|
5363
|
+
lines.push(
|
|
5364
|
+
`Unpriced ${formatTokens(totals.unpricedTokens)} tokens on models the catalog has no price for (not in Spent)`
|
|
5365
|
+
);
|
|
5366
|
+
return lines;
|
|
5367
|
+
}
|
|
5368
|
+
var usageCommand = defineCommand40({
|
|
5369
|
+
meta: {
|
|
5370
|
+
name: "usage",
|
|
5371
|
+
description: "Show tokens and cost per Team, Agent, model and day"
|
|
5372
|
+
},
|
|
5373
|
+
args: {
|
|
5374
|
+
days: { type: "string", default: "30", description: "Days counted, today included" },
|
|
5375
|
+
all: { type: "boolean", description: "Count everything saved" },
|
|
5376
|
+
agent: { type: "string", description: "Only this Agent (id)" },
|
|
5377
|
+
team: { type: "string", description: "Only this Team (id)" },
|
|
5378
|
+
daily: { type: "boolean", description: "Also list every day" },
|
|
5379
|
+
json: jsonFlag
|
|
5380
|
+
},
|
|
5381
|
+
async run({ args }) {
|
|
5382
|
+
const query = new URLSearchParams({
|
|
5383
|
+
days: args.all ? "all" : args.days,
|
|
5384
|
+
tz: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
5385
|
+
});
|
|
5386
|
+
if (args.agent) query.set("agent", args.agent);
|
|
5387
|
+
if (args.team) query.set("team", args.team);
|
|
5388
|
+
const report = await createClient2().get(`/api/usage?${query}`);
|
|
5389
|
+
if (args.json) return printJson(report);
|
|
5390
|
+
console.log(usageHeadline(report));
|
|
5391
|
+
console.log("");
|
|
5392
|
+
for (const line of totalsLines(report.totals)) console.log(line);
|
|
5393
|
+
if (report.unreadable > 0)
|
|
5394
|
+
console.log(
|
|
5395
|
+
`${report.unreadable} saved conversation${report.unreadable === 1 ? "" : "s"} could not be read and ${report.unreadable === 1 ? "is" : "are"} not counted.`
|
|
5396
|
+
);
|
|
5397
|
+
if (report.totals.calls === 0) return;
|
|
5398
|
+
const section = (title, rows) => {
|
|
5399
|
+
console.log("");
|
|
5400
|
+
console.log(title);
|
|
5401
|
+
printRows(rows, "(none)");
|
|
5402
|
+
};
|
|
5403
|
+
section(
|
|
5404
|
+
"By Team",
|
|
5405
|
+
report.byTeam.map((team) => [terminalSafe(team.teamName), usageSummary(team)])
|
|
5406
|
+
);
|
|
5407
|
+
section(
|
|
5408
|
+
"By Agent",
|
|
5409
|
+
report.byAgent.map((agent) => [
|
|
5410
|
+
terminalSafe(agent.agentName) + (agent.archived ? " (archived)" : ""),
|
|
5411
|
+
terminalSafe(agent.teamName),
|
|
5412
|
+
usageSummary(agent)
|
|
5413
|
+
])
|
|
5414
|
+
);
|
|
5415
|
+
section(
|
|
5416
|
+
"By model",
|
|
5417
|
+
report.byModel.map((model) => [
|
|
5418
|
+
terminalSafe(`${model.providerName} ${model.model}`),
|
|
5419
|
+
usageSummary(model)
|
|
5420
|
+
])
|
|
5421
|
+
);
|
|
5422
|
+
if (args.daily)
|
|
5423
|
+
section(
|
|
5424
|
+
"By day",
|
|
5425
|
+
report.byDay.map((day) => [day.day, day.calls ? usageSummary(day) : ""])
|
|
5426
|
+
);
|
|
5427
|
+
}
|
|
5428
|
+
});
|
|
5429
|
+
|
|
5276
5430
|
// src/index.ts
|
|
5277
5431
|
var VERSION = package_default.version;
|
|
5278
|
-
var main =
|
|
5432
|
+
var main = defineCommand41({
|
|
5279
5433
|
meta: {
|
|
5280
5434
|
name: "bazilion",
|
|
5281
5435
|
version: VERSION,
|
|
@@ -5289,6 +5443,7 @@ var main = defineCommand40({
|
|
|
5289
5443
|
agent: agentCommand,
|
|
5290
5444
|
activity: activityCommand,
|
|
5291
5445
|
attention: attentionCommand,
|
|
5446
|
+
usage: usageCommand,
|
|
5292
5447
|
result: resultCommand,
|
|
5293
5448
|
conversation: conversationCommand,
|
|
5294
5449
|
queue: queueCommand,
|
|
@@ -5330,6 +5485,7 @@ var HELP_GROUPS = {
|
|
|
5330
5485
|
catalog: ["profile", "team-template", "team", "skill", "provider", "config", "auth", "mcp"],
|
|
5331
5486
|
agents: [
|
|
5332
5487
|
"attention",
|
|
5488
|
+
"usage",
|
|
5333
5489
|
"agent",
|
|
5334
5490
|
"conversation",
|
|
5335
5491
|
"result",
|