bkper 5.1.0 → 5.2.0

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.
Files changed (44) hide show
  1. package/README.md +16 -0
  2. package/lib/agent/extensions/bkper-ai-provider.d.ts.map +1 -1
  3. package/lib/agent/extensions/bkper-ai-provider.js +47 -16
  4. package/lib/agent/extensions/bkper-ai-provider.js.map +1 -1
  5. package/lib/agent/extensions/builtins.d.ts.map +1 -1
  6. package/lib/agent/extensions/builtins.js +10 -2
  7. package/lib/agent/extensions/builtins.js.map +1 -1
  8. package/lib/agent/extensions/startup-logo.d.ts +9 -0
  9. package/lib/agent/extensions/startup-logo.d.ts.map +1 -0
  10. package/lib/agent/extensions/startup-logo.js +96 -0
  11. package/lib/agent/extensions/startup-logo.js.map +1 -0
  12. package/lib/agent/extensions/startup.d.ts.map +1 -1
  13. package/lib/agent/extensions/startup.js +63 -33
  14. package/lib/agent/extensions/startup.js.map +1 -1
  15. package/lib/agent/interactive/prompt-history-store.d.ts +1 -0
  16. package/lib/agent/interactive/prompt-history-store.d.ts.map +1 -1
  17. package/lib/agent/interactive/prompt-history-store.js +19 -5
  18. package/lib/agent/interactive/prompt-history-store.js.map +1 -1
  19. package/lib/agent/interactive/run-agent-mode.d.ts.map +1 -1
  20. package/lib/agent/interactive/run-agent-mode.js +5 -2
  21. package/lib/agent/interactive/run-agent-mode.js.map +1 -1
  22. package/lib/agent/interactive/settings.d.ts +26 -4
  23. package/lib/agent/interactive/settings.d.ts.map +1 -1
  24. package/lib/agent/interactive/settings.js +106 -16
  25. package/lib/agent/interactive/settings.js.map +1 -1
  26. package/lib/agent/interactive/themes.d.ts +13 -0
  27. package/lib/agent/interactive/themes.d.ts.map +1 -0
  28. package/lib/agent/interactive/themes.js +36 -0
  29. package/lib/agent/interactive/themes.js.map +1 -0
  30. package/lib/agent/system-prompt.d.ts.map +1 -1
  31. package/lib/agent/system-prompt.js +19 -7
  32. package/lib/agent/system-prompt.js.map +1 -1
  33. package/lib/agent/themes/bkper-dark.json +80 -0
  34. package/lib/agent/themes/bkper-light.json +80 -0
  35. package/lib/cli.js +1 -1
  36. package/lib/cli.js.map +1 -1
  37. package/lib/commands/agent-command.d.ts.map +1 -1
  38. package/lib/commands/agent-command.js +2 -1
  39. package/lib/commands/agent-command.js.map +1 -1
  40. package/lib/docs/ai/decision-models.md +316 -0
  41. package/lib/docs/apps/ai.md +120 -88
  42. package/lib/docs/apps/overview.md +1 -1
  43. package/lib/docs/index.md +2 -1
  44. package/package.json +6 -4
@@ -20,7 +20,7 @@ The same Worker can expose app-defined `/api/*` routes. Treat those routes as th
20
20
 
21
21
  When an app needs model inference, use Bkper AI by default. An authenticated app API route or event establishes the user and app identity, then platform outbound supplies authorization and usage attribution for the Worker's Bkper AI requests. The app does not need provider credentials.
22
22
 
23
- See [Add Bkper AI to an App](https://bkper.com/docs/platform/apps/ai.md) for live model discovery, strict structured output, validation, and the client-to-Worker authentication flow.
23
+ See [Add Bkper AI to an App](https://bkper.com/docs/platform/apps/ai.md) for the client-to-Worker authentication flow and SDK setup for decision and language models.
24
24
 
25
25
  ### Authentication
26
26
 
package/lib/docs/index.md CHANGED
@@ -10,7 +10,8 @@ For Bkper app implementation, refactoring, or code review, always read `apps/qua
10
10
  - `cli/data-management.md` — CLI reference for managing financial data and files: books, accounts, groups, files, transactions, per-account balance queries, query operators (on:, after:, before:, account:, group:), JSON output shapes and jq reshaping, human-review Bkper UI links, batch operations via stdin/piping, collections.
11
11
  - `cli/app-management.md` — CLI reference for building and deploying Bkper apps: init/git clone/credential helpers, dev/build/deploy workflow, app install/uninstall, secrets management, app logs, bkper.yaml configuration reference (identity, branding, events, menu integration, deployment).
12
12
  - `apps/overview.md` — Platform evaluation and capability overview: use when comparing managed Bkper hosting with self-managed infrastructure or clarifying platform responsibilities; use the task-specific app references for implementation.
13
- - `apps/ai.md` — Bkper AI in Platform apps: choose Jev typed evaluations or Open Responses language models, authenticate through app `/api/*` routes, discover model capabilities, validate output, and keep Book writes under deterministic application control.
13
+ - `apps/ai.md` — Bkper AI in apps, scripts, and tools: ask the Jev decision model with TypeSafe's SDK or language models with AI SDK Open Responses, authenticate through app `/api/*` routes or a Bkper token outside the platform, handle errors, and keep Book writes under deterministic application control.
14
+ - `ai/decision-models.md` — Automating recurring judgments in code, such as categorizing bank lines, matching duplicates, or flagging entries, with Bkper AI decision models: writing questions and state, reading calibrated answers, and acting only above thresholds while routing uncertain cases to a person.
14
15
  - `apps/first-app.md` — First-app walkthrough: scaffold, install, run locally, trigger an event, customize the listing, establish shared source, check, and deploy.
15
16
  - `apps/architecture.md` — App and template architecture: npm workspace structure, Lit/Vite client, Hono Worker, typed `/api/*` contracts, authentication, `/events`, static assets, and supported app shapes.
16
17
  - `apps/quality.md` — Cross-cutting quality guidance for Bkper apps: UI consistency, immediate first rendering, typed API contracts, cohesive low-coupling modules, separation of business behavior from connectors and storage, security, and final implementation review. Load for app implementation, refactoring, or review tasks.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bkper",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "Official Bkper CLI for accounting data, automation, apps, and AI agents",
5
5
  "bin": {
6
6
  "bkper": "./lib/cli.js"
@@ -37,10 +37,11 @@
37
37
  "clean": "rm -rf ./lib & rm -rf ./node_modules & wait",
38
38
  "sync:docs": "bun ./scripts/sync-docs.ts",
39
39
  "prebuild": "bun install && bun sync:docs",
40
- "build": "run-s build:clean build:compile build:copy-docs",
40
+ "build": "run-s build:clean build:compile build:copy-docs build:copy-themes",
41
41
  "build:clean": "gts clean && rimraf temp",
42
42
  "build:compile": "tsc",
43
43
  "build:copy-docs": "mkdir -p lib && rm -rf lib/docs && cp -R skill/references lib/docs",
44
+ "build:copy-themes": "mkdir -p lib/agent && rm -rf lib/agent/themes && cp -R src/agent/themes lib/agent/themes",
44
45
  "skill:package": "bun ./scripts/generate-skill-distribution.ts",
45
46
  "api:platform": "openapi-typescript https://platform.bkper.app/openapi.json -o src/platform/types.d.ts",
46
47
  "api:platform:local": "openapi-typescript http://localhost:8790/openapi.json -o src/platform/types.d.ts",
@@ -62,8 +63,9 @@
62
63
  "upgrade:api": "bun update @bkper/bkper-api-types --latest && bun update bkper-js --latest"
63
64
  },
64
65
  "dependencies": {
65
- "@earendil-works/pi-coding-agent": "0.87.1",
66
- "@earendil-works/pi-tui": "0.87.1",
66
+ "@earendil-works/pi-ai": "0.99.2",
67
+ "@earendil-works/pi-coding-agent": "0.99.2",
68
+ "@earendil-works/pi-tui": "0.99.2",
67
69
  "bkper-js": "^2.42.0",
68
70
  "commander": "^13.1.0",
69
71
  "dotenv": "^8.2.0",