Skip to content

feat: add capability-free Wasm agent tools - #104

Merged
renezander030 merged 2 commits into
masterfrom
feat/capcut-core-wasm
Aug 31, 2026
Merged

feat: add capability-free Wasm agent tools#104
renezander030 merged 2 commits into
masterfrom
feat/capcut-core-wasm

Conversation

@renezander030

Copy link
Copy Markdown
Owner

What

  • add an experimental source-only wasm/capcut-core package
  • expose inspect, diff, and deliberately scoped lint-portable functions as a WebAssembly Component
  • keep the component capability-free: JSON in/out with zero filesystem, network, environment, clock, random, stdio, or process imports
  • add parity, malformed-input, compiled-world, and raw MCP/Wassette tests
  • add a dedicated CI job that uploads the platform-neutral component, SHA-256 checksum, license, and third-party notices
  • document Codex/Wassette setup without committing a host binary, local paths, caches, or runtime state

Why this boundary

info, structural diff, and a portable lint subset are deterministic draft-data transformations. They benefit from a narrow Wasm sandbox and a long-lived MCP runtime. File discovery, media probing, store/version checks, writes, rendering, and network-backed operations remain in the Node CLI.

The lint function is named lint-portable rather than lint because it only promises six parity-tested checks: missing-material, dangling-companion-ref, cue-too-long, caption-too-fast, caption-outside-safe-area, and caption-overlap.

Verification

  • npm run wasm:verify: 7/7 contract and current-CLI parity tests passed
  • compiled component: 11,626,347 bytes; zero Component Model imports
  • Wassette 0.7.0 raw MCP test: exactly three component tools, built-in management tools disabled, all calls matched direct results, and the server recovered after malformed JSON
  • current local benchmark: 20 warm MCP calls p50 0.90 ms versus 12 fresh CLI processes p50 54.77 ms (61.06x); first Wasm call was 260.47 ms, so this is a repeated-call/session win rather than a cold-call claim
  • full repository suite: 865/865 passed
  • repository lint passed
  • root and Wasm package npm audits: zero vulnerabilities
  • staged public-diff scan: no credentials, private keys, personal filesystem paths, bundled binaries, or runtime state

Supply-chain and publication hygiene

  • ComponentizeJS 0.19.3 and Jco 1.17.9 are exact-pinned with a committed lockfile; this compatible line is clean under the current npm audit, unlike the latest toolchain dependency graph at implementation time
  • CI downloads the official Wassette 0.7.0 Linux archive and verifies GitHub's published SHA-256 digest before use
  • generated .wasm, Wassette binaries, component caches, and runtime directories stay ignored
  • generated artifacts carry the repository license, third-party notices, and a SHA-256 checksum

@renezander030
renezander030 merged commit 3c2f2b5 into master Aug 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant