unplugin-devpilot 0.0.4 → 0.0.6
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 +1 -0
- package/dist/client/index.d.mts +18 -1
- package/dist/client/index.mjs +14 -1
- package/dist/farm.d.mts +1 -1
- package/dist/farm.mjs +1 -1
- package/dist/{index-Csy16I0Z.d.mts → index-BE1u_wvJ.d.mts} +135 -1
- package/dist/{index-WH3owjvn.d.mts → index-D6IYERGx.d.mts} +17 -7
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/{plugin-B1Afr0m3.mjs → plugin-4eB8Zx4B.mjs} +11 -11
- package/dist/plugin.d.mts +2 -2
- package/dist/plugin.mjs +1 -1
- package/dist/rspack.d.mts +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/{src-AEXLBOF9.mjs → src-BHdaOKo9.mjs} +719 -193
- package/dist/vite.d.mts +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/webpack.d.mts +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -79,6 +79,7 @@ export default defineConfig({
|
|
|
79
79
|
wsPort: 3100, // Optional: Specify WebSocket port (will be randomly allocated if not specified)
|
|
80
80
|
mcpPort: 3101, // Optional: Specify MCP server port (will use random port if specified port is occupied)
|
|
81
81
|
plugins: [], // Optional: Array of DevpilotPlugin instances
|
|
82
|
+
skillPaths: ['./.github/skills/devpilot', './.cursor/skills/devpilot'], // Optional: Array of paths to core skill files
|
|
82
83
|
}),
|
|
83
84
|
],
|
|
84
85
|
});
|
package/dist/client/index.d.mts
CHANGED
|
@@ -10,6 +10,12 @@ interface ClientInfo {
|
|
|
10
10
|
interface BaseServerFunctions {
|
|
11
11
|
ping: () => string;
|
|
12
12
|
updateClientInfo: (info: Omit<ClientInfo, "clientId" | "connectedAt" | "lastActiveAt">) => void;
|
|
13
|
+
storageGetItem: (namespace: string, key: string) => Promise<any>;
|
|
14
|
+
storageSetItem: (namespace: string, key: string, value: any) => Promise<void>;
|
|
15
|
+
storageRemoveItem: (namespace: string, key: string) => Promise<void>;
|
|
16
|
+
storageGetKeys: (namespace: string, base?: string) => Promise<string[]>;
|
|
17
|
+
storageHasItem: (namespace: string, key: string) => Promise<boolean>;
|
|
18
|
+
storageClear: (namespace: string, base?: string) => Promise<void>;
|
|
13
19
|
}
|
|
14
20
|
interface PluginServerFunctions {}
|
|
15
21
|
type ServerFunctions = BaseServerFunctions & PluginServerFunctions;
|
|
@@ -36,6 +42,17 @@ interface DevpilotClientOptions {
|
|
|
36
42
|
extendRpcHandlers?: Record<string, (...args: any[]) => any>;
|
|
37
43
|
}
|
|
38
44
|
//#endregion
|
|
45
|
+
//#region src/client/storage.d.ts
|
|
46
|
+
interface ClientStorage {
|
|
47
|
+
getItem: <T = any>(key: string) => Promise<T | null>;
|
|
48
|
+
setItem: <T = any>(key: string, value: T) => Promise<void>;
|
|
49
|
+
removeItem: (key: string) => Promise<void>;
|
|
50
|
+
getKeys: (base?: string) => Promise<string[]>;
|
|
51
|
+
hasItem: (key: string) => Promise<boolean>;
|
|
52
|
+
clear: (base?: string) => Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
declare function createClientStorage(client: DevpilotClient<any>, namespace: string): ClientStorage;
|
|
55
|
+
//#endregion
|
|
39
56
|
//#region src/client/index.d.ts
|
|
40
57
|
declare function createDevpilotClient<S extends Record<string, any> = ServerFunctions>(options: DevpilotClientOptions): DevpilotClient<S>;
|
|
41
58
|
declare function initDevpilot<S extends Record<string, any> = ServerFunctions>(options: DevpilotClientOptions): DevpilotClient<S>;
|
|
@@ -59,4 +76,4 @@ declare function getDevpilotClient<S extends Record<string, any> = ServerFunctio
|
|
|
59
76
|
*/
|
|
60
77
|
declare function defineRpcHandlers<T extends { [K in keyof T]: (...args: any[]) => any }>(handlers: T): T;
|
|
61
78
|
//#endregion
|
|
62
|
-
export { type DevpilotClient, type DevpilotClientOptions, type RpcHandlers, createDevpilotClient, defineRpcHandlers, getDevpilotClient, initDevpilot };
|
|
79
|
+
export { type ClientStorage, type DevpilotClient, type DevpilotClientOptions, type RpcHandlers, createClientStorage, createDevpilotClient, defineRpcHandlers, getDevpilotClient, initDevpilot };
|
package/dist/client/index.mjs
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
//#region src/client/storage.ts
|
|
2
|
+
function createClientStorage(client, namespace) {
|
|
3
|
+
return {
|
|
4
|
+
getItem: (key) => client.rpcCall("storageGetItem", namespace, key),
|
|
5
|
+
setItem: (key, value) => client.rpcCall("storageSetItem", namespace, key, value),
|
|
6
|
+
removeItem: (key) => client.rpcCall("storageRemoveItem", namespace, key),
|
|
7
|
+
getKeys: (base) => client.rpcCall("storageGetKeys", namespace, base),
|
|
8
|
+
hasItem: (key) => client.rpcCall("storageHasItem", namespace, key),
|
|
9
|
+
clear: (base) => client.rpcCall("storageClear", namespace, base)
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
1
14
|
//#region src/client/index.ts
|
|
2
15
|
function generateId() {
|
|
3
16
|
return Math.random().toString(36).slice(2, 12);
|
|
@@ -143,4 +156,4 @@ function defineRpcHandlers(handlers) {
|
|
|
143
156
|
}
|
|
144
157
|
|
|
145
158
|
//#endregion
|
|
146
|
-
export { createDevpilotClient, defineRpcHandlers, getDevpilotClient, initDevpilot };
|
|
159
|
+
export { createClientStorage, createDevpilotClient, defineRpcHandlers, getDevpilotClient, initDevpilot };
|
package/dist/farm.d.mts
CHANGED
package/dist/farm.mjs
CHANGED
|
@@ -1,3 +1,124 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/unstorage@1.17.4/node_modules/unstorage/dist/shared/unstorage.Ca7R4QL2.d.mts
|
|
2
|
+
type StorageValue = null | string | number | boolean | object;
|
|
3
|
+
type WatchEvent = "update" | "remove";
|
|
4
|
+
type WatchCallback = (event: WatchEvent, key: string) => any;
|
|
5
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
6
|
+
type MaybeDefined<T> = T extends any ? T : any;
|
|
7
|
+
type Unwatch = () => MaybePromise<void>;
|
|
8
|
+
interface StorageMeta {
|
|
9
|
+
atime?: Date;
|
|
10
|
+
mtime?: Date;
|
|
11
|
+
ttl?: number;
|
|
12
|
+
[key: string]: StorageValue | Date | undefined;
|
|
13
|
+
}
|
|
14
|
+
type TransactionOptions = Record<string, any>;
|
|
15
|
+
type GetKeysOptions = TransactionOptions & {
|
|
16
|
+
maxDepth?: number;
|
|
17
|
+
};
|
|
18
|
+
interface DriverFlags {
|
|
19
|
+
maxDepth?: boolean;
|
|
20
|
+
ttl?: boolean;
|
|
21
|
+
}
|
|
22
|
+
interface Driver<OptionsT = any, InstanceT = any> {
|
|
23
|
+
name?: string;
|
|
24
|
+
flags?: DriverFlags;
|
|
25
|
+
options?: OptionsT;
|
|
26
|
+
getInstance?: () => InstanceT;
|
|
27
|
+
hasItem: (key: string, opts: TransactionOptions) => MaybePromise<boolean>;
|
|
28
|
+
getItem: (key: string, opts?: TransactionOptions) => MaybePromise<StorageValue>;
|
|
29
|
+
/** @experimental */
|
|
30
|
+
getItems?: (items: {
|
|
31
|
+
key: string;
|
|
32
|
+
options?: TransactionOptions;
|
|
33
|
+
}[], commonOptions?: TransactionOptions) => MaybePromise<{
|
|
34
|
+
key: string;
|
|
35
|
+
value: StorageValue;
|
|
36
|
+
}[]>;
|
|
37
|
+
/** @experimental */
|
|
38
|
+
getItemRaw?: (key: string, opts: TransactionOptions) => MaybePromise<unknown>;
|
|
39
|
+
setItem?: (key: string, value: string, opts: TransactionOptions) => MaybePromise<void>;
|
|
40
|
+
/** @experimental */
|
|
41
|
+
setItems?: (items: {
|
|
42
|
+
key: string;
|
|
43
|
+
value: string;
|
|
44
|
+
options?: TransactionOptions;
|
|
45
|
+
}[], commonOptions?: TransactionOptions) => MaybePromise<void>;
|
|
46
|
+
/** @experimental */
|
|
47
|
+
setItemRaw?: (key: string, value: any, opts: TransactionOptions) => MaybePromise<void>;
|
|
48
|
+
removeItem?: (key: string, opts: TransactionOptions) => MaybePromise<void>;
|
|
49
|
+
getMeta?: (key: string, opts: TransactionOptions) => MaybePromise<StorageMeta | null>;
|
|
50
|
+
getKeys: (base: string, opts: GetKeysOptions) => MaybePromise<string[]>;
|
|
51
|
+
clear?: (base: string, opts: TransactionOptions) => MaybePromise<void>;
|
|
52
|
+
dispose?: () => MaybePromise<void>;
|
|
53
|
+
watch?: (callback: WatchCallback) => MaybePromise<Unwatch>;
|
|
54
|
+
}
|
|
55
|
+
type StorageDefinition = {
|
|
56
|
+
items: unknown;
|
|
57
|
+
[key: string]: unknown;
|
|
58
|
+
};
|
|
59
|
+
type StorageItemMap<T> = T extends StorageDefinition ? T["items"] : T;
|
|
60
|
+
type StorageItemType<T, K> = K extends keyof StorageItemMap<T> ? StorageItemMap<T>[K] : T extends StorageDefinition ? StorageValue : T;
|
|
61
|
+
interface Storage<T extends StorageValue = StorageValue> {
|
|
62
|
+
hasItem<U extends Extract<T, StorageDefinition>, K extends keyof StorageItemMap<U>>(key: K, opts?: TransactionOptions): Promise<boolean>;
|
|
63
|
+
hasItem(key: string, opts?: TransactionOptions): Promise<boolean>;
|
|
64
|
+
getItem<U extends Extract<T, StorageDefinition>, K extends string & keyof StorageItemMap<U>>(key: K, ops?: TransactionOptions): Promise<StorageItemType<T, K> | null>;
|
|
65
|
+
getItem<R = StorageItemType<T, string>>(key: string, opts?: TransactionOptions): Promise<R | null>;
|
|
66
|
+
/** @experimental */
|
|
67
|
+
getItems: <U extends T>(items: (string | {
|
|
68
|
+
key: string;
|
|
69
|
+
options?: TransactionOptions;
|
|
70
|
+
})[], commonOptions?: TransactionOptions) => Promise<{
|
|
71
|
+
key: string;
|
|
72
|
+
value: U;
|
|
73
|
+
}[]>;
|
|
74
|
+
/** @experimental See https://github.com/unjs/unstorage/issues/142 */
|
|
75
|
+
getItemRaw: <T = any>(key: string, opts?: TransactionOptions) => Promise<MaybeDefined<T> | null>;
|
|
76
|
+
setItem<U extends Extract<T, StorageDefinition>, K extends keyof StorageItemMap<U>>(key: K, value: StorageItemType<T, K>, opts?: TransactionOptions): Promise<void>;
|
|
77
|
+
setItem<U extends T>(key: string, value: U, opts?: TransactionOptions): Promise<void>;
|
|
78
|
+
/** @experimental */
|
|
79
|
+
setItems: <U extends T>(items: {
|
|
80
|
+
key: string;
|
|
81
|
+
value: U;
|
|
82
|
+
options?: TransactionOptions;
|
|
83
|
+
}[], commonOptions?: TransactionOptions) => Promise<void>;
|
|
84
|
+
/** @experimental See https://github.com/unjs/unstorage/issues/142 */
|
|
85
|
+
setItemRaw: <T = any>(key: string, value: MaybeDefined<T>, opts?: TransactionOptions) => Promise<void>;
|
|
86
|
+
removeItem<U extends Extract<T, StorageDefinition>, K extends keyof StorageItemMap<U>>(key: K, opts?: (TransactionOptions & {
|
|
87
|
+
removeMeta?: boolean;
|
|
88
|
+
}) | boolean): Promise<void>;
|
|
89
|
+
removeItem(key: string, opts?: (TransactionOptions & {
|
|
90
|
+
removeMeta?: boolean;
|
|
91
|
+
}) | boolean): Promise<void>;
|
|
92
|
+
getMeta: (key: string, opts?: (TransactionOptions & {
|
|
93
|
+
nativeOnly?: boolean;
|
|
94
|
+
}) | boolean) => MaybePromise<StorageMeta>;
|
|
95
|
+
setMeta: (key: string, value: StorageMeta, opts?: TransactionOptions) => Promise<void>;
|
|
96
|
+
removeMeta: (key: string, opts?: TransactionOptions) => Promise<void>;
|
|
97
|
+
getKeys: (base?: string, opts?: GetKeysOptions) => Promise<string[]>;
|
|
98
|
+
clear: (base?: string, opts?: TransactionOptions) => Promise<void>;
|
|
99
|
+
dispose: () => Promise<void>;
|
|
100
|
+
watch: (callback: WatchCallback) => Promise<Unwatch>;
|
|
101
|
+
unwatch: () => Promise<void>;
|
|
102
|
+
mount: (base: string, driver: Driver) => Storage;
|
|
103
|
+
unmount: (base: string, dispose?: boolean) => Promise<void>;
|
|
104
|
+
getMount: (key?: string) => {
|
|
105
|
+
base: string;
|
|
106
|
+
driver: Driver;
|
|
107
|
+
};
|
|
108
|
+
getMounts: (base?: string, options?: {
|
|
109
|
+
parents?: boolean;
|
|
110
|
+
}) => {
|
|
111
|
+
base: string;
|
|
112
|
+
driver: Driver;
|
|
113
|
+
}[];
|
|
114
|
+
keys: Storage["getKeys"];
|
|
115
|
+
get: Storage<T>["getItem"];
|
|
116
|
+
set: Storage<T>["setItem"];
|
|
117
|
+
has: Storage<T>["hasItem"];
|
|
118
|
+
del: Storage<T>["removeItem"];
|
|
119
|
+
remove: Storage<T>["removeItem"];
|
|
120
|
+
}
|
|
121
|
+
//#endregion
|
|
1
122
|
//#region src/core/utils.d.ts
|
|
2
123
|
/**
|
|
3
124
|
* Resolve the module path relative to the plugin to an absolute path
|
|
@@ -4100,6 +4221,18 @@ type McpToolRegister = <OutputArgs extends ZodRawShapeCompat | AnySchema, InputA
|
|
|
4100
4221
|
};
|
|
4101
4222
|
cb: NoInfer<ToolCallback<InputArgs>>;
|
|
4102
4223
|
});
|
|
4224
|
+
interface McpToolResolved {
|
|
4225
|
+
name: string;
|
|
4226
|
+
config: {
|
|
4227
|
+
title?: string;
|
|
4228
|
+
description?: string;
|
|
4229
|
+
inputSchema?: ZodRawShapeCompat;
|
|
4230
|
+
outputSchema?: ZodRawShapeCompat | AnySchema;
|
|
4231
|
+
annotations?: ToolAnnotations;
|
|
4232
|
+
_meta?: Record<string, unknown>;
|
|
4233
|
+
};
|
|
4234
|
+
cb: ToolCallback<ZodRawShapeCompat>;
|
|
4235
|
+
}
|
|
4103
4236
|
declare function defineMcpToolRegister<OutputArgs extends ZodRawShapeCompat | AnySchema, InputArgs extends undefined | ZodRawShapeCompat | AnySchema = undefined>(name: string, config: {
|
|
4104
4237
|
title?: string;
|
|
4105
4238
|
description?: string;
|
|
@@ -4123,6 +4256,7 @@ declare function defineMcpToolRegister<OutputArgs extends ZodRawShapeCompat | An
|
|
|
4123
4256
|
//#region src/core/plugin/index.d.ts
|
|
4124
4257
|
interface DevpilotPluginContext {
|
|
4125
4258
|
wsPort: number;
|
|
4259
|
+
storage: Storage;
|
|
4126
4260
|
}
|
|
4127
4261
|
/**
|
|
4128
4262
|
* Resolve the module path relative to the plugin to an absolute path
|
|
@@ -4143,4 +4277,4 @@ interface DevpilotPluginContext {
|
|
|
4143
4277
|
*/
|
|
4144
4278
|
declare function resolveClientModule(importMetaUrl: string, relativePath: string): string;
|
|
4145
4279
|
//#endregion
|
|
4146
|
-
export {
|
|
4280
|
+
export { type defineMcpToolRegister as a, type StorageValue as c, McpToolResolved as i, resolveClientModule as n, resolveModule as o, McpToolRegister as r, Storage as s, DevpilotPluginContext as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as McpToolRegister, t as DevpilotPluginContext } from "./index-
|
|
1
|
+
import { c as StorageValue, r as McpToolRegister, s as Storage, t as DevpilotPluginContext } from "./index-BE1u_wvJ.mjs";
|
|
2
2
|
import { UnpluginInstance } from "unplugin";
|
|
3
3
|
import { WebSocket } from "ws";
|
|
4
4
|
|
|
@@ -45,20 +45,20 @@ interface Options {
|
|
|
45
45
|
mcpPort?: number;
|
|
46
46
|
plugins?: DevpilotPlugin[];
|
|
47
47
|
/**
|
|
48
|
-
* The
|
|
49
|
-
* - directory path: '
|
|
50
|
-
* - file path: '
|
|
48
|
+
* The paths to generate the core skill files
|
|
49
|
+
* - directory path: './.github/skills/devpilot' (will generate SKILL.md in this directory)
|
|
50
|
+
* - file path: './.github/skills/devpilot/SKILL.md' (will generate the specified file)
|
|
51
51
|
*
|
|
52
52
|
* If not specified, no core skill file will be generated
|
|
53
53
|
* @example
|
|
54
54
|
* ```ts
|
|
55
55
|
* Devpilot({
|
|
56
|
-
*
|
|
56
|
+
* skillPaths: ['./.github/skills/devpilot', './.cursor/skills/devpilot'],
|
|
57
57
|
* plugins: [],
|
|
58
58
|
* })
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
skillPaths?: string[];
|
|
62
62
|
}
|
|
63
63
|
//#endregion
|
|
64
64
|
//#region ../../node_modules/.pnpm/birpc@4.0.0/node_modules/birpc/dist/index.d.mts
|
|
@@ -188,6 +188,12 @@ interface PendingTask {
|
|
|
188
188
|
interface BaseServerFunctions {
|
|
189
189
|
ping: () => string;
|
|
190
190
|
updateClientInfo: (info: Omit<ClientInfo, "clientId" | "connectedAt" | "lastActiveAt">) => void;
|
|
191
|
+
storageGetItem: (namespace: string, key: string) => Promise<any>;
|
|
192
|
+
storageSetItem: (namespace: string, key: string, value: any) => Promise<void>;
|
|
193
|
+
storageRemoveItem: (namespace: string, key: string) => Promise<void>;
|
|
194
|
+
storageGetKeys: (namespace: string, base?: string) => Promise<string[]>;
|
|
195
|
+
storageHasItem: (namespace: string, key: string) => Promise<boolean>;
|
|
196
|
+
storageClear: (namespace: string, base?: string) => Promise<void>;
|
|
191
197
|
}
|
|
192
198
|
interface PluginServerFunctions {}
|
|
193
199
|
type ServerFunctions = BaseServerFunctions & PluginServerFunctions;
|
|
@@ -271,7 +277,11 @@ declare const clientManager: ClientManager;
|
|
|
271
277
|
*/
|
|
272
278
|
declare function resolveSkillModule(importMetaUrl: string, relativePath: string): string;
|
|
273
279
|
//#endregion
|
|
280
|
+
//#region src/core/storage.d.ts
|
|
281
|
+
declare const storage: Storage<StorageValue>;
|
|
282
|
+
declare function getPluginStorage(namespace: string): Storage<StorageValue>;
|
|
283
|
+
//#endregion
|
|
274
284
|
//#region src/index.d.ts
|
|
275
285
|
declare const unpluginDevpilot: UnpluginInstance<Options | undefined, false>;
|
|
276
286
|
//#endregion
|
|
277
|
-
export {
|
|
287
|
+
export { Options as _, clientManager as a, ClientDiscoveryFilter as c, PendingTask as d, PluginClientFunctions as f, DevpilotPlugin as g, TaskHistory as h, resolveSkillModule as i, ClientFunctions as l, ServerFunctions as m, getPluginStorage as n, BaseClientFunctions as o, PluginServerFunctions as p, storage as r, BaseServerFunctions as s, unpluginDevpilot as t, ClientInfo as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { a as
|
|
3
|
-
export { BaseClientFunctions, BaseServerFunctions, ClientDiscoveryFilter, ClientFunctions, ClientInfo, DevpilotPlugin, DevpilotPluginContext, Options, PendingTask, PluginClientFunctions, PluginServerFunctions, ServerFunctions, TaskHistory, clientManager, unpluginDevpilot as default, unpluginDevpilot, defineMcpToolRegister, resolveClientModule, resolveModule, resolveSkillModule };
|
|
1
|
+
import { a as defineMcpToolRegister, n as resolveClientModule, o as resolveModule, t as DevpilotPluginContext } from "./index-BE1u_wvJ.mjs";
|
|
2
|
+
import { _ as Options, a as clientManager, c as ClientDiscoveryFilter, d as PendingTask, f as PluginClientFunctions, g as DevpilotPlugin, h as TaskHistory, i as resolveSkillModule, l as ClientFunctions, m as ServerFunctions, n as getPluginStorage, o as BaseClientFunctions, p as PluginServerFunctions, r as storage, s as BaseServerFunctions, t as unpluginDevpilot, u as ClientInfo } from "./index-D6IYERGx.mjs";
|
|
3
|
+
export { BaseClientFunctions, BaseServerFunctions, ClientDiscoveryFilter, ClientFunctions, ClientInfo, DevpilotPlugin, DevpilotPluginContext, Options, PendingTask, PluginClientFunctions, PluginServerFunctions, ServerFunctions, TaskHistory, clientManager, unpluginDevpilot as default, unpluginDevpilot, defineMcpToolRegister, getPluginStorage, resolveClientModule, resolveModule, resolveSkillModule, storage };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import { n as
|
|
1
|
+
import { a as storage, i as getPluginStorage, n as unpluginDevpilot, o as clientManager, r as resolveSkillModule, t as src_default } from "./src-BHdaOKo9.mjs";
|
|
2
|
+
import { n as resolveModule, r as defineMcpToolRegister, t as resolveClientModule } from "./plugin-4eB8Zx4B.mjs";
|
|
3
3
|
|
|
4
|
-
export { clientManager, src_default as default, defineMcpToolRegister, resolveClientModule, resolveModule, resolveSkillModule, unpluginDevpilot };
|
|
4
|
+
export { clientManager, src_default as default, defineMcpToolRegister, getPluginStorage, resolveClientModule, resolveModule, resolveSkillModule, storage, unpluginDevpilot };
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { dirname, join } from "node:path";
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
3
3
|
|
|
4
|
+
//#region src/core/plugin/mcp.ts
|
|
5
|
+
function defineMcpToolRegister(name, config, cb) {
|
|
6
|
+
return () => ({
|
|
7
|
+
name,
|
|
8
|
+
config,
|
|
9
|
+
cb
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
4
14
|
//#region src/core/utils.ts
|
|
5
15
|
/**
|
|
6
16
|
* Resolve the module path relative to the plugin to an absolute path
|
|
@@ -18,16 +28,6 @@ function resolveModule(importMetaUrl, relativePath) {
|
|
|
18
28
|
return pathToFileURL(join(dirname(fileURLToPath(importMetaUrl)), relativePath)).href;
|
|
19
29
|
}
|
|
20
30
|
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region src/core/plugin/mcp.ts
|
|
23
|
-
function defineMcpToolRegister(name, config, cb) {
|
|
24
|
-
return () => ({
|
|
25
|
-
name,
|
|
26
|
-
config,
|
|
27
|
-
cb
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/core/plugin/index.ts
|
|
33
33
|
/**
|
|
@@ -52,4 +52,4 @@ function resolveClientModule(importMetaUrl, relativePath) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
//#endregion
|
|
55
|
-
export {
|
|
55
|
+
export { resolveModule as n, defineMcpToolRegister as r, resolveClientModule as t };
|
package/dist/plugin.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { DevpilotPluginContext, McpToolRegister as McpServerRegister, defineMcpToolRegister, resolveClientModule, resolveModule };
|
|
1
|
+
import { a as defineMcpToolRegister, i as McpToolResolved, n as resolveClientModule, o as resolveModule, r as McpToolRegister, t as DevpilotPluginContext } from "./index-BE1u_wvJ.mjs";
|
|
2
|
+
export { DevpilotPluginContext, McpToolRegister as McpServerRegister, McpToolResolved, defineMcpToolRegister, resolveClientModule, resolveModule };
|
package/dist/plugin.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as
|
|
1
|
+
import { n as resolveModule, r as defineMcpToolRegister, t as resolveClientModule } from "./plugin-4eB8Zx4B.mjs";
|
|
2
2
|
|
|
3
3
|
export { defineMcpToolRegister, resolveClientModule, resolveModule };
|
package/dist/rspack.d.mts
CHANGED
package/dist/rspack.mjs
CHANGED