@xiongtao.xt/tau-plugins 0.41.0 → 0.43.0
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/CHANGELOG.md +13 -0
- package/client/{chunk-FZTR4KOY.js → chunk-M3YEVDN4.js} +118 -138
- package/client/{chunk-TOYS6GBE.js → chunk-X6MBLKAL.js} +34 -64
- package/docs/README.md +2 -1
- package/docs/ai.md +3 -0
- package/docs/api-support.md +7 -1
- package/docs/backend.md +2 -2
- package/docs/getting-started.md +5 -1
- package/docs/plugin-basics.md +2 -2
- package/docs/portability.md +8 -2
- package/docs/providers/README.md +3 -1
- package/docs/providers/asr.md +41 -0
- package/docs/release.md +1 -1
- package/docs/site-data.md +1 -1
- package/docs/skills.md +0 -1
- package/docs/storage-and-network.md +4 -0
- package/docs/websocket.md +39 -0
- package/package.js +1 -5
- package/package.json +1 -1
- package/portable.js +2 -2
- package/publish-artifacts.js +16 -24
- package/types/packages/asr/src/capture.d.ts +11 -0
- package/types/packages/asr/src/errors.d.ts +9 -0
- package/types/packages/asr/src/index.d.ts +8 -0
- package/types/packages/asr/src/input.d.ts +30 -0
- package/types/packages/asr/src/reducer.d.ts +14 -0
- package/types/packages/asr/src/refinement.d.ts +21 -0
- package/types/packages/asr/src/stream.d.ts +12 -0
- package/types/packages/asr/src/task.d.ts +2 -0
- package/types/packages/asr/src/types.d.ts +108 -0
- package/types/packages/plugins/src/ai.d.ts +3 -0
- package/types/packages/plugins/src/asr.d.ts +13 -0
- package/types/packages/plugins/src/categories.d.ts +2 -8
- package/types/packages/plugins/src/contract.d.ts +4 -0
- package/types/packages/plugins/src/editor-fields.d.ts +2 -5
- package/types/packages/plugins/src/index.d.ts +2 -0
- package/types/packages/plugins/src/package.d.ts +5 -7
- package/types/packages/plugins/src/permissions.d.ts +3 -3
- package/types/packages/plugins/src/portable.d.ts +0 -1
- package/types/packages/plugins/src/rendering.d.ts +1 -8
- package/types/packages/plugins/src/settings.d.ts +6 -1
- package/types/packages/plugins/src/websocket.d.ts +9 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { assertLocalId } from "./ids";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { PluginCategory } from "./categories";
|
|
3
|
+
import type { PluginPermission } from "./permissions";
|
|
4
4
|
import { type PluginBackendManifest } from "./backend-manifest";
|
|
5
5
|
export { validateBackendManifest, PLUGIN_SYSTEM_ACCESS, type PluginBackendManifest, type PluginSystemAccess, } from "./backend-manifest";
|
|
6
6
|
export { comparePluginVersions } from "./version";
|
|
7
|
-
export { PLUGIN_CATEGORIES,
|
|
7
|
+
export { PLUGIN_CATEGORIES, isPluginCategory, type PluginCategory } from "./categories";
|
|
8
8
|
export { PLUGIN_PERMISSIONS, isPluginPermission, type PluginPermission } from "./permissions";
|
|
9
9
|
export { PLUGIN_AI_CAPABILITIES, isPluginAICapability } from "./ai";
|
|
10
10
|
export declare const PLUGIN_SHARED_MODULES: readonly ["@tau/plugins", "@tau/plugins/whiteboard", "@tau/plugins/sync", "@tau/ui", "react", "react-dom", "react-dom/client", "react/jsx-runtime", "react/jsx-dev-runtime"];
|
|
@@ -39,9 +39,7 @@ export interface DevelopmentPluginPackage {
|
|
|
39
39
|
code: string;
|
|
40
40
|
css?: string;
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
43
|
-
export declare function validatePluginManifest(value: unknown
|
|
44
|
-
strict?: boolean;
|
|
45
|
-
}): PluginManifest;
|
|
42
|
+
/** 按实际使用的包字段解析身份、权限、入口和摘要。 */
|
|
43
|
+
export declare function validatePluginManifest(value: unknown): PluginManifest;
|
|
46
44
|
/** 静态内容贡献在启动时固定,启停与更新需要重启。 */
|
|
47
45
|
export declare const isContentPlugin: (manifest: Pick<PluginManifest, "editor" | "whiteboard">) => boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PLUGIN_PERMISSIONS: readonly ["cards:read", "cards:write", "cards:delete", "articles:read", "articles:write", "articles:delete", "documents:read", "documents:write", "documents:delete", "whiteboards:read", "whiteboards:write", "whiteboards:delete", "projects:read", "projects:write", "projects:delete", "todos:read", "todos:write", "todos:delete", "calendar:read", "calendar:write", "calendar:delete", "notebooks:read", "materials:read", "chats:read", "flashcards:read", "flashcards:write", ...("ai:chat" | "ai:titleSummary" | "ai:webClip" | "ai:podcastGeneration" | "ai:flashcardGeneration" | "ai:aiJudgement" | "ai:transcriptionOptimization" | "ai:videoSummary" | "ai:videoEbookRewrite" | "ai:vibeLearningImageDescription" | "ai:contentMetadata" | "ai:contentInsights")[]];
|
|
1
|
+
export declare const PLUGIN_PERMISSIONS: readonly ["cards:read", "cards:write", "cards:delete", "articles:read", "articles:write", "articles:delete", "documents:read", "documents:write", "documents:delete", "whiteboards:read", "whiteboards:write", "whiteboards:delete", "projects:read", "projects:write", "projects:delete", "todos:read", "todos:write", "todos:delete", "calendar:read", "calendar:write", "calendar:delete", "notebooks:read", "materials:read", "chats:read", "flashcards:read", "flashcards:write", ...("ai:chat" | "ai:titleSummary" | "ai:webClip" | "ai:podcastGeneration" | "ai:flashcardGeneration" | "ai:aiJudgement" | "ai:transcriptionOptimization" | "ai:speechInputRefinement" | "ai:videoSummary" | "ai:videoEbookRewrite" | "ai:vibeLearningImageDescription" | "ai:contentMetadata" | "ai:contentInsights")[]];
|
|
2
2
|
export type PluginPermission = (typeof PLUGIN_PERMISSIONS)[number];
|
|
3
3
|
export declare const isPluginPermission: (value: unknown) => value is PluginPermission;
|
|
4
4
|
/** granted:可直接调用;prompt:调用时会询问用户;denied:本次运行已拒绝或已被阻止 */
|
|
@@ -19,7 +19,7 @@ export interface PluginPermissions {
|
|
|
19
19
|
/** 一次询问多项;全部获准时返回 true。已获准的不再询问。 */
|
|
20
20
|
request(permissions: readonly PluginPermission[]): Promise<boolean>;
|
|
21
21
|
}
|
|
22
|
-
/**
|
|
23
|
-
export declare function readPermissionsField(item: Record<string, unknown
|
|
22
|
+
/** 权限必须属于宿主已定义的授权范围。 */
|
|
23
|
+
export declare function readPermissionsField(item: Record<string, unknown>): {
|
|
24
24
|
permissions?: readonly PluginPermission[];
|
|
25
25
|
};
|
|
@@ -27,7 +27,6 @@ export interface PluginBuildOutput {
|
|
|
27
27
|
readonly styles?: string;
|
|
28
28
|
readonly integrity: Readonly<Record<string, string>>;
|
|
29
29
|
readonly skills?: readonly string[];
|
|
30
|
-
readonly imports?: readonly string[];
|
|
31
30
|
}
|
|
32
31
|
/** 作者声明身份与支持平台,宿主功能通过统一 API 注册。 */
|
|
33
32
|
export declare function buildPortablePluginManifest(value: unknown, output: PluginBuildOutput): PortablePluginManifest;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PluginDefinition } from "./contract";
|
|
2
2
|
import type { PluginEditorExtension } from "./editor";
|
|
3
3
|
import type { MarkdownCodec } from "../../markdown/src/index";
|
|
4
|
-
import { type
|
|
4
|
+
import { type ReadablePortablePluginManifest, type PortablePluginHost } from "./portable";
|
|
5
5
|
import { type DevelopmentPluginPackage, type PluginManifest } from "./package";
|
|
6
6
|
export type { PublishedPluginRender } from "./render-artifact";
|
|
7
7
|
export declare function assertUniqueEditorCodecs(codecs: readonly MarkdownCodec[]): void;
|
|
@@ -33,13 +33,6 @@ export declare function evaluatePortablePluginPackage(artifact: {
|
|
|
33
33
|
code: string;
|
|
34
34
|
css?: string;
|
|
35
35
|
}, modules: Readonly<Record<string, unknown>>, host: PortablePluginHost): PluginDefinition;
|
|
36
|
-
/** 各宿主共用支持等级投影;原始数据与节点身份不改写。 */
|
|
37
|
-
export declare function adaptPortablePluginDefinition(definition: PluginDefinition, manifest: ReadablePortablePluginManifest, platform: PortablePlatform): {
|
|
38
|
-
support: Readonly<{
|
|
39
|
-
[k: string]: "edit";
|
|
40
|
-
}>;
|
|
41
|
-
definition: PluginDefinition;
|
|
42
|
-
};
|
|
43
36
|
export declare const hasPluginContent: (definition: PluginDefinition) => boolean;
|
|
44
37
|
type DefinitionManifest = Pick<PluginManifest, "id" | "name" | "version" | "apiVersion"> & {
|
|
45
38
|
readonly formatVersion?: number;
|
|
@@ -13,6 +13,11 @@ export interface PluginSettingsProps {
|
|
|
13
13
|
readonly modelId: string;
|
|
14
14
|
save(value: JsonValue, modelId: string): Promise<void>;
|
|
15
15
|
};
|
|
16
|
+
readonly asrConfig?: {
|
|
17
|
+
readonly value: JsonValue;
|
|
18
|
+
readonly modelId: string;
|
|
19
|
+
save(value: JsonValue, modelId: string): Promise<void>;
|
|
20
|
+
};
|
|
16
21
|
readonly ttsConfig?: {
|
|
17
22
|
readonly instanceId: string;
|
|
18
23
|
readonly value: JsonValue;
|
|
@@ -43,7 +48,7 @@ export interface PluginSettingsDefinition {
|
|
|
43
48
|
title: string;
|
|
44
49
|
description?: string;
|
|
45
50
|
/** 提供方配置表单挂载到对应宿主设置;普通插件设置省略。 */
|
|
46
|
-
target?: "sync" | "upload" | "tts" | "images" | "video" | "publish";
|
|
51
|
+
target?: "sync" | "upload" | "tts" | "asr" | "images" | "video" | "publish";
|
|
47
52
|
component: ComponentType<PluginSettingsProps>;
|
|
48
53
|
}
|
|
49
54
|
export interface PluginSettingsHandle extends Disposable {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** 由宿主创建、符合浏览器 WebSocket 事件和方法契约的连接。 */
|
|
2
|
+
export type PluginSocket = WebSocket;
|
|
3
|
+
export interface PluginSocketOptions {
|
|
4
|
+
headers?: Readonly<Record<string, string>>;
|
|
5
|
+
signal?: AbortSignal;
|
|
6
|
+
}
|
|
7
|
+
export interface PluginWebSocket {
|
|
8
|
+
connect(url: string, protocols?: string | string[], options?: PluginSocketOptions): PluginSocket;
|
|
9
|
+
}
|