@vorim/sdk 3.7.6 → 3.8.0
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.cjs +43 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +43 -2
- package/dist/index.js.map +1 -1
- package/dist/integrations/anthropic.d.cts +1 -1
- package/dist/integrations/anthropic.d.ts +1 -1
- package/dist/integrations/crewai.d.cts +1 -1
- package/dist/integrations/crewai.d.ts +1 -1
- package/dist/integrations/langchain.d.cts +1 -1
- package/dist/integrations/langchain.d.ts +1 -1
- package/dist/integrations/langgraph.d.cts +1 -1
- package/dist/integrations/langgraph.d.ts +1 -1
- package/dist/integrations/llamaindex.d.cts +1 -1
- package/dist/integrations/llamaindex.d.ts +1 -1
- package/dist/integrations/openai.d.cts +1 -1
- package/dist/integrations/openai.d.ts +1 -1
- package/dist/integrations/siem.d.cts +1 -1
- package/dist/integrations/siem.d.ts +1 -1
- package/dist/integrations/stripe-acp.d.cts +1 -1
- package/dist/integrations/stripe-acp.d.ts +1 -1
- package/dist/integrations/ucp.d.cts +1 -1
- package/dist/integrations/ucp.d.ts +1 -1
- package/dist/integrations/vercel-ai.d.cts +1 -1
- package/dist/integrations/vercel-ai.d.ts +1 -1
- package/dist/{types-B22WnXEW.d.cts → types-Cb6V-boJ.d.cts} +55 -1
- package/dist/{types-B22WnXEW.d.ts → types-Cb6V-boJ.d.ts} +55 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VorimSDK, ReplayInputs } from '../index.cjs';
|
|
2
|
-
import { P as PermissionScope } from '../types-
|
|
2
|
+
import { P as PermissionScope } from '../types-Cb6V-boJ.cjs';
|
|
3
3
|
import { E as EscalationPolicy, T as TransportFailurePolicy } from '../_runtime-gate-DOJUKJBu.cjs';
|
|
4
4
|
|
|
5
5
|
interface VercelTool {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VorimSDK, ReplayInputs } from '../index.js';
|
|
2
|
-
import { P as PermissionScope } from '../types-
|
|
2
|
+
import { P as PermissionScope } from '../types-Cb6V-boJ.js';
|
|
3
3
|
import { E as EscalationPolicy, T as TransportFailurePolicy } from '../_runtime-gate-DOJUKJBu.js';
|
|
4
4
|
|
|
5
5
|
interface VercelTool {
|
|
@@ -203,6 +203,60 @@ interface BeforeActionInput {
|
|
|
203
203
|
* the server returns the original decision instead of creating a new one.
|
|
204
204
|
*/
|
|
205
205
|
idempotencyKey?: string;
|
|
206
|
+
/**
|
|
207
|
+
* Workflow this action belongs to (AI cost management). Groups actions so a
|
|
208
|
+
* per-workflow token budget can meter and enforce spend across the whole
|
|
209
|
+
* workflow, and so the dashboard can attribute cost to it. Any stable string.
|
|
210
|
+
*/
|
|
211
|
+
workflowId?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Token cost of this action (AI cost management). Used for the pre-action
|
|
214
|
+
* budget check — a `token_budget_gt` policy denies the action BEFORE the
|
|
215
|
+
* spend if it would push the agent or workflow over budget — and, on a
|
|
216
|
+
* non-deny verdict, added to the rolling and monthly token meters. Pass your
|
|
217
|
+
* estimate before the LLM call (e.g. prompt tokens + max_tokens).
|
|
218
|
+
*/
|
|
219
|
+
estimatedTokens?: number;
|
|
220
|
+
}
|
|
221
|
+
type BudgetScope = 'agent' | 'workflow';
|
|
222
|
+
type BudgetEnforcement = 'hard' | 'soft';
|
|
223
|
+
/** A configured rolling token budget for an agent or workflow. */
|
|
224
|
+
interface TokenBudget {
|
|
225
|
+
id: string;
|
|
226
|
+
scope: BudgetScope;
|
|
227
|
+
/** The agent id (scope='agent') or workflow id (scope='workflow') budgeted. */
|
|
228
|
+
scope_ref: string;
|
|
229
|
+
max_tokens: number;
|
|
230
|
+
window_seconds: number;
|
|
231
|
+
/** 'hard' denies the over-budget action; 'soft' allows but flags it. */
|
|
232
|
+
enforcement: BudgetEnforcement;
|
|
233
|
+
enabled: boolean;
|
|
234
|
+
created_at: string;
|
|
235
|
+
updated_at: string;
|
|
236
|
+
}
|
|
237
|
+
/** Input to create or update a token budget. */
|
|
238
|
+
interface TokenBudgetInput {
|
|
239
|
+
scope: BudgetScope;
|
|
240
|
+
scope_ref: string;
|
|
241
|
+
max_tokens: number;
|
|
242
|
+
window_seconds: number;
|
|
243
|
+
enforcement?: BudgetEnforcement;
|
|
244
|
+
enabled?: boolean;
|
|
245
|
+
}
|
|
246
|
+
/** Live spend and remaining allowance for one budget. */
|
|
247
|
+
interface BudgetSpend {
|
|
248
|
+
scope: BudgetScope;
|
|
249
|
+
scope_ref: string;
|
|
250
|
+
max_tokens: number;
|
|
251
|
+
window_seconds: number;
|
|
252
|
+
enforcement: BudgetEnforcement;
|
|
253
|
+
enabled: boolean;
|
|
254
|
+
/** Rolling spend in the current window. */
|
|
255
|
+
window_used: number;
|
|
256
|
+
/** Tokens left in the current window. */
|
|
257
|
+
window_remaining: number;
|
|
258
|
+
/** Durable total for the current calendar month. */
|
|
259
|
+
month_used: number;
|
|
206
260
|
}
|
|
207
261
|
/** A runtime decision, as returned by {@link VorimSDK.beforeAction}. */
|
|
208
262
|
interface RuntimeDecision {
|
|
@@ -231,4 +285,4 @@ interface RuntimeDecision {
|
|
|
231
285
|
escalationResolution: 'approved' | 'denied' | null;
|
|
232
286
|
}
|
|
233
287
|
|
|
234
|
-
export type { AgentRegistrationResult as A, BeforeActionInput as B, DelegationLinkClaims as D, PermissionScope as P, RuntimeDecision as R, TrustRecord as T, AuditEventInput as a, AgentRegistrationInput as b, Agent as c, PermissionCheckResult as d, AgentDelegationRecord as e,
|
|
288
|
+
export type { AgentRegistrationResult as A, BeforeActionInput as B, DelegationLinkClaims as D, PermissionScope as P, RuntimeDecision as R, TrustRecord as T, AuditEventInput as a, AgentRegistrationInput as b, Agent as c, PermissionCheckResult as d, AgentDelegationRecord as e, TokenBudgetInput as f, TokenBudget as g, BudgetSpend as h, AgentStatus as i, AuditEventType as j, AuditResult as k, BudgetEnforcement as l, BudgetScope as m, DecisionVerdict as n };
|
|
@@ -203,6 +203,60 @@ interface BeforeActionInput {
|
|
|
203
203
|
* the server returns the original decision instead of creating a new one.
|
|
204
204
|
*/
|
|
205
205
|
idempotencyKey?: string;
|
|
206
|
+
/**
|
|
207
|
+
* Workflow this action belongs to (AI cost management). Groups actions so a
|
|
208
|
+
* per-workflow token budget can meter and enforce spend across the whole
|
|
209
|
+
* workflow, and so the dashboard can attribute cost to it. Any stable string.
|
|
210
|
+
*/
|
|
211
|
+
workflowId?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Token cost of this action (AI cost management). Used for the pre-action
|
|
214
|
+
* budget check — a `token_budget_gt` policy denies the action BEFORE the
|
|
215
|
+
* spend if it would push the agent or workflow over budget — and, on a
|
|
216
|
+
* non-deny verdict, added to the rolling and monthly token meters. Pass your
|
|
217
|
+
* estimate before the LLM call (e.g. prompt tokens + max_tokens).
|
|
218
|
+
*/
|
|
219
|
+
estimatedTokens?: number;
|
|
220
|
+
}
|
|
221
|
+
type BudgetScope = 'agent' | 'workflow';
|
|
222
|
+
type BudgetEnforcement = 'hard' | 'soft';
|
|
223
|
+
/** A configured rolling token budget for an agent or workflow. */
|
|
224
|
+
interface TokenBudget {
|
|
225
|
+
id: string;
|
|
226
|
+
scope: BudgetScope;
|
|
227
|
+
/** The agent id (scope='agent') or workflow id (scope='workflow') budgeted. */
|
|
228
|
+
scope_ref: string;
|
|
229
|
+
max_tokens: number;
|
|
230
|
+
window_seconds: number;
|
|
231
|
+
/** 'hard' denies the over-budget action; 'soft' allows but flags it. */
|
|
232
|
+
enforcement: BudgetEnforcement;
|
|
233
|
+
enabled: boolean;
|
|
234
|
+
created_at: string;
|
|
235
|
+
updated_at: string;
|
|
236
|
+
}
|
|
237
|
+
/** Input to create or update a token budget. */
|
|
238
|
+
interface TokenBudgetInput {
|
|
239
|
+
scope: BudgetScope;
|
|
240
|
+
scope_ref: string;
|
|
241
|
+
max_tokens: number;
|
|
242
|
+
window_seconds: number;
|
|
243
|
+
enforcement?: BudgetEnforcement;
|
|
244
|
+
enabled?: boolean;
|
|
245
|
+
}
|
|
246
|
+
/** Live spend and remaining allowance for one budget. */
|
|
247
|
+
interface BudgetSpend {
|
|
248
|
+
scope: BudgetScope;
|
|
249
|
+
scope_ref: string;
|
|
250
|
+
max_tokens: number;
|
|
251
|
+
window_seconds: number;
|
|
252
|
+
enforcement: BudgetEnforcement;
|
|
253
|
+
enabled: boolean;
|
|
254
|
+
/** Rolling spend in the current window. */
|
|
255
|
+
window_used: number;
|
|
256
|
+
/** Tokens left in the current window. */
|
|
257
|
+
window_remaining: number;
|
|
258
|
+
/** Durable total for the current calendar month. */
|
|
259
|
+
month_used: number;
|
|
206
260
|
}
|
|
207
261
|
/** A runtime decision, as returned by {@link VorimSDK.beforeAction}. */
|
|
208
262
|
interface RuntimeDecision {
|
|
@@ -231,4 +285,4 @@ interface RuntimeDecision {
|
|
|
231
285
|
escalationResolution: 'approved' | 'denied' | null;
|
|
232
286
|
}
|
|
233
287
|
|
|
234
|
-
export type { AgentRegistrationResult as A, BeforeActionInput as B, DelegationLinkClaims as D, PermissionScope as P, RuntimeDecision as R, TrustRecord as T, AuditEventInput as a, AgentRegistrationInput as b, Agent as c, PermissionCheckResult as d, AgentDelegationRecord as e,
|
|
288
|
+
export type { AgentRegistrationResult as A, BeforeActionInput as B, DelegationLinkClaims as D, PermissionScope as P, RuntimeDecision as R, TrustRecord as T, AuditEventInput as a, AgentRegistrationInput as b, Agent as c, PermissionCheckResult as d, AgentDelegationRecord as e, TokenBudgetInput as f, TokenBudget as g, BudgetSpend as h, AgentStatus as i, AuditEventType as j, AuditResult as k, BudgetEnforcement as l, BudgetScope as m, DecisionVerdict as n };
|