From 252bddd519687f0fc8b2f23e24943573c06132b1 Mon Sep 17 00:00:00 2001 From: "Joshua J. Bouw" Date: Sat, 6 Jun 2026 06:00:00 +0400 Subject: [PATCH] docs(sdk): use [subscribe]/[publish] tables, not the removed [[interceptor]]/ipc_* forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit astrid#863 makes the [publish]/[subscribe] tables the only IPC-intent surface (removes [[interceptor]] and the capabilities.ipc_* arrays). Update the interceptors doc comment + README manifest snippet, and migrate the examples/test-capsule manifest (which used both legacy forms and would have broken under the new kernel + taught the wrong pattern). SDK code is unaffected — it never parsed the manifest. --- README.md | 4 +++- contracts | 2 +- examples/test-capsule/Capsule.toml | 12 ++++++++---- packages/astrid-sdk/src/interceptors.ts | 2 +- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a0c9f92..913860d 100644 --- a/README.md +++ b/README.md @@ -38,8 +38,10 @@ file = "my-capsule.wasm" type = "executable" [capabilities] -ipc_publish = ["tool.v1.execute.*"] kv = ["*"] + +[publish] +"tool.v1.execute.*" = { wit = "opaque" } ``` `src/index.ts`: diff --git a/contracts b/contracts index 467240d..d8f4f31 160000 --- a/contracts +++ b/contracts @@ -1 +1 @@ -Subproject commit 467240deeba2cf7ff28ba32d12b5a88485be5b3d +Subproject commit d8f4f31db267873913a0fef094a224ace2a080a6 diff --git a/examples/test-capsule/Capsule.toml b/examples/test-capsule/Capsule.toml index 7002dcd..4480bc2 100644 --- a/examples/test-capsule/Capsule.toml +++ b/examples/test-capsule/Capsule.toml @@ -11,9 +11,13 @@ file = "test-capsule.wasm" type = "executable" [capabilities] -ipc_publish = ["tool.v1.execute.*", "test.v1.event.*"] kv = ["*"] -[[interceptor]] -event = "test.v1.event" -action = "test.v1.event" +[publish] +"tool.v1.execute.*" = { wit = "opaque" } +"test.v1.event.*" = { wit = "opaque" } + +# Interceptor binding: a [subscribe] entry's `handler` binds the topic to the +# guest handler (the key also grants the subscribe ACL). +[subscribe] +"test.v1.event" = { wit = "opaque", handler = "test.v1.event" } diff --git a/packages/astrid-sdk/src/interceptors.ts b/packages/astrid-sdk/src/interceptors.ts index 1850ee1..bbb1395 100644 --- a/packages/astrid-sdk/src/interceptors.ts +++ b/packages/astrid-sdk/src/interceptors.ts @@ -18,7 +18,7 @@ export type { InterceptorBinding } from "./ipc.js"; /** * Query the runtime for auto-subscribed interceptor handles. Returns an * empty array if this capsule has no auto-subscribed interceptors (i.e. it - * does not have both `@run` and `[[interceptor]]`). + * does not have both `@run` and a `[subscribe]` entry with a `handler`). */ export function bindings(): InterceptorBinding[] { return runtimeInterceptors();