@plumbus/core 0.7.1 → 0.7.3

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 (72) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +2 -0
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/ai/ai/cost-tracker.d.ts +5 -1
  5. package/dist/ai/ai/model-pricing.d.ts +3 -2
  6. package/dist/ai/ai-service.d.ts +3 -0
  7. package/dist/ai/ai-service.d.ts.map +1 -1
  8. package/dist/ai/ai-service.js +91 -18
  9. package/dist/ai/ai-service.js.map +1 -1
  10. package/dist/ai/cost-tracker.d.ts +5 -1
  11. package/dist/ai/cost-tracker.d.ts.map +1 -1
  12. package/dist/ai/cost-tracker.js +7 -2
  13. package/dist/ai/cost-tracker.js.map +1 -1
  14. package/dist/ai/explainability.d.ts +2 -1
  15. package/dist/ai/explainability.d.ts.map +1 -1
  16. package/dist/ai/explainability.js +1 -0
  17. package/dist/ai/explainability.js.map +1 -1
  18. package/dist/ai/model-pricing.d.ts +3 -2
  19. package/dist/ai/model-pricing.d.ts.map +1 -1
  20. package/dist/ai/model-pricing.js +23 -2
  21. package/dist/ai/model-pricing.js.map +1 -1
  22. package/dist/ai/provider.d.ts.map +1 -1
  23. package/dist/ai/provider.js +10 -0
  24. package/dist/ai/provider.js.map +1 -1
  25. package/dist/cli/commands/dev.d.ts.map +1 -1
  26. package/dist/cli/commands/dev.js +2 -1
  27. package/dist/cli/commands/dev.js.map +1 -1
  28. package/dist/cli/commands/start.d.ts.map +1 -1
  29. package/dist/cli/commands/start.js +2 -1
  30. package/dist/cli/commands/start.js.map +1 -1
  31. package/dist/cli/commands/worker.js +1 -1
  32. package/dist/cli/commands/worker.js.map +1 -1
  33. package/dist/cli/discover.d.ts +2 -0
  34. package/dist/cli/discover.d.ts.map +1 -1
  35. package/dist/cli/discover.js +19 -2
  36. package/dist/cli/discover.js.map +1 -1
  37. package/dist/execution/context-factory.d.ts.map +1 -1
  38. package/dist/execution/context-factory.js +3 -0
  39. package/dist/execution/context-factory.js.map +1 -1
  40. package/dist/flows/engine.d.ts.map +1 -1
  41. package/dist/flows/engine.js +2 -0
  42. package/dist/flows/engine.js.map +1 -1
  43. package/dist/runtime/bootstrap.d.ts +3 -1
  44. package/dist/runtime/bootstrap.d.ts.map +1 -1
  45. package/dist/runtime/bootstrap.js +19 -4
  46. package/dist/runtime/bootstrap.js.map +1 -1
  47. package/dist/runtime/load-extensions.d.ts +2 -1
  48. package/dist/runtime/load-extensions.d.ts.map +1 -1
  49. package/dist/runtime/load-extensions.js +8 -1
  50. package/dist/runtime/load-extensions.js.map +1 -1
  51. package/dist/runtime/start-worker-pool.d.ts.map +1 -1
  52. package/dist/runtime/start-worker-pool.js +1 -0
  53. package/dist/runtime/start-worker-pool.js.map +1 -1
  54. package/dist/server/bootstrap.d.ts +3 -0
  55. package/dist/server/bootstrap.d.ts.map +1 -1
  56. package/dist/server/bootstrap.js +20 -1
  57. package/dist/server/bootstrap.js.map +1 -1
  58. package/dist/testing/context.d.ts +2 -0
  59. package/dist/testing/context.d.ts.map +1 -1
  60. package/dist/testing/context.js +7 -3
  61. package/dist/testing/context.js.map +1 -1
  62. package/dist/types/context.d.ts +9 -1
  63. package/dist/types/context.d.ts.map +1 -1
  64. package/dist/types/index.d.ts +1 -1
  65. package/dist/types/index.d.ts.map +1 -1
  66. package/dist/types/index.js.map +1 -1
  67. package/instructions/ai.md +22 -0
  68. package/package.json +5 -4
  69. package/dist/ai/__typecheck-fixtures__/legacy-cost-api.d.ts +0 -5
  70. package/dist/ai/__typecheck-fixtures__/legacy-cost-api.d.ts.map +0 -1
  71. package/dist/ai/__typecheck-fixtures__/legacy-cost-api.js +0 -15
  72. package/dist/ai/__typecheck-fixtures__/legacy-cost-api.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @plumbus/core changelog
2
2
 
3
+ ## 0.7.3 — Unreleased
4
+
5
+ - Audit 20 decision integration failure scenarios with 30 unit/integration/real-HTTP regression cases. Snapshot billing context and isolate ledger observers from caller results. Share one cost-record ID/timestamp between the tracker and persistence hook.
6
+
7
+ - Add `ctx.ai.decide()` over the shared decision contract, with per-call cost/usage records, tenant/actor attribution, named definitions, security checks over state and questions, budgets, and cancellation forwarding.
8
+ - Wire explicit `app/server.ts` decision registration and `app/decisions/` discovery into API and workers. Preserve decision feature flags through service wrappers and add decision responses to `mockAI`.
9
+ - Reuse `onAICostRecorded` for successful and failed decision calls, preserving unknown cost as null and retaining known billed metadata after invalid provider answers.
10
+ - Depend on `@plumbus/ai-decision@~0.2.1`; vendor adapters remain optional. Keep typecheck fixtures out of production compilation.
11
+
12
+ ## 0.7.2 — 2026-09-23
13
+
14
+ - Add `claude-opus-5-5` standard pricing: $4 input, $0.20 cached input, $5 five-minute cache writes, and $20 output per million tokens, with no long-context surcharge. Rechecked earlier Opus rates against Anthropic's pricing on 2026-09-23.
15
+
16
+ - Add standard pricing for `gpt-6-sol` ($2 input / $0.20 cached input / $10 output per MTok) and `gpt-6-luna` ($0.10 / $0.01 / $0.50), including cache writes and the full-request long-context premium above 272K input tokens. Verified against OpenAI documentation on 2026-09-23.
17
+
18
+ - Support explicit same-call final-answer schema validation with native tools and forward the schema on OpenAI Chat Completions/Responses; malformed output is not retried.
19
+ - Install alongside `@plumbus/chat@0.2.2` to use prompt-schema validation for structured custom-agent output. Existing core `0.7.x` peer ranges are unchanged.
20
+
3
21
  ## 0.7.1 — 2026-09-10
4
22
 
5
23
  ### Fixed
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @plumbus/core
2
2
 
3
+ Release notes: [changelog](./CHANGELOG.md) and [version/upgrade guide](../../docs/upgrading-voice-and-decision-release.md).
4
+
3
5
  **AI-native, contract-driven TypeScript application framework.**
4
6
 
5
7
  Define your application through six composable primitives — Capabilities, Entities, Events, Flows, Prompts, and Translations — and get deny-by-default security, advisory governance, audit trails, and managed AI integration out of the box. Optional companion packages extend the surface for partner APIs, MCP agents, chat, knowledge, UI generation, and browser extensions — install only what you need.