# @objectstack/example-todo

## 4.0.43

### Patch Changes

- Updated dependencies [2f57b75]
- Updated dependencies [2f57b75]
  - @objectstack/spec@9.2.0
  - @objectstack/client@9.2.0
  - @objectstack/metadata@9.2.0
  - @objectstack/objectql@9.2.0
  - @objectstack/driver-sqlite-wasm@9.2.0
  - @objectstack/knowledge-memory@9.2.0
  - @objectstack/runtime@9.2.0
  - @objectstack/service-ai@9.2.0
  - @objectstack/service-knowledge@9.2.0

## 4.0.42

### Patch Changes

- Updated dependencies [b9062c9]
  - @objectstack/spec@9.1.0
  - @objectstack/client@9.1.0
  - @objectstack/metadata@9.1.0
  - @objectstack/objectql@9.1.0
  - @objectstack/driver-sqlite-wasm@9.1.0
  - @objectstack/knowledge-memory@9.1.0
  - @objectstack/runtime@9.1.0
  - @objectstack/service-ai@9.1.0
  - @objectstack/service-knowledge@9.1.0

## 4.0.41

### Patch Changes

- Updated dependencies [1817845]
  - @objectstack/spec@9.0.1
  - @objectstack/client@9.0.1
  - @objectstack/metadata@9.0.1
  - @objectstack/objectql@9.0.1
  - @objectstack/driver-sqlite-wasm@9.0.1
  - @objectstack/knowledge-memory@9.0.1
  - @objectstack/runtime@9.0.1
  - @objectstack/service-ai@9.0.1
  - @objectstack/service-knowledge@9.0.1

## 4.0.40

### Patch Changes

- Updated dependencies [4c3f693]
- Updated dependencies [0bf39f1]
- Updated dependencies [f533f42]
- Updated dependencies [1c83ee8]
  - @objectstack/spec@9.0.0
  - @objectstack/service-ai@9.0.0
  - @objectstack/client@9.0.0
  - @objectstack/metadata@9.0.0
  - @objectstack/objectql@9.0.0
  - @objectstack/driver-sqlite-wasm@9.0.0
  - @objectstack/knowledge-memory@9.0.0
  - @objectstack/runtime@9.0.0
  - @objectstack/service-knowledge@9.0.0

## 4.0.39

### Patch Changes

- @objectstack/spec@8.0.1
- @objectstack/client@8.0.1
- @objectstack/metadata@8.0.1
- @objectstack/objectql@8.0.1
- @objectstack/runtime@8.0.1
- @objectstack/driver-sqlite-wasm@8.0.1
- @objectstack/service-ai@8.0.1
- @objectstack/service-knowledge@8.0.1
- @objectstack/knowledge-memory@8.0.1

## 4.0.38

### Patch Changes

- Updated dependencies [a46c017]
- Updated dependencies [f68be58]
- Updated dependencies [b990b89]
- Updated dependencies [99111ec]
- Updated dependencies [d5a8161]
- Updated dependencies [5cf1f1b]
- Updated dependencies [9ef89d4]
- Updated dependencies [bc0d85b]
- Updated dependencies [2537e28]
- Updated dependencies [0ec7717]
- Updated dependencies [e6374b5]
- Updated dependencies [3306d2f]
- Updated dependencies [c262301]
- Updated dependencies [bc44195]
- Updated dependencies [9e2e229]
- Updated dependencies [345e189]
  - @objectstack/spec@8.0.0
  - @objectstack/service-ai@8.0.0
  - @objectstack/runtime@8.0.0
  - @objectstack/objectql@8.0.0
  - @objectstack/client@8.0.0
  - @objectstack/metadata@8.0.0
  - @objectstack/driver-sqlite-wasm@8.0.0
  - @objectstack/knowledge-memory@8.0.0
  - @objectstack/service-knowledge@8.0.0

## 4.0.37

### Patch Changes

- Updated dependencies [ac1fc4c]
- Updated dependencies [ac1fc4c]
- Updated dependencies [ac1fc4c]
- Updated dependencies [ac1fc4c]
- Updated dependencies [4705fb8]
  - @objectstack/service-ai@7.9.0
  - @objectstack/objectql@7.9.0
  - @objectstack/runtime@7.9.0
  - @objectstack/client@7.9.0
  - @objectstack/spec@7.9.0
  - @objectstack/metadata@7.9.0
  - @objectstack/driver-sqlite-wasm@7.9.0
  - @objectstack/service-knowledge@7.9.0
  - @objectstack/knowledge-memory@7.9.0

## 4.0.36

### Patch Changes

- Updated dependencies [6b82e68]
- Updated dependencies [06f2bbb]
- Updated dependencies [a75823a]
- Updated dependencies [4fbb86a]
- Updated dependencies [e631f1e]
- Updated dependencies [328a7c4]
- Updated dependencies [4888ea2]
- Updated dependencies [6fc2678]
- Updated dependencies [36719db]
- Updated dependencies [424ab26]
  - @objectstack/service-ai@7.8.0
  - @objectstack/spec@7.8.0
  - @objectstack/objectql@7.8.0
  - @objectstack/runtime@7.8.0
  - @objectstack/client@7.8.0
  - @objectstack/metadata@7.8.0
  - @objectstack/driver-sqlite-wasm@7.8.0
  - @objectstack/knowledge-memory@7.8.0
  - @objectstack/service-knowledge@7.8.0

## 4.0.35

### Patch Changes

- Updated dependencies [b391955]
- Updated dependencies [984ddff]
- Updated dependencies [f06b64e]
- Updated dependencies [023bf93]
- Updated dependencies [764c747]
  - @objectstack/spec@7.7.0
  - @objectstack/service-ai@7.7.0
  - @objectstack/metadata@7.7.0
  - @objectstack/objectql@7.7.0
  - @objectstack/client@7.7.0
  - @objectstack/driver-sqlite-wasm@7.7.0
  - @objectstack/knowledge-memory@7.7.0
  - @objectstack/runtime@7.7.0
  - @objectstack/service-knowledge@7.7.0

## 4.0.34

### Patch Changes

- Updated dependencies [955d4c8]
- Updated dependencies [c4a4cbd]
- Updated dependencies [b046ec2]
- Updated dependencies [2170ad9]
- Updated dependencies [02d6359]
- Updated dependencies [7648242]
- Updated dependencies [8fa1e7f]
- Updated dependencies [3377e38]
- Updated dependencies [be20aa4]
- Updated dependencies [55866f5]
- Updated dependencies [8e539cc]
- Updated dependencies [60f9c45]
  - @objectstack/spec@7.6.0
  - @objectstack/service-ai@7.6.0
  - @objectstack/client@7.6.0
  - @objectstack/objectql@7.6.0
  - @objectstack/driver-sqlite-wasm@7.6.0
  - @objectstack/runtime@7.6.0
  - @objectstack/metadata@7.6.0
  - @objectstack/knowledge-memory@7.6.0
  - @objectstack/service-knowledge@7.6.0

## 4.0.33

### Patch Changes

- @objectstack/spec@7.5.0
- @objectstack/client@7.5.0
- @objectstack/metadata@7.5.0
- @objectstack/objectql@7.5.0
- @objectstack/runtime@7.5.0
- @objectstack/driver-sqlite-wasm@7.5.0
- @objectstack/service-ai@7.5.0
- @objectstack/service-knowledge@7.5.0
- @objectstack/knowledge-memory@7.5.0

## 4.0.32

### Patch Changes

- @objectstack/spec@7.4.1
- @objectstack/client@7.4.1
- @objectstack/metadata@7.4.1
- @objectstack/objectql@7.4.1
- @objectstack/runtime@7.4.1
- @objectstack/driver-sqlite-wasm@7.4.1
- @objectstack/service-ai@7.4.1
- @objectstack/service-knowledge@7.4.1
- @objectstack/knowledge-memory@7.4.1

## 4.0.31

### Patch Changes

- Updated dependencies [23c7107]
- Updated dependencies [c72daad]
- Updated dependencies [eea3f1b]
- Updated dependencies [13632b1]
- Updated dependencies [f115182]
- Updated dependencies [2faf9f2]
- Updated dependencies [2faf9f2]
- Updated dependencies [2faf9f2]
- Updated dependencies [2faf9f2]
- Updated dependencies [2faf9f2]
- Updated dependencies [2faf9f2]
- Updated dependencies [a6d4cbb]
- Updated dependencies [58b450b]
- Updated dependencies [394d34f]
- Updated dependencies [82eb6cf]
- Updated dependencies [13d8653]
- Updated dependencies [ff3d006]
- Updated dependencies [5e831de]
  - @objectstack/spec@7.4.0
  - @objectstack/objectql@7.4.0
  - @objectstack/runtime@7.4.0
  - @objectstack/metadata@7.4.0
  - @objectstack/service-ai@7.4.0
  - @objectstack/client@7.4.0
  - @objectstack/driver-sqlite-wasm@7.4.0
  - @objectstack/knowledge-memory@7.4.0
  - @objectstack/service-knowledge@7.4.0

## 4.0.30

### Patch Changes

- Updated dependencies [5e7c554]
  - @objectstack/spec@7.3.0
  - @objectstack/client@7.3.0
  - @objectstack/metadata@7.3.0
  - @objectstack/objectql@7.3.0
  - @objectstack/driver-sqlite-wasm@7.3.0
  - @objectstack/knowledge-memory@7.3.0
  - @objectstack/runtime@7.3.0
  - @objectstack/service-ai@7.3.0
  - @objectstack/service-knowledge@7.3.0

## 4.0.29

### Patch Changes

- Updated dependencies [9096dfe]
  - @objectstack/runtime@7.2.1
  - @objectstack/objectql@7.2.1
  - @objectstack/service-ai@7.2.1
  - @objectstack/metadata@7.2.1
  - @objectstack/client@7.2.1
  - @objectstack/spec@7.2.1
  - @objectstack/driver-sqlite-wasm@7.2.1
  - @objectstack/service-knowledge@7.2.1
  - @objectstack/knowledge-memory@7.2.1

## 4.0.28

### Patch Changes

- @objectstack/spec@7.2.0
- @objectstack/client@7.2.0
- @objectstack/metadata@7.2.0
- @objectstack/objectql@7.2.0
- @objectstack/runtime@7.2.0
- @objectstack/driver-sqlite-wasm@7.2.0
- @objectstack/service-ai@7.2.0
- @objectstack/service-knowledge@7.2.0
- @objectstack/knowledge-memory@7.2.0

## 4.0.27

### Patch Changes

- Updated dependencies [47a92f4]
  - @objectstack/spec@7.1.0
  - @objectstack/objectql@7.1.0
  - @objectstack/metadata@7.1.0
  - @objectstack/runtime@7.1.0
  - @objectstack/service-ai@7.1.0
  - @objectstack/client@7.1.0
  - @objectstack/driver-sqlite-wasm@7.1.0
  - @objectstack/knowledge-memory@7.1.0
  - @objectstack/service-knowledge@7.1.0

## 4.0.26

### Patch Changes

- Updated dependencies [74470ad]
- Updated dependencies [d29617e]
- Updated dependencies [dc72172]
- Updated dependencies [3a630b6]
  - @objectstack/spec@7.0.0
  - @objectstack/runtime@7.0.0
  - @objectstack/client@7.0.0
  - @objectstack/metadata@7.0.0
  - @objectstack/objectql@7.0.0
  - @objectstack/driver-sqlite-wasm@7.0.0
  - @objectstack/knowledge-memory@7.0.0
  - @objectstack/service-ai@7.0.0
  - @objectstack/service-knowledge@7.0.0

## 4.0.25

### Patch Changes

- Updated dependencies [bac7ae5]
- Updated dependencies [e9bacda]
  - @objectstack/runtime@6.9.0
  - @objectstack/service-ai@6.9.0
  - @objectstack/client@6.9.0
  - @objectstack/spec@6.9.0
  - @objectstack/metadata@6.9.0
  - @objectstack/objectql@6.9.0
  - @objectstack/driver-sqlite-wasm@6.9.0
  - @objectstack/service-knowledge@6.9.0
  - @objectstack/knowledge-memory@6.9.0

## 4.0.24

### Patch Changes

- @objectstack/spec@6.8.1
- @objectstack/client@6.8.1
- @objectstack/metadata@6.8.1
- @objectstack/objectql@6.8.1
- @objectstack/runtime@6.8.1
- @objectstack/driver-sqlite-wasm@6.8.1
- @objectstack/service-ai@6.8.1
- @objectstack/service-knowledge@6.8.1
- @objectstack/knowledge-memory@6.8.1

## 4.0.23

### Patch Changes

- Updated dependencies [6e88f77]
- Updated dependencies [c8b9f57]
- Updated dependencies [50ccd9c]
  - @objectstack/service-ai@6.8.0
  - @objectstack/spec@6.8.0
  - @objectstack/objectql@6.8.0
  - @objectstack/runtime@6.8.0
  - @objectstack/client@6.8.0
  - @objectstack/metadata@6.8.0
  - @objectstack/driver-sqlite-wasm@6.8.0
  - @objectstack/knowledge-memory@6.8.0
  - @objectstack/service-knowledge@6.8.0

## 4.0.22

### Patch Changes

- @objectstack/spec@6.7.1
- @objectstack/client@6.7.1
- @objectstack/metadata@6.7.1
- @objectstack/objectql@6.7.1
- @objectstack/runtime@6.7.1
- @objectstack/driver-sqlite-wasm@6.7.1
- @objectstack/service-ai@6.7.1
- @objectstack/service-knowledge@6.7.1
- @objectstack/knowledge-memory@6.7.1

## 4.0.21

### Patch Changes

- Updated dependencies [430067b]
- Updated dependencies [4f9e9d4]
- Updated dependencies [c5efe15]
- Updated dependencies [4944f3a]
- Updated dependencies [e0c593f]
  - @objectstack/spec@6.7.0
  - @objectstack/service-ai@6.7.0
  - @objectstack/runtime@6.7.0
  - @objectstack/driver-sqlite-wasm@6.7.0
  - @objectstack/client@6.7.0
  - @objectstack/metadata@6.7.0
  - @objectstack/objectql@6.7.0
  - @objectstack/knowledge-memory@6.7.0
  - @objectstack/service-knowledge@6.7.0

## 4.0.20

### Patch Changes

- Updated dependencies [a49cfc2]
  - @objectstack/spec@6.6.0
  - @objectstack/client@6.6.0
  - @objectstack/metadata@6.6.0
  - @objectstack/objectql@6.6.0
  - @objectstack/driver-sqlite-wasm@6.6.0
  - @objectstack/knowledge-memory@6.6.0
  - @objectstack/runtime@6.6.0
  - @objectstack/service-ai@6.6.0
  - @objectstack/service-knowledge@6.6.0

## 4.0.19

### Patch Changes

- @objectstack/runtime@6.5.1
- @objectstack/client@6.5.1
- @objectstack/spec@6.5.1
- @objectstack/metadata@6.5.1
- @objectstack/objectql@6.5.1
- @objectstack/driver-sqlite-wasm@6.5.1
- @objectstack/service-ai@6.5.1
- @objectstack/service-knowledge@6.5.1
- @objectstack/knowledge-memory@6.5.1

## 4.0.18

### Patch Changes

- @objectstack/spec@6.5.0
- @objectstack/client@6.5.0
- @objectstack/metadata@6.5.0
- @objectstack/objectql@6.5.0
- @objectstack/runtime@6.5.0
- @objectstack/driver-sqlite-wasm@6.5.0
- @objectstack/service-ai@6.5.0
- @objectstack/service-knowledge@6.5.0
- @objectstack/knowledge-memory@6.5.0

## 4.0.17

### Patch Changes

- Updated dependencies [a981d57]
- Updated dependencies [b486666]
- Updated dependencies [f8651cc]
- Updated dependencies [f8651cc]
- Updated dependencies [0bf6f9a]
  - @objectstack/service-ai@6.4.0
  - @objectstack/spec@6.4.0
  - @objectstack/service-knowledge@6.4.0
  - @objectstack/knowledge-memory@6.4.0
  - @objectstack/client@6.4.0
  - @objectstack/metadata@6.4.0
  - @objectstack/objectql@6.4.0
  - @objectstack/driver-sqlite-wasm@6.4.0
  - @objectstack/runtime@6.4.0

## 4.0.16

### Patch Changes

- @objectstack/spec@6.3.0
- @objectstack/client@6.3.0
- @objectstack/metadata@6.3.0
- @objectstack/objectql@6.3.0
- @objectstack/runtime@6.3.0
- @objectstack/driver-sqlite-wasm@6.3.0
- @objectstack/service-ai@6.3.0

## 4.0.15

### Patch Changes

- 449e35d: Real-LLM smoke test for the `data_chat` agent loop, plus two `query_data`
  robustness fixes shaken out by running it against `openai/gpt-4.1-mini` via
  the Vercel AI Gateway.

  **`query_data` tool fixes**

  - Removed the LLM-controllable `model` parameter from the public tool
    schema. Frontier models were hallucinating `text-davinci-003` and other
    long-dead model ids, breaking every plan generation.
  - Switched the structured-output filter shape from `z.record(...)` (which
    emits `propertyNames` in JSON Schema, rejected by OpenAI Structured
    Outputs) to a `whereJson` string field. The model emits a JSON-encoded
    ObjectQL filter; the tool parses & validates it before execution. This
    also fixes a parallel issue with OpenAI's strict mode requiring every
    property to appear in `required`.
  - Switched all optional fields to `.nullable()` so the planner Zod schema
    satisfies OpenAI Structured Outputs' "every property must be required"
    rule.
  - Beefed up the planner system prompt with explicit operator hints — most
    importantly: use `$contains` for partial string matches (`"task named
Foo"` → `{"subject":{"$contains":"Foo"}}`), not equality. Without this
    hint the model defaulted to exact-match equality and never found
    anything.

  **New smoke test**

  `examples/app-todo/test/ai-llm.test.ts` (gated on `AI_GATEWAY_API_KEY`):
  boots the full ObjectStack, registers `query_data` + the six auto-generated
  `action_*` tools, sends _"Please mark the 'Build' task as complete."_ to a
  real LLM, and asserts that

  1. the model picked the right tools in the right order
     (`query_data` → `action_complete_task`),
  2. a task row actually flipped to `completed`, and
  3. an `ai_traces` `chat_with_tools` row landed.

  Run with: `pnpm --filter @example/app-todo test:llm`.

  Verified end-to-end against `openai/gpt-4.1-mini` (~6.6 s, 2 tool calls,
  1 task completed, trace persisted).

- Updated dependencies [13a4f38]
- Updated dependencies [b4c74a9]
- Updated dependencies [bce47a0]
- Updated dependencies [bce47a0]
- Updated dependencies [449e35d]
- Updated dependencies [dbb54e1]
  - @objectstack/service-ai@6.2.0
  - @objectstack/spec@6.2.0
  - @objectstack/runtime@6.2.0
  - @objectstack/client@6.2.0
  - @objectstack/metadata@6.2.0
  - @objectstack/objectql@6.2.0
  - @objectstack/driver-sqlite-wasm@6.2.0

## 4.0.14

### Patch Changes

- Updated dependencies [084ee2f]
  - @objectstack/driver-sqlite-wasm@6.1.1
  - @objectstack/runtime@6.1.1
  - @objectstack/spec@6.1.1
  - @objectstack/client@6.1.1
  - @objectstack/metadata@6.1.1
  - @objectstack/objectql@6.1.1
  - @objectstack/service-ai@6.1.1

## 4.0.13

### Patch Changes

- 93c0589: **AI v1: Actions-as-Tools** — every declarative UI `Action` of `type: 'script'`
  is now auto-exposed as an AI-callable tool named `action_<name>`. Agents can
  perform business operations ("complete the groceries task") via natural
  language, routed through the same `dataEngine.executeAction()` dispatcher
  Studio uses. This is the write-side counterpart to `query_data`.

  **Highlights**

  - `registerActionsAsTools(toolRegistry, { metadata, dataEngine })` walks every
    object's `actions[]` and registers script-type ones, auto-injecting a
    `recordId` argument for row-context actions and inheriting JSON-Schema
    parameter types from the owning object's fields.
  - Safety filters skip destructive actions by default: `confirmText`,
    `mode: 'delete'`, `variant: 'danger'`, or explicit `aiExposed: false`.
  - New `aiExposed?: boolean` flag on `ActionSchema` for fine-grained opt-out.
  - New `actions_executor` skill bundle subscribes to `action_*` (wildcard
    tool names now supported in `SkillSchema.tools`).
  - The built-in `data_chat` agent now references both `data_explorer` and
    `actions_executor` skills, so users get read + write capabilities out of
    the box.
  - `MemoryLLMAdapter` learned a small two-step heuristic — when it sees an
    action verb ("complete", "start", "clone", ...) it routes to the matching
    `action_*` tool, resolving `recordId` from any prior `query_data` result.
  - New `examples/app-todo/test/ai-action.test.ts` demo proves the loop:
    user says "please complete the groceries task" → agent finds the task →
    agent calls `action_complete_task` → task status flips → `ai_traces`
    records the run.

  **Breaking changes**

  None. `aiExposed` is additive; existing actions remain exposed unless
  they fail an existing safety filter.

  **Phase-1 limitations** (Phase-2 roadmap items)

  - Only `type: 'script'` actions; `api`/`flow`/`url`/`modal`/`form` skipped.
  - No human-in-the-loop approval flow for destructive actions yet.
  - No CEL evaluation of `visible`/`disabled` predicates against agent context.
  - No bulk action support (single-record only).

- Updated dependencies [93c0589]
  - @objectstack/service-ai@6.1.0
  - @objectstack/spec@6.1.0
  - @objectstack/client@6.1.0
  - @objectstack/metadata@6.1.0
  - @objectstack/objectql@6.1.0
  - @objectstack/driver-sqlite-wasm@5.2.2
  - @objectstack/runtime@6.1.0

## 4.0.12

### Patch Changes

- dbc4f7d: feat(ai): v1 AI capabilities — ModelRegistry, structured output, tracing, schema retrieval, and `query_data` tool

  This release lights up the first concrete capabilities on the slimmed AI protocol. All additions are
  non-breaking — new contract methods are optional and existing callers keep working unchanged.

  ### What's new

  - **ModelRegistry** (`@objectstack/service-ai`): in-memory runtime registry for `AI.ModelConfig`.
    Wire models via `AIServicePluginOptions.models` / `defaultModelId`. Exposes `get`, `getOrThrow`,
    `getDefault`, `list`, and `estimateCost(modelId, usage)` for ex-post token cost computation.

  - **ai_traces object + auto-tracing**: every LLM call from `AIService` (`chat`, `complete`,
    `stream_chat`, `chat_with_tools`, `generate_object`, `embed`) is now instrumented with latency,
    token usage, status, and (when pricing is registered) cost. The default `ObjectQLTraceRecorder`
    is auto-wired when the runtime exposes an `IDataEngine`, persisting rows to the new `ai_traces`
    object. Drop in a custom `TraceRecorder` via `AIServicePluginOptions.traceRecorder`, or pass
    `null` to opt out.

  - **Structured output (`IAIService.generateObject`)**: new optional method on `IAIService` and
    `LLMAdapter` that returns a parsed, schema-validated object instead of free-form text.
    Implemented end-to-end in `VercelLLMAdapter` (uses the AI SDK's `generateObject` — provider
    strict-mode is automatic when supported). `MemoryLLMAdapter` ships a deterministic heuristic
    implementation so tests and demos work without an API key.

  - **SchemaRetriever**: lightweight keyword-based retriever over `IMetadataService.listObjects()`.
    Scores by object name (×3), label/plural (×2), description (×1), field name (×2), and field
    label (×1) with English stop-word filtering. Tokenisation splits snake_case so `todo_task` in
    a query matches `name: 'todo_task'`. `SchemaRetriever.renderSnippet()` produces a Markdown
    block ready to inject into a system prompt — no embeddings, no extra infra.

  - **`query_data` tool**: auto-registered when AI + Metadata + Data engine are all present. Takes
    a natural-language `request`, retrieves relevant schemas, asks the model for a structured
    `QueryPlan` via `generateObject`, validates the plan targets a real object, and executes it
    through `IDataEngine.find`. Returns `{ plan, count, records }`. The composed primitive that
    closes the loop from "ask in English" → "validated SQL-shaped result".

  - **Working demo in `examples/app-todo`**: `pnpm --filter @example/app-todo test:ai` boots the
    full Todo stack, invokes `query_data` against the seeded tasks, and verifies the call lands
    in `ai_traces`. Zero API keys, ~3 seconds end-to-end. Serves as the canonical reference for
    wiring AI into a real app.

  ### Hardening

  - Strict tool schemas: nested `orderBy` and `aggregations` items in `data-tools` now declare
    `additionalProperties: false` + `required`, matching the top-level contract and making them
    safe for provider strict mode.

  ### Breaking-ish

  - `TraceOperation` values are now snake_case (`stream_chat`, `chat_with_tools`, `generate_object`)
    to match the project's data-value convention and so the `ai_traces.operation` select validates.
    Custom `TraceRecorder` implementations that hard-code the old camelCase names need to be
    updated. The values are an internal observability artefact — no public protocol surface
    exposes them.

  ### Notes

  - `zod` is now a direct dependency of `@objectstack/service-ai` (previously transitive via `ai`)
    because contract signatures and the new tool definition use `z.ZodType` types directly.
  - All new methods on `IAIService` / `LLMAdapter` are optional — existing custom adapters and
    callers continue to work without changes.
  - 12 new unit tests cover `ModelRegistry` (cost math, defaults, throwing lookups) and
    `SchemaRetriever` (scoring, snake_case tokenisation, limits, snippet rendering).
    Full suite: 323/323 ✓.

- Updated dependencies [629a716]
- Updated dependencies [dbc4f7d]
- Updated dependencies [944f187]
  - @objectstack/spec@6.0.0
  - @objectstack/service-ai@6.0.0
  - @objectstack/runtime@6.0.0
  - @objectstack/client@6.0.0
  - @objectstack/metadata@6.0.0
  - @objectstack/objectql@6.0.0
  - @objectstack/driver-sqlite-wasm@5.2.1

## 4.0.11

### Patch Changes

- Updated dependencies [bab2b20]
- Updated dependencies [fa011d8]
- Updated dependencies [b806f58]
  - @objectstack/spec@5.2.0
  - @objectstack/runtime@5.2.0
  - @objectstack/client@5.2.0
  - @objectstack/objectql@5.2.0
  - @objectstack/driver-memory@5.2.0

## 4.0.10

### Patch Changes

- Updated dependencies [75f4ee6]
- Updated dependencies [823d559]
  - @objectstack/spec@5.1.0
  - @objectstack/objectql@5.1.0
  - @objectstack/client@5.1.0
  - @objectstack/driver-memory@5.1.0
  - @objectstack/runtime@5.1.0

## 4.0.9

### Patch Changes

- Updated dependencies [5e9dcb4]
- Updated dependencies [f139a24]
- Updated dependencies [4eb9f8c]
- Updated dependencies [2f7e42a]
- Updated dependencies [602cce7]
- Updated dependencies [1e625b8]
- Updated dependencies [6ee42b8]
- Updated dependencies [888a5c1]
- Updated dependencies [5cfdc85]
- Updated dependencies [09f005a]
- Updated dependencies [7825394]
- Updated dependencies [96ad4df]
- Updated dependencies [df18ae9]
- Updated dependencies [2f9073a]
  - @objectstack/objectql@5.0.0
  - @objectstack/runtime@5.0.0
  - @objectstack/spec@5.0.0
  - @objectstack/client@5.0.0
  - @objectstack/driver-memory@5.0.0

## 4.0.8

### Patch Changes

- Updated dependencies [2869891]
  - @objectstack/spec@4.2.0
  - @objectstack/objectql@4.2.0
  - @objectstack/client@4.2.0
  - @objectstack/runtime@4.2.0
  - @objectstack/driver-memory@4.2.0

## 4.0.7

### Patch Changes

- Updated dependencies [5326c6b]
  - @objectstack/client@4.1.1
  - @objectstack/spec@4.1.1
  - @objectstack/objectql@4.1.1
  - @objectstack/runtime@4.1.1
  - @objectstack/driver-memory@4.1.1

## 4.0.6

### Patch Changes

- Updated dependencies [2108c30]
- Updated dependencies [96fb108]
- Updated dependencies [23db640]
- Updated dependencies [5683206]
- Updated dependencies [70db902]
- Updated dependencies [70db902]
- Updated dependencies [f0b3972]
- Updated dependencies [0e63f2f]
  - @objectstack/spec@4.1.0
  - @objectstack/runtime@4.1.0
  - @objectstack/objectql@4.1.0
  - @objectstack/client@4.1.0
  - @objectstack/driver-memory@4.1.0

## 4.0.5

### Patch Changes

- Updated dependencies [15e0df6]
  - @objectstack/spec@4.0.5
  - @objectstack/client@4.0.5
  - @objectstack/objectql@4.0.5
  - @objectstack/runtime@4.0.5
  - @objectstack/driver-memory@4.0.5

## 4.0.4

### Patch Changes

- Updated dependencies [326b66b]
  - @objectstack/spec@4.0.4
  - @objectstack/client@4.0.4
  - @objectstack/objectql@4.0.4
  - @objectstack/driver-memory@4.0.4
  - @objectstack/runtime@4.0.4

## 4.0.3

### Patch Changes

- @objectstack/spec@4.0.3
- @objectstack/client@4.0.3
- @objectstack/objectql@4.0.3
- @objectstack/runtime@4.0.3
- @objectstack/driver-memory@4.0.3

## 4.0.2

### Patch Changes

- Updated dependencies [5f659e9]
  - @objectstack/driver-memory@4.0.2
  - @objectstack/client@4.0.2
  - @objectstack/spec@4.0.2
  - @objectstack/objectql@4.0.2
  - @objectstack/runtime@4.0.2

## 3.0.26

### Patch Changes

- Updated dependencies [f08ffc3]
- Updated dependencies [e0b0a78]
  - @objectstack/spec@4.0.0
  - @objectstack/client@4.0.0
  - @objectstack/runtime@4.0.0
  - @objectstack/objectql@4.0.0
  - @objectstack/driver-memory@4.0.0

## 3.0.25

### Patch Changes

- @objectstack/spec@3.3.1
- @objectstack/client@3.3.1
- @objectstack/objectql@3.3.1
- @objectstack/runtime@3.3.1
- @objectstack/driver-memory@3.3.1

## 3.0.24

### Patch Changes

- @objectstack/spec@3.3.0
- @objectstack/client@3.3.0
- @objectstack/objectql@3.3.0
- @objectstack/runtime@3.3.0
- @objectstack/driver-memory@3.3.0

## 3.0.23

### Patch Changes

- Updated dependencies [c3065dd]
  - @objectstack/objectql@3.2.9
  - @objectstack/client@3.2.9
  - @objectstack/spec@3.2.9
  - @objectstack/runtime@3.2.9
  - @objectstack/driver-memory@3.2.9

## 3.0.22

### Patch Changes

- @objectstack/spec@3.2.8
- @objectstack/client@3.2.8
- @objectstack/objectql@3.2.8
- @objectstack/runtime@3.2.8
- @objectstack/driver-memory@3.2.8

## 3.0.21

### Patch Changes

- @objectstack/spec@3.2.7
- @objectstack/client@3.2.7
- @objectstack/objectql@3.2.7
- @objectstack/runtime@3.2.7
- @objectstack/driver-memory@3.2.7

## 3.0.20

### Patch Changes

- @objectstack/spec@3.2.6
- @objectstack/client@3.2.6
- @objectstack/objectql@3.2.6
- @objectstack/runtime@3.2.6
- @objectstack/driver-memory@3.2.6

## 3.0.19

### Patch Changes

- @objectstack/spec@3.2.5
- @objectstack/client@3.2.5
- @objectstack/objectql@3.2.5
- @objectstack/runtime@3.2.5
- @objectstack/driver-memory@3.2.5

## 3.0.18

### Patch Changes

- @objectstack/spec@3.2.4
- @objectstack/client@3.2.4
- @objectstack/objectql@3.2.4
- @objectstack/runtime@3.2.4
- @objectstack/driver-memory@3.2.4

## 3.0.17

### Patch Changes

- @objectstack/spec@3.2.3
- @objectstack/client@3.2.3
- @objectstack/objectql@3.2.3
- @objectstack/runtime@3.2.3
- @objectstack/driver-memory@3.2.3

## 3.0.16

### Patch Changes

- Updated dependencies [46defbb]
  - @objectstack/spec@3.2.2
  - @objectstack/driver-memory@3.2.2
  - @objectstack/client@3.2.2
  - @objectstack/objectql@3.2.2
  - @objectstack/runtime@3.2.2

## 3.0.15

### Patch Changes

- Updated dependencies [850b546]
  - @objectstack/spec@3.2.1
  - @objectstack/client@3.2.1
  - @objectstack/objectql@3.2.1
  - @objectstack/driver-memory@3.2.1
  - @objectstack/runtime@3.2.1

## 3.0.14

### Patch Changes

- Updated dependencies [5901c29]
  - @objectstack/spec@3.2.0
  - @objectstack/client@3.2.0
  - @objectstack/objectql@3.2.0
  - @objectstack/driver-memory@3.2.0
  - @objectstack/runtime@3.2.0

## 3.0.13

### Patch Changes

- Updated dependencies [953d667]
  - @objectstack/spec@3.1.1
  - @objectstack/client@3.1.1
  - @objectstack/objectql@3.1.1
  - @objectstack/driver-memory@3.1.1
  - @objectstack/runtime@3.1.1

## 3.0.12

### Patch Changes

- Updated dependencies [0088830]
  - @objectstack/spec@3.1.0
  - @objectstack/client@3.1.0
  - @objectstack/objectql@3.1.0
  - @objectstack/driver-memory@3.1.0
  - @objectstack/runtime@3.1.0

## 3.0.11

### Patch Changes

- Updated dependencies [92d9d99]
  - @objectstack/spec@3.0.11
  - @objectstack/client@3.0.11
  - @objectstack/objectql@3.0.11
  - @objectstack/driver-memory@3.0.11
  - @objectstack/runtime@3.0.11

## 3.0.10

### Patch Changes

- Updated dependencies [d1e5d31]
  - @objectstack/spec@3.0.10
  - @objectstack/client@3.0.10
  - @objectstack/objectql@3.0.10
  - @objectstack/driver-memory@3.0.10
  - @objectstack/runtime@3.0.10

## 3.0.9

### Patch Changes

- Updated dependencies [15e0df6]
  - @objectstack/spec@3.0.9
  - @objectstack/client@3.0.9
  - @objectstack/objectql@3.0.9
  - @objectstack/driver-memory@3.0.9
  - @objectstack/runtime@3.0.9

## 3.0.8

### Patch Changes

- Updated dependencies [5a968a2]
  - @objectstack/spec@3.0.8
  - @objectstack/client@3.0.8
  - @objectstack/objectql@3.0.8
  - @objectstack/driver-memory@3.0.8
  - @objectstack/runtime@3.0.8

## 1.2.16

### Patch Changes

- Updated dependencies [0119bd7]
- Updated dependencies [5426bdf]
  - @objectstack/spec@3.0.7
  - @objectstack/client@3.0.7
  - @objectstack/objectql@3.0.7
  - @objectstack/driver-memory@3.0.7
  - @objectstack/runtime@3.0.7

## 1.2.15

### Patch Changes

- Updated dependencies [5df254c]
  - @objectstack/spec@3.0.6
  - @objectstack/client@3.0.6
  - @objectstack/objectql@3.0.6
  - @objectstack/driver-memory@3.0.6
  - @objectstack/runtime@3.0.6

## 1.2.14

### Patch Changes

- Updated dependencies [23a4a68]
  - @objectstack/spec@3.0.5
  - @objectstack/client@3.0.5
  - @objectstack/objectql@3.0.5
  - @objectstack/driver-memory@3.0.5
  - @objectstack/runtime@3.0.5

## 1.2.13

### Patch Changes

- Updated dependencies [d738987]
- Updated dependencies [437b0b8]
  - @objectstack/spec@3.0.4
  - @objectstack/objectql@3.0.4
  - @objectstack/client@3.0.4
  - @objectstack/driver-memory@3.0.4
  - @objectstack/runtime@3.0.4

## 1.2.12

### Patch Changes

- Updated dependencies [c7267f6]
  - @objectstack/spec@3.0.3
  - @objectstack/client@3.0.3
  - @objectstack/objectql@3.0.3
  - @objectstack/runtime@3.0.3
  - @objectstack/driver-memory@3.0.3

## 1.2.11

### Patch Changes

- Updated dependencies [28985f5]
  - @objectstack/spec@3.0.2
  - @objectstack/client@3.0.2
  - @objectstack/objectql@3.0.2
  - @objectstack/driver-memory@3.0.2
  - @objectstack/runtime@3.0.2

## 1.2.10

### Patch Changes

- Updated dependencies [389725a]
  - @objectstack/spec@3.0.1
  - @objectstack/client@3.0.1
  - @objectstack/objectql@3.0.1
  - @objectstack/driver-memory@3.0.1
  - @objectstack/runtime@3.0.1

## 1.2.9

### Patch Changes

- Updated dependencies
  - @objectstack/spec@3.0.0
  - @objectstack/client@3.0.0
  - @objectstack/objectql@3.0.0
  - @objectstack/runtime@3.0.0
  - @objectstack/driver-memory@3.0.0

## 1.2.8

### Patch Changes

- Updated dependencies
  - @objectstack/spec@2.0.7
  - @objectstack/client@2.0.7
  - @objectstack/objectql@2.0.7
  - @objectstack/driver-memory@2.0.7
  - @objectstack/runtime@2.0.7

## 1.2.7

### Patch Changes

- Updated dependencies
  - @objectstack/spec@2.0.6
  - @objectstack/client@2.0.6
  - @objectstack/objectql@2.0.6
  - @objectstack/runtime@2.0.6
  - @objectstack/driver-memory@2.0.6

## 1.2.6

### Patch Changes

- Updated dependencies
  - @objectstack/spec@2.0.5
  - @objectstack/client@2.0.5
  - @objectstack/objectql@2.0.5
  - @objectstack/driver-memory@2.0.5
  - @objectstack/runtime@2.0.5

## 1.2.5

### Patch Changes

- Updated dependencies
  - @objectstack/spec@2.0.4
  - @objectstack/client@2.0.4
  - @objectstack/objectql@2.0.4
  - @objectstack/runtime@2.0.4
  - @objectstack/driver-memory@2.0.4

## 1.2.4

### Patch Changes

- Updated dependencies
  - @objectstack/spec@2.0.3
  - @objectstack/client@2.0.3
  - @objectstack/objectql@2.0.3
  - @objectstack/runtime@2.0.3
  - @objectstack/driver-memory@2.0.3

## 1.2.3

### Patch Changes

- Updated dependencies [1db8559]
  - @objectstack/spec@2.0.2
  - @objectstack/client@2.0.2
  - @objectstack/objectql@2.0.2
  - @objectstack/driver-memory@2.0.2
  - @objectstack/runtime@2.0.2

## 1.2.2

### Patch Changes

- Updated dependencies
  - @objectstack/spec@2.0.1
  - @objectstack/client@2.0.1
  - @objectstack/objectql@2.0.1
  - @objectstack/runtime@2.0.1
  - @objectstack/driver-memory@2.0.1

## 1.2.1

### Patch Changes

- Updated dependencies [38e5dd5]
- Updated dependencies [38e5dd5]
  - @objectstack/spec@2.0.0
  - @objectstack/client@2.0.0
  - @objectstack/objectql@2.0.0
  - @objectstack/driver-memory@2.0.0
  - @objectstack/runtime@2.0.0

## 0.9.15

### Patch Changes

- Updated dependencies
  - @objectstack/spec@1.0.12
  - @objectstack/client@1.0.12
  - @objectstack/runtime@1.0.12
  - @objectstack/objectql@1.0.12
  - @objectstack/driver-memory@1.0.12

## 0.9.14

### Patch Changes

- @objectstack/client@1.0.11
- @objectstack/spec@1.0.11
- @objectstack/objectql@1.0.11
- @objectstack/runtime@1.0.11
- @objectstack/driver-memory@1.0.11

## 0.9.13

### Patch Changes

- @objectstack/client@1.0.10
- @objectstack/objectql@1.0.10
- @objectstack/driver-memory@1.0.10
- @objectstack/runtime@1.0.10
- @objectstack/spec@1.0.10

## 0.9.12

### Patch Changes

- Updated dependencies [b9f8c68]
  - @objectstack/objectql@1.0.9
  - @objectstack/client@1.0.9
  - @objectstack/spec@1.0.9
  - @objectstack/runtime@1.0.9
  - @objectstack/driver-memory@1.0.9

## 0.9.11

### Patch Changes

- @objectstack/client@1.0.8
- @objectstack/spec@1.0.8
- @objectstack/objectql@1.0.8
- @objectstack/runtime@1.0.8
- @objectstack/driver-memory@1.0.8

## 0.9.10

### Patch Changes

- Updated dependencies [ebdf787]
  - @objectstack/runtime@1.0.7
  - @objectstack/client@1.0.7
  - @objectstack/spec@1.0.7
  - @objectstack/objectql@1.0.7
  - @objectstack/driver-memory@1.0.7

## 0.9.9

### Patch Changes

- Updated dependencies [a7f7b9d]
  - @objectstack/spec@1.0.6
  - @objectstack/client@1.0.6
  - @objectstack/objectql@1.0.6
  - @objectstack/driver-memory@1.0.6
  - @objectstack/runtime@1.0.6

## 0.9.8

### Patch Changes

- Updated dependencies [b1d24bd]
- Updated dependencies [877b864]
  - @objectstack/objectql@1.0.5
  - @objectstack/runtime@1.0.5
  - @objectstack/driver-memory@1.0.5
  - @objectstack/client@1.0.5
  - @objectstack/spec@1.0.5

## 0.9.7

### Patch Changes

- Updated dependencies [5d13533]
  - @objectstack/objectql@1.0.4
  - @objectstack/spec@1.0.4
  - @objectstack/client@1.0.4
  - @objectstack/runtime@1.0.4
  - @objectstack/driver-memory@1.0.4

## 0.9.6

### Patch Changes

- Updated dependencies [fb2eabd]
- Updated dependencies [22a48f0]
  - @objectstack/runtime@1.0.3
  - @objectstack/objectql@1.0.3
  - @objectstack/client@1.0.3
  - @objectstack/driver-memory@1.0.3
  - @objectstack/spec@1.0.3

## 0.9.5

### Patch Changes

- Updated dependencies [a0a6c85]
- Updated dependencies [109fc5b]
  - @objectstack/spec@1.0.2
  - @objectstack/client@1.0.2
  - @objectstack/objectql@1.0.2
  - @objectstack/runtime@1.0.2
  - @objectstack/driver-memory@1.0.2

## 0.9.4

### Patch Changes

- Updated dependencies
  - @objectstack/runtime@1.0.1
  - @objectstack/spec@1.0.1
  - @objectstack/client@1.0.1
  - @objectstack/objectql@1.0.1
  - @objectstack/driver-memory@1.0.1

## 0.9.3

### Patch Changes

- Updated dependencies
  - @objectstack/spec@1.0.0
  - @objectstack/runtime@1.0.0
  - @objectstack/objectql@1.0.0
  - @objectstack/client@1.0.0
  - @objectstack/driver-memory@1.0.0

## 0.9.2

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.9.2
  - @objectstack/client@0.9.2
  - @objectstack/objectql@0.9.2
  - @objectstack/driver-memory@0.9.2
  - @objectstack/runtime@0.9.2

## 0.9.1

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.9.1
  - @objectstack/client@0.9.1
  - @objectstack/objectql@0.9.1
  - @objectstack/runtime@0.9.1
  - @objectstack/driver-memory@0.9.1

## 0.7.5

### Patch Changes

- Updated dependencies [555e6a7]
  - @objectstack/spec@0.8.2
  - @objectstack/client@0.8.2

## 0.7.4

### Patch Changes

- @objectstack/spec@0.8.1
- @objectstack/client@0.8.1

## 0.7.3

### Patch Changes

- Updated dependencies
  - @objectstack/spec@1.0.0
  - @objectstack/client@1.0.0

## 0.7.2

### Patch Changes

- Updated dependencies [fb41cc0]
  - @objectstack/spec@0.7.2
  - @objectstack/client@0.7.2

## 0.7.1

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.7.1
  - @objectstack/client@0.7.1

## 0.6.1

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.6.1
  - @objectstack/client@0.6.1

## 0.6.0

### Minor Changes

- b2df5f7: Unified version bump to 0.5.0

  - Standardized all package versions to 0.5.0 across the monorepo
  - Fixed driver-memory package.json paths for proper module resolution
  - Ensured all packages are in sync for the 0.5.0 release

### Patch Changes

- Updated dependencies [b2df5f7]
  - @objectstack/spec@0.6.0
  - @objectstack/client@0.6.0

## 1.0.9

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.4.2
  - @objectstack/client@0.4.2

## 1.0.8

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.4.1
  - @objectstack/client@0.4.1

## 1.0.7

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.3.3
  - @objectstack/client@0.3.3

## 1.0.6

### Patch Changes

- Patch release for maintenance and stability improvements
- Updated dependencies
  - @objectstack/client@0.3.2
  - @objectstack/spec@0.3.2

## 1.0.5

### Patch Changes

- @objectstack/spec@0.3.1
- @objectstack/client@0.3.1

## 1.0.4

### Patch Changes

- Updated dependencies
  - @objectstack/spec@1.0.0
  - @objectstack/client@1.0.0

## 1.0.3

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.3.0
  - @objectstack/client@0.2.1

## 1.0.2

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.2.0
  - @objectstack/client@0.2.0

## 1.0.1

### Patch Changes

- Updated dependencies
  - @objectstack/spec@0.1.2
  - @objectstack/client@0.1.1
