knowledge_build
Build or refresh the code knowledge layer for DayZ modding. Use to index project, dependency, or core files for faster, accurate answers about recent edits.
Instructions
Build or refresh a knowledge layer. Returns a job_id immediately.
Layers, and how often each one needs this:
project the mod's own sources, read where they lie. Goes stale on every edit -- rebuild it whenever you want to ask about code you just wrote. Measured: 0.11 s for 41 files. deps the archives of the mods this project declares as dependencies, read without unpacking them. Stale when a dependency is updated or the declared set changes. Measured: 150 s for 36 mods. core the game itself: scripts.pbo for the API, Addons/*.pbo for the item classes. Stale when the game updates. Measured: 3.9 s for the scripts alone, 69 s with the configs. all (the default) every layer that applies to this project. Layers that cannot be built here -- no game installed, no dependencies declared -- are named with the reason instead of failing the call.
Nothing here blocks: wait with job_wait(job_id, timeout=...) and read the
per-layer numbers in the job's summary and its knowledge-build.json
artifact.
only=[path, ...] is the fast route for the project layer when you already
know what changed. It re-reads exactly those files and skips the directory
walk entirely -- and it therefore does NOT notice a file created or deleted
anywhere else. A named path that no longer exists is dropped from the
index, so a delete you name is handled; one you do not name is not. Without
only, every build is incremental anyway: unchanged sources are skipped by
size and modification time, and full=True forces the whole layer to be
re-read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | ||
| only | No | ||
| layer | No | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| hint | No | ||
| error | No |