bkper 4.16.5 → 4.16.6

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.
@@ -98,7 +98,7 @@ Base all reasoning about Bkper data — books, accounts, groups, transactions, b
98
98
  ## Reference Routing
99
99
 
100
100
  - Read local \`AGENTS.md\`, nearby files, and existing tests first for project-specific work.
101
- - For any Bkper task — CLI usage, SDK code, data management, or financial reports — read the docs index and then load the specific doc(s) it points to based on the task:
101
+ - For any Bkper task — CLI usage, SDK code, data management, financial reports, or taxes — read the docs index and then load the specific doc(s) it points to based on the task:
102
102
 
103
103
  \`\`\`
104
104
  ${indexPath}
package/lib/docs/index.md CHANGED
@@ -6,6 +6,6 @@ Reference docs for Bkper tasks. Load only the specific doc(s) relevant to the ta
6
6
  - **app-management.md** — CLI reference for building and deploying Bkper apps: dev/build/deploy workflow, app install/uninstall, secrets management, app logs, bkper.yaml configuration reference (identity, branding, events, menu integration, deployment).
7
7
  - **app-building.md** — Full app-building reference: single Worker app architecture (`client/` + `server/`), development loop, `/api/*` routes, `/events` handlers, deployment patterns, the Bkper Platform, and self-hosted alternatives. Includes authentication patterns for web clients (`@bkper/web-auth`), server API routes (`Authorization: Bearer` on `/api/*` with outbound auth injection), platform event handlers (`new Bkper()` with outbound auth injection), and local development.
8
8
  - **financial-statements.md** — Deterministic reporting principles and Bkper query semantics for balance sheet and P&L: trusted routes, root reporting groups, permanent vs period date rules, and provisional query patterns.
9
- - **taxes.md** — Deterministic tax reporting principles: trusted routes, user-approved tax-relevant groups/accounts, period activity queries, explicit jurisdiction assumptions, and provisional query patterns.
9
+ - **taxes.md** — Deterministic tax reporting principles: trusted routes, external tax-rule loading/discovery, user-approved tax-relevant groups/accounts, period activity queries, explicit jurisdiction assumptions, and provisional query patterns.
10
10
  - **bkper-js.md** — bkper-js Node.js/browser SDK: Bkper, Book, Account, Transaction, Group, Balance classes, all methods, getBalancesReport, OAuth configuration, library setup.
11
11
  - **bkper-api-types.md** — Bkper REST API TypeScript interfaces: Book, Account, Transaction, Group, Balance, Collection, File — field names and types used by the API and bkper-js.
package/lib/docs/taxes.md CHANGED
@@ -12,6 +12,23 @@ A tax route may compute tax owed only when the applicable rules, rates, and assu
12
12
 
13
13
  Prefer existing trusted routes before creating new ones. If none exists, recommend the smallest auditable route that fits the user's context.
14
14
 
15
+ ## Loading tax rules
16
+
17
+ When no trusted local tax route exists, or when the user asks to load jurisdiction rules, use external tax-rule libraries only as discovery sources. They may identify candidate rates, thresholds, deadlines, forms, classifications, and citations, but they are not a final computation route.
18
+
19
+ Do not produce tax numbers from loaded rules until the rule source, tax period, assumptions, and Bkper mappings have been reviewed or approved.
20
+
21
+ Preferred non-MCP OpenAccountants route:
22
+
23
+ 1. Start from `https://www.openaccountants.com/llms.txt`.
24
+ 2. Resolve the jurisdiction code, such as `BR`, `GB`, `DE`, `US-CA`, or `CA-ON`.
25
+ 3. Fetch `https://www.openaccountants.com/api/bundle/<CODE>`.
26
+ 4. Do not use MCP unless the user explicitly requests it.
27
+ 5. Record source URL, retrieval date, tax year, quality tier, verifier if present, and citations.
28
+ 6. Map rules only to user-approved Bkper Groups, Accounts, properties, or hashtags.
29
+
30
+ Example: for Brazil, resolve `BR` and fetch `https://www.openaccountants.com/api/bundle/BR`, then clarify whether the scope is IRPF, Carnê-Leão, payroll, indirect tax, e-invoice compliance, or another Brazil tax area.
31
+
15
32
  ## Bkper tax semantics
16
33
 
17
34
  Tax reports usually combine period activity with tax-account positions or movements.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper",
3
- "version": "4.16.5",
3
+ "version": "4.16.6",
4
4
  "description": "Command line client for Bkper",
5
5
  "bin": {
6
6
  "bkper": "./lib/cli.js"