jaz-clio 4.25.5 → 4.25.7

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.25.5
3
+ version: 4.25.7
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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: jaz-conversion
3
- version: 4.25.5
3
+ version: 4.25.7
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.25.5
3
+ version: 4.25.7
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.25.5
3
+ version: 4.25.7
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.
@@ -212,18 +212,36 @@ export const TOOL_DEFINITIONS = [
212
212
  params: {
213
213
  name: { type: 'string', description: 'Account name' },
214
214
  code: { type: 'string', description: 'Account code (unique)' },
215
- accountType: { type: 'string', description: 'Account type (e.g., "Current Assets", "Revenue")' },
215
+ accountType: { type: 'string', description: 'Exact API values: "Bank Accounts", "Cash", "Current Asset", "Fixed Asset", "Inventory", "Current Liability", "Non-current Liability", "Shareholders Equity", "Operating Revenue", "Other Revenue", "Operating Expense", "Direct Costs"' },
216
216
  currencyCode: { type: 'string', description: 'Currency code (e.g., "SGD")' },
217
217
  },
218
218
  required: ['name', 'code', 'accountType'],
219
219
  group: 'accounts',
220
220
  readOnly: false,
221
- execute: async (ctx, input) => createAccount(ctx.client, {
222
- code: input.code,
223
- name: input.name,
224
- accountType: input.accountType,
225
- currencyCode: input.currencyCode,
226
- }),
221
+ execute: async (ctx, input) => {
222
+ // Normalize common LLM variations to exact API values
223
+ const typeMap = {
224
+ 'current assets': 'Current Asset', 'current asset': 'Current Asset',
225
+ 'fixed assets': 'Fixed Asset', 'fixed asset': 'Fixed Asset',
226
+ 'bank account': 'Bank Accounts', 'bank accounts': 'Bank Accounts', 'bank': 'Bank Accounts',
227
+ 'current liabilities': 'Current Liability', 'current liability': 'Current Liability',
228
+ 'non-current liabilities': 'Non-current Liability', 'non-current liability': 'Non-current Liability',
229
+ 'equity': 'Shareholders Equity', 'shareholders equity': 'Shareholders Equity', "shareholders' equity": 'Shareholders Equity', "shareholder's equity": 'Shareholders Equity',
230
+ 'revenue': 'Operating Revenue', 'operating revenue': 'Operating Revenue',
231
+ 'other revenue': 'Other Revenue', 'other income': 'Other Revenue',
232
+ 'expense': 'Operating Expense', 'operating expense': 'Operating Expense', 'expenses': 'Operating Expense',
233
+ 'direct costs': 'Direct Costs', 'cost of goods sold': 'Direct Costs', 'cogs': 'Direct Costs',
234
+ 'cash': 'Cash', 'inventory': 'Inventory',
235
+ };
236
+ const rawType = input.accountType;
237
+ const accountType = typeMap[rawType.toLowerCase()] ?? rawType;
238
+ return createAccount(ctx.client, {
239
+ code: input.code,
240
+ name: input.name,
241
+ accountType,
242
+ currencyCode: input.currencyCode,
243
+ });
244
+ },
227
245
  },
228
246
  {
229
247
  name: 'update_account',
@@ -316,24 +334,39 @@ export const TOOL_DEFINITIONS = [
316
334
  listTool('list_invoices', 'List invoices. Returns reference, date, status, contact, totalAmount. Paginated — response includes totalElements. Use limit/offset to page.', 'invoices', (client, off, lim) => listInvoices(client, { limit: lim, offset: off })),
317
335
  {
318
336
  name: 'search_invoices',
319
- description: 'Search invoices by reference or contact name. Returns up to 100 by default. Use limit/offset to page through large result sets.',
337
+ description: 'Search invoices by reference, contact name, and/or date range. Provide any combination of filters.',
320
338
  params: {
321
- query: { type: 'string', description: 'Search term (reference or contact name)' },
339
+ query: { type: 'string', description: 'Search by invoice reference number' },
340
+ contactName: { type: 'string', description: 'Search by contact name' },
341
+ startDate: { type: 'string', description: 'Filter invoices on or after this date (YYYY-MM-DD)' },
342
+ endDate: { type: 'string', description: 'Filter invoices on or before this date (YYYY-MM-DD)' },
322
343
  ...SEARCH_PARAMS,
323
344
  },
324
- required: ['query'],
345
+ required: [],
325
346
  group: 'invoices',
326
347
  readOnly: true,
327
348
  execute: async (ctx, input) => {
328
349
  const { mode, limit, offset, sortBy, sortOrder } = extractPaginationInput(input);
329
350
  const query = input.query;
351
+ const contactName = input.contactName;
352
+ const startDate = input.startDate;
353
+ const endDate = input.endDate;
354
+ // Build filter — avoid nested `contact` inside `or` (causes 400)
355
+ const filter = {};
356
+ if (query)
357
+ filter.reference = { contains: query };
358
+ if (contactName)
359
+ filter.contact = { name: { contains: contactName } };
360
+ if (startDate || endDate) {
361
+ const dateFilter = {};
362
+ if (startDate)
363
+ dateFilter.gte = startDate;
364
+ if (endDate)
365
+ dateFilter.lte = endDate;
366
+ filter.valueDate = dateFilter;
367
+ }
330
368
  return handlePaginationMode(mode, (off, lim) => searchInvoices(ctx.client, {
331
- filter: query ? {
332
- or: [
333
- { reference: { contains: query } },
334
- { contact: { name: { contains: query } } },
335
- ],
336
- } : undefined,
369
+ filter: Object.keys(filter).length > 0 ? filter : undefined,
337
370
  limit: lim, offset: off,
338
371
  sort: { sortBy: [sortBy ?? 'valueDate'], order: (sortOrder ?? 'DESC') },
339
372
  }), limit, offset, 100);
@@ -437,7 +470,7 @@ export const TOOL_DEFINITIONS = [
437
470
  accountResourceId: input.accountResourceId,
438
471
  valueDate: input.valueDate,
439
472
  dueDate: input.valueDate,
440
- reference: input.reference ?? '',
473
+ reference: input.reference || `PMT-${Date.now()}`,
441
474
  paymentMethod: (input.paymentMethod ?? 'BANK_TRANSFER'),
442
475
  saveAsDraft: false,
443
476
  customFields: input.customFields, // eslint-disable-line @typescript-eslint/no-explicit-any
@@ -501,24 +534,38 @@ export const TOOL_DEFINITIONS = [
501
534
  listTool('list_bills', 'List bills (purchase invoices). Returns reference, date, status, contact, amounts. Paginated — response includes totalElements. Use limit/offset to page.', 'bills', (client, off, lim) => listBills(client, { limit: lim, offset: off })),
502
535
  {
503
536
  name: 'search_bills',
504
- description: 'Search bills by reference or contact name. Returns up to 100 by default. Use limit/offset to page through large result sets.',
537
+ description: 'Search bills by reference, contact name, and/or date range. Provide any combination of filters.',
505
538
  params: {
506
- query: { type: 'string', description: 'Search term' },
539
+ query: { type: 'string', description: 'Search by bill reference number' },
540
+ contactName: { type: 'string', description: 'Search by contact name' },
541
+ startDate: { type: 'string', description: 'Filter bills on or after this date (YYYY-MM-DD)' },
542
+ endDate: { type: 'string', description: 'Filter bills on or before this date (YYYY-MM-DD)' },
507
543
  ...SEARCH_PARAMS,
508
544
  },
509
- required: ['query'],
545
+ required: [],
510
546
  group: 'bills',
511
547
  readOnly: true,
512
548
  execute: async (ctx, input) => {
513
549
  const { mode, limit, offset, sortBy, sortOrder } = extractPaginationInput(input);
514
550
  const query = input.query;
551
+ const contactName = input.contactName;
552
+ const startDate = input.startDate;
553
+ const endDate = input.endDate;
554
+ const filter = {};
555
+ if (query)
556
+ filter.reference = { contains: query };
557
+ if (contactName)
558
+ filter.contact = { name: { contains: contactName } };
559
+ if (startDate || endDate) {
560
+ const dateFilter = {};
561
+ if (startDate)
562
+ dateFilter.gte = startDate;
563
+ if (endDate)
564
+ dateFilter.lte = endDate;
565
+ filter.valueDate = dateFilter;
566
+ }
515
567
  return handlePaginationMode(mode, (off, lim) => searchBills(ctx.client, {
516
- filter: query ? {
517
- or: [
518
- { reference: { contains: query } },
519
- { contact: { name: { contains: query } } },
520
- ],
521
- } : undefined,
568
+ filter: Object.keys(filter).length > 0 ? filter : undefined,
522
569
  limit: lim, offset: off,
523
570
  sort: { sortBy: [sortBy ?? 'valueDate'], order: (sortOrder ?? 'DESC') },
524
571
  }), limit, offset, 100);
@@ -625,7 +672,7 @@ export const TOOL_DEFINITIONS = [
625
672
  accountResourceId: input.accountResourceId,
626
673
  valueDate: input.valueDate,
627
674
  dueDate: input.valueDate,
628
- reference: input.reference ?? '',
675
+ reference: input.reference || `PMT-${Date.now()}`,
629
676
  paymentMethod: (input.paymentMethod ?? 'BANK_TRANSFER'),
630
677
  saveAsDraft: false,
631
678
  customFields: input.customFields, // eslint-disable-line @typescript-eslint/no-explicit-any
@@ -1143,7 +1190,12 @@ export const TOOL_DEFINITIONS = [
1143
1190
  required: ['valueDate', 'contactResourceId', 'lineItems'],
1144
1191
  group: 'customer_credit_notes',
1145
1192
  readOnly: false,
1146
- execute: async (ctx, input) => createCustomerCreditNote(ctx.client, input),
1193
+ execute: async (ctx, input) => {
1194
+ const data = { ...input };
1195
+ if (!data.reference)
1196
+ data.reference = `CCN-${Date.now()}`;
1197
+ return createCustomerCreditNote(ctx.client, data);
1198
+ },
1147
1199
  },
1148
1200
  {
1149
1201
  name: 'delete_customer_credit_note',
@@ -1307,7 +1359,12 @@ export const TOOL_DEFINITIONS = [
1307
1359
  required: ['valueDate', 'contactResourceId', 'lineItems'],
1308
1360
  group: 'supplier_credit_notes',
1309
1361
  readOnly: false,
1310
- execute: async (ctx, input) => createSupplierCreditNote(ctx.client, input),
1362
+ execute: async (ctx, input) => {
1363
+ const data = { ...input };
1364
+ if (!data.reference)
1365
+ data.reference = `SCN-${Date.now()}`;
1366
+ return createSupplierCreditNote(ctx.client, data);
1367
+ },
1311
1368
  },
1312
1369
  {
1313
1370
  name: 'delete_supplier_credit_note',
@@ -1525,9 +1582,10 @@ export const TOOL_DEFINITIONS = [
1525
1582
  listTool('list_cash_in', 'List cash-in entries (direct cash receipts). Paginated.', 'cash_entries', (client, off, lim) => listCashIn(client, { limit: lim, offset: off })),
1526
1583
  {
1527
1584
  name: 'create_cash_in',
1528
- description: `Create a direct cash-in entry. IMPORTANT:
1529
- - journalEntries must have accountResourceId, type (DEBIT/CREDIT), and amount.
1530
- - accountResourceId is the bank/cash account receiving the money.`,
1585
+ description: `Create a direct cash-in entry (money received). IMPORTANT:
1586
+ - accountResourceId is the bank/cash account receiving the money. Must be a "Bank Accounts" or "Cash" type account that is NOT used for cash-out.
1587
+ - journalEntries are the offsetting entries (e.g., revenue account). Each needs accountResourceId, type (DEBIT/CREDIT), and amount.
1588
+ - The API enforces account separation: cash-in accounts cannot be used for cash-out and vice versa.`,
1531
1589
  params: {
1532
1590
  reference: { type: 'string', description: 'Reference number' },
1533
1591
  valueDate: { type: 'string', description: 'Date (YYYY-MM-DD)' },
@@ -1553,12 +1611,20 @@ export const TOOL_DEFINITIONS = [
1553
1611
  required: ['valueDate', 'accountResourceId', 'journalEntries'],
1554
1612
  group: 'cash_entries',
1555
1613
  readOnly: false,
1556
- execute: async (ctx, input) => createCashIn(ctx.client, input),
1614
+ execute: async (ctx, input) => {
1615
+ const data = { ...input };
1616
+ if (!data.reference)
1617
+ data.reference = `CI-${Date.now()}`;
1618
+ return createCashIn(ctx.client, data);
1619
+ },
1557
1620
  },
1558
1621
  listTool('list_cash_out', 'List cash-out entries (direct cash disbursements). Paginated.', 'cash_entries', (client, off, lim) => listCashOut(client, { limit: lim, offset: off })),
1559
1622
  {
1560
1623
  name: 'create_cash_out',
1561
- description: 'Create a direct cash-out entry. Same structure as create_cash_in.',
1624
+ description: `Create a direct cash-out entry (money paid out). IMPORTANT:
1625
+ - accountResourceId is the bank/cash account disbursing the money. Must be a "Bank Accounts" or "Cash" type account that is NOT used for cash-in.
1626
+ - journalEntries are the offsetting entries (e.g., expense account). Each needs accountResourceId, type (DEBIT/CREDIT), and amount.
1627
+ - The API enforces account separation: cash-out accounts cannot be used for cash-in and vice versa.`,
1562
1628
  params: {
1563
1629
  reference: { type: 'string', description: 'Reference number' },
1564
1630
  valueDate: { type: 'string', description: 'Date (YYYY-MM-DD)' },
@@ -1584,7 +1650,12 @@ export const TOOL_DEFINITIONS = [
1584
1650
  required: ['valueDate', 'accountResourceId', 'journalEntries'],
1585
1651
  group: 'cash_entries',
1586
1652
  readOnly: false,
1587
- execute: async (ctx, input) => createCashOut(ctx.client, input),
1653
+ execute: async (ctx, input) => {
1654
+ const data = { ...input };
1655
+ if (!data.reference)
1656
+ data.reference = `CO-${Date.now()}`;
1657
+ return createCashOut(ctx.client, data);
1658
+ },
1588
1659
  },
1589
1660
  {
1590
1661
  name: 'get_cash_in',
@@ -1650,7 +1721,10 @@ export const TOOL_DEFINITIONS = [
1650
1721
  listTool('list_cash_transfers', 'List cash transfer entries. Paginated.', 'cash_transfers', (client, off, lim) => listCashTransfers(client, { limit: lim, offset: off })),
1651
1722
  {
1652
1723
  name: 'create_cash_transfer',
1653
- description: 'Create a cash transfer between two accounts. Requires cashOut and cashIn sides.',
1724
+ description: `Create a cash transfer between two accounts. IMPORTANT:
1725
+ - reference is required (auto-generated if not provided).
1726
+ - Both cashOut and cashIn sides need accountResourceId and journalEntries with amount.
1727
+ - cashOut.journalEntries[].amount is required — this is the transfer amount.`,
1654
1728
  params: {
1655
1729
  reference: { type: 'string', description: 'Reference number' },
1656
1730
  valueDate: { type: 'string', description: 'Date (YYYY-MM-DD)' },
@@ -1699,7 +1773,12 @@ export const TOOL_DEFINITIONS = [
1699
1773
  required: ['valueDate', 'cashOut', 'cashIn'],
1700
1774
  group: 'cash_transfers',
1701
1775
  readOnly: false,
1702
- execute: async (ctx, input) => createCashTransfer(ctx.client, input),
1776
+ execute: async (ctx, input) => {
1777
+ const data = { ...input };
1778
+ if (!data.reference)
1779
+ data.reference = `CT-${Date.now()}`;
1780
+ return createCashTransfer(ctx.client, data);
1781
+ },
1703
1782
  },
1704
1783
  // ── Scheduled Transactions ─────────────────────────────────────
1705
1784
  listTool('list_scheduled_invoices', 'List scheduled (recurring) invoices. Paginated.', 'schedulers', (client, off, lim) => listScheduledInvoices(client, { limit: lim, offset: off })),
@@ -1858,10 +1937,10 @@ export const TOOL_DEFINITIONS = [
1858
1937
  items: {
1859
1938
  type: 'object',
1860
1939
  properties: {
1861
- module: { type: 'string', description: 'Module (e.g., ACCOUNTING, SALES)' },
1862
- role: { type: 'string', description: 'Role (e.g., ADMIN, VIEWER)' },
1940
+ moduleName: { type: 'string', description: 'Module name: ORGANIZATION, USER_MANAGEMENT, ACCOUNTING, SALES, PURCHASES, REPORTS, or FIXED_ASSET' },
1941
+ roleCode: { type: 'string', description: 'Role code: ADMIN, PREPARER, MEMBER, or NO_ACCESS' },
1863
1942
  },
1864
- required: ['module', 'role'],
1943
+ required: ['moduleName', 'roleCode'],
1865
1944
  },
1866
1945
  description: 'Module role assignments',
1867
1946
  },
@@ -1881,10 +1960,10 @@ export const TOOL_DEFINITIONS = [
1881
1960
  items: {
1882
1961
  type: 'object',
1883
1962
  properties: {
1884
- module: { type: 'string' },
1885
- role: { type: 'string' },
1963
+ moduleName: { type: 'string', description: 'Module name: ORGANIZATION, USER_MANAGEMENT, ACCOUNTING, SALES, PURCHASES, REPORTS, or FIXED_ASSET' },
1964
+ roleCode: { type: 'string', description: 'Role code: ADMIN, PREPARER, MEMBER, or NO_ACCESS' },
1886
1965
  },
1887
- required: ['module', 'role'],
1966
+ required: ['moduleName', 'roleCode'],
1888
1967
  },
1889
1968
  },
1890
1969
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jaz-clio",
3
- "version": "4.25.5",
3
+ "version": "4.25.7",
4
4
  "description": "Clio — Command Line Interface Orchestrator for Jaz AI.",
5
5
  "type": "module",
6
6
  "bin": {