jaz-clio 4.32.1 → 4.32.3

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-api
3
- version: 4.32.1
3
+ version: 4.32.3
4
4
  description: Complete reference for the Jaz REST API — the accounting platform backend. Use this skill whenever building, modifying, debugging, or extending any code that calls the API — including API clients, integrations, data seeding, test data, or new endpoint work. Contains every field name, response shape, error, gotcha, and edge case discovered through live production testing.
5
5
  license: MIT
6
6
  compatibility: Requires Jaz API key (x-jk-api-key header). Works with Claude Code, Google Antigravity, OpenAI Codex, GitHub Copilot, Cursor, and any agent that reads markdown.
@@ -281,7 +281,7 @@ Bills, invoices, and credit notes share identical mandatory field specs. Adding
281
281
  106. **Contact PUT uses `email` (string), not `emails` (array)** — GET returns `emails: [{email, label}]` (array) but PUT accepts `email: "user@example.com"` (string). Sending the `emails` array in PUT body causes 400 "Invalid request body". The CLI and tool executor handle this automatically via read-modify-write with the correct field.
282
282
 
283
283
  ### Quick Fix (Bulk Update)
284
- 107. **20 Quick Fix endpoints for bulk-updating transactions and line items** — `POST /api/v1/quick-fix/{entity}` with `{ resourceIds: [...], attributes: {...} }`. Response: `{ updated: [...], failed: [{ resourceId, error, errorCode }] }`. Entities grouped by domain: **ARAP**: invoices, bills, customer-credit-notes, supplier-credit-notes. **Accounting**: journals, cash-entries. **Schedulers**: sale-schedules, purchase-schedules, subscription-schedules, journal-schedules. Line-item endpoints add `/line-items` suffix. ARAP line items use `{ lineItemResourceIds, attributes }`. Scheduler line items use `{ schedulerUpdates: [{ schedulerResourceId, lineItemUpdates }] }`. **Known gotcha**: `valueDate` (and `dueDate` for ARAP) must currently be included in `attributes` even when unchanged — absent fields are treated as "remove" rather than "keep existing". This will be fixed server-side.
284
+ 107. **20 Quick Fix endpoints for bulk-updating transactions and line items** — `POST /api/v1/quick-fix/{entity}` with `{ resourceIds: [...], attributes: {...} }`. Response: `{ updated: string[], failed: [{ resourceId, error, errorCode }] }`. **HTTP status codes**: 200 = complete success (`failed` always empty). **207 Multi-Status** = partial or total failure with per-item detail (same response shape as 200 — check `failed` array). 422 = total failure with no per-item breakdown (rare, standard error shape). On 207, retry only `failed` resourceIds — `updated` ones are already done. Entities grouped by domain: **ARAP**: invoices, bills, customer-credit-notes, supplier-credit-notes. **Accounting**: journals, cash-entries. **Schedulers**: sale-schedules, purchase-schedules, subscription-schedules, journal-schedules. Line-item endpoints add `/line-items` suffix. ARAP line items use `{ lineItemResourceIds, attributes }`. Scheduler line items use `{ schedulerUpdates: [{ schedulerResourceId, lineItemUpdates }] }`. **Known gotcha**: `valueDate` (and `dueDate` for ARAP) must currently be included in `attributes` even when unchanged — absent fields are treated as "remove" rather than "keep existing". This will be fixed server-side.
285
285
 
286
286
  ### Transfer Trial Balance
287
287
  108. **Transfer Trial Balance** (`POST /api/v1/transfer-trial-balance`) creates opening balance entries. Uses `journalEntries` (NOT `lines` — this is a journal type). Always ACTIVE (no draft mode), reference auto-generated as "Transfer Trial Balance", minimum 1 entry, entries cannot have 0 amounts, skips lock date validation. Each entry: `{ accountResourceId, type: "DEBIT"|"CREDIT", amount }`.
@@ -1882,6 +1882,8 @@ POST /api/v1/quick-fix/sale-schedules/line-items
1882
1882
 
1883
1883
  ### Response (all 20 endpoints)
1884
1884
 
1885
+ **HTTP status codes**: 200 = complete success (`failed` always `[]`). **207 Multi-Status** = partial or total failure with per-item detail (same body shape as 200). 422/500 = total failure, standard error shape (no per-item data). On 207, retry only `failed` resourceIds — `updated` ones are done.
1886
+
1885
1887
  ```json
1886
1888
  {
1887
1889
  "updated": ["uuid1", "uuid2"],
@@ -821,6 +821,8 @@ Journals support a top-level `currency` object to create entries in a foreign cu
821
821
 
822
822
  ### Quick Fix Errors
823
823
 
824
+ **207 Multi-Status** — Not an error. The API returns 207 when one or more items in the batch failed. Response body is the same shape as 200: `{ updated: [...], failed: [{ resourceId, error, errorCode }] }`. Always check `failed.length` — on partial failure, some items succeeded (`updated`) while others failed (`failed`). Retry pattern: only retry the `failed` resourceIds, not the whole batch.
825
+
824
826
  **"Not allowed to remove valueDate of a sale/purchase/journal"** — `valueDate` absent from `attributes`. Currently must be included even if unchanged. Server-side fix pending.
825
827
 
826
828
  **"Not allowed to remove dueDate of a sale"** — Same pattern for `dueDate` on invoices.
@@ -708,7 +708,7 @@ Bulk-update transactions or line items in a single call. Pattern: `POST /api/v1/
708
708
  **Schedulers**: `sale-schedules`, `purchase-schedules`, `subscription-schedules`, `journal-schedules` (× 2 = 8)
709
709
 
710
710
  Request: `{ resourceIds: [...], attributes: {...} }` (transactions) or `{ lineItemResourceIds: [...], attributes: {...} }` (line items) or `{ schedulerUpdates: [...] }` (scheduler line items).
711
- Response: `{ updated: [...], failed: [{ resourceId, error, errorCode }] }`.
711
+ Response: `{ updated: [...], failed: [{ resourceId, error, errorCode }] }`. HTTP 200 = all succeeded. **207 Multi-Status** = partial failure (check both arrays). 422/500 = total failure (standard error shape).
712
712
 
713
713
  ---
714
714
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-conversion
3
- version: 4.32.1
3
+ version: 4.32.3
4
4
  description: Accounting data conversion skill — migrates customer data from Xero, QuickBooks, Sage, MYOB, and Excel exports to Jaz. Covers config, quick, and full conversion workflows, Excel parsing, CoA/contact/tax/items mapping, clearing accounts, TTB, and TB verification.
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-jobs
3
- version: 4.32.1
3
+ version: 4.32.3
4
4
  description: 12 accounting jobs for SMB bookkeepers and accountants — month-end, quarter-end, and year-end close playbooks plus 9 ad-hoc operational jobs (bank recon, document collection, GST/VAT filing, payment runs, credit control, supplier recon, audit prep, fixed asset review, statutory filing). Jobs can have paired tools as nested subcommands (e.g., `clio jobs bank-recon match`, `clio jobs document-collection ingest`, `clio jobs statutory-filing sg-cs`). Paired with an interactive CLI blueprint generator (clio jobs).
5
5
  license: MIT
6
6
  compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For API payloads, load the jaz-api skill. For individual transaction patterns, load the jaz-recipes skill.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-recipes
3
- version: 4.32.1
3
+ version: 4.32.3
4
4
  description: 16 IFRS-compliant recipes for complex multi-step accounting in Jaz — prepaid amortization, deferred revenue, loan schedules, IFRS 16 leases, hire purchase, fixed deposits, asset disposal, FX revaluation, ECL provisioning, IAS 37 provisions, dividends, intercompany, and capital WIP. Each recipe includes journal entries, capsule structure, and verification steps. Paired with 13 financial calculators that produce execution-ready blueprints with workings.
5
5
  license: MIT
6
6
  compatibility: Works with Claude Code, Claude Cowork, Claude.ai, and any agent that reads markdown. For API payloads, load the jaz-api skill alongside this one.
@@ -129,7 +129,7 @@ function formatResult(result, json) {
129
129
  if (result.failed.length > 0) {
130
130
  console.log(chalk.red(`Failed ${result.failed.length} item(s):`));
131
131
  for (const f of result.failed) {
132
- console.log(` ${chalk.cyan(f.resourceId)} ${chalk.red(f.error)}${f.errorCode ? ` (${f.errorCode})` : ''}`);
132
+ console.log(` ${chalk.cyan(f.resourceId)} ${chalk.red(f.error)} (${f.errorCode})`);
133
133
  }
134
134
  process.exitCode = 1;
135
135
  }
@@ -4,6 +4,13 @@ export const QUICK_FIX_ARAP = ['invoices', 'bills', 'customer-credit-notes', 'su
4
4
  const QUICK_FIX_ACCOUNTING = ['journals', 'cash-entries'];
5
5
  const QUICK_FIX_SCHEDULERS = ['sale-schedules', 'purchase-schedules', 'subscription-schedules', 'journal-schedules'];
6
6
  export const QUICK_FIX_ENTITIES = [...QUICK_FIX_ARAP, ...QUICK_FIX_ACCOUNTING, ...QUICK_FIX_SCHEDULERS];
7
+ /** Normalize API response — guarantee errorCode is always present. */
8
+ export function normalizeQuickFixResult(raw) {
9
+ return {
10
+ updated: raw.updated ?? [],
11
+ failed: (raw.failed ?? []).map(f => ({ ...f, errorCode: f.errorCode ?? 'UNKNOWN_ERROR' })),
12
+ };
13
+ }
7
14
  // ── Transaction-Level Quick Fix ──────────────────────────────────
8
15
  export async function quickFix(client, entity, body) {
9
16
  const attrs = { ...body.attributes };
@@ -13,11 +20,13 @@ export async function quickFix(client, entity, body) {
13
20
  if (QUICK_FIX_ARAP.includes(entity) && attrs.valueDate && !hasDueDate) {
14
21
  attrs.dueDate = attrs.valueDate;
15
22
  }
16
- return client.post(`/api/v1/quick-fix/${entity}`, { ...body, attributes: attrs });
23
+ const raw = await client.post(`/api/v1/quick-fix/${entity}`, { ...body, attributes: attrs });
24
+ return normalizeQuickFixResult(raw);
17
25
  }
18
26
  // ── Line-Item-Level Quick Fix ────────────────────────────────────
19
27
  // ARAP: { lineItemResourceIds: string[], attributes: {...} }
20
28
  // Schedulers: { schedulerUpdates: [{ schedulerResourceId, lineItemUpdates: [...] }] }
21
29
  export async function quickFixLineItems(client, entity, body) {
22
- return client.post(`/api/v1/quick-fix/${entity}/line-items`, body);
30
+ const raw = await client.post(`/api/v1/quick-fix/${entity}/line-items`, body);
31
+ return normalizeQuickFixResult(raw);
23
32
  }
@@ -26,7 +26,7 @@ export function resolveAccount(query, accounts, options = {}) {
26
26
  * Resolve a single best-matching account, or null if no good match.
27
27
  */
28
28
  export function resolveBestAccount(query, accounts) {
29
- const matches = resolveAccount(query, accounts, { threshold: 0.6, limit: 1 });
29
+ const matches = resolveAccount(query, accounts, { threshold: 0.45, limit: 1 });
30
30
  return matches.length > 0 ? matches[0].item : null;
31
31
  }
32
32
  /**
@@ -595,7 +595,7 @@ export const TOOL_DEFINITIONS = [
595
595
  },
596
596
  {
597
597
  name: 'pay_invoice',
598
- description: 'Record a payment against an invoice.',
598
+ description: 'Record a payment against an invoice. Invoice must be APPROVED/UNPAID before payment — draft or voided invoices cannot be paid. If the invoice is still a DRAFT, call finalize_invoice first.',
599
599
  params: {
600
600
  resourceId: { type: 'string', description: 'Invoice resourceId' },
601
601
  paymentAmount: { type: 'number', description: 'Amount to pay (in bank currency)' },
@@ -1832,7 +1832,7 @@ Steps: 1) search_customer_credit_notes with status UNAPPLIED for the same contac
1832
1832
  description: `Record money received INTO a bank account from an EXTERNAL source (customer payment, refund received, deposit from outside).
1833
1833
  WHEN TO USE: customer payments received, refunds from suppliers, insurance payouts, external deposits.
1834
1834
  WHEN NOT TO USE: moving money between your own bank/cash accounts — use create_cash_transfer instead.
1835
- - accountResourceId MUST be a Bank Accounts type account use list_bank_accounts or search_accounts with accountType "Bank Accounts" to find the correct one. Non-bank accounts are rejected.
1835
+ - CRITICAL: accountResourceId MUST be a Bank/Cash account from list_bank_accounts output. Using expense, revenue, or liability accounts will fail. Always call list_bank_accounts first to find valid accounts.
1836
1836
  - lines are the offsetting entries. Each needs accountResourceId, type (DEBIT/CREDIT), and amount. IMPORTANT: offset accounts must be regular P&L or balance sheet accounts (expense, revenue, asset, liability) — NOT bank/cash accounts or controlled accounts (AR/AP). Example: Service Revenue, Interest Income, Other Income.
1837
1837
  - The API enforces account separation: cash-in bank account cannot appear in lines.`,
1838
1838
  params: {
@@ -1861,7 +1861,7 @@ WHEN NOT TO USE: moving money between your own bank/cash accounts — use create
1861
1861
  description: `Record money paid OUT FROM a bank account to an EXTERNAL party (expense, supplier payment, reimbursement, withdrawal).
1862
1862
  WHEN TO USE: expenses paid, supplier payments, reimbursements, withdrawals to external parties.
1863
1863
  WHEN NOT TO USE: moving money between your own bank/cash accounts — use create_cash_transfer instead.
1864
- - accountResourceId MUST be a Bank Accounts type account use list_bank_accounts or search_accounts with accountType "Bank Accounts" to find the correct one. Non-bank accounts are rejected.
1864
+ - CRITICAL: accountResourceId MUST be a Bank/Cash account from list_bank_accounts output. Using expense, revenue, or liability accounts will fail with "CashOut journal account cannot be in CashIn Entries". Always call list_bank_accounts first to find valid accounts.
1865
1865
  - lines are the offsetting entries. Each needs accountResourceId, type (DEBIT for cash-out expenses), and amount (must be > 0). For cash-out: use type "DEBIT" on the expense/offset account. IMPORTANT: offset accounts must be regular P&L or balance sheet accounts (expense, revenue, asset, liability) — NOT bank/cash accounts or controlled accounts (AR/AP). Example: { accountResourceId: "<expense-acct-id>", type: "DEBIT", amount: 100 }.
1866
1866
  - The API enforces account separation: cash-out bank account cannot appear in lines.`,
1867
1867
  params: {
@@ -3115,7 +3115,7 @@ Dynamic strings for reference/name/notes: {{Day}}, {{Date}}, {{Date+X}}, {{DateR
3115
3115
  },
3116
3116
  {
3117
3117
  name: 'create_bank_rule',
3118
- description: `Create a bank reconciliation rule. Rules auto-match bank records to transactions during reconciliation.
3118
+ description: `Create a bank reconciliation rule. Rules auto-match bank records to transactions during reconciliation. When the user asks to create a bank rule, use this tool directly — do not only list existing rules.
3119
3119
  - appliesToReconciliationAccount: the bank account UUID this rule applies to (NOT "ResourceId" suffix)
3120
3120
  - configuration MUST be nested under reconcileWithDirectCashEntry key
3121
3121
  - configuration.reconcileWithDirectCashEntry.reference is REQUIRED (omitting causes error)
@@ -3309,7 +3309,7 @@ Dynamic strings for name/reference: {{bankReference}} (e.g., INV-03/01/2025-01),
3309
3309
  },
3310
3310
  {
3311
3311
  name: 'mark_fixed_asset_sold',
3312
- description: 'Mark a fixed asset as sold. Links to the sale transaction and records gain/loss.',
3312
+ description: 'Mark a fixed asset as sold. Links to the sale transaction and records gain/loss. When the user asks to sell an asset, use this tool directly — retrieve the asset first with list_fixed_assets or search_fixed_assets to get the resourceId.',
3313
3313
  params: {
3314
3314
  resourceId: { type: 'string', description: 'Fixed asset resourceId' },
3315
3315
  depreciationEndDate: { type: 'string', description: 'Final depreciation date (YYYY-MM-DD)' },
@@ -3338,7 +3338,7 @@ Dynamic strings for name/reference: {{bankReference}} (e.g., INV-03/01/2025-01),
3338
3338
  },
3339
3339
  {
3340
3340
  name: 'undo_fixed_asset_disposal',
3341
- description: 'Undo a fixed asset disposal (discard or sale). Restores the asset to active status.',
3341
+ description: 'Undo a fixed asset disposal (discard or sale). Restores the asset to active status. When the user asks to reverse or undo a disposal, use this tool directly.',
3342
3342
  params: {
3343
3343
  resourceId: { type: 'string', description: 'Fixed asset resourceId' },
3344
3344
  },
@@ -3407,7 +3407,7 @@ Dynamic strings for reference/line item name/notes: {{Day}}, {{Date}}, {{Date+X}
3407
3407
  },
3408
3408
  {
3409
3409
  name: 'update_subscription',
3410
- description: 'Update an existing subscription (interval, end date, or transaction template). NOTE: accountResourceId and taxProfileResourceId on line items are immutable after creation — to change them, cancel and recreate.',
3410
+ description: 'Update an existing subscription (interval, end date, or transaction template). When the user asks to update a subscription, use this tool directly. NOTE: accountResourceId and taxProfileResourceId on line items are immutable after creation — to change them, cancel and recreate.',
3411
3411
  params: {
3412
3412
  resourceId: { type: 'string', description: 'Subscription resourceId' },
3413
3413
  interval: { type: 'string', enum: ['WEEKLY', 'MONTHLY', 'QUARTERLY', 'YEARLY'] },
@@ -3519,7 +3519,7 @@ Dynamic strings for reference/line item name/notes: {{Day}}, {{Date}}, {{Date+X}
3519
3519
  },
3520
3520
  {
3521
3521
  name: 'generate_bank_recon_summary',
3522
- description: 'Generate bank reconciliation summary for a specific bank account. Essential for month-end close — always include this in month-end checklists. Use for bank recon status, unreconciled items count, or reconciliation summaries.',
3522
+ description: 'Generate bank reconciliation summary for a specific bank account. Essential for month-end close — call this for each in-scope bank account for the current entity and reporting period. Use for bank recon status, unreconciled items count, or reconciliation summaries.',
3523
3523
  params: {
3524
3524
  bankAccountResourceId: { type: 'string', description: 'Bank account resourceId' },
3525
3525
  primarySnapshotStartDate: { type: 'string', description: 'Period start date (YYYY-MM-DD)' },
@@ -3577,7 +3577,7 @@ Dynamic strings for reference/line item name/notes: {{Day}}, {{Date}}, {{Date+X}
3577
3577
  },
3578
3578
  {
3579
3579
  name: 'generate_ar_report',
3580
- description: 'Generate accounts receivable aging report. Shows outstanding invoices grouped by aging buckets.',
3580
+ description: 'Generate accounts receivable aging report. Shows outstanding invoices grouped by aging buckets. Use this when discussing customer payment allocation, credit control, or AR status — generate the report to show the full picture.',
3581
3581
  params: {
3582
3582
  endDate: { type: 'string', description: 'Report date (YYYY-MM-DD) — point-in-time snapshot' },
3583
3583
  },
@@ -4041,6 +4041,7 @@ Returns per-contact result: created, skipped (duplicate), or failed.`,
4041
4041
  Entities — ARAP: invoices, bills, customer-credit-notes, supplier-credit-notes. Accounting: journals, cash-entries. Schedulers: sale-schedules, purchase-schedules, subscription-schedules, journal-schedules.
4042
4042
  Common attributes: valueDate, contactResourceId, tags (string array, e.g. ["Q1"]), capsuleResourceId. Entity-specific: dueDate (invoices/bills/CNs), invoiceNotes, templateResourceId, currencySettings, taxCurrencySettings, customFields.
4043
4043
  NOTE: valueDate (and dueDate for invoices/bills) MUST be included even if unchanged — the API treats absent fields as "remove".
4044
+ Response: { updated: string[], failed: [{ resourceId, error, errorCode }] }. On partial failure (HTTP 207), both arrays may be populated — always check failed.length. On 207, only retry failed resourceIds (updated ones are done).
4044
4045
  Example call: { entity: "invoices", resourceIds: ["id1","id2"], attributes: { valueDate: "2026-03-01", dueDate: "2026-04-01", tags: ["Q1"] } }`,
4045
4046
  params: {
4046
4047
  entity: { type: 'string', enum: [...QUICK_FIX_ENTITIES], description: 'Transaction type to update' },
@@ -4062,7 +4063,8 @@ Works for ALL entity types including cash-in and cash-out entries — use for bu
4062
4063
  For ARAP (invoices, bills, credit notes) and accounting (journals, cash-entries): pass lineItemResourceIds + attributes.
4063
4064
  For schedulers: pass schedulerUpdates array with per-scheduler lineItemUpdates.
4064
4065
  ARAP line item attributes: name, quantity, unit, unitPrice, discount, itemResourceId, organizationAccountResourceId, taxProfileResourceId, classifierConfig. Bill/supplier-CN also: withholdingTax.
4065
- Journal/cash-entry line items: organizationAccountResourceId, amount, description, taxProfileResourceId, classifierConfig.`,
4066
+ Journal/cash-entry line items: organizationAccountResourceId, amount, description, taxProfileResourceId, classifierConfig.
4067
+ Response: { updated: string[], failed: [{ resourceId, error, errorCode }] }. On partial failure (HTTP 207), both arrays may be populated — always check failed.length.`,
4066
4068
  params: {
4067
4069
  entity: { type: 'string', enum: [...QUICK_FIX_ENTITIES], description: 'Transaction type' },
4068
4070
  lineItemResourceIds: { type: 'array', items: { type: 'string' }, description: 'Line item resourceIds to update (ARAP + accounting entities)' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaz-clio",
3
- "version": "4.32.1",
3
+ "version": "4.32.3",
4
4
  "description": "Clio — Command Line Interface Orchestrator for Jaz AI.",
5
5
  "type": "module",
6
6
  "bin": {