@go-labs-sg/bb 2.19.0 → 2.20.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 CHANGED
@@ -181,6 +181,10 @@ New sources are registered against an existing Typeform form ID and always start
181
181
  with processing disabled in `COLLECT_ONLY`; creating a source does not call any
182
182
  external provider.
183
183
 
184
+ Deal-lifecycle retries require Slack and Asana to succeed. Google Calendar is
185
+ attempted afterward; a Calendar failure is logged without failing the overall
186
+ lifecycle operation.
187
+
184
188
  ### Mutation safety
185
189
 
186
190
  While an estimate email is `QUEUED`, `PROCESSING`, or awaiting provider
@@ -233,6 +237,8 @@ The table below is a behavior index keyed by the compatibility dispatcher's lega
233
237
 
234
238
  Project and budget query payloads keep the Asana identities explicit: `asanaTaskId` is the Deals task GID, while `asanaProjectGid` and `asanaProjectUrl` identify the operational project created for Won delivery work.
235
239
 
240
+ Bill, claim, and quotation mutations accept only suppliers whose approval status is `APPROVED`. An active supplier that is `PENDING_APPROVAL`, `REJECTED`, or `SUPERSEDED` must be approved before it can be used.
241
+
236
242
  | Area | Legacy handler labels (reference only; non-exhaustive) |
237
243
  | --- | --- |
238
244
  | **Budgets** | `list-budgets` (full payload by default; `--summary` or `--includeDetails false` for slim list), `get-budget`, `get-budget-items`, `get-budget-details`, `get-budget-categories`, `get-budget-versions`, `rename-budget-version`, `restore-budget-version`, `update-budget-status` (`ESTIMATE_ACCEPTED` requires win proof, auto-marks `PITCH` or `LOST` projects `WON`, and auto-creates an Asana Event Ops section from Prompt 5 tasks when enabled; Prompt 5 skips quantity-zero items, combines matching non-GO-internal suppliers, keeps each GO internal item separate, removes generated work that repeats another line item or group, and schedules applicable subtasks relative to the project start date; `--projectStatusOnCommercialRejection PITCH\|LOST` is required when rejecting the only accepted/closed budget on a commercial project), `mark-budget-won` (`<budgetId>` + proof file path; `PITCH` or `LOST` projects become `WON` automatically), `create-budget` / `update-budget` (`--payload`; cloned unavailable lines require `unavailableItemReviewAcknowledged: true`), `delete-budget`, `create-budget-approval` (also sends approval request emails), `create-estimate`, `send-estimate-to-contact-person` (same contact-person email workflow as web), `add-budget-items`, `update-budget-item`, `replace-budget-item`, `approve-unavailable-item-exception` (Lead/Admin), `remove-budget-item`, `reorder-budget-items`, `update-budget-item-supplier`, `mark-budget-items-not-utilized`, `restore-budget-item`, `create-placeholder-bill` (admin recovery), `create-budget-category`, `update-budget-category`, `delete-budget-category`, `update-budget-commission`, `delete-budget-commission`, `update-budget-discount`, `delete-budget-discount` (`--payload` where noted), `upload-budget-attachment` (`<budgetId>` + local file path; uses `attachment.requestBudgetAttachmentUpload` + PUT + `attachment.confirmBudgetAttachment`) |
@@ -1764,7 +1764,7 @@
1764
1764
  {
1765
1765
  "path": ["bill", "create"],
1766
1766
  "legacyAliases": ["create-bill", "create_bill"],
1767
- "summary": "Create Bill.",
1767
+ "summary": "Create a bill or claim with an approved supplier.",
1768
1768
  "globalOptions": [
1769
1769
  {
1770
1770
  "name": "--help",
@@ -1810,7 +1810,7 @@
1810
1810
  {
1811
1811
  "path": ["bill", "selection", "validate"],
1812
1812
  "legacyAliases": ["validate-bill-selection", "validate_bill_selection"],
1813
- "summary": "Validate Bill Selection.",
1813
+ "summary": "Validate the approved supplier and selected bill line items.",
1814
1814
  "globalOptions": [
1815
1815
  {
1816
1816
  "name": "--help",
@@ -2658,7 +2658,7 @@
2658
2658
  {
2659
2659
  "path": ["quotation", "create"],
2660
2660
  "legacyAliases": ["create-quotation", "create_quotation"],
2661
- "summary": "Create Quotation.",
2661
+ "summary": "Create a quotation with an approved supplier.",
2662
2662
  "globalOptions": [
2663
2663
  {
2664
2664
  "name": "--help",
@@ -2704,7 +2704,7 @@
2704
2704
  {
2705
2705
  "path": ["quotation", "update"],
2706
2706
  "legacyAliases": ["update-quotation", "update_quotation"],
2707
- "summary": "Update Quotation.",
2707
+ "summary": "Update a quotation with an approved supplier.",
2708
2708
  "globalOptions": [
2709
2709
  {
2710
2710
  "name": "--help",
@@ -322,7 +322,7 @@ Effects: state-change, email.
322
322
 
323
323
  ## `bb bill create`
324
324
 
325
- Create Bill.
325
+ Create a bill or claim with an approved supplier.
326
326
 
327
327
  Legacy aliases: `create-bill`, `create_bill`.
328
328
 
@@ -330,7 +330,7 @@ Effects: state-change, email, external-write, financial-write.
330
330
 
331
331
  ## `bb bill selection validate`
332
332
 
333
- Validate Bill Selection.
333
+ Validate the approved supplier and selected bill line items.
334
334
 
335
335
  Legacy aliases: `validate-bill-selection`, `validate_bill_selection`.
336
336
 
@@ -474,7 +474,7 @@ Effects: state-change, delete.
474
474
 
475
475
  ## `bb quotation create`
476
476
 
477
- Create Quotation.
477
+ Create a quotation with an approved supplier.
478
478
 
479
479
  Legacy aliases: `create-quotation`, `create_quotation`.
480
480
 
@@ -482,7 +482,7 @@ Effects: state-change.
482
482
 
483
483
  ## `bb quotation update`
484
484
 
485
- Update Quotation.
485
+ Update a quotation with an approved supplier.
486
486
 
487
487
  Legacy aliases: `update-quotation`, `update_quotation`.
488
488
 
package/dist/index.js CHANGED
@@ -204,8 +204,8 @@ Bills
204
204
  isClaimable differentiates the shared bill/claim records: false = bill, true = claim.
205
205
  Non-legacy supplier bills from 1 Jul 2026 00:00 SGT require approved quotation coverage linked to every selected line item, independent of the bill supplier, including already-paid bills.
206
206
  create-bill-approval <billId> (also queues approval request emails)
207
- create-bill --payload '<json>' (bill.create; payload.isClaimable false = bill, true = claim)
208
- validate-bill-selection --payload '<json>' Check project and supplier validity separately, then verify approved quotation links for each budgetItemId; alreadyPaid never bypasses quotation checks.
207
+ create-bill --payload '<json>' (bill.create; payload.isClaimable false = bill, true = claim; supplier must be APPROVED)
208
+ validate-bill-selection --payload '<json>' Require an APPROVED supplier, then verify approved quotation links for each budgetItemId; alreadyPaid never bypasses quotation checks.
209
209
  stage-bill-attachment <projectId> <filePath...> [--file <path>] [--files <csv>] Upload files before create-bill; returns attachment JSON for attachments/paymentProofAttachments
210
210
  cleanup-staged-bill-attachments <projectId> --keys <csv> Delete unattached staged bill/claim uploads.
211
211
  update-bill --payload '<json>' (bill.update; must include id)
@@ -194,6 +194,18 @@ const titleCase = (value) => value
194
194
  const summaryFor = (legacyTarget) => {
195
195
  if (legacyTarget === "whoami")
196
196
  return "Show the active API-key identity.";
197
+ if (legacyTarget === "create-bill") {
198
+ return "Create a bill or claim with an approved supplier.";
199
+ }
200
+ if (legacyTarget === "validate-bill-selection") {
201
+ return "Validate the approved supplier and selected bill line items.";
202
+ }
203
+ if (legacyTarget === "create-quotation") {
204
+ return "Create a quotation with an approved supplier.";
205
+ }
206
+ if (legacyTarget === "update-quotation") {
207
+ return "Update a quotation with an approved supplier.";
208
+ }
197
209
  if (legacyTarget === "download-customer-invoice-pdf") {
198
210
  return "Download a customer invoice PDF when permitted.";
199
211
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-labs-sg/bb",
3
- "version": "2.19.0",
3
+ "version": "2.20.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",
@@ -144,6 +144,8 @@ Do not retry with lower-level upload/request procedures, direct tRPC paths, a di
144
144
 
145
145
  On `BAD_REQUEST` or `CONFLICT`, re-read the resource before deciding whether to retry. These responses commonly indicate an invalid state transition, stale data, missing evidence, or an integration operation already in progress.
146
146
 
147
+ Bill, claim, and quotation mutations accept only suppliers whose approval status is `APPROVED`. An active supplier that is `PENDING_APPROVAL`, `REJECTED`, or `SUPERSEDED` must not be submitted or retried until it is approved.
148
+
147
149
  ## Safe examples
148
150
 
149
151
  Base user preparing a claim: