-
Notifications
You must be signed in to change notification settings - Fork 4
Capability Configuration
Language: English · 简体中文
LWC capability configuration selects optional document-graph and Markdown-conversion behavior. It is layered, deployment-local state; it does not belong to Wiki knowledge or a changeset. Use this page to decide what to enable, where to configure it, and how to verify the effective result.
Both capabilities default to disabled. Initialization recommends available choices but never enables or installs one automatically.
lwc --scope project config show
lwc --scope global config showThe response contains:
- selected
scopeand config filepath; - effective graph
settingandorigin; - effective trans
setting,origin,timeout_seconds,anydoc_args, andmarkitdown_args.
Always inspect the effective value and origin. Reading only .lwc/config.json misses global inheritance and built-in defaults.
Resolution order is:
built-in disabled
-> global config when not inherit
-> project config when not inherit
| Scope | Configuration path | Meaning |
|---|---|---|
| Global | ~/.lwc/config.json |
Cross-project default for the current user |
| Project | <project>/.lwc/config.json |
Override for the selected project Wiki |
Graph and trans layers resolve independently. A project can inherit global graph configuration while choosing its own conversion engine.
Config files use format version 3, reject unknown fields, validate values before replacement, and are written through an atomic temporary file. Symlinked config paths are rejected.
Supported settings:
| Value | Behavior |
|---|---|
disabled |
No external document-graph projection or query |
grafeo |
Use the embedded Grafeo file-backed engine |
surrealdb |
Use the embedded SurrealDB/SurrealKV engine |
inherit |
Use the next lower configuration layer |
Enable one engine explicitly:
lwc --scope project config set --graph grafeo
lwc --scope project work watch <work-id>
lwc --scope project graph verifySetting grafeo or surrealdb queues a full projection Work. Configuration success alone does not prove graph readiness.
Disable the capability without deleting canonical graph facts:
lwc --scope project config set --graph disabledRestore inheritance:
lwc --scope project config unset --graphunset changes the layer; it does not return graph Work. If the effective engine changes from disabled to enabled through inheritance, inspect graph status and graph verify. Use an explicit config set --graph <engine> to queue a full projection when a rebuild is required.
Do not switch engines while an earlier graph Work is active. Wait, verify, change the setting, then wait and verify the new engine independently.
Supported trans settings are disabled, markitdown, and anydoc:
lwc --scope project config set --trans markitdown
lwc --scope project config set --trans anydoc
lwc --scope project config set --trans disabledSelecting an engine does not install it. lwc trans checks that the executable exists and returns a typed setup error when unavailable.
The default timeout is 120 seconds; accepted values are 1 through 900:
lwc --scope project config set \
--trans markitdown \
--trans-timeout 300Repeated --trans-arg values replace the selected engine's stored argument list:
lwc --scope project config set \
--trans markitdown \
--trans-timeout 300 \
--trans-arg --keep-data-urisArguments for the other engine remain stored separately. Selecting disabled does not accept arguments.
Config writes reject explicit credential flags and values that look like secrets. Runtime conversion performs another safety check for path-like positional arguments, output overrides, credential flags, and other arguments that could escape LWC's ownership boundary.
Do not store API keys, tokens, passwords, subscription keys, or customer secrets in trans arguments.
Restore the trans layer to inherited defaults:
lwc --scope project config unset --transGraph and trans settings can change in one config replacement:
lwc --scope project config set \
--graph grafeo \
--trans markitdown \
--trans-timeout 300If the graph selection is explicit and enabled, the response also returns projection Work. Watch it even when the conversion setting was the primary reason for the command.
-
projectupdates<project>/.lwc/config.json. -
globalupdates~/.lwc/config.json. -
allis rejected. - A changeset selector is rejected because configuration is deployment-local.
- Project discovery comes from the current directory unless one command intentionally uses
LWC_PROJECT_ROOT.
Do not export LWC_PROJECT_ROOT or define a private LWC=/path/to/lwc variable for routine use. Install lwc on PATH and run it from the project.
Use lwc config set and lwc config unset. Do not hand-edit JSON during an active process. A malformed file blocks resolution with invalid_config; an unsupported version returns unsupported_config_version.
If a config file must be reviewed by policy, use config show for the effective contract and inspect the owned file read-only. Redact arguments before sharing diagnostics.
After any configuration change:
- run
config showand confirm setting plus origin; - watch returned Work;
- verify the enabled graph independently;
- for trans, perform one non-sensitive real conversion and inspect its receipt and output;
- confirm no secret was persisted;
- record configuration separately from canonical Wiki changes.
LWC Wiki
- Home · 首页
- Project overview · 项目简介
- Basic concepts · 基本概念
- Use cases · 应用场景
- Installation and upgrades · 安装与升级
- Quick start · 快速开始
- Persistent memory · 持久记忆体系
- Agent workflow and memory policy · Agent 工作流与主动记忆策略
- Sources and ingestion · 来源与知识整合
- Wiki pages and provenance · Wiki 页面与来源证明
- Search and context · 搜索与上下文载入
- Document knowledge graph · 文档知识图(记忆图网)
- Code graph · 代码图
- Word graph · 词图
- Tags and strong context · 标签与强上下文
- Document conversion · 文档转换
-
MCP server and
lwc_explore· MCP 服务与lwc_explore - Skills, Hooks, and Instructions · Skills、Hooks 与 Instructions
- AgentTarget installation · AgentTarget 安装与集成
- Changesets · Changeset 原子变更
- Work system · Work 任务系统
- Checkpoints and rollback · Checkpoint、恢复与回滚
- Read-only Viewer · 只读可视化界面
- Architecture overview · 总体架构
- Storage and data model · 存储与数据模型
- Retrieval and indexing · 检索与索引设计
- Graph projection and performance · 图投影与性能设计
- MCP, Hooks, and AgentTarget design · MCP、Hook 与 AgentTarget 设计
- Safety and trust boundaries · 安全模型与信任边界
- Maintenance and diagnostics · 维护与诊断
- Troubleshooting and FAQ · 故障排查与常见问题
- Migration and compatibility · 迁移与版本兼容
- Support and issue reporting · 获取帮助与问题反馈
- CLI and configuration reference · CLI 与配置参考
- JSON output and error contract · JSON 输出与错误契约
- Limits and glossary · 系统限制与术语表
- Contributing and development · 贡献与开发指南
- Testing and release process · 测试与发布流程
- Wiki style guide · Wiki 编写规范