msflib.drivelink¶
Public modules of the msflib-drivelink package.
msflib.drivelink.actions
¶
DrivelinkAction(settings: SettingsBase)
¶
Bases: ModelAction[DrivelinkNode, DrivelinkNodeCreate, DrivelinkNodeUpdate]
apply_batch(session: Session, *, account_id: int, ops: list[BatchOp], workspace_id: int | None = None, drivelink_id: int | None = None, commit: bool = True) -> list[tuple[str, str, int | None]]
¶
Returns list of (op_id, status, node_id) per op. All-or-nothing.
msflib.drivelink.config
¶
msflib.drivelink.documents_contract
¶
Integration contract for a future msflib-documents module (RAG, etc.).
Stable identity for ingested files
- Use
(drivelink_id, node_id, version)wherenode_idis aDrivelinkNoderow withkind == file.drivelink_idpartitions document identities across logical drivelink roots. Bumpversionwhen file bytes are replaced.
Event bus (emitted by ModelAction lifecycle hooks on DrivelinkNode; see
msflib.actions.ModelAction):
drivelinknode-create-pre-commitdrivelinknode-update-pre-commitdrivelinknode-delete-pre-commit
Listeners receive (model, {"session": session, ...}) as for other SQLModel entities.
Out of scope here
- Embeddings, chunking, and retrieval logic live in
msflib-documents, not in drivelink.
msflib.drivelink.models
¶
DrivelinkNode
¶
Bases: DrivelinkNodeBase
Host apps should add a partial unique index on (parent_id, name) WHERE deleted_at IS NULL in migrations.