SuperAPI AI Directory

xrk-config

General & other

View repository

Updated 11-05 17:20

About this skill

Authoritative docs and implementation

  • Config base class docs:docs/config-base.md
  • SystemConfig:core/system-Core/commonconfig/system.js
  • Config schemas:core/system-Core/commonconfig/*.js

Configuration path rules (core)

Authoritative constants:src/infrastructure/config/config-constants.js

Category Storage path Config name (example)
Global data/server_bots/<name>.yaml agt、device、monitor、notice、mongodb、redis
Along with port data/server_bots/{port}/<name>.yaml server、chatbot、group、aistream
Factory LLM data/server_bots/{port}/<name>.yaml openai_llm、volcengine_llm、gemini_compat_llm etc. (see FACTORY_CONFIG_PATTERNS)
  • Default templates:config/default_config/<name>.yaml(Cfg automatically copied to the target path when missing)
  • Schema sources:
    • Standalone files:core/system-Core/commonconfig/<name>.js(same name as the YAML, e.g. openai_llm.js)
    • Aggregated in system.js:agt、server、chatbot、device、group、notice、redis、mongodb、monitor、aistream etc. (no separate commonconfig file)
    • Code-side only:tools.js(no corresponding default YAML)

Change checklist (must check when making config-related changes)

  1. config/default_config/<name>.yaml: whether the default template fields are complete
  2. core/system-Core/commonconfig/<name>.js: whether schema fields correspond 1:1, with reasonable defaults/enums
  3. Whether client/factory code actually consumes these fields (avoid "schema written but unused")
  4. If system-Core's .gitignore has a whitelist: new commonconfig files must be added to the whitelist

aistream specifics

  • Runtime:data/server_bots/{port}/aistream.yaml(cfg.aistream); template:config/default_config/aistream.yaml。
  • Common sections:embedding、mcp、agentWorkspace、tools(file→ToolsStream、web.fetch→WebStream、agentBrowser→BrowserStream); desktop workflow tools are implemented in desktop.js , with no tools.desktop YAML。

Authoritative entry points

  • Project overview:PROJECT_OVERVIEW.md
  • Code entry points:src/ and core/ corresponding subdirectories
  • Related docs:docs/ corresponding topic docs under

Applicable scenarios

  • Need to locate the implementation path and configuration entry points of this subsystem.
  • Need to quickly provide change locations and compatibility notes.

Non-applicable scenarios

  • Not used to replace implementation descriptions of other subsystems.
  • Do not fabricate paths or fields when evidence is lacking.

Execution steps

  1. First confirm the requirement falls within this skill's responsibility boundary.
  2. Then provide code paths, configuration paths, and key fields.
  3. Finally add risk points, verification steps, and regression scope.

Common pitfalls

  • Giving only concepts without specific file paths.
  • Not noting that code prevails when docs and code conflict.
  • Ignoring consistency among configuration, Schema, and consuming code.