Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
- **Builds on**: [ADR-0005](./0005-metadata-customization-overlay.md) (one Zod source per type), [ADR-0049](./0049-no-unenforced-security-properties.md) and [ADR-0078](./0078-no-silently-inert-metadata.md) (a declared key is enforced or it is not declared; a key lands with its reader), [ADR-0087](./0087-metadata-protocol-upgrade-contract.md) (conversions, tombstones and the migration chain), [ADR-0088](./0088-metadata-kind-admission-and-retirement.md) (the kind admission test), [ADR-0090](./0090-permission-model-v2-concept-convergence.md) D10 (an agent reads as the principal it acts for), [ADR-0112](./0112-error-code-vocabulary-and-ledger.md) (coded refusals), [ADR-0149](./0149-ai-answers-business-questions-through-the-dataset-semantic-layer.md) D2 (one tool definition, one executor, every transport), [ADR-0159](./0159-forms-are-their-own-metadata-type-public-forms-are-form-items-view-is-lists-only.md) (the latest kind admission, followed for the form of K4), and [`ADR-0057-system-data-lifecycle-and-retention`](./0057-system-data-lifecycle-and-retention.md) (the reap guard the knowledge plugin registers).
- **Leaves unchanged**: permission-aware retrieval (every object-source hit is re-read as the caller, and a source is searched for a caller only after the exposure and field-level admission of PR #36850); the reap guard of #4672 as landed; the signature and return type of `IKnowledgeService.search`; the settings shape of #33933 (knowledge settings only where the service is mounted), which #37102 keeps: without the capability token there is no knowledge service and no knowledge settings page; the open AI door, which stays MCP-only (cloud ADR-0119 D4).
- **Inputs**: every code and docs text quoted below was read on `objectstack-ai/objectstack` `main` at `254e396a29`, the commit this record's branch starts from. Positions are in [Readings](#readings-taken-at-254e396a29). PR #36823 and PR #36850 are merged and are in that tree; PR #37075 is open and edits §6 of `content/docs/protocol/knowledge.mdx`, so the §6 quotations may move when it lands.
- **Amended** (2026-11-25, [#37097](https://github.com/objectstack-ai/objectstack/issues/37097)): a dated note under the table of [K8](#k8--the-contract-additions-decided-item-by-item) records that the document hash of item 2 covers `organizationId` when the document has one (item 9), with no version bump. The status line above is left as it is.

---

Expand Down Expand Up @@ -317,6 +318,14 @@ The epic holds the contract shut until this record merges ("No new adapter-contr
| 16 | `knowledge-turso` | Accepted as a rule | No member beyond items 1, 5, 7, 8 and 9. Its generation table and lock row stay inside the adapter (K7, rule 2). | #37107 |
| 17 | (not in the input) A typed scope filter | Deferred | A typed form for what is an opaque `filter` record on `AdapterSearchOptions` today, built by the service from `scope: [{ object, ids }]`. | row 11 |

> **Note (2026-11-25, [#37097](https://github.com/objectstack-ai/objectstack/issues/37097), built by [#37256](https://github.com/objectstack-ai/objectstack/pull/37256)) — items 2 and 9: the hash covers the organization of a document that has one.** Item 2's hash covers the document as the service assembles it. The parenthesis "content, title, metadata" was everything assembly set on a document, its identity aside, when item 2 was accepted. Item 9 adds `organizationId` to the assembled document when the document has one, and the hash covers it then. A document without one hashes byte for byte as it did before, so the version prefix is not bumped.
>
> - **Why.** A document that gains an organization, loses it or moves to another one gets a new hash, so a complete reindex never leaves a stale organization on a stored document. The other answer kept the parenthesis and bumped the version. It leaves a later change of organization to the events alone, and missed events are the hole reconcile exists to close (K1).
> - **A later optional member that assembly sets** enters the hash the same way, left out when it is absent, or the version is bumped.
> - **What an adapter stores.** An adapter that stores `docHash` stores `organizationId` from the same version on; otherwise, once it starts reading this field, a complete reindex skips its documents and a walled search never ranks them.
>
> Item 9's first reader, #37097, is built by PR #37256, and this change to item 2 lands with it. The reasoning is contract review [`7157191417`](https://github.com/objectstack-ai/objectstack/pull/37256#issuecomment-7157191417) on that PR (its M1 and S2). The table is left as written; read items 2 and 9 with this note.

**What "capabilities" became.** #36990's rule named "capabilities" among the members that waited for this record. Two things answer it. A method that is absent is the capability signal for listing, dropping, status, and the start and end of a build: the service asks whether the method is there. One flag covers what a method cannot say, `capabilities.chunks` (item 5). No wider descriptor is added.

**What counts as a member** (for rule 5 below, and for the epic's "no new adapter-contract member"). A member is anything an adapter author must read to be correct:
Expand Down
Loading