@vetta-org/plugin-sdk 0.3.4 → 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.
Files changed (48) hide show
  1. package/dist/hooks.d.ts +8 -0
  2. package/dist/hooks.d.ts.map +1 -1
  3. package/dist/hooks.js +9 -0
  4. package/dist/hooks.js.map +1 -1
  5. package/dist/host-bridge.d.ts +3 -0
  6. package/dist/host-bridge.d.ts.map +1 -1
  7. package/dist/host-bridge.js.map +1 -1
  8. package/dist/images.d.ts +2 -0
  9. package/dist/images.d.ts.map +1 -1
  10. package/dist/images.js.map +1 -1
  11. package/dist/index.d.ts +6 -4
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +2 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/logger.d.ts +11 -0
  16. package/dist/logger.d.ts.map +1 -0
  17. package/dist/logger.js +18 -0
  18. package/dist/logger.js.map +1 -0
  19. package/dist/logging.d.ts +26 -0
  20. package/dist/logging.d.ts.map +1 -0
  21. package/dist/logging.js +38 -0
  22. package/dist/logging.js.map +1 -0
  23. package/dist/media.d.ts +20 -0
  24. package/dist/media.d.ts.map +1 -1
  25. package/dist/media.js.map +1 -1
  26. package/dist/models.d.ts +4 -0
  27. package/dist/models.d.ts.map +1 -1
  28. package/dist/models.js.map +1 -1
  29. package/dist/official.d.ts +18 -1
  30. package/dist/official.d.ts.map +1 -1
  31. package/dist/official.js.map +1 -1
  32. package/dist/service-provider.d.ts +1 -0
  33. package/dist/service-provider.d.ts.map +1 -1
  34. package/dist/service-provider.js.map +1 -1
  35. package/dist/ui.d.ts +34 -0
  36. package/dist/ui.d.ts.map +1 -1
  37. package/dist/ui.js.map +1 -1
  38. package/docs/.source.json +1 -0
  39. package/docs/README.md +3 -1
  40. package/docs/getting-started.md +19 -10
  41. package/docs/logging.md +41 -0
  42. package/docs/manifest.md +12 -8
  43. package/docs/media.md +19 -2
  44. package/docs/permissions.md +4 -0
  45. package/docs/styling-and-pitfalls.md +11 -2
  46. package/docs/system-plugins.md +2 -2
  47. package/docs/ui-slots.md +43 -0
  48. package/package.json +5 -1
package/dist/hooks.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { ConversationMessage, ConversationState } from "./conversation.js";
2
2
  import type { PluginLocales, PluginTranslate } from "./i18n.js";
3
3
  import type { PluginPromptAttachment } from "./prompt-attachment.js";
4
+ import type { PluginSidebarState } from "./ui.js";
4
5
  export interface PluginI18nContextValue {
5
6
  /** This plugin's catalogs, keyed by locale code. */
6
7
  locales: PluginLocales;
@@ -34,4 +35,11 @@ export declare function useConversationMessages(): ConversationMessage[];
34
35
  * Clears automatically after send, capsule close, or session switch.
35
36
  */
36
37
  export declare function usePromptAttachment(): PluginPromptAttachment | null;
38
+ /**
39
+ * Reactive: 宿主左侧侧边栏此刻的形态,变化时自动重渲染。
40
+ *
41
+ * 沉浸式工作区视图尤其需要它:侧边栏收起时宿主页头会长出「展开侧边栏」按钮压在左上角,
42
+ * 视图画在那一带的东西要让位。返回值引用稳定,可直接进 useEffect 依赖。
43
+ */
44
+ export declare function useSidebarState(): PluginSidebarState;
37
45
  //# sourceMappingURL=hooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEhE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,sBAAsB;IACtC,oDAAoD;IACpD,OAAO,EAAE,aAAa,CAAC;IACvB,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,iDAG9B,CAAC;AAEH,MAAM,WAAW,iBAAiB;IACjC,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,CAAC,EAAE,eAAe,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,CAQlD;AAED,2DAA2D;AAC3D,wBAAgB,qBAAqB,IAAI,iBAAiB,CAEzD;AAED,oDAAoD;AACpD,wBAAgB,uBAAuB,IAAI,mBAAmB,EAAE,CAE/D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,sBAAsB,GAAG,IAAI,CAEnE","sourcesContent":["import { createContext, useCallback, useContext } from \"react\";\nimport type { ConversationMessage, ConversationState } from \"./conversation.js\";\nimport { requireBridge } from \"./host-bridge.js\";\nimport type { PluginLocales, PluginTranslate } from \"./i18n.js\";\nimport { resolveCatalogKey } from \"./i18n.js\";\nimport type { PluginPromptAttachment } from \"./prompt-attachment.js\";\n\n// ─── i18n context (host-provided, per plugin) ───\n\nexport interface PluginI18nContextValue {\n\t/** This plugin's catalogs, keyed by locale code. */\n\tlocales: PluginLocales;\n\t/** Fallback locale when a key is missing in the current locale. */\n\tdefaultLocale: string;\n}\n\n/**\n * Internal: the host wraps plugin-rendered components in this context's Provider,\n * carrying THIS plugin's catalogs. Module Federation shares this single SDK\n * instance, so the value the host provides is visible to {@link useTranslation}.\n */\nexport const __PluginI18nContext = createContext<PluginI18nContextValue>({\n\tlocales: {},\n\tdefaultLocale: \"zh\",\n});\n\nexport interface PluginTranslation {\n\t/** The host's current locale code (e.g. \"zh\"). */\n\tlocale: string;\n\t/** Resolve a bare catalog key at the current locale, with optional `{{params}}`. */\n\tt: PluginTranslate;\n}\n\n/**\n * Reactive translation for plugin React components — re-renders when the host\n * language changes. `t` resolves a BARE catalog key (no `%...%` wrapper) against\n * THIS plugin's catalogs; the host provides them via __PluginI18nContext.\n */\nexport function useTranslation(): PluginTranslation {\n\tconst locale = requireBridge().useLocale();\n\tconst { locales, defaultLocale } = useContext(__PluginI18nContext);\n\tconst t = useCallback<PluginTranslate>(\n\t\t(key, params) => resolveCatalogKey(key, locales, locale, defaultLocale, params),\n\t\t[locales, locale, defaultLocale],\n\t);\n\treturn { locale, t };\n}\n\n/** Reactive: the currently-active conversation's state. */\nexport function useActiveConversation(): ConversationState {\n\treturn requireBridge().useActiveConversation();\n}\n\n/** Reactive: the active conversation's messages. */\nexport function useConversationMessages(): ConversationMessage[] {\n\treturn requireBridge().useConversationMessages();\n}\n\n/**\n * Reactive: the plugin-owned one-shot context attached to the next prompt.\n * Clears automatically after send, capsule close, or session switch.\n */\nexport function usePromptAttachment(): PluginPromptAttachment | null {\n\treturn requireBridge().usePromptAttachment();\n}\n"]}
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEhF,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEhE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAIlD,MAAM,WAAW,sBAAsB;IACtC,oDAAoD;IACpD,OAAO,EAAE,aAAa,CAAC;IACvB,mEAAmE;IACnE,aAAa,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,iDAG9B,CAAC;AAEH,MAAM,WAAW,iBAAiB;IACjC,kDAAkD;IAClD,MAAM,EAAE,MAAM,CAAC;IACf,oFAAoF;IACpF,CAAC,EAAE,eAAe,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,iBAAiB,CAQlD;AAED,2DAA2D;AAC3D,wBAAgB,qBAAqB,IAAI,iBAAiB,CAEzD;AAED,oDAAoD;AACpD,wBAAgB,uBAAuB,IAAI,mBAAmB,EAAE,CAE/D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,sBAAsB,GAAG,IAAI,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,kBAAkB,CAEpD","sourcesContent":["import { createContext, useCallback, useContext } from \"react\";\nimport type { ConversationMessage, ConversationState } from \"./conversation.js\";\nimport { requireBridge } from \"./host-bridge.js\";\nimport type { PluginLocales, PluginTranslate } from \"./i18n.js\";\nimport { resolveCatalogKey } from \"./i18n.js\";\nimport type { PluginPromptAttachment } from \"./prompt-attachment.js\";\nimport type { PluginSidebarState } from \"./ui.js\";\n\n// ─── i18n context (host-provided, per plugin) ───\n\nexport interface PluginI18nContextValue {\n\t/** This plugin's catalogs, keyed by locale code. */\n\tlocales: PluginLocales;\n\t/** Fallback locale when a key is missing in the current locale. */\n\tdefaultLocale: string;\n}\n\n/**\n * Internal: the host wraps plugin-rendered components in this context's Provider,\n * carrying THIS plugin's catalogs. Module Federation shares this single SDK\n * instance, so the value the host provides is visible to {@link useTranslation}.\n */\nexport const __PluginI18nContext = createContext<PluginI18nContextValue>({\n\tlocales: {},\n\tdefaultLocale: \"zh\",\n});\n\nexport interface PluginTranslation {\n\t/** The host's current locale code (e.g. \"zh\"). */\n\tlocale: string;\n\t/** Resolve a bare catalog key at the current locale, with optional `{{params}}`. */\n\tt: PluginTranslate;\n}\n\n/**\n * Reactive translation for plugin React components — re-renders when the host\n * language changes. `t` resolves a BARE catalog key (no `%...%` wrapper) against\n * THIS plugin's catalogs; the host provides them via __PluginI18nContext.\n */\nexport function useTranslation(): PluginTranslation {\n\tconst locale = requireBridge().useLocale();\n\tconst { locales, defaultLocale } = useContext(__PluginI18nContext);\n\tconst t = useCallback<PluginTranslate>(\n\t\t(key, params) => resolveCatalogKey(key, locales, locale, defaultLocale, params),\n\t\t[locales, locale, defaultLocale],\n\t);\n\treturn { locale, t };\n}\n\n/** Reactive: the currently-active conversation's state. */\nexport function useActiveConversation(): ConversationState {\n\treturn requireBridge().useActiveConversation();\n}\n\n/** Reactive: the active conversation's messages. */\nexport function useConversationMessages(): ConversationMessage[] {\n\treturn requireBridge().useConversationMessages();\n}\n\n/**\n * Reactive: the plugin-owned one-shot context attached to the next prompt.\n * Clears automatically after send, capsule close, or session switch.\n */\nexport function usePromptAttachment(): PluginPromptAttachment | null {\n\treturn requireBridge().usePromptAttachment();\n}\n\n/**\n * Reactive: 宿主左侧侧边栏此刻的形态,变化时自动重渲染。\n *\n * 沉浸式工作区视图尤其需要它:侧边栏收起时宿主页头会长出「展开侧边栏」按钮压在左上角,\n * 视图画在那一带的东西要让位。返回值引用稳定,可直接进 useEffect 依赖。\n */\nexport function useSidebarState(): PluginSidebarState {\n\treturn requireBridge().useSidebarState();\n}\n"]}
package/dist/hooks.js CHANGED
@@ -36,4 +36,13 @@ export function useConversationMessages() {
36
36
  export function usePromptAttachment() {
37
37
  return requireBridge().usePromptAttachment();
38
38
  }
39
+ /**
40
+ * Reactive: 宿主左侧侧边栏此刻的形态,变化时自动重渲染。
41
+ *
42
+ * 沉浸式工作区视图尤其需要它:侧边栏收起时宿主页头会长出「展开侧边栏」按钮压在左上角,
43
+ * 视图画在那一带的东西要让位。返回值引用稳定,可直接进 useEffect 依赖。
44
+ */
45
+ export function useSidebarState() {
46
+ return requireBridge().useSidebarState();
47
+ }
39
48
  //# sourceMappingURL=hooks.js.map
package/dist/hooks.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAY9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAyB;IACxE,OAAO,EAAE,EAAE;IACX,aAAa,EAAE,IAAI;CACnB,CAAC,CAAC;AASH;;;;GAIG;AACH,MAAM,UAAU,cAAc,GAAsB;IACnD,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC,SAAS,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACnE,MAAM,CAAC,GAAG,WAAW,CACpB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAC/E,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,CAChC,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAAA,CACrB;AAED,2DAA2D;AAC3D,MAAM,UAAU,qBAAqB,GAAsB;IAC1D,OAAO,aAAa,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAAA,CAC/C;AAED,oDAAoD;AACpD,MAAM,UAAU,uBAAuB,GAA0B;IAChE,OAAO,aAAa,EAAE,CAAC,uBAAuB,EAAE,CAAC;AAAA,CACjD;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,GAAkC;IACpE,OAAO,aAAa,EAAE,CAAC,mBAAmB,EAAE,CAAC;AAAA,CAC7C","sourcesContent":["import { createContext, useCallback, useContext } from \"react\";\nimport type { ConversationMessage, ConversationState } from \"./conversation.js\";\nimport { requireBridge } from \"./host-bridge.js\";\nimport type { PluginLocales, PluginTranslate } from \"./i18n.js\";\nimport { resolveCatalogKey } from \"./i18n.js\";\nimport type { PluginPromptAttachment } from \"./prompt-attachment.js\";\n\n// ─── i18n context (host-provided, per plugin) ───\n\nexport interface PluginI18nContextValue {\n\t/** This plugin's catalogs, keyed by locale code. */\n\tlocales: PluginLocales;\n\t/** Fallback locale when a key is missing in the current locale. */\n\tdefaultLocale: string;\n}\n\n/**\n * Internal: the host wraps plugin-rendered components in this context's Provider,\n * carrying THIS plugin's catalogs. Module Federation shares this single SDK\n * instance, so the value the host provides is visible to {@link useTranslation}.\n */\nexport const __PluginI18nContext = createContext<PluginI18nContextValue>({\n\tlocales: {},\n\tdefaultLocale: \"zh\",\n});\n\nexport interface PluginTranslation {\n\t/** The host's current locale code (e.g. \"zh\"). */\n\tlocale: string;\n\t/** Resolve a bare catalog key at the current locale, with optional `{{params}}`. */\n\tt: PluginTranslate;\n}\n\n/**\n * Reactive translation for plugin React components — re-renders when the host\n * language changes. `t` resolves a BARE catalog key (no `%...%` wrapper) against\n * THIS plugin's catalogs; the host provides them via __PluginI18nContext.\n */\nexport function useTranslation(): PluginTranslation {\n\tconst locale = requireBridge().useLocale();\n\tconst { locales, defaultLocale } = useContext(__PluginI18nContext);\n\tconst t = useCallback<PluginTranslate>(\n\t\t(key, params) => resolveCatalogKey(key, locales, locale, defaultLocale, params),\n\t\t[locales, locale, defaultLocale],\n\t);\n\treturn { locale, t };\n}\n\n/** Reactive: the currently-active conversation's state. */\nexport function useActiveConversation(): ConversationState {\n\treturn requireBridge().useActiveConversation();\n}\n\n/** Reactive: the active conversation's messages. */\nexport function useConversationMessages(): ConversationMessage[] {\n\treturn requireBridge().useConversationMessages();\n}\n\n/**\n * Reactive: the plugin-owned one-shot context attached to the next prompt.\n * Clears automatically after send, capsule close, or session switch.\n */\nexport function usePromptAttachment(): PluginPromptAttachment | null {\n\treturn requireBridge().usePromptAttachment();\n}\n"]}
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAa9C;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAyB;IACxE,OAAO,EAAE,EAAE;IACX,aAAa,EAAE,IAAI;CACnB,CAAC,CAAC;AASH;;;;GAIG;AACH,MAAM,UAAU,cAAc,GAAsB;IACnD,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC,SAAS,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IACnE,MAAM,CAAC,GAAG,WAAW,CACpB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,EAC/E,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,CAAC,CAChC,CAAC;IACF,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAAA,CACrB;AAED,2DAA2D;AAC3D,MAAM,UAAU,qBAAqB,GAAsB;IAC1D,OAAO,aAAa,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAAA,CAC/C;AAED,oDAAoD;AACpD,MAAM,UAAU,uBAAuB,GAA0B;IAChE,OAAO,aAAa,EAAE,CAAC,uBAAuB,EAAE,CAAC;AAAA,CACjD;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,GAAkC;IACpE,OAAO,aAAa,EAAE,CAAC,mBAAmB,EAAE,CAAC;AAAA,CAC7C;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,GAAuB;IACrD,OAAO,aAAa,EAAE,CAAC,eAAe,EAAE,CAAC;AAAA,CACzC","sourcesContent":["import { createContext, useCallback, useContext } from \"react\";\nimport type { ConversationMessage, ConversationState } from \"./conversation.js\";\nimport { requireBridge } from \"./host-bridge.js\";\nimport type { PluginLocales, PluginTranslate } from \"./i18n.js\";\nimport { resolveCatalogKey } from \"./i18n.js\";\nimport type { PluginPromptAttachment } from \"./prompt-attachment.js\";\nimport type { PluginSidebarState } from \"./ui.js\";\n\n// ─── i18n context (host-provided, per plugin) ───\n\nexport interface PluginI18nContextValue {\n\t/** This plugin's catalogs, keyed by locale code. */\n\tlocales: PluginLocales;\n\t/** Fallback locale when a key is missing in the current locale. */\n\tdefaultLocale: string;\n}\n\n/**\n * Internal: the host wraps plugin-rendered components in this context's Provider,\n * carrying THIS plugin's catalogs. Module Federation shares this single SDK\n * instance, so the value the host provides is visible to {@link useTranslation}.\n */\nexport const __PluginI18nContext = createContext<PluginI18nContextValue>({\n\tlocales: {},\n\tdefaultLocale: \"zh\",\n});\n\nexport interface PluginTranslation {\n\t/** The host's current locale code (e.g. \"zh\"). */\n\tlocale: string;\n\t/** Resolve a bare catalog key at the current locale, with optional `{{params}}`. */\n\tt: PluginTranslate;\n}\n\n/**\n * Reactive translation for plugin React components — re-renders when the host\n * language changes. `t` resolves a BARE catalog key (no `%...%` wrapper) against\n * THIS plugin's catalogs; the host provides them via __PluginI18nContext.\n */\nexport function useTranslation(): PluginTranslation {\n\tconst locale = requireBridge().useLocale();\n\tconst { locales, defaultLocale } = useContext(__PluginI18nContext);\n\tconst t = useCallback<PluginTranslate>(\n\t\t(key, params) => resolveCatalogKey(key, locales, locale, defaultLocale, params),\n\t\t[locales, locale, defaultLocale],\n\t);\n\treturn { locale, t };\n}\n\n/** Reactive: the currently-active conversation's state. */\nexport function useActiveConversation(): ConversationState {\n\treturn requireBridge().useActiveConversation();\n}\n\n/** Reactive: the active conversation's messages. */\nexport function useConversationMessages(): ConversationMessage[] {\n\treturn requireBridge().useConversationMessages();\n}\n\n/**\n * Reactive: the plugin-owned one-shot context attached to the next prompt.\n * Clears automatically after send, capsule close, or session switch.\n */\nexport function usePromptAttachment(): PluginPromptAttachment | null {\n\treturn requireBridge().usePromptAttachment();\n}\n\n/**\n * Reactive: 宿主左侧侧边栏此刻的形态,变化时自动重渲染。\n *\n * 沉浸式工作区视图尤其需要它:侧边栏收起时宿主页头会长出「展开侧边栏」按钮压在左上角,\n * 视图画在那一带的东西要让位。返回值引用稳定,可直接进 useEffect 依赖。\n */\nexport function useSidebarState(): PluginSidebarState {\n\treturn requireBridge().useSidebarState();\n}\n"]}
@@ -1,11 +1,14 @@
1
1
  import type { ConversationMessage, ConversationState, PluginConversationApi } from "./conversation.js";
2
2
  import type { PluginPromptAttachment } from "./prompt-attachment.js";
3
+ import type { PluginSidebarState } from "./ui.js";
3
4
  export interface PluginHostBridge {
4
5
  useActiveConversation(): ConversationState;
5
6
  useConversationMessages(): ConversationMessage[];
6
7
  usePromptAttachment(): PluginPromptAttachment | null;
7
8
  /** Reactive: the host's current locale code (e.g. "zh"). */
8
9
  useLocale(): string;
10
+ /** Reactive: the host sidebar's current shape (collapsed / narrow / visible). */
11
+ useSidebarState(): PluginSidebarState;
9
12
  conversation: PluginConversationApi;
10
13
  }
11
14
  export declare function __setPluginHostBridge(bridge: PluginHostBridge): void;
@@ -1 +1 @@
1
- {"version":3,"file":"host-bridge.d.ts","sourceRoot":"","sources":["../src/host-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAUrE,MAAM,WAAW,gBAAgB;IAChC,qBAAqB,IAAI,iBAAiB,CAAC;IAC3C,uBAAuB,IAAI,mBAAmB,EAAE,CAAC;IACjD,mBAAmB,IAAI,sBAAsB,GAAG,IAAI,CAAC;IACrD,4DAA4D;IAC5D,SAAS,IAAI,MAAM,CAAC;IACpB,YAAY,EAAE,qBAAqB,CAAC;CACpC;AAID,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAEpE;AAED,6EAA6E;AAC7E,wBAAgB,aAAa,IAAI,gBAAgB,CAKhD","sourcesContent":["import type { ConversationMessage, ConversationState, PluginConversationApi } from \"./conversation.js\";\nimport type { PluginPromptAttachment } from \"./prompt-attachment.js\";\n\n// ─── Host bridge ───\n//\n// React hooks and conversation state read the host's jotai store. plugin-sdk\n// cannot depend on desktop-app, so the host injects its implementation at\n// startup (installPluginHostShim → __setPluginHostBridge). Module Federation\n// makes host and plugins share this single pluginSdk instance, so the bridge\n// the host sets is visible to the hooks the plugin calls.\n\nexport interface PluginHostBridge {\n\tuseActiveConversation(): ConversationState;\n\tuseConversationMessages(): ConversationMessage[];\n\tusePromptAttachment(): PluginPromptAttachment | null;\n\t/** Reactive: the host's current locale code (e.g. \"zh\"). */\n\tuseLocale(): string;\n\tconversation: PluginConversationApi;\n}\n\nlet hostBridge: PluginHostBridge | undefined;\n\nexport function __setPluginHostBridge(bridge: PluginHostBridge): void {\n\thostBridge = bridge;\n}\n\n/** Package-internal: throws if the host has not installed the bridge yet. */\nexport function requireBridge(): PluginHostBridge {\n\tif (!hostBridge) {\n\t\tthrow new Error(\"Vetta plugin host bridge is not installed\");\n\t}\n\treturn hostBridge;\n}\n"]}
1
+ {"version":3,"file":"host-bridge.d.ts","sourceRoot":"","sources":["../src/host-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AACvG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAUlD,MAAM,WAAW,gBAAgB;IAChC,qBAAqB,IAAI,iBAAiB,CAAC;IAC3C,uBAAuB,IAAI,mBAAmB,EAAE,CAAC;IACjD,mBAAmB,IAAI,sBAAsB,GAAG,IAAI,CAAC;IACrD,4DAA4D;IAC5D,SAAS,IAAI,MAAM,CAAC;IACpB,iFAAiF;IACjF,eAAe,IAAI,kBAAkB,CAAC;IACtC,YAAY,EAAE,qBAAqB,CAAC;CACpC;AAID,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAEpE;AAED,6EAA6E;AAC7E,wBAAgB,aAAa,IAAI,gBAAgB,CAKhD","sourcesContent":["import type { ConversationMessage, ConversationState, PluginConversationApi } from \"./conversation.js\";\nimport type { PluginPromptAttachment } from \"./prompt-attachment.js\";\nimport type { PluginSidebarState } from \"./ui.js\";\n\n// ─── Host bridge ───\n//\n// React hooks and conversation state read the host's jotai store. plugin-sdk\n// cannot depend on desktop-app, so the host injects its implementation at\n// startup (installPluginHostShim → __setPluginHostBridge). Module Federation\n// makes host and plugins share this single pluginSdk instance, so the bridge\n// the host sets is visible to the hooks the plugin calls.\n\nexport interface PluginHostBridge {\n\tuseActiveConversation(): ConversationState;\n\tuseConversationMessages(): ConversationMessage[];\n\tusePromptAttachment(): PluginPromptAttachment | null;\n\t/** Reactive: the host's current locale code (e.g. \"zh\"). */\n\tuseLocale(): string;\n\t/** Reactive: the host sidebar's current shape (collapsed / narrow / visible). */\n\tuseSidebarState(): PluginSidebarState;\n\tconversation: PluginConversationApi;\n}\n\nlet hostBridge: PluginHostBridge | undefined;\n\nexport function __setPluginHostBridge(bridge: PluginHostBridge): void {\n\thostBridge = bridge;\n}\n\n/** Package-internal: throws if the host has not installed the bridge yet. */\nexport function requireBridge(): PluginHostBridge {\n\tif (!hostBridge) {\n\t\tthrow new Error(\"Vetta plugin host bridge is not installed\");\n\t}\n\treturn hostBridge;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"host-bridge.js","sourceRoot":"","sources":["../src/host-bridge.ts"],"names":[],"mappings":"AAoBA,IAAI,UAAwC,CAAC;AAE7C,MAAM,UAAU,qBAAqB,CAAC,MAAwB,EAAQ;IACrE,UAAU,GAAG,MAAM,CAAC;AAAA,CACpB;AAED,6EAA6E;AAC7E,MAAM,UAAU,aAAa,GAAqB;IACjD,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,UAAU,CAAC;AAAA,CAClB","sourcesContent":["import type { ConversationMessage, ConversationState, PluginConversationApi } from \"./conversation.js\";\nimport type { PluginPromptAttachment } from \"./prompt-attachment.js\";\n\n// ─── Host bridge ───\n//\n// React hooks and conversation state read the host's jotai store. plugin-sdk\n// cannot depend on desktop-app, so the host injects its implementation at\n// startup (installPluginHostShim → __setPluginHostBridge). Module Federation\n// makes host and plugins share this single pluginSdk instance, so the bridge\n// the host sets is visible to the hooks the plugin calls.\n\nexport interface PluginHostBridge {\n\tuseActiveConversation(): ConversationState;\n\tuseConversationMessages(): ConversationMessage[];\n\tusePromptAttachment(): PluginPromptAttachment | null;\n\t/** Reactive: the host's current locale code (e.g. \"zh\"). */\n\tuseLocale(): string;\n\tconversation: PluginConversationApi;\n}\n\nlet hostBridge: PluginHostBridge | undefined;\n\nexport function __setPluginHostBridge(bridge: PluginHostBridge): void {\n\thostBridge = bridge;\n}\n\n/** Package-internal: throws if the host has not installed the bridge yet. */\nexport function requireBridge(): PluginHostBridge {\n\tif (!hostBridge) {\n\t\tthrow new Error(\"Vetta plugin host bridge is not installed\");\n\t}\n\treturn hostBridge;\n}\n"]}
1
+ {"version":3,"file":"host-bridge.js","sourceRoot":"","sources":["../src/host-bridge.ts"],"names":[],"mappings":"AAuBA,IAAI,UAAwC,CAAC;AAE7C,MAAM,UAAU,qBAAqB,CAAC,MAAwB,EAAQ;IACrE,UAAU,GAAG,MAAM,CAAC;AAAA,CACpB;AAED,6EAA6E;AAC7E,MAAM,UAAU,aAAa,GAAqB;IACjD,IAAI,CAAC,UAAU,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC9D,CAAC;IACD,OAAO,UAAU,CAAC;AAAA,CAClB","sourcesContent":["import type { ConversationMessage, ConversationState, PluginConversationApi } from \"./conversation.js\";\nimport type { PluginPromptAttachment } from \"./prompt-attachment.js\";\nimport type { PluginSidebarState } from \"./ui.js\";\n\n// ─── Host bridge ───\n//\n// React hooks and conversation state read the host's jotai store. plugin-sdk\n// cannot depend on desktop-app, so the host injects its implementation at\n// startup (installPluginHostShim → __setPluginHostBridge). Module Federation\n// makes host and plugins share this single pluginSdk instance, so the bridge\n// the host sets is visible to the hooks the plugin calls.\n\nexport interface PluginHostBridge {\n\tuseActiveConversation(): ConversationState;\n\tuseConversationMessages(): ConversationMessage[];\n\tusePromptAttachment(): PluginPromptAttachment | null;\n\t/** Reactive: the host's current locale code (e.g. \"zh\"). */\n\tuseLocale(): string;\n\t/** Reactive: the host sidebar's current shape (collapsed / narrow / visible). */\n\tuseSidebarState(): PluginSidebarState;\n\tconversation: PluginConversationApi;\n}\n\nlet hostBridge: PluginHostBridge | undefined;\n\nexport function __setPluginHostBridge(bridge: PluginHostBridge): void {\n\thostBridge = bridge;\n}\n\n/** Package-internal: throws if the host has not installed the bridge yet. */\nexport function requireBridge(): PluginHostBridge {\n\tif (!hostBridge) {\n\t\tthrow new Error(\"Vetta plugin host bridge is not installed\");\n\t}\n\treturn hostBridge;\n}\n"]}
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
@@ -12,7 +12,7 @@ export type { Disposable } from "./disposable.js";
12
12
  export type { PluginAgentManifest, PluginBrowserManifest, PluginCliProviderManifest, PluginServiceArtifact, PluginServicePlatform, PluginServiceProviderManifest, PluginServiceRuntimeKind, PluginManifest, PluginManifestInput, PluginManifestResourceReference, PluginMcpServerConfig, PluginNetworkManifest, PluginSkillPresentation, PluginSkillPresentationRule, } from "./manifest.js";
13
13
  export type { PluginFileExplorerEntry, PluginWorkspaceRoot, PluginFileExplorerWhen, PluginFileExplorerActionContext, PluginFileExplorerContextMenuContribution, PluginFileExplorerToolbarContext, PluginFileExplorerToolbarContribution, PluginFileExplorerDecoration, PluginFileExplorerDecorationProvider, PluginFileExplorerChange, PluginFileExplorerRevealOptions, PluginFileExplorerApi, } from "./file-explorer.js";
14
14
  export type { ConversationState, ConversationMessage, ConversationEvent, ConversationQueueState, CreateSessionOptions, PluginConversationApi, SendPromptResult, } from "./conversation.js";
15
- export type { PluginGlobalSlotContribution, PluginAbilityDetailSlotContribution, PluginAbilityDetailSlotProps, PluginNavBadge, PluginNavBadgeTone, PluginWorkspaceViewProps, PluginWorkspaceViewContribution, PluginWorkspaceViewHeader, PluginAudioMetadata, PluginPreviewUrlOptions, PluginPreviewFile, PluginPreviewFileRef, PluginFilePreviewProps, PluginFilePreviewContribution, PluginActivityTabContribution, PluginActivityTabRetention, PluginActivityTabTargetOptions, PluginCaptureRegion, PluginOpenActivityTabOptions, PluginPromptDecoration, PluginInputActionContribution, PluginNewSessionContext, PluginNewSessionContextActivation, PluginNewSessionContextContribution, PluginNewSessionTarget, CardDescriptor, PluginPendingToolCall, PluginCardProps, PluginCardRendererContribution, PluginToolCallSlotToolCall, PluginToolCallSlotProps, PluginToolCallSlotContribution, PluginTurnCardContribution, PluginNotifyOptions, PluginUiApi, } from "./ui.js";
15
+ export type { PluginGlobalSlotContribution, PluginAbilityDetailSlotContribution, PluginAbilityDetailSlotProps, PluginNavBadge, PluginNavBadgeTone, PluginWorkspaceViewProps, PluginWorkspaceViewContribution, PluginWorkspaceViewHeader, PluginSidebarState, PluginAudioMetadata, PluginPreviewUrlOptions, PluginPreviewFile, PluginPreviewFileRef, PluginFilePreviewProps, PluginFilePreviewContribution, PluginActivityTabContribution, PluginActivityTabRetention, PluginActivityTabTargetOptions, PluginCaptureRegion, PluginOpenActivityTabOptions, PluginPromptDecoration, PluginInputActionContribution, PluginNewSessionContext, PluginNewSessionContextActivation, PluginNewSessionContextContribution, PluginNewSessionTarget, CardDescriptor, PluginPendingToolCall, PluginCardProps, PluginCardRendererContribution, PluginToolCallSlotToolCall, PluginToolCallSlotProps, PluginToolCallSlotContribution, PluginTurnCardContribution, PluginNotifyOptions, PluginUiApi, } from "./ui.js";
16
16
  export type { PluginShortcutScopeKind, PluginShortcutWhen, PluginShortcutBinding, PluginShortcutScopeContribution, PluginRegisterShortcutScope, UsePluginShortcutScopeOptions, } from "./shortcuts.js";
17
17
  export { usePluginShortcutScope } from "./shortcuts.js";
18
18
  export type { PluginJsonSchema, PluginAgentToolApi, PluginAgentToolRegistration, PluginSystemPromptBlock, PluginDynamicSystemPromptOperation, PluginSystemPromptMessage, PluginSystemPromptProviderContext, PluginSystemPromptBlockView, PluginAgentActions, PluginAgentHandlerContext, PluginAgentToolHandler, PluginCodingAgentHookEvent, PluginCodingAgentHookEventName, PluginCodingAgentHookEventOf, PluginCodingAgentHookHandler, PluginCodingAgentHookHandlerContext, PluginCodingAgentHookRegistration, PluginCodingAgentHookResult, PluginCodingAgentHookTool, PluginCodingAgentPermissionMode, PluginSystemPromptProviderHandler, PluginSystemPromptProviderRegistration, PluginContinuationResult, PluginContinuationHandler, PluginContinuationRegistration, PluginAgentApi, } from "./agent.js";
@@ -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";
@@ -50,5 +52,5 @@ export { __setPluginHostBridge } from "./host-bridge.js";
50
52
  export type { ActivityTabContextValue } from "./activity-tab.js";
51
53
  export { __ActivityTabContext, useActivityTab } from "./activity-tab.js";
52
54
  export type { PluginI18nContextValue, PluginTranslation } from "./hooks.js";
53
- export { __PluginI18nContext, useTranslation, useActiveConversation, useConversationMessages, usePromptAttachment, } from "./hooks.js";
55
+ export { __PluginI18nContext, useTranslation, useActiveConversation, useConversationMessages, usePromptAttachment, useSidebarState, } from "./hooks.js";
54
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index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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,GACnB,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\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} 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,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AAmB,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,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,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,8 +13,9 @@ 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";
19
- export { __PluginI18nContext, useTranslation, useActiveConversation, useConversationMessages, usePromptAttachment, } from "./hooks.js";
20
+ export { __PluginI18nContext, useTranslation, useActiveConversation, useConversationMessages, usePromptAttachment, useSidebarState, } from "./hooks.js";
20
21
  //# sourceMappingURL=index.js.map
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;AA+FtD,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,GACnB,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\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} 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?: string): PluginLogger;
26
+ //# sourceMappingURL=logging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logging.d.ts","sourceRoot":"","sources":["../src/logging.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjE,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAEhE,MAAM,WAAW,YAAY;IAC5B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACvD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACtD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACtD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACvD,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,cAAc,CAAC;IACtB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;AAI5D,sEAAsE;AACtE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI,CAExE;AAyBD,0GAA0G;AAC1G,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,iBAAiB,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;AACtE,MAAM,UAAU,kBAAkB,CAAC,IAA+B,EAAQ;IACzE,aAAa,GAAG,IAAI,CAAC;AAAA,CACrB;AAED,SAAS,SAAS,CAAC,MAA0B,EAAE,KAAa,EAAU;IACrE,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAChC,IAAI,CAAC,UAAU;QAAE,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAC1E,OAAO,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAAA,CACvD;AAED,SAAS,IAAI,CACZ,MAAyB,EACzB,KAAyB,EACzB,KAAqB,EACrB,OAAe,EACf,MAAmC,EAC5B;IACP,IAAI,CAAC,aAAa;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;IAC9E,aAAa,CAAC;QACb,KAAK;QACL,MAAM;QACN,GAAG,CAAC,KAAK,CAAC,CAAC,CAA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A,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 = {