Skip to content

Commit f576dee

Browse files
feat(spec): a knowledge source declares its retrieval mode; an adapter reports the modes it runs (#38720)
<!-- claude-projects-attribution: {"github_login":"os-warren"} --> _Requested by **Warren** · [project thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8QCBjsNDZa4iwo35VN5fKKg)_ Part of #38692 Clause-②: yes (widening) Metadata-protocol: added Skills-docs: follow-up #38732 (the `source.retrieval.mode` row of the objectstack-ai skill lands there; `skills/` is a governed path and takes its own PR) ## 维护者速读 - 知识源作者可以选择检索方式(按意思、按字词、两者结合),不选则沿用存储默认;本单只定义写法与驱动上报,用户暂无可见变化。 - 属于知识管理专题「一期 a:检索方式」,解决条款类问答被语义检索漏掉的问题。 - 出错只会是新写法被误拒或误收;未写此项的知识源行为不变,可直接撤回。 - 无。 ## Stack Base: `main`. First of the phase-1a series; the adapter PRs and the service PR build on it. The ruling it builds on is on `main`: ADR-0161, the dated note of 2026-11-30 under K8 (phase 0, merged as 95ffacc); this branch has `main` merged in. **Lands together with #38722, right after it.** This PR adds the key and both contract members with their suite cases, but no reader: the service's reader is #38722, and the two adapters that declare `implements.retrieval` are #38721 and #38745. That splits K8 rule 1 and K4 ("lands with its first reader, in the same PR") across stacked PRs, because the stack bases force it. Until #38722 lands, a declared mode is carried and ignored, and the `planned` liveness row warns an author so (`authorWarn` and `authorHint`; #38722 drops both when it flips the row to `live`). So #38720 is not merged or released without #38722, which merges right after it. ## What changes - `knowledge_source.source.retrieval?: { mode?: 'vector' | 'keyword' | 'hybrid' }`, strict from birth; `retrieval: {}` is accepted and declares nothing. Not part of the index fingerprint or the recipe hash. - `IKnowledgeAdapter.capabilities.retrieval?: { modes, default }` (`AdapterRetrievalCapability`) and `AdapterSearchOptions.retrieval?: { mode }`, optional as every search member is (K8 rule 2); omitted means the adapter's default. - Contract suite (`runKnowledgeAdapterContract`): `implements.retrieval`; a declared report must be valid, and one seeded fixture is searched under each listed mode (`vector` leaves the keyword-only clause out, `keyword` answers it alone, the default handed explicitly equals no member). - ADR-0161 K2 row and protocol doc §7.1 rewritten (see Acceptance notes); the contract doc names the refusal code. - Studio form row for the mode (static three options; PR 4 of the series makes it list the store's modes), liveness row `planned` (flipped to `live` by the service PR), protocol doc §3.4, generated baselines. ## Tests - `packages/spec`: new knowledge-source cases (three modes parse, `{}` accepted, an invalid mode's message, `vectorWeight`/`keywordWeight`/`fusion` refused as unknown keys, JSON Schema enum + `additionalProperties: false`). - `service-knowledge`: index-fingerprint test pins that neither hash moves for `{}` or any mode. - Contract suite exercised by the turso and live-pgvector adapter PRs. ## Acceptance notes - `AdapterSearchOptions.retrieval` is optional, as built (`retrieval?`, omitted means the adapter's default, as K8 rule 2 has every search member): the maintainer ruled it on #38692 (comment 7272337479, 2026-11-30 07:57Z), the question the phase-0 contract review (7271729439) escalated. - Per-search refusal code (point 4), proposed: `SERVICE_UNAVAILABLE` (503), reused rather than added. It is an ADR-0112 standard catalog code (`packages/spec/src/api/error-code-ledger.zod.ts`, the standard map), so no new ledger entry; it is the code a source whose adapter is not mounted already carries in `refused`, since in both cases the deployment cannot serve the source as written. It is #38722's to write and the maintainer's to confirm (open question C): the contract doc of `AdapterSearchOptions.retrieval` here names no code. The save refuses with `VALIDATION_ERROR` (400), as the ruling fixes. - ADR-0161's K2 row (adapter surface) is rewritten as the row asks of each PR that adds a member: it no longer says "no hybrid toggle"; protocol doc §7.1 likewise. This makes the PR Tier H (an ADR file is touched). - Phase 1b (`vectorWeight`) is not built; the strict shape refuses it today. ## Verification - Two-minute check: `pnpm --filter @objectstack/spec exec vitest run src/ai/knowledge-source.test.ts` → all pass, including the retrieval describe. - Local gates from `dispatch-gates.mjs --commands`: all measured gates green (`check:spec-parsed-alias` found a missing isomorphism pin, fixed in e805371); not measured in this container (exit 3 or unbuilt closure, no verdict): `check-plugin-teardown-shape --self-test` (shallow clone), `check:skill-examples`, `check:dual-build-cjs-loads`, `check:i18n`, `check:dts-closure`. ## Human Minimum - [x] 1. Schemas start as Zod; `packages/spec` holds no runtime logic. - [x] 2. Every name I added uses the casing for its kind. - [x] 3. No formatter ran; `pnpm lint` passes. - [ ] 4. One issue, one branch off an up-to-date `main`, one pull request. (Stacked: see "Stack" above.) - [x] 5. A change that publishes carries a changeset, and both declaration lines are filled in here and in the changeset. - [x] 6. `packages/spec` touched: its generated artifacts are regenerated and committed. - [x] 7. No hand edits to `content/docs/references/`, `packages/*/CHANGELOG.md` or `content/docs/releases/`. - [x] 8. Title, body and comments are in English. - [x] The *Before Submitting* list in CONTRIBUTING.md is done. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01JQwxbaASqBozmmj1n5tbUf <!-- signed: repo:objectstack#2 · os-warren · session_01JQwxbaASqBozmmj1n5tbUf --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent e5f7b16 commit f576dee

34 files changed

Lines changed: 561 additions & 19 deletions
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
'@objectstack/spec': minor
3+
'@objectstack/service-knowledge': minor
4+
'@objectstack/platform-objects': patch
5+
---
6+
7+
feat(spec): a knowledge source may declare its retrieval mode, `source.retrieval.mode` (`vector`, `keyword` or `hybrid`), and a knowledge adapter reports the modes it runs
8+
9+
Clause-②: yes (widening)
10+
Metadata-protocol: added
11+
12+
A `knowledge_source` may now declare how it is searched: `source: { …, retrieval: { mode: 'vector' } }`. `vector` runs only the vector leg (ranking passages by meaning), `keyword` only the keyword leg (ranking passages by the words they hold, with no call to the embedder), and `hybrid` both, merged by the store's fusion. Leaving `mode` out, or writing `retrieval: {}`, keeps the store's default, which is today's behaviour. The key is read on every search and by no build, so it enters neither the index fingerprint nor the recipe hash: changing it rebuilds nothing. The parse refuses a mode outside the three, and any other key under `retrieval`, each with the fix. Studio's knowledge source form offers the key as a "Retrieval mode" select under "Search".
13+
14+
`IKnowledgeAdapter` gains two optional members. `capabilities.retrieval: { modes, default }` is the adapter's report of the modes it runs and the one it runs when a source declares none; it is a report, not configuration. `AdapterSearchOptions.retrieval: { mode }` carries the mode a search runs, a per-request parameter like `topK`. An adapter that reports no modes keeps working unchanged; a source that names it may only leave `mode` out.
15+
16+
The adapter contract suite (`@objectstack/service-knowledge/testing`) takes a new optional declaration, `implements.retrieval`: it checks the adapter's report (each mode one of the three, none twice, the default listed), searches a fixed set of passages under each listed mode (`vector` leaves out the passage only the keyword leg ranks, `keyword` answers that passage alone and nothing for a query with no word any passage holds), and checks that the default mode handed explicitly answers exactly what a search without the member answers. An adapter that does not declare it is checked to report no modes.
17+
18+
The Studio metadata-form translations (`@objectstack/platform-objects`) name the "Search" group and the "Retrieval mode" select and its three choices in every locale.
19+
20+
The knowledge service's reading of the mode (and its refusal of a mode the source's store does not run) and the turso and pgvector stores' support for it ship as separate changes.

‎content/docs/protocol/knowledge.mdx‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,14 @@ that name (ADR-0161 K4):
181181
`VALIDATION_ERROR` (400), naming them. The adapter is placed where it is
182182
used, so a source registered before its store started finds it.
183183

184+
**How a source is searched: `source.retrieval.mode`** (ADR-0161, the dated
185+
note of 2026-11-30 under K8). `'vector'` ranks by meaning alone, `'keyword'`
186+
by the question's words alone (the embedder is never called), `'hybrid'` runs
187+
both and merges them; omitted (or `retrieval: {}`), the adapter's default
188+
(`capabilities.retrieval.default`, `'hybrid'` on `turso` and `pgvector`). The
189+
mode is read by search alone: it enters neither the index fingerprint nor the
190+
recipe hash, so changing it rebuilds nothing.
191+
184192
**What mounts the service.** A stack that ships a `knowledge_source` — any
185193
item in its `knowledgeSources`, at the top level or in a package — is served
186194
the knowledge service and the deployment's store, exactly as
@@ -483,7 +491,10 @@ and [3.5 The split](#35-the-split).
483491
```ts
484492
interface IKnowledgeAdapter {
485493
readonly id: string;
486-
readonly capabilities?: { chunks?: boolean }; // takes the service's passages
494+
readonly capabilities?: {
495+
chunks?: boolean; // takes the service's passages
496+
retrieval?: { modes: readonly ('vector' | 'keyword' | 'hybrid')[]; default: 'vector' | 'keyword' | 'hybrid' };
497+
}; // the retrieval modes it runs, and its default
487498
readonly embedding?: { // what its embedder is
488499
maxInputTokens?: number; // longest input it accepts
489500
model?: string; dimensions?: number; variant?: string; // what its vectors are
@@ -523,6 +534,11 @@ caller's organizations; an adapter that reads it ranks only those
523534
organizations' documents, filtering before it ranks — see
524535
[Organization scope](#organization-scope). `AdapterSearchOptions.scope` holds a
525536
search to chosen records the same way — see [Record scope](#record-scope).
537+
`capabilities.retrieval` reports the retrieval modes an adapter runs
538+
(`vector`, `keyword`, `hybrid`) and the one it runs by default; it is a
539+
report, not configuration. `AdapterSearchOptions.retrieval` carries the mode
540+
a search runs, a per-request parameter like `topK`, and only ever a mode the
541+
adapter lists.
526542
`listDocuments` lists the documents the
527543
adapter holds for a source, a page of at most `limit` entries at a time, each
528544
with the `docHash` it was stored with; `nextCursor` is absent once the
@@ -1504,7 +1520,9 @@ followed (§4.1, §4.2) are the adapters to run in production.
15041520

15051521
### 7.1 Non-goals for Phase 1
15061522

1507-
- Reranker hooks, hybrid retrieval toggles, MMR — adapter-private.
1523+
- Reranker hooks, MMR — adapter-private. Which legs a search runs is not:
1524+
a source declares it (`source.retrieval.mode`, §3.1); how the legs are
1525+
weighted is not authorable yet.
15081526
- Field-level masking inside a passage. A source serving a field the caller
15091527
may not query is not searched for that caller at all (§5, source
15101528
admission); a passage is never re-projected or redacted per caller.

‎content/docs/references/ai/knowledge-source.mdx‎

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ See `content/docs/protocol/knowledge.mdx` for the design.
2323
## TypeScript Usage
2424

2525
```typescript
26-
import { KnowledgeAffinityCallerSchema, KnowledgeAffinityEntrySchema, KnowledgeAffinityModeSchema, KnowledgeRefreshPolicySchema, KnowledgeSourceSchema, KnowledgeSplitSchema, KnowledgeSplitStrategySchema, ObjectKnowledgeSourceSchema } from '@objectstack/spec/ai';
27-
import type { KnowledgeAffinityCaller, KnowledgeAffinityEntry, KnowledgeAffinityMode, KnowledgeRefreshPolicy, KnowledgeSource, KnowledgeSplit, KnowledgeSplitStrategy, ObjectKnowledgeSource } from '@objectstack/spec/ai';
26+
import { KnowledgeAffinityCallerSchema, KnowledgeAffinityEntrySchema, KnowledgeAffinityModeSchema, KnowledgeRefreshPolicySchema, KnowledgeRetrievalSchema, KnowledgeRetrievalModeSchema, KnowledgeSourceSchema, KnowledgeSplitSchema, KnowledgeSplitStrategySchema, ObjectKnowledgeSourceSchema } from '@objectstack/spec/ai';
27+
import type { KnowledgeAffinityCaller, KnowledgeAffinityEntry, KnowledgeAffinityMode, KnowledgeRefreshPolicy, KnowledgeRetrieval, KnowledgeRetrievalMode, KnowledgeSource, KnowledgeSplit, KnowledgeSplitStrategy, ObjectKnowledgeSource } from '@objectstack/spec/ai';
2828

2929
// Validate data
3030
const result = KnowledgeAffinityCallerSchema.parse(data);
@@ -76,6 +76,28 @@ const result = KnowledgeAffinityCallerSchema.parse(data);
7676
| **cron** | `never` | optional | [REMOVED] `knowledge_source.refresh.cron` was removed in @objectstack/spec 19.0.0 (ADR-0161 K6) — it was parsed and reached no engine: nothing ever scheduled a reindex from it. Delete the key. To rebuild on a schedule, call `reindexSource` from a flow or a job; keeping the index correct between events is the service's reconcile pass. A source registered in code (`KnowledgeServicePlugin({ sources })`, `registerSource`) is in no stack collection, so `os migrate meta` lists no edit for it: make this edit in the registration itself. Run `os migrate meta --from 18` to list the mechanical edits for existing sources; `--write` applies the ones it can prove, and you apply the rest by hand. |
7777

7878

79+
---
80+
81+
## KnowledgeRetrieval
82+
83+
### Properties
84+
85+
| Property | Type | Required | Description |
86+
| :--- | :--- | :--- | :--- |
87+
| **mode** | `Enum<'vector' \| 'keyword' \| 'hybrid'>` | optional | Which legs a search runs: vector, keyword or hybrid; omitted means the store's default |
88+
89+
90+
---
91+
92+
## KnowledgeRetrievalMode
93+
94+
### Allowed Values
95+
96+
* `vector`
97+
* `keyword`
98+
* `hybrid`
99+
100+
79101
---
80102

81103
## KnowledgeSource
@@ -116,6 +138,7 @@ const result = KnowledgeAffinityCallerSchema.parse(data);
116138
| **where** | `Record<string, any>` | optional | |
117139
| **split** | `{ strategy: Enum<'whole' \| 'recursive' \| 'markdown'>; maxChars?: integer; minChars?: integer }` | optional | How the service cuts this object's documents into passages; omitted means recursive |
118140
| **affinity** | `{ field: string; caller: Enum<'user' \| 'business_unit'>; mode: Enum<'boost' \| 'nearest'>; places?: integer }[]` | optional | How this source's hits are ordered for the caller: boost (by places) or nearest (own business unit first), by position, never by score |
141+
| **retrieval** | `{ mode?: Enum<'vector' \| 'keyword' \| 'hybrid'> }` | optional | How this source is searched: mode vector, keyword or hybrid; omitted means the store's default, and changing it rebuilds nothing |
119142

120143
### Nested Shape: `KnowledgeSource.refresh`
121144

@@ -166,6 +189,7 @@ const result = KnowledgeAffinityCallerSchema.parse(data);
166189
| **where** | `Record<string, any>` | optional | |
167190
| **split** | `{ strategy: Enum<'whole' \| 'recursive' \| 'markdown'>; maxChars?: integer; minChars?: integer }` | optional | How the service cuts this object's documents into passages; omitted means recursive |
168191
| **affinity** | `{ field: string; caller: Enum<'user' \| 'business_unit'>; mode: Enum<'boost' \| 'nearest'>; places?: integer }[]` | optional | How this source's hits are ordered for the caller: boost (by places) or nearest (own business unit first), by position, never by score |
192+
| **retrieval** | `{ mode?: Enum<'vector' \| 'keyword' \| 'hybrid'> }` | optional | How this source is searched: mode vector, keyword or hybrid; omitted means the store's default, and changing it rebuilds nothing |
169193

170194
### Nested Shape: `ObjectKnowledgeSource.split`
171195

@@ -184,6 +208,12 @@ const result = KnowledgeAffinityCallerSchema.parse(data);
184208
| **mode** | `Enum<'boost' \| 'nearest'>` | ✅ | boost lifts a match by places; nearest puts the caller's own unit first, then its parents |
185209
| **places** | `integer` | optional | boost only: how many non-matching hits a match may pass, 1 to 20 |
186210

211+
### Nested Shape: `ObjectKnowledgeSource.retrieval`
212+
213+
| Property | Type | Required | Description |
214+
| :--- | :--- | :--- | :--- |
215+
| **mode** | `Enum<'vector' \| 'keyword' \| 'hybrid'>` | optional | Which legs a search runs: vector, keyword or hybrid; omitted means the store's default |
216+
187217

188218
---
189219

‎content/docs/references/index.mdx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Protocol reference — every schema by module
33
navTitle: Protocol Reference
4-
description: Every schema published by @objectstack/spec — 1747 schemas across 14 protocol modules
4+
description: Every schema published by @objectstack/spec — 1749 schemas across 14 protocol modules
55
---
66

77
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
@@ -22,7 +22,7 @@ counts are sums of the rows they head. Regenerate with
2222

2323
| Module | Pages | Schemas | Description |
2424
| :--- | ---: | ---: | :--- |
25-
| [AI Protocol](/docs/references/ai) | 18 | 106 | Agents, tools, skills, RAG and knowledge sources, model registry, conversations. |
25+
| [AI Protocol](/docs/references/ai) | 18 | 108 | Agents, tools, skills, RAG and knowledge sources, model registry, conversations. |
2626
| [API Protocol](https://github.com/objectstack-ai/objectstack/tree/main/packages/spec/docs/references/api) | 37 | 528 | REST contracts, endpoints, routing, realtime, batch, discovery. |
2727
| [Automation Protocol](/docs/references/automation) | 16 | 82 | Flows and their nodes, approvals, ETL pipelines, webhooks, state machines, execution records. |
2828
| [Data Protocol](/docs/references/data) | 35 | 197 | Objects, fields, queries, filters, datasources and drivers — the ObjectQL layer. |
@@ -36,13 +36,13 @@ counts are sums of the rows they head. Regenerate with
3636
| [Studio Protocol](https://github.com/objectstack-ai/objectstack/tree/main/packages/spec/docs/references/studio) | 3 | 35 | Studio designer metadata — the authoring surfaces for the protocols above. |
3737
| [System Protocol](https://github.com/objectstack-ai/objectstack/tree/main/packages/spec/docs/references/system) | 40 | 298 | The runtime environment — logging, jobs, cache, metrics, notifications, i18n and compliance. |
3838
| [UI Protocol](/docs/references/ui) | 17 | 188 | Apps, pages, views, dashboards, reports, actions and themes — the ObjectUI layer. |
39-
| **Total** | **224** | **1747** | 14 protocol modules |
39+
| **Total** | **224** | **1749** | 14 protocol modules |
4040

4141
---
4242

4343
## AI Protocol
4444

45-
**Source:** `packages/spec/src/ai/` · **Import:** `@objectstack/spec/ai` · **18 pages, 106 schemas**
45+
**Source:** `packages/spec/src/ai/` · **Import:** `@objectstack/spec/ai` · **18 pages, 108 schemas**
4646

4747
Agents, tools, skills, RAG and knowledge sources, model registry, conversations.
4848

@@ -55,7 +55,7 @@ Agents, tools, skills, RAG and knowledge sources, model registry, conversations.
5555
| [`dataset-tools.zod.ts`](/docs/references/ai/dataset-tools) | `DatasetNextStep`, `DatasetNextStepDecision`, `DatasetProvenance`, `DatasetTermCandidate`, `DatasetTermMatch`, `DatasetTermMatchedOn`, `DatasetToolCatalogDimension`, `DatasetToolCatalogEntry`, `DatasetToolCatalogMeasure`, `ListDatasetsInput`, `ListDatasetsOutput`, `QueryDatasetInput`, `QueryDatasetOutput` |
5656
| [`draft-review.zod.ts`](/docs/references/ai/draft-review) | `DraftReviewItem`, `DraftReviewLinks`, `DraftReviewList`, `DraftReviewVerdict`, `DraftReviewVerdictRefusal` |
5757
| [`knowledge-document.zod.ts`](/docs/references/ai/knowledge-document) | `KnowledgeChunk`, `KnowledgeDocument`, `KnowledgeHit` |
58-
| [`knowledge-source.zod.ts`](/docs/references/ai/knowledge-source) | `KnowledgeAffinityCaller`, `KnowledgeAffinityEntry`, `KnowledgeAffinityMode`, `KnowledgeRefreshPolicy`, `KnowledgeSource`, `KnowledgeSplit`, `KnowledgeSplitStrategy`, `ObjectKnowledgeSource` |
58+
| [`knowledge-source.zod.ts`](/docs/references/ai/knowledge-source) | `KnowledgeAffinityCaller`, `KnowledgeAffinityEntry`, `KnowledgeAffinityMode`, `KnowledgeRefreshPolicy`, `KnowledgeRetrieval`, `KnowledgeRetrievalMode`, `KnowledgeSource`, `KnowledgeSplit`, `KnowledgeSplitStrategy`, `ObjectKnowledgeSource` |
5959
| [`mcp.zod.ts`](/docs/references/ai/mcp) | `MCPApprovalPolicy`, `MCPServerRef`, `MCPToolBinding`, `MCPTransport`, `McpActionNamespace`, `McpListedActionAddress` |
6060
| [`model-registry.zod.ts`](/docs/references/ai/model-registry) | `ModelCapability`, `ModelConfig`, `ModelLimits`, `ModelPricing`, `ModelProvider`, `ModelRegistry`, `ModelRegistryEntry`, `ModelSelectionCriteria`, `PromptTemplate`, `PromptVariable` |
6161
| [`object-query-source.zod.ts`](/docs/references/ai/object-query-source) | `ObjectQuerySource` |

‎docs/adr/0161-knowledge-platform-boundary-platform-owns-assembly-sync-split-record-return-knowledge-source-is-a-governed-type.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ Each text below states the old position. The left column quotes it as it reads a
172172
| Same file, §1: "We have nothing distinctive to add to those layers." and "The protocol scopes the framework's responsibility to (1)–(4) and delegates the rest to plugins." | The framework's list grows by the four of K1; what is delegated is the adapter's four. | #37096 |
173173
| Same file, §3.1: a source "is stored as metadata (versioned, environment-scoped) just like a view or a flow", against the schema note on `packages/spec/src/ai/knowledge-source.zod.ts#KnowledgeSourceSchema`: "the shape of a **runtime registration**, ⛔ not a governed metadata type". | The two agree: a source is a `knowledge_source` item (K4). Until row 3 lands, the schema note is the true one. | row 3 |
174174
| Same file, §3.2: "The framework does **not** chunk; adapters do." | The framework splits; adapters index the passages. | #37098 (row 6) |
175-
| Same file, §3.4, and the note on `packages/spec/src/contracts/knowledge-adapter.ts#IKnowledgeAdapter`: "The surface is **deliberately minimal**: no chunk strategy, no embedding configuration, no rerank toggles." | The contract grows by K8's list. It carries what an adapter reports about its embedder and still no configuration, no rerank and no hybrid toggle. | #37096, then each card that adds a member |
175+
| Same file, §3.4, and the note on `packages/spec/src/contracts/knowledge-adapter.ts#IKnowledgeAdapter`: "The surface is **deliberately minimal**: no chunk strategy, no embedding configuration, no rerank toggles." | The contract grows by K8's list. It carries what an adapter reports about its embedder and the retrieval modes it runs (`capabilities.retrieval`), and the mode a search runs in (`AdapterSearchOptions.retrieval`): the source's declaration, else the adapter's default; still no configuration and no rerank. | #37096, then each card that adds a member (#38692 phase 1a: the retrieval mode) |
176176
| Same file, §6: "that surface stays unbuilt until a real `object` source calls for it." | The enumeration surface is built (K8, item 1); reconcile covers application-level predicate writes. | #37096 and row 15 |
177177
| Same file, §7 and §8: `knowledge-pgvector` as "Phase 3", and "a `KnowledgeSource.embedding` field". | `knowledge-pgvector` is an open adapter of this repository (cloud ADR-0119 D5); `embedding` is removed (K6). | #37100, row 3 |
178178
| `packages/spec/src/ai/embedding.zod.ts`, file note: "NOT in scope (these belong to application code, not the platform): Chunking strategies (fixed/semantic/recursive/markdown)." and "These were removed in v1 because they describe one specific way to build a RAG application". | Structural splitting is a platform capability of the knowledge service. It does not return as the pipeline vocabulary that was removed. Retrieval pipelines, document loaders and end-to-end orchestration stay out of scope. | #37098 |

‎docs/audits/2026-07-unknown-key-strictness-ledger.counts/ai.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ hand-patch a number here** — fix the code or the verdict and regenerate.
1919

2020
| Dir | Sites |
2121
|---|---|
22-
| `ai/` | 122 |
22+
| `ai/` | 123 |

‎packages/platform-objects/src/apps/translations/ar.metadata-forms.generated.ts‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3569,6 +3569,19 @@ export const arMetadataForms: NonNullable<TranslationData['metadataForms']> = {
35693569
label: "Order for the asker",
35703570
helpText: "Optional. Lists entries that move hits related to the person asking up the answer, for example [{\"field\": \"business_unit\", \"caller\": \"business_unit\", \"mode\": \"nearest\"}] puts their own unit first, then its parent units, then the rest, and [{\"field\": \"owner\", \"caller\": \"user\", \"mode\": \"boost\", \"places\": 3}] lets a hit they own pass up to 3 others (1 to 20). Each field must be in Filter fields and point at users (caller user) or business units (caller business_unit); at most one nearest. Nothing is dropped or scored differently, and setting it rebuilds nothing."
35713571
},
3572+
"source.retrieval": {
3573+
label: "البحث",
3574+
helpText: "كيف يعثر البحث في هذا المصدر على المقاطع. اتركه فارغًا لاستخدام الوضع الافتراضي للمخزن. تغييره لا يعيد بناء أي شيء."
3575+
},
3576+
"source.retrieval.mode": {
3577+
label: "وضع الاسترجاع",
3578+
helpText: "فارغ: الوضع الافتراضي للمخزن (هجين في turso وpgvector). المتجه يرتّب المقاطع حسب المعنى؛ والكلمات المفتاحية حسب الكلمات التي تحتويها، دون استدعاء مزوّد التضمين، وهو ما يناسب أرقام المستندات أو البنود؛ والهجين يدمج الاثنين. يُرفض عند الحفظ أي وضع لا يشغّله المخزن.",
3579+
options: {
3580+
vector: "المتجه فقط (حسب المعنى)",
3581+
keyword: "الكلمات المفتاحية فقط (حسب الكلمات)",
3582+
hybrid: "هجين (كلاهما)"
3583+
}
3584+
},
35723585
"source.where": {
35733586
label: "Records to index",
35743587
helpText: "An ObjectQL filter on the object, for example {\"status\": {\"$ne\": \"done\"}}. Only the records it matches are indexed. Blank: every record."

0 commit comments

Comments
 (0)