You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Knowledge Source — the governed metadata type knowledge_source: what the knowledge service indexes, from which object, and through which adapter.
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs live in the module folders under content/docs/. */}
Knowledge Source — the governed metadata type knowledge_source
(ADR-0161 K4): what the knowledge service indexes, from which object, and
through which adapter.
One schema for every door (ADR-0005, ADR-0161 K4 point 3): a
*.knowledge-source.ts file in a package, a save through Studio or MCP,
and a registration in code all parse with KnowledgeSourceSchema.
See content/docs/protocol/knowledge.mdx for the design.
Sync the index from record events (default true); false leaves the index to an external indexer
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.
KnowledgeSource
Properties
Property
Type
Required
Description
name
string
✅
Source machine name (snake_case) — what search_knowledge lists and its sourceIds argument names
id
never
optional
[REMOVED] knowledge_source.id was removed in @objectstack/spec 19.0.0 (ADR-0161 K6) — a knowledge source is a metadata item, and an item is identified by name; use name. Rename the key; the value is unchanged, so the source's index is found again and is not rebuilt, except for a source whose id began with an underscore: name refuses the underscore, so that source takes a new name, is built again under it, and its old index is dropped with dropSource; the upgrade entry knowledge-source-registration-governed says how, and its notices still apply after the conversion. 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.
label
string
✅
description
string
optional
adapter
string
optional
Adapter id; omitted means the deployment's store (pgvector on PostgreSQL, turso otherwise), else the only adapter registered
adapterConfig
never
optional
[REMOVED] knowledge_source.adapterConfig was removed in @objectstack/spec 19.0.0 (ADR-0161 K6) — no adapter read it: its one reader was the retired RAGFlow adapter. Delete the key. An adapter takes its settings as options of the plugin that mounts it. 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.
[REMOVED] knowledge_source.embedding was removed in @objectstack/spec 19.0.0 (ADR-0161 K6) — it was never read: no service and no adapter chose a model from it. Delete the key. The embedder is configured once for the deployment, and every source is embedded by it. 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.
vectorStore
never
optional
[REMOVED] knowledge_source.vectorStore was removed in @objectstack/spec 19.0.0 (ADR-0161 K6) — it was never read: no service and no adapter chose a store from it. Delete the key. The store is the adapter the deployment installs, named by adapter. 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.
refresh
{ onRecordChange?: boolean }
optional (default: {})
Refresh / sync configuration; omitted parses to {}
Origin of the item (package | org | env-forced | platform).
_packageId
string
optional
Owning package machine id.
_packageVersion
string
optional
Owning package version.
_lockDocsUrl
string
optional
Optional documentation link surfaced next to _lockReason.
Nested Shape: KnowledgeSource.source
Property
Type
Required
Description
kind
Enum<'object'>
✅
What the source indexes; object is the one kind
object
string
✅
Short object name to index
content
string[]
✅
Fields whose text is indexed, in order; every name is listed (no wildcard)
contentFields
never
optional
[REMOVED] knowledge_source.source.contentFields was removed in @objectstack/spec 19.0.0 (ADR-0161 K6) — the key is spelled content now that a source is a metadata item; use content. Rename the key; the value (a list of field names) is unchanged, except that a '*' member is no longer accepted and is replaced by the field names it stood for. 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.
metadataFields
string[]
optional (default: [])
documentBy
string
optional
Field linking each record to its parent document (a lookup or master_detail listed in metadataFields); record-level search answers one hit per parent
How the service cuts this object's documents into passages; omitted means recursive
Nested Shape: KnowledgeSource.refresh
Property
Type
Required
Description
onRecordChange
boolean
optional (default: true)
Sync the index from record events (default true); false leaves the index to an external indexer
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.
KnowledgeSplit
Properties
Property
Type
Required
Description
strategy
Enum<'whole' | 'recursive' | 'markdown'>
✅
Split strategy: whole, recursive or markdown
maxChars
integer
optional
Longest passage in characters; wins over the settings default, the embedder limit can lower it
minChars
integer
optional
Adjacent pieces shorter than this are merged up to it (default 200); under markdown, only in a section that does not fit, since a section that fits is one passage; a value above the effective maxChars reads as maxChars
KnowledgeSplitStrategy
Allowed Values
whole
recursive
markdown
ObjectKnowledgeSource
Properties
Property
Type
Required
Description
kind
Enum<'object'>
✅
What the source indexes; object is the one kind
object
string
✅
Short object name to index
content
string[]
✅
Fields whose text is indexed, in order; every name is listed (no wildcard)
contentFields
never
optional
[REMOVED] knowledge_source.source.contentFields was removed in @objectstack/spec 19.0.0 (ADR-0161 K6) — the key is spelled content now that a source is a metadata item; use content. Rename the key; the value (a list of field names) is unchanged, except that a '*' member is no longer accepted and is replaced by the field names it stood for. 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.
metadataFields
string[]
optional (default: [])
documentBy
string
optional
Field linking each record to its parent document (a lookup or master_detail listed in metadataFields); record-level search answers one hit per parent
How the service cuts this object's documents into passages; omitted means recursive
Nested Shape: ObjectKnowledgeSource.split
Property
Type
Required
Description
strategy
Enum<'whole' | 'recursive' | 'markdown'>
✅
Split strategy: whole, recursive or markdown
maxChars
integer
optional
Longest passage in characters; wins over the settings default, the embedder limit can lower it
minChars
integer
optional
Adjacent pieces shorter than this are merged up to it (default 200); under markdown, only in a section that does not fit, since a section that fits is one passage; a value above the effective maxChars reads as maxChars