@plumbus/core 0.6.9 → 0.6.12
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 +35 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/ai/ai/provider.d.ts +73 -6
- package/dist/ai/ai/refusal.d.ts +14 -0
- package/dist/ai/ai-service.d.ts +1 -1
- package/dist/ai/ai-service.d.ts.map +1 -1
- package/dist/ai/ai-service.js +70 -9
- package/dist/ai/ai-service.js.map +1 -1
- package/dist/ai/index.d.ts +3 -2
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +4 -2
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/provider.d.ts +73 -6
- package/dist/ai/provider.d.ts.map +1 -1
- package/dist/ai/provider.js +285 -35
- package/dist/ai/provider.js.map +1 -1
- package/dist/ai/refusal.d.ts +14 -0
- package/dist/ai/refusal.d.ts.map +1 -1
- package/dist/ai/refusal.js +15 -0
- package/dist/ai/refusal.js.map +1 -1
- package/dist/ai/tool-loop.d.ts +58 -0
- package/dist/ai/tool-loop.d.ts.map +1 -0
- package/dist/ai/tool-loop.js +212 -0
- package/dist/ai/tool-loop.js.map +1 -0
- package/dist/ai/types/entity.d.ts +6 -1
- package/dist/cli/commands/init.d.ts +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +13 -6
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/mcp-serve-context.js +1 -1
- package/dist/cli/mcp-serve-context.js.map +1 -1
- package/dist/data/repository.d.ts.map +1 -1
- package/dist/data/repository.js +34 -0
- package/dist/data/repository.js.map +1 -1
- package/dist/data/schema-generator.d.ts.map +1 -1
- package/dist/data/schema-generator.js +8 -4
- package/dist/data/schema-generator.js.map +1 -1
- package/dist/define/defineEntity.d.ts +2 -2
- package/dist/define/defineEntity.d.ts.map +1 -1
- package/dist/define/defineEntity.js +2 -1
- package/dist/define/defineEntity.js.map +1 -1
- package/dist/execution/capability-executor.d.ts.map +1 -1
- package/dist/execution/capability-executor.js +3 -1
- package/dist/execution/capability-executor.js.map +1 -1
- package/dist/execution/capability-invocation.d.ts +3 -1
- package/dist/execution/capability-invocation.d.ts.map +1 -1
- package/dist/execution/capability-invocation.js +3 -1
- package/dist/execution/capability-invocation.js.map +1 -1
- package/dist/flows/engine.d.ts.map +1 -1
- package/dist/flows/engine.js +1 -1
- package/dist/flows/engine.js.map +1 -1
- package/dist/flows/flow-service.d.ts +6 -1
- package/dist/flows/flow-service.d.ts.map +1 -1
- package/dist/flows/flow-service.js +39 -1
- package/dist/flows/flow-service.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime/register-consumers.d.ts +3 -0
- package/dist/runtime/register-consumers.d.ts.map +1 -1
- package/dist/runtime/register-consumers.js +3 -1
- package/dist/runtime/register-consumers.js.map +1 -1
- package/dist/server/bootstrap.js +4 -4
- package/dist/server/bootstrap.js.map +1 -1
- package/dist/testing/context.d.ts +8 -2
- package/dist/testing/context.d.ts.map +1 -1
- package/dist/testing/context.js +35 -4
- package/dist/testing/context.js.map +1 -1
- package/dist/types/context.d.ts +107 -17
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/entity.d.ts +6 -1
- package/dist/types/entity.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/worker/bootstrap.js +2 -2
- package/dist/worker/bootstrap.js.map +1 -1
- package/instructions/README.md +1 -1
- package/instructions/ai.md +60 -0
- package/instructions/capabilities.md +1 -1
- package/instructions/peer-dependencies.md +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# @plumbus/core changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.12 — 2026-07-26 — agent wiring version 10
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **`AGENT_WIRING_VERSION` bumped to 10.** The `@plumbus/auth` instruction pointers generated by `plumbus init` now describe **invitation-only admission via `loginContext`** — so a coding agent asked "the invite flow needs user context, but an invite has no user yet" is routed to `node_modules/@plumbus/auth/instructions/resolvers.md` instead of inventing a workaround. The `configure-runtime.md` pointer mentions the optional `loginContext` step. Requires `@plumbus/auth` **0.1.1+** for the referenced sections; the pointers are inert when auth is not installed.
|
|
8
|
+
- Run **`plumbus init --patch`** on existing projects to refresh the managed wiring block. `plumbus doctor` reports files below version 10 as stale and recommends the safest follow-up command.
|
|
9
|
+
|
|
10
|
+
### Notes
|
|
11
|
+
|
|
12
|
+
No runtime, API, or wire-format change — the bump only affects generated agent wiring files and the freshness check that reports them. Projects that skip the patch keep working; their agent wiring simply describes the auth resolver pointers as before.
|
|
13
|
+
|
|
14
|
+
## 0.6.11 — 2026-07-26 — provider-native tool calling
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **Provider tool protocol** — `AITool`, `AIToolChoice`, `AIToolCall` (discriminated on `argumentsStatus`), `AIToolExecutionOptions`, and `AIProviderCapabilities`. `ChatMessage` is now a union (`user` | `assistant` with optional `toolCalls` | `tool`); the existing `user`/`assistant` construction forms are unchanged.
|
|
19
|
+
- **Adapter caller tools** — `createOpenAIAdapter` and `createAnthropicAdapter` implement caller tools natively (OpenAI `tools`/`tool_calls`; Anthropic `tool_use`/`tool_result` + `input_schema`). `AIProviderAdapter.capabilities` is optional; an adapter that omits it is treated as declaring every capability `false`.
|
|
20
|
+
- **`generateWithUsage` result overloads** — no-tool callers keep the flat `AIFinalGenerateResult<T>` with unconditional `.data`; tool-enabled config returns the discriminated `AIToolEnabledGenerateResult<T>` (keyed on `finishReason`). `AIGenerateResult` is preserved as a back-compat alias of the flat result; `finishReason` is an additive field existing consumers may ignore.
|
|
21
|
+
- **`runToolLoop`** (`src/ai/tool-loop.ts`) — bounded request→tool→observe loop for capability authors. Default `maxRounds` 8, hard maximum 20; the exhausted-loop final request omits **both** `tools` and `toolChoice`. Invalid-argument calls are never executed and surface as a `tool_arguments_invalid` observation.
|
|
22
|
+
- **`EntityIndexDefinition.unique`** — `indexes` accepts the legacy `string[][]` form or `{ columns, unique? }`. Additive; existing entity index declarations are unchanged.
|
|
23
|
+
- **`FlowService.describe()`** — returns a `FlowDescription` (flow name, input JSON schema, input-schema hash) so callers such as `@plumbus/chat` can bind flows as provider-native tools without reaching into flow internals.
|
|
24
|
+
- **`safeJsonStringify`** (exported) — best-effort JSON serialization that never throws (handles circular refs / non-serializable values), used for tool observations and structured logging. **`AIInvalidRequestError`** (exported) — structured `PlumbusError` subclass for provider-rejected/invalid AI requests; existing `catch` blocks are unaffected.
|
|
25
|
+
- **`normalizeFinishReason`** — TIER-1 export that maps provider-specific finish reasons onto the framework's canonical set, so tool-loop callers can branch on one vocabulary across adapters.
|
|
26
|
+
- **`Repository.updateWhere` (optional conditional/CAS update) + transaction-capable write path** — `Repository` gains the optional `updateWhere` method returning `ConditionalUpdateResult`, surfaced to `@plumbus/chat` for atomic lease-based session mutations. `updateWhere` is **optional** on the `Repository` interface, so pre-existing custom `Repository` implementations still compile; stores that lack it fail closed with `chat.storage_unsupported` — raised on the first turn or confirm that needs a conditional write, not at process start — rather than silently losing conditional semantics.
|
|
27
|
+
|
|
28
|
+
### Notes
|
|
29
|
+
|
|
30
|
+
All changes are additive and stay within the `0.6.x` line. Declared add-on peers remain satisfied (`@plumbus/chat` / `@plumbus/chat-ui` keep `0.5.x || 0.6.x`; `@plumbus/voice` keeps `0.6.x`). **`@plumbus/chat` 0.1.11 requires this core line in practice** (≥ 0.6.11) for the tool protocol and `updateWhere` path. No install-time or wire-format break for callers that stay on older chat.
|
|
31
|
+
|
|
32
|
+
## 0.6.10
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **OpenAI `gpt-5.5+` temperature** — the OpenAI adapter no longer sends `temperature` for `gpt-5.5` and later models (including `-pro` and dated snapshots). Those models only accept the API default (`1`); sending Plumbus's `0.7` default (or any other value) caused HTTP 400 `unsupported_value`. Earlier `gpt-5` lines such as `gpt-5.4-mini` still receive the configured temperature. `max_completion_tokens` mapping for the broader `gpt-5*` / `o*` family is unchanged.
|
|
37
|
+
|
|
3
38
|
## 0.6.9
|
|
4
39
|
|
|
5
40
|
### Added (M5 — authentication contract)
|