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
@@ -11,17 +11,17 @@ This document describes the WASM-sandbox foundation shipped under Phase 06 Task
|
||||
|
||||
What the foundation ships:
|
||||
|
||||
- **`@toolctrl/plugin-runtime`** — host-side runtime:
|
||||
- **`@hivegrid/plugin-runtime`** — host-side runtime:
|
||||
- Manifest schema (Zod) with closed-enum capabilities + reverse-DNS plugin IDs + SemVer versions + hex-encoded Ed25519 signature fields.
|
||||
- Ed25519 signature verifier against the operator-controlled trusted-keys allowlist (`PLUGIN_TRUSTED_PUBLIC_KEYS` CSV).
|
||||
- WebAssembly sandbox wrapper (`createPluginSandbox`) with deterministic memory cap + host-fn fuel budget, invoked through a killable worker-thread boundary with a wall-clock budget.
|
||||
- Capability gateway (`createCapabilityGateway`) that wraps host-fn maps and rejects undeclared capability calls.
|
||||
- **`@toolctrl/plugin-sdk`** — TS types plugin authors build against (`HookHandler`, `HostApi`, `PluginContext`, `defineHook`) and a `hello-world` example.
|
||||
- **`@hivegrid/plugin-sdk`** — TS types plugin authors build against (`HookHandler`, `HostApi`, `PluginContext`, `defineHook`) and a `hello-world` example.
|
||||
- **`Plugin` Prisma model + migration** — one row per installed plugin per tenant.
|
||||
- **`plugin` worker queue group** with the `toolctrl.plugin-invoke` BullMQ queue.
|
||||
- **`plugin` worker queue group** with the `hivegrid.plugin-invoke` BullMQ queue.
|
||||
- **`handlePluginInvokeJob`** worker handler (`apps/worker/src/jobs/plugin-invoke.ts`) that wires Plugin lookup → binary load → signature verify → rate-limit → sandbox invoke → audit.
|
||||
|
||||
What is **deferred** (tracked in `docs/improvement-plan/06-plugin-system/wasm-sandbox.md` under `## Deviations from Plan` once that file is updated by the executing agent):
|
||||
What is **deferred** (tracked in Plugin Lifecycle Operations and follow-up tickets):
|
||||
|
||||
- Hot-reload — operators restart the `worker-plugin` pod to pick up new binaries.
|
||||
- Marketplace integration — backlog (#24).
|
||||
@@ -53,7 +53,7 @@ A plugin ships a `plugin.toml` (or `plugin.json`) alongside the `.wasm` binary.
|
||||
```ts
|
||||
{
|
||||
schemaVersion: 1,
|
||||
id: "de.toolctrl.hello", // reverse-DNS, lowercase
|
||||
id: "de.hivegrid.hello", // reverse-DNS, lowercase
|
||||
version: "1.0.0", // SemVer
|
||||
name: "Hello",
|
||||
entry: "plugin.wasm",
|
||||
@@ -83,7 +83,7 @@ The schema is `strict()` — unknown top-level fields are rejected. Unknown capa
|
||||
|
||||
## Capability gating
|
||||
|
||||
The capability gateway wraps a host-fn record so that calls to capabilities the plugin did not declare in its manifest, or that the tenant did not approve for this invocation, throw `CapabilityDeniedError`. The default fuel cost is 100 units per host-fn call; configurable per gateway. Deny paths (`not_declared_in_manifest`, `not_granted_for_tenant`, `no_host_implementation`) fire the `onDenied` callback so the worker can audit them. The plugin worker currently exposes safe synchronous `env.toolctrl_log(i32)` and `env.toolctrl_audit_record(i32)` imports through `invokeSync(...)`; higher-risk host functions remain absent and fail closed.
|
||||
The capability gateway wraps a host-fn record so that calls to capabilities the plugin did not declare in its manifest, or that the tenant did not approve for this invocation, throw `CapabilityDeniedError`. The default fuel cost is 100 units per host-fn call; configurable per gateway. Deny paths (`not_declared_in_manifest`, `not_granted_for_tenant`, `no_host_implementation`) fire the `onDenied` callback so the worker can audit them. The plugin worker currently exposes safe synchronous `env.hivegrid_log(i32)` and `env.hivegrid_audit_record(i32)` imports through `invokeSync(...)`; higher-risk host functions remain absent and fail closed.
|
||||
|
||||
## Rate limit
|
||||
|
||||
@@ -97,7 +97,7 @@ Capability-use telemetry is batched through `PluginCapabilityUseRecorder`. The p
|
||||
|
||||
## Deferred env vars
|
||||
|
||||
The full env-var matrix in `docs/improvement-plan/06-plugin-system/wasm-sandbox.md` is broader than the current worker bootstrap. The foundation currently wires:
|
||||
The historical foundation spec was broader than the current worker bootstrap. The foundation currently wires:
|
||||
|
||||
| Env var | Default | Used by |
|
||||
|---|---|---|
|
||||
|
||||
Reference in new issue
Block a user