bkper 4.16.5 → 4.16.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.
- package/lib/agent/system-prompt.js +1 -1
- package/lib/docs/app-building.md +3 -1
- package/lib/docs/index.md +1 -1
- package/lib/docs/taxes.md +19 -0
- package/package.json +1 -1
|
@@ -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,
|
|
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/app-building.md
CHANGED
|
@@ -539,7 +539,9 @@ See [Event Handlers](https://bkper.com/docs/build/apps/event-handlers.md) for de
|
|
|
539
539
|
|
|
540
540
|
### Properties schema
|
|
541
541
|
|
|
542
|
-
The `propertiesSchema` field defines autocomplete suggestions for custom properties in the Bkper UI, helping users discover the correct property keys and values for your app
|
|
542
|
+
The `propertiesSchema` field defines autocomplete suggestions for custom properties in the Bkper UI, helping users discover the correct property keys and values for your app.
|
|
543
|
+
|
|
544
|
+
Suggested keys must follow the same custom property rules as user-entered keys, including the 30-character maximum after normalization.
|
|
543
545
|
|
|
544
546
|
```yaml
|
|
545
547
|
propertiesSchema:
|
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,25 @@ 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. Resolve the jurisdiction code or name, such as `BR`, `GB`, `DE`, `US-CA`, `CA-ON`, or `brazil`.
|
|
24
|
+
2. Fetch `https://www.openaccountants.com/api/bundle/<CODE_OR_NAME>`.
|
|
25
|
+
3. Do not use MCP unless the user explicitly requests it.
|
|
26
|
+
4. If the bundle cannot be resolved, ask the user for the exact jurisdiction or source URL instead of guessing.
|
|
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, fetch `https://www.openaccountants.com/api/bundle/BR` or `https://www.openaccountants.com/api/bundle/brazil`, then clarify whether the scope is IRPF, Carnê-Leão, payroll, indirect tax, e-invoice compliance, or another Brazil tax area.
|
|
31
|
+
|
|
32
|
+
For multi-layer jurisdictions, first determine whether the scope is national/federal-only, sub-jurisdiction-only, or both. Use a national/federal code such as `US` or `US-FED` for US federal-only rules. Use structured sub-jurisdiction codes such as `US-CA` for California or `CA-ON` for Ontario when state or provincial rules are relevant. If both layers matter, load and record each applicable bundle, and verify that the returned bundle title matches the requested layer.
|
|
33
|
+
|
|
15
34
|
## Bkper tax semantics
|
|
16
35
|
|
|
17
36
|
Tax reports usually combine period activity with tax-account positions or movements.
|