Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Plugin SDK Reference
|
||||
|
||||
> `@toolctrl/plugin-sdk` — the typed surface plugin authors compile
|
||||
> `@hivegrid/plugin-sdk` — the typed surface plugin authors compile
|
||||
> against. Mirrors the runtime capability set so an SDK upgrade is a
|
||||
> straight version bump on the author side.
|
||||
|
||||
@@ -10,7 +10,7 @@ The SDK lives in the host monorepo today as `workspace:*`. External
|
||||
plugin authors install it as a regular npm dependency:
|
||||
|
||||
```bash
|
||||
pnpm add -D @toolctrl/plugin-sdk
|
||||
pnpm add -D @hivegrid/plugin-sdk
|
||||
```
|
||||
|
||||
## Top-level exports
|
||||
@@ -40,7 +40,7 @@ pnpm add -D @toolctrl/plugin-sdk
|
||||
## Authoring shape
|
||||
|
||||
```ts
|
||||
import { defineHook, type HookHandler } from "@toolctrl/plugin-sdk";
|
||||
import { defineHook, type HookHandler } from "@hivegrid/plugin-sdk";
|
||||
|
||||
export const handleHello: HookHandler<{ name: string }, { greeting: string }> = defineHook((input, ctx) => {
|
||||
ctx.log.info({ name: input.name }, "hello");
|
||||
@@ -59,8 +59,8 @@ JSON through two raw WebAssembly imports:
|
||||
|
||||
| Import | Signature | Purpose |
|
||||
| --------------------------- | --------------------- | ------------------------------------------------- |
|
||||
| `env.toolctrl_payload_len` | `() -> i32` | Length in bytes of the JSON payload |
|
||||
| `env.toolctrl_payload_byte` | `(index: i32) -> i32` | Byte value at `index`, or `0` outside the payload |
|
||||
| `env.hivegrid_payload_len` | `() -> i32` | Length in bytes of the JSON payload |
|
||||
| `env.hivegrid_payload_byte` | `(index: i32) -> i32` | Byte value at `index`, or `0` outside the payload |
|
||||
|
||||
The SDK exports `PLUGIN_PAYLOAD_ABI_VERSION` and
|
||||
`PLUGIN_PAYLOAD_ABI_IMPORTS` so toolchain bindings can assert the host
|
||||
@@ -81,7 +81,7 @@ only when the message came from `window.parent` and matches the expected
|
||||
protocol version, plugin id, channel id, and request id:
|
||||
|
||||
```ts
|
||||
import { createPluginSettingsClient, PluginSettingsClientError, PluginSettingsClientTimeoutError } from "@toolctrl/plugin-sdk";
|
||||
import { createPluginSettingsClient, PluginSettingsClientError, PluginSettingsClientTimeoutError } from "@hivegrid/plugin-sdk";
|
||||
|
||||
const settings = createPluginSettingsClient({
|
||||
pluginId: "com.acme.settings",
|
||||
|
||||
Reference in new issue
Block a user