Skip to content

feat: Implement cross-canister plugin calls - #721

Draft
adamspofford-dfinity wants to merge 3 commits into
spofford/plugin-canister-mappingsfrom
spofford/plugin-canister-access
Draft

feat: Implement cross-canister plugin calls#721
adamspofford-dfinity wants to merge 3 commits into
spofford/plugin-canister-mappingsfrom
spofford/plugin-canister-access

Conversation

@adamspofford-dfinity

Copy link
Copy Markdown
Contributor

Allows plugins to call canisters other than the one they are assigned to. Canisters must be listed in a canisters list and, if in another project, that project must be a dependency.


Stack created with GitHub Stacks CLIGive Feedback 💬

Copilot AI balanced review requested due to automatic review settings August 20, 2026 16:38
@adamspofford-dfinity
adamspofford-dfinity force-pushed the spofford/plugin-canister-access branch from d7002ba to dc17985 Compare August 20, 2026 16:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds permission-controlled cross-canister calls for sync plugins while retaining host-canister targeting.

Changes:

  • Adds manifest configuration for allowed canisters.
  • Extends the plugin ABI with explicit call targets and runtime enforcement.
  • Updates documentation, schemas, examples, and tests.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
examples/icp-sync-plugin/plugin/src/lib.rs Targets the host canister explicitly.
docs/schemas/icp-yaml-schema.json Adds the canisters schema field.
docs/schemas/canister-yaml-schema.json Adds the canisters schema field.
docs/reference/configuration.md Documents callable-canister configuration.
docs/guides/writing-sync-plugins.md Explains target selection for authors.
docs/concepts/sync-plugins.md Describes cross-canister permissions and routing.
crates/icp/src/manifest/canister.rs Updates manifest test expectations.
crates/icp/src/manifest/adapter/plugin.rs Parses named and principal canister references.
crates/icp/src/canister/sync/plugin.rs Resolves declared callable canisters.
crates/icp-sync-plugin/sync-plugin.wit Adds the call-target ABI field.
crates/icp-sync-plugin/src/runtime.rs Enforces targets and routes calls accordingly.
crates/icp-sync-plugin/src/lib.rs Exports callable-canister configuration.
crates/icp-sync-plugin/DESIGN.md Updates plugin architecture documentation.
crates/icp-cli/src/operations/bundle.rs Updates bundled plugin adapter construction.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread crates/icp-sync-plugin/sync-plugin.wit
Comment thread crates/icp-cli/src/operations/bundle.rs Outdated
@adamspofford-dfinity
adamspofford-dfinity force-pushed the spofford/plugin-canister-access branch from dc17985 to 8a5273b Compare August 20, 2026 17:15
With cross-canister targeting present, the `canister-ids` table's field doc and
the DESIGN rationale should describe the real permission model: the table is
informational, and calling a listed canister requires declaring it as a
dependency (`call-target`). The mappings-branch wording ("canister-call always
targets the canister being synced") was correct only before this interface
added targeting.
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.

2 participants