refactor: route plugin test helpers through sdk

This commit is contained in:
Peter Steinberger
2026-04-27 23:12:15 +01:00
parent 7975305a89
commit bf4306d1b0
15 changed files with 54 additions and 18 deletions

View File

@@ -258,7 +258,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview)
| `plugin-sdk/webhook-path` | Webhook path normalization helpers |
| `plugin-sdk/web-media` | Shared remote/local media loading helpers |
| `plugin-sdk/zod` | Re-exported `zod` for plugin SDK consumers |
| `plugin-sdk/testing` | Public extension test helpers including plugin registry/runtime mocks, schema/media/live-test helpers, `installCommonResolveTargetErrorCases`, `writeSkill`, `createTestRegistry`, and live generation env loading. Extension `*.test-support.ts` helpers stay on this or focused SDK subpaths, not core internals |
| `plugin-sdk/testing` | Public extension test helpers including plugin registry/runtime mocks, fetch/env/temp fixtures, schema/media/live-test helpers, `installCommonResolveTargetErrorCases`, `writeSkill`, `createTestRegistry`, and live generation env loading. Extension `*.test-support.ts` helpers stay on this or focused SDK subpaths, not core internals |
</Accordion>
<Accordion title="Memory subpaths">

View File

@@ -38,6 +38,17 @@ import {
| `installCommonResolveTargetErrorCases` | Shared test cases for target resolution error handling |
| `shouldAckReaction` | Check whether a channel should add an ack reaction |
| `removeAckReactionAfterReply` | Remove ack reaction after reply delivery |
| `createTestRegistry` | Build a channel plugin registry fixture |
| `createEmptyPluginRegistry` | Build an empty plugin registry fixture |
| `setActivePluginRegistry` | Install a registry fixture for plugin runtime tests |
| `createRequestCaptureJsonFetch` | Capture JSON fetch requests in media helper tests |
| `withFetchPreconnect` | Run fetch tests with preconnect hooks installed |
| `withEnv` / `withEnvAsync` | Temporarily patch environment variables |
| `createTempHomeEnv` / `withTempDir` | Create isolated filesystem test fixtures |
| `createMockServerResponse` | Create a minimal HTTP server response mock |
| `registerSingleProviderPlugin` | Register one provider plugin in loader smoke tests |
| `createRuntimeTaskFlow` | Create isolated runtime task-flow state |
| `typedCases` | Preserve literal types for table-driven tests |
### Types