@100xprompt/plugin 0.1.72 → 0.1.74
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 +57 -20
- package/package.json +16 -10
package/dist/index.d.ts
CHANGED
|
@@ -8,30 +8,10 @@ export type ProviderContext = {
|
|
|
8
8
|
options: Record<string, any>;
|
|
9
9
|
};
|
|
10
10
|
export type PluginInput = {
|
|
11
|
-
/**
|
|
12
|
-
* Talk to 100xprompt through this. It reaches the API in-process, with no
|
|
13
|
-
* socket and no credential to arrange, whether or not one is listening.
|
|
14
|
-
*/
|
|
15
11
|
client: ReturnType<typeof create100XPromptClient>;
|
|
16
12
|
project: Project;
|
|
17
13
|
directory: string;
|
|
18
14
|
worktree: string;
|
|
19
|
-
/**
|
|
20
|
-
* The address of this 100xprompt's HTTP API — **only when one is actually
|
|
21
|
-
* bound**, which is the exception rather than the rule. A bare `100xprompt`,
|
|
22
|
-
* `run` and `acp` open no socket at all; a socket appears only for `serve`,
|
|
23
|
-
* `web`, `tui spawn`, or an explicit `--port`/`--hostname`/`--mdns`.
|
|
24
|
-
*
|
|
25
|
-
* With nothing bound this is the deliberately un-resolvable
|
|
26
|
-
* `http://100xprompt.internal`, so fetching it fails with a name-resolution
|
|
27
|
-
* error. That is intentional: the alternative is to invent a plausible
|
|
28
|
-
* address, which is what this used to do (`http://localhost:4096`) and which
|
|
29
|
-
* silently sent plugin traffic to whatever else was listening on that port.
|
|
30
|
-
*
|
|
31
|
-
* So: prefer `client`. Reach for `serverUrl` only to hand a *different
|
|
32
|
-
* process* an address, and check it against `http://100xprompt.internal`
|
|
33
|
-
* first — that value means "there is no address to hand out".
|
|
34
|
-
*/
|
|
35
15
|
serverUrl: URL;
|
|
36
16
|
$: BunShell;
|
|
37
17
|
};
|
|
@@ -209,6 +189,63 @@ export interface Hooks {
|
|
|
209
189
|
continue: boolean;
|
|
210
190
|
reason?: string;
|
|
211
191
|
}) => Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Called once per workspace before the first session's `session.created`,
|
|
194
|
+
* to provision the environment (install a toolchain, create a venv). The
|
|
195
|
+
* `trigger` distinguishes first-time provisioning from a later re-run and
|
|
196
|
+
* is what hook matchers match against.
|
|
197
|
+
*
|
|
198
|
+
* Anything pushed onto `output.context` is prepended to the session as
|
|
199
|
+
* additional context, the same way a `SessionStart` hook's is.
|
|
200
|
+
*/
|
|
201
|
+
"session.setup"?: (input: {
|
|
202
|
+
directory: string;
|
|
203
|
+
trigger: "init" | "maintenance";
|
|
204
|
+
}, output: {
|
|
205
|
+
context: string[];
|
|
206
|
+
}) => Promise<void>;
|
|
207
|
+
/**
|
|
208
|
+
* Called when a turn ends because the model call or the processor threw,
|
|
209
|
+
* rather than because the agent chose to stop. The counterpart to
|
|
210
|
+
* `session.stop`: exactly one of the two fires per turn. Observe-only —
|
|
211
|
+
* the turn is already over and there is nothing left to veto.
|
|
212
|
+
*/
|
|
213
|
+
"session.stop.failure"?: (input: {
|
|
214
|
+
sessionID: string;
|
|
215
|
+
agent: string;
|
|
216
|
+
error: string;
|
|
217
|
+
errorDetails?: string;
|
|
218
|
+
lastAssistantMessage?: string;
|
|
219
|
+
}, output: {}) => Promise<void>;
|
|
220
|
+
/**
|
|
221
|
+
* Called when an MCP server asks the user for structured input, before the
|
|
222
|
+
* question reaches the UI. A hook may answer on the user's behalf by
|
|
223
|
+
* setting `action` (and `content` when accepting), which short-circuits the
|
|
224
|
+
* prompt; leaving `action` unset passes the question through unchanged.
|
|
225
|
+
*/
|
|
226
|
+
"mcp.elicitation"?: (input: {
|
|
227
|
+
sessionID: string;
|
|
228
|
+
server: string;
|
|
229
|
+
message: string;
|
|
230
|
+
schema: Record<string, any>;
|
|
231
|
+
}, output: {
|
|
232
|
+
action?: "accept" | "decline" | "cancel";
|
|
233
|
+
content?: Record<string, any>;
|
|
234
|
+
}) => Promise<void>;
|
|
235
|
+
/**
|
|
236
|
+
* Called after an elicitation is answered — by the user or by an
|
|
237
|
+
* `mcp.elicitation` hook. A hook may still rewrite the answer here; this is
|
|
238
|
+
* the audit/override seam, and it fires for hook-supplied answers too.
|
|
239
|
+
*/
|
|
240
|
+
"mcp.elicitation.result"?: (input: {
|
|
241
|
+
sessionID: string;
|
|
242
|
+
server: string;
|
|
243
|
+
action: "accept" | "decline" | "cancel";
|
|
244
|
+
content?: Record<string, any>;
|
|
245
|
+
}, output: {
|
|
246
|
+
action?: "accept" | "decline" | "cancel";
|
|
247
|
+
content?: Record<string, any>;
|
|
248
|
+
}) => Promise<void>;
|
|
212
249
|
"experimental.chat.messages.transform"?: (input: {}, output: {
|
|
213
250
|
messages: {
|
|
214
251
|
info: Message;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@100xprompt/plugin",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.74",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"scripts": {
|
|
@@ -9,20 +9,26 @@
|
|
|
9
9
|
"build": "tsc"
|
|
10
10
|
},
|
|
11
11
|
"exports": {
|
|
12
|
-
".":
|
|
13
|
-
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts"
|
|
15
|
+
},
|
|
16
|
+
"./tool": {
|
|
17
|
+
"import": "./dist/tool.js",
|
|
18
|
+
"types": "./dist/tool.d.ts"
|
|
19
|
+
}
|
|
14
20
|
},
|
|
15
21
|
"files": [
|
|
16
22
|
"dist"
|
|
17
23
|
],
|
|
18
24
|
"dependencies": {
|
|
19
|
-
"@100xprompt/sdk": "
|
|
20
|
-
"zod": "
|
|
25
|
+
"@100xprompt/sdk": "0.1.74",
|
|
26
|
+
"zod": "4.1.8"
|
|
21
27
|
},
|
|
22
28
|
"devDependencies": {
|
|
23
|
-
"@tsconfig/node22": "
|
|
24
|
-
"@types/node": "
|
|
25
|
-
"typescript": "
|
|
26
|
-
"@typescript/native-preview": "
|
|
29
|
+
"@tsconfig/node22": "22.0.2",
|
|
30
|
+
"@types/node": "22.13.9",
|
|
31
|
+
"typescript": "5.8.2",
|
|
32
|
+
"@typescript/native-preview": "7.0.0-dev.20251207.1"
|
|
27
33
|
}
|
|
28
|
-
}
|
|
34
|
+
}
|