@engineer-ai/plugin 1.1.56 → 1.2.2

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +34 -2
  2. package/package.json +7 -7
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Event, createOpencodeClient, Project, Model, Provider, Permission, UserMessage, Message, Part, Auth, Config } from "@opencode-ai/sdk";
1
+ import type { Event, createOpencodeClient, Project, Model, Provider, Permission, UserMessage, Message, Part, Auth, Config } from "@engineer-ai/sdk";
2
2
  import type { BunShell } from "./shell";
3
3
  import { type ToolDefinition } from "./tool";
4
4
  export * from "./tool";
@@ -180,6 +180,8 @@ export interface Hooks {
180
180
  tool: string;
181
181
  sessionID: string;
182
182
  callID: string;
183
+ args?: any;
184
+ userPrompt?: string;
183
185
  }, output: {
184
186
  title: string;
185
187
  output: string;
@@ -191,12 +193,26 @@ export interface Hooks {
191
193
  parts: Part[];
192
194
  }[];
193
195
  }) => Promise<void>;
194
- "experimental.chat.system.transform"?: (input: {
196
+ "chat.system.prompt.transform"?: (input: {
195
197
  sessionID?: string;
196
198
  model: Model;
199
+ parentSessionId?: string;
200
+ agent?: string;
197
201
  }, output: {
198
202
  system: string[];
199
203
  }) => Promise<void>;
204
+ /**
205
+ * Called when user submits a prompt, before it's sent to the model.
206
+ * Allows plugins to inject additional context based on the user's prompt.
207
+ * Similar to claude-mem's UserPromptSubmit hook for semantic context injection.
208
+ */
209
+ "chat.user.prompt.transform"?: (input: {
210
+ sessionID?: string;
211
+ model: Model;
212
+ userContent?: string;
213
+ }, output: {
214
+ additionalContext?: string;
215
+ }) => Promise<void>;
200
216
  /**
201
217
  * Called before session compaction starts. Allows plugins to customize
202
218
  * the compaction prompt.
@@ -228,4 +244,20 @@ export interface Hooks {
228
244
  }, output: {
229
245
  success: boolean;
230
246
  }) => Promise<void>;
247
+ /**
248
+ * Called when a file is changed (edited or written)
249
+ */
250
+ "chat.file.changed"?: (input: {
251
+ filepath: string;
252
+ diff: string;
253
+ sessionID: string;
254
+ /** The most recent user message ID that this file change belongs to */
255
+ messageId: string;
256
+ title: string;
257
+ userId: string;
258
+ username: string;
259
+ /** Remote git repository URL, or workspace directory if no git remote */
260
+ directory: string;
261
+ accessToken: string;
262
+ }, output: {}) => Promise<void>;
231
263
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@engineer-ai/plugin",
4
- "version": "1.1.56",
4
+ "version": "1.2.2",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
@@ -16,13 +16,13 @@
16
16
  "dist"
17
17
  ],
18
18
  "dependencies": {
19
- "@opencode-ai/sdk": "workspace:*",
20
- "zod": "catalog:"
19
+ "@engineer-ai/sdk": "1.2.2",
20
+ "zod": "4.1.8"
21
21
  },
22
22
  "devDependencies": {
23
- "@tsconfig/node22": "catalog:",
24
- "@types/node": "catalog:",
25
- "typescript": "catalog:",
26
- "@typescript/native-preview": "catalog:"
23
+ "@tsconfig/node22": "22.0.2",
24
+ "@types/node": "22.13.9",
25
+ "typescript": "5.8.2",
26
+ "@typescript/native-preview": "7.0.0-dev.20251207.1"
27
27
  }
28
28
  }