feat: improve assistant knowledge import and database compatibility
This commit is contained in:
1 parent
fbd8dec48f
commit
6b724bd00d
51 files changed
+4393
-1021
No files matched your search
@@ -1623,23 +1623,40 @@ save fallback.
|
||||
## Skill/assistant knowledge invariants
|
||||
|
||||
Skill distillation is implemented in `deerflow.skill_knowledge` and
|
||||
`deerflow.persistence.skill_knowledge`; the single native assistant base is in
|
||||
`deerflow.persistence.skill_knowledge`; native assistant bases are in
|
||||
`deerflow.assistant_knowledge` and
|
||||
`deerflow.persistence.assistant_knowledge`. Gateway composition, remote adapters,
|
||||
the lease dispatcher, watcher/scheduler, and APIs remain in `app.gateway` so the
|
||||
harness-to-app import firewall is preserved.
|
||||
the lease dispatcher, and APIs remain in `app.gateway` so the harness-to-app
|
||||
import firewall is preserved.
|
||||
|
||||
Never execute a skill or read/upload/summarize its code and script files.
|
||||
Knowledge fingerprints exclude those files and Markdown code fences. All
|
||||
resyncs must stage and validate the knowledge digest before activation; the old
|
||||
snapshot remains authoritative on failure. A binding may have only one active
|
||||
item (`active_dedupe_key` plus atomic lease claims). Detach/delete operates on
|
||||
source contributions, not canonical rows, and shared entities/relations are
|
||||
retired only when their final contribution is gone.
|
||||
item (`active_dedupe_key` plus atomic lease claims). Skill distillation targets
|
||||
only writable WeKnora Wiki knowledge bases in this product version; reject direct
|
||||
assistant-base targets, non-Wiki/FAQ/conversation/readonly targets, and direct
|
||||
Neo4j writes. Detach/delete operates on source contributions, not canonical rows,
|
||||
and shared entities/relations are retired only when their final contribution is
|
||||
gone.
|
||||
|
||||
There is exactly one global assistant base (`知识梳理`). Ordinary users have
|
||||
read/search access and administrators own all mutations. WeKnora direct graph
|
||||
writes require `llmwiki.weknora.graph.direct_write_enabled`, backend-only
|
||||
credentials, and the fixed parameterized templates in
|
||||
`deerflow.skill_knowledge.graph_writer`; never accept Cypher from an API, model,
|
||||
skill, or frontend.
|
||||
Assistant knowledge has one global full-library base (`知识梳理总库`) and any
|
||||
number of admin-created custom bases. Ordinary users have read/search access and
|
||||
administrators own all mutations. Assistant bases only accept WeKnora export
|
||||
packages or imports triggered from a WeKnora mapping. Do not add direct skill
|
||||
imports or arbitrary local-file imports to assistant knowledge. Importing into a
|
||||
custom assistant base must also mirror the package into the global base for
|
||||
cross-source entity alignment.
|
||||
|
||||
## openGauss / GaussDB persistence invariant
|
||||
|
||||
`database.backend=gauss` is an application-ORM backend, parallel to `mysql`.
|
||||
It normalizes `database.gauss_url` to `opengauss+asyncpg://` and requires the
|
||||
`gauss` optional dependency (`asyncpg` plus `opengauss-sqlalchemy`). Never route
|
||||
a Gauss URL through SQLAlchemy's generic PostgreSQL dialect: the wire protocol
|
||||
may connect, but dialect initialization and schema DDL can fail against the
|
||||
Gauss server/version behavior. Keep the LangGraph checkpointer on the separately
|
||||
configured SQLite backend; the PostgreSQL checkpointer schema is not part of the
|
||||
Gauss compatibility contract. Treat both `postgresql` and `opengauss` dialect
|
||||
names as timezone-aware PostgreSQL-family engines in portable types and
|
||||
dialect-specific session settings.
|
||||
Reference in new issue
Block a user