@nikcli-ai/plugin 1.204.0 → 1.218.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 CHANGED
@@ -195,6 +195,26 @@ export interface Hooks {
195
195
  }, output: {
196
196
  env: Record<string, string>;
197
197
  }) => Promise<void>;
198
+ /**
199
+ * Modify a shell invocation before it is created.
200
+ *
201
+ * Runs before the permission check, and the permission check is performed against the *final*
202
+ * values written here — so a hook that rewrites the command cannot smuggle past an approval
203
+ * granted for the original one.
204
+ *
205
+ * `output.shell` is the shell binary to run the command with; leaving it `undefined` keeps
206
+ * nikcli's own shell selection. `output.env` is merged over the inherited process environment.
207
+ */
208
+ "shell.create.before"?: (input: {
209
+ sessionID: string;
210
+ command: string;
211
+ }, output: {
212
+ command: string;
213
+ cwd: string;
214
+ timeout: number;
215
+ shell?: string;
216
+ env: Record<string, string>;
217
+ }) => Promise<void>;
198
218
  "command.execute.before"?: (input: {
199
219
  command: string;
200
220
  sessionID: string;
package/dist/tool.d.ts CHANGED
@@ -57,7 +57,7 @@ export declare function tool<Args extends z.ZodRawShape>(input: {
57
57
  execute(args: z.infer<z.ZodObject<Args>>, context: ToolContext): Promise<ToolResult>;
58
58
  };
59
59
  export declare namespace tool {
60
- var schema: typeof z;
60
+ export { z as schema };
61
61
  }
62
62
  export type ToolDefinition = ReturnType<typeof tool>;
63
63
  export {};
package/dist/tui.d.ts CHANGED
@@ -89,6 +89,36 @@ export type TuiDialogProps = {
89
89
  onClose: () => void;
90
90
  children?: JSX.Element;
91
91
  };
92
+ /** One open session tab, as reported to plugins. */
93
+ export type TuiTab = {
94
+ sessionID: string;
95
+ title: string;
96
+ /** The tab currently shown. */
97
+ active: boolean;
98
+ /** A turn is running in this tab. */
99
+ busy: boolean;
100
+ /** Blocked on the user: a permission request or a question is waiting. */
101
+ attention: boolean;
102
+ /** Finished work this tab has not been looked at since. */
103
+ unread: boolean;
104
+ };
105
+ /**
106
+ * Observe and control the session tab strip.
107
+ *
108
+ * Tabs are otherwise internal to the TUI: a plugin could render into slots and navigate routes but
109
+ * had no way to know which sessions are open, which one is focused, or to open and close them.
110
+ */
111
+ export type TuiTabsApi = {
112
+ /** Whether the tab strip is available in this TUI. */
113
+ enabled: () => boolean;
114
+ list: () => ReadonlyArray<TuiTab>;
115
+ /** Open a tab for any session, or focus it when already open. */
116
+ open: (sessionID: string) => void;
117
+ /** Focus an already-open tab. Returns false when that session has no tab. */
118
+ focus: (sessionID: string) => boolean;
119
+ /** Close a tab. Returns false when that session has no tab. */
120
+ close: (sessionID: string) => boolean;
121
+ };
92
122
  export type TuiDialogStack = {
93
123
  replace: (render: () => JSX.Element, onClose?: () => void) => void;
94
124
  clear: () => void;
@@ -375,6 +405,7 @@ export type TuiPluginApi = {
375
405
  DialogSelect: <Value = unknown>(props: TuiDialogSelectProps<Value>) => JSX.Element;
376
406
  toast: (input: TuiToast) => void;
377
407
  dialog: TuiDialogStack;
408
+ tabs: TuiTabsApi;
378
409
  };
379
410
  keybind: {
380
411
  match: (key: string, evt: ParsedKey) => boolean;
@@ -35,7 +35,7 @@ export declare function tool<Args extends z.ZodRawShape>(input: {
35
35
  execute(args: z.core.$InferObjectOutput<Args, {}>, context: ToolContext): Promise<ToolResult>;
36
36
  };
37
37
  export declare namespace tool {
38
- var schema: typeof z;
38
+ export { z as schema };
39
39
  }
40
40
  export declare const make: typeof tool;
41
41
  export type ToolDefinition = ReturnType<typeof tool>;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@nikcli-ai/plugin",
4
- "version": "1.204.0",
4
+ "version": "1.218.0",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
- "typecheck": "tsgo --noEmit",
8
+ "typecheck": "tsc --noEmit",
9
9
  "build": "tsc",
10
10
  "build:plugins": "bun run script/build-plugins.ts",
11
11
  "publish:plugins": "bun run script/publish-plugins.ts"
@@ -65,7 +65,7 @@
65
65
  }
66
66
  },
67
67
  "dependencies": {
68
- "@nikcli-ai/sdk": "1.204.0",
68
+ "@nikcli-ai/sdk": "1.218.0",
69
69
  "@opentui/core": "0.1.91",
70
70
  "@opentui/solid": "0.1.91",
71
71
  "effect": "4.0.0-beta.83",
@@ -75,6 +75,6 @@
75
75
  "@tsconfig/node22": "22.0.2",
76
76
  "@types/node": "22.13.9",
77
77
  "typescript": "5.8.2",
78
- "@typescript/native-preview": "7.0.0-dev.20260707.2"
78
+ "@typescript/native": "npm:typescript@7.0.2"
79
79
  }
80
80
  }