@symbioticsec/plugin 0.5.9 → 0.6.1

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 +26 -0
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -40,6 +40,7 @@ export type ServerPluginModule = {
40
40
  tui?: never;
41
41
  };
42
42
  export type ProviderContext = {
43
+ id?: string;
43
44
  source: "env" | "config" | "custom" | "api";
44
45
  info: Provider;
45
46
  options: Record<string, any>;
@@ -304,6 +305,31 @@ export interface Hooks {
304
305
  }, output: {
305
306
  headers: Record<string, string>;
306
307
  }) => Promise<void>;
308
+ /**
309
+ * Called when a model completion finishes with token usage and cost data
310
+ */
311
+ "chat.complete"?: (input: {
312
+ sessionID: string;
313
+ messageID: string;
314
+ parentMessageID: string;
315
+ model: Model;
316
+ agent: string;
317
+ provider: ProviderContext;
318
+ finishReason: string;
319
+ }, output: {
320
+ tokens: {
321
+ total: number;
322
+ input: number;
323
+ output: number;
324
+ reasoning?: number;
325
+ cache?: {
326
+ read: number;
327
+ write: number;
328
+ };
329
+ };
330
+ cost: number;
331
+ metadata?: Record<string, any>;
332
+ }) => Promise<void>;
307
333
  "permission.ask"?: (input: Permission, output: {
308
334
  status: "ask" | "deny" | "allow";
309
335
  }) => Promise<void>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@symbioticsec/plugin",
4
- "version": "0.5.9",
4
+ "version": "0.6.1",
5
5
  "type": "module",
6
6
  "license": "© Symbiotic Security. All rights reserved. Use is subject to the Legal Agreements outlined here: https://docs.google.com/document/d/1jwTKCmTBKdtXkIDFWgfw4T00govAv5tLOPoO96pDFLU",
7
7
  "scripts": {
@@ -42,7 +42,7 @@
42
42
  "dist"
43
43
  ],
44
44
  "dependencies": {
45
- "@symbioticsec/sdk": "0.5.9",
45
+ "@symbioticsec/sdk": "0.6.1",
46
46
  "zod": "4.1.8"
47
47
  },
48
48
  "devDependencies": {