@vetta-org/plugin-sdk 0.3.7 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-actions.d.ts +5 -0
- package/dist/app-actions.d.ts.map +1 -1
- package/dist/app-actions.js.map +1 -1
- package/dist/bottom-panel.d.ts +83 -0
- package/dist/bottom-panel.d.ts.map +1 -0
- package/dist/bottom-panel.js +23 -0
- package/dist/bottom-panel.js.map +1 -0
- package/dist/file-explorer.d.ts +30 -0
- package/dist/file-explorer.d.ts.map +1 -1
- package/dist/file-explorer.js.map +1 -1
- package/dist/fs.d.ts +17 -1
- package/dist/fs.d.ts.map +1 -1
- package/dist/fs.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/manifest-schema.d.ts +2 -2
- package/dist/manifest-schema.d.ts.map +1 -1
- package/dist/models.d.ts +2 -0
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js.map +1 -1
- package/dist/official.d.ts +94 -28
- package/dist/official.d.ts.map +1 -1
- package/dist/official.js.map +1 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +2 -0
- package/dist/permissions.js.map +1 -1
- package/dist/ui.d.ts +43 -3
- package/dist/ui.d.ts.map +1 -1
- package/dist/ui.js.map +1 -1
- package/docs/README.md +1 -0
- package/docs/app-actions.md +1 -0
- package/docs/conversation-and-agent.md +14 -1
- package/docs/file-explorer.md +54 -3
- package/docs/manifest.md +1 -1
- package/docs/mcp.md +1 -1
- package/docs/message-cards.md +5 -1
- package/docs/permissions.md +5 -1
- package/docs/styling-and-pitfalls.md +1 -0
- package/docs/ui-slots.md +98 -2
- package/package.json +2 -2
package/dist/app-actions.d.ts
CHANGED
|
@@ -61,6 +61,11 @@ export interface PluginAppActionRegistration<TInput = unknown> {
|
|
|
61
61
|
inputSchema: PluginJsonSchema;
|
|
62
62
|
examples?: PluginAppActionExample<TInput>[];
|
|
63
63
|
timeoutMs?: number;
|
|
64
|
+
/**
|
|
65
|
+
* 已配对的手机可经远程控制(`action.run`)调用。仅限 `effect: "read"`;
|
|
66
|
+
* 旧宿主忽略此字段,手机端只在桌面声明 `actions` 能力时才会调用。
|
|
67
|
+
*/
|
|
68
|
+
remote?: boolean;
|
|
64
69
|
/** 审批前业务就绪校验;失败时不会向用户弹出审批。 */
|
|
65
70
|
assertReady?: PluginAppActionReadyHandler<TInput>;
|
|
66
71
|
handler: PluginAppActionHandler<TInput>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-actions.d.ts","sourceRoot":"","sources":["../src/app-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjE,+EAA+E;AAC/E,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB,CAAC,MAAM,GAAG,OAAO;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,6BAA6B,CAAC,MAAM,GAAG,OAAO;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,QAAQ,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,WAAW,CAAC;CACpB;AAED,MAAM,MAAM,sBAAsB,CAAC,MAAM,GAAG,OAAO,IAAI,CACtD,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,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,6FAAyC;IACzC,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC,WAAW,EAAE,gBAAgB,CAAC;IAC9B,QAAQ,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4EAA8B;IAC9B,WAAW,CAAC,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC;IAClD,OAAO,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,MAAM,GAAG,OAAO,EAAE,YAAY,EAAE,2BAA2B,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC;CAC1F","sourcesContent":["import type { PluginJsonSchema } from \"./agent.js\";\nimport type { Disposable } from \"./disposable.js\";\n\nexport type PluginAppActionEffect = \"read\" | \"write\" | \"execute\";\n\n/** Model-facing routing guidance, not authorization or an execution policy. */\nexport interface PluginAppActionUsage {\n\ttarget: string;\n\tuseWhen: string;\n\tavoidWhen: string;\n\talternatives: string;\n}\n\nexport interface PluginAppActionExample<TInput = unknown> {\n\tdescription: string;\n\tinput: TInput;\n}\n\nexport interface PluginAppActionHandlerContext<TInput = unknown> {\n\tinvocationId: string;\n\tplugin: {\n\t\tid: string;\n\t\tactionId: string;\n\t};\n\tinput: TInput;\n\tsignal: AbortSignal;\n}\n\nexport type PluginAppActionHandler<TInput = unknown> = (\n\tcontext: PluginAppActionHandlerContext<TInput>,\n) => unknown | Promise<unknown>;\n\nexport type PluginAppActionReadyHandler<TInput = unknown> = (\n\tcontext: PluginAppActionHandlerContext<TInput>,\n) => void | Promise<void>;\n\n/** 插件 Action 向宿主返回稳定错误码与可序列化详情。 */\nexport class PluginAppActionError extends Error {\n\treadonly code: string;\n\treadonly details?: unknown;\n\n\tconstructor(code: string, message: string, details?: unknown) {\n\t\tsuper(message);\n\t\tthis.name = \"PluginAppActionError\";\n\t\tthis.code = code;\n\t\tthis.details = details;\n\t}\n}\n\nexport interface PluginAppActionApprovalPresentation {\n\tid: string;\n\ttitle: string;\n\tdescription: string;\n}\n\nexport interface PluginAppActionApproval {\n\t/** 默认使用的宿主审批界面。 */\n\tdefaultPresentation: string;\n\t/** 可用的宿主审批界面;仅官方插件可以声明。 */\n\tpresentations: PluginAppActionApprovalPresentation[];\n\t/** 根据 input.operation 自动选择审批界面,不要求 Agent 传 approvalUi。 */\n\tpresentationByOperation?: Record<string, string>;\n\t/** 某 operation 明确允许的附加审批界面;宿主仍会拒绝未列出的调用方选择。 */\n\talternativePresentationsByOperation?: Record<string, string[]>;\n}\n\nexport interface PluginAppActionRegistration<TInput = unknown> {\n\t/** 插件内局部 id;宿主公开为 `plugin.<pluginId>.<id>`。 */\n\tid: string;\n\t/** 可信官方插件可指定稳定公共 id;若 id 已被占用则后到者忽略(先注册为准)。 */\n\tpublicId?: string;\n\ttitle: string;\n\tsummary: string;\n\tdescription?: string;\n\t/** Returned by search and describe; exclusions are never positive search terms. */\n\tusage?: PluginAppActionUsage;\n\tkeywords?: string[];\n\teffect: PluginAppActionEffect;\n\t/** 官方插件可引用宿主已有审批界面;不能关闭 effect 对应的审批。 */\n\tapproval?: PluginAppActionApproval;\n\tinputSchema: PluginJsonSchema;\n\texamples?: PluginAppActionExample<TInput>[];\n\ttimeoutMs?: number;\n\t/** 审批前业务就绪校验;失败时不会向用户弹出审批。 */\n\tassertReady?: PluginAppActionReadyHandler<TInput>;\n\thandler: PluginAppActionHandler<TInput>;\n}\n\nexport interface PluginAppActionsApi {\n\tregister<TInput = unknown>(registration: PluginAppActionRegistration<TInput>): Disposable;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"app-actions.d.ts","sourceRoot":"","sources":["../src/app-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU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ent":["import type { PluginJsonSchema } from \"./agent.js\";\nimport type { Disposable } from \"./disposable.js\";\n\nexport type PluginAppActionEffect = \"read\" | \"write\" | \"execute\";\n\n/** Model-facing routing guidance, not authorization or an execution policy. */\nexport interface PluginAppActionUsage {\n\ttarget: string;\n\tuseWhen: string;\n\tavoidWhen: string;\n\talternatives: string;\n}\n\nexport interface PluginAppActionExample<TInput = unknown> {\n\tdescription: string;\n\tinput: TInput;\n}\n\nexport interface PluginAppActionHandlerContext<TInput = unknown> {\n\tinvocationId: string;\n\tplugin: {\n\t\tid: string;\n\t\tactionId: string;\n\t};\n\tinput: TInput;\n\tsignal: AbortSignal;\n}\n\nexport type PluginAppActionHandler<TInput = unknown> = (\n\tcontext: PluginAppActionHandlerContext<TInput>,\n) => unknown | Promise<unknown>;\n\nexport type PluginAppActionReadyHandler<TInput = unknown> = (\n\tcontext: PluginAppActionHandlerContext<TInput>,\n) => void | Promise<void>;\n\n/** 插件 Action 向宿主返回稳定错误码与可序列化详情。 */\nexport class PluginAppActionError extends Error {\n\treadonly code: string;\n\treadonly details?: unknown;\n\n\tconstructor(code: string, message: string, details?: unknown) {\n\t\tsuper(message);\n\t\tthis.name = \"PluginAppActionError\";\n\t\tthis.code = code;\n\t\tthis.details = details;\n\t}\n}\n\nexport interface PluginAppActionApprovalPresentation {\n\tid: string;\n\ttitle: string;\n\tdescription: string;\n}\n\nexport interface PluginAppActionApproval {\n\t/** 默认使用的宿主审批界面。 */\n\tdefaultPresentation: string;\n\t/** 可用的宿主审批界面;仅官方插件可以声明。 */\n\tpresentations: PluginAppActionApprovalPresentation[];\n\t/** 根据 input.operation 自动选择审批界面,不要求 Agent 传 approvalUi。 */\n\tpresentationByOperation?: Record<string, string>;\n\t/** 某 operation 明确允许的附加审批界面;宿主仍会拒绝未列出的调用方选择。 */\n\talternativePresentationsByOperation?: Record<string, string[]>;\n}\n\nexport interface PluginAppActionRegistration<TInput = unknown> {\n\t/** 插件内局部 id;宿主公开为 `plugin.<pluginId>.<id>`。 */\n\tid: string;\n\t/** 可信官方插件可指定稳定公共 id;若 id 已被占用则后到者忽略(先注册为准)。 */\n\tpublicId?: string;\n\ttitle: string;\n\tsummary: string;\n\tdescription?: string;\n\t/** Returned by search and describe; exclusions are never positive search terms. */\n\tusage?: PluginAppActionUsage;\n\tkeywords?: string[];\n\teffect: PluginAppActionEffect;\n\t/** 官方插件可引用宿主已有审批界面;不能关闭 effect 对应的审批。 */\n\tapproval?: PluginAppActionApproval;\n\tinputSchema: PluginJsonSchema;\n\texamples?: PluginAppActionExample<TInput>[];\n\ttimeoutMs?: number;\n\t/**\n\t * 已配对的手机可经远程控制(`action.run`)调用。仅限 `effect: \"read\"`;\n\t * 旧宿主忽略此字段,手机端只在桌面声明 `actions` 能力时才会调用。\n\t */\n\tremote?: boolean;\n\t/** 审批前业务就绪校验;失败时不会向用户弹出审批。 */\n\tassertReady?: PluginAppActionReadyHandler<TInput>;\n\thandler: PluginAppActionHandler<TInput>;\n}\n\nexport interface PluginAppActionsApi {\n\tregister<TInput = unknown>(registration: PluginAppActionRegistration<TInput>): Disposable;\n}\n"]}
|
package/dist/app-actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-actions.js","sourceRoot":"","sources":["../src/app-actions.ts"],"names":[],"mappings":"AAoCA,2EAAmC;AACnC,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACrC,IAAI,CAAS;IACb,OAAO,CAAW;IAE3B,YAAY,IAAY,EAAE,OAAe,EAAE,OAAiB,EAAE;QAC7D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAAA,CACvB;CACD","sourcesContent":["import type { PluginJsonSchema } from \"./agent.js\";\nimport type { Disposable } from \"./disposable.js\";\n\nexport type PluginAppActionEffect = \"read\" | \"write\" | \"execute\";\n\n/** Model-facing routing guidance, not authorization or an execution policy. */\nexport interface PluginAppActionUsage {\n\ttarget: string;\n\tuseWhen: string;\n\tavoidWhen: string;\n\talternatives: string;\n}\n\nexport interface PluginAppActionExample<TInput = unknown> {\n\tdescription: string;\n\tinput: TInput;\n}\n\nexport interface PluginAppActionHandlerContext<TInput = unknown> {\n\tinvocationId: string;\n\tplugin: {\n\t\tid: string;\n\t\tactionId: string;\n\t};\n\tinput: TInput;\n\tsignal: AbortSignal;\n}\n\nexport type PluginAppActionHandler<TInput = unknown> = (\n\tcontext: PluginAppActionHandlerContext<TInput>,\n) => unknown | Promise<unknown>;\n\nexport type PluginAppActionReadyHandler<TInput = unknown> = (\n\tcontext: PluginAppActionHandlerContext<TInput>,\n) => void | Promise<void>;\n\n/** 插件 Action 向宿主返回稳定错误码与可序列化详情。 */\nexport class PluginAppActionError extends Error {\n\treadonly code: string;\n\treadonly details?: unknown;\n\n\tconstructor(code: string, message: string, details?: unknown) {\n\t\tsuper(message);\n\t\tthis.name = \"PluginAppActionError\";\n\t\tthis.code = code;\n\t\tthis.details = details;\n\t}\n}\n\nexport interface PluginAppActionApprovalPresentation {\n\tid: string;\n\ttitle: string;\n\tdescription: string;\n}\n\nexport interface PluginAppActionApproval {\n\t/** 默认使用的宿主审批界面。 */\n\tdefaultPresentation: string;\n\t/** 可用的宿主审批界面;仅官方插件可以声明。 */\n\tpresentations: PluginAppActionApprovalPresentation[];\n\t/** 根据 input.operation 自动选择审批界面,不要求 Agent 传 approvalUi。 */\n\tpresentationByOperation?: Record<string, string>;\n\t/** 某 operation 明确允许的附加审批界面;宿主仍会拒绝未列出的调用方选择。 */\n\talternativePresentationsByOperation?: Record<string, string[]>;\n}\n\nexport interface PluginAppActionRegistration<TInput = unknown> {\n\t/** 插件内局部 id;宿主公开为 `plugin.<pluginId>.<id>`。 */\n\tid: string;\n\t/** 可信官方插件可指定稳定公共 id;若 id 已被占用则后到者忽略(先注册为准)。 */\n\tpublicId?: string;\n\ttitle: string;\n\tsummary: string;\n\tdescription?: string;\n\t/** Returned by search and describe; exclusions are never positive search terms. */\n\tusage?: PluginAppActionUsage;\n\tkeywords?: string[];\n\teffect: PluginAppActionEffect;\n\t/** 官方插件可引用宿主已有审批界面;不能关闭 effect 对应的审批。 */\n\tapproval?: PluginAppActionApproval;\n\tinputSchema: PluginJsonSchema;\n\texamples?: PluginAppActionExample<TInput>[];\n\ttimeoutMs?: number;\n\t/** 审批前业务就绪校验;失败时不会向用户弹出审批。 */\n\tassertReady?: PluginAppActionReadyHandler<TInput>;\n\thandler: PluginAppActionHandler<TInput>;\n}\n\nexport interface PluginAppActionsApi {\n\tregister<TInput = unknown>(registration: PluginAppActionRegistration<TInput>): Disposable;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"app-actions.js","sourceRoot":"","sources":["../src/app-actions.ts"],"names":[],"mappings":"AAoCA,2EAAmC;AACnC,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACrC,IAAI,CAAS;IACb,OAAO,CAAW;IAE3B,YAAY,IAAY,EAAE,OAAe,EAAE,OAAiB,EAAE;QAC7D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAAA,CACvB;CACD","sourcesContent":["import type { PluginJsonSchema } from \"./agent.js\";\nimport type { Disposable } from \"./disposable.js\";\n\nexport type PluginAppActionEffect = \"read\" | \"write\" | \"execute\";\n\n/** Model-facing routing guidance, not authorization or an execution policy. */\nexport interface PluginAppActionUsage {\n\ttarget: string;\n\tuseWhen: string;\n\tavoidWhen: string;\n\talternatives: string;\n}\n\nexport interface PluginAppActionExample<TInput = unknown> {\n\tdescription: string;\n\tinput: TInput;\n}\n\nexport interface PluginAppActionHandlerContext<TInput = unknown> {\n\tinvocationId: string;\n\tplugin: {\n\t\tid: string;\n\t\tactionId: string;\n\t};\n\tinput: TInput;\n\tsignal: AbortSignal;\n}\n\nexport type PluginAppActionHandler<TInput = unknown> = (\n\tcontext: PluginAppActionHandlerContext<TInput>,\n) => unknown | Promise<unknown>;\n\nexport type PluginAppActionReadyHandler<TInput = unknown> = (\n\tcontext: PluginAppActionHandlerContext<TInput>,\n) => void | Promise<void>;\n\n/** 插件 Action 向宿主返回稳定错误码与可序列化详情。 */\nexport class PluginAppActionError extends Error {\n\treadonly code: string;\n\treadonly details?: unknown;\n\n\tconstructor(code: string, message: string, details?: unknown) {\n\t\tsuper(message);\n\t\tthis.name = \"PluginAppActionError\";\n\t\tthis.code = code;\n\t\tthis.details = details;\n\t}\n}\n\nexport interface PluginAppActionApprovalPresentation {\n\tid: string;\n\ttitle: string;\n\tdescription: string;\n}\n\nexport interface PluginAppActionApproval {\n\t/** 默认使用的宿主审批界面。 */\n\tdefaultPresentation: string;\n\t/** 可用的宿主审批界面;仅官方插件可以声明。 */\n\tpresentations: PluginAppActionApprovalPresentation[];\n\t/** 根据 input.operation 自动选择审批界面,不要求 Agent 传 approvalUi。 */\n\tpresentationByOperation?: Record<string, string>;\n\t/** 某 operation 明确允许的附加审批界面;宿主仍会拒绝未列出的调用方选择。 */\n\talternativePresentationsByOperation?: Record<string, string[]>;\n}\n\nexport interface PluginAppActionRegistration<TInput = unknown> {\n\t/** 插件内局部 id;宿主公开为 `plugin.<pluginId>.<id>`。 */\n\tid: string;\n\t/** 可信官方插件可指定稳定公共 id;若 id 已被占用则后到者忽略(先注册为准)。 */\n\tpublicId?: string;\n\ttitle: string;\n\tsummary: string;\n\tdescription?: string;\n\t/** Returned by search and describe; exclusions are never positive search terms. */\n\tusage?: PluginAppActionUsage;\n\tkeywords?: string[];\n\teffect: PluginAppActionEffect;\n\t/** 官方插件可引用宿主已有审批界面;不能关闭 effect 对应的审批。 */\n\tapproval?: PluginAppActionApproval;\n\tinputSchema: PluginJsonSchema;\n\texamples?: PluginAppActionExample<TInput>[];\n\ttimeoutMs?: number;\n\t/**\n\t * 已配对的手机可经远程控制(`action.run`)调用。仅限 `effect: \"read\"`;\n\t * 旧宿主忽略此字段,手机端只在桌面声明 `actions` 能力时才会调用。\n\t */\n\tremote?: boolean;\n\t/** 审批前业务就绪校验;失败时不会向用户弹出审批。 */\n\tassertReady?: PluginAppActionReadyHandler<TInput>;\n\thandler: PluginAppActionHandler<TInput>;\n}\n\nexport interface PluginAppActionsApi {\n\tregister<TInput = unknown>(registration: PluginAppActionRegistration<TInput>): Disposable;\n}\n"]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/** 空闲是静止灰点,活动是脉冲绿点;tab 与面板缩起后的 pill 用同一套状态。 */
|
|
3
|
+
export type PluginBottomPanelStatus = "idle" | "active";
|
|
4
|
+
export interface PluginBottomPanelMeta {
|
|
5
|
+
/** Supports `%catalogKey%` i18n lookup, same as the contribution label. */
|
|
6
|
+
label?: string;
|
|
7
|
+
/** Tab icon as a React node or an iconify class string. */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
status?: PluginBottomPanelStatus;
|
|
10
|
+
}
|
|
11
|
+
/** 关闭前的确认文案。**宿主**用自己的对话框呈现——面板类 slot 不允许自己画浮层。 */
|
|
12
|
+
export interface PluginBottomPanelCloseConfirm {
|
|
13
|
+
title: string;
|
|
14
|
+
message: string;
|
|
15
|
+
confirmLabel?: string;
|
|
16
|
+
cancelLabel?: string;
|
|
17
|
+
/** 展示为危险操作(会丢东西时用)。 */
|
|
18
|
+
destructive?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export type PluginBottomPanelCloseReason = "user-close-tab" | "user-close-panel" | "session-switch" | "app-quit";
|
|
21
|
+
export interface PluginBottomPanelCloseRequest {
|
|
22
|
+
instanceId: string;
|
|
23
|
+
reason: PluginBottomPanelCloseReason;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* `true` 直接关,`false` 取消关闭,返回文案则请宿主先确认一次。
|
|
27
|
+
*
|
|
28
|
+
* 允许 async:真实判断往往要问后端(终端要问「还有活进程吗」)。宿主等不到决定时
|
|
29
|
+
* **按需要确认处理**,不会静默关掉——丢东西的方向必须是保守的。
|
|
30
|
+
*/
|
|
31
|
+
export type PluginBottomPanelCloseDecision = boolean | PluginBottomPanelCloseConfirm;
|
|
32
|
+
/**
|
|
33
|
+
* 请宿主开一个内置终端并替用户敲一条命令。
|
|
34
|
+
*
|
|
35
|
+
* 命令是**敲进交互式 shell** 的:跑完 shell 还在,用户能接着按上箭头重跑或自己继续敲;
|
|
36
|
+
* 终端的交互、分屏、关闭前确认都由宿主负责,插件不用自己实现输出视图。
|
|
37
|
+
*/
|
|
38
|
+
export interface PluginBottomPanelTerminalRequest {
|
|
39
|
+
/** 单行命令,原样敲进 shell 后回车。不能含换行或其他控制字符,最长 4096 字符。 */
|
|
40
|
+
command: string;
|
|
41
|
+
/**
|
|
42
|
+
* 在哪个目录里跑。必须是面板的 `cwd` 本身或它下面的目录(本地绝对路径或同一台主机的
|
|
43
|
+
* `ssh://` 路径);省略即面板 `cwd`。
|
|
44
|
+
*/
|
|
45
|
+
cwd?: string;
|
|
46
|
+
/** 终端 tab 的名字;省略则按目录名显示。 */
|
|
47
|
+
label?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface PluginBottomPanelContextValue {
|
|
50
|
+
/** 这一个实例的 id。同一个面板可以开多份,靠它区分。 */
|
|
51
|
+
instanceId: string;
|
|
52
|
+
/**
|
|
53
|
+
* 面板所属会话的 cwd(本地绝对路径或 `ssh://<hostId>/<path>`)。
|
|
54
|
+
* 不要拿 useActiveConversation().cwd 代替:底部面板绑在自己的会话上。
|
|
55
|
+
*/
|
|
56
|
+
cwd: string | null;
|
|
57
|
+
/** 是否是所在分格的活动 tab 且面板未折叠。false 时应暂停轮询与动画。 */
|
|
58
|
+
active: boolean;
|
|
59
|
+
/** 实时改名字、图标与状态点;传 null 回到注册时的默认 meta。 */
|
|
60
|
+
setMeta(meta: PluginBottomPanelMeta | null): void;
|
|
61
|
+
/** 装/撤关闭前裁决。传 null 表示「随便关」。 */
|
|
62
|
+
setCloseGuard(guard: ((request: PluginBottomPanelCloseRequest) => PluginBottomPanelCloseDecision | Promise<PluginBottomPanelCloseDecision>) | null): void;
|
|
63
|
+
/**
|
|
64
|
+
* 在本实例所在的格子里新开一个终端并替用户敲 `request.command`,返回新终端 tab 的
|
|
65
|
+
* instanceId(可交给 {@link revealInstance})。需要 `terminal.run` 权限,缺权限、请求
|
|
66
|
+
* 不合规或当前会话开不了终端(本机缺终端支持)时**抛错**。
|
|
67
|
+
*/
|
|
68
|
+
openTerminal(request: PluginBottomPanelTerminalRequest): string;
|
|
69
|
+
/**
|
|
70
|
+
* 把同一底部面板里的某个实例(如 {@link openTerminal} 开出的终端)切到前台并展开面板。
|
|
71
|
+
* 该实例已被关闭时返回 false。
|
|
72
|
+
*/
|
|
73
|
+
revealInstance(instanceId: string): boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Internal: the host wraps bottom-panel components in this context's Provider.
|
|
77
|
+
* Module Federation shares this single SDK instance, so the value the host
|
|
78
|
+
* provides is visible to plugin components.
|
|
79
|
+
*/
|
|
80
|
+
export declare const __BottomPanelContext: import("react").Context<PluginBottomPanelContextValue>;
|
|
81
|
+
/** 当前底部面板实例的身份与控制面。 */
|
|
82
|
+
export declare function useBottomPanel(): PluginBottomPanelContextValue;
|
|
83
|
+
//# sourceMappingURL=bottom-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-panel.d.ts","sourceRoot":"","sources":["../src/bottom-panel.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,2GAA+C;AAC/C,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACrC,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;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CAAgC,GAAG,MAAM,CAAC;IAChE;;;OAGG;IACH,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5C;AAcD;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,wDAA6D,CAAC;AAE/F,uDAAuB;AACvB,wBAAgB,cAAc,IAAI,6BAA6B,CAE9D","sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { ReactNode } from \"react\";\n\n/** 空闲是静止灰点,活动是脉冲绿点;tab 与面板缩起后的 pill 用同一套状态。 */\nexport type PluginBottomPanelStatus = \"idle\" | \"active\";\n\nexport interface PluginBottomPanelMeta {\n\t/** Supports `%catalogKey%` i18n lookup, same as the contribution label. */\n\tlabel?: string;\n\t/** Tab icon as a React node or an iconify class string. */\n\ticon?: ReactNode;\n\tstatus?: PluginBottomPanelStatus;\n}\n\n/** 关闭前的确认文案。**宿主**用自己的对话框呈现——面板类 slot 不允许自己画浮层。 */\nexport interface PluginBottomPanelCloseConfirm {\n\ttitle: string;\n\tmessage: string;\n\tconfirmLabel?: string;\n\tcancelLabel?: string;\n\t/** 展示为危险操作(会丢东西时用)。 */\n\tdestructive?: boolean;\n}\n\nexport type PluginBottomPanelCloseReason =\n\t| \"user-close-tab\"\n\t| \"user-close-panel\"\n\t| \"session-switch\"\n\t| \"app-quit\";\n\nexport interface PluginBottomPanelCloseRequest {\n\tinstanceId: string;\n\treason: PluginBottomPanelCloseReason;\n}\n\n/**\n * `true` 直接关,`false` 取消关闭,返回文案则请宿主先确认一次。\n *\n * 允许 async:真实判断往往要问后端(终端要问「还有活进程吗」)。宿主等不到决定时\n * **按需要确认处理**,不会静默关掉——丢东西的方向必须是保守的。\n */\nexport type PluginBottomPanelCloseDecision = boolean | PluginBottomPanelCloseConfirm;\n\n/**\n * 请宿主开一个内置终端并替用户敲一条命令。\n *\n * 命令是**敲进交互式 shell** 的:跑完 shell 还在,用户能接着按上箭头重跑或自己继续敲;\n * 终端的交互、分屏、关闭前确认都由宿主负责,插件不用自己实现输出视图。\n */\nexport interface PluginBottomPanelTerminalRequest {\n\t/** 单行命令,原样敲进 shell 后回车。不能含换行或其他控制字符,最长 4096 字符。 */\n\tcommand: string;\n\t/**\n\t * 在哪个目录里跑。必须是面板的 `cwd` 本身或它下面的目录(本地绝对路径或同一台主机的\n\t * `ssh://` 路径);省略即面板 `cwd`。\n\t */\n\tcwd?: string;\n\t/** 终端 tab 的名字;省略则按目录名显示。 */\n\tlabel?: string;\n}\n\nexport interface PluginBottomPanelContextValue {\n\t/** 这一个实例的 id。同一个面板可以开多份,靠它区分。 */\n\tinstanceId: string;\n\t/**\n\t * 面板所属会话的 cwd(本地绝对路径或 `ssh://<hostId>/<path>`)。\n\t * 不要拿 useActiveConversation().cwd 代替:底部面板绑在自己的会话上。\n\t */\n\tcwd: string | null;\n\t/** 是否是所在分格的活动 tab 且面板未折叠。false 时应暂停轮询与动画。 */\n\tactive: boolean;\n\t/** 实时改名字、图标与状态点;传 null 回到注册时的默认 meta。 */\n\tsetMeta(meta: PluginBottomPanelMeta | null): void;\n\t/** 装/撤关闭前裁决。传 null 表示「随便关」。 */\n\tsetCloseGuard(\n\t\tguard:\n\t\t\t| ((request: PluginBottomPanelCloseRequest) =>\n\t\t\t\t\t| PluginBottomPanelCloseDecision\n\t\t\t\t\t| Promise<PluginBottomPanelCloseDecision>)\n\t\t\t| null,\n\t): void;\n\t/**\n\t * 在本实例所在的格子里新开一个终端并替用户敲 `request.command`,返回新终端 tab 的\n\t * instanceId(可交给 {@link revealInstance})。需要 `terminal.run` 权限,缺权限、请求\n\t * 不合规或当前会话开不了终端(本机缺终端支持)时**抛错**。\n\t */\n\topenTerminal(request: PluginBottomPanelTerminalRequest): string;\n\t/**\n\t * 把同一底部面板里的某个实例(如 {@link openTerminal} 开出的终端)切到前台并展开面板。\n\t * 该实例已被关闭时返回 false。\n\t */\n\trevealInstance(instanceId: string): boolean;\n}\n\nconst NOOP_CONTEXT: PluginBottomPanelContextValue = {\n\tinstanceId: \"\",\n\tcwd: null,\n\tactive: false,\n\tsetMeta: () => {},\n\tsetCloseGuard: () => {},\n\topenTerminal: () => {\n\t\tthrow new Error(\"useBottomPanel().openTerminal must be called inside a bottom panel\");\n\t},\n\trevealInstance: () => false,\n};\n\n/**\n * Internal: the host wraps bottom-panel components in this context's Provider.\n * Module Federation shares this single SDK instance, so the value the host\n * provides is visible to plugin components.\n */\nexport const __BottomPanelContext = createContext<PluginBottomPanelContextValue>(NOOP_CONTEXT);\n\n/** 当前底部面板实例的身份与控制面。 */\nexport function useBottomPanel(): PluginBottomPanelContextValue {\n\treturn useContext(__BottomPanelContext);\n}\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
const NOOP_CONTEXT = {
|
|
3
|
+
instanceId: "",
|
|
4
|
+
cwd: null,
|
|
5
|
+
active: false,
|
|
6
|
+
setMeta: () => { },
|
|
7
|
+
setCloseGuard: () => { },
|
|
8
|
+
openTerminal: () => {
|
|
9
|
+
throw new Error("useBottomPanel().openTerminal must be called inside a bottom panel");
|
|
10
|
+
},
|
|
11
|
+
revealInstance: () => false,
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Internal: the host wraps bottom-panel components in this context's Provider.
|
|
15
|
+
* Module Federation shares this single SDK instance, so the value the host
|
|
16
|
+
* provides is visible to plugin components.
|
|
17
|
+
*/
|
|
18
|
+
export const __BottomPanelContext = createContext(NOOP_CONTEXT);
|
|
19
|
+
/** 当前底部面板实例的身份与控制面。 */
|
|
20
|
+
export function useBottomPanel() {
|
|
21
|
+
return useContext(__BottomPanelContext);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=bottom-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bottom-panel.js","sourceRoot":"","sources":["../src/bottom-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA8FlD,MAAM,YAAY,GAAkC;IACnD,UAAU,EAAE,EAAE;IACd,GAAG,EAAE,IAAI;IACT,MAAM,EAAE,KAAK;IACb,OAAO,EAAE,GAAG,EAAE,CAAC,EAAC,CAAC;IACjB,aAAa,EAAE,GAAG,EAAE,CAAC,EAAC,CAAC;IACvB,YAAY,EAAE,GAAG,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,oEAAoE,CAAC,CAAC;IAAA,CACtF;IACD,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK;CAC3B,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAgC,YAAY,CAAC,CAAC;AAE/F,uDAAuB;AACvB,MAAM,UAAU,cAAc,GAAkC;IAC/D,OAAO,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAAA,CACxC","sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { ReactNode } from \"react\";\n\n/** 空闲是静止灰点,活动是脉冲绿点;tab 与面板缩起后的 pill 用同一套状态。 */\nexport type PluginBottomPanelStatus = \"idle\" | \"active\";\n\nexport interface PluginBottomPanelMeta {\n\t/** Supports `%catalogKey%` i18n lookup, same as the contribution label. */\n\tlabel?: string;\n\t/** Tab icon as a React node or an iconify class string. */\n\ticon?: ReactNode;\n\tstatus?: PluginBottomPanelStatus;\n}\n\n/** 关闭前的确认文案。**宿主**用自己的对话框呈现——面板类 slot 不允许自己画浮层。 */\nexport interface PluginBottomPanelCloseConfirm {\n\ttitle: string;\n\tmessage: string;\n\tconfirmLabel?: string;\n\tcancelLabel?: string;\n\t/** 展示为危险操作(会丢东西时用)。 */\n\tdestructive?: boolean;\n}\n\nexport type PluginBottomPanelCloseReason =\n\t| \"user-close-tab\"\n\t| \"user-close-panel\"\n\t| \"session-switch\"\n\t| \"app-quit\";\n\nexport interface PluginBottomPanelCloseRequest {\n\tinstanceId: string;\n\treason: PluginBottomPanelCloseReason;\n}\n\n/**\n * `true` 直接关,`false` 取消关闭,返回文案则请宿主先确认一次。\n *\n * 允许 async:真实判断往往要问后端(终端要问「还有活进程吗」)。宿主等不到决定时\n * **按需要确认处理**,不会静默关掉——丢东西的方向必须是保守的。\n */\nexport type PluginBottomPanelCloseDecision = boolean | PluginBottomPanelCloseConfirm;\n\n/**\n * 请宿主开一个内置终端并替用户敲一条命令。\n *\n * 命令是**敲进交互式 shell** 的:跑完 shell 还在,用户能接着按上箭头重跑或自己继续敲;\n * 终端的交互、分屏、关闭前确认都由宿主负责,插件不用自己实现输出视图。\n */\nexport interface PluginBottomPanelTerminalRequest {\n\t/** 单行命令,原样敲进 shell 后回车。不能含换行或其他控制字符,最长 4096 字符。 */\n\tcommand: string;\n\t/**\n\t * 在哪个目录里跑。必须是面板的 `cwd` 本身或它下面的目录(本地绝对路径或同一台主机的\n\t * `ssh://` 路径);省略即面板 `cwd`。\n\t */\n\tcwd?: string;\n\t/** 终端 tab 的名字;省略则按目录名显示。 */\n\tlabel?: string;\n}\n\nexport interface PluginBottomPanelContextValue {\n\t/** 这一个实例的 id。同一个面板可以开多份,靠它区分。 */\n\tinstanceId: string;\n\t/**\n\t * 面板所属会话的 cwd(本地绝对路径或 `ssh://<hostId>/<path>`)。\n\t * 不要拿 useActiveConversation().cwd 代替:底部面板绑在自己的会话上。\n\t */\n\tcwd: string | null;\n\t/** 是否是所在分格的活动 tab 且面板未折叠。false 时应暂停轮询与动画。 */\n\tactive: boolean;\n\t/** 实时改名字、图标与状态点;传 null 回到注册时的默认 meta。 */\n\tsetMeta(meta: PluginBottomPanelMeta | null): void;\n\t/** 装/撤关闭前裁决。传 null 表示「随便关」。 */\n\tsetCloseGuard(\n\t\tguard:\n\t\t\t| ((request: PluginBottomPanelCloseRequest) =>\n\t\t\t\t\t| PluginBottomPanelCloseDecision\n\t\t\t\t\t| Promise<PluginBottomPanelCloseDecision>)\n\t\t\t| null,\n\t): void;\n\t/**\n\t * 在本实例所在的格子里新开一个终端并替用户敲 `request.command`,返回新终端 tab 的\n\t * instanceId(可交给 {@link revealInstance})。需要 `terminal.run` 权限,缺权限、请求\n\t * 不合规或当前会话开不了终端(本机缺终端支持)时**抛错**。\n\t */\n\topenTerminal(request: PluginBottomPanelTerminalRequest): string;\n\t/**\n\t * 把同一底部面板里的某个实例(如 {@link openTerminal} 开出的终端)切到前台并展开面板。\n\t * 该实例已被关闭时返回 false。\n\t */\n\trevealInstance(instanceId: string): boolean;\n}\n\nconst NOOP_CONTEXT: PluginBottomPanelContextValue = {\n\tinstanceId: \"\",\n\tcwd: null,\n\tactive: false,\n\tsetMeta: () => {},\n\tsetCloseGuard: () => {},\n\topenTerminal: () => {\n\t\tthrow new Error(\"useBottomPanel().openTerminal must be called inside a bottom panel\");\n\t},\n\trevealInstance: () => false,\n};\n\n/**\n * Internal: the host wraps bottom-panel components in this context's Provider.\n * Module Federation shares this single SDK instance, so the value the host\n * provides is visible to plugin components.\n */\nexport const __BottomPanelContext = createContext<PluginBottomPanelContextValue>(NOOP_CONTEXT);\n\n/** 当前底部面板实例的身份与控制面。 */\nexport function useBottomPanel(): PluginBottomPanelContextValue {\n\treturn useContext(__BottomPanelContext);\n}\n"]}
|
package/dist/file-explorer.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export interface PluginFileExplorerActionContext {
|
|
|
27
27
|
export interface PluginFileExplorerContextMenuContribution {
|
|
28
28
|
id: string;
|
|
29
29
|
label: string;
|
|
30
|
+
/** Action icon. Omit to inherit the plugin's `plugin.json#icon`. */
|
|
30
31
|
icon?: ReactNode;
|
|
31
32
|
when?: PluginFileExplorerWhen;
|
|
32
33
|
/** Lower values render first. Defaults to 100. */
|
|
@@ -40,6 +41,7 @@ export interface PluginFileExplorerToolbarContext {
|
|
|
40
41
|
export interface PluginFileExplorerToolbarContribution {
|
|
41
42
|
id: string;
|
|
42
43
|
label: string;
|
|
44
|
+
/** Action icon. Omit to inherit the plugin's `plugin.json#icon`. */
|
|
43
45
|
icon?: ReactNode;
|
|
44
46
|
/** Lower values render first. Defaults to 100. */
|
|
45
47
|
order?: number;
|
|
@@ -51,14 +53,40 @@ export interface PluginFileExplorerDecoration {
|
|
|
51
53
|
/** Compact status text rendered after the filename. Keep to one or two characters. */
|
|
52
54
|
badge?: string;
|
|
53
55
|
tooltip?: string;
|
|
56
|
+
/** Host theme token, never arbitrary CSS. */
|
|
57
|
+
color?: "foreground" | "muted" | "accent" | "success" | "warning" | "error";
|
|
58
|
+
faded?: boolean;
|
|
59
|
+
strikethrough?: boolean;
|
|
60
|
+
/** Apply status to parent directories inside the active workspace. */
|
|
61
|
+
propagate?: boolean;
|
|
54
62
|
}
|
|
55
63
|
export interface PluginFileExplorerDecorationProvider {
|
|
56
64
|
id: string;
|
|
57
65
|
when?: PluginFileExplorerWhen;
|
|
58
66
|
/** Higher values win when multiple providers return a decoration. Defaults to 0. */
|
|
59
67
|
priority?: number;
|
|
68
|
+
/** Announce changed entries (including unexpanded descendants), or undefined to invalidate all. */
|
|
69
|
+
onDidChangeDecorations?: (listener: (entries?: readonly PluginFileExplorerEntry[]) => void) => Disposable;
|
|
60
70
|
provideDecoration(entry: PluginFileExplorerEntry): PluginFileExplorerDecoration | null;
|
|
61
71
|
}
|
|
72
|
+
/** Declarative associations; values reference iconDefinitions. Exact names are case-insensitive. */
|
|
73
|
+
export interface PluginFileIconAssociations {
|
|
74
|
+
file?: string;
|
|
75
|
+
folder?: string;
|
|
76
|
+
folderExpanded?: string;
|
|
77
|
+
fileNames?: Readonly<Record<string, string>>;
|
|
78
|
+
fileExtensions?: Readonly<Record<string, string>>;
|
|
79
|
+
folderNames?: Readonly<Record<string, string>>;
|
|
80
|
+
folderNamesExpanded?: Readonly<Record<string, string>>;
|
|
81
|
+
}
|
|
82
|
+
export interface PluginFileIconTheme extends PluginFileIconAssociations {
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
iconDefinitions: Readonly<Record<string, ReactNode>>;
|
|
86
|
+
light?: PluginFileIconAssociations;
|
|
87
|
+
dark?: PluginFileIconAssociations;
|
|
88
|
+
highContrast?: PluginFileIconAssociations;
|
|
89
|
+
}
|
|
62
90
|
export type PluginFileExplorerChange = {
|
|
63
91
|
type: "changed" | "created" | "deleted";
|
|
64
92
|
path: string;
|
|
@@ -83,5 +111,7 @@ export interface PluginFileExplorerApi {
|
|
|
83
111
|
registerContextMenuAction(contribution: PluginFileExplorerContextMenuContribution): Disposable;
|
|
84
112
|
registerToolbarAction(contribution: PluginFileExplorerToolbarContribution): Disposable;
|
|
85
113
|
registerDecorationProvider(contribution: PluginFileExplorerDecorationProvider): Disposable;
|
|
114
|
+
/** Requires ui.file-explorer.decorations. Users explicitly select one theme. */
|
|
115
|
+
registerIconTheme(contribution: PluginFileIconTheme): Disposable;
|
|
86
116
|
}
|
|
87
117
|
//# sourceMappingURL=file-explorer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-explorer.d.ts","sourceRoot":"","sources":["../src/file-explorer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,6FAA6F;AAC7F,MAAM,WAAW,uBAAuB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAED,kEAAkE;AAClE,MAAM,WAAW,sBAAsB;IACtC,YAAY,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IACpC,iFAAiF;IACjF,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,qDAAqD;IACrD,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,+BA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U,CAAC;IAC/F,qBAAqB,CAAC,YAAY,EAAE,qCAAqC,GAAG,UAAU,CAAC;IACvF,0BAA0B,CAAC,YAAY,EAAE,oCAAoC,GAAG,UAAU,CAAC;IAC3F,gFAAgF;IAChF,iBAAiB,CAAC,YAAY,EAAE,mBAAmB,GAAG,UAAU,CAAC;CACjE","sourcesContent":["import type { ReactNode } from \"react\";\nimport type { Disposable } from \"./disposable.js\";\n\n/** Metadata exposed by the host file explorer. Reading contents still requires `fs.read`. */\nexport interface PluginFileExplorerEntry {\n\tname: string;\n\tpath: string;\n\tisDirectory: boolean;\n\tsize: number;\n\tmodifiedAt: number;\n}\n\nexport interface PluginWorkspaceRoot {\n\tname: string;\n\tpath: string;\n}\n\n/** Declarative matcher shared by menu actions and decorations. */\nexport interface PluginFileExplorerWhen {\n\tresourceType?: \"file\" | \"directory\";\n\t/** Lower-case extensions without a leading dot. Matching is case-insensitive. */\n\textensions?: readonly string[];\n\t/** Exact basenames. Matching is case-insensitive. */\n\tfileNames?: readonly string[];\n}\n\nexport interface PluginFileExplorerActionContext {\n\tentry: PluginFileExplorerEntry;\n\tworkspaceRoot: PluginWorkspaceRoot | null;\n}\n\nexport interface PluginFileExplorerContextMenuContribution {\n\tid: string;\n\tlabel: string;\n\t/** Action icon. Omit to inherit the plugin's `plugin.json#icon`. */\n\ticon?: ReactNode;\n\twhen?: PluginFileExplorerWhen;\n\t/** Lower values render first. Defaults to 100. */\n\torder?: number;\n\trun(context: PluginFileExplorerActionContext): void | Promise<void>;\n}\n\nexport interface PluginFileExplorerToolbarContext {\n\tworkspaceRoot: PluginWorkspaceRoot;\n\tselection: readonly PluginFileExplorerEntry[];\n}\n\nexport interface PluginFileExplorerToolbarContribution {\n\tid: string;\n\tlabel: string;\n\t/** Action icon. Omit to inherit the plugin's `plugin.json#icon`. */\n\ticon?: ReactNode;\n\t/** Lower values render first. Defaults to 100. */\n\torder?: number;\n\trun(context: PluginFileExplorerToolbarContext): void | Promise<void>;\n}\n\nexport interface PluginFileExplorerDecoration {\n\t/** Replaces the host's default file/folder icon. */\n\ticon?: ReactNode;\n\t/** Compact status text rendered after the filename. Keep to one or two characters. */\n\tbadge?: string;\n\ttooltip?: string;\n\t/** Host theme token, never arbitrary CSS. */\n\tcolor?: \"foreground\" | \"muted\" | \"accent\" | \"success\" | \"warning\" | \"error\";\n\tfaded?: boolean;\n\tstrikethrough?: boolean;\n\t/** Apply status to parent directories inside the active workspace. */\n\tpropagate?: boolean;\n}\n\nexport interface PluginFileExplorerDecorationProvider {\n\tid: string;\n\twhen?: PluginFileExplorerWhen;\n\t/** Higher values win when multiple providers return a decoration. Defaults to 0. */\n\tpriority?: number;\n\t/** Announce changed entries (including unexpanded descendants), or undefined to invalidate all. */\n\tonDidChangeDecorations?: (listener: (entries?: readonly PluginFileExplorerEntry[]) => void) => Disposable;\n\tprovideDecoration(\n\t\tentry: PluginFileExplorerEntry,\n\t): PluginFileExplorerDecoration | null;\n}\n\n/** Declarative associations; values reference iconDefinitions. Exact names are case-insensitive. */\nexport interface PluginFileIconAssociations {\n\tfile?: string;\n\tfolder?: string;\n\tfolderExpanded?: string;\n\tfileNames?: Readonly<Record<string, string>>;\n\tfileExtensions?: Readonly<Record<string, string>>;\n\tfolderNames?: Readonly<Record<string, string>>;\n\tfolderNamesExpanded?: Readonly<Record<string, string>>;\n}\n\nexport interface PluginFileIconTheme extends PluginFileIconAssociations {\n\tid: string;\n\tlabel: string;\n\ticonDefinitions: Readonly<Record<string, ReactNode>>;\n\tlight?: PluginFileIconAssociations;\n\tdark?: PluginFileIconAssociations;\n\thighContrast?: PluginFileIconAssociations;\n}\n\nexport type PluginFileExplorerChange =\n\t| { type: \"changed\" | \"created\" | \"deleted\"; path: string }\n\t| { type: \"moved\"; path: string; oldPath: string };\n\nexport interface PluginFileExplorerRevealOptions {\n\t/** Select the revealed entry. Defaults to true. */\n\tselect?: boolean;\n\t/** Move DOM focus to the row after revealing it. Defaults to false. */\n\tfocus?: boolean;\n}\n\nexport interface PluginFileExplorerApi {\n\tgetWorkspaceRoots(): readonly PluginWorkspaceRoot[];\n\tgetSelection(): readonly PluginFileExplorerEntry[];\n\treveal(path: string, options?: PluginFileExplorerRevealOptions): Promise<void>;\n\trefresh(path?: string): Promise<void>;\n\tonDidChangeSelection(listener: (selection: readonly PluginFileExplorerEntry[]) => void): Disposable;\n\tonDidChangeFiles(listener: (changes: readonly PluginFileExplorerChange[]) => void): Disposable;\n\tregisterContextMenuAction(contribution: PluginFileExplorerContextMenuContribution): Disposable;\n\tregisterToolbarAction(contribution: PluginFileExplorerToolbarContribution): Disposable;\n\tregisterDecorationProvider(contribution: PluginFileExplorerDecorationProvider): Disposable;\n\t/** Requires ui.file-explorer.decorations. Users explicitly select one theme. */\n\tregisterIconTheme(contribution: PluginFileIconTheme): Disposable;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-explorer.js","sourceRoot":"","sources":["../src/file-explorer.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from \"react\";\nimport type { Disposable } from \"./disposable.js\";\n\n/** Metadata exposed by the host file explorer. Reading contents still requires `fs.read`. */\nexport interface PluginFileExplorerEntry {\n\tname: string;\n\tpath: string;\n\tisDirectory: boolean;\n\tsize: number;\n\tmodifiedAt: number;\n}\n\nexport interface PluginWorkspaceRoot {\n\tname: string;\n\tpath: string;\n}\n\n/** Declarative matcher shared by menu actions and decorations. */\nexport interface PluginFileExplorerWhen {\n\tresourceType?: \"file\" | \"directory\";\n\t/** Lower-case extensions without a leading dot. Matching is case-insensitive. */\n\textensions?: readonly string[];\n\t/** Exact basenames. Matching is case-insensitive. */\n\tfileNames?: readonly string[];\n}\n\nexport interface PluginFileExplorerActionContext {\n\tentry: PluginFileExplorerEntry;\n\tworkspaceRoot: PluginWorkspaceRoot | null;\n}\n\nexport interface PluginFileExplorerContextMenuContribution {\n\tid: string;\n\tlabel: string;\n\ticon?: ReactNode;\n\twhen?: PluginFileExplorerWhen;\n\t/** Lower values render first. Defaults to 100. */\n\torder?: number;\n\trun(context: PluginFileExplorerActionContext): void | Promise<void>;\n}\n\nexport interface PluginFileExplorerToolbarContext {\n\tworkspaceRoot: PluginWorkspaceRoot;\n\tselection: readonly PluginFileExplorerEntry[];\n}\n\nexport interface PluginFileExplorerToolbarContribution {\n\tid: string;\n\tlabel: string;\n\ticon?: ReactNode;\n\t/** Lower values render first. Defaults to 100. */\n\torder?: number;\n\trun(context: PluginFileExplorerToolbarContext): void | Promise<void>;\n}\n\nexport interface PluginFileExplorerDecoration {\n\t/** Replaces the host's default file/folder icon. */\n\ticon?: ReactNode;\n\t/** Compact status text rendered after the filename. Keep to one or two characters. */\n\tbadge?: string;\n\ttooltip?: string;\n}\n\nexport interface PluginFileExplorerDecorationProvider {\n\tid: string;\n\twhen?: PluginFileExplorerWhen;\n\t/** Higher values win when multiple providers return a decoration. Defaults to 0. */\n\tpriority?: number;\n\tprovideDecoration(\n\t\tentry: PluginFileExplorerEntry,\n\t): PluginFileExplorerDecoration | null;\n}\n\nexport type PluginFileExplorerChange =\n\t| { type: \"changed\" | \"created\" | \"deleted\"; path: string }\n\t| { type: \"moved\"; path: string; oldPath: string };\n\nexport interface PluginFileExplorerRevealOptions {\n\t/** Select the revealed entry. Defaults to true. */\n\tselect?: boolean;\n\t/** Move DOM focus to the row after revealing it. Defaults to false. */\n\tfocus?: boolean;\n}\n\nexport interface PluginFileExplorerApi {\n\tgetWorkspaceRoots(): readonly PluginWorkspaceRoot[];\n\tgetSelection(): readonly PluginFileExplorerEntry[];\n\treveal(path: string, options?: PluginFileExplorerRevealOptions): Promise<void>;\n\trefresh(path?: string): Promise<void>;\n\tonDidChangeSelection(listener: (selection: readonly PluginFileExplorerEntry[]) => void): Disposable;\n\tonDidChangeFiles(listener: (changes: readonly PluginFileExplorerChange[]) => void): Disposable;\n\tregisterContextMenuAction(contribution: PluginFileExplorerContextMenuContribution): Disposable;\n\tregisterToolbarAction(contribution: PluginFileExplorerToolbarContribution): Disposable;\n\tregisterDecorationProvider(contribution: PluginFileExplorerDecorationProvider): Disposable;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"file-explorer.js","sourceRoot":"","sources":["../src/file-explorer.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from \"react\";\nimport type { Disposable } from \"./disposable.js\";\n\n/** Metadata exposed by the host file explorer. Reading contents still requires `fs.read`. */\nexport interface PluginFileExplorerEntry {\n\tname: string;\n\tpath: string;\n\tisDirectory: boolean;\n\tsize: number;\n\tmodifiedAt: number;\n}\n\nexport interface PluginWorkspaceRoot {\n\tname: string;\n\tpath: string;\n}\n\n/** Declarative matcher shared by menu actions and decorations. */\nexport interface PluginFileExplorerWhen {\n\tresourceType?: \"file\" | \"directory\";\n\t/** Lower-case extensions without a leading dot. Matching is case-insensitive. */\n\textensions?: readonly string[];\n\t/** Exact basenames. Matching is case-insensitive. */\n\tfileNames?: readonly string[];\n}\n\nexport interface PluginFileExplorerActionContext {\n\tentry: PluginFileExplorerEntry;\n\tworkspaceRoot: PluginWorkspaceRoot | null;\n}\n\nexport interface PluginFileExplorerContextMenuContribution {\n\tid: string;\n\tlabel: string;\n\t/** Action icon. Omit to inherit the plugin's `plugin.json#icon`. */\n\ticon?: ReactNode;\n\twhen?: PluginFileExplorerWhen;\n\t/** Lower values render first. Defaults to 100. */\n\torder?: number;\n\trun(context: PluginFileExplorerActionContext): void | Promise<void>;\n}\n\nexport interface PluginFileExplorerToolbarContext {\n\tworkspaceRoot: PluginWorkspaceRoot;\n\tselection: readonly PluginFileExplorerEntry[];\n}\n\nexport interface PluginFileExplorerToolbarContribution {\n\tid: string;\n\tlabel: string;\n\t/** Action icon. Omit to inherit the plugin's `plugin.json#icon`. */\n\ticon?: ReactNode;\n\t/** Lower values render first. Defaults to 100. */\n\torder?: number;\n\trun(context: PluginFileExplorerToolbarContext): void | Promise<void>;\n}\n\nexport interface PluginFileExplorerDecoration {\n\t/** Replaces the host's default file/folder icon. */\n\ticon?: ReactNode;\n\t/** Compact status text rendered after the filename. Keep to one or two characters. */\n\tbadge?: string;\n\ttooltip?: string;\n\t/** Host theme token, never arbitrary CSS. */\n\tcolor?: \"foreground\" | \"muted\" | \"accent\" | \"success\" | \"warning\" | \"error\";\n\tfaded?: boolean;\n\tstrikethrough?: boolean;\n\t/** Apply status to parent directories inside the active workspace. */\n\tpropagate?: boolean;\n}\n\nexport interface PluginFileExplorerDecorationProvider {\n\tid: string;\n\twhen?: PluginFileExplorerWhen;\n\t/** Higher values win when multiple providers return a decoration. Defaults to 0. */\n\tpriority?: number;\n\t/** Announce changed entries (including unexpanded descendants), or undefined to invalidate all. */\n\tonDidChangeDecorations?: (listener: (entries?: readonly PluginFileExplorerEntry[]) => void) => Disposable;\n\tprovideDecoration(\n\t\tentry: PluginFileExplorerEntry,\n\t): PluginFileExplorerDecoration | null;\n}\n\n/** Declarative associations; values reference iconDefinitions. Exact names are case-insensitive. */\nexport interface PluginFileIconAssociations {\n\tfile?: string;\n\tfolder?: string;\n\tfolderExpanded?: string;\n\tfileNames?: Readonly<Record<string, string>>;\n\tfileExtensions?: Readonly<Record<string, string>>;\n\tfolderNames?: Readonly<Record<string, string>>;\n\tfolderNamesExpanded?: Readonly<Record<string, string>>;\n}\n\nexport interface PluginFileIconTheme extends PluginFileIconAssociations {\n\tid: string;\n\tlabel: string;\n\ticonDefinitions: Readonly<Record<string, ReactNode>>;\n\tlight?: PluginFileIconAssociations;\n\tdark?: PluginFileIconAssociations;\n\thighContrast?: PluginFileIconAssociations;\n}\n\nexport type PluginFileExplorerChange =\n\t| { type: \"changed\" | \"created\" | \"deleted\"; path: string }\n\t| { type: \"moved\"; path: string; oldPath: string };\n\nexport interface PluginFileExplorerRevealOptions {\n\t/** Select the revealed entry. Defaults to true. */\n\tselect?: boolean;\n\t/** Move DOM focus to the row after revealing it. Defaults to false. */\n\tfocus?: boolean;\n}\n\nexport interface PluginFileExplorerApi {\n\tgetWorkspaceRoots(): readonly PluginWorkspaceRoot[];\n\tgetSelection(): readonly PluginFileExplorerEntry[];\n\treveal(path: string, options?: PluginFileExplorerRevealOptions): Promise<void>;\n\trefresh(path?: string): Promise<void>;\n\tonDidChangeSelection(listener: (selection: readonly PluginFileExplorerEntry[]) => void): Disposable;\n\tonDidChangeFiles(listener: (changes: readonly PluginFileExplorerChange[]) => void): Disposable;\n\tregisterContextMenuAction(contribution: PluginFileExplorerContextMenuContribution): Disposable;\n\tregisterToolbarAction(contribution: PluginFileExplorerToolbarContribution): Disposable;\n\tregisterDecorationProvider(contribution: PluginFileExplorerDecorationProvider): Disposable;\n\t/** Requires ui.file-explorer.decorations. Users explicitly select one theme. */\n\tregisterIconTheme(contribution: PluginFileIconTheme): Disposable;\n}\n"]}
|
package/dist/fs.d.ts
CHANGED
|
@@ -32,6 +32,18 @@ export interface PluginFsSaveAsOptions {
|
|
|
32
32
|
extensions: string[];
|
|
33
33
|
}>;
|
|
34
34
|
}
|
|
35
|
+
export interface PluginFsListFilesRecursiveOptions {
|
|
36
|
+
/**
|
|
37
|
+
* Only return files whose base name is one of these (exact match, e.g.
|
|
38
|
+
* `["package.json", "Makefile"]`). The host's result cap counts matches, so a
|
|
39
|
+
* manifest scan in a large monorepo is not truncated by unrelated files.
|
|
40
|
+
* Hosts older than Plugin API 2.8.0 ignore this and return every file — filter
|
|
41
|
+
* the result yourself if you also target them.
|
|
42
|
+
*/
|
|
43
|
+
names?: readonly string[];
|
|
44
|
+
/** Extra directory names to skip, on top of the host defaults (`node_modules`, `.git`, `dist`, …). */
|
|
45
|
+
ignoredDirectories?: readonly string[];
|
|
46
|
+
}
|
|
35
47
|
export interface PluginFsApi {
|
|
36
48
|
readDir(dirPath: string): Promise<PluginFsEntry[]>;
|
|
37
49
|
readFile(filePath: string): Promise<PluginFsReadResult>;
|
|
@@ -43,7 +55,11 @@ export interface PluginFsApi {
|
|
|
43
55
|
delete(targetPath: string): Promise<void>;
|
|
44
56
|
move(sourcePath: string, destDir: string): Promise<void>;
|
|
45
57
|
createDirectory(dirPath: string): Promise<void>;
|
|
46
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Every regular file under `rootPath`, skipping dot-entries and the host's
|
|
60
|
+
* ignored directories. Capped at 10,000 results.
|
|
61
|
+
*/
|
|
62
|
+
listFilesRecursive(rootPath: string, options?: PluginFsListFilesRecursiveOptions): Promise<PluginFsFileRef[]>;
|
|
47
63
|
/**
|
|
48
64
|
* Write bytes to a path the user picks in the host's native save dialog.
|
|
49
65
|
* Unlike {@link writeFile} the destination is not restricted to project
|
package/dist/fs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;CAC5B;AAED,MAAM,WAAW,wBAAwB;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,qBAAqB;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,OAAO,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,E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AC1F,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IAC3D,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD;;;OAGG;IACH,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iCAAiC,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC;IAC9G;;;;;;OAMG;IACH,MAAM,CACL,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,MAAM,GAAG,QAAQ,EAC5B,OAAO,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1B,0EAA0E;IAC1E,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,GAAG,UAAU,CAAC;CACrF;AACD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export interface PluginFsEntry {\n\tname: string;\n\tpath: string;\n\tisDirectory: boolean;\n\tsize: number;\n\tmodifiedAt: number;\n}\n\nexport interface PluginFsFileRef {\n\tname: string;\n\tpath: string;\n\trelPath: string;\n}\n\nexport interface PluginFsStatResult {\n\tsize: number;\n\tmodifiedAt: number;\n\tcreatedAt: number;\n}\n\nexport interface PluginFsReadResult {\n\tcontent: string;\n\tencoding: \"utf8\" | \"base64\";\n}\n\nexport interface PluginFsBinaryReadResult {\n\tdata: string;\n\tmimeType: string;\n\tsize: number;\n}\n\nexport interface PluginFsSaveAsOptions {\n\ttitle?: string;\n\t/** Defaults to a single filter derived from the default file name's extension. */\n\tfilters?: Array<{ name: string; extensions: string[] }>;\n}\n\nexport interface PluginFsListFilesRecursiveOptions {\n\t/**\n\t * Only return files whose base name is one of these (exact match, e.g.\n\t * `[\"package.json\", \"Makefile\"]`). The host's result cap counts matches, so a\n\t * manifest scan in a large monorepo is not truncated by unrelated files.\n\t * Hosts older than Plugin API 2.8.0 ignore this and return every file — filter\n\t * the result yourself if you also target them.\n\t */\n\tnames?: readonly string[];\n\t/** Extra directory names to skip, on top of the host defaults (`node_modules`, `.git`, `dist`, …). */\n\tignoredDirectories?: readonly string[];\n}\n\nexport interface PluginFsApi {\n\treadDir(dirPath: string): Promise<PluginFsEntry[]>;\n\treadFile(filePath: string): Promise<PluginFsReadResult>;\n\treadBinaryFile(filePath: string): Promise<PluginFsBinaryReadResult>;\n\t/** Pass `encoding: \"base64\"` to write binary payloads (decoded from base64 text). */\n\twriteFile(filePath: string, content: string, encoding?: \"utf8\" | \"base64\"): Promise<void>;\n\tstat(filePath: string): Promise<PluginFsStatResult | null>;\n\trename(oldPath: string, newPath: string): Promise<void>;\n\tdelete(targetPath: string): Promise<void>;\n\tmove(sourcePath: string, destDir: string): Promise<void>;\n\tcreateDirectory(dirPath: string): Promise<void>;\n\t/**\n\t * Every regular file under `rootPath`, skipping dot-entries and the host's\n\t * ignored directories. Capped at 10,000 results.\n\t */\n\tlistFilesRecursive(rootPath: string, options?: PluginFsListFilesRecursiveOptions): Promise<PluginFsFileRef[]>;\n\t/**\n\t * Write bytes to a path the user picks in the host's native save dialog.\n\t * Unlike {@link writeFile} the destination is not restricted to project\n\t * roots — the user chooses it, so nothing lands on disk without an explicit\n\t * confirmation. Resolves to the saved path, or `null` if the user cancels.\n\t * Requires `fs.write`.\n\t */\n\tsaveAs(\n\t\tdefaultFileName: string,\n\t\tcontent: string,\n\t\tencoding?: \"utf8\" | \"base64\",\n\t\toptions?: PluginFsSaveAsOptions,\n\t): Promise<string | null>;\n\t/** Watch one directory for host-debounced changes. Requires `fs.read`. */\n\twatchDirectory(dirPath: string, listener: (changedPath: string) => void): Disposable;\n}\nimport type { Disposable } from \"./disposable.js\";\n"]}
|
package/dist/fs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"","sourcesContent":["export interface PluginFsEntry {\n\tname: string;\n\tpath: string;\n\tisDirectory: boolean;\n\tsize: number;\n\tmodifiedAt: number;\n}\n\nexport interface PluginFsFileRef {\n\tname: string;\n\tpath: string;\n\trelPath: string;\n}\n\nexport interface PluginFsStatResult {\n\tsize: number;\n\tmodifiedAt: number;\n\tcreatedAt: number;\n}\n\nexport interface PluginFsReadResult {\n\tcontent: string;\n\tencoding: \"utf8\" | \"base64\";\n}\n\nexport interface PluginFsBinaryReadResult {\n\tdata: string;\n\tmimeType: string;\n\tsize: number;\n}\n\nexport interface PluginFsSaveAsOptions {\n\ttitle?: string;\n\t/** Defaults to a single filter derived from the default file name's extension. */\n\tfilters?: Array<{ name: string; extensions: string[] }>;\n}\n\nexport interface PluginFsApi {\n\treadDir(dirPath: string): Promise<PluginFsEntry[]>;\n\treadFile(filePath: string): Promise<PluginFsReadResult>;\n\treadBinaryFile(filePath: string): Promise<PluginFsBinaryReadResult>;\n\t/** Pass `encoding: \"base64\"` to write binary payloads (decoded from base64 text). */\n\twriteFile(filePath: string, content: string, encoding?: \"utf8\" | \"base64\"): Promise<void>;\n\tstat(filePath: string): Promise<PluginFsStatResult | null>;\n\trename(oldPath: string, newPath: string): Promise<void>;\n\tdelete(targetPath: string): Promise<void>;\n\tmove(sourcePath: string, destDir: string): Promise<void>;\n\tcreateDirectory(dirPath: string): Promise<void>;\n\tlistFilesRecursive(rootPath: string): Promise<PluginFsFileRef[]>;\n\t/**\n\t * Write bytes to a path the user picks in the host's native save dialog.\n\t * Unlike {@link writeFile} the destination is not restricted to project\n\t * roots — the user chooses it, so nothing lands on disk without an explicit\n\t * confirmation. Resolves to the saved path, or `null` if the user cancels.\n\t * Requires `fs.write`.\n\t */\n\tsaveAs(\n\t\tdefaultFileName: string,\n\t\tcontent: string,\n\t\tencoding?: \"utf8\" | \"base64\",\n\t\toptions?: PluginFsSaveAsOptions,\n\t): Promise<string | null>;\n\t/** Watch one directory for host-debounced changes. Requires `fs.read`. */\n\twatchDirectory(dirPath: string, listener: (changedPath: string) => void): Disposable;\n}\nimport type { Disposable } from \"./disposable.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"fs.js","sourceRoot":"","sources":["../src/fs.ts"],"names":[],"mappings":"","sourcesContent":["export interface PluginFsEntry {\n\tname: string;\n\tpath: string;\n\tisDirectory: boolean;\n\tsize: number;\n\tmodifiedAt: number;\n}\n\nexport interface PluginFsFileRef {\n\tname: string;\n\tpath: string;\n\trelPath: string;\n}\n\nexport interface PluginFsStatResult {\n\tsize: number;\n\tmodifiedAt: number;\n\tcreatedAt: number;\n}\n\nexport interface PluginFsReadResult {\n\tcontent: string;\n\tencoding: \"utf8\" | \"base64\";\n}\n\nexport interface PluginFsBinaryReadResult {\n\tdata: string;\n\tmimeType: string;\n\tsize: number;\n}\n\nexport interface PluginFsSaveAsOptions {\n\ttitle?: string;\n\t/** Defaults to a single filter derived from the default file name's extension. */\n\tfilters?: Array<{ name: string; extensions: string[] }>;\n}\n\nexport interface PluginFsListFilesRecursiveOptions {\n\t/**\n\t * Only return files whose base name is one of these (exact match, e.g.\n\t * `[\"package.json\", \"Makefile\"]`). The host's result cap counts matches, so a\n\t * manifest scan in a large monorepo is not truncated by unrelated files.\n\t * Hosts older than Plugin API 2.8.0 ignore this and return every file — filter\n\t * the result yourself if you also target them.\n\t */\n\tnames?: readonly string[];\n\t/** Extra directory names to skip, on top of the host defaults (`node_modules`, `.git`, `dist`, …). */\n\tignoredDirectories?: readonly string[];\n}\n\nexport interface PluginFsApi {\n\treadDir(dirPath: string): Promise<PluginFsEntry[]>;\n\treadFile(filePath: string): Promise<PluginFsReadResult>;\n\treadBinaryFile(filePath: string): Promise<PluginFsBinaryReadResult>;\n\t/** Pass `encoding: \"base64\"` to write binary payloads (decoded from base64 text). */\n\twriteFile(filePath: string, content: string, encoding?: \"utf8\" | \"base64\"): Promise<void>;\n\tstat(filePath: string): Promise<PluginFsStatResult | null>;\n\trename(oldPath: string, newPath: string): Promise<void>;\n\tdelete(targetPath: string): Promise<void>;\n\tmove(sourcePath: string, destDir: string): Promise<void>;\n\tcreateDirectory(dirPath: string): Promise<void>;\n\t/**\n\t * Every regular file under `rootPath`, skipping dot-entries and the host's\n\t * ignored directories. Capped at 10,000 results.\n\t */\n\tlistFilesRecursive(rootPath: string, options?: PluginFsListFilesRecursiveOptions): Promise<PluginFsFileRef[]>;\n\t/**\n\t * Write bytes to a path the user picks in the host's native save dialog.\n\t * Unlike {@link writeFile} the destination is not restricted to project\n\t * roots — the user chooses it, so nothing lands on disk without an explicit\n\t * confirmation. Resolves to the saved path, or `null` if the user cancels.\n\t * Requires `fs.write`.\n\t */\n\tsaveAs(\n\t\tdefaultFileName: string,\n\t\tcontent: string,\n\t\tencoding?: \"utf8\" | \"base64\",\n\t\toptions?: PluginFsSaveAsOptions,\n\t): Promise<string | null>;\n\t/** Watch one directory for host-debounced changes. Requires `fs.read`. */\n\twatchDirectory(dirPath: string, listener: (changedPath: string) => void): Disposable;\n}\nimport type { Disposable } from \"./disposable.js\";\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -11,8 +11,9 @@ export type { PluginPermission } from "./permissions.js";
|
|
|
11
11
|
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
|
+
export type { PluginFileIconAssociations, PluginFileIconTheme } from "./file-explorer.js";
|
|
14
15
|
export type { ConversationState, ConversationMessage, ConversationEvent, ConversationQueueState, CreateSessionOptions, PluginConversationApi, SendPromptResult, } from "./conversation.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
|
+
export type { PluginGlobalSlotContribution, PluginAbilityDetailSlotContribution, PluginAbilityDetailSlotProps, PluginNavBadge, PluginNavBadgeTone, PluginWorkspaceViewProps, PluginWorkspaceViewContribution, PluginWorkspaceViewHeader, PluginSidebarState, PluginAudioMetadata, PluginPreviewUrlOptions, PluginPreviewFile, PluginPreviewFileRef, PluginFilePreviewProps, PluginFilePreviewContribution, PluginActivityTabContribution, PluginBottomPanelContribution, PluginActivityTabRetention, PluginActivityTabTargetOptions, PluginCaptureRegion, PluginOpenActivityTabOptions, PluginPromptDecoration, PluginInputActionContribution, PluginNewSessionContext, PluginNewSessionContextActivation, PluginNewSessionContextContribution, PluginNewSessionTarget, CardDescriptor, PluginPendingToolCall, PluginCardProps, PluginCardRendererContribution, PluginToolCallSlotToolCall, PluginToolCallSlotProps, PluginToolCallSlotContribution, PluginTurnCardContribution, PluginNotifyOptions, PluginUiApi, } from "./ui.js";
|
|
16
17
|
export type { PluginShortcutScopeKind, PluginShortcutWhen, PluginShortcutBinding, PluginShortcutScopeContribution, PluginRegisterShortcutScope, UsePluginShortcutScopeOptions, } from "./shortcuts.js";
|
|
17
18
|
export { usePluginShortcutScope } from "./shortcuts.js";
|
|
18
19
|
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,8 +21,8 @@ export { PLUGIN_CODING_AGENT_HOOK_EVENT_NAMES } from "./agent.js";
|
|
|
20
21
|
export type { PluginAppActionEffect, PluginAppActionExample, PluginAppActionHandlerContext, PluginAppActionHandler, PluginAppActionReadyHandler, PluginAppActionApprovalPresentation, PluginAppActionApproval, PluginAppActionRegistration, PluginAppActionUsage, PluginAppActionsApi, } from "./app-actions.js";
|
|
21
22
|
export { PluginAppActionError } from "./app-actions.js";
|
|
22
23
|
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, 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
|
-
export type { PluginFsEntry, PluginFsFileRef, PluginFsBinaryReadResult, PluginFsStatResult, PluginFsReadResult, PluginFsApi, } from "./fs.js";
|
|
24
|
+
export type { PluginOfficialGeneralSettings, PluginOfficialGeneralSettingsUpdate, PluginOfficialExperimentalSettings, PluginOfficialImageGenerationSettings, PluginOfficialImageGenerationSettingsUpdate, PluginOfficialDownloadItem, PluginOfficialUpdaterState, PluginOfficialWebhookKind, PluginOfficialWebhookEndpoint, PluginOfficialWebhookProvider, PluginOfficialWebhookCreateInput, PluginOfficialWebhookUpdateInput, PluginOfficialWebhookMessage, PluginOfficialWebhookSendResult, PluginOfficialSkillInfo, PluginOfficialInstalledSkill, PluginOfficialShortcutBinding, PluginOfficialQuickPanelSettings, PluginOfficialImStatus, PluginOfficialImLog, PluginOfficialMcpServerSummary, PluginOfficialMcpTarget, PluginOfficialMcpServerDetail, PluginOfficialMcpUpsertData, PluginOfficialExecutionMode, PluginOfficialSelectedSkill, PluginOfficialBatchProjectCreateData, PluginOfficialBatchProjectUpdateData, PluginOfficialSchedulerModel, PluginOfficialSchedulerNotification, PluginOfficialSchedulerRunTarget, PluginOfficialSchedulerSchedule, PluginOfficialSchedulerTaskCreateData, PluginOfficialSchedulerTaskUpdateData, PluginOfficialModelSummary, PluginOfficialProviderSummary, PluginOfficialProviderDetail, PluginOfficialProviderUpsertData, PluginOfficialProjectEntry, PluginOfficialSessionHandle, PluginOfficialNavigationOpenInput, PluginOfficialOpenFilesOptions, PluginOfficialOpenedFile, PluginOfficialSessionAccess, PluginOfficialSessionRunningEvent, PluginOfficialSessionSummary, PluginOfficialPluginSummary, PluginOfficialKnowledgeBase, PluginOfficialKnowledgeProcessingSettings, PluginOfficialApi, } from "./official.js";
|
|
25
|
+
export type { PluginFsEntry, PluginFsFileRef, PluginFsListFilesRecursiveOptions, PluginFsBinaryReadResult, PluginFsStatResult, PluginFsReadResult, PluginFsApi, } from "./fs.js";
|
|
25
26
|
export type { PluginCommandRunOptions, PluginCommandRunResult, PluginCommandSpawnOptions, PluginCommandSpawnExit, PluginCommandSpawnStatus, PluginCommandSpawnHandle, PluginCommandApi, } from "./command.js";
|
|
26
27
|
export type { PluginCliProviderApi, PluginCliProviderPhase, PluginCliProviderStatus, } from "./cli-provider.js";
|
|
27
28
|
export type { PluginServiceApi, PluginServiceArtifactPayload, PluginServiceConnection, PluginServiceHostPlatform, PluginServicePhase, PluginServiceRequest, PluginServiceResponse, PluginServiceStatus, PluginServiceDataEncoding, } from "./service-provider.js";
|
|
@@ -51,6 +52,8 @@ export type { PluginHostBridge } from "./host-bridge.js";
|
|
|
51
52
|
export { __setPluginHostBridge } from "./host-bridge.js";
|
|
52
53
|
export type { ActivityTabContextValue } from "./activity-tab.js";
|
|
53
54
|
export { __ActivityTabContext, useActivityTab } from "./activity-tab.js";
|
|
55
|
+
export type { PluginBottomPanelCloseConfirm, PluginBottomPanelCloseDecision, PluginBottomPanelCloseReason, PluginBottomPanelCloseRequest, PluginBottomPanelContextValue, PluginBottomPanelMeta, PluginBottomPanelStatus, PluginBottomPanelTerminalRequest, } from "./bottom-panel.js";
|
|
56
|
+
export { __BottomPanelContext, useBottomPanel } from "./bottom-panel.js";
|
|
54
57
|
export type { PluginI18nContextValue, PluginTranslation } from "./hooks.js";
|
|
55
58
|
export { __PluginI18nContext, useTranslation, useActiveConversation, useConversationMessages, usePromptAttachment, useSidebarState, } from "./hooks.js";
|
|
56
59
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,YAAY,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACX,mBAAmB,EACnB,qBAAqB,EAC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mB,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"]}
|
|
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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Y,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGzE,YAAY,EACX,6BAA6B,EAC7B,8BAA8B,EAC9B,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,qBAAqB,EACrB,uBAAuB,EACvB,gCAAgC,GAChC,MAAM,mBAAmB,CAAC;AAC3B,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\";\nexport type { PluginFileIconAssociations, PluginFileIconTheme } 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\tPluginBottomPanelContribution,\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\tPluginOfficialMcpTarget,\n\tPluginOfficialMcpServerDetail,\n\tPluginOfficialMcpUpsertData,\n\tPluginOfficialExecutionMode,\n\tPluginOfficialSelectedSkill,\n\tPluginOfficialBatchProjectCreateData,\n\tPluginOfficialBatchProjectUpdateData,\n\tPluginOfficialSchedulerModel,\n\tPluginOfficialSchedulerNotification,\n\tPluginOfficialSchedulerRunTarget,\n\tPluginOfficialSchedulerSchedule,\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\tPluginFsListFilesRecursiveOptions,\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// Bottom panel context\nexport type {\n\tPluginBottomPanelCloseConfirm,\n\tPluginBottomPanelCloseDecision,\n\tPluginBottomPanelCloseReason,\n\tPluginBottomPanelCloseRequest,\n\tPluginBottomPanelContextValue,\n\tPluginBottomPanelMeta,\n\tPluginBottomPanelStatus,\n\tPluginBottomPanelTerminalRequest,\n} from \"./bottom-panel.js\";\nexport { __BottomPanelContext, useBottomPanel } from \"./bottom-panel.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
|
@@ -17,5 +17,6 @@ export { __createPluginLogger, __setPluginLogSink } from "./logging.js";
|
|
|
17
17
|
export { definePlugin } from "./context.js";
|
|
18
18
|
export { __setPluginHostBridge } from "./host-bridge.js";
|
|
19
19
|
export { __ActivityTabContext, useActivityTab } from "./activity-tab.js";
|
|
20
|
+
export { __BottomPanelContext, useBottomPanel } from "./bottom-panel.js";
|
|
20
21
|
export { __PluginI18nContext, useTranslation, useActiveConversation, useConversationMessages, usePromptAttachment, useSidebarState, } from "./hooks.js";
|
|
21
22
|
//# sourceMappingURL=index.js.map
|