























@@ -396,7 +396,7 @@ read without importing the plugin runtime.
396396```json
397397{
398398"contracts": {
399-"embeddedExtensionFactories": ["pi"],
399+"agentToolResultMiddleware": ["pi", "codex-app-server"],
400400"externalAuthProviders": ["acme-ai"],
401401"speechProviders": ["openai"],
402402"realtimeTranscriptionProviders": ["openai"],
@@ -414,20 +414,26 @@ read without importing the plugin runtime.
414414415415Each list is optional:
416416417-| Field | Type | What it means |
418-| -------------------------------- | ---------- | ----------------------------------------------------------------- |
419-| `embeddedExtensionFactories` | `string[]` | Embedded runtime ids a bundled plugin may register factories for. |
420-| `externalAuthProviders` | `string[]` | Provider ids whose external auth profile hook this plugin owns. |
421-| `speechProviders` | `string[]` | Speech provider ids this plugin owns. |
422-| `realtimeTranscriptionProviders` | `string[]` | Realtime-transcription provider ids this plugin owns. |
423-| `realtimeVoiceProviders` | `string[]` | Realtime-voice provider ids this plugin owns. |
424-| `memoryEmbeddingProviders` | `string[]` | Memory embedding provider ids this plugin owns. |
425-| `mediaUnderstandingProviders` | `string[]` | Media-understanding provider ids this plugin owns. |
426-| `imageGenerationProviders` | `string[]` | Image-generation provider ids this plugin owns. |
427-| `videoGenerationProviders` | `string[]` | Video-generation provider ids this plugin owns. |
428-| `webFetchProviders` | `string[]` | Web-fetch provider ids this plugin owns. |
429-| `webSearchProviders` | `string[]` | Web-search provider ids this plugin owns. |
430-| `tools` | `string[]` | Agent tool names this plugin owns for bundled contract checks. |
417+| Field | Type | What it means |
418+| -------------------------------- | ---------- | ---------------------------------------------------------------- |
419+| `embeddedExtensionFactories` | `string[]` | Deprecated embedded extension factory ids. |
420+| `agentToolResultMiddleware` | `string[]` | Harness ids this plugin may register tool-result middleware for. |
421+| `externalAuthProviders` | `string[]` | Provider ids whose external auth profile hook this plugin owns. |
422+| `speechProviders` | `string[]` | Speech provider ids this plugin owns. |
423+| `realtimeTranscriptionProviders` | `string[]` | Realtime-transcription provider ids this plugin owns. |
424+| `realtimeVoiceProviders` | `string[]` | Realtime-voice provider ids this plugin owns. |
425+| `memoryEmbeddingProviders` | `string[]` | Memory embedding provider ids this plugin owns. |
426+| `mediaUnderstandingProviders` | `string[]` | Media-understanding provider ids this plugin owns. |
427+| `imageGenerationProviders` | `string[]` | Image-generation provider ids this plugin owns. |
428+| `videoGenerationProviders` | `string[]` | Video-generation provider ids this plugin owns. |
429+| `webFetchProviders` | `string[]` | Web-fetch provider ids this plugin owns. |
430+| `webSearchProviders` | `string[]` | Web-search provider ids this plugin owns. |
431+| `tools` | `string[]` | Agent tool names this plugin owns for bundled contract checks. |
432+433+`contracts.embeddedExtensionFactories` is retained for bundled compatibility
434+code that still needs direct Pi embedded-runner events. New tool-result
435+transforms should declare `contracts.agentToolResultMiddleware` and register
436+with `api.registerAgentToolResultMiddleware(...)` instead.
431437432438Provider plugins that implement `resolveExternalAuthProfiles` should declare
433439`contracts.externalAuthProviders`. Plugins without the declaration still run
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。