package-installer
暂无简介
- License 许可
- MIT
- 所属仓库
- bonc-ai/cogseed
- 最近更新
- 2026-11-13
- Stars
- ★ 19
- Forks
- 10
02 资源文件 1
- 参考文档_meta.json64 B
03 SKILL.md 正文
Package Installer
Install third-party open-source projects (a GitHub URL or a local git directory the user provides) as external packages. The project is cloned verbatim into the per-user packages directory — never edit, normalize, or reorganize its files.
Run the CogSeed CLI command below through the command execution tool; CogSeed handles this runner form directly on Windows:
"$COGSEED_NODE" "$COGSEED_PC_DIR/bin/cogseed-pkg.cjs" <command> [args]
Commands: install <git-url> [--name <name>] [--consent-deps],
consent-deps <name>, update <name>, remove <name>, list,
info <name>.
Every command prints a JSON result; non-zero exit prints {ok:false,error}.
Install flow
- Run
install <git-url>. Use--name <name>when the user, marketplace prompt, or install request explicitly gives a package name, or when the repo basename is not a valid package name (the error message will say so). Never pass--consent-depson the first attempt — dependency installs need the user's explicit approval first. - Read the JSON result:
deps_pending_consentnon-empty → the package is installed but its dependencies are not. Show the user the exact commands listed there and ask for approval; after they agree, runconsent-deps <name>. If they decline, leave it as is — skills that need no deps still work.errormentioning "not installable" → tell the user the project has neither skills (SKILL.md) nor CLI entry points and is not supported (agent-driven-only projects cannot be installed).
- Report what was installed, from the result fields:
skill_rootsnon-empty → its skills become available in new turns.shimsnon-empty → those commands are directly callable from the host shell/PATH in the next turn (e.g.hyperframes --help). On Windows the installer creates.cmdshims for CLI entries.
Author a usage skill for CLI-only installs
When the install result is kind: "cli" (empty skill_roots, non-empty
bin_entries), author a companion usage skill so future turns get curated
instructions instead of a bare command list. Do this automatically right after
a successful CLI install — the user already approved installing it. Skip for
kind: "skill" and kind: "both" (they already ship their own SKILL.md).
-
Probe usage: run the package's main binary with
--help(and one level of subcommand help if cheap). Cap output; if--helpblocks or is empty, keep the skill minimal and point the reader at<bin> --help. -
Write the skill via stdin (the file lands outside the package tree):
"$COGSEED_NODE" "$COGSEED_PC_DIR/bin/cogseed-pkg.cjs" skill-write <name> <<'SKILL' --- name: <human name> description: <one line: what it does + when to use it> --- # <name> When to use, the common commands (from --help, with real examples), and any gotchas (e.g. a one-time setup command). End with an "External dependencies" line naming the package's binaries. SKILLFrontmatter is ONLY
name+description; everything else is body prose. -
Re-running
skill-write <name>overwrites the companion (use it to fix or refresh after anupdate).
Updates and removal
update <name>pulls the latest version. Dependency installs re-run automatically only if the user already consented during install.remove <name>deletes the package and its shims.listshows installed packages with kind, enabled state, and commit.
Rules
- Ask before installing anything the user did not explicitly request.
- Do not start OAuth/login flows that require the user to paste a verification
code back into chat later (for example
gcloud auth login --no-launch-browser). Chat messages are not stdin for background processes. Useinteractive_cli_startfor commands that genuinely need live user input, use an auth flow with a browser callback that completes on its own, or stop and tell the user the one-time terminal/app authorization step. - Never run
npm install/pip installyourself inside a package — the CLI owns dependency installs and the consent record. - Do not modify files under the packages directory; treat it as read-only.
- Public GitHub repos install without git (the CLI downloads a tarball when git is absent). Git is only needed for private repos and non-GitHub git URLs; if the CLI reports git is required for such a source, relay that to the user.
04 同仓库更多 Skills
sample-supply-chain
供应链样本:安装钩子 + 拼写伪装 + 源覆盖。
sample-prose-only
纯散文安全守则样本:禁止某行为的说明不等于该行为。
sample-obfuscated
混淆载荷样本:解码与执行共现。
sample-hidden-content
隐藏内容载荷样本:用于回归「不可见字符不做上下文降权」这一不变量。
sample-evasion
反规避样本:危险内容只以「不可见字符切断」与「编码后」两种形式出现。
sample-agentic
代理运行时风险样本:配置篡改 + 隐蔽指令。