bkper 4.12.21 → 4.12.23

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.
@@ -7,6 +7,58 @@ Build, deploy, and manage Bkper apps using the `bkper` CLI.
7
7
 
8
8
  ---
9
9
 
10
+ ## Verification Workflow
11
+
12
+ When scaffolding, developing, or deploying an app, verify each step before proceeding. This prevents broken deployments and silent failures.
13
+
14
+ ### 1. Init
15
+ ```bash
16
+ bkper app init my-app
17
+ ```
18
+ Verify:
19
+ - `packages/web/client/`, `packages/web/server/`, `packages/events/`, and `packages/shared/` exist
20
+ - `bkper.yaml` has `id`, `name`, `description`, and `developers`
21
+ - `package.json` scripts include `dev` and `build`
22
+
23
+ ### 2. Develop
24
+ ```bash
25
+ npm run dev
26
+ ```
27
+ Verify:
28
+ - Web server responds: `curl http://localhost:8787` (or the port you configured)
29
+ - Client dev server is reachable if running separately
30
+ - Events tunnel URL is printed in terminal and registered in Bkper (check `webhookUrlDev` in app settings)
31
+ - If any handler fails to start, fix before writing code
32
+
33
+ ### 3. Build
34
+ ```bash
35
+ npm run build
36
+ ```
37
+ Verify:
38
+ - `dist/web/server/` contains the web worker bundle
39
+ - `dist/events/` contains the events handler bundle
40
+ - No build errors in terminal output
41
+
42
+ ### 4. Sync & Deploy
43
+ ```bash
44
+ bkper app sync && bkper app deploy
45
+ ```
46
+ Verify:
47
+ - `bkper app status` shows the deployed version
48
+ - URLs in `bkper.yaml` match the deployed domain (`https://{appId}.bkper.app`)
49
+
50
+ ### 5. Validate
51
+ ```bash
52
+ bkper app install <appId> -b <bookId>
53
+ ```
54
+ Verify:
55
+ - Menu appears in the book's "More" menu (if configured)
56
+ - Trigger a subscribed event in the book
57
+ - Check the Bkper activity stream for the handler response
58
+ - If the handler writes back to the book, confirm loop prevention is in place (check `event.agent.id`)
59
+
60
+ ---
61
+
10
62
  ## Development Workflow
11
63
 
12
64
  ```bash
@@ -54,13 +106,13 @@ bkper app uninstall my-app -b abc123
54
106
 
55
107
  ```bash
56
108
  # Store a secret (prompts for value)
57
- bkper app secrets put API_KEY
109
+ bkper app secrets put EXTERNAL_SERVICE_TOKEN
58
110
 
59
111
  # List all secrets
60
112
  bkper app secrets list
61
113
 
62
114
  # Delete a secret
63
- bkper app secrets delete API_KEY
115
+ bkper app secrets delete EXTERNAL_SERVICE_TOKEN
64
116
  ```
65
117
 
66
118
  ---
package/lib/docs/index.md CHANGED
@@ -4,6 +4,7 @@ Reference docs for Bkper tasks. Load only the specific doc(s) relevant to the ta
4
4
 
5
5
  - **data-management.md** — CLI reference for managing financial data: books, accounts, groups, transactions, per-account balance queries, query operators (on:, after:, before:, account:, group:), output formats (table/json/csv), batch operations via stdin/piping, collections.
6
6
  - **app-management.md** — CLI reference for building and deploying Bkper apps: dev/build/deploy workflow, app install/uninstall, secrets management, bkper.yaml configuration reference (identity, branding, events, menu integration, deployment).
7
+ - **app-building.md** — Full app-building reference: architecture (packages, client/server/events), development loop, event handlers, deployment patterns, the Bkper Platform, and self-hosted alternatives. Includes authentication patterns for web clients (`@bkper/web-auth`), event handlers (`bkper-oauth-token` headers), and local development. Load this for scaffolding apps, understanding app structure, or debugging the dev/build/deploy lifecycle.
7
8
  - **financial-statements.md** — Step-by-step workflow for aggregate financial reports (balance sheet, P&L): root group discovery, query patterns, date semantics (before: vs after:+before:), common mistakes to avoid.
8
9
  - **bkper-js.md** — bkper-js Node.js/browser SDK: Bkper, Book, Account, Transaction, Group, Balance classes, all methods, getBalancesReport, OAuth configuration, library setup.
9
10
  - **bkper-api-types.md** — Bkper REST API TypeScript interfaces: Book, Account, Transaction, Group, Balance, Collection — field names and types used by the API and bkper-js.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper",
3
- "version": "4.12.21",
3
+ "version": "4.12.23",
4
4
  "description": "Command line client for Bkper",
5
5
  "bin": {
6
6
  "bkper": "./lib/cli.js"
@@ -27,7 +27,8 @@
27
27
  "scripts": {
28
28
  "clean": "rm -rf ./lib & rm -rf ./node_modules & wait",
29
29
  "sync:docs": "bun ./scripts/sync-docs.ts",
30
- "prebuild": "bun install && bun sync:docs",
30
+ "generate:skill": "bun ./scripts/generate-skill.ts",
31
+ "prebuild": "bun install && bun sync:docs && bun generate:skill",
31
32
  "build": "run-s build:clean build:compile build:copy-docs",
32
33
  "build:clean": "gts clean && rimraf temp",
33
34
  "build:compile": "tsc",
@@ -50,7 +51,7 @@
50
51
  "upgrade:api": "bun update @bkper/bkper-api-types --latest && bun update bkper-js --latest"
51
52
  },
52
53
  "dependencies": {
53
- "@mariozechner/pi-coding-agent": "0.69.0",
54
+ "@mariozechner/pi-coding-agent": "0.70.5",
54
55
  "bkper-js": "^2.32.2",
55
56
  "commander": "^13.1.0",
56
57
  "dotenv": "^8.2.0",