@vetta-org/plugin-sdk 0.3.5 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/images.d.ts CHANGED
@@ -7,6 +7,8 @@ export interface PluginImageRef {
7
7
  id: string;
8
8
  url: string;
9
9
  mimeType?: string;
10
+ /** Provider used for this generation; optional for images created before provenance was recorded. */
11
+ providerId?: string;
10
12
  /**
11
13
  * The edit-lineage root id this image belongs to (base image + all its edits
12
14
  * share one rootId). Lets the host dedup per-message previews — only the
@@ -1 +1 @@
1
- {"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../src/images.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB","sourcesContent":["/**\n * A reference to an image produced out-of-band by the host (e.g. an image\n * tool's result). The bytes are NOT carried inline — `url` is a host media\n * URL (Range-capable, usable directly as an `<img src>`).\n */\nexport interface PluginImageRef {\n\tid: string;\n\turl: string;\n\tmimeType?: string;\n\t/**\n\t * The edit-lineage root id this image belongs to (base image + all its edits\n\t * share one rootId). Lets the host dedup per-message previews — only the\n\t * latest message producing a given rootId renders the version swiper.\n\t */\n\trootId?: string;\n}\n"]}
1
+ {"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../src/images.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qGAAqG;IACrG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB","sourcesContent":["/**\n * A reference to an image produced out-of-band by the host (e.g. an image\n * tool's result). The bytes are NOT carried inline — `url` is a host media\n * URL (Range-capable, usable directly as an `<img src>`).\n */\nexport interface PluginImageRef {\n\tid: string;\n\turl: string;\n\tmimeType?: string;\n\t/** Provider used for this generation; optional for images created before provenance was recorded. */\n\tproviderId?: string;\n\t/**\n\t * The edit-lineage root id this image belongs to (base image + all its edits\n\t * share one rootId). Lets the host dedup per-message previews — only the\n\t * latest message producing a given rootId renders the version swiper.\n\t */\n\trootId?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"images.js","sourceRoot":"","sources":["../src/images.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A reference to an image produced out-of-band by the host (e.g. an image\n * tool's result). The bytes are NOT carried inline — `url` is a host media\n * URL (Range-capable, usable directly as an `<img src>`).\n */\nexport interface PluginImageRef {\n\tid: string;\n\turl: string;\n\tmimeType?: string;\n\t/**\n\t * The edit-lineage root id this image belongs to (base image + all its edits\n\t * share one rootId). Lets the host dedup per-message previews — only the\n\t * latest message producing a given rootId renders the version swiper.\n\t */\n\trootId?: string;\n}\n"]}
1
+ {"version":3,"file":"images.js","sourceRoot":"","sources":["../src/images.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * A reference to an image produced out-of-band by the host (e.g. an image\n * tool's result). The bytes are NOT carried inline — `url` is a host media\n * URL (Range-capable, usable directly as an `<img src>`).\n */\nexport interface PluginImageRef {\n\tid: string;\n\turl: string;\n\tmimeType?: string;\n\t/** Provider used for this generation; optional for images created before provenance was recorded. */\n\tproviderId?: string;\n\t/**\n\t * The edit-lineage root id this image belongs to (base image + all its edits\n\t * share one rootId). Lets the host dedup per-message previews — only the\n\t * latest message producing a given rootId renders the version swiper.\n\t */\n\trootId?: string;\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export { PLUGIN_CODING_AGENT_HOOK_EVENT_NAMES } from "./agent.js";
20
20
  export type { PluginAppActionEffect, PluginAppActionExample, PluginAppActionHandlerContext, PluginAppActionHandler, PluginAppActionReadyHandler, PluginAppActionApprovalPresentation, PluginAppActionApproval, PluginAppActionRegistration, PluginAppActionUsage, PluginAppActionsApi, } from "./app-actions.js";
21
21
  export { PluginAppActionError } from "./app-actions.js";
22
22
  export type { PluginAiApi, PluginAiChatAssistantMessage, PluginAiChatMessage, PluginAiChatRequest, PluginAiChatResult, PluginAiChatTool, PluginAiChatToolResultMessage, PluginAiChatUserMessage, PluginAiCompleteRequest, PluginAiCompleteResult, PluginAiStreamOptions, PluginAiTextDeltaEvent, PluginAiModel, PluginAiModelListResult, PluginAiToolCall, PluginAiUsage, } from "./ai.js";
23
- export type { PluginOfficialGeneralSettings, PluginOfficialGeneralSettingsUpdate, PluginOfficialExperimentalSettings, PluginOfficialDownloadItem, PluginOfficialUpdaterState, PluginOfficialWebhookKind, PluginOfficialWebhookEndpoint, PluginOfficialWebhookProvider, PluginOfficialWebhookCreateInput, PluginOfficialWebhookUpdateInput, PluginOfficialWebhookMessage, PluginOfficialWebhookSendResult, PluginOfficialSkillInfo, PluginOfficialInstalledSkill, PluginOfficialShortcutBinding, PluginOfficialQuickPanelSettings, PluginOfficialImStatus, PluginOfficialImLog, PluginOfficialMcpServerSummary, PluginOfficialMcpServerDetail, PluginOfficialMcpUpsertData, PluginOfficialExecutionMode, PluginOfficialSelectedSkill, PluginOfficialBatchProjectCreateData, PluginOfficialBatchProjectUpdateData, PluginOfficialSchedulerTaskCreateData, PluginOfficialSchedulerTaskUpdateData, PluginOfficialModelSummary, PluginOfficialProviderSummary, PluginOfficialProviderDetail, PluginOfficialProviderUpsertData, PluginOfficialProjectEntry, PluginOfficialSessionHandle, PluginOfficialNavigationOpenInput, PluginOfficialOpenFilesOptions, PluginOfficialOpenedFile, PluginOfficialSessionAccess, PluginOfficialSessionRunningEvent, PluginOfficialSessionSummary, PluginOfficialPluginSummary, PluginOfficialKnowledgeBase, PluginOfficialKnowledgeProcessingSettings, PluginOfficialApi, } from "./official.js";
23
+ export type { PluginOfficialGeneralSettings, PluginOfficialGeneralSettingsUpdate, PluginOfficialExperimentalSettings, PluginOfficialImageGenerationSettings, PluginOfficialImageGenerationSettingsUpdate, PluginOfficialDownloadItem, PluginOfficialUpdaterState, PluginOfficialWebhookKind, PluginOfficialWebhookEndpoint, PluginOfficialWebhookProvider, PluginOfficialWebhookCreateInput, PluginOfficialWebhookUpdateInput, PluginOfficialWebhookMessage, PluginOfficialWebhookSendResult, PluginOfficialSkillInfo, PluginOfficialInstalledSkill, PluginOfficialShortcutBinding, PluginOfficialQuickPanelSettings, PluginOfficialImStatus, PluginOfficialImLog, PluginOfficialMcpServerSummary, PluginOfficialMcpServerDetail, PluginOfficialMcpUpsertData, PluginOfficialExecutionMode, PluginOfficialSelectedSkill, PluginOfficialBatchProjectCreateData, PluginOfficialBatchProjectUpdateData, PluginOfficialSchedulerTaskCreateData, PluginOfficialSchedulerTaskUpdateData, PluginOfficialModelSummary, PluginOfficialProviderSummary, PluginOfficialProviderDetail, PluginOfficialProviderUpsertData, PluginOfficialProjectEntry, PluginOfficialSessionHandle, PluginOfficialNavigationOpenInput, PluginOfficialOpenFilesOptions, PluginOfficialOpenedFile, PluginOfficialSessionAccess, PluginOfficialSessionRunningEvent, PluginOfficialSessionSummary, PluginOfficialPluginSummary, PluginOfficialKnowledgeBase, PluginOfficialKnowledgeProcessingSettings, PluginOfficialApi, } from "./official.js";
24
24
  export type { PluginFsEntry, PluginFsFileRef, PluginFsBinaryReadResult, PluginFsStatResult, PluginFsReadResult, PluginFsApi, } from "./fs.js";
25
25
  export type { PluginCommandRunOptions, PluginCommandRunResult, PluginCommandSpawnOptions, PluginCommandSpawnExit, PluginCommandSpawnStatus, PluginCommandSpawnHandle, PluginCommandApi, } from "./command.js";
26
26
  export type { PluginCliProviderApi, PluginCliProviderPhase, PluginCliProviderStatus, } from "./cli-provider.js";
@@ -31,7 +31,7 @@ export type { PluginCaptureApi, PluginOffscreenCaptureOptions, PluginOffscreenCa
31
31
  export type { PluginImageRef } from "./images.js";
32
32
  export type { PluginArtifactDestination, PluginArtifactRef, PluginArtifactsApi, PluginPersistedArtifact, } from "./artifacts.js";
33
33
  export type { PluginJob, PluginJobFailure, PluginJobProgress, PluginJobRef, PluginJobsApi, PluginJobStatus, PluginJobWaitOptions, } from "./jobs.js";
34
- export type { PluginMediaApi, PluginMediaArtifact, PluginMediaCapability, PluginMediaComposeRequest, PluginMediaDimensions, PluginMediaErrorCode, PluginMediaFailure, PluginMediaGenerateRequest, PluginMediaGenerationInputSlot, PluginMediaGenerationMode, PluginMediaGenerationModeCapability, PluginMediaInput, PluginMediaInputSource, PluginMediaInputUploadRequest, PluginMediaJob, PluginMediaKind, PluginMediaOperation, PluginMediaOutput, PluginMediaOutputKind, PluginMediaProviderDescriptor, PluginMediaProviderArtifact, PluginMediaProviderArtifactSource, PluginMediaProviderHandlerContext, PluginMediaProviderInput, PluginMediaProviderJob, PluginMediaProviderRegistration, PluginMediaProviderSubmitRequest, PluginMediaSubmitRequest, PluginMediaTranscodeRequest, PluginMediaTransferResponse, } from "./media.js";
34
+ export type { PluginMediaApi, PluginMediaArtifact, PluginMediaCapability, PluginMediaComposeRequest, PluginMediaDimensions, PluginMediaErrorCode, PluginMediaFailure, PluginMediaGenerateRequest, PluginMediaGenerationInputSlot, PluginMediaGenerationMode, PluginMediaGenerationModeCapability, PluginMediaInput, PluginMediaInputSource, PluginMediaInputUploadRequest, PluginMediaJob, PluginMediaKind, PluginMediaOperation, PluginMediaOutput, PluginMediaOutputKind, PluginMediaProviderDescriptor, PluginMediaGenerationModelDescriptor, PluginMediaProviderArtifact, PluginMediaProviderArtifactSource, PluginMediaProviderHandlerContext, PluginMediaProviderInput, PluginMediaProviderJob, PluginMediaProviderRegistration, PluginMediaProviderSubmitRequest, PluginMediaSubmitRequest, PluginMediaTranscodeRequest, PluginMediaTransferResponse, } from "./media.js";
35
35
  export type { OcrBlock, OcrClient, OcrErrorCode, OcrItemResult, OcrInput, OcrProgress, OcrProviderContext, OcrProviderDescriptor, OcrProviderInput, OcrProviderRegistration, OcrProviderRequest, OcrProviderResult, OcrRequest, OcrResult, OcrTransferResponse, OcrUploadRequest, } from "./ocr.js";
36
36
  export { PluginMediaError } from "./media.js";
37
37
  export type { PluginPromptAttachment, PluginPromptContext, PluginPromptContextJsonValue, } from "./prompt-attachment.js";
@@ -43,6 +43,8 @@ export { readJsonFile, writeJsonFile } from "./storage.js";
43
43
  export type { PluginSecretsApi } from "./secrets.js";
44
44
  export type { PluginLocaleCatalog, PluginLocales, PluginTranslate, PluginI18nApi, } from "./i18n.js";
45
45
  export { interpolatePluginText, resolveCatalogKey, resolvePluginText } from "./i18n.js";
46
+ export type { PluginLogEntry, PluginLogFields, PluginLogIdentity, PluginLogLevel, PluginLogger, PluginLogSink, } from "./logging.js";
47
+ export { __createPluginLogger, __setPluginLogSink } from "./logging.js";
46
48
  export type { PluginPermissionApi, AgentMode, PluginActivationCleanup, PluginContext, PluginDefinition, } from "./context.js";
47
49
  export { definePlugin } from "./context.js";
48
50
  export type { PluginHostBridge } from "./host-bridge.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACX,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,2BAA2B,GAC3B,MAAM,eAAe,CAAC;AAGvB,YAAY,EACX,uBAAuB,EAC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AE,MAAM,cAAc,CAAC;AAClG,YAAY,EACX,kBAAkB,EAClB,0BAA0B,EAC1B,gBAAgB,EAChB,mBAAmB,EACnB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGrD,YAAY,EACX,mBAAmB,EACnB,aAAa,EACb,eAAe,EACf,aAAa,GACb,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAGxF,YAAY,EACX,mBAAmB,EACnB,SAAS,EACT,uBAAuB,EACvB,aAAa,EACb,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGzE,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,eAAe,GACf,MAAM,YAAY,CAAC","sourcesContent":["/**\n * @vetta-org/plugin-sdk public surface.\n *\n * Implementation is split by domain under `src/*.ts`; this barrel re-exports\n * the stable package API. Prefer importing from `@vetta-org/plugin-sdk` rather\n * than deep paths.\n */\n\n// Core primitives\nexport type { ConversationScenario } from \"./scenario.js\";\nexport { PLUGIN_PERMISSIONS } from \"./permissions.js\";\nexport type { PluginPermission } from \"./permissions.js\";\nexport type { Disposable } from \"./disposable.js\";\nexport type {\n\tPluginAgentManifest,\n\tPluginBrowserManifest,\n\tPluginCliProviderManifest,\n\tPluginServiceArtifact,\n\tPluginServicePlatform,\n\tPluginServiceProviderManifest,\n\tPluginServiceRuntimeKind,\n\tPluginManifest,\n\tPluginManifestInput,\n\tPluginManifestResourceReference,\n\tPluginMcpServerConfig,\n\tPluginNetworkManifest,\n\tPluginSkillPresentation,\n\tPluginSkillPresentationRule,\n} from \"./manifest.js\";\n\n// File explorer\nexport type {\n\tPluginFileExplorerEntry,\n\tPluginWorkspaceRoot,\n\tPluginFileExplorerWhen,\n\tPluginFileExplorerActionContext,\n\tPluginFileExplorerContextMenuContribution,\n\tPluginFileExplorerToolbarContext,\n\tPluginFileExplorerToolbarContribution,\n\tPluginFileExplorerDecoration,\n\tPluginFileExplorerDecorationProvider,\n\tPluginFileExplorerChange,\n\tPluginFileExplorerRevealOptions,\n\tPluginFileExplorerApi,\n} from \"./file-explorer.js\";\n\n// Conversation\nexport type {\n\tConversationState,\n\tConversationMessage,\n\tConversationEvent,\n\tConversationQueueState,\n\tCreateSessionOptions,\n\tPluginConversationApi,\n\tSendPromptResult,\n} from \"./conversation.js\";\n\n// UI slots\nexport type {\n\tPluginGlobalSlotContribution,\n\tPluginAbilityDetailSlotContribution,\n\tPluginAbilityDetailSlotProps,\n\tPluginNavBadge,\n\tPluginNavBadgeTone,\n\tPluginWorkspaceViewProps,\n\tPluginWorkspaceViewContribution,\n\tPluginWorkspaceViewHeader,\n\tPluginSidebarState,\n\tPluginAudioMetadata,\n\tPluginPreviewUrlOptions,\n\tPluginPreviewFile,\n\tPluginPreviewFileRef,\n\tPluginFilePreviewProps,\n\tPluginFilePreviewContribution,\n\tPluginActivityTabContribution,\n\tPluginActivityTabRetention,\n\tPluginActivityTabTargetOptions,\n\tPluginCaptureRegion,\n\tPluginOpenActivityTabOptions,\n\tPluginPromptDecoration,\n\tPluginInputActionContribution,\n\tPluginNewSessionContext,\n\tPluginNewSessionContextActivation,\n\tPluginNewSessionContextContribution,\n\tPluginNewSessionTarget,\n\tCardDescriptor,\n\tPluginPendingToolCall,\n\tPluginCardProps,\n\tPluginCardRendererContribution,\n\tPluginToolCallSlotToolCall,\n\tPluginToolCallSlotProps,\n\tPluginToolCallSlotContribution,\n\tPluginTurnCardContribution,\n\tPluginNotifyOptions,\n\tPluginUiApi,\n} from \"./ui.js\";\n\n// Keyboard shortcuts (host ShortcutScopeStack)\nexport type {\n\tPluginShortcutScopeKind,\n\tPluginShortcutWhen,\n\tPluginShortcutBinding,\n\tPluginShortcutScopeContribution,\n\tPluginRegisterShortcutScope,\n\tUsePluginShortcutScopeOptions,\n} from \"./shortcuts.js\";\nexport { usePluginShortcutScope } from \"./shortcuts.js\";\n\n// Agent runtime\nexport type {\n\tPluginJsonSchema,\n\tPluginAgentToolApi,\n\tPluginAgentToolRegistration,\n\tPluginSystemPromptBlock,\n\tPluginDynamicSystemPromptOperation,\n\tPluginSystemPromptMessage,\n\tPluginSystemPromptProviderContext,\n\tPluginSystemPromptBlockView,\n\tPluginAgentActions,\n\tPluginAgentHandlerContext,\n\tPluginAgentToolHandler,\n\tPluginCodingAgentHookEvent,\n\tPluginCodingAgentHookEventName,\n\tPluginCodingAgentHookEventOf,\n\tPluginCodingAgentHookHandler,\n\tPluginCodingAgentHookHandlerContext,\n\tPluginCodingAgentHookRegistration,\n\tPluginCodingAgentHookResult,\n\tPluginCodingAgentHookTool,\n\tPluginCodingAgentPermissionMode,\n\tPluginSystemPromptProviderHandler,\n\tPluginSystemPromptProviderRegistration,\n\tPluginContinuationResult,\n\tPluginContinuationHandler,\n\tPluginContinuationRegistration,\n\tPluginAgentApi,\n} from \"./agent.js\";\nexport { PLUGIN_CODING_AGENT_HOOK_EVENT_NAMES } from \"./agent.js\";\n\n// App actions\nexport type {\n\tPluginAppActionEffect,\n\tPluginAppActionExample,\n\tPluginAppActionHandlerContext,\n\tPluginAppActionHandler,\n\tPluginAppActionReadyHandler,\n\tPluginAppActionApprovalPresentation,\n\tPluginAppActionApproval,\n\tPluginAppActionRegistration,\n\tPluginAppActionUsage,\n\tPluginAppActionsApi,\n} from \"./app-actions.js\";\nexport { PluginAppActionError } from \"./app-actions.js\";\n\n// Host-managed AI\nexport type {\n\tPluginAiApi,\n\tPluginAiChatAssistantMessage,\n\tPluginAiChatMessage,\n\tPluginAiChatRequest,\n\tPluginAiChatResult,\n\tPluginAiChatTool,\n\tPluginAiChatToolResultMessage,\n\tPluginAiChatUserMessage,\n\tPluginAiCompleteRequest,\n\tPluginAiCompleteResult,\n\tPluginAiStreamOptions,\n\tPluginAiTextDeltaEvent,\n\tPluginAiModel,\n\tPluginAiModelListResult,\n\tPluginAiToolCall,\n\tPluginAiUsage,\n} from \"./ai.js\";\n\n// Official host capabilities\nexport type {\n\tPluginOfficialGeneralSettings,\n\tPluginOfficialGeneralSettingsUpdate,\n\tPluginOfficialExperimentalSettings,\n\tPluginOfficialDownloadItem,\n\tPluginOfficialUpdaterState,\n\tPluginOfficialWebhookKind,\n\tPluginOfficialWebhookEndpoint,\n\tPluginOfficialWebhookProvider,\n\tPluginOfficialWebhookCreateInput,\n\tPluginOfficialWebhookUpdateInput,\n\tPluginOfficialWebhookMessage,\n\tPluginOfficialWebhookSendResult,\n\tPluginOfficialSkillInfo,\n\tPluginOfficialInstalledSkill,\n\tPluginOfficialShortcutBinding,\n\tPluginOfficialQuickPanelSettings,\n\tPluginOfficialImStatus,\n\tPluginOfficialImLog,\n\tPluginOfficialMcpServerSummary,\n\tPluginOfficialMcpServerDetail,\n\tPluginOfficialMcpUpsertData,\n\tPluginOfficialExecutionMode,\n\tPluginOfficialSelectedSkill,\n\tPluginOfficialBatchProjectCreateData,\n\tPluginOfficialBatchProjectUpdateData,\n\tPluginOfficialSchedulerTaskCreateData,\n\tPluginOfficialSchedulerTaskUpdateData,\n\tPluginOfficialModelSummary,\n\tPluginOfficialProviderSummary,\n\tPluginOfficialProviderDetail,\n\tPluginOfficialProviderUpsertData,\n\tPluginOfficialProjectEntry,\n\tPluginOfficialSessionHandle,\n\tPluginOfficialNavigationOpenInput,\n\tPluginOfficialOpenFilesOptions,\n\tPluginOfficialOpenedFile,\n\tPluginOfficialSessionAccess,\n\tPluginOfficialSessionRunningEvent,\n\tPluginOfficialSessionSummary,\n\tPluginOfficialPluginSummary,\n\tPluginOfficialKnowledgeBase,\n\tPluginOfficialKnowledgeProcessingSettings,\n\tPluginOfficialApi,\n} from \"./official.js\";\n\n// Files / command / images / secrets\nexport type {\n\tPluginFsEntry,\n\tPluginFsFileRef,\n\tPluginFsBinaryReadResult,\n\tPluginFsStatResult,\n\tPluginFsReadResult,\n\tPluginFsApi,\n} from \"./fs.js\";\nexport type {\n\tPluginCommandRunOptions,\n\tPluginCommandRunResult,\n\tPluginCommandSpawnOptions,\n\tPluginCommandSpawnExit,\n\tPluginCommandSpawnStatus,\n\tPluginCommandSpawnHandle,\n\tPluginCommandApi,\n} from \"./command.js\";\nexport type {\n\tPluginCliProviderApi,\n\tPluginCliProviderPhase,\n\tPluginCliProviderStatus,\n} from \"./cli-provider.js\";\nexport type {\n\tPluginServiceApi,\n\tPluginServiceArtifactPayload,\n\tPluginServiceConnection,\n\tPluginServiceHostPlatform,\n\tPluginServicePhase,\n\tPluginServiceRequest,\n\tPluginServiceResponse,\n\tPluginServiceStatus,\n\tPluginServiceDataEncoding,\n} from \"./service-provider.js\";\nexport type { PluginModelDefinition, PluginModelProviderConfig, PluginModelsApi } from \"./models.js\";\nexport type {\n\tPluginBrowserAction,\n\tPluginBrowserActionResult,\n\tPluginBrowserApi,\n\tPluginBrowserPageState,\n\tPluginBrowserProfile,\n\tPluginBrowserRuntimePhase,\n\tPluginBrowserRuntimeStatus,\n\tPluginBrowserScreenshot,\n\tPluginBrowserSession,\n\tPluginBrowserSessionOptions,\n\tPluginBrowserSessionStatus,\n\tPluginBrowserSnapshot,\n\tPluginBrowserSource,\n\tPluginBrowserTextContent,\n} from \"./browser.js\";\nexport type {\n\tPluginCaptureApi,\n\tPluginOffscreenCaptureOptions,\n\tPluginOffscreenCaptureResult,\n} from \"./capture.js\";\nexport type { PluginImageRef } from \"./images.js\";\nexport type {\n\tPluginArtifactDestination,\n\tPluginArtifactRef,\n\tPluginArtifactsApi,\n\tPluginPersistedArtifact,\n} from \"./artifacts.js\";\nexport type {\n\tPluginJob,\n\tPluginJobFailure,\n\tPluginJobProgress,\n\tPluginJobRef,\n\tPluginJobsApi,\n\tPluginJobStatus,\n\tPluginJobWaitOptions,\n} from \"./jobs.js\";\nexport type {\n\tPluginMediaApi,\n\tPluginMediaArtifact,\n\tPluginMediaCapability,\n\tPluginMediaComposeRequest,\n\tPluginMediaDimensions,\n\tPluginMediaErrorCode,\n\tPluginMediaFailure,\n\tPluginMediaGenerateRequest,\n\tPluginMediaGenerationInputSlot,\n\tPluginMediaGenerationMode,\n\tPluginMediaGenerationModeCapability,\n\tPluginMediaInput,\n\tPluginMediaInputSource,\n\tPluginMediaInputUploadRequest,\n\tPluginMediaJob,\n\tPluginMediaKind,\n\tPluginMediaOperation,\n\tPluginMediaOutput,\n\tPluginMediaOutputKind,\n\tPluginMediaProviderDescriptor,\n\tPluginMediaProviderArtifact,\n\tPluginMediaProviderArtifactSource,\n\tPluginMediaProviderHandlerContext,\n\tPluginMediaProviderInput,\n\tPluginMediaProviderJob,\n\tPluginMediaProviderRegistration,\n\tPluginMediaProviderSubmitRequest,\n\tPluginMediaSubmitRequest,\n\tPluginMediaTranscodeRequest,\n\tPluginMediaTransferResponse,\n} from \"./media.js\";\n// OCR Provider protocol\nexport type {\n\tOcrBlock,\n\tOcrClient,\n\tOcrErrorCode,\n\tOcrItemResult,\n\tOcrInput,\n\tOcrProgress,\n\tOcrProviderContext,\n\tOcrProviderDescriptor,\n\tOcrProviderInput,\n\tOcrProviderRegistration,\n\tOcrProviderRequest,\n\tOcrProviderResult,\n\tOcrRequest,\n\tOcrResult,\n\tOcrTransferResponse,\n\tOcrUploadRequest,\n} from \"./ocr.js\";\nexport { PluginMediaError } from \"./media.js\";\nexport type {\n\tPluginPromptAttachment,\n\tPluginPromptContext,\n\tPluginPromptContextJsonValue,\n} from \"./prompt-attachment.js\";\nexport { definePluginPromptContext } from \"./prompt-attachment.js\";\nexport type {\n\tPluginNetworkApi,\n\tPluginNetworkBody,\n\tPluginNetworkRequest,\n\tPluginNetworkResponse,\n} from \"./network.js\";\nexport type { PluginGatewayApi, PluginGatewayRequest, PluginGatewayResponse } from \"./gateway.js\";\nexport type {\n\tPluginPutBlobInput,\n\tPluginPutBlobFromFileInput,\n\tPluginStorageApi,\n\tPluginStorageChange,\n\tPluginStorageCommitOptions,\n\tPluginStorageCommitResult,\n\tPluginStorageEncoding,\n\tPluginStorageSnapshot,\n\tPluginStorageWrite,\n\tPluginStoredBlob,\n\tPluginStoredBlobRef,\n} from \"./storage.js\";\nexport { readJsonFile, writeJsonFile } from \"./storage.js\";\nexport type { PluginSecretsApi } from \"./secrets.js\";\n\n// i18n\nexport type {\n\tPluginLocaleCatalog,\n\tPluginLocales,\n\tPluginTranslate,\n\tPluginI18nApi,\n} from \"./i18n.js\";\nexport { interpolatePluginText, resolveCatalogKey, resolvePluginText } from \"./i18n.js\";\n\n// Context & lifecycle\nexport type {\n\tPluginPermissionApi,\n\tAgentMode,\n\tPluginActivationCleanup,\n\tPluginContext,\n\tPluginDefinition,\n} from \"./context.js\";\nexport { definePlugin } from \"./context.js\";\n\n// Host bridge (host-injected; plugins use hooks)\nexport type { PluginHostBridge } from \"./host-bridge.js\";\nexport { __setPluginHostBridge } from \"./host-bridge.js\";\n\n// Activity tab context\nexport type { ActivityTabContextValue } from \"./activity-tab.js\";\nexport { __ActivityTabContext, useActivityTab } from \"./activity-tab.js\";\n\n// React hooks\nexport type { PluginI18nContextValue, PluginTranslation } from \"./hooks.js\";\nexport {\n\t__PluginI18nContext,\n\tuseTranslation,\n\tuseActiveConversation,\n\tuseConversationMessages,\n\tusePromptAttachment,\n\tuseSidebarState,\n} from \"./hooks.js\";\n"]}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACX,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,6BAA6B,EAC7B,wBAAwB,EACxB,cAAc,EACd,mBAAmB,EACnB,+BAA+B,EAC/B,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,2BAA2B,GAC3B,MAAM,eAAe,CAAC;AAGvB,YAAY,EACX,uBAAuB,EACvB,mBAAmB,EACnB,sBAAsB,EACtB,+BAA+B,EAC/B,yCAAyC,EACzC,gCAAgC,EAChC,qCAAqC,EACrC,4BAA4B,EAC5B,oCAAoC,EACpC,wBAAwB,EACxB,+BAA+B,EAC/B,qBAAqB,GACrB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACX,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACX,4BAA4B,EAC5B,mCAAmC,EACnC,4BAA4B,EAC5B,cAAc,EACd,kBAAkB,EAClB,wBAAwB,EACxB,+BAA+B,EAC/B,yBAAyB,EACzB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,EACtB,6BAA6B,EAC7B,6BAA6B,EAC7B,0BAA0B,EAC1B,8BAA8B,EAC9B,mBAA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aAAa,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGxE,YAAY,EACX,mBAAmB,EACnB,SAAS,EACT,uBAAuB,EACvB,aAAa,EACb,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGzE,YAAY,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC5E,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,eAAe,GACf,MAAM,YAAY,CAAC","sourcesContent":["/**\n * @vetta-org/plugin-sdk public surface.\n *\n * Implementation is split by domain under `src/*.ts`; this barrel re-exports\n * the stable package API. Prefer importing from `@vetta-org/plugin-sdk` rather\n * than deep paths.\n */\n\n// Core primitives\nexport type { ConversationScenario } from \"./scenario.js\";\nexport { PLUGIN_PERMISSIONS } from \"./permissions.js\";\nexport type { PluginPermission } from \"./permissions.js\";\nexport type { Disposable } from \"./disposable.js\";\nexport type {\n\tPluginAgentManifest,\n\tPluginBrowserManifest,\n\tPluginCliProviderManifest,\n\tPluginServiceArtifact,\n\tPluginServicePlatform,\n\tPluginServiceProviderManifest,\n\tPluginServiceRuntimeKind,\n\tPluginManifest,\n\tPluginManifestInput,\n\tPluginManifestResourceReference,\n\tPluginMcpServerConfig,\n\tPluginNetworkManifest,\n\tPluginSkillPresentation,\n\tPluginSkillPresentationRule,\n} from \"./manifest.js\";\n\n// File explorer\nexport type {\n\tPluginFileExplorerEntry,\n\tPluginWorkspaceRoot,\n\tPluginFileExplorerWhen,\n\tPluginFileExplorerActionContext,\n\tPluginFileExplorerContextMenuContribution,\n\tPluginFileExplorerToolbarContext,\n\tPluginFileExplorerToolbarContribution,\n\tPluginFileExplorerDecoration,\n\tPluginFileExplorerDecorationProvider,\n\tPluginFileExplorerChange,\n\tPluginFileExplorerRevealOptions,\n\tPluginFileExplorerApi,\n} from \"./file-explorer.js\";\n\n// Conversation\nexport type {\n\tConversationState,\n\tConversationMessage,\n\tConversationEvent,\n\tConversationQueueState,\n\tCreateSessionOptions,\n\tPluginConversationApi,\n\tSendPromptResult,\n} from \"./conversation.js\";\n\n// UI slots\nexport type {\n\tPluginGlobalSlotContribution,\n\tPluginAbilityDetailSlotContribution,\n\tPluginAbilityDetailSlotProps,\n\tPluginNavBadge,\n\tPluginNavBadgeTone,\n\tPluginWorkspaceViewProps,\n\tPluginWorkspaceViewContribution,\n\tPluginWorkspaceViewHeader,\n\tPluginSidebarState,\n\tPluginAudioMetadata,\n\tPluginPreviewUrlOptions,\n\tPluginPreviewFile,\n\tPluginPreviewFileRef,\n\tPluginFilePreviewProps,\n\tPluginFilePreviewContribution,\n\tPluginActivityTabContribution,\n\tPluginActivityTabRetention,\n\tPluginActivityTabTargetOptions,\n\tPluginCaptureRegion,\n\tPluginOpenActivityTabOptions,\n\tPluginPromptDecoration,\n\tPluginInputActionContribution,\n\tPluginNewSessionContext,\n\tPluginNewSessionContextActivation,\n\tPluginNewSessionContextContribution,\n\tPluginNewSessionTarget,\n\tCardDescriptor,\n\tPluginPendingToolCall,\n\tPluginCardProps,\n\tPluginCardRendererContribution,\n\tPluginToolCallSlotToolCall,\n\tPluginToolCallSlotProps,\n\tPluginToolCallSlotContribution,\n\tPluginTurnCardContribution,\n\tPluginNotifyOptions,\n\tPluginUiApi,\n} from \"./ui.js\";\n\n// Keyboard shortcuts (host ShortcutScopeStack)\nexport type {\n\tPluginShortcutScopeKind,\n\tPluginShortcutWhen,\n\tPluginShortcutBinding,\n\tPluginShortcutScopeContribution,\n\tPluginRegisterShortcutScope,\n\tUsePluginShortcutScopeOptions,\n} from \"./shortcuts.js\";\nexport { usePluginShortcutScope } from \"./shortcuts.js\";\n\n// Agent runtime\nexport type {\n\tPluginJsonSchema,\n\tPluginAgentToolApi,\n\tPluginAgentToolRegistration,\n\tPluginSystemPromptBlock,\n\tPluginDynamicSystemPromptOperation,\n\tPluginSystemPromptMessage,\n\tPluginSystemPromptProviderContext,\n\tPluginSystemPromptBlockView,\n\tPluginAgentActions,\n\tPluginAgentHandlerContext,\n\tPluginAgentToolHandler,\n\tPluginCodingAgentHookEvent,\n\tPluginCodingAgentHookEventName,\n\tPluginCodingAgentHookEventOf,\n\tPluginCodingAgentHookHandler,\n\tPluginCodingAgentHookHandlerContext,\n\tPluginCodingAgentHookRegistration,\n\tPluginCodingAgentHookResult,\n\tPluginCodingAgentHookTool,\n\tPluginCodingAgentPermissionMode,\n\tPluginSystemPromptProviderHandler,\n\tPluginSystemPromptProviderRegistration,\n\tPluginContinuationResult,\n\tPluginContinuationHandler,\n\tPluginContinuationRegistration,\n\tPluginAgentApi,\n} from \"./agent.js\";\nexport { PLUGIN_CODING_AGENT_HOOK_EVENT_NAMES } from \"./agent.js\";\n\n// App actions\nexport type {\n\tPluginAppActionEffect,\n\tPluginAppActionExample,\n\tPluginAppActionHandlerContext,\n\tPluginAppActionHandler,\n\tPluginAppActionReadyHandler,\n\tPluginAppActionApprovalPresentation,\n\tPluginAppActionApproval,\n\tPluginAppActionRegistration,\n\tPluginAppActionUsage,\n\tPluginAppActionsApi,\n} from \"./app-actions.js\";\nexport { PluginAppActionError } from \"./app-actions.js\";\n\n// Host-managed AI\nexport type {\n\tPluginAiApi,\n\tPluginAiChatAssistantMessage,\n\tPluginAiChatMessage,\n\tPluginAiChatRequest,\n\tPluginAiChatResult,\n\tPluginAiChatTool,\n\tPluginAiChatToolResultMessage,\n\tPluginAiChatUserMessage,\n\tPluginAiCompleteRequest,\n\tPluginAiCompleteResult,\n\tPluginAiStreamOptions,\n\tPluginAiTextDeltaEvent,\n\tPluginAiModel,\n\tPluginAiModelListResult,\n\tPluginAiToolCall,\n\tPluginAiUsage,\n} from \"./ai.js\";\n\n// Official host capabilities\nexport type {\n\tPluginOfficialGeneralSettings,\n\tPluginOfficialGeneralSettingsUpdate,\n\tPluginOfficialExperimentalSettings,\n\tPluginOfficialImageGenerationSettings,\n\tPluginOfficialImageGenerationSettingsUpdate,\n\tPluginOfficialDownloadItem,\n\tPluginOfficialUpdaterState,\n\tPluginOfficialWebhookKind,\n\tPluginOfficialWebhookEndpoint,\n\tPluginOfficialWebhookProvider,\n\tPluginOfficialWebhookCreateInput,\n\tPluginOfficialWebhookUpdateInput,\n\tPluginOfficialWebhookMessage,\n\tPluginOfficialWebhookSendResult,\n\tPluginOfficialSkillInfo,\n\tPluginOfficialInstalledSkill,\n\tPluginOfficialShortcutBinding,\n\tPluginOfficialQuickPanelSettings,\n\tPluginOfficialImStatus,\n\tPluginOfficialImLog,\n\tPluginOfficialMcpServerSummary,\n\tPluginOfficialMcpServerDetail,\n\tPluginOfficialMcpUpsertData,\n\tPluginOfficialExecutionMode,\n\tPluginOfficialSelectedSkill,\n\tPluginOfficialBatchProjectCreateData,\n\tPluginOfficialBatchProjectUpdateData,\n\tPluginOfficialSchedulerTaskCreateData,\n\tPluginOfficialSchedulerTaskUpdateData,\n\tPluginOfficialModelSummary,\n\tPluginOfficialProviderSummary,\n\tPluginOfficialProviderDetail,\n\tPluginOfficialProviderUpsertData,\n\tPluginOfficialProjectEntry,\n\tPluginOfficialSessionHandle,\n\tPluginOfficialNavigationOpenInput,\n\tPluginOfficialOpenFilesOptions,\n\tPluginOfficialOpenedFile,\n\tPluginOfficialSessionAccess,\n\tPluginOfficialSessionRunningEvent,\n\tPluginOfficialSessionSummary,\n\tPluginOfficialPluginSummary,\n\tPluginOfficialKnowledgeBase,\n\tPluginOfficialKnowledgeProcessingSettings,\n\tPluginOfficialApi,\n} from \"./official.js\";\n\n// Files / command / images / secrets\nexport type {\n\tPluginFsEntry,\n\tPluginFsFileRef,\n\tPluginFsBinaryReadResult,\n\tPluginFsStatResult,\n\tPluginFsReadResult,\n\tPluginFsApi,\n} from \"./fs.js\";\nexport type {\n\tPluginCommandRunOptions,\n\tPluginCommandRunResult,\n\tPluginCommandSpawnOptions,\n\tPluginCommandSpawnExit,\n\tPluginCommandSpawnStatus,\n\tPluginCommandSpawnHandle,\n\tPluginCommandApi,\n} from \"./command.js\";\nexport type {\n\tPluginCliProviderApi,\n\tPluginCliProviderPhase,\n\tPluginCliProviderStatus,\n} from \"./cli-provider.js\";\nexport type {\n\tPluginServiceApi,\n\tPluginServiceArtifactPayload,\n\tPluginServiceConnection,\n\tPluginServiceHostPlatform,\n\tPluginServicePhase,\n\tPluginServiceRequest,\n\tPluginServiceResponse,\n\tPluginServiceStatus,\n\tPluginServiceDataEncoding,\n} from \"./service-provider.js\";\nexport type { PluginModelDefinition, PluginModelProviderConfig, PluginModelsApi } from \"./models.js\";\nexport type {\n\tPluginBrowserAction,\n\tPluginBrowserActionResult,\n\tPluginBrowserApi,\n\tPluginBrowserPageState,\n\tPluginBrowserProfile,\n\tPluginBrowserRuntimePhase,\n\tPluginBrowserRuntimeStatus,\n\tPluginBrowserScreenshot,\n\tPluginBrowserSession,\n\tPluginBrowserSessionOptions,\n\tPluginBrowserSessionStatus,\n\tPluginBrowserSnapshot,\n\tPluginBrowserSource,\n\tPluginBrowserTextContent,\n} from \"./browser.js\";\nexport type {\n\tPluginCaptureApi,\n\tPluginOffscreenCaptureOptions,\n\tPluginOffscreenCaptureResult,\n} from \"./capture.js\";\nexport type { PluginImageRef } from \"./images.js\";\nexport type {\n\tPluginArtifactDestination,\n\tPluginArtifactRef,\n\tPluginArtifactsApi,\n\tPluginPersistedArtifact,\n} from \"./artifacts.js\";\nexport type {\n\tPluginJob,\n\tPluginJobFailure,\n\tPluginJobProgress,\n\tPluginJobRef,\n\tPluginJobsApi,\n\tPluginJobStatus,\n\tPluginJobWaitOptions,\n} from \"./jobs.js\";\nexport type {\n\tPluginMediaApi,\n\tPluginMediaArtifact,\n\tPluginMediaCapability,\n\tPluginMediaComposeRequest,\n\tPluginMediaDimensions,\n\tPluginMediaErrorCode,\n\tPluginMediaFailure,\n\tPluginMediaGenerateRequest,\n\tPluginMediaGenerationInputSlot,\n\tPluginMediaGenerationMode,\n\tPluginMediaGenerationModeCapability,\n\tPluginMediaInput,\n\tPluginMediaInputSource,\n\tPluginMediaInputUploadRequest,\n\tPluginMediaJob,\n\tPluginMediaKind,\n\tPluginMediaOperation,\n\tPluginMediaOutput,\n\tPluginMediaOutputKind,\n\tPluginMediaProviderDescriptor,\n\tPluginMediaGenerationModelDescriptor,\n\tPluginMediaProviderArtifact,\n\tPluginMediaProviderArtifactSource,\n\tPluginMediaProviderHandlerContext,\n\tPluginMediaProviderInput,\n\tPluginMediaProviderJob,\n\tPluginMediaProviderRegistration,\n\tPluginMediaProviderSubmitRequest,\n\tPluginMediaSubmitRequest,\n\tPluginMediaTranscodeRequest,\n\tPluginMediaTransferResponse,\n} from \"./media.js\";\n// OCR Provider protocol\nexport type {\n\tOcrBlock,\n\tOcrClient,\n\tOcrErrorCode,\n\tOcrItemResult,\n\tOcrInput,\n\tOcrProgress,\n\tOcrProviderContext,\n\tOcrProviderDescriptor,\n\tOcrProviderInput,\n\tOcrProviderRegistration,\n\tOcrProviderRequest,\n\tOcrProviderResult,\n\tOcrRequest,\n\tOcrResult,\n\tOcrTransferResponse,\n\tOcrUploadRequest,\n} from \"./ocr.js\";\nexport { PluginMediaError } from \"./media.js\";\nexport type {\n\tPluginPromptAttachment,\n\tPluginPromptContext,\n\tPluginPromptContextJsonValue,\n} from \"./prompt-attachment.js\";\nexport { definePluginPromptContext } from \"./prompt-attachment.js\";\nexport type {\n\tPluginNetworkApi,\n\tPluginNetworkBody,\n\tPluginNetworkRequest,\n\tPluginNetworkResponse,\n} from \"./network.js\";\nexport type { PluginGatewayApi, PluginGatewayRequest, PluginGatewayResponse } from \"./gateway.js\";\nexport type {\n\tPluginPutBlobInput,\n\tPluginPutBlobFromFileInput,\n\tPluginStorageApi,\n\tPluginStorageChange,\n\tPluginStorageCommitOptions,\n\tPluginStorageCommitResult,\n\tPluginStorageEncoding,\n\tPluginStorageSnapshot,\n\tPluginStorageWrite,\n\tPluginStoredBlob,\n\tPluginStoredBlobRef,\n} from \"./storage.js\";\nexport { readJsonFile, writeJsonFile } from \"./storage.js\";\nexport type { PluginSecretsApi } from \"./secrets.js\";\n\n// i18n\nexport type {\n\tPluginLocaleCatalog,\n\tPluginLocales,\n\tPluginTranslate,\n\tPluginI18nApi,\n} from \"./i18n.js\";\nexport { interpolatePluginText, resolveCatalogKey, resolvePluginText } from \"./i18n.js\";\n\n// Build-bound logging\nexport type {\n\tPluginLogEntry,\n\tPluginLogFields,\n\tPluginLogIdentity,\n\tPluginLogLevel,\n\tPluginLogger,\n\tPluginLogSink,\n} from \"./logging.js\";\nexport { __createPluginLogger, __setPluginLogSink } from \"./logging.js\";\n\n// Context & lifecycle\nexport type {\n\tPluginPermissionApi,\n\tAgentMode,\n\tPluginActivationCleanup,\n\tPluginContext,\n\tPluginDefinition,\n} from \"./context.js\";\nexport { definePlugin } from \"./context.js\";\n\n// Host bridge (host-injected; plugins use hooks)\nexport type { PluginHostBridge } from \"./host-bridge.js\";\nexport { __setPluginHostBridge } from \"./host-bridge.js\";\n\n// Activity tab context\nexport type { ActivityTabContextValue } from \"./activity-tab.js\";\nexport { __ActivityTabContext, useActivityTab } from \"./activity-tab.js\";\n\n// React hooks\nexport type { PluginI18nContextValue, PluginTranslation } from \"./hooks.js\";\nexport {\n\t__PluginI18nContext,\n\tuseTranslation,\n\tuseActiveConversation,\n\tuseConversationMessages,\n\tusePromptAttachment,\n\tuseSidebarState,\n} from \"./hooks.js\";\n"]}
package/dist/index.js CHANGED
@@ -13,6 +13,7 @@ export { PluginMediaError } from "./media.js";
13
13
  export { definePluginPromptContext } from "./prompt-attachment.js";
14
14
  export { readJsonFile, writeJsonFile } from "./storage.js";
15
15
  export { interpolatePluginText, resolveCatalogKey, resolvePluginText } from "./i18n.js";
16
+ export { __createPluginLogger, __setPluginLogSink } from "./logging.js";
16
17
  export { definePlugin } from "./context.js";
17
18
  export { __setPluginHostBridge } from "./host-bridge.js";
18
19
  export { __ActivityTabContext, useActivityTab } from "./activity-tab.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAgGtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AA+BxD,OAAO,EAAE,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAelE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAgMxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAM9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAqBnE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAU3D,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAUxF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIzE,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,eAAe,GACf,MAAM,YAAY,CAAC","sourcesContent":["/**\n * @vetta-org/plugin-sdk public surface.\n *\n * Implementation is split by domain under `src/*.ts`; this barrel re-exports\n * the stable package API. Prefer importing from `@vetta-org/plugin-sdk` rather\n * than deep paths.\n */\n\n// Core primitives\nexport type { ConversationScenario } from \"./scenario.js\";\nexport { PLUGIN_PERMISSIONS } from \"./permissions.js\";\nexport type { PluginPermission } from \"./permissions.js\";\nexport type { Disposable } from \"./disposable.js\";\nexport type {\n\tPluginAgentManifest,\n\tPluginBrowserManifest,\n\tPluginCliProviderManifest,\n\tPluginServiceArtifact,\n\tPluginServicePlatform,\n\tPluginServiceProviderManifest,\n\tPluginServiceRuntimeKind,\n\tPluginManifest,\n\tPluginManifestInput,\n\tPluginManifestResourceReference,\n\tPluginMcpServerConfig,\n\tPluginNetworkManifest,\n\tPluginSkillPresentation,\n\tPluginSkillPresentationRule,\n} from \"./manifest.js\";\n\n// File explorer\nexport type {\n\tPluginFileExplorerEntry,\n\tPluginWorkspaceRoot,\n\tPluginFileExplorerWhen,\n\tPluginFileExplorerActionContext,\n\tPluginFileExplorerContextMenuContribution,\n\tPluginFileExplorerToolbarContext,\n\tPluginFileExplorerToolbarContribution,\n\tPluginFileExplorerDecoration,\n\tPluginFileExplorerDecorationProvider,\n\tPluginFileExplorerChange,\n\tPluginFileExplorerRevealOptions,\n\tPluginFileExplorerApi,\n} from \"./file-explorer.js\";\n\n// Conversation\nexport type {\n\tConversationState,\n\tConversationMessage,\n\tConversationEvent,\n\tConversationQueueState,\n\tCreateSessionOptions,\n\tPluginConversationApi,\n\tSendPromptResult,\n} from \"./conversation.js\";\n\n// UI slots\nexport type {\n\tPluginGlobalSlotContribution,\n\tPluginAbilityDetailSlotContribution,\n\tPluginAbilityDetailSlotProps,\n\tPluginNavBadge,\n\tPluginNavBadgeTone,\n\tPluginWorkspaceViewProps,\n\tPluginWorkspaceViewContribution,\n\tPluginWorkspaceViewHeader,\n\tPluginSidebarState,\n\tPluginAudioMetadata,\n\tPluginPreviewUrlOptions,\n\tPluginPreviewFile,\n\tPluginPreviewFileRef,\n\tPluginFilePreviewProps,\n\tPluginFilePreviewContribution,\n\tPluginActivityTabContribution,\n\tPluginActivityTabRetention,\n\tPluginActivityTabTargetOptions,\n\tPluginCaptureRegion,\n\tPluginOpenActivityTabOptions,\n\tPluginPromptDecoration,\n\tPluginInputActionContribution,\n\tPluginNewSessionContext,\n\tPluginNewSessionContextActivation,\n\tPluginNewSessionContextContribution,\n\tPluginNewSessionTarget,\n\tCardDescriptor,\n\tPluginPendingToolCall,\n\tPluginCardProps,\n\tPluginCardRendererContribution,\n\tPluginToolCallSlotToolCall,\n\tPluginToolCallSlotProps,\n\tPluginToolCallSlotContribution,\n\tPluginTurnCardContribution,\n\tPluginNotifyOptions,\n\tPluginUiApi,\n} from \"./ui.js\";\n\n// Keyboard shortcuts (host ShortcutScopeStack)\nexport type {\n\tPluginShortcutScopeKind,\n\tPluginShortcutWhen,\n\tPluginShortcutBinding,\n\tPluginShortcutScopeContribution,\n\tPluginRegisterShortcutScope,\n\tUsePluginShortcutScopeOptions,\n} from \"./shortcuts.js\";\nexport { usePluginShortcutScope } from \"./shortcuts.js\";\n\n// Agent runtime\nexport type {\n\tPluginJsonSchema,\n\tPluginAgentToolApi,\n\tPluginAgentToolRegistration,\n\tPluginSystemPromptBlock,\n\tPluginDynamicSystemPromptOperation,\n\tPluginSystemPromptMessage,\n\tPluginSystemPromptProviderContext,\n\tPluginSystemPromptBlockView,\n\tPluginAgentActions,\n\tPluginAgentHandlerContext,\n\tPluginAgentToolHandler,\n\tPluginCodingAgentHookEvent,\n\tPluginCodingAgentHookEventName,\n\tPluginCodingAgentHookEventOf,\n\tPluginCodingAgentHookHandler,\n\tPluginCodingAgentHookHandlerContext,\n\tPluginCodingAgentHookRegistration,\n\tPluginCodingAgentHookResult,\n\tPluginCodingAgentHookTool,\n\tPluginCodingAgentPermissionMode,\n\tPluginSystemPromptProviderHandler,\n\tPluginSystemPromptProviderRegistration,\n\tPluginContinuationResult,\n\tPluginContinuationHandler,\n\tPluginContinuationRegistration,\n\tPluginAgentApi,\n} from \"./agent.js\";\nexport { PLUGIN_CODING_AGENT_HOOK_EVENT_NAMES } from \"./agent.js\";\n\n// App actions\nexport type {\n\tPluginAppActionEffect,\n\tPluginAppActionExample,\n\tPluginAppActionHandlerContext,\n\tPluginAppActionHandler,\n\tPluginAppActionReadyHandler,\n\tPluginAppActionApprovalPresentation,\n\tPluginAppActionApproval,\n\tPluginAppActionRegistration,\n\tPluginAppActionUsage,\n\tPluginAppActionsApi,\n} from \"./app-actions.js\";\nexport { PluginAppActionError } from \"./app-actions.js\";\n\n// Host-managed AI\nexport type {\n\tPluginAiApi,\n\tPluginAiChatAssistantMessage,\n\tPluginAiChatMessage,\n\tPluginAiChatRequest,\n\tPluginAiChatResult,\n\tPluginAiChatTool,\n\tPluginAiChatToolResultMessage,\n\tPluginAiChatUserMessage,\n\tPluginAiCompleteRequest,\n\tPluginAiCompleteResult,\n\tPluginAiStreamOptions,\n\tPluginAiTextDeltaEvent,\n\tPluginAiModel,\n\tPluginAiModelListResult,\n\tPluginAiToolCall,\n\tPluginAiUsage,\n} from \"./ai.js\";\n\n// Official host capabilities\nexport type {\n\tPluginOfficialGeneralSettings,\n\tPluginOfficialGeneralSettingsUpdate,\n\tPluginOfficialExperimentalSettings,\n\tPluginOfficialDownloadItem,\n\tPluginOfficialUpdaterState,\n\tPluginOfficialWebhookKind,\n\tPluginOfficialWebhookEndpoint,\n\tPluginOfficialWebhookProvider,\n\tPluginOfficialWebhookCreateInput,\n\tPluginOfficialWebhookUpdateInput,\n\tPluginOfficialWebhookMessage,\n\tPluginOfficialWebhookSendResult,\n\tPluginOfficialSkillInfo,\n\tPluginOfficialInstalledSkill,\n\tPluginOfficialShortcutBinding,\n\tPluginOfficialQuickPanelSettings,\n\tPluginOfficialImStatus,\n\tPluginOfficialImLog,\n\tPluginOfficialMcpServerSummary,\n\tPluginOfficialMcpServerDetail,\n\tPluginOfficialMcpUpsertData,\n\tPluginOfficialExecutionMode,\n\tPluginOfficialSelectedSkill,\n\tPluginOfficialBatchProjectCreateData,\n\tPluginOfficialBatchProjectUpdateData,\n\tPluginOfficialSchedulerTaskCreateData,\n\tPluginOfficialSchedulerTaskUpdateData,\n\tPluginOfficialModelSummary,\n\tPluginOfficialProviderSummary,\n\tPluginOfficialProviderDetail,\n\tPluginOfficialProviderUpsertData,\n\tPluginOfficialProjectEntry,\n\tPluginOfficialSessionHandle,\n\tPluginOfficialNavigationOpenInput,\n\tPluginOfficialOpenFilesOptions,\n\tPluginOfficialOpenedFile,\n\tPluginOfficialSessionAccess,\n\tPluginOfficialSessionRunningEvent,\n\tPluginOfficialSessionSummary,\n\tPluginOfficialPluginSummary,\n\tPluginOfficialKnowledgeBase,\n\tPluginOfficialKnowledgeProcessingSettings,\n\tPluginOfficialApi,\n} from \"./official.js\";\n\n// Files / command / images / secrets\nexport type {\n\tPluginFsEntry,\n\tPluginFsFileRef,\n\tPluginFsBinaryReadResult,\n\tPluginFsStatResult,\n\tPluginFsReadResult,\n\tPluginFsApi,\n} from \"./fs.js\";\nexport type {\n\tPluginCommandRunOptions,\n\tPluginCommandRunResult,\n\tPluginCommandSpawnOptions,\n\tPluginCommandSpawnExit,\n\tPluginCommandSpawnStatus,\n\tPluginCommandSpawnHandle,\n\tPluginCommandApi,\n} from \"./command.js\";\nexport type {\n\tPluginCliProviderApi,\n\tPluginCliProviderPhase,\n\tPluginCliProviderStatus,\n} from \"./cli-provider.js\";\nexport type {\n\tPluginServiceApi,\n\tPluginServiceArtifactPayload,\n\tPluginServiceConnection,\n\tPluginServiceHostPlatform,\n\tPluginServicePhase,\n\tPluginServiceRequest,\n\tPluginServiceResponse,\n\tPluginServiceStatus,\n\tPluginServiceDataEncoding,\n} from \"./service-provider.js\";\nexport type { PluginModelDefinition, PluginModelProviderConfig, PluginModelsApi } from \"./models.js\";\nexport type {\n\tPluginBrowserAction,\n\tPluginBrowserActionResult,\n\tPluginBrowserApi,\n\tPluginBrowserPageState,\n\tPluginBrowserProfile,\n\tPluginBrowserRuntimePhase,\n\tPluginBrowserRuntimeStatus,\n\tPluginBrowserScreenshot,\n\tPluginBrowserSession,\n\tPluginBrowserSessionOptions,\n\tPluginBrowserSessionStatus,\n\tPluginBrowserSnapshot,\n\tPluginBrowserSource,\n\tPluginBrowserTextContent,\n} from \"./browser.js\";\nexport type {\n\tPluginCaptureApi,\n\tPluginOffscreenCaptureOptions,\n\tPluginOffscreenCaptureResult,\n} from \"./capture.js\";\nexport type { PluginImageRef } from \"./images.js\";\nexport type {\n\tPluginArtifactDestination,\n\tPluginArtifactRef,\n\tPluginArtifactsApi,\n\tPluginPersistedArtifact,\n} from \"./artifacts.js\";\nexport type {\n\tPluginJob,\n\tPluginJobFailure,\n\tPluginJobProgress,\n\tPluginJobRef,\n\tPluginJobsApi,\n\tPluginJobStatus,\n\tPluginJobWaitOptions,\n} from \"./jobs.js\";\nexport type {\n\tPluginMediaApi,\n\tPluginMediaArtifact,\n\tPluginMediaCapability,\n\tPluginMediaComposeRequest,\n\tPluginMediaDimensions,\n\tPluginMediaErrorCode,\n\tPluginMediaFailure,\n\tPluginMediaGenerateRequest,\n\tPluginMediaGenerationInputSlot,\n\tPluginMediaGenerationMode,\n\tPluginMediaGenerationModeCapability,\n\tPluginMediaInput,\n\tPluginMediaInputSource,\n\tPluginMediaInputUploadRequest,\n\tPluginMediaJob,\n\tPluginMediaKind,\n\tPluginMediaOperation,\n\tPluginMediaOutput,\n\tPluginMediaOutputKind,\n\tPluginMediaProviderDescriptor,\n\tPluginMediaProviderArtifact,\n\tPluginMediaProviderArtifactSource,\n\tPluginMediaProviderHandlerContext,\n\tPluginMediaProviderInput,\n\tPluginMediaProviderJob,\n\tPluginMediaProviderRegistration,\n\tPluginMediaProviderSubmitRequest,\n\tPluginMediaSubmitRequest,\n\tPluginMediaTranscodeRequest,\n\tPluginMediaTransferResponse,\n} from \"./media.js\";\n// OCR Provider protocol\nexport type {\n\tOcrBlock,\n\tOcrClient,\n\tOcrErrorCode,\n\tOcrItemResult,\n\tOcrInput,\n\tOcrProgress,\n\tOcrProviderContext,\n\tOcrProviderDescriptor,\n\tOcrProviderInput,\n\tOcrProviderRegistration,\n\tOcrProviderRequest,\n\tOcrProviderResult,\n\tOcrRequest,\n\tOcrResult,\n\tOcrTransferResponse,\n\tOcrUploadRequest,\n} from \"./ocr.js\";\nexport { PluginMediaError } from \"./media.js\";\nexport type {\n\tPluginPromptAttachment,\n\tPluginPromptContext,\n\tPluginPromptContextJsonValue,\n} from \"./prompt-attachment.js\";\nexport { definePluginPromptContext } from \"./prompt-attachment.js\";\nexport type {\n\tPluginNetworkApi,\n\tPluginNetworkBody,\n\tPluginNetworkRequest,\n\tPluginNetworkResponse,\n} from \"./network.js\";\nexport type { PluginGatewayApi, PluginGatewayRequest, PluginGatewayResponse } from \"./gateway.js\";\nexport type {\n\tPluginPutBlobInput,\n\tPluginPutBlobFromFileInput,\n\tPluginStorageApi,\n\tPluginStorageChange,\n\tPluginStorageCommitOptions,\n\tPluginStorageCommitResult,\n\tPluginStorageEncoding,\n\tPluginStorageSnapshot,\n\tPluginStorageWrite,\n\tPluginStoredBlob,\n\tPluginStoredBlobRef,\n} from \"./storage.js\";\nexport { readJsonFile, writeJsonFile } from \"./storage.js\";\nexport type { PluginSecretsApi } from \"./secrets.js\";\n\n// i18n\nexport type {\n\tPluginLocaleCatalog,\n\tPluginLocales,\n\tPluginTranslate,\n\tPluginI18nApi,\n} from \"./i18n.js\";\nexport { interpolatePluginText, resolveCatalogKey, resolvePluginText } from \"./i18n.js\";\n\n// Context & lifecycle\nexport type {\n\tPluginPermissionApi,\n\tAgentMode,\n\tPluginActivationCleanup,\n\tPluginContext,\n\tPluginDefinition,\n} from \"./context.js\";\nexport { definePlugin } from \"./context.js\";\n\n// Host bridge (host-injected; plugins use hooks)\nexport type { PluginHostBridge } from \"./host-bridge.js\";\nexport { __setPluginHostBridge } from \"./host-bridge.js\";\n\n// Activity tab context\nexport type { ActivityTabContextValue } from \"./activity-tab.js\";\nexport { __ActivityTabContext, useActivityTab } from \"./activity-tab.js\";\n\n// React hooks\nexport type { PluginI18nContextValue, PluginTranslation } from \"./hooks.js\";\nexport {\n\t__PluginI18nContext,\n\tuseTranslation,\n\tuseActiveConversation,\n\tuseConversationMessages,\n\tusePromptAttachment,\n\tuseSidebarState,\n} from \"./hooks.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAgGtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AA+BxD,OAAO,EAAE,oCAAoC,EAAE,MAAM,YAAY,CAAC;AAelE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAmMxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAM9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAqBnE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAU3D,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAWxF,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAUxE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAI5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAIzD,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAIzE,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,eAAe,GACf,MAAM,YAAY,CAAC","sourcesContent":["/**\n * @vetta-org/plugin-sdk public surface.\n *\n * Implementation is split by domain under `src/*.ts`; this barrel re-exports\n * the stable package API. Prefer importing from `@vetta-org/plugin-sdk` rather\n * than deep paths.\n */\n\n// Core primitives\nexport type { ConversationScenario } from \"./scenario.js\";\nexport { PLUGIN_PERMISSIONS } from \"./permissions.js\";\nexport type { PluginPermission } from \"./permissions.js\";\nexport type { Disposable } from \"./disposable.js\";\nexport type {\n\tPluginAgentManifest,\n\tPluginBrowserManifest,\n\tPluginCliProviderManifest,\n\tPluginServiceArtifact,\n\tPluginServicePlatform,\n\tPluginServiceProviderManifest,\n\tPluginServiceRuntimeKind,\n\tPluginManifest,\n\tPluginManifestInput,\n\tPluginManifestResourceReference,\n\tPluginMcpServerConfig,\n\tPluginNetworkManifest,\n\tPluginSkillPresentation,\n\tPluginSkillPresentationRule,\n} from \"./manifest.js\";\n\n// File explorer\nexport type {\n\tPluginFileExplorerEntry,\n\tPluginWorkspaceRoot,\n\tPluginFileExplorerWhen,\n\tPluginFileExplorerActionContext,\n\tPluginFileExplorerContextMenuContribution,\n\tPluginFileExplorerToolbarContext,\n\tPluginFileExplorerToolbarContribution,\n\tPluginFileExplorerDecoration,\n\tPluginFileExplorerDecorationProvider,\n\tPluginFileExplorerChange,\n\tPluginFileExplorerRevealOptions,\n\tPluginFileExplorerApi,\n} from \"./file-explorer.js\";\n\n// Conversation\nexport type {\n\tConversationState,\n\tConversationMessage,\n\tConversationEvent,\n\tConversationQueueState,\n\tCreateSessionOptions,\n\tPluginConversationApi,\n\tSendPromptResult,\n} from \"./conversation.js\";\n\n// UI slots\nexport type {\n\tPluginGlobalSlotContribution,\n\tPluginAbilityDetailSlotContribution,\n\tPluginAbilityDetailSlotProps,\n\tPluginNavBadge,\n\tPluginNavBadgeTone,\n\tPluginWorkspaceViewProps,\n\tPluginWorkspaceViewContribution,\n\tPluginWorkspaceViewHeader,\n\tPluginSidebarState,\n\tPluginAudioMetadata,\n\tPluginPreviewUrlOptions,\n\tPluginPreviewFile,\n\tPluginPreviewFileRef,\n\tPluginFilePreviewProps,\n\tPluginFilePreviewContribution,\n\tPluginActivityTabContribution,\n\tPluginActivityTabRetention,\n\tPluginActivityTabTargetOptions,\n\tPluginCaptureRegion,\n\tPluginOpenActivityTabOptions,\n\tPluginPromptDecoration,\n\tPluginInputActionContribution,\n\tPluginNewSessionContext,\n\tPluginNewSessionContextActivation,\n\tPluginNewSessionContextContribution,\n\tPluginNewSessionTarget,\n\tCardDescriptor,\n\tPluginPendingToolCall,\n\tPluginCardProps,\n\tPluginCardRendererContribution,\n\tPluginToolCallSlotToolCall,\n\tPluginToolCallSlotProps,\n\tPluginToolCallSlotContribution,\n\tPluginTurnCardContribution,\n\tPluginNotifyOptions,\n\tPluginUiApi,\n} from \"./ui.js\";\n\n// Keyboard shortcuts (host ShortcutScopeStack)\nexport type {\n\tPluginShortcutScopeKind,\n\tPluginShortcutWhen,\n\tPluginShortcutBinding,\n\tPluginShortcutScopeContribution,\n\tPluginRegisterShortcutScope,\n\tUsePluginShortcutScopeOptions,\n} from \"./shortcuts.js\";\nexport { usePluginShortcutScope } from \"./shortcuts.js\";\n\n// Agent runtime\nexport type {\n\tPluginJsonSchema,\n\tPluginAgentToolApi,\n\tPluginAgentToolRegistration,\n\tPluginSystemPromptBlock,\n\tPluginDynamicSystemPromptOperation,\n\tPluginSystemPromptMessage,\n\tPluginSystemPromptProviderContext,\n\tPluginSystemPromptBlockView,\n\tPluginAgentActions,\n\tPluginAgentHandlerContext,\n\tPluginAgentToolHandler,\n\tPluginCodingAgentHookEvent,\n\tPluginCodingAgentHookEventName,\n\tPluginCodingAgentHookEventOf,\n\tPluginCodingAgentHookHandler,\n\tPluginCodingAgentHookHandlerContext,\n\tPluginCodingAgentHookRegistration,\n\tPluginCodingAgentHookResult,\n\tPluginCodingAgentHookTool,\n\tPluginCodingAgentPermissionMode,\n\tPluginSystemPromptProviderHandler,\n\tPluginSystemPromptProviderRegistration,\n\tPluginContinuationResult,\n\tPluginContinuationHandler,\n\tPluginContinuationRegistration,\n\tPluginAgentApi,\n} from \"./agent.js\";\nexport { PLUGIN_CODING_AGENT_HOOK_EVENT_NAMES } from \"./agent.js\";\n\n// App actions\nexport type {\n\tPluginAppActionEffect,\n\tPluginAppActionExample,\n\tPluginAppActionHandlerContext,\n\tPluginAppActionHandler,\n\tPluginAppActionReadyHandler,\n\tPluginAppActionApprovalPresentation,\n\tPluginAppActionApproval,\n\tPluginAppActionRegistration,\n\tPluginAppActionUsage,\n\tPluginAppActionsApi,\n} from \"./app-actions.js\";\nexport { PluginAppActionError } from \"./app-actions.js\";\n\n// Host-managed AI\nexport type {\n\tPluginAiApi,\n\tPluginAiChatAssistantMessage,\n\tPluginAiChatMessage,\n\tPluginAiChatRequest,\n\tPluginAiChatResult,\n\tPluginAiChatTool,\n\tPluginAiChatToolResultMessage,\n\tPluginAiChatUserMessage,\n\tPluginAiCompleteRequest,\n\tPluginAiCompleteResult,\n\tPluginAiStreamOptions,\n\tPluginAiTextDeltaEvent,\n\tPluginAiModel,\n\tPluginAiModelListResult,\n\tPluginAiToolCall,\n\tPluginAiUsage,\n} from \"./ai.js\";\n\n// Official host capabilities\nexport type {\n\tPluginOfficialGeneralSettings,\n\tPluginOfficialGeneralSettingsUpdate,\n\tPluginOfficialExperimentalSettings,\n\tPluginOfficialImageGenerationSettings,\n\tPluginOfficialImageGenerationSettingsUpdate,\n\tPluginOfficialDownloadItem,\n\tPluginOfficialUpdaterState,\n\tPluginOfficialWebhookKind,\n\tPluginOfficialWebhookEndpoint,\n\tPluginOfficialWebhookProvider,\n\tPluginOfficialWebhookCreateInput,\n\tPluginOfficialWebhookUpdateInput,\n\tPluginOfficialWebhookMessage,\n\tPluginOfficialWebhookSendResult,\n\tPluginOfficialSkillInfo,\n\tPluginOfficialInstalledSkill,\n\tPluginOfficialShortcutBinding,\n\tPluginOfficialQuickPanelSettings,\n\tPluginOfficialImStatus,\n\tPluginOfficialImLog,\n\tPluginOfficialMcpServerSummary,\n\tPluginOfficialMcpServerDetail,\n\tPluginOfficialMcpUpsertData,\n\tPluginOfficialExecutionMode,\n\tPluginOfficialSelectedSkill,\n\tPluginOfficialBatchProjectCreateData,\n\tPluginOfficialBatchProjectUpdateData,\n\tPluginOfficialSchedulerTaskCreateData,\n\tPluginOfficialSchedulerTaskUpdateData,\n\tPluginOfficialModelSummary,\n\tPluginOfficialProviderSummary,\n\tPluginOfficialProviderDetail,\n\tPluginOfficialProviderUpsertData,\n\tPluginOfficialProjectEntry,\n\tPluginOfficialSessionHandle,\n\tPluginOfficialNavigationOpenInput,\n\tPluginOfficialOpenFilesOptions,\n\tPluginOfficialOpenedFile,\n\tPluginOfficialSessionAccess,\n\tPluginOfficialSessionRunningEvent,\n\tPluginOfficialSessionSummary,\n\tPluginOfficialPluginSummary,\n\tPluginOfficialKnowledgeBase,\n\tPluginOfficialKnowledgeProcessingSettings,\n\tPluginOfficialApi,\n} from \"./official.js\";\n\n// Files / command / images / secrets\nexport type {\n\tPluginFsEntry,\n\tPluginFsFileRef,\n\tPluginFsBinaryReadResult,\n\tPluginFsStatResult,\n\tPluginFsReadResult,\n\tPluginFsApi,\n} from \"./fs.js\";\nexport type {\n\tPluginCommandRunOptions,\n\tPluginCommandRunResult,\n\tPluginCommandSpawnOptions,\n\tPluginCommandSpawnExit,\n\tPluginCommandSpawnStatus,\n\tPluginCommandSpawnHandle,\n\tPluginCommandApi,\n} from \"./command.js\";\nexport type {\n\tPluginCliProviderApi,\n\tPluginCliProviderPhase,\n\tPluginCliProviderStatus,\n} from \"./cli-provider.js\";\nexport type {\n\tPluginServiceApi,\n\tPluginServiceArtifactPayload,\n\tPluginServiceConnection,\n\tPluginServiceHostPlatform,\n\tPluginServicePhase,\n\tPluginServiceRequest,\n\tPluginServiceResponse,\n\tPluginServiceStatus,\n\tPluginServiceDataEncoding,\n} from \"./service-provider.js\";\nexport type { PluginModelDefinition, PluginModelProviderConfig, PluginModelsApi } from \"./models.js\";\nexport type {\n\tPluginBrowserAction,\n\tPluginBrowserActionResult,\n\tPluginBrowserApi,\n\tPluginBrowserPageState,\n\tPluginBrowserProfile,\n\tPluginBrowserRuntimePhase,\n\tPluginBrowserRuntimeStatus,\n\tPluginBrowserScreenshot,\n\tPluginBrowserSession,\n\tPluginBrowserSessionOptions,\n\tPluginBrowserSessionStatus,\n\tPluginBrowserSnapshot,\n\tPluginBrowserSource,\n\tPluginBrowserTextContent,\n} from \"./browser.js\";\nexport type {\n\tPluginCaptureApi,\n\tPluginOffscreenCaptureOptions,\n\tPluginOffscreenCaptureResult,\n} from \"./capture.js\";\nexport type { PluginImageRef } from \"./images.js\";\nexport type {\n\tPluginArtifactDestination,\n\tPluginArtifactRef,\n\tPluginArtifactsApi,\n\tPluginPersistedArtifact,\n} from \"./artifacts.js\";\nexport type {\n\tPluginJob,\n\tPluginJobFailure,\n\tPluginJobProgress,\n\tPluginJobRef,\n\tPluginJobsApi,\n\tPluginJobStatus,\n\tPluginJobWaitOptions,\n} from \"./jobs.js\";\nexport type {\n\tPluginMediaApi,\n\tPluginMediaArtifact,\n\tPluginMediaCapability,\n\tPluginMediaComposeRequest,\n\tPluginMediaDimensions,\n\tPluginMediaErrorCode,\n\tPluginMediaFailure,\n\tPluginMediaGenerateRequest,\n\tPluginMediaGenerationInputSlot,\n\tPluginMediaGenerationMode,\n\tPluginMediaGenerationModeCapability,\n\tPluginMediaInput,\n\tPluginMediaInputSource,\n\tPluginMediaInputUploadRequest,\n\tPluginMediaJob,\n\tPluginMediaKind,\n\tPluginMediaOperation,\n\tPluginMediaOutput,\n\tPluginMediaOutputKind,\n\tPluginMediaProviderDescriptor,\n\tPluginMediaGenerationModelDescriptor,\n\tPluginMediaProviderArtifact,\n\tPluginMediaProviderArtifactSource,\n\tPluginMediaProviderHandlerContext,\n\tPluginMediaProviderInput,\n\tPluginMediaProviderJob,\n\tPluginMediaProviderRegistration,\n\tPluginMediaProviderSubmitRequest,\n\tPluginMediaSubmitRequest,\n\tPluginMediaTranscodeRequest,\n\tPluginMediaTransferResponse,\n} from \"./media.js\";\n// OCR Provider protocol\nexport type {\n\tOcrBlock,\n\tOcrClient,\n\tOcrErrorCode,\n\tOcrItemResult,\n\tOcrInput,\n\tOcrProgress,\n\tOcrProviderContext,\n\tOcrProviderDescriptor,\n\tOcrProviderInput,\n\tOcrProviderRegistration,\n\tOcrProviderRequest,\n\tOcrProviderResult,\n\tOcrRequest,\n\tOcrResult,\n\tOcrTransferResponse,\n\tOcrUploadRequest,\n} from \"./ocr.js\";\nexport { PluginMediaError } from \"./media.js\";\nexport type {\n\tPluginPromptAttachment,\n\tPluginPromptContext,\n\tPluginPromptContextJsonValue,\n} from \"./prompt-attachment.js\";\nexport { definePluginPromptContext } from \"./prompt-attachment.js\";\nexport type {\n\tPluginNetworkApi,\n\tPluginNetworkBody,\n\tPluginNetworkRequest,\n\tPluginNetworkResponse,\n} from \"./network.js\";\nexport type { PluginGatewayApi, PluginGatewayRequest, PluginGatewayResponse } from \"./gateway.js\";\nexport type {\n\tPluginPutBlobInput,\n\tPluginPutBlobFromFileInput,\n\tPluginStorageApi,\n\tPluginStorageChange,\n\tPluginStorageCommitOptions,\n\tPluginStorageCommitResult,\n\tPluginStorageEncoding,\n\tPluginStorageSnapshot,\n\tPluginStorageWrite,\n\tPluginStoredBlob,\n\tPluginStoredBlobRef,\n} from \"./storage.js\";\nexport { readJsonFile, writeJsonFile } from \"./storage.js\";\nexport type { PluginSecretsApi } from \"./secrets.js\";\n\n// i18n\nexport type {\n\tPluginLocaleCatalog,\n\tPluginLocales,\n\tPluginTranslate,\n\tPluginI18nApi,\n} from \"./i18n.js\";\nexport { interpolatePluginText, resolveCatalogKey, resolvePluginText } from \"./i18n.js\";\n\n// Build-bound logging\nexport type {\n\tPluginLogEntry,\n\tPluginLogFields,\n\tPluginLogIdentity,\n\tPluginLogLevel,\n\tPluginLogger,\n\tPluginLogSink,\n} from \"./logging.js\";\nexport { __createPluginLogger, __setPluginLogSink } from \"./logging.js\";\n\n// Context & lifecycle\nexport type {\n\tPluginPermissionApi,\n\tAgentMode,\n\tPluginActivationCleanup,\n\tPluginContext,\n\tPluginDefinition,\n} from \"./context.js\";\nexport { definePlugin } from \"./context.js\";\n\n// Host bridge (host-injected; plugins use hooks)\nexport type { PluginHostBridge } from \"./host-bridge.js\";\nexport { __setPluginHostBridge } from \"./host-bridge.js\";\n\n// Activity tab context\nexport type { ActivityTabContextValue } from \"./activity-tab.js\";\nexport { __ActivityTabContext, useActivityTab } from \"./activity-tab.js\";\n\n// React hooks\nexport type { PluginI18nContextValue, PluginTranslation } from \"./hooks.js\";\nexport {\n\t__PluginI18nContext,\n\tuseTranslation,\n\tuseActiveConversation,\n\tuseConversationMessages,\n\tusePromptAttachment,\n\tuseSidebarState,\n} from \"./hooks.js\";\n"]}
@@ -0,0 +1,11 @@
1
+ import type { PluginLogger } from "./logging.js";
2
+ /**
3
+ * Build-bound plugin logger.
4
+ *
5
+ * `@vetta-org/plugin-vite` replaces this module with a facade whose immutable
6
+ * identity comes from the validated `plugin.json`. The fallback deliberately
7
+ * fails on use so an unsupported build pipeline cannot emit unscoped logs.
8
+ */
9
+ export declare const logger: PluginLogger;
10
+ export type { PluginLogFields, PluginLogLevel, PluginLogger } from "./logging.js";
11
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAQlE;;;;;;GAMG;AACH,eAAO,MAAM,MAAM,EAAE,YAMnB,CAAC;AAEH,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC","sourcesContent":["import type { PluginLogFields, PluginLogger } from \"./logging.js\";\n\nfunction unavailable(): never {\n\tthrow new Error(\n\t\t\"Plugin logger is not bound. Build this plugin with a compatible @vetta-org/plugin-vite release.\",\n\t);\n}\n\n/**\n * Build-bound plugin logger.\n *\n * `@vetta-org/plugin-vite` replaces this module with a facade whose immutable\n * identity comes from the validated `plugin.json`. The fallback deliberately\n * fails on use so an unsupported build pipeline cannot emit unscoped logs.\n */\nexport const logger: PluginLogger = Object.freeze({\n\tdebug: (_message: string, _fields?: PluginLogFields) => unavailable(),\n\tinfo: (_message: string, _fields?: PluginLogFields) => unavailable(),\n\twarn: (_message: string, _fields?: PluginLogFields) => unavailable(),\n\terror: (_message: string, _fields?: PluginLogFields) => unavailable(),\n\tchild: (_scope: string) => unavailable(),\n});\n\nexport type { PluginLogFields, PluginLogLevel, PluginLogger } from \"./logging.js\";\n"]}
package/dist/logger.js ADDED
@@ -0,0 +1,18 @@
1
+ function unavailable() {
2
+ throw new Error("Plugin logger is not bound. Build this plugin with a compatible @vetta-org/plugin-vite release.");
3
+ }
4
+ /**
5
+ * Build-bound plugin logger.
6
+ *
7
+ * `@vetta-org/plugin-vite` replaces this module with a facade whose immutable
8
+ * identity comes from the validated `plugin.json`. The fallback deliberately
9
+ * fails on use so an unsupported build pipeline cannot emit unscoped logs.
10
+ */
11
+ export const logger = Object.freeze({
12
+ debug: (_message, _fields) => unavailable(),
13
+ info: (_message, _fields) => unavailable(),
14
+ warn: (_message, _fields) => unavailable(),
15
+ error: (_message, _fields) => unavailable(),
16
+ child: (_scope) => unavailable(),
17
+ });
18
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../src/logger.ts"],"names":[],"mappings":"AAEA,SAAS,WAAW,GAAU;IAC7B,MAAM,IAAI,KAAK,CACd,iGAAiG,CACjG,CAAC;AAAA,CACF;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,MAAM,GAAiB,MAAM,CAAC,MAAM,CAAC;IACjD,KAAK,EAAE,CAAC,QAAgB,EAAE,OAAyB,EAAE,EAAE,CAAC,WAAW,EAAE;IACrE,IAAI,EAAE,CAAC,QAAgB,EAAE,OAAyB,EAAE,EAAE,CAAC,WAAW,EAAE;IACpE,IAAI,EAAE,CAAC,QAAgB,EAAE,OAAyB,EAAE,EAAE,CAAC,WAAW,EAAE;IACpE,KAAK,EAAE,CAAC,QAAgB,EAAE,OAAyB,EAAE,EAAE,CAAC,WAAW,EAAE;IACrE,KAAK,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,WAAW,EAAE;CACxC,CAAC,CAAC","sourcesContent":["import type { PluginLogFields, PluginLogger } from \"./logging.js\";\n\nfunction unavailable(): never {\n\tthrow new Error(\n\t\t\"Plugin logger is not bound. Build this plugin with a compatible @vetta-org/plugin-vite release.\",\n\t);\n}\n\n/**\n * Build-bound plugin logger.\n *\n * `@vetta-org/plugin-vite` replaces this module with a facade whose immutable\n * identity comes from the validated `plugin.json`. The fallback deliberately\n * fails on use so an unsupported build pipeline cannot emit unscoped logs.\n */\nexport const logger: PluginLogger = Object.freeze({\n\tdebug: (_message: string, _fields?: PluginLogFields) => unavailable(),\n\tinfo: (_message: string, _fields?: PluginLogFields) => unavailable(),\n\twarn: (_message: string, _fields?: PluginLogFields) => unavailable(),\n\terror: (_message: string, _fields?: PluginLogFields) => unavailable(),\n\tchild: (_scope: string) => unavailable(),\n});\n\nexport type { PluginLogFields, PluginLogLevel, PluginLogger } from \"./logging.js\";\n"]}
@@ -0,0 +1,26 @@
1
+ export type PluginLogLevel = "debug" | "info" | "warn" | "error";
2
+ export type PluginLogFields = Readonly<Record<string, unknown>>;
3
+ export interface PluginLogger {
4
+ debug(message: string, fields?: PluginLogFields): void;
5
+ info(message: string, fields?: PluginLogFields): void;
6
+ warn(message: string, fields?: PluginLogFields): void;
7
+ error(message: string, fields?: PluginLogFields): void;
8
+ child(scope: string): PluginLogger;
9
+ }
10
+ export interface PluginLogIdentity {
11
+ id: string;
12
+ version: string;
13
+ }
14
+ export interface PluginLogEntry {
15
+ level: PluginLogLevel;
16
+ plugin: PluginLogIdentity;
17
+ scope?: string;
18
+ message: string;
19
+ fields?: PluginLogFields;
20
+ }
21
+ export type PluginLogSink = (entry: PluginLogEntry) => void;
22
+ /** Host-only: install the sink used by build-bound plugin loggers. */
23
+ export declare function __setPluginLogSink(sink: PluginLogSink | undefined): void;
24
+ /** Build-tool entry point. Plugin authors import the bound facade from `@vetta-org/plugin-sdk/logger`. */
25
+ export declare function __createPluginLogger(plugin: PluginLogIdentity, scope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AAiB,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,CAa5F","sourcesContent":["export type PluginLogLevel = \"debug\" | \"info\" | \"warn\" | \"error\";\n\nexport type PluginLogFields = Readonly<Record<string, unknown>>;\n\nexport interface PluginLogger {\n\tdebug(message: string, fields?: PluginLogFields): void;\n\tinfo(message: string, fields?: PluginLogFields): void;\n\twarn(message: string, fields?: PluginLogFields): void;\n\terror(message: string, fields?: PluginLogFields): void;\n\tchild(scope: string): PluginLogger;\n}\n\nexport interface PluginLogIdentity {\n\tid: string;\n\tversion: string;\n}\n\nexport interface PluginLogEntry {\n\tlevel: PluginLogLevel;\n\tplugin: PluginLogIdentity;\n\tscope?: string;\n\tmessage: string;\n\tfields?: PluginLogFields;\n}\n\nexport type PluginLogSink = (entry: PluginLogEntry) => void;\n\nlet pluginLogSink: PluginLogSink | undefined;\n\n/** Host-only: install the sink used by build-bound plugin loggers. */\nexport function __setPluginLogSink(sink: PluginLogSink | undefined): void {\n\tpluginLogSink = sink;\n}\n\nfunction joinScope(parent: string | undefined, child: string): string {\n\tconst normalized = child.trim();\n\tif (!normalized) throw new Error(\"Plugin logger scope must not be empty\");\n\treturn parent ? `${parent}.${normalized}` : normalized;\n}\n\nfunction emit(\n\tplugin: PluginLogIdentity,\n\tscope: string | undefined,\n\tlevel: PluginLogLevel,\n\tmessage: string,\n\tfields: PluginLogFields | undefined,\n): void {\n\tif (!pluginLogSink) throw new Error(\"Vetta plugin log sink is not installed\");\n\tpluginLogSink({\n\t\tlevel,\n\t\tplugin,\n\t\t...(scope ? { scope } : {}),\n\t\tmessage,\n\t\t...(fields ? { fields } : {}),\n\t});\n}\n\n/** Build-tool entry point. Plugin authors import the bound facade from `@vetta-org/plugin-sdk/logger`. */\nexport function __createPluginLogger(plugin: PluginLogIdentity, scope?: string): PluginLogger {\n\tconst identity = Object.freeze({ id: plugin.id, version: plugin.version });\n\tconst write = (level: PluginLogLevel, message: string, fields?: PluginLogFields): void => {\n\t\temit(identity, scope, level, message, fields);\n\t};\n\tconst logger: PluginLogger = {\n\t\tdebug: (message, fields) => write(\"debug\", message, fields),\n\t\tinfo: (message, fields) => write(\"info\", message, fields),\n\t\twarn: (message, fields) => write(\"warn\", message, fields),\n\t\terror: (message, fields) => write(\"error\", message, fields),\n\t\tchild: (childScope) => __createPluginLogger(identity, joinScope(scope, childScope)),\n\t};\n\treturn Object.freeze(logger);\n}\n"]}
@@ -0,0 +1,38 @@
1
+ let pluginLogSink;
2
+ /** Host-only: install the sink used by build-bound plugin loggers. */
3
+ export function __setPluginLogSink(sink) {
4
+ pluginLogSink = sink;
5
+ }
6
+ function joinScope(parent, child) {
7
+ const normalized = child.trim();
8
+ if (!normalized)
9
+ throw new Error("Plugin logger scope must not be empty");
10
+ return parent ? `${parent}.${normalized}` : normalized;
11
+ }
12
+ function emit(plugin, scope, level, message, fields) {
13
+ if (!pluginLogSink)
14
+ throw new Error("Vetta plugin log sink is not installed");
15
+ pluginLogSink({
16
+ level,
17
+ plugin,
18
+ ...(scope ? { scope } : {}),
19
+ message,
20
+ ...(fields ? { fields } : {}),
21
+ });
22
+ }
23
+ /** Build-tool entry point. Plugin authors import the bound facade from `@vetta-org/plugin-sdk/logger`. */
24
+ export function __createPluginLogger(plugin, scope) {
25
+ const identity = Object.freeze({ id: plugin.id, version: plugin.version });
26
+ const write = (level, message, fields) => {
27
+ emit(identity, scope, level, message, fields);
28
+ };
29
+ const logger = {
30
+ debug: (message, fields) => write("debug", message, fields),
31
+ info: (message, fields) => write("info", message, fields),
32
+ warn: (message, fields) => write("warn", message, fields),
33
+ error: (message, fields) => write("error", message, fields),
34
+ child: (childScope) => __createPluginLogger(identity, joinScope(scope, childScope)),
35
+ };
36
+ return Object.freeze(logger);
37
+ }
38
+ //# sourceMappingURL=logging.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.js","sourceRoot":"","sources":["../src/logging.ts"],"names":[],"mappings":"AA2BA,IAAI,aAAwC,CAAC;AAE7C,sEAAsE;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KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;QAC3D,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC;QACzD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC;QACzD,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;QAC3D,KAAK,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,oBAAoB,CAAC,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;KACnF,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAAA,CAC7B","sourcesContent":["export type PluginLogLevel = \"debug\" | \"info\" | \"warn\" | \"error\";\n\nexport type PluginLogFields = Readonly<Record<string, unknown>>;\n\nexport interface PluginLogger {\n\tdebug(message: string, fields?: PluginLogFields): void;\n\tinfo(message: string, fields?: PluginLogFields): void;\n\twarn(message: string, fields?: PluginLogFields): void;\n\terror(message: string, fields?: PluginLogFields): void;\n\tchild(scope: string): PluginLogger;\n}\n\nexport interface PluginLogIdentity {\n\tid: string;\n\tversion: string;\n}\n\nexport interface PluginLogEntry {\n\tlevel: PluginLogLevel;\n\tplugin: PluginLogIdentity;\n\tscope?: string;\n\tmessage: string;\n\tfields?: PluginLogFields;\n}\n\nexport type PluginLogSink = (entry: PluginLogEntry) => void;\n\nlet pluginLogSink: PluginLogSink | undefined;\n\n/** Host-only: install the sink used by build-bound plugin loggers. */\nexport function __setPluginLogSink(sink: PluginLogSink | undefined): void {\n\tpluginLogSink = sink;\n}\n\nfunction joinScope(parent: string | undefined, child: string): string {\n\tconst normalized = child.trim();\n\tif (!normalized) throw new Error(\"Plugin logger scope must not be empty\");\n\treturn parent ? `${parent}.${normalized}` : normalized;\n}\n\nfunction emit(\n\tplugin: PluginLogIdentity,\n\tscope: string | undefined,\n\tlevel: PluginLogLevel,\n\tmessage: string,\n\tfields: PluginLogFields | undefined,\n): void {\n\tif (!pluginLogSink) throw new Error(\"Vetta plugin log sink is not installed\");\n\tpluginLogSink({\n\t\tlevel,\n\t\tplugin,\n\t\t...(scope ? { scope } : {}),\n\t\tmessage,\n\t\t...(fields ? { fields } : {}),\n\t});\n}\n\n/** Build-tool entry point. Plugin authors import the bound facade from `@vetta-org/plugin-sdk/logger`. */\nexport function __createPluginLogger(plugin: PluginLogIdentity, scope?: string): PluginLogger {\n\tconst identity = Object.freeze({ id: plugin.id, version: plugin.version });\n\tconst write = (level: PluginLogLevel, message: string, fields?: PluginLogFields): void => {\n\t\temit(identity, scope, level, message, fields);\n\t};\n\tconst logger: PluginLogger = {\n\t\tdebug: (message, fields) => write(\"debug\", message, fields),\n\t\tinfo: (message, fields) => write(\"info\", message, fields),\n\t\twarn: (message, fields) => write(\"warn\", message, fields),\n\t\terror: (message, fields) => write(\"error\", message, fields),\n\t\tchild: (childScope) => __createPluginLogger(identity, joinScope(scope, childScope)),\n\t};\n\treturn Object.freeze(logger);\n}\n"]}
package/dist/media.d.ts CHANGED
@@ -87,6 +87,17 @@ export interface PluginMediaGenerationModeCapability {
87
87
  aspectRatioPolicy?: "configurable" | "input-derived";
88
88
  audioGeneration?: "none" | "always" | "optional";
89
89
  }
90
+ export interface PluginMediaGenerationModelDescriptor {
91
+ id: string;
92
+ displayName?: string;
93
+ sourceId?: string;
94
+ sourceDisplayName?: string;
95
+ modes: readonly PluginMediaGenerationMode[];
96
+ aspectRatios?: readonly string[];
97
+ /** Provider-defined stable option ids; consumers must not infer pixel dimensions from their names. */
98
+ resolutions?: readonly string[];
99
+ defaultResolution?: string;
100
+ }
90
101
  export type PluginMediaCapability = {
91
102
  operation: "generate";
92
103
  kind: "image" | "video";
@@ -96,6 +107,10 @@ export type PluginMediaCapability = {
96
107
  resolutions?: readonly string[];
97
108
  /** Preferred option when the consumer has no supported persisted resolution. */
98
109
  defaultResolution?: string;
110
+ /** Optional per-model catalog. Missing means this is a legacy provider with provider-level capabilities only. */
111
+ models?: readonly PluginMediaGenerationModelDescriptor[];
112
+ /** Model used when a consumer does not send modelId. */
113
+ defaultModelId?: string;
99
114
  durationsSeconds?: readonly number[];
100
115
  modeCapabilities?: readonly PluginMediaGenerationModeCapability[];
101
116
  } | {
@@ -146,6 +161,11 @@ export interface PluginMediaTransferResponse<T = unknown> {
146
161
  }
147
162
  export interface PluginMediaProviderHandlerContext {
148
163
  readonly invocationId: string;
164
+ /** Reads an input that belongs to this invocation without exposing its backing path. */
165
+ readInput(inputId: string): Promise<{
166
+ mimeType: string;
167
+ data: Uint8Array;
168
+ }>;
149
169
  uploadInput<T = unknown>(inputId: string, request: PluginMediaInputUploadRequest): Promise<PluginMediaTransferResponse<T>>;
150
170
  }
151
171
  export type PluginMediaProviderArtifactSource = {
@@ -1 +1 @@
1
- {"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;AACvE,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAChE,MAAM,MAAM,oBAAoB,GAAG,UAAU,GAAG,SAAS,GAAG,WAAW,CAAC;AAExE,MAAM,MAAM,yBAAyB,GAClC,eAAe,GACf,gBAAgB,GAChB,eAAe,GACf,gBAAg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CAAC,sBAAsB,CAAC,CAAC;IACpG,SAAS,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,iCAAiC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACvG;AAED,MAAM,WAAW,cAAc;IAC9B,gBAAgB,CAAC,YAAY,EAAE,+BAA+B,GAAG,UAAU,CAAC;IAC5E,aAAa,IAAI,OAAO,CAAC,SAAS,6BAA6B,EAAE,CAAC,CAAC;IACnE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;IACrD,MAAM,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACnE","sourcesContent":["import type { PluginArtifactRef } from \"./artifacts.js\";\nimport type { Disposable } from \"./disposable.js\";\nimport type { PluginJob, PluginJobFailure } from \"./jobs.js\";\n\nexport type PluginMediaKind = \"image\" | \"video\" | \"audio\" | \"document\";\nexport type PluginMediaOutputKind = \"image\" | \"video\" | \"audio\";\nexport type PluginMediaOperation = \"generate\" | \"compose\" | \"transcode\";\n\nexport type PluginMediaGenerationMode =\n\t| \"text-to-image\"\n\t| \"image-to-image\"\n\t| \"text-to-video\"\n\t| \"image-to-video\"\n\t| \"video-to-video\"\n\t| \"reference-to-video\";\n\nexport type PluginMediaErrorCode =\n\t| \"unauthenticated\"\n\t| \"provider-unavailable\"\n\t| \"operation-unsupported\"\n\t| \"invalid-request\"\n\t| \"not-entitled\"\n\t| \"quota-exhausted\"\n\t| \"content-rejected\"\n\t| \"provider-timeout\"\n\t| \"provider-failed\"\n\t| \"cancelled\";\n\nexport interface PluginMediaFailure extends PluginJobFailure {\n\tcode: PluginMediaErrorCode;\n}\n\nexport class PluginMediaError extends Error {\n\treadonly code: PluginMediaErrorCode;\n\treadonly retryable: boolean;\n\n\tconstructor(failure: PluginMediaFailure) {\n\t\tsuper(failure.message);\n\t\tthis.name = \"PluginMediaError\";\n\t\tthis.code = failure.code;\n\t\tthis.retryable = failure.retryable;\n\t}\n}\n\nexport interface PluginMediaDimensions {\n\twidth: number;\n\theight: number;\n}\n\nexport type PluginMediaInputSource =\n\t| { type: \"plugin-blob\"; blobId: string }\n\t| { type: \"workspace-file\"; path: string };\n\nexport interface PluginMediaInput {\n\tid?: string;\n\trole?: string;\n\tkind: PluginMediaKind;\n\tmimeType?: string;\n\tsource: PluginMediaInputSource;\n}\n\nexport interface PluginMediaOutput {\n\tkind: PluginMediaOutputKind;\n\tmimeType: string;\n\tdimensions?: PluginMediaDimensions;\n\tfps?: number;\n\tdurationSeconds?: number;\n\tvideoCodec?: string;\n\taudioCodec?: string;\n}\n\nexport interface PluginMediaArtifact extends PluginArtifactRef {\n\tkind: PluginMediaOutputKind;\n\twidth?: number;\n\theight?: number;\n\tdurationSeconds?: number;\n}\n\nexport interface PluginMediaGenerateRequest {\n\toperation: \"generate\";\n\tproviderId: string;\n\tkind: \"image\" | \"video\";\n\tmode: PluginMediaGenerationMode;\n\tprompt: string;\n\tmodelId?: string;\n\tdimensions?: PluginMediaDimensions;\n\taspectRatio?: string;\n\tresolution?: string;\n\tdurationSeconds?: number;\n\tinputs?: readonly PluginMediaInput[];\n}\n\nexport interface PluginMediaComposeRequest {\n\toperation: \"compose\";\n\tproviderId: string;\n\tinputs: readonly PluginMediaInput[];\n\toutput: PluginMediaOutput;\n}\n\nexport interface PluginMediaTranscodeRequest {\n\toperation: \"transcode\";\n\tproviderId: string;\n\tinputs: readonly PluginMediaInput[];\n\toutput: PluginMediaOutput;\n}\n\nexport type PluginMediaSubmitRequest =\n\t| PluginMediaGenerateRequest\n\t| PluginMediaComposeRequest\n\t| PluginMediaTranscodeRequest;\n\nexport interface PluginMediaGenerationInputSlot {\n\trole: string;\n\tkinds: readonly PluginMediaKind[];\n\tminItems: number;\n\tmaxItems: number;\n}\n\nexport interface PluginMediaGenerationModeCapability {\n\tmode: PluginMediaGenerationMode;\n\tinputs: readonly PluginMediaGenerationInputSlot[];\n\tminTotalItems?: number;\n\tmaxTotalItems?: number;\n\taspectRatioPolicy?: \"configurable\" | \"input-derived\";\n\taudioGeneration?: \"none\" | \"always\" | \"optional\";\n}\n\nexport type PluginMediaCapability =\n\t| {\n\t\t\toperation: \"generate\";\n\t\t\tkind: \"image\" | \"video\";\n\t\t\tmodes: readonly PluginMediaGenerationMode[];\n\t\t\taspectRatios?: readonly string[];\n\t\t\t/** Provider-defined stable option ids; consumers must not infer pixel dimensions from their names. */\n\t\t\tresolutions?: readonly string[];\n\t\t\t/** Preferred option when the consumer has no supported persisted resolution. */\n\t\t\tdefaultResolution?: string;\n\t\t\tdurationsSeconds?: readonly number[];\n\t\t\tmodeCapabilities?: readonly PluginMediaGenerationModeCapability[];\n\t }\n\t| {\n\t\t\toperation: \"compose\";\n\t\t\tdocumentMimeTypes: readonly string[];\n\t\t\toutputMimeTypes: readonly string[];\n\t }\n\t| {\n\t\t\toperation: \"transcode\";\n\t\t\tinputMimeTypes: readonly string[];\n\t\t\toutputMimeTypes: readonly string[];\n\t };\n\nexport interface PluginMediaProviderDescriptor {\n\t/** Host-qualified provider id. */\n\tid: string;\n\tdisplayName?: string;\n\townerId: string;\n\tprotocolVersion: number;\n\tcapabilities: readonly PluginMediaCapability[];\n}\n\nexport type PluginMediaJob = Omit<PluginJob<PluginMediaArtifact>, \"error\"> & {\n\terror?: PluginMediaFailure;\n};\n\n/** A media input exposed to its provider without revealing its storage location. */\nexport interface PluginMediaProviderInput {\n\tid: string;\n\trole?: string;\n\tkind: PluginMediaKind;\n\tmimeType?: string;\n}\n\ntype ProviderRequest<Request extends PluginMediaSubmitRequest> = Omit<Request, \"providerId\" | \"inputs\"> & {\n\treadonly inputs: readonly PluginMediaProviderInput[];\n};\n\nexport type PluginMediaProviderSubmitRequest =\n\tPluginMediaSubmitRequest extends infer Request\n\t\t? Request extends PluginMediaSubmitRequest\n\t\t\t? ProviderRequest<Request>\n\t\t\t: never\n\t\t: never;\n\nexport interface PluginMediaInputUploadRequest {\n\turl: string;\n\tfieldName: string;\n\tfileName?: string;\n\tfields?: Record<string, string>;\n\theaders?: Record<string, string>;\n\ttimeoutMs?: number;\n}\n\nexport interface PluginMediaTransferResponse<T = unknown> {\n\tok: boolean;\n\tstatus: number;\n\tstatusText: string;\n\theaders: Record<string, string>;\n\tbody: T;\n}\n\nexport interface PluginMediaProviderHandlerContext {\n\treadonly invocationId: string;\n\tuploadInput<T = unknown>(\n\t\tinputId: string,\n\t\trequest: PluginMediaInputUploadRequest,\n\t): Promise<PluginMediaTransferResponse<T>>;\n}\n\nexport type PluginMediaProviderArtifactSource =\n\t| { type: \"remote-url\"; url: string; headers?: Record<string, string> }\n\t| { type: \"plugin-blob\"; blobId: string }\n\t| { type: \"workspace-file\"; path: string };\n\nexport interface PluginMediaProviderArtifact {\n\tkind: PluginMediaOutputKind;\n\tmimeType?: string;\n\tname?: string;\n\twidth?: number;\n\theight?: number;\n\tdurationSeconds?: number;\n\tsource: PluginMediaProviderArtifactSource;\n}\n\nexport interface PluginMediaProviderJob {\n\tid: string;\n\tstatus: PluginMediaJob[\"status\"];\n\tprogress?: number;\n\tartifacts?: readonly PluginMediaProviderArtifact[];\n\terror?: PluginMediaFailure;\n}\n\nexport interface PluginMediaProviderRegistration {\n\tid: string;\n\tdisplayName?: string;\n\tcapabilities: readonly PluginMediaCapability[];\n\tsubmit(\n\t\trequest: PluginMediaProviderSubmitRequest,\n\t\tcontext: PluginMediaProviderHandlerContext,\n\t): Promise<PluginMediaProviderJob>;\n\tgetJob?(jobId: string, context: PluginMediaProviderHandlerContext): Promise<PluginMediaProviderJob>;\n\tcancelJob?(jobId: string, context: PluginMediaProviderHandlerContext): Promise<PluginMediaProviderJob>;\n}\n\nexport interface PluginMediaApi {\n\tregisterProvider(registration: PluginMediaProviderRegistration): Disposable;\n\tlistProviders(): Promise<readonly PluginMediaProviderDescriptor[]>;\n\tonProvidersChanged(listener: () => void): Disposable;\n\tsubmit(request: PluginMediaSubmitRequest): Promise<PluginMediaJob>;\n}\n"]}
1
+ {"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AM,EAAE,OAAO,EAAE,iCAAiC,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;CACvG;AAED,MAAM,WAAW,cAAc;IAC9B,gBAAgB,CAAC,YAAY,EAAE,+BAA+B,GAAG,UAAU,CAAC;IAC5E,aAAa,IAAI,OAAO,CAAC,SAAS,6BAA6B,EAAE,CAAC,CAAC;IACnE,kBAAkB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;IACrD,MAAM,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;CACnE","sourcesContent":["import type { PluginArtifactRef } from \"./artifacts.js\";\nimport type { Disposable } from \"./disposable.js\";\nimport type { PluginJob, PluginJobFailure } from \"./jobs.js\";\n\nexport type PluginMediaKind = \"image\" | \"video\" | \"audio\" | \"document\";\nexport type PluginMediaOutputKind = \"image\" | \"video\" | \"audio\";\nexport type PluginMediaOperation = \"generate\" | \"compose\" | \"transcode\";\n\nexport type PluginMediaGenerationMode =\n\t| \"text-to-image\"\n\t| \"image-to-image\"\n\t| \"text-to-video\"\n\t| \"image-to-video\"\n\t| \"video-to-video\"\n\t| \"reference-to-video\";\n\nexport type PluginMediaErrorCode =\n\t| \"unauthenticated\"\n\t| \"provider-unavailable\"\n\t| \"operation-unsupported\"\n\t| \"invalid-request\"\n\t| \"not-entitled\"\n\t| \"quota-exhausted\"\n\t| \"content-rejected\"\n\t| \"provider-timeout\"\n\t| \"provider-failed\"\n\t| \"cancelled\";\n\nexport interface PluginMediaFailure extends PluginJobFailure {\n\tcode: PluginMediaErrorCode;\n}\n\nexport class PluginMediaError extends Error {\n\treadonly code: PluginMediaErrorCode;\n\treadonly retryable: boolean;\n\n\tconstructor(failure: PluginMediaFailure) {\n\t\tsuper(failure.message);\n\t\tthis.name = \"PluginMediaError\";\n\t\tthis.code = failure.code;\n\t\tthis.retryable = failure.retryable;\n\t}\n}\n\nexport interface PluginMediaDimensions {\n\twidth: number;\n\theight: number;\n}\n\nexport type PluginMediaInputSource =\n\t| { type: \"plugin-blob\"; blobId: string }\n\t| { type: \"workspace-file\"; path: string };\n\nexport interface PluginMediaInput {\n\tid?: string;\n\trole?: string;\n\tkind: PluginMediaKind;\n\tmimeType?: string;\n\tsource: PluginMediaInputSource;\n}\n\nexport interface PluginMediaOutput {\n\tkind: PluginMediaOutputKind;\n\tmimeType: string;\n\tdimensions?: PluginMediaDimensions;\n\tfps?: number;\n\tdurationSeconds?: number;\n\tvideoCodec?: string;\n\taudioCodec?: string;\n}\n\nexport interface PluginMediaArtifact extends PluginArtifactRef {\n\tkind: PluginMediaOutputKind;\n\twidth?: number;\n\theight?: number;\n\tdurationSeconds?: number;\n}\n\nexport interface PluginMediaGenerateRequest {\n\toperation: \"generate\";\n\tproviderId: string;\n\tkind: \"image\" | \"video\";\n\tmode: PluginMediaGenerationMode;\n\tprompt: string;\n\tmodelId?: string;\n\tdimensions?: PluginMediaDimensions;\n\taspectRatio?: string;\n\tresolution?: string;\n\tdurationSeconds?: number;\n\tinputs?: readonly PluginMediaInput[];\n}\n\nexport interface PluginMediaComposeRequest {\n\toperation: \"compose\";\n\tproviderId: string;\n\tinputs: readonly PluginMediaInput[];\n\toutput: PluginMediaOutput;\n}\n\nexport interface PluginMediaTranscodeRequest {\n\toperation: \"transcode\";\n\tproviderId: string;\n\tinputs: readonly PluginMediaInput[];\n\toutput: PluginMediaOutput;\n}\n\nexport type PluginMediaSubmitRequest =\n\t| PluginMediaGenerateRequest\n\t| PluginMediaComposeRequest\n\t| PluginMediaTranscodeRequest;\n\nexport interface PluginMediaGenerationInputSlot {\n\trole: string;\n\tkinds: readonly PluginMediaKind[];\n\tminItems: number;\n\tmaxItems: number;\n}\n\nexport interface PluginMediaGenerationModeCapability {\n\tmode: PluginMediaGenerationMode;\n\tinputs: readonly PluginMediaGenerationInputSlot[];\n\tminTotalItems?: number;\n\tmaxTotalItems?: number;\n\taspectRatioPolicy?: \"configurable\" | \"input-derived\";\n\taudioGeneration?: \"none\" | \"always\" | \"optional\";\n}\n\nexport interface PluginMediaGenerationModelDescriptor {\n\tid: string;\n\tdisplayName?: string;\n\tsourceId?: string;\n\tsourceDisplayName?: string;\n\tmodes: readonly PluginMediaGenerationMode[];\n\taspectRatios?: readonly string[];\n\t/** Provider-defined stable option ids; consumers must not infer pixel dimensions from their names. */\n\tresolutions?: readonly string[];\n\tdefaultResolution?: string;\n}\n\nexport type PluginMediaCapability =\n\t| {\n\t\t\toperation: \"generate\";\n\t\t\tkind: \"image\" | \"video\";\n\t\t\tmodes: readonly PluginMediaGenerationMode[];\n\t\t\taspectRatios?: readonly string[];\n\t\t\t/** Provider-defined stable option ids; consumers must not infer pixel dimensions from their names. */\n\t\t\tresolutions?: readonly string[];\n\t\t\t/** Preferred option when the consumer has no supported persisted resolution. */\n\t\t\tdefaultResolution?: string;\n\t\t\t/** Optional per-model catalog. Missing means this is a legacy provider with provider-level capabilities only. */\n\t\t\tmodels?: readonly PluginMediaGenerationModelDescriptor[];\n\t\t\t/** Model used when a consumer does not send modelId. */\n\t\t\tdefaultModelId?: string;\n\t\t\tdurationsSeconds?: readonly number[];\n\t\t\tmodeCapabilities?: readonly PluginMediaGenerationModeCapability[];\n\t }\n\t| {\n\t\t\toperation: \"compose\";\n\t\t\tdocumentMimeTypes: readonly string[];\n\t\t\toutputMimeTypes: readonly string[];\n\t }\n\t| {\n\t\t\toperation: \"transcode\";\n\t\t\tinputMimeTypes: readonly string[];\n\t\t\toutputMimeTypes: readonly string[];\n\t };\n\nexport interface PluginMediaProviderDescriptor {\n\t/** Host-qualified provider id. */\n\tid: string;\n\tdisplayName?: string;\n\townerId: string;\n\tprotocolVersion: number;\n\tcapabilities: readonly PluginMediaCapability[];\n}\n\nexport type PluginMediaJob = Omit<PluginJob<PluginMediaArtifact>, \"error\"> & {\n\terror?: PluginMediaFailure;\n};\n\n/** A media input exposed to its provider without revealing its storage location. */\nexport interface PluginMediaProviderInput {\n\tid: string;\n\trole?: string;\n\tkind: PluginMediaKind;\n\tmimeType?: string;\n}\n\ntype ProviderRequest<Request extends PluginMediaSubmitRequest> = Omit<Request, \"providerId\" | \"inputs\"> & {\n\treadonly inputs: readonly PluginMediaProviderInput[];\n};\n\nexport type PluginMediaProviderSubmitRequest =\n\tPluginMediaSubmitRequest extends infer Request\n\t\t? Request extends PluginMediaSubmitRequest\n\t\t\t? ProviderRequest<Request>\n\t\t\t: never\n\t\t: never;\n\nexport interface PluginMediaInputUploadRequest {\n\turl: string;\n\tfieldName: string;\n\tfileName?: string;\n\tfields?: Record<string, string>;\n\theaders?: Record<string, string>;\n\ttimeoutMs?: number;\n}\n\nexport interface PluginMediaTransferResponse<T = unknown> {\n\tok: boolean;\n\tstatus: number;\n\tstatusText: string;\n\theaders: Record<string, string>;\n\tbody: T;\n}\n\nexport interface PluginMediaProviderHandlerContext {\n\treadonly invocationId: string;\n\t/** Reads an input that belongs to this invocation without exposing its backing path. */\n\treadInput(inputId: string): Promise<{ mimeType: string; data: Uint8Array }>;\n\tuploadInput<T = unknown>(\n\t\tinputId: string,\n\t\trequest: PluginMediaInputUploadRequest,\n\t): Promise<PluginMediaTransferResponse<T>>;\n}\n\nexport type PluginMediaProviderArtifactSource =\n\t| { type: \"remote-url\"; url: string; headers?: Record<string, string> }\n\t| { type: \"plugin-blob\"; blobId: string }\n\t| { type: \"workspace-file\"; path: string };\n\nexport interface PluginMediaProviderArtifact {\n\tkind: PluginMediaOutputKind;\n\tmimeType?: string;\n\tname?: string;\n\twidth?: number;\n\theight?: number;\n\tdurationSeconds?: number;\n\tsource: PluginMediaProviderArtifactSource;\n}\n\nexport interface PluginMediaProviderJob {\n\tid: string;\n\tstatus: PluginMediaJob[\"status\"];\n\tprogress?: number;\n\tartifacts?: readonly PluginMediaProviderArtifact[];\n\terror?: PluginMediaFailure;\n}\n\nexport interface PluginMediaProviderRegistration {\n\tid: string;\n\tdisplayName?: string;\n\tcapabilities: readonly PluginMediaCapability[];\n\tsubmit(\n\t\trequest: PluginMediaProviderSubmitRequest,\n\t\tcontext: PluginMediaProviderHandlerContext,\n\t): Promise<PluginMediaProviderJob>;\n\tgetJob?(jobId: string, context: PluginMediaProviderHandlerContext): Promise<PluginMediaProviderJob>;\n\tcancelJob?(jobId: string, context: PluginMediaProviderHandlerContext): Promise<PluginMediaProviderJob>;\n}\n\nexport interface PluginMediaApi {\n\tregisterProvider(registration: PluginMediaProviderRegistration): Disposable;\n\tlistProviders(): Promise<readonly PluginMediaProviderDescriptor[]>;\n\tonProvidersChanged(listener: () => void): Disposable;\n\tsubmit(request: PluginMediaSubmitRequest): Promise<PluginMediaJob>;\n}\n"]}
package/dist/media.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAgCA,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACjC,IAAI,CAAuB;IAC3B,SAAS,CAAU;IAE5B,YAAY,OAA2B,EAAE;QACxC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAAA,CACnC;CACD","sourcesContent":["import type { PluginArtifactRef } from \"./artifacts.js\";\nimport type { Disposable } from \"./disposable.js\";\nimport type { PluginJob, PluginJobFailure } from \"./jobs.js\";\n\nexport type PluginMediaKind = \"image\" | \"video\" | \"audio\" | \"document\";\nexport type PluginMediaOutputKind = \"image\" | \"video\" | \"audio\";\nexport type PluginMediaOperation = \"generate\" | \"compose\" | \"transcode\";\n\nexport type PluginMediaGenerationMode =\n\t| \"text-to-image\"\n\t| \"image-to-image\"\n\t| \"text-to-video\"\n\t| \"image-to-video\"\n\t| \"video-to-video\"\n\t| \"reference-to-video\";\n\nexport type PluginMediaErrorCode =\n\t| \"unauthenticated\"\n\t| \"provider-unavailable\"\n\t| \"operation-unsupported\"\n\t| \"invalid-request\"\n\t| \"not-entitled\"\n\t| \"quota-exhausted\"\n\t| \"content-rejected\"\n\t| \"provider-timeout\"\n\t| \"provider-failed\"\n\t| \"cancelled\";\n\nexport interface PluginMediaFailure extends PluginJobFailure {\n\tcode: PluginMediaErrorCode;\n}\n\nexport class PluginMediaError extends Error {\n\treadonly code: PluginMediaErrorCode;\n\treadonly retryable: boolean;\n\n\tconstructor(failure: PluginMediaFailure) {\n\t\tsuper(failure.message);\n\t\tthis.name = \"PluginMediaError\";\n\t\tthis.code = failure.code;\n\t\tthis.retryable = failure.retryable;\n\t}\n}\n\nexport interface PluginMediaDimensions {\n\twidth: number;\n\theight: number;\n}\n\nexport type PluginMediaInputSource =\n\t| { type: \"plugin-blob\"; blobId: string }\n\t| { type: \"workspace-file\"; path: string };\n\nexport interface PluginMediaInput {\n\tid?: string;\n\trole?: string;\n\tkind: PluginMediaKind;\n\tmimeType?: string;\n\tsource: PluginMediaInputSource;\n}\n\nexport interface PluginMediaOutput {\n\tkind: PluginMediaOutputKind;\n\tmimeType: string;\n\tdimensions?: PluginMediaDimensions;\n\tfps?: number;\n\tdurationSeconds?: number;\n\tvideoCodec?: string;\n\taudioCodec?: string;\n}\n\nexport interface PluginMediaArtifact extends PluginArtifactRef {\n\tkind: PluginMediaOutputKind;\n\twidth?: number;\n\theight?: number;\n\tdurationSeconds?: number;\n}\n\nexport interface PluginMediaGenerateRequest {\n\toperation: \"generate\";\n\tproviderId: string;\n\tkind: \"image\" | \"video\";\n\tmode: PluginMediaGenerationMode;\n\tprompt: string;\n\tmodelId?: string;\n\tdimensions?: PluginMediaDimensions;\n\taspectRatio?: string;\n\tresolution?: string;\n\tdurationSeconds?: number;\n\tinputs?: readonly PluginMediaInput[];\n}\n\nexport interface PluginMediaComposeRequest {\n\toperation: \"compose\";\n\tproviderId: string;\n\tinputs: readonly PluginMediaInput[];\n\toutput: PluginMediaOutput;\n}\n\nexport interface PluginMediaTranscodeRequest {\n\toperation: \"transcode\";\n\tproviderId: string;\n\tinputs: readonly PluginMediaInput[];\n\toutput: PluginMediaOutput;\n}\n\nexport type PluginMediaSubmitRequest =\n\t| PluginMediaGenerateRequest\n\t| PluginMediaComposeRequest\n\t| PluginMediaTranscodeRequest;\n\nexport interface PluginMediaGenerationInputSlot {\n\trole: string;\n\tkinds: readonly PluginMediaKind[];\n\tminItems: number;\n\tmaxItems: number;\n}\n\nexport interface PluginMediaGenerationModeCapability {\n\tmode: PluginMediaGenerationMode;\n\tinputs: readonly PluginMediaGenerationInputSlot[];\n\tminTotalItems?: number;\n\tmaxTotalItems?: number;\n\taspectRatioPolicy?: \"configurable\" | \"input-derived\";\n\taudioGeneration?: \"none\" | \"always\" | \"optional\";\n}\n\nexport type PluginMediaCapability =\n\t| {\n\t\t\toperation: \"generate\";\n\t\t\tkind: \"image\" | \"video\";\n\t\t\tmodes: readonly PluginMediaGenerationMode[];\n\t\t\taspectRatios?: readonly string[];\n\t\t\t/** Provider-defined stable option ids; consumers must not infer pixel dimensions from their names. */\n\t\t\tresolutions?: readonly string[];\n\t\t\t/** Preferred option when the consumer has no supported persisted resolution. */\n\t\t\tdefaultResolution?: string;\n\t\t\tdurationsSeconds?: readonly number[];\n\t\t\tmodeCapabilities?: readonly PluginMediaGenerationModeCapability[];\n\t }\n\t| {\n\t\t\toperation: \"compose\";\n\t\t\tdocumentMimeTypes: readonly string[];\n\t\t\toutputMimeTypes: readonly string[];\n\t }\n\t| {\n\t\t\toperation: \"transcode\";\n\t\t\tinputMimeTypes: readonly string[];\n\t\t\toutputMimeTypes: readonly string[];\n\t };\n\nexport interface PluginMediaProviderDescriptor {\n\t/** Host-qualified provider id. */\n\tid: string;\n\tdisplayName?: string;\n\townerId: string;\n\tprotocolVersion: number;\n\tcapabilities: readonly PluginMediaCapability[];\n}\n\nexport type PluginMediaJob = Omit<PluginJob<PluginMediaArtifact>, \"error\"> & {\n\terror?: PluginMediaFailure;\n};\n\n/** A media input exposed to its provider without revealing its storage location. */\nexport interface PluginMediaProviderInput {\n\tid: string;\n\trole?: string;\n\tkind: PluginMediaKind;\n\tmimeType?: string;\n}\n\ntype ProviderRequest<Request extends PluginMediaSubmitRequest> = Omit<Request, \"providerId\" | \"inputs\"> & {\n\treadonly inputs: readonly PluginMediaProviderInput[];\n};\n\nexport type PluginMediaProviderSubmitRequest =\n\tPluginMediaSubmitRequest extends infer Request\n\t\t? Request extends PluginMediaSubmitRequest\n\t\t\t? ProviderRequest<Request>\n\t\t\t: never\n\t\t: never;\n\nexport interface PluginMediaInputUploadRequest {\n\turl: string;\n\tfieldName: string;\n\tfileName?: string;\n\tfields?: Record<string, string>;\n\theaders?: Record<string, string>;\n\ttimeoutMs?: number;\n}\n\nexport interface PluginMediaTransferResponse<T = unknown> {\n\tok: boolean;\n\tstatus: number;\n\tstatusText: string;\n\theaders: Record<string, string>;\n\tbody: T;\n}\n\nexport interface PluginMediaProviderHandlerContext {\n\treadonly invocationId: string;\n\tuploadInput<T = unknown>(\n\t\tinputId: string,\n\t\trequest: PluginMediaInputUploadRequest,\n\t): Promise<PluginMediaTransferResponse<T>>;\n}\n\nexport type PluginMediaProviderArtifactSource =\n\t| { type: \"remote-url\"; url: string; headers?: Record<string, string> }\n\t| { type: \"plugin-blob\"; blobId: string }\n\t| { type: \"workspace-file\"; path: string };\n\nexport interface PluginMediaProviderArtifact {\n\tkind: PluginMediaOutputKind;\n\tmimeType?: string;\n\tname?: string;\n\twidth?: number;\n\theight?: number;\n\tdurationSeconds?: number;\n\tsource: PluginMediaProviderArtifactSource;\n}\n\nexport interface PluginMediaProviderJob {\n\tid: string;\n\tstatus: PluginMediaJob[\"status\"];\n\tprogress?: number;\n\tartifacts?: readonly PluginMediaProviderArtifact[];\n\terror?: PluginMediaFailure;\n}\n\nexport interface PluginMediaProviderRegistration {\n\tid: string;\n\tdisplayName?: string;\n\tcapabilities: readonly PluginMediaCapability[];\n\tsubmit(\n\t\trequest: PluginMediaProviderSubmitRequest,\n\t\tcontext: PluginMediaProviderHandlerContext,\n\t): Promise<PluginMediaProviderJob>;\n\tgetJob?(jobId: string, context: PluginMediaProviderHandlerContext): Promise<PluginMediaProviderJob>;\n\tcancelJob?(jobId: string, context: PluginMediaProviderHandlerContext): Promise<PluginMediaProviderJob>;\n}\n\nexport interface PluginMediaApi {\n\tregisterProvider(registration: PluginMediaProviderRegistration): Disposable;\n\tlistProviders(): Promise<readonly PluginMediaProviderDescriptor[]>;\n\tonProvidersChanged(listener: () => void): Disposable;\n\tsubmit(request: PluginMediaSubmitRequest): Promise<PluginMediaJob>;\n}\n"]}
1
+ {"version":3,"file":"media.js","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAgCA,MAAM,OAAO,gBAAiB,SAAQ,KAAK;IACjC,IAAI,CAAuB;IAC3B,SAAS,CAAU;IAE5B,YAAY,OAA2B,EAAE;QACxC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;QAC/B,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAAA,CACnC;CACD","sourcesContent":["import type { PluginArtifactRef } from \"./artifacts.js\";\nimport type { Disposable } from \"./disposable.js\";\nimport type { PluginJob, PluginJobFailure } from \"./jobs.js\";\n\nexport type PluginMediaKind = \"image\" | \"video\" | \"audio\" | \"document\";\nexport type PluginMediaOutputKind = \"image\" | \"video\" | \"audio\";\nexport type PluginMediaOperation = \"generate\" | \"compose\" | \"transcode\";\n\nexport type PluginMediaGenerationMode =\n\t| \"text-to-image\"\n\t| \"image-to-image\"\n\t| \"text-to-video\"\n\t| \"image-to-video\"\n\t| \"video-to-video\"\n\t| \"reference-to-video\";\n\nexport type PluginMediaErrorCode =\n\t| \"unauthenticated\"\n\t| \"provider-unavailable\"\n\t| \"operation-unsupported\"\n\t| \"invalid-request\"\n\t| \"not-entitled\"\n\t| \"quota-exhausted\"\n\t| \"content-rejected\"\n\t| \"provider-timeout\"\n\t| \"provider-failed\"\n\t| \"cancelled\";\n\nexport interface PluginMediaFailure extends PluginJobFailure {\n\tcode: PluginMediaErrorCode;\n}\n\nexport class PluginMediaError extends Error {\n\treadonly code: PluginMediaErrorCode;\n\treadonly retryable: boolean;\n\n\tconstructor(failure: PluginMediaFailure) {\n\t\tsuper(failure.message);\n\t\tthis.name = \"PluginMediaError\";\n\t\tthis.code = failure.code;\n\t\tthis.retryable = failure.retryable;\n\t}\n}\n\nexport interface PluginMediaDimensions {\n\twidth: number;\n\theight: number;\n}\n\nexport type PluginMediaInputSource =\n\t| { type: \"plugin-blob\"; blobId: string }\n\t| { type: \"workspace-file\"; path: string };\n\nexport interface PluginMediaInput {\n\tid?: string;\n\trole?: string;\n\tkind: PluginMediaKind;\n\tmimeType?: string;\n\tsource: PluginMediaInputSource;\n}\n\nexport interface PluginMediaOutput {\n\tkind: PluginMediaOutputKind;\n\tmimeType: string;\n\tdimensions?: PluginMediaDimensions;\n\tfps?: number;\n\tdurationSeconds?: number;\n\tvideoCodec?: string;\n\taudioCodec?: string;\n}\n\nexport interface PluginMediaArtifact extends PluginArtifactRef {\n\tkind: PluginMediaOutputKind;\n\twidth?: number;\n\theight?: number;\n\tdurationSeconds?: number;\n}\n\nexport interface PluginMediaGenerateRequest {\n\toperation: \"generate\";\n\tproviderId: string;\n\tkind: \"image\" | \"video\";\n\tmode: PluginMediaGenerationMode;\n\tprompt: string;\n\tmodelId?: string;\n\tdimensions?: PluginMediaDimensions;\n\taspectRatio?: string;\n\tresolution?: string;\n\tdurationSeconds?: number;\n\tinputs?: readonly PluginMediaInput[];\n}\n\nexport interface PluginMediaComposeRequest {\n\toperation: \"compose\";\n\tproviderId: string;\n\tinputs: readonly PluginMediaInput[];\n\toutput: PluginMediaOutput;\n}\n\nexport interface PluginMediaTranscodeRequest {\n\toperation: \"transcode\";\n\tproviderId: string;\n\tinputs: readonly PluginMediaInput[];\n\toutput: PluginMediaOutput;\n}\n\nexport type PluginMediaSubmitRequest =\n\t| PluginMediaGenerateRequest\n\t| PluginMediaComposeRequest\n\t| PluginMediaTranscodeRequest;\n\nexport interface PluginMediaGenerationInputSlot {\n\trole: string;\n\tkinds: readonly PluginMediaKind[];\n\tminItems: number;\n\tmaxItems: number;\n}\n\nexport interface PluginMediaGenerationModeCapability {\n\tmode: PluginMediaGenerationMode;\n\tinputs: readonly PluginMediaGenerationInputSlot[];\n\tminTotalItems?: number;\n\tmaxTotalItems?: number;\n\taspectRatioPolicy?: \"configurable\" | \"input-derived\";\n\taudioGeneration?: \"none\" | \"always\" | \"optional\";\n}\n\nexport interface PluginMediaGenerationModelDescriptor {\n\tid: string;\n\tdisplayName?: string;\n\tsourceId?: string;\n\tsourceDisplayName?: string;\n\tmodes: readonly PluginMediaGenerationMode[];\n\taspectRatios?: readonly string[];\n\t/** Provider-defined stable option ids; consumers must not infer pixel dimensions from their names. */\n\tresolutions?: readonly string[];\n\tdefaultResolution?: string;\n}\n\nexport type PluginMediaCapability =\n\t| {\n\t\t\toperation: \"generate\";\n\t\t\tkind: \"image\" | \"video\";\n\t\t\tmodes: readonly PluginMediaGenerationMode[];\n\t\t\taspectRatios?: readonly string[];\n\t\t\t/** Provider-defined stable option ids; consumers must not infer pixel dimensions from their names. */\n\t\t\tresolutions?: readonly string[];\n\t\t\t/** Preferred option when the consumer has no supported persisted resolution. */\n\t\t\tdefaultResolution?: string;\n\t\t\t/** Optional per-model catalog. Missing means this is a legacy provider with provider-level capabilities only. */\n\t\t\tmodels?: readonly PluginMediaGenerationModelDescriptor[];\n\t\t\t/** Model used when a consumer does not send modelId. */\n\t\t\tdefaultModelId?: string;\n\t\t\tdurationsSeconds?: readonly number[];\n\t\t\tmodeCapabilities?: readonly PluginMediaGenerationModeCapability[];\n\t }\n\t| {\n\t\t\toperation: \"compose\";\n\t\t\tdocumentMimeTypes: readonly string[];\n\t\t\toutputMimeTypes: readonly string[];\n\t }\n\t| {\n\t\t\toperation: \"transcode\";\n\t\t\tinputMimeTypes: readonly string[];\n\t\t\toutputMimeTypes: readonly string[];\n\t };\n\nexport interface PluginMediaProviderDescriptor {\n\t/** Host-qualified provider id. */\n\tid: string;\n\tdisplayName?: string;\n\townerId: string;\n\tprotocolVersion: number;\n\tcapabilities: readonly PluginMediaCapability[];\n}\n\nexport type PluginMediaJob = Omit<PluginJob<PluginMediaArtifact>, \"error\"> & {\n\terror?: PluginMediaFailure;\n};\n\n/** A media input exposed to its provider without revealing its storage location. */\nexport interface PluginMediaProviderInput {\n\tid: string;\n\trole?: string;\n\tkind: PluginMediaKind;\n\tmimeType?: string;\n}\n\ntype ProviderRequest<Request extends PluginMediaSubmitRequest> = Omit<Request, \"providerId\" | \"inputs\"> & {\n\treadonly inputs: readonly PluginMediaProviderInput[];\n};\n\nexport type PluginMediaProviderSubmitRequest =\n\tPluginMediaSubmitRequest extends infer Request\n\t\t? Request extends PluginMediaSubmitRequest\n\t\t\t? ProviderRequest<Request>\n\t\t\t: never\n\t\t: never;\n\nexport interface PluginMediaInputUploadRequest {\n\turl: string;\n\tfieldName: string;\n\tfileName?: string;\n\tfields?: Record<string, string>;\n\theaders?: Record<string, string>;\n\ttimeoutMs?: number;\n}\n\nexport interface PluginMediaTransferResponse<T = unknown> {\n\tok: boolean;\n\tstatus: number;\n\tstatusText: string;\n\theaders: Record<string, string>;\n\tbody: T;\n}\n\nexport interface PluginMediaProviderHandlerContext {\n\treadonly invocationId: string;\n\t/** Reads an input that belongs to this invocation without exposing its backing path. */\n\treadInput(inputId: string): Promise<{ mimeType: string; data: Uint8Array }>;\n\tuploadInput<T = unknown>(\n\t\tinputId: string,\n\t\trequest: PluginMediaInputUploadRequest,\n\t): Promise<PluginMediaTransferResponse<T>>;\n}\n\nexport type PluginMediaProviderArtifactSource =\n\t| { type: \"remote-url\"; url: string; headers?: Record<string, string> }\n\t| { type: \"plugin-blob\"; blobId: string }\n\t| { type: \"workspace-file\"; path: string };\n\nexport interface PluginMediaProviderArtifact {\n\tkind: PluginMediaOutputKind;\n\tmimeType?: string;\n\tname?: string;\n\twidth?: number;\n\theight?: number;\n\tdurationSeconds?: number;\n\tsource: PluginMediaProviderArtifactSource;\n}\n\nexport interface PluginMediaProviderJob {\n\tid: string;\n\tstatus: PluginMediaJob[\"status\"];\n\tprogress?: number;\n\tartifacts?: readonly PluginMediaProviderArtifact[];\n\terror?: PluginMediaFailure;\n}\n\nexport interface PluginMediaProviderRegistration {\n\tid: string;\n\tdisplayName?: string;\n\tcapabilities: readonly PluginMediaCapability[];\n\tsubmit(\n\t\trequest: PluginMediaProviderSubmitRequest,\n\t\tcontext: PluginMediaProviderHandlerContext,\n\t): Promise<PluginMediaProviderJob>;\n\tgetJob?(jobId: string, context: PluginMediaProviderHandlerContext): Promise<PluginMediaProviderJob>;\n\tcancelJob?(jobId: string, context: PluginMediaProviderHandlerContext): Promise<PluginMediaProviderJob>;\n}\n\nexport interface PluginMediaApi {\n\tregisterProvider(registration: PluginMediaProviderRegistration): Disposable;\n\tlistProviders(): Promise<readonly PluginMediaProviderDescriptor[]>;\n\tonProvidersChanged(listener: () => void): Disposable;\n\tsubmit(request: PluginMediaSubmitRequest): Promise<PluginMediaJob>;\n}\n"]}
package/dist/models.d.ts CHANGED
@@ -3,6 +3,10 @@ export interface PluginModelDefinition {
3
3
  name?: string;
4
4
  api?: string;
5
5
  reasoning?: boolean;
6
+ /** Provider-native choices; omitted or empty uses the host's API preset. */
7
+ reasoningLevels?: string[];
8
+ /** Used when no user choice exists; otherwise the first declared level wins. */
9
+ defaultReasoningLevel?: string;
6
10
  contextWindow?: number;
7
11
  maxTokens?: number;
8
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC/B,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3F;;;;;;;;;;;OAWG;IACH,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;CACzE","sourcesContent":["export interface PluginModelDefinition {\n\tid: string;\n\tname?: string;\n\tapi?: string;\n\treasoning?: boolean;\n\tcontextWindow?: number;\n\tmaxTokens?: number;\n}\n\nexport interface PluginModelProviderConfig {\n\tbaseUrl?: string;\n\tapiKey?: string;\n\tapi?: string;\n\tdisplayName?: string;\n\tauthHeader?: boolean;\n\theaders?: Record<string, string>;\n\tmodels?: PluginModelDefinition[];\n}\n\n/** Reconciles the complete set of provider ids owned by the calling plugin. */\nexport interface PluginModelsApi {\n\treplaceOwnedProviders(providers: Record<string, PluginModelProviderConfig>): Promise<void>;\n\t/**\n\t * Reads back what the host currently holds for this plugin, keyed by the same\n\t * local provider ids `replaceOwnedProviders` accepts.\n\t *\n\t * `replaceOwnedProviders` deletes by omission, so a plugin that cannot read its\n\t * own published state can only clobber it — every write has to reconstruct the\n\t * whole truth from whatever its (often eventually consistent) upstream happens\n\t * to report at that instant. Read this first and reconcile against it, so a\n\t * model that is merely not visible yet is not mistaken for one the user lost.\n\t *\n\t * `apiKey` comes back masked; supply the real credential on the next write.\n\t */\n\tlistOwnedProviders(): Promise<Record<string, PluginModelProviderConfig>>;\n}\n"]}
1
+ {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4EAA4E;IAC5E,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,gFAAgF;IAChF,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,yBAAyB;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACjC;AAED,+EAA+E;AAC/E,MAAM,WAAW,eAAe;IAC/B,qBAAqB,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3F;;;;;;;;;;;OAWG;IACH,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC,CAAC;CACzE","sourcesContent":["export interface PluginModelDefinition {\n\tid: string;\n\tname?: string;\n\tapi?: string;\n\treasoning?: boolean;\n\t/** Provider-native choices; omitted or empty uses the host's API preset. */\n\treasoningLevels?: string[];\n\t/** Used when no user choice exists; otherwise the first declared level wins. */\n\tdefaultReasoningLevel?: string;\n\tcontextWindow?: number;\n\tmaxTokens?: number;\n}\n\nexport interface PluginModelProviderConfig {\n\tbaseUrl?: string;\n\tapiKey?: string;\n\tapi?: string;\n\tdisplayName?: string;\n\tauthHeader?: boolean;\n\theaders?: Record<string, string>;\n\tmodels?: PluginModelDefinition[];\n}\n\n/** Reconciles the complete set of provider ids owned by the calling plugin. */\nexport interface PluginModelsApi {\n\treplaceOwnedProviders(providers: Record<string, PluginModelProviderConfig>): Promise<void>;\n\t/**\n\t * Reads back what the host currently holds for this plugin, keyed by the same\n\t * local provider ids `replaceOwnedProviders` accepts.\n\t *\n\t * `replaceOwnedProviders` deletes by omission, so a plugin that cannot read its\n\t * own published state can only clobber it — every write has to reconstruct the\n\t * whole truth from whatever its (often eventually consistent) upstream happens\n\t * to report at that instant. Read this first and reconcile against it, so a\n\t * model that is merely not visible yet is not mistaken for one the user lost.\n\t *\n\t * `apiKey` comes back masked; supply the real credential on the next write.\n\t */\n\tlistOwnedProviders(): Promise<Record<string, PluginModelProviderConfig>>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"","sourcesContent":["export interface PluginModelDefinition {\n\tid: string;\n\tname?: string;\n\tapi?: string;\n\treasoning?: boolean;\n\tcontextWindow?: number;\n\tmaxTokens?: number;\n}\n\nexport interface PluginModelProviderConfig {\n\tbaseUrl?: string;\n\tapiKey?: string;\n\tapi?: string;\n\tdisplayName?: string;\n\tauthHeader?: boolean;\n\theaders?: Record<string, string>;\n\tmodels?: PluginModelDefinition[];\n}\n\n/** Reconciles the complete set of provider ids owned by the calling plugin. */\nexport interface PluginModelsApi {\n\treplaceOwnedProviders(providers: Record<string, PluginModelProviderConfig>): Promise<void>;\n\t/**\n\t * Reads back what the host currently holds for this plugin, keyed by the same\n\t * local provider ids `replaceOwnedProviders` accepts.\n\t *\n\t * `replaceOwnedProviders` deletes by omission, so a plugin that cannot read its\n\t * own published state can only clobber it — every write has to reconstruct the\n\t * whole truth from whatever its (often eventually consistent) upstream happens\n\t * to report at that instant. Read this first and reconcile against it, so a\n\t * model that is merely not visible yet is not mistaken for one the user lost.\n\t *\n\t * `apiKey` comes back masked; supply the real credential on the next write.\n\t */\n\tlistOwnedProviders(): Promise<Record<string, PluginModelProviderConfig>>;\n}\n"]}
1
+ {"version":3,"file":"models.js","sourceRoot":"","sources":["../src/models.ts"],"names":[],"mappings":"","sourcesContent":["export interface PluginModelDefinition {\n\tid: string;\n\tname?: string;\n\tapi?: string;\n\treasoning?: boolean;\n\t/** Provider-native choices; omitted or empty uses the host's API preset. */\n\treasoningLevels?: string[];\n\t/** Used when no user choice exists; otherwise the first declared level wins. */\n\tdefaultReasoningLevel?: string;\n\tcontextWindow?: number;\n\tmaxTokens?: number;\n}\n\nexport interface PluginModelProviderConfig {\n\tbaseUrl?: string;\n\tapiKey?: string;\n\tapi?: string;\n\tdisplayName?: string;\n\tauthHeader?: boolean;\n\theaders?: Record<string, string>;\n\tmodels?: PluginModelDefinition[];\n}\n\n/** Reconciles the complete set of provider ids owned by the calling plugin. */\nexport interface PluginModelsApi {\n\treplaceOwnedProviders(providers: Record<string, PluginModelProviderConfig>): Promise<void>;\n\t/**\n\t * Reads back what the host currently holds for this plugin, keyed by the same\n\t * local provider ids `replaceOwnedProviders` accepts.\n\t *\n\t * `replaceOwnedProviders` deletes by omission, so a plugin that cannot read its\n\t * own published state can only clobber it — every write has to reconstruct the\n\t * whole truth from whatever its (often eventually consistent) upstream happens\n\t * to report at that instant. Read this first and reconcile against it, so a\n\t * model that is merely not visible yet is not mistaken for one the user lost.\n\t *\n\t * `apiKey` comes back masked; supply the real credential on the next write.\n\t */\n\tlistOwnedProviders(): Promise<Record<string, PluginModelProviderConfig>>;\n}\n"]}
@@ -21,6 +21,18 @@ export interface PluginOfficialExperimentalSettings {
21
21
  promptPrediction: boolean;
22
22
  agentSkills: boolean;
23
23
  }
24
+ export interface PluginOfficialImageGenerationSettings {
25
+ textToImageProviderId?: string;
26
+ textToImageModelId?: string;
27
+ imageToImageProviderId?: string;
28
+ imageToImageModelId?: string;
29
+ }
30
+ export type PluginOfficialImageGenerationSettingsUpdate = {
31
+ textToImageProviderId?: string | null;
32
+ textToImageModelId?: string | null;
33
+ imageToImageProviderId?: string | null;
34
+ imageToImageModelId?: string | null;
35
+ };
24
36
  export interface PluginOfficialDownloadItem {
25
37
  id: string;
26
38
  url: string;
@@ -405,6 +417,8 @@ export interface PluginOfficialApi {
405
417
  agent: {
406
418
  getExperimental(): Promise<PluginOfficialExperimentalSettings>;
407
419
  setExperimental(input: Partial<PluginOfficialExperimentalSettings>): Promise<PluginOfficialExperimentalSettings>;
420
+ getImageGeneration(): Promise<PluginOfficialImageGenerationSettings>;
421
+ setImageGeneration(input: PluginOfficialImageGenerationSettingsUpdate): Promise<PluginOfficialImageGenerationSettings>;
408
422
  };
409
423
  downloads: {
410
424
  list(): Promise<PluginOfficialDownloadItem[]>;
@@ -551,8 +565,11 @@ export interface PluginOfficialApi {
551
565
  list(): Promise<PluginOfficialPluginSummary[]>;
552
566
  get(id: string): Promise<PluginOfficialPluginSummary>;
553
567
  setEnabled(id: string, enabled: boolean): Promise<PluginOfficialPluginSummary>;
554
- installFromUrl(url: string): Promise<PluginOfficialPluginSummary>;
568
+ installFromUrl(url: string, options?: {
569
+ initiator?: "plugin-cli";
570
+ }): Promise<PluginOfficialPluginSummary>;
555
571
  installFromPath(path: string, options?: {
572
+ initiator?: "plugin-cli" | "plugin-workbench";
556
573
  grantedPermissions?: string[];
557
574
  enable?: boolean;
558
575
  source?: "archive" | "npm";