@plumbus/core 0.8.0-beta.1 → 0.8.0-beta.2
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/CHANGELOG.md +13 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/ai/ai/provider.d.ts +2 -0
- package/dist/ai/ai-service.d.ts +35 -0
- package/dist/ai/ai-service.d.ts.map +1 -1
- package/dist/ai/ai-service.js +132 -13
- package/dist/ai/ai-service.js.map +1 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/provider.d.ts +2 -0
- package/dist/ai/provider.d.ts.map +1 -1
- package/dist/ai/provider.js +5 -0
- package/dist/ai/provider.js.map +1 -1
- package/dist/cli/commands/dev.d.ts.map +1 -1
- package/dist/cli/commands/dev.js +4 -0
- package/dist/cli/commands/dev.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +6 -0
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/durable/index.d.ts +2 -2
- package/dist/durable/index.d.ts.map +1 -1
- package/dist/durable/index.js +2 -2
- package/dist/durable/index.js.map +1 -1
- package/dist/durable/postgres-persist.d.ts +39 -2
- package/dist/durable/postgres-persist.d.ts.map +1 -1
- package/dist/durable/postgres-persist.js +67 -4
- package/dist/durable/postgres-persist.js.map +1 -1
- package/dist/durable/spine-claim.d.ts +11 -0
- package/dist/durable/spine-claim.d.ts.map +1 -1
- package/dist/durable/spine-claim.js +36 -2
- package/dist/durable/spine-claim.js.map +1 -1
- package/dist/events/dispatcher.d.ts.map +1 -1
- package/dist/events/dispatcher.js +21 -4
- package/dist/events/dispatcher.js.map +1 -1
- package/dist/events/worker.d.ts.map +1 -1
- package/dist/events/worker.js +1 -3
- package/dist/events/worker.js.map +1 -1
- package/dist/execution/context-factory.d.ts.map +1 -1
- package/dist/execution/context-factory.js +6 -1
- package/dist/execution/context-factory.js.map +1 -1
- package/dist/execution/deferred-flow-service.d.ts.map +1 -1
- package/dist/execution/deferred-flow-service.js +7 -0
- package/dist/execution/deferred-flow-service.js.map +1 -1
- package/dist/flows/dead-letter.d.ts +18 -1
- package/dist/flows/dead-letter.d.ts.map +1 -1
- package/dist/flows/dead-letter.js +17 -1
- package/dist/flows/dead-letter.js.map +1 -1
- package/dist/flows/engine.d.ts +15 -0
- package/dist/flows/engine.d.ts.map +1 -1
- package/dist/flows/engine.js +149 -22
- package/dist/flows/engine.js.map +1 -1
- package/dist/flows/flow-service.d.ts.map +1 -1
- package/dist/flows/flow-service.js +3 -0
- package/dist/flows/flow-service.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime/bootstrap.d.ts +16 -1
- package/dist/runtime/bootstrap.d.ts.map +1 -1
- package/dist/runtime/bootstrap.js +7 -1
- package/dist/runtime/bootstrap.js.map +1 -1
- package/dist/runtime/load-extensions.d.ts.map +1 -1
- package/dist/runtime/load-extensions.js +33 -0
- package/dist/runtime/load-extensions.js.map +1 -1
- package/dist/runtime/start-worker-pool.d.ts.map +1 -1
- package/dist/runtime/start-worker-pool.js +33 -15
- package/dist/runtime/start-worker-pool.js.map +1 -1
- package/dist/server/bootstrap.d.ts +19 -0
- package/dist/server/bootstrap.d.ts.map +1 -1
- package/dist/server/bootstrap.js +31 -3
- package/dist/server/bootstrap.js.map +1 -1
- package/dist/testing/context.d.ts.map +1 -1
- package/dist/testing/context.js +1 -0
- package/dist/testing/context.js.map +1 -1
- package/dist/types/context.d.ts +3 -0
- package/dist/types/context.d.ts.map +1 -1
- package/dist/worker/bootstrap.d.ts +8 -0
- package/dist/worker/bootstrap.d.ts.map +1 -1
- package/dist/worker/bootstrap.js +19 -7
- package/dist/worker/bootstrap.js.map +1 -1
- package/instructions/ai.md +14 -0
- package/instructions/flows.md +6 -0
- package/instructions/framework.md +3 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @plumbus/core changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0-beta.2 — 2026-09-16
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- **Host data-plane resolver exports.** `app/server.ts` may export `dataPlaneResolver`, `listTenantRefs`, `untenantedDataPlane`, `requestDataPlane`, `workerDataPlane` and `resolveTenantRef`; `plumbus dev` / `start` / `worker` pass them to `createServer` and the worker pool. Request-side flow engines then carry `spineDispatch`, so a flow started by a request is written to the tenant plane with an opaque hint on the control plane. `untenantedDataPlane: 'control-plane'` (`FlowSpineDispatchConfig.untenanted`) lets flows with no tenant stay classic spine rows claimed beside the tenant hints (default `'refuse'`); `requestDataPlane: 'control-plane'` keeps request repositories on the boot connection and `workerDataPlane: 'control-plane'` does the same for claimed units (`WorkerPoolConfig.unitDataPlane`; both default to `'resolved'`). Under `'resolved'`, a `tenantScoped: false` capability reads the control plane even for a tenant-bound request. A host that supplies a resolver must not also supply `createDataService`. `retryDeadLetteredFlow` takes an optional `placement` (`{ spineDb, coreSchema? }`) that reopens a tenant-placed execution and publishes a fresh spine hint (`republished` on the result). A host enabling spine dispatch needs the framework's `opaque_dispatch` table on its control plane (`migrations/spine/0000_opaque_dispatch.sql`) and the `core_plumbus` durable tables on each tenant plane. Docs: [Tenant data planes](../../docs/sdk-reference/tenant-data-planes.md).
|
|
8
|
+
- **AI provider admission and trace propagation.** `ServerConfig` (and `app/server.ts` exports, honoured by `dev` / `start` / `worker`) accept `aiProviderConcurrency`, `resolveAIProviderHeaders` and `onAIProviderSpan`; `createAIService` takes the same as `providerConcurrency`, `resolveProviderHeaders` and `onProviderSpan`. The concurrency ceiling is an immediate per-scope admission shared by every identity-bound service — default scope provider + tenant + `costContext.serviceArea`, `resolveScope` overrides it — and saturation throws a `PlumbusError('conflict')` with `failureCode` / `reason` `ai-provider-concurrency-exhausted` and `retryAfterSeconds: 1` instead of queueing. `resolveAIProviderHeaders` runs before every real provider attempt (validation retries and streams included) and its result reaches the adapter as `ProviderRequest.transportHeaders`; `authorization`, `proxy-authorization`, `x-api-key`, `api-key` and `content-type` are reserved and refused. `onAIProviderSpan` receives the completed client span (`AIProviderSpan`: provider, operation, tenant, actor, correlation id, cost context, `startedAt`, `durationMs`, `status`, `traceparent`, `errorType`) and is best effort — hook failures never change the model-call result. `AIService.withContext` accepts `correlationId`, and flow workers bind the persisted flow correlation id so one trace spans request → flow → provider. New exports: `AIProviderCallContext`, `AIProviderConcurrencyConfig`, `AIProviderOperation`, `AIProviderSpan`. Docs: [AI integration](../../docs/ai/ai-integration.md).
|
|
9
|
+
- **`ctx.flows.terminate(executionId)`.** `FlowService` now exposes the engine's `terminate`: it aborts the active step and closes the execution as `cancelled` without running compensations, where `cancel` runs every declared compensation for completed steps. Docs: [Flows — cancellation](../../docs/core-concepts/flows.md).
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Event dispatch audit outcomes are valid.** The dispatcher and the event worker recorded `pending` / `retry` / `dead_lettered` / `skipped` as audit outcomes, which `createAuditService` refuses, so with a real audit service every dispatch attempt threw and one plane's rejected poll escaped the timer and ended the worker process. `event.dispatch.attempt`, `event.consumer.attempt` and `event.consumer.skipped` now carry no outcome; `event.dispatch.failed` and `event.consumer.dead_lettered` are `failure` (the former adds `disposition: retry | dead_lettered`). A failing plane's outbox poll is contained and the other planes keep being polled.
|
|
14
|
+
- **Spine hint lifecycle under a data-plane resolver.** The outbox pump publishes only never-published rows (it re-readied every unacknowledged row on each poll, clearing live leases); acknowledged hints close their outbox rows; the follow-up hint between drained steps is published under the running worker's lease; a claim drops the hint of a terminal row instead of reviving it; `engine.cancel` and the runner's failure finaliser close the durable state of a tenant-placed execution; and a hint whose plane fails to resolve is dead-lettered after `FlowSpineDispatchConfig.maxClaimAttempts` (default 10) claims with `privacy_safe_failure_category_id = 'plane-unresolved'` instead of being re-leased forever.
|
|
15
|
+
|
|
3
16
|
## 0.8.0-beta.1 — 2026-09-11
|
|
4
17
|
|
|
5
18
|
### Changed
|