SuperAPI AI 工具集

cargo-context

通用与其它

查看项目

更新于 10-15 21:51

技能介绍

用途:cargo-context 是 Cargo CLI 的 context 域,读写工作区的 GTM 知识库。该知识库是以 git 为后端的类型化 markdown/MDX 仓库,捕获公司叙事、ICP、人物角色、剧本、证明点、异议等,供人与智能体共同读写。

主要能力:分两个子域。runtime 子域用于浏览、读取、写入、编辑并对运行时沙箱(context 仓库的检出副本)执行命令;graph 子域用于构建/加载由仓库中每个 markdown/MDX 文件派生的知识图谱。

用法:先确认已登录与目标工作区。安装与登录命令保持原样:npm install -g @cargo-ai/cli;cargo-ai login --email you@company.com;cargo-ai whoami。发现阶段可用 cargo-ai context runtime browse 与 cargo-ai context graph get。常用命令:cargo-ai context runtime read --path <path>;cargo-ai context runtime write --path <path> --content <content>;cargo-ai context runtime edit --path <path> --old-string <old> --new-string <new>;cargo-ai context runtime execute --command <command>。所有命令以 JSON 输出到 stdout,失败时非零退出。

重要限制:write 与 edit 会推送到 context 仓库默认分支,无 dry-run,写前须用 whoami 确认 workspace.name;execute 不推送,改动留在沙箱被丢弃。上传内容文件在 .files/ 下只读,沙箱自动提交跳过它。edit 的 --old-string 须在文件中恰好出现一次,空 --new-string 表示删除。frontmatter 不做校验,但缺失会影响图谱索引。注意:写前应确认目标工作区,若名称含糊应让用户提供公司名与规范域名再写。跨文件引用需用三种可建边形式之一,裸路径散文引用不会建边。具体模板、响应结构、排错与示例见对应 references 文件;其余细节资料未提供。