@go-labs-sg/bb 2.46.0 → 2.48.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/README.md +41 -14
- package/dist/index.js +44 -34
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
# bb
|
|
2
2
|
|
|
3
|
-
Command-line interface for **Budget Builder**. Call budgets, bills, claims, approvals, suppliers, dashboard, and more from your terminal or from
|
|
3
|
+
Command-line interface for **Budget Builder**. Call budgets, bills, claims, approvals, suppliers, dashboard, and more from your terminal or from AI agents and automation. The CLI is the maintained integration surface; the former MCP server is deprecated. Responses are JSON on stdout.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## First step: update before use
|
|
6
|
+
|
|
7
|
+
Before starting a task, **update to the latest published release first**, including when an AI agent runs this CLI:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bun add --global @go-labs-sg/bb@latest
|
|
11
|
+
bb version
|
|
12
|
+
bb --help
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Run this sequence once per task, not before every command. Re-read the updated help before choosing commands or flags. If updating fails, stop and report the failure rather than silently using an outdated CLI. If the user explicitly requested a pinned version or a development/staging build, preserve that version instead of replacing it with the public release.
|
|
16
|
+
|
|
17
|
+
New installation? Follow the runtime and installation instructions below to install Bun first, then return to this step.
|
|
6
18
|
|
|
7
|
-
For AI agents
|
|
19
|
+
For AI agents: bills and claims are stored as the same underlying bill records. Use the `isClaimable` column/flag to distinguish them: `isClaimable=false` means a normal bill, while `isClaimable=true` means a reimbursable claim.
|
|
8
20
|
|
|
9
21
|
For AI agents using this CLI: run `bb auth whoami` before reading or changing Budget Builder data. The CLI displays every command regardless of the authenticated user's role, but the API authorizes each request using the current browser-authorized CLI user or automation API-key owner, resource ownership or project assignment, current workflow state, and approval assignment. See the [role-aware agent guide](./role-aware-agent-guide.md) before choosing commands.
|
|
10
22
|
|
|
@@ -14,11 +26,17 @@ For AI agents using this CLI: do not execute mutations until the user explicitly
|
|
|
14
26
|
|
|
15
27
|
## Bill and claim list summaries
|
|
16
28
|
|
|
17
|
-
`bb bill list` / `bb claim list` (legacy `list-bills` / `list-claims`)
|
|
29
|
+
`bb bill list` / `bb claim list` (legacy `list-bills` / `list-claims`) use the updated summary-only `bill.getAll`. Lists return summary fields, `isClaimable`, `lineItemCount` and `hasPendingApproval`, plus the existing pagination, counts and metrics envelope. Filters, sorting and the CLI's existing summary output are unchanged. Lists do not return attachment, detailed line-item or approval arrays, full supplier/budget/project/company records, or detail-only payment/integration/verification metadata.
|
|
30
|
+
|
|
31
|
+
**Breaking API migration:** `bill.getList` is removed completely, with no alias or fallback. Direct scripts reading the former rich `bill.getAll` response must adopt summaries and fetch selected bill/claim details with `bb get-bill-details <billId>`. Do not fetch details for every list row unless the task actually needs them. No rich-list flag or automatic detail expansion is added.
|
|
32
|
+
|
|
33
|
+
Coordinate the matching API/web deployment and CLI release/installations. MCP is deprecated and is not a rollout or acceptance gate. Published CLI builds still calling `getList` receive `NOT_FOUND` after API rollout, so a mixed-revision deployment is not compatible. Update those installations to the matching CLI release. Budget-list options are unchanged. This source change does not publish the CLI or deploy the API.
|
|
34
|
+
|
|
35
|
+
## Inventory list reads
|
|
18
36
|
|
|
19
|
-
|
|
37
|
+
`bb item list` / `bb list-items` now use the updated page-only `item.getItems` and separate `item.getItemCounts`. The JSON output remains `{ items, pageCount, counts }`; filters and pagination are unchanged. Neither request carries an acting-user cache ID. The server authenticates the CLI session or API-key owner as usual.
|
|
20
38
|
|
|
21
|
-
|
|
39
|
+
The existing `item.getItems` API is updated in place: it now returns an array rather than `{ items, pageCount, counts }`. There is no separate `getItemPage` procedure. Coordinate the API/web deployment and CLI release/installations: old clients expecting the combined response must be upgraded, and new clients require the revised response and separate counts. Direct integrations should fetch counts only when needed. This PR does not publish the CLI or deploy the API.
|
|
22
40
|
|
|
23
41
|
## Company discovery and reuse
|
|
24
42
|
|
|
@@ -165,7 +183,7 @@ The per-user lock directory contains only random ownership markers used to seria
|
|
|
165
183
|
login, refresh, and logout. macOS/Linux enforce owner-only POSIX permissions there;
|
|
166
184
|
Windows uses its native filesystem access controls rather than POSIX mode checks.
|
|
167
185
|
|
|
168
|
-
Budget Builder API keys remain supported for
|
|
186
|
+
Budget Builder API keys remain supported for CI and non-interactive CLI
|
|
169
187
|
automation. When `BB_API_KEY` is present it takes precedence over the interactive
|
|
170
188
|
session for that process. Create and manage automation keys under **API Keys** or
|
|
171
189
|
with the commands below:
|
|
@@ -276,7 +294,7 @@ Global options and command flags use `--key=value` or `--key value`. Run `bb hel
|
|
|
276
294
|
|
|
277
295
|
Run `bb version` before agent-driven work to record the installed package version and production API target. This is read-only and does not require authentication.
|
|
278
296
|
|
|
279
|
-
**Authoritative command list:** run `bb help` or inspect the generated `command-reference.md` / `command-manifest.json`. The catalog includes every canonical route, global option, and effect classification, but does not filter by the current `whoami` role. During the handler migration, command-specific arguments retain the compatibility dispatcher's validation and are explicitly marked `legacy-passthrough` in the manifest; use `bb help --legacy` for their detailed transition reference. Version 2 uses grouped, resource-first commands such as `bb budget list` and `bb bill attachment upload`. Flat commands such as `bb list-budgets` and their
|
|
297
|
+
**Authoritative command list:** run `bb help` or inspect the generated `command-reference.md` / `command-manifest.json`. The catalog includes every canonical route, global option, and effect classification, but does not filter by the current `whoami` role. During the handler migration, command-specific arguments retain the compatibility dispatcher's validation and are explicitly marked `legacy-passthrough` in the manifest; use `bb help --legacy` for their detailed transition reference. Version 2 uses grouped, resource-first commands such as `bb budget list` and `bb bill attachment upload`. Flat commands such as `bb list-budgets` and their legacy `snake_case` aliases remain available during the v2 transition, with a deprecation notice and an equivalent grouped command in help. The CLI calls the shared tRPC API, including procedures also used by the web UI.
|
|
280
298
|
|
|
281
299
|
**Budget status automation:** Setting a budget to `ESTIMATE_ACCEPTED` requires a confirmed win-proof attachment. `--invoiceSettings '<json>'` remains available when the project needs saved delivery preferences, but invoice creation chooses its amount independently from those settings. If the parent project is `PITCH` or `LOST`, the API marks it `WON` automatically and runs enabled Asana automation. When rejecting the only accepted/closed budget on a commercial project, pass `--projectStatusOnCommercialRejection PITCH|LOST`.
|
|
282
300
|
|
|
@@ -483,7 +501,11 @@ bb budget version list <budgetId> --all
|
|
|
483
501
|
- `--all` explicitly collects all visible history through sequential bounded requests. It cannot be combined with `--cursor`; `--limit` controls each request's size. It can still be expensive and retains the complete result in memory. A failed page aborts without emitting a successful partial export.
|
|
484
502
|
- Pages preserve newest-first `createdAt`/`id` ordering, role visibility, and creator/version-group metadata. They are not a point-in-time database snapshot; versions added after traversal starts require a fresh first-page read, and concurrent changes to visibility can affect traversal.
|
|
485
503
|
|
|
486
|
-
The backend
|
|
504
|
+
The canonical backend procedure is `budgetVersion.getBudgetVersions`. It now accepts `{ budgetId, limit?, cursor? }` and returns `{ versions, nextCursor }`, with a default page size of 20 and maximum of 50. The former budgetId-only input remains valid, but returns the first page—not a complete-history array. **This response-shape and completeness change is breaking despite keeping the route name.** Older installed CLI builds and external scripts must consume `versions` and explicitly continue through `nextCursor`; otherwise they may fail or mistake partial history for a complete export. Deprecated MCP builds may also be incompatible, but they must not be updated or used as a rollout gate. Current CLI aliases `get-budget-versions` and `get_budget_versions` remain supported.
|
|
505
|
+
|
|
506
|
+
For direct tRPC clients, call `getBudgetVersions.query({ budgetId, limit: 20, cursor })`, consume `versions`, and request the next page only when `nextCursor` is present. The intermediate `getBudgetVersionsPage` procedure is removed; migrate callers of that name to `getBudgetVersions` rather than retrying `NOT_FOUND`. A complete export must explicitly walk every page, abort on a failed page or repeated cursor, and emit success only after reaching the end; `bb budget version list <budgetId> --all` implements that traversal. Do not treat a first page as complete history. The existing missing/deleted-cursor behavior and non-snapshot traversal are unchanged; concurrent deletions or visibility changes can require restarting an export.
|
|
507
|
+
|
|
508
|
+
Coordinate the backend and maintained client rollout: publish/use this CLI only against a backend with the paginated `getBudgetVersions` contract; an older backend returns an array under that same name. MCP is deprecated and frozen, so do not update or publish it. Existing builds that call `getBudgetVersionsPage` must also migrate before that route is removed, including cached web bundles. The residual requester is not yet attributed: server timing logs prove route usage but do not identify its client or installed version. Reusing the route name bounds its history result; it does not prove complete-history consumers migrated, that a periodic schedule stopped, or that measured RU savings occurred. This source change does not publish clients, deploy the backend, delete audit snapshots or change indexes.
|
|
487
509
|
|
|
488
510
|
### Link an existing QuickBooks invoice
|
|
489
511
|
|
|
@@ -584,17 +606,22 @@ A `.env` file in the **current working directory** is loaded automatically for a
|
|
|
584
606
|
|
|
585
607
|
## Developing in this repo
|
|
586
608
|
|
|
587
|
-
|
|
609
|
+
Follow the [development workflow](../../../docs/development-workflow.md#required-cli-coverage). App/API changes affecting `bb` must include CLI contracts, registry/help/docs and verification in the same change; do not update deprecated MCP.
|
|
610
|
+
|
|
611
|
+
From the monorepo root, after isolated worktree setup and client generation:
|
|
588
612
|
|
|
589
613
|
```bash
|
|
590
|
-
|
|
591
|
-
bun
|
|
614
|
+
bun --filter @go-labs-sg/bb typecheck
|
|
615
|
+
bun --filter @go-labs-sg/bb build
|
|
616
|
+
bun run packages/budget-builder/cli/src/index.ts help
|
|
592
617
|
```
|
|
593
618
|
|
|
619
|
+
Use approved browser authorization or an existing automation API key for commands that access data. Help/build examples do not authorize production reads, mutations, email or financial writes.
|
|
620
|
+
|
|
594
621
|
Or from `packages/budget-builder/cli`:
|
|
595
622
|
|
|
596
623
|
```bash
|
|
597
|
-
bun run build #
|
|
624
|
+
bun run build # generate command artifacts, then bundle dist/index.js with Bun
|
|
598
625
|
bun run typecheck # tsc --noEmit
|
|
599
626
|
bun run src/index.ts budget list
|
|
600
627
|
```
|
|
@@ -606,7 +633,7 @@ bun run src/index.ts budget list
|
|
|
606
633
|
|
|
607
634
|
### Publish
|
|
608
635
|
|
|
609
|
-
|
|
636
|
+
Only prepare publication when authorized; building or packing is not permission to publish. From `packages/budget-builder/cli`, build the package first, then create its publishable archive with Bun:
|
|
610
637
|
|
|
611
638
|
```bash
|
|
612
639
|
bun run build
|
package/dist/index.js
CHANGED
|
@@ -35,16 +35,16 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
35
35
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
36
36
|
var __require = import.meta.require;
|
|
37
37
|
|
|
38
|
-
// ../../../node_modules/.bun/dotenv@18.0.
|
|
38
|
+
// ../../../node_modules/.bun/dotenv@18.0.6/node_modules/dotenv/dist/index.cjs
|
|
39
39
|
var require_dist = __commonJS(function(exports, module) {
|
|
40
|
-
var
|
|
40
|
+
var S = (e, o) => () => {
|
|
41
41
|
try {
|
|
42
42
|
return o || e((o = { exports: {} }).exports, o), o.exports;
|
|
43
43
|
} catch (t) {
|
|
44
44
|
throw o = 0, t;
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
|
-
var
|
|
47
|
+
var j = S((xe, U) => {
|
|
48
48
|
function G(e) {
|
|
49
49
|
return typeof e == "string" ? !["false", "0", "no", "off", ""].includes(e.toLowerCase()) : !!e;
|
|
50
50
|
}
|
|
@@ -58,8 +58,8 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
58
58
|
}
|
|
59
59
|
U.exports = { parseBoolean: G, optionsFromEnv: X };
|
|
60
60
|
});
|
|
61
|
-
var N =
|
|
62
|
-
var Y = __require("fs"),
|
|
61
|
+
var N = S((ye, x) => {
|
|
62
|
+
var Y = __require("fs"), k = __require("path"), z = __require("os"), { URL: Z, fileURLToPath: ee } = __require("url"), { parseBoolean: $, optionsFromEnv: B } = j(), te = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg, b = new Uint8Array(256);
|
|
63
63
|
for (let e = 48;e <= 57; e++)
|
|
64
64
|
b[e] = 1;
|
|
65
65
|
for (let e = 65;e <= 90; e++)
|
|
@@ -185,7 +185,7 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
185
185
|
return o;
|
|
186
186
|
}
|
|
187
187
|
function ne(e, o) {
|
|
188
|
-
return o &&
|
|
188
|
+
return o && $(o.fast) ? oe(e) : re(e);
|
|
189
189
|
}
|
|
190
190
|
function T(e) {
|
|
191
191
|
console.log(`\u2506 ${e}`);
|
|
@@ -194,16 +194,16 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
194
194
|
console.error(`\u25C7 ${e}`);
|
|
195
195
|
}
|
|
196
196
|
function V(e) {
|
|
197
|
-
return e[0] === "~" ?
|
|
197
|
+
return e[0] === "~" ? k.join(z.homedir(), e.slice(1)) : e;
|
|
198
198
|
}
|
|
199
199
|
function ie(e = {}) {
|
|
200
200
|
return { ...B(), ...e };
|
|
201
201
|
}
|
|
202
202
|
function ce(e) {
|
|
203
203
|
e = ie(e);
|
|
204
|
-
let o =
|
|
204
|
+
let o = k.resolve(process.cwd(), ".env"), t = "utf8", n = process.env;
|
|
205
205
|
e && e.processEnv != null && (n = e.processEnv);
|
|
206
|
-
let r =
|
|
206
|
+
let r = $(e && e.debug);
|
|
207
207
|
e && e.encoding ? t = e.encoding : r && T("no encoding is specified (UTF-8 is used by default)");
|
|
208
208
|
let s = [o];
|
|
209
209
|
if (e && e.path)
|
|
@@ -222,12 +222,12 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
222
222
|
} catch (a) {
|
|
223
223
|
r && T(`failed to load ${c} ${a.message}`), i = a;
|
|
224
224
|
}
|
|
225
|
-
let p = A.populate(n, l, e), f =
|
|
225
|
+
let p = A.populate(n, l, e), f = $(Object.prototype.hasOwnProperty.call(e, "quiet") ? e.quiet : B(n).quiet);
|
|
226
226
|
if (r || !f) {
|
|
227
227
|
let c = Object.keys(p).length, a = [];
|
|
228
228
|
for (let g of s)
|
|
229
229
|
try {
|
|
230
|
-
let h =
|
|
230
|
+
let h = k.relative(process.cwd(), g instanceof Z ? ee(g) : g);
|
|
231
231
|
a.push(h);
|
|
232
232
|
} catch (h) {
|
|
233
233
|
r && T(`failed to load ${g} ${h.message}`), i = h;
|
|
@@ -240,7 +240,7 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
240
240
|
return A.configDotenv(e);
|
|
241
241
|
}
|
|
242
242
|
function le(e, o, t = {}) {
|
|
243
|
-
let n =
|
|
243
|
+
let n = $(t && t.debug), r = $(t && t.override), s = {};
|
|
244
244
|
if (e === null || typeof e != "object" || o === null || typeof o != "object") {
|
|
245
245
|
let i = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
|
|
246
246
|
throw i.code = "OBJECT_REQUIRED", i;
|
|
@@ -256,7 +256,7 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
256
256
|
x.exports.populate = A.populate;
|
|
257
257
|
x.exports = A;
|
|
258
258
|
});
|
|
259
|
-
var M =
|
|
259
|
+
var M = S((Te, W) => {
|
|
260
260
|
var _ = __require("child_process"), fe = __require("fs"), L = __require("path");
|
|
261
261
|
function ue(e) {
|
|
262
262
|
let o = ['"'], t = 0;
|
|
@@ -309,9 +309,9 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
309
309
|
}
|
|
310
310
|
W.exports = pe;
|
|
311
311
|
});
|
|
312
|
-
var K =
|
|
313
|
-
var he = __require("fs"), ge = __require("os"), Q = __require("path"), me = __require("child_process"), ve = M(), R = N(), { optionsFromEnv: Ce } =
|
|
314
|
-
function
|
|
312
|
+
var K = S(($e, F) => {
|
|
313
|
+
var he = __require("fs"), ge = __require("os"), Q = __require("path"), me = __require("child_process"), ve = M(), R = N(), { optionsFromEnv: Ce } = j();
|
|
314
|
+
function D() {
|
|
315
315
|
console.log(["Usage: dotenv run [--help] [-q|--quiet] [--debug] [--override] [--fast] [-f|--file <paths>] [--] <command> [args...]", "", "Run a command with environment variables from a .env file.", "Place dotenv options before the command; all following arguments go to the command.", "", "Options:", " -f, --file <paths> .env paths, comma-separated or repeated (default: .env)", " -q, --quiet suppress the injected env message", " --debug enable debug logging", " --override override existing environment variables", " --fast use the faster character-scanner parser", "", "Environment variables (DOTENV_CONFIG_* names remain as fallbacks):", " DOTENV_PATH, DOTENV_ENCODING, DOTENV_QUIET,", " DOTENV_DEBUG, DOTENV_OVERRIDE,", " DOTENV_FAST"].join(`
|
|
316
316
|
`));
|
|
317
317
|
}
|
|
@@ -383,24 +383,24 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
383
383
|
function J(e) {
|
|
384
384
|
let o = e[0];
|
|
385
385
|
if (o === "--help" || o === "-h") {
|
|
386
|
-
|
|
386
|
+
D();
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
389
389
|
if (o !== "run") {
|
|
390
|
-
|
|
390
|
+
D(), process.exitCode = 1;
|
|
391
391
|
return;
|
|
392
392
|
}
|
|
393
393
|
let t = we(e.slice(1));
|
|
394
394
|
if (t.help) {
|
|
395
|
-
|
|
395
|
+
D();
|
|
396
396
|
return;
|
|
397
397
|
}
|
|
398
398
|
if (t.error) {
|
|
399
|
-
console.error(`dotenv: ${t.error}`),
|
|
399
|
+
console.error(`dotenv: ${t.error}`), D(), process.exitCode = 1;
|
|
400
400
|
return;
|
|
401
401
|
}
|
|
402
402
|
if (t.command.length === 0) {
|
|
403
|
-
|
|
403
|
+
D(), process.exitCode = 1;
|
|
404
404
|
return;
|
|
405
405
|
}
|
|
406
406
|
let n = Ee(t);
|
|
@@ -456,13 +456,13 @@ var require_dist = __commonJS(function(exports, module) {
|
|
|
456
456
|
F.exports = J;
|
|
457
457
|
F === __require.main && J(process.argv.slice(2));
|
|
458
458
|
});
|
|
459
|
-
var
|
|
459
|
+
var I = N();
|
|
460
460
|
var Oe = K();
|
|
461
|
-
module.exports =
|
|
462
|
-
module.exports.config =
|
|
463
|
-
module.exports.configDotenv =
|
|
464
|
-
module.exports.parse =
|
|
465
|
-
module.exports.populate =
|
|
461
|
+
module.exports = I;
|
|
462
|
+
module.exports.config = I.config;
|
|
463
|
+
module.exports.configDotenv = I.configDotenv;
|
|
464
|
+
module.exports.parse = I.parse;
|
|
465
|
+
module.exports.populate = I.populate;
|
|
466
466
|
});
|
|
467
467
|
|
|
468
468
|
// src/load-env.ts
|
|
@@ -9024,7 +9024,7 @@ async function listBills(opts) {
|
|
|
9024
9024
|
page: opts.page ?? 1,
|
|
9025
9025
|
pageSize: opts.pageSize ?? 20
|
|
9026
9026
|
};
|
|
9027
|
-
const result = await api2.bill.
|
|
9027
|
+
const result = await api2.bill.getAll.query(input);
|
|
9028
9028
|
out(result);
|
|
9029
9029
|
}
|
|
9030
9030
|
async function approveBill(billId, overBudgetOverrideReason) {
|
|
@@ -9576,7 +9576,7 @@ var getBudgetVersions = async (budgetId, options = {}) => {
|
|
|
9576
9576
|
const seenCursors = new Set;
|
|
9577
9577
|
let cursor = options.cursor;
|
|
9578
9578
|
do {
|
|
9579
|
-
const page = await api2.budgetVersion.
|
|
9579
|
+
const page = await api2.budgetVersion.getBudgetVersions.query({
|
|
9580
9580
|
budgetId,
|
|
9581
9581
|
limit: options.limit,
|
|
9582
9582
|
cursor
|
|
@@ -10611,13 +10611,16 @@ async function listContacts(companyId) {
|
|
|
10611
10611
|
out(contacts);
|
|
10612
10612
|
}
|
|
10613
10613
|
async function listItems(opts) {
|
|
10614
|
-
const
|
|
10614
|
+
const filters = {
|
|
10615
10615
|
includeQuickBooksDeactivationPending: opts.includeQuickBooksDeactivationPending,
|
|
10616
|
-
page: opts.page ?? 1,
|
|
10617
|
-
perPage: opts.perPage ?? 20,
|
|
10618
10616
|
name: opts.name
|
|
10619
|
-
}
|
|
10620
|
-
|
|
10617
|
+
};
|
|
10618
|
+
const perPage = opts.perPage ?? 20;
|
|
10619
|
+
const [items, { total, counts }] = await Promise.all([
|
|
10620
|
+
api2.item.getItems.query({ ...filters, page: opts.page ?? 1, perPage }),
|
|
10621
|
+
api2.item.getItemCounts.query(filters)
|
|
10622
|
+
]);
|
|
10623
|
+
out({ items, pageCount: Math.ceil(total / perPage), counts });
|
|
10621
10624
|
}
|
|
10622
10625
|
async function getItem(id) {
|
|
10623
10626
|
const item = await api2.item.getItem.query({ id });
|
|
@@ -11801,9 +11804,12 @@ var resolveCommand = (argv) => {
|
|
|
11801
11804
|
isLegacyAlias: true
|
|
11802
11805
|
};
|
|
11803
11806
|
};
|
|
11807
|
+
var updateBeforeUse = "First step before each task: update to the latest published release with 'bun add --global @go-labs-sg/bb@latest', then run 'bb version' and 'bb --help' before using commands. Update once per task. If updating fails, stop and report it. Preserve an explicitly requested pinned or development/staging version.";
|
|
11804
11808
|
var createHumanHelp = (command) => {
|
|
11805
11809
|
if (command) {
|
|
11806
11810
|
return [
|
|
11811
|
+
updateBeforeUse,
|
|
11812
|
+
"",
|
|
11807
11813
|
`Usage: bb ${command.path.join(" ")} [options] [args]`,
|
|
11808
11814
|
"",
|
|
11809
11815
|
command.summary,
|
|
@@ -11828,6 +11834,8 @@ var createHumanHelp = (command) => {
|
|
|
11828
11834
|
return [
|
|
11829
11835
|
"bb \u2014 Budget Builder CLI",
|
|
11830
11836
|
"",
|
|
11837
|
+
updateBeforeUse,
|
|
11838
|
+
"",
|
|
11831
11839
|
"Usage: bb <resource> <operation> [options] [args]",
|
|
11832
11840
|
"",
|
|
11833
11841
|
"Global options",
|
|
@@ -12023,6 +12031,8 @@ function printLegacyHelp(runtime) {
|
|
|
12023
12031
|
const help = `
|
|
12024
12032
|
bb \u2014 Budget Builder CLI for AI agents (parity with MCP tools)
|
|
12025
12033
|
|
|
12034
|
+
First step before each task: update to the latest published release with 'bun add --global @go-labs-sg/bb@latest', then run 'bb version' and 'bb --help' before using commands. Update once per task. If updating fails, stop and report it. Preserve an explicitly requested pinned or development/staging version.
|
|
12035
|
+
|
|
12026
12036
|
Usage: bb <command> [options] [args]
|
|
12027
12037
|
|
|
12028
12038
|
Identity: bb version \u2014 print the installed CLI package version and API target as JSON.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@go-labs-sg/bb",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.48.0",
|
|
4
4
|
"description": "Budget Builder CLI for AI agents — manage budgets, bills, claims, quotations, and customer invoices with explicit workflow previews for sensitive changes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@trpc/client": "^11.19.0",
|
|
23
|
-
"dotenv": "^18.0.
|
|
23
|
+
"dotenv": "^18.0.6",
|
|
24
24
|
"mime-types": "^3.0.2",
|
|
25
25
|
"superjson": "^2.2.6"
|
|
26
26
|
},
|