Skip to content

fix(asset-canister): fix skill errors, add npm versions and evals#102

Open
marc0olo wants to merge 2 commits intomainfrom
fix/asset-canister-skill-improvements
Open

fix(asset-canister): fix skill errors, add npm versions and evals#102
marc0olo wants to merge 2 commits intomainfrom
fix/asset-canister-skill-improvements

Conversation

@marc0olo
Copy link
Member

@marc0olo marc0olo commented Mar 21, 2026

Summary

Fixes factual errors in the asset-canister skill, wraps top-level await in code examples, adds npm versions, and creates the first evaluation suite.

Mentions #97, #95, #96, #100.

Changes

Skill (asset-canister/SKILL.md):

  • Wrap all await in async function manageAssets() (no top-level await)
  • Fix import for fs — was mid-block (invalid ES module syntax), moved to top
  • Add npm versions to prerequisites (@icp-sdk/canisters >= 3.5.0, @icp-sdk/core >= 5.0.0)
  • Replace all source references with dir (dfx terminology → icp-cli)
  • Fix pitfall #1: sourceconfiguration.dir
  • Fix pitfall #3: clarify configuration.build is optional, dir must have content
  • Add pitfall #7: asset canister Wasm version must be >= 0.30.2 for ic_env cookie support
  • Add note in programmatic uploads: shouldFetchRootKey is for Node.js scripts only, browser frontends should use rootKey from ic_env cookie
  • Fix custom domain registration: replace "registration is automatic" with the actual validate + POST flow (https://icp0.io/custom-domains/v1/<domain>/validate and POST .../v1/<domain>)
  • Remove unrelated Motoko backend canister from icp.yaml example

Evaluations (evaluations/asset-canister.json): New file with 4 output evals + 12 trigger evals

  • Programmatic asset upload (Node.js context)
  • SPA routing configuration (.ic-assets.json5)
  • Asset canister recipe setup (icp.yaml)
  • Security: shouldFetchRootKey in Node.js scripts

@marc0olo marc0olo requested review from a team and JoshDFN as code owners March 21, 2026 01:40
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