用途:在项目中安装并配置 Agentic Marketing Suite(AMS)模块,适用于用户要求“安装 ams 模块”“配置 Agentic Marketing Suite”或首次设置时。模块身份(名称、代码、版本)来自 ./assets/module.yaml。
主要能力:收集用户偏好并写入三处文件——{project-root}/.pawbytes/config/config.yaml(共享生态配置,含核心设置与各模块分区)、{project-root}/.pawbytes/config/config.user.yaml(个人设置,如 user_name、communication_language 及标记 user_setting: true 的变量,建议 gitignore)、{project-root}/.pawbytes/config/module-help.csv(注册模块能力供帮助系统使用)。两个配置脚本采用 anti-zombie 模式,写入前先移除本模块旧条目,避免残留过期值。{project-root} 是配置值中的字面 token,不可替换为实际路径。
使用方式:激活时读取 module.yaml,检查 config.yaml 是否已存在本模块分区以判断是更新还是新装;检测并自动迁移旧路径(marketing-suites/config/、brands/、reports/ 等)。随后一次性收集配置:核心配置仅在尚无核心键时询问,user_name 与 communication_language 只写入 config.user.yaml;模块配置按 module.yaml 中带 prompt 字段的变量询问。默认值优先级为:现有新配置值 > 迁移的旧值 > module.yaml 默认值。用户可提供参数(如接受全部默认、--headless 或内联值)跳过交互,但仍显示确认摘要。收集后写入临时 JSON,运行: python3 ./scripts/merge-config.py --config-path "{project-root}/.pawbytes/config/config.yaml" --user-config-path "{project-root}/.pawbytes/config/config.user.yaml" --module-yaml ./assets/module.yaml --answers {temp-file} python3 ./scripts/merge-help-csv.py --target "{project-root}/.pawbytes/config/module-help.csv" --source ./assets/module-help.csv --module-code mkt 脚本以 JSON 输出结果,非零退出则报错停止。之后创建配置的输出目录(brands、reports),磁盘路径解析 token,但配置文件内仍保留字面 token。最后依据脚本输出确认写入内容并显示 module_greeting。
适用场景:项目首次接入 AMS 或更新其配置。限制:资料未提供收费、价格、平台支持范围及具体营销功能效果等信息。