@nikcli-ai/plugin 1.61.0 → 1.78.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 -0
- package/dist/tui.d.ts +35 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -182,6 +182,19 @@ export interface Hooks {
|
|
|
182
182
|
"permission.ask"?: (input: PermissionRequest, output: {
|
|
183
183
|
status: "ask" | "deny" | "allow";
|
|
184
184
|
}) => Promise<void>;
|
|
185
|
+
/**
|
|
186
|
+
* Augment the environment variables applied when a PTY/shell is created.
|
|
187
|
+
*
|
|
188
|
+
* The server merges values written to `output.env` over the caller-provided
|
|
189
|
+
* environment, before re-applying forced terminal invariants (such as `TERM`
|
|
190
|
+
* and `NIKCLI_TERMINAL`). `input.cwd` is the resolved working directory the
|
|
191
|
+
* PTY will spawn in.
|
|
192
|
+
*/
|
|
193
|
+
"shell.env"?: (input: {
|
|
194
|
+
cwd: string;
|
|
195
|
+
}, output: {
|
|
196
|
+
env: Record<string, string>;
|
|
197
|
+
}) => Promise<void>;
|
|
185
198
|
"command.execute.before"?: (input: {
|
|
186
199
|
command: string;
|
|
187
200
|
sessionID: string;
|
package/dist/tui.d.ts
CHANGED
|
@@ -36,6 +36,38 @@ export type TuiCommand = {
|
|
|
36
36
|
};
|
|
37
37
|
onSelect?: () => void;
|
|
38
38
|
};
|
|
39
|
+
export type TuiKeymapCommand = {
|
|
40
|
+
/** Unique command id, e.g. "plugin.command". Dispatchable via keymap.dispatchCommand. */
|
|
41
|
+
name: string;
|
|
42
|
+
title: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
/** Command palette category. */
|
|
45
|
+
namespace?: string;
|
|
46
|
+
/** Registers the command as /<slashName>. */
|
|
47
|
+
slashName?: string;
|
|
48
|
+
slashAliases?: string[];
|
|
49
|
+
suggested?: boolean;
|
|
50
|
+
hidden?: boolean;
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
run: () => void;
|
|
53
|
+
};
|
|
54
|
+
export type TuiKeymapBinding = {
|
|
55
|
+
/** Key syntax, including layered sequences like "<leader>x". */
|
|
56
|
+
key: string;
|
|
57
|
+
/** Command name to dispatch, or an inline handler. */
|
|
58
|
+
cmd: string | (() => void);
|
|
59
|
+
description?: string;
|
|
60
|
+
};
|
|
61
|
+
export type TuiKeymapLayer = {
|
|
62
|
+
commands?: TuiKeymapCommand[];
|
|
63
|
+
bindings?: TuiKeymapBinding[];
|
|
64
|
+
};
|
|
65
|
+
export type TuiKeymapApi = {
|
|
66
|
+
/** Registers commands and key bindings as one disposable layer. Returns unregister. */
|
|
67
|
+
registerLayer: (layer: TuiKeymapLayer) => () => void;
|
|
68
|
+
/** Runs a command by name. "command.palette.show" opens the host command palette. */
|
|
69
|
+
dispatchCommand: (name: string) => void;
|
|
70
|
+
};
|
|
39
71
|
export type TuiKeybind = {
|
|
40
72
|
name: string;
|
|
41
73
|
ctrl: boolean;
|
|
@@ -307,10 +339,13 @@ export type TuiPluginInstallResult = {
|
|
|
307
339
|
};
|
|
308
340
|
export type TuiPluginApi = {
|
|
309
341
|
app: TuiApp;
|
|
342
|
+
/** @deprecated Use `keymap.registerLayer` / `keymap.dispatchCommand` instead. */
|
|
310
343
|
command: {
|
|
311
344
|
register: (cb: () => TuiCommand[]) => () => void;
|
|
312
345
|
trigger: (value: string) => void;
|
|
346
|
+
show: () => void;
|
|
313
347
|
};
|
|
348
|
+
keymap: TuiKeymapApi;
|
|
314
349
|
route: {
|
|
315
350
|
register: (routes: TuiRouteDefinition[]) => () => void;
|
|
316
351
|
navigate: (name: string, params?: Record<string, unknown>) => void;
|
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": "1.
|
|
4
|
+
"version": "1.78.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@nikcli-ai/sdk": "1.
|
|
38
|
+
"@nikcli-ai/sdk": "1.78.0",
|
|
39
39
|
"@opentui/core": "0.1.91",
|
|
40
40
|
"@opentui/solid": "0.1.91",
|
|
41
41
|
"zod": "4.1.8"
|