vite-plugin-aipanel 1.2.10 → 1.2.12
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/README.md +53 -35
- package/es/core/mcp-tools.d.ts +4 -1
- package/es/core/mcp-tools.mjs +3 -1
- package/es/endpoints/host-events.mjs +1 -1
- package/lib/client.css +1 -1
- package/lib/client.js +2884 -2686
- package/lib/core/mcp-tools.cjs +3 -1
- package/lib/core/mcp-tools.d.ts +4 -1
- package/lib/endpoints/host-events.cjs +1 -1
- package/package.json +5 -5
package/lib/core/mcp-tools.cjs
CHANGED
|
@@ -128,7 +128,9 @@ function configureToolScope(extra = [], deny = [], warn = (msg) => console.warn(
|
|
|
128
128
|
}
|
|
129
129
|
function currentOfficialShorts() {
|
|
130
130
|
const base = officialDefaultShorts().filter((s) => !deniedShorts.has(s));
|
|
131
|
-
const extra = [...extraAllowed].filter(
|
|
131
|
+
const extra = [...extraAllowed].filter(
|
|
132
|
+
(s) => !deniedShorts.has(s) && !officialDefaultShorts().includes(s)
|
|
133
|
+
);
|
|
132
134
|
return [...base, ...extra];
|
|
133
135
|
}
|
|
134
136
|
function isAllowedToolName(name) {
|
package/lib/core/mcp-tools.d.ts
CHANGED
|
@@ -57,7 +57,10 @@ export declare function officialExtraCandidates(): string[];
|
|
|
57
57
|
export declare function officialDefaultShorts(): string[];
|
|
58
58
|
/** 配置工具面范围(默认为纯白名单) */
|
|
59
59
|
export declare function configureToolScope(extra?: readonly string[], deny?: readonly string[], warn?: (msg: string) => void): void;
|
|
60
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* 当前生效的官方白名单(短名,含 extra 减 deny)。
|
|
62
|
+
* deny 同时作用于默认面与 extra,保证 tools/list 暴露面与 isAllowedToolName 调用守卫一致。
|
|
63
|
+
*/
|
|
61
64
|
export declare function currentOfficialShorts(): string[];
|
|
62
65
|
/** tools/call 白名单守卫(含 current_page 与动态 extra/deny) */
|
|
63
66
|
export declare function isAllowedToolName(name: string): boolean;
|
|
@@ -83,7 +83,7 @@ function setupHostEventsEndpoint(server, ctx) {
|
|
|
83
83
|
function isProviderEvent(value) {
|
|
84
84
|
if (typeof value !== "object" || value === null) return false;
|
|
85
85
|
const v = value;
|
|
86
|
-
if (v.type === "session.status" || v.type === "thinking") {
|
|
86
|
+
if (v.type === "session.status" || v.type === "thinking" || v.type === "session.pending" || v.type === "session.subagents") {
|
|
87
87
|
return typeof v.sessionId === "string" && v.sessionId.length > 0;
|
|
88
88
|
}
|
|
89
89
|
if (v.type === "session.updated") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-aipanel",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"description": "Embed OpenCode Web UI in your Vite dev server for real-time code modification and preview",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"execa": "^9.6.1",
|
|
43
43
|
"typescript-language-server": "^5.3.0",
|
|
44
44
|
"unplugin-vue-inspector": "^3.0.0",
|
|
45
|
-
"@aipanel/
|
|
46
|
-
"@aipanel/
|
|
45
|
+
"@aipanel/core": "1.2.12",
|
|
46
|
+
"@aipanel/provider-opencode": "1.2.12"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"vite": ">=5.0.0",
|
|
50
|
-
"@aipanel/provider-deepseek": "1.2.
|
|
50
|
+
"@aipanel/provider-deepseek": "1.2.12"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
53
|
"@aipanel/provider-deepseek": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@types/picomatch": "^4.0.0",
|
|
59
59
|
"sharp": "^0.34.5",
|
|
60
|
-
"@aipanel/client": "1.2.
|
|
60
|
+
"@aipanel/client": "1.2.12"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "node scripts/sync-official-meta.mjs && pagoda-cli build && vite build -c vite.client.config.ts",
|