@nikcli-ai/plugin 0.0.8 → 1.7.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/dist/index.d.ts +13 -4
- package/dist/tui.d.ts +0 -6
- package/package.json +23 -10
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Event,
|
|
1
|
+
import type { Event, NikcliClient, Provider, PermissionRequest, UserMessage, Message, Part, Auth, Model, Config as SDKConfig } from "@nikcli-ai/sdk/v2";
|
|
2
2
|
import type { BunShell } from "./shell";
|
|
3
3
|
import { type ToolDefinition } from "./tool";
|
|
4
4
|
export * from "./tool";
|
|
@@ -12,8 +12,11 @@ export type ProviderContext = {
|
|
|
12
12
|
options: Record<string, any>;
|
|
13
13
|
};
|
|
14
14
|
export type PluginInput = {
|
|
15
|
-
client:
|
|
16
|
-
project:
|
|
15
|
+
client: NikcliClient;
|
|
16
|
+
project: {
|
|
17
|
+
id: string;
|
|
18
|
+
worktree: string;
|
|
19
|
+
};
|
|
17
20
|
directory: string;
|
|
18
21
|
worktree: string;
|
|
19
22
|
serverUrl: URL;
|
|
@@ -123,6 +126,12 @@ export interface Hooks {
|
|
|
123
126
|
[key: string]: ToolDefinition;
|
|
124
127
|
};
|
|
125
128
|
auth?: AuthHook;
|
|
129
|
+
provider?: {
|
|
130
|
+
id: string;
|
|
131
|
+
models(provider: Provider, ctx: {
|
|
132
|
+
auth?: Auth;
|
|
133
|
+
}): Promise<Record<string, Model>>;
|
|
134
|
+
};
|
|
126
135
|
/**
|
|
127
136
|
* Called when a new message is received
|
|
128
137
|
*/
|
|
@@ -154,7 +163,7 @@ export interface Hooks {
|
|
|
154
163
|
topK: number;
|
|
155
164
|
options: Record<string, any>;
|
|
156
165
|
}) => Promise<void>;
|
|
157
|
-
"permission.ask"?: (input:
|
|
166
|
+
"permission.ask"?: (input: PermissionRequest, output: {
|
|
158
167
|
status: "ask" | "deny" | "allow";
|
|
159
168
|
}) => Promise<void>;
|
|
160
169
|
"command.execute.before"?: (input: {
|
package/dist/tui.d.ts
CHANGED
|
@@ -305,10 +305,6 @@ export type TuiPluginInstallResult = {
|
|
|
305
305
|
message: string;
|
|
306
306
|
missing?: boolean;
|
|
307
307
|
};
|
|
308
|
-
export type TuiWorkspace = {
|
|
309
|
-
current: () => string | undefined;
|
|
310
|
-
set: (workspaceID?: string) => void;
|
|
311
|
-
};
|
|
312
308
|
export type TuiPluginApi = {
|
|
313
309
|
app: TuiApp;
|
|
314
310
|
command: {
|
|
@@ -339,8 +335,6 @@ export type TuiPluginApi = {
|
|
|
339
335
|
state: TuiState;
|
|
340
336
|
theme: TuiTheme;
|
|
341
337
|
client: NikcliClient;
|
|
342
|
-
scopedClient: (workspaceID?: string) => NikcliClient;
|
|
343
|
-
workspace: TuiWorkspace;
|
|
344
338
|
event: TuiEventBus;
|
|
345
339
|
renderer: CliRenderer;
|
|
346
340
|
slots: TuiSlots;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@nikcli-ai/plugin",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.7.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -12,25 +12,38 @@
|
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
14
14
|
".": {
|
|
15
|
-
"import": "./
|
|
16
|
-
"types": "./
|
|
15
|
+
"import": "./src/index.ts",
|
|
16
|
+
"types": "./src/index.ts"
|
|
17
17
|
},
|
|
18
18
|
"./tool": {
|
|
19
|
-
"import": "./
|
|
20
|
-
"types": "./
|
|
19
|
+
"import": "./src/tool.ts",
|
|
20
|
+
"types": "./src/tool.ts"
|
|
21
21
|
},
|
|
22
22
|
"./tui": {
|
|
23
|
-
"import": "./
|
|
24
|
-
"types": "./
|
|
23
|
+
"import": "./src/tui.ts",
|
|
24
|
+
"types": "./src/tui.ts"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"exports": {
|
|
32
|
+
".": "./dist/index.js",
|
|
33
|
+
"./tool": "./dist/tool.js",
|
|
34
|
+
"./tui": "./dist/tui.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
30
37
|
"dependencies": {
|
|
31
|
-
"@nikcli-ai/sdk": "
|
|
38
|
+
"@nikcli-ai/sdk": "1.7.0",
|
|
32
39
|
"@opentui/core": "0.1.91",
|
|
33
40
|
"@opentui/solid": "0.1.91",
|
|
34
|
-
"zod": "
|
|
41
|
+
"zod": "4.1.8"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@tsconfig/node22": "22.0.2",
|
|
45
|
+
"@types/node": "22.13.9",
|
|
46
|
+
"typescript": "5.8.2",
|
|
47
|
+
"@typescript/native-preview": "7.0.0-dev.20251207.1"
|
|
35
48
|
}
|
|
36
|
-
}
|
|
49
|
+
}
|