Skip to content

feat(sdk): add capabilities::enumerate for sys enumerate-capabilities#55

Merged
joshuajbouw merged 1 commit into
feat/process-persistent-sdkfrom
feat/sys-enumerate-sdk
Jun 7, 2026
Merged

feat(sdk): add capabilities::enumerate for sys enumerate-capabilities#55
joshuajbouw merged 1 commit into
feat/process-persistent-sdkfrom
feat/sys-enumerate-sdk

Conversation

@joshuajbouw

Copy link
Copy Markdown
Contributor

What

Adds capabilities::enumerate() to astrid-sdk — the ergonomic wrapper for astrid:sys/host.enumerate-capabilities (astrid-runtime/wit#13, merged), implemented kernel-side in unicity-astrid/astrid (feat(sys): implement enumerate-capabilities + complete check-capsule-capability).

It is the infallible list dual of capabilities::check: returns the calling capsule's own held capability names — the categories declared in its [capabilities] manifest block (host_process, net_connect, fs_read, …), not the scoped arguments within them. Argument-free, returns Vec<String> with no error path (an empty list is the valid "no capabilities" answer), so a reusable capsule can ground its behaviour in what it can actually do instead of hard-coding it.

The contracts submodule is bumped to the merged 9742f80 so astrid-sys regenerates the binding; astrid-sys/wit-staging restaged.

Stacking

Stacked on feat/process-persistent-sdk (#53) — base is that branch, so the diff shows only the enumerate delta. Rebase onto main and retarget once #53 lands.

Verify

cargo build --workspace and cargo clippy --workspace --all-targets green.

Wraps astrid:sys/host.enumerate-capabilities (astrid-runtime/wit#13) as the
infallible list dual of capabilities::check: returns the calling capsule's own
held capability names — the categories declared in its [capabilities] manifest
block (host_process, net_connect, fs_read, …), not the scoped arguments within
them. Argument-free, returns Vec<String> with no error path (an empty list is
the valid no-capabilities answer). Contracts submodule bumped to pick up the
new sys function.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces capability introspection by adding the capabilities::enumerate function (and the underlying enumerate-capabilities WIT function) to list the calling capsule's own held capability names. The feedback identifies an issue with the intra-doc links [check] and [enumerate] in the capabilities module documentation, which will fail to resolve and should be fully qualified as [capabilities::check] and [capabilities::enumerate].

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread astrid-sdk/src/lib.rs
@joshuajbouw joshuajbouw merged commit 17c50d3 into feat/process-persistent-sdk Jun 7, 2026
@joshuajbouw joshuajbouw deleted the feat/sys-enumerate-sdk branch June 7, 2026 00:48
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