@engineer-ai/plugin 1.1.56 → 1.2.3
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 +34 -2
- package/package.json +18 -11
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 "@
|
|
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
|
-
"
|
|
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,28 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@engineer-ai/plugin",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.2.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"typecheck": "tsgo --noEmit",
|
|
9
|
-
"build": "tsc"
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"publish": "bun run ./script/publish.ts"
|
|
10
11
|
},
|
|
11
12
|
"exports": {
|
|
12
|
-
".":
|
|
13
|
-
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"./tool": {
|
|
18
|
+
"import": "./dist/tool.js",
|
|
19
|
+
"types": "./dist/tool.d.ts"
|
|
20
|
+
}
|
|
14
21
|
},
|
|
15
22
|
"files": [
|
|
16
23
|
"dist"
|
|
17
24
|
],
|
|
18
25
|
"dependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"zod": "
|
|
26
|
+
"@engineer-ai/sdk": "1.2.2",
|
|
27
|
+
"zod": "4.1.8"
|
|
21
28
|
},
|
|
22
29
|
"devDependencies": {
|
|
23
|
-
"@tsconfig/node22": "
|
|
24
|
-
"@types/node": "
|
|
25
|
-
"typescript": "
|
|
26
|
-
"@typescript/native-preview": "
|
|
30
|
+
"@tsconfig/node22": "22.0.2",
|
|
31
|
+
"@types/node": "22.13.9",
|
|
32
|
+
"typescript": "5.8.2",
|
|
33
|
+
"@typescript/native-preview": "7.0.0-dev.20251207.1"
|
|
27
34
|
}
|
|
28
|
-
}
|
|
35
|
+
}
|