Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ only that fixed reviewed script name (never a command supplied by package metada
then immediately applies the same path, symlink, executable-mode, size, and digest
admission checks used by packing.

A reviewed Bun companion may publish a bundle beginning exactly with
`#!/usr/bin/env convax-bun`. Compatible Convax hosts run that verified script through
their app-owned shared Bun runtime, avoiding one embedded Bun runtime per companion.
The script remains an immutable executable Release asset and follows the same target,
mode, size and SHA-256 checks as a native companion. Native companions remain valid.

## Plugin-owned Skill composition

A `convax.plugin/4` manifest may declare `contributes.skills` entries such as
Expand Down
5 changes: 5 additions & 0 deletions docs/registry-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ is not arbitrary: it must exactly equal the package's immutable Release tag plus
Windows). Clients select only their exact target, then verify byte count and SHA-256
before admitting the executable to host-owned storage. An absent target is an
unsupported platform, never permission to search `PATH` or download another URL.
An admitted asset beginning exactly with `#!/usr/bin/env convax-bun` is a bundled
Bun program for a compatible host's app-owned shared runtime; every other asset is
executed natively. This byte-level convention adds no Registry v1 field, so older
clients still parse the catalog and fail closed at execution if the host runner is
unavailable.

`opencode.skill/1` is the retained Registry v1 compatibility label used by current
Convax clients; it is not the bundle format. Published Skill ZIPs follow the open
Expand Down
5 changes: 3 additions & 2 deletions packages/tools/xiaoyunque-mcp/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ the Plugin ZIP and must never be imported by Convax packages.
only for a canonical terminal state, unrecoverable repeated observation failure,
authentication failure, or caller cancellation, without resubmitting the task.
- Generated binaries and local credentials are ignored build/runtime output.
- The protected release build writes the `darwin/arm64` binary below
- The protected release build writes the `darwin/arm64` `convax-bun` program below
`dist/darwin-arm64/`; repository tooling hashes and publishes it as an independent
companion asset. It must never be copied below the Plugin's `package/` directory.
companion asset. It reuses Convax's app-owned Bun runtime and must never be copied
below the Plugin's `package/` directory or compiled with a private Bun runtime.

Run `bun typecheck`, `bun test`, `bun run build`, and
`bun run build:release:darwin-arm64` before handoff.
4 changes: 3 additions & 1 deletion packages/tools/xiaoyunque-mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ bun run build
bun run build:release:darwin-arm64
```

正式发布产物为 `dist/darwin-arm64/convax-xiaoyunque-mcp`。它作为独立的
正式发布产物为 `dist/darwin-arm64/convax-xiaoyunque-mcp`。它是带有精确
`#!/usr/bin/env convax-bun` 标头的小型 Bun 程序,通过兼容版本 Convax 已随应用
发布的共享 Bun runtime 运行,不再为这个插件重复打包一份 Bun。它作为独立的
`convax-companion-*` Release asset 发布,由 Registry 固定 URL、字节数和
SHA-256;Convax 安装插件时把它放入宿主管理目录。可执行文件不进入静态 Plugin
ZIP,也不要求用户配置 `PATH`。
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/xiaoyunque-mcp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"build": "bun build --compile --minify --outfile dist/convax-xiaoyunque-mcp src/index.ts",
"build:release:darwin-arm64": "bun build --compile --minify --target=bun-darwin-arm64 --outfile dist/darwin-arm64/convax-xiaoyunque-mcp src/index.ts",
"build:release:darwin-arm64": "bun build --minify --target=bun --outfile dist/darwin-arm64/convax-xiaoyunque-mcp src/index.ts",
"clean": "rm -rf dist",
"smoke:live:video": "bun scripts/live-video-smoke.ts",
"test": "bun test",
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/xiaoyunque-mcp/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bun
#!/usr/bin/env convax-bun

import path from "node:path"
import { XiaoYunqueAuthorizationState } from "./authorization-state.ts"
Expand Down