@synsci/plugin 2.0.96 → 2.0.97

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 +43 -0
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -221,4 +221,47 @@ export interface Hooks {
221
221
  }, output: {
222
222
  text: string;
223
223
  }) => Promise<void>;
224
+ /**
225
+ * Lines a plugin adds to every provider request for this session. `lines`
226
+ * go inside the `<env>` block of the system prompt and must be stable for
227
+ * the whole session (compute limits): the system prompt is the provider's
228
+ * cache prefix, and a line that changes between steps discards the cache
229
+ * for the entire context. Facts that change while the model works (time
230
+ * used, spend, study state, one-shot reminders) go in `status`, which is
231
+ * appended at the tail of the conversation for the current step only.
232
+ * Keep each line short.
233
+ */
234
+ "env.lines"?: (input: {
235
+ sessionID: string;
236
+ model: Model;
237
+ }, output: {
238
+ lines: string[];
239
+ status: string[];
240
+ }) => Promise<void>;
241
+ /**
242
+ * The model returned a final answer with no tool calls. A plugin may set
243
+ * `message` to inject it as a continuation and keep the loop running; the
244
+ * loop bounds how many times this can happen per turn.
245
+ */
246
+ "loop.before_finish"?: (input: {
247
+ sessionID: string;
248
+ messageID: string;
249
+ turn: string;
250
+ injections: number;
251
+ }, output: {
252
+ message?: string;
253
+ }) => Promise<void>;
254
+ /**
255
+ * A repetition guard tripped: repeated text, an output-limit stall, or the
256
+ * same tool failing repeatedly. A plugin may set `message` to redirect the
257
+ * model instead of stopping; without one the loop stops as it always did.
258
+ */
259
+ "loop.guard"?: (input: {
260
+ sessionID: string;
261
+ kind: "text_loop" | "output_stall" | "tool_errors" | "repeated_call";
262
+ tool?: string;
263
+ trips: number;
264
+ }, output: {
265
+ message?: string;
266
+ }) => Promise<void>;
224
267
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@synsci/plugin",
4
- "version": "2.0.96",
4
+ "version": "2.0.97",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "scripts": {
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@synsci/sdk": "2.0.96",
25
+ "@synsci/sdk": "2.0.97",
26
26
  "zod": "4.1.8"
27
27
  },
28
28
  "devDependencies": {