@vienna-os/sdk 0.1.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/README.md +302 -0
- package/dist/index.d.mts +954 -0
- package/dist/index.d.ts +954 -0
- package/dist/index.js +868 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +824 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +56 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,954 @@
|
|
|
1
|
+
/** Configuration options for the ViennaClient. */
|
|
2
|
+
interface ViennaConfig {
|
|
3
|
+
/** API key for authentication (starts with `vna_`). */
|
|
4
|
+
apiKey: string;
|
|
5
|
+
/** Base URL of the Vienna OS API. Defaults to `https://vienna-os.fly.dev`. */
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
/** Request timeout in milliseconds. Defaults to `30000`. */
|
|
8
|
+
timeout?: number;
|
|
9
|
+
/** Number of automatic retries on 429/5xx errors. Defaults to `3`. */
|
|
10
|
+
retries?: number;
|
|
11
|
+
/** Global error handler invoked on every request failure. */
|
|
12
|
+
onError?: (error: Error) => void;
|
|
13
|
+
}
|
|
14
|
+
/** Standard Vienna API response envelope. */
|
|
15
|
+
interface ApiResponse<T = unknown> {
|
|
16
|
+
success: boolean;
|
|
17
|
+
data?: T;
|
|
18
|
+
error?: string;
|
|
19
|
+
code?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Common pagination parameters. */
|
|
22
|
+
interface PaginationParams {
|
|
23
|
+
limit?: number;
|
|
24
|
+
offset?: number;
|
|
25
|
+
}
|
|
26
|
+
/** Paginated list wrapper. */
|
|
27
|
+
interface PaginatedList<T> {
|
|
28
|
+
items: T[];
|
|
29
|
+
total: number;
|
|
30
|
+
limit: number;
|
|
31
|
+
offset: number;
|
|
32
|
+
}
|
|
33
|
+
/** Per-request options that can override client defaults. */
|
|
34
|
+
interface RequestOptions {
|
|
35
|
+
/** AbortSignal for request cancellation. */
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
/** Override timeout for this request. */
|
|
38
|
+
timeout?: number;
|
|
39
|
+
}
|
|
40
|
+
/** Known action types (extensible via string). */
|
|
41
|
+
type ActionType = 'wire_transfer' | 'deploy' | 'data_access' | 'email_send' | 'api_call' | 'file_write' | 'config_change' | (string & {});
|
|
42
|
+
/** Risk tier classification. */
|
|
43
|
+
type RiskTier = 'T0' | 'T1' | 'T2' | 'T3';
|
|
44
|
+
/** Intent execution status. */
|
|
45
|
+
type IntentStatus = 'executed' | 'pending_approval' | 'denied' | 'cancelled' | 'expired';
|
|
46
|
+
/** Request body for submitting an intent. */
|
|
47
|
+
interface IntentRequest {
|
|
48
|
+
/** The action the agent wants to perform. */
|
|
49
|
+
action: ActionType;
|
|
50
|
+
/** Identifier of the agent submitting the intent. */
|
|
51
|
+
source: string;
|
|
52
|
+
/** Tenant/environment scope. */
|
|
53
|
+
tenantId?: string;
|
|
54
|
+
/** Arbitrary payload describing the action details. */
|
|
55
|
+
payload: Record<string, unknown>;
|
|
56
|
+
/** Optional metadata tags. */
|
|
57
|
+
metadata?: Record<string, string>;
|
|
58
|
+
}
|
|
59
|
+
/** Result of an intent submission. */
|
|
60
|
+
interface IntentResult {
|
|
61
|
+
intentId: string;
|
|
62
|
+
status: IntentStatus;
|
|
63
|
+
executionId?: string;
|
|
64
|
+
warrantId?: string;
|
|
65
|
+
riskTier: RiskTier;
|
|
66
|
+
policyMatches: PolicyMatch[];
|
|
67
|
+
auditId: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
}
|
|
70
|
+
/** A policy that matched during intent evaluation. */
|
|
71
|
+
interface PolicyMatch {
|
|
72
|
+
policyId: string;
|
|
73
|
+
policyName: string;
|
|
74
|
+
action: string;
|
|
75
|
+
tier?: RiskTier;
|
|
76
|
+
}
|
|
77
|
+
/** Full intent status response. */
|
|
78
|
+
interface IntentStatusResponse {
|
|
79
|
+
intentId: string;
|
|
80
|
+
status: IntentStatus;
|
|
81
|
+
riskTier: RiskTier;
|
|
82
|
+
action: string;
|
|
83
|
+
source: string;
|
|
84
|
+
payload: Record<string, unknown>;
|
|
85
|
+
policyMatches: PolicyMatch[];
|
|
86
|
+
approvalId?: string;
|
|
87
|
+
executionId?: string;
|
|
88
|
+
warrantId?: string;
|
|
89
|
+
auditId: string;
|
|
90
|
+
createdAt: string;
|
|
91
|
+
updatedAt: string;
|
|
92
|
+
}
|
|
93
|
+
/** Result of a simulated (dry-run) intent. */
|
|
94
|
+
interface IntentSimulationResult {
|
|
95
|
+
wouldExecute: boolean;
|
|
96
|
+
status: IntentStatus;
|
|
97
|
+
riskTier: RiskTier;
|
|
98
|
+
policyMatches: PolicyMatch[];
|
|
99
|
+
requiredApprovals: string[];
|
|
100
|
+
}
|
|
101
|
+
/** Condition operators for policy rules. */
|
|
102
|
+
type ConditionOperator = 'equals' | 'not_equals' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'not_contains' | 'in' | 'not_in' | 'regex';
|
|
103
|
+
/** A single condition within a policy rule. */
|
|
104
|
+
interface PolicyCondition {
|
|
105
|
+
field: string;
|
|
106
|
+
operator: ConditionOperator;
|
|
107
|
+
value: unknown;
|
|
108
|
+
}
|
|
109
|
+
/** Action taken when a policy matches. */
|
|
110
|
+
type PolicyAction = 'allow' | 'deny' | 'require_approval' | 'log' | 'notify' | (string & {});
|
|
111
|
+
/** A governance policy rule. */
|
|
112
|
+
interface PolicyRule {
|
|
113
|
+
id: string;
|
|
114
|
+
name: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
conditions: PolicyCondition[];
|
|
117
|
+
actionOnMatch: PolicyAction;
|
|
118
|
+
approvalTier?: RiskTier;
|
|
119
|
+
priority: number;
|
|
120
|
+
enabled: boolean;
|
|
121
|
+
tenantId?: string;
|
|
122
|
+
tags?: string[];
|
|
123
|
+
createdAt: string;
|
|
124
|
+
updatedAt: string;
|
|
125
|
+
}
|
|
126
|
+
/** Parameters for creating a new policy. */
|
|
127
|
+
interface PolicyCreateParams {
|
|
128
|
+
name: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
conditions: PolicyCondition[];
|
|
131
|
+
actionOnMatch: PolicyAction;
|
|
132
|
+
approvalTier?: RiskTier;
|
|
133
|
+
priority: number;
|
|
134
|
+
enabled?: boolean;
|
|
135
|
+
tenantId?: string;
|
|
136
|
+
tags?: string[];
|
|
137
|
+
}
|
|
138
|
+
/** Parameters for updating an existing policy. */
|
|
139
|
+
interface PolicyUpdateParams {
|
|
140
|
+
name?: string;
|
|
141
|
+
description?: string;
|
|
142
|
+
conditions?: PolicyCondition[];
|
|
143
|
+
actionOnMatch?: PolicyAction;
|
|
144
|
+
approvalTier?: RiskTier;
|
|
145
|
+
priority?: number;
|
|
146
|
+
enabled?: boolean;
|
|
147
|
+
tags?: string[];
|
|
148
|
+
}
|
|
149
|
+
/** Filter parameters for listing policies. */
|
|
150
|
+
interface PolicyListParams {
|
|
151
|
+
enabled?: boolean;
|
|
152
|
+
tenantId?: string;
|
|
153
|
+
tag?: string;
|
|
154
|
+
}
|
|
155
|
+
/** Result of evaluating policies against a test payload. */
|
|
156
|
+
interface PolicyEvaluation {
|
|
157
|
+
matchedPolicies: PolicyMatch[];
|
|
158
|
+
finalAction: PolicyAction;
|
|
159
|
+
riskTier: RiskTier;
|
|
160
|
+
details: string[];
|
|
161
|
+
}
|
|
162
|
+
/** An industry policy template. */
|
|
163
|
+
interface PolicyTemplate {
|
|
164
|
+
id: string;
|
|
165
|
+
name: string;
|
|
166
|
+
description: string;
|
|
167
|
+
industry: string;
|
|
168
|
+
conditions: PolicyCondition[];
|
|
169
|
+
actionOnMatch: PolicyAction;
|
|
170
|
+
approvalTier?: RiskTier;
|
|
171
|
+
}
|
|
172
|
+
/** Agent status within the fleet. */
|
|
173
|
+
type AgentStatus = 'active' | 'suspended' | 'inactive' | 'probation';
|
|
174
|
+
/** An agent registered in the fleet. */
|
|
175
|
+
interface FleetAgent {
|
|
176
|
+
id: string;
|
|
177
|
+
name: string;
|
|
178
|
+
description?: string;
|
|
179
|
+
status: AgentStatus;
|
|
180
|
+
trustScore: number;
|
|
181
|
+
riskTier: RiskTier;
|
|
182
|
+
tenantId?: string;
|
|
183
|
+
lastActivityAt?: string;
|
|
184
|
+
totalIntents: number;
|
|
185
|
+
deniedIntents: number;
|
|
186
|
+
tags?: string[];
|
|
187
|
+
createdAt: string;
|
|
188
|
+
updatedAt: string;
|
|
189
|
+
}
|
|
190
|
+
/** Metrics for a specific agent. */
|
|
191
|
+
interface AgentMetrics {
|
|
192
|
+
agentId: string;
|
|
193
|
+
totalIntents: number;
|
|
194
|
+
approvedIntents: number;
|
|
195
|
+
deniedIntents: number;
|
|
196
|
+
pendingIntents: number;
|
|
197
|
+
avgResponseTimeMs: number;
|
|
198
|
+
trustScore: number;
|
|
199
|
+
riskTier: RiskTier;
|
|
200
|
+
periodStart: string;
|
|
201
|
+
periodEnd: string;
|
|
202
|
+
}
|
|
203
|
+
/** A single agent activity log entry. */
|
|
204
|
+
interface AgentActivity {
|
|
205
|
+
id: string;
|
|
206
|
+
agentId: string;
|
|
207
|
+
action: string;
|
|
208
|
+
status: IntentStatus;
|
|
209
|
+
riskTier: RiskTier;
|
|
210
|
+
timestamp: string;
|
|
211
|
+
details?: Record<string, unknown>;
|
|
212
|
+
}
|
|
213
|
+
/** Alert severity levels. */
|
|
214
|
+
type AlertSeverity = 'low' | 'medium' | 'high' | 'critical';
|
|
215
|
+
/** A fleet-wide alert. */
|
|
216
|
+
interface FleetAlert {
|
|
217
|
+
id: string;
|
|
218
|
+
agentId: string;
|
|
219
|
+
severity: AlertSeverity;
|
|
220
|
+
type: string;
|
|
221
|
+
message: string;
|
|
222
|
+
resolved: boolean;
|
|
223
|
+
resolvedBy?: string;
|
|
224
|
+
resolvedAt?: string;
|
|
225
|
+
createdAt: string;
|
|
226
|
+
}
|
|
227
|
+
/** Filter parameters for listing fleet alerts. */
|
|
228
|
+
interface FleetAlertParams {
|
|
229
|
+
resolved?: boolean;
|
|
230
|
+
severity?: AlertSeverity;
|
|
231
|
+
agentId?: string;
|
|
232
|
+
}
|
|
233
|
+
/** Approval status. */
|
|
234
|
+
type ApprovalStatus = 'pending' | 'approved' | 'denied' | 'expired';
|
|
235
|
+
/** An approval request. */
|
|
236
|
+
interface Approval {
|
|
237
|
+
id: string;
|
|
238
|
+
intentId: string;
|
|
239
|
+
action: string;
|
|
240
|
+
source: string;
|
|
241
|
+
riskTier: RiskTier;
|
|
242
|
+
status: ApprovalStatus;
|
|
243
|
+
payload: Record<string, unknown>;
|
|
244
|
+
operator?: string;
|
|
245
|
+
notes?: string;
|
|
246
|
+
reason?: string;
|
|
247
|
+
createdAt: string;
|
|
248
|
+
updatedAt: string;
|
|
249
|
+
expiresAt?: string;
|
|
250
|
+
}
|
|
251
|
+
/** Filter parameters for listing approvals. */
|
|
252
|
+
interface ApprovalListParams {
|
|
253
|
+
status?: ApprovalStatus;
|
|
254
|
+
source?: string;
|
|
255
|
+
riskTier?: RiskTier;
|
|
256
|
+
}
|
|
257
|
+
/** Parameters for approving a request. */
|
|
258
|
+
interface ApproveParams {
|
|
259
|
+
operator: string;
|
|
260
|
+
notes?: string;
|
|
261
|
+
}
|
|
262
|
+
/** Parameters for denying a request. */
|
|
263
|
+
interface DenyParams {
|
|
264
|
+
operator: string;
|
|
265
|
+
reason: string;
|
|
266
|
+
}
|
|
267
|
+
/** Supported integration types. */
|
|
268
|
+
type IntegrationType = 'slack' | 'webhook' | 'pagerduty' | 'email' | 'teams' | (string & {});
|
|
269
|
+
/** An external integration. */
|
|
270
|
+
interface Integration {
|
|
271
|
+
id: string;
|
|
272
|
+
type: IntegrationType;
|
|
273
|
+
name: string;
|
|
274
|
+
config: Record<string, unknown>;
|
|
275
|
+
eventTypes: string[];
|
|
276
|
+
enabled: boolean;
|
|
277
|
+
lastTestedAt?: string;
|
|
278
|
+
createdAt: string;
|
|
279
|
+
updatedAt: string;
|
|
280
|
+
}
|
|
281
|
+
/** Parameters for creating an integration. */
|
|
282
|
+
interface IntegrationCreateParams {
|
|
283
|
+
type: IntegrationType;
|
|
284
|
+
name: string;
|
|
285
|
+
config: Record<string, unknown>;
|
|
286
|
+
eventTypes: string[];
|
|
287
|
+
}
|
|
288
|
+
/** Result of testing an integration. */
|
|
289
|
+
interface IntegrationTestResult {
|
|
290
|
+
success: boolean;
|
|
291
|
+
latencyMs: number;
|
|
292
|
+
error?: string;
|
|
293
|
+
}
|
|
294
|
+
/** Compliance report types. */
|
|
295
|
+
type ComplianceReportType = 'quarterly' | 'annual' | 'monthly' | 'custom';
|
|
296
|
+
/** Report generation status. */
|
|
297
|
+
type ReportStatus = 'generating' | 'ready' | 'failed';
|
|
298
|
+
/** A compliance report. */
|
|
299
|
+
interface ComplianceReport {
|
|
300
|
+
id: string;
|
|
301
|
+
type: ComplianceReportType;
|
|
302
|
+
status: ReportStatus;
|
|
303
|
+
periodStart: string;
|
|
304
|
+
periodEnd: string;
|
|
305
|
+
summary?: ComplianceSummary;
|
|
306
|
+
downloadUrl?: string;
|
|
307
|
+
createdAt: string;
|
|
308
|
+
}
|
|
309
|
+
/** High-level compliance statistics. */
|
|
310
|
+
interface ComplianceSummary {
|
|
311
|
+
totalIntents: number;
|
|
312
|
+
approvedIntents: number;
|
|
313
|
+
deniedIntents: number;
|
|
314
|
+
pendingApprovals: number;
|
|
315
|
+
policyViolations: number;
|
|
316
|
+
avgResponseTimeMs: number;
|
|
317
|
+
complianceScore: number;
|
|
318
|
+
topViolatingAgents: Array<{
|
|
319
|
+
agentId: string;
|
|
320
|
+
violations: number;
|
|
321
|
+
}>;
|
|
322
|
+
}
|
|
323
|
+
/** Parameters for generating a compliance report. */
|
|
324
|
+
interface ComplianceGenerateParams {
|
|
325
|
+
type: ComplianceReportType;
|
|
326
|
+
periodStart: string;
|
|
327
|
+
periodEnd: string;
|
|
328
|
+
tenantId?: string;
|
|
329
|
+
}
|
|
330
|
+
/** Quick stats request parameters. */
|
|
331
|
+
interface QuickStatsParams {
|
|
332
|
+
days: number;
|
|
333
|
+
tenantId?: string;
|
|
334
|
+
}
|
|
335
|
+
/** An entry in the audit trail. */
|
|
336
|
+
interface AuditEntry {
|
|
337
|
+
id: string;
|
|
338
|
+
intentId: string;
|
|
339
|
+
action: string;
|
|
340
|
+
source: string;
|
|
341
|
+
status: IntentStatus;
|
|
342
|
+
riskTier: RiskTier;
|
|
343
|
+
policyMatches: PolicyMatch[];
|
|
344
|
+
warrantId?: string;
|
|
345
|
+
timestamp: string;
|
|
346
|
+
metadata?: Record<string, unknown>;
|
|
347
|
+
}
|
|
348
|
+
/** A cryptographic governance warrant. */
|
|
349
|
+
interface Warrant {
|
|
350
|
+
id: string;
|
|
351
|
+
intentId: string;
|
|
352
|
+
hash: string;
|
|
353
|
+
signature: string;
|
|
354
|
+
issuedAt: string;
|
|
355
|
+
expiresAt?: string;
|
|
356
|
+
verified: boolean;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* Module for submitting and managing agent intents through the governance pipeline.
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* ```typescript
|
|
364
|
+
* const result = await vienna.intent.submit({
|
|
365
|
+
* action: 'wire_transfer',
|
|
366
|
+
* source: 'billing-bot',
|
|
367
|
+
* payload: { amount: 75000, currency: 'USD' },
|
|
368
|
+
* });
|
|
369
|
+
* ```
|
|
370
|
+
*/
|
|
371
|
+
declare class IntentModule {
|
|
372
|
+
private readonly client;
|
|
373
|
+
constructor(client: ViennaClient);
|
|
374
|
+
/**
|
|
375
|
+
* Submit an agent intent for governance evaluation and execution.
|
|
376
|
+
*
|
|
377
|
+
* @param intent - The intent request describing the action.
|
|
378
|
+
* @param options - Optional request options (signal, timeout).
|
|
379
|
+
* @returns The intent result including status, risk tier, and policy matches.
|
|
380
|
+
*/
|
|
381
|
+
submit(intent: IntentRequest, options?: RequestOptions): Promise<IntentResult>;
|
|
382
|
+
/**
|
|
383
|
+
* Check the current status of a previously submitted intent.
|
|
384
|
+
*
|
|
385
|
+
* @param intentId - The intent identifier (e.g. `int-abc123`).
|
|
386
|
+
* @param options - Optional request options.
|
|
387
|
+
* @returns Full intent status including audit trail references.
|
|
388
|
+
*/
|
|
389
|
+
status(intentId: string, options?: RequestOptions): Promise<IntentStatusResponse>;
|
|
390
|
+
/**
|
|
391
|
+
* Simulate an intent without executing it (dry-run).
|
|
392
|
+
* Useful for testing policy configurations and understanding governance outcomes.
|
|
393
|
+
*
|
|
394
|
+
* @param intent - The intent to simulate.
|
|
395
|
+
* @param options - Optional request options.
|
|
396
|
+
* @returns Simulation result showing what would happen.
|
|
397
|
+
*/
|
|
398
|
+
simulate(intent: IntentRequest, options?: RequestOptions): Promise<IntentSimulationResult>;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Module for managing governance policies.
|
|
403
|
+
*
|
|
404
|
+
* @example
|
|
405
|
+
* ```typescript
|
|
406
|
+
* const policies = await vienna.policies.list({ enabled: true });
|
|
407
|
+
* const rule = await vienna.policies.create({
|
|
408
|
+
* name: 'High-Value Gate',
|
|
409
|
+
* conditions: [{ field: 'amount', operator: 'gt', value: 10000 }],
|
|
410
|
+
* actionOnMatch: 'require_approval',
|
|
411
|
+
* priority: 100,
|
|
412
|
+
* });
|
|
413
|
+
* ```
|
|
414
|
+
*/
|
|
415
|
+
declare class PoliciesModule {
|
|
416
|
+
private readonly client;
|
|
417
|
+
constructor(client: ViennaClient);
|
|
418
|
+
/**
|
|
419
|
+
* List all policies, optionally filtered.
|
|
420
|
+
*
|
|
421
|
+
* @param params - Filter parameters.
|
|
422
|
+
* @param options - Optional request options.
|
|
423
|
+
* @returns Array of policy rules.
|
|
424
|
+
*/
|
|
425
|
+
list(params?: PolicyListParams, options?: RequestOptions): Promise<PolicyRule[]>;
|
|
426
|
+
/**
|
|
427
|
+
* Get a single policy by ID.
|
|
428
|
+
*
|
|
429
|
+
* @param policyId - The policy identifier.
|
|
430
|
+
* @param options - Optional request options.
|
|
431
|
+
* @returns The policy rule.
|
|
432
|
+
*/
|
|
433
|
+
get(policyId: string, options?: RequestOptions): Promise<PolicyRule>;
|
|
434
|
+
/**
|
|
435
|
+
* Create a new governance policy.
|
|
436
|
+
*
|
|
437
|
+
* @param params - Policy creation parameters.
|
|
438
|
+
* @param options - Optional request options.
|
|
439
|
+
* @returns The created policy rule.
|
|
440
|
+
*/
|
|
441
|
+
create(params: PolicyCreateParams, options?: RequestOptions): Promise<PolicyRule>;
|
|
442
|
+
/**
|
|
443
|
+
* Update an existing policy.
|
|
444
|
+
*
|
|
445
|
+
* @param policyId - The policy identifier.
|
|
446
|
+
* @param params - Fields to update.
|
|
447
|
+
* @param options - Optional request options.
|
|
448
|
+
* @returns The updated policy rule.
|
|
449
|
+
*/
|
|
450
|
+
update(policyId: string, params: PolicyUpdateParams, options?: RequestOptions): Promise<PolicyRule>;
|
|
451
|
+
/**
|
|
452
|
+
* Delete a policy.
|
|
453
|
+
*
|
|
454
|
+
* @param policyId - The policy identifier.
|
|
455
|
+
* @param options - Optional request options.
|
|
456
|
+
*/
|
|
457
|
+
delete(policyId: string, options?: RequestOptions): Promise<void>;
|
|
458
|
+
/**
|
|
459
|
+
* Evaluate policies against a test payload (dry-run).
|
|
460
|
+
* Returns which policies would match and what action would be taken.
|
|
461
|
+
*
|
|
462
|
+
* @param payload - The test payload to evaluate.
|
|
463
|
+
* @param options - Optional request options.
|
|
464
|
+
* @returns Evaluation result with matched policies and final action.
|
|
465
|
+
*/
|
|
466
|
+
evaluate(payload: Record<string, unknown>, options?: RequestOptions): Promise<PolicyEvaluation>;
|
|
467
|
+
/**
|
|
468
|
+
* List available industry policy templates.
|
|
469
|
+
*
|
|
470
|
+
* @param options - Optional request options.
|
|
471
|
+
* @returns Array of policy templates.
|
|
472
|
+
*/
|
|
473
|
+
templates(options?: RequestOptions): Promise<PolicyTemplate[]>;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
/**
|
|
477
|
+
* Module for fleet and agent management.
|
|
478
|
+
*
|
|
479
|
+
* @example
|
|
480
|
+
* ```typescript
|
|
481
|
+
* const fleet = await vienna.fleet.list();
|
|
482
|
+
* const agent = await vienna.fleet.get('billing-bot');
|
|
483
|
+
* await vienna.fleet.suspend('billing-bot', { reason: 'Suspicious activity' });
|
|
484
|
+
* ```
|
|
485
|
+
*/
|
|
486
|
+
declare class FleetModule {
|
|
487
|
+
private readonly client;
|
|
488
|
+
constructor(client: ViennaClient);
|
|
489
|
+
/**
|
|
490
|
+
* List all agents in the fleet.
|
|
491
|
+
*
|
|
492
|
+
* @param options - Optional request options.
|
|
493
|
+
* @returns Array of fleet agents.
|
|
494
|
+
*/
|
|
495
|
+
list(options?: RequestOptions): Promise<FleetAgent[]>;
|
|
496
|
+
/**
|
|
497
|
+
* Get a single agent by ID.
|
|
498
|
+
*
|
|
499
|
+
* @param agentId - The agent identifier.
|
|
500
|
+
* @param options - Optional request options.
|
|
501
|
+
* @returns The fleet agent.
|
|
502
|
+
*/
|
|
503
|
+
get(agentId: string, options?: RequestOptions): Promise<FleetAgent>;
|
|
504
|
+
/**
|
|
505
|
+
* Get metrics for a specific agent.
|
|
506
|
+
*
|
|
507
|
+
* @param agentId - The agent identifier.
|
|
508
|
+
* @param options - Optional request options.
|
|
509
|
+
* @returns Agent performance metrics.
|
|
510
|
+
*/
|
|
511
|
+
metrics(agentId: string, options?: RequestOptions): Promise<AgentMetrics>;
|
|
512
|
+
/**
|
|
513
|
+
* Get paginated activity log for an agent.
|
|
514
|
+
*
|
|
515
|
+
* @param agentId - The agent identifier.
|
|
516
|
+
* @param pagination - Pagination parameters.
|
|
517
|
+
* @param options - Optional request options.
|
|
518
|
+
* @returns Paginated list of agent activities.
|
|
519
|
+
*/
|
|
520
|
+
activity(agentId: string, pagination?: PaginationParams, options?: RequestOptions): Promise<PaginatedList<AgentActivity>>;
|
|
521
|
+
/**
|
|
522
|
+
* Suspend an agent, preventing it from submitting intents.
|
|
523
|
+
*
|
|
524
|
+
* @param agentId - The agent identifier.
|
|
525
|
+
* @param params - Suspension details.
|
|
526
|
+
* @param options - Optional request options.
|
|
527
|
+
* @returns The updated agent.
|
|
528
|
+
*/
|
|
529
|
+
suspend(agentId: string, params: {
|
|
530
|
+
reason: string;
|
|
531
|
+
}, options?: RequestOptions): Promise<FleetAgent>;
|
|
532
|
+
/**
|
|
533
|
+
* Reactivate a suspended agent.
|
|
534
|
+
*
|
|
535
|
+
* @param agentId - The agent identifier.
|
|
536
|
+
* @param options - Optional request options.
|
|
537
|
+
* @returns The updated agent.
|
|
538
|
+
*/
|
|
539
|
+
activate(agentId: string, options?: RequestOptions): Promise<FleetAgent>;
|
|
540
|
+
/**
|
|
541
|
+
* Manually adjust an agent's trust score.
|
|
542
|
+
*
|
|
543
|
+
* @param agentId - The agent identifier.
|
|
544
|
+
* @param params - New trust score and reason.
|
|
545
|
+
* @param options - Optional request options.
|
|
546
|
+
* @returns The updated agent.
|
|
547
|
+
*/
|
|
548
|
+
setTrust(agentId: string, params: {
|
|
549
|
+
score: number;
|
|
550
|
+
reason: string;
|
|
551
|
+
}, options?: RequestOptions): Promise<FleetAgent>;
|
|
552
|
+
/**
|
|
553
|
+
* List fleet-wide alerts.
|
|
554
|
+
*
|
|
555
|
+
* @param params - Filter parameters.
|
|
556
|
+
* @param options - Optional request options.
|
|
557
|
+
* @returns Array of fleet alerts.
|
|
558
|
+
*/
|
|
559
|
+
alerts(params?: FleetAlertParams, options?: RequestOptions): Promise<FleetAlert[]>;
|
|
560
|
+
/**
|
|
561
|
+
* Resolve a fleet alert.
|
|
562
|
+
*
|
|
563
|
+
* @param alertId - The alert identifier.
|
|
564
|
+
* @param params - Resolution details.
|
|
565
|
+
* @param options - Optional request options.
|
|
566
|
+
* @returns The resolved alert.
|
|
567
|
+
*/
|
|
568
|
+
resolveAlert(alertId: string, params: {
|
|
569
|
+
resolvedBy: string;
|
|
570
|
+
}, options?: RequestOptions): Promise<FleetAlert>;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
/**
|
|
574
|
+
* Module for managing approval workflows.
|
|
575
|
+
*
|
|
576
|
+
* @example
|
|
577
|
+
* ```typescript
|
|
578
|
+
* const pending = await vienna.approvals.list({ status: 'pending' });
|
|
579
|
+
* await vienna.approvals.approve('appr-123', { operator: 'jane', notes: 'LGTM' });
|
|
580
|
+
* ```
|
|
581
|
+
*/
|
|
582
|
+
declare class ApprovalsModule {
|
|
583
|
+
private readonly client;
|
|
584
|
+
constructor(client: ViennaClient);
|
|
585
|
+
/**
|
|
586
|
+
* List approvals, optionally filtered by status or source.
|
|
587
|
+
*
|
|
588
|
+
* @param params - Filter parameters.
|
|
589
|
+
* @param options - Optional request options.
|
|
590
|
+
* @returns Array of approvals.
|
|
591
|
+
*/
|
|
592
|
+
list(params?: ApprovalListParams, options?: RequestOptions): Promise<Approval[]>;
|
|
593
|
+
/**
|
|
594
|
+
* Get a single approval by ID.
|
|
595
|
+
*
|
|
596
|
+
* @param approvalId - The approval identifier.
|
|
597
|
+
* @param options - Optional request options.
|
|
598
|
+
* @returns The approval.
|
|
599
|
+
*/
|
|
600
|
+
get(approvalId: string, options?: RequestOptions): Promise<Approval>;
|
|
601
|
+
/**
|
|
602
|
+
* Approve a pending action.
|
|
603
|
+
*
|
|
604
|
+
* @param approvalId - The approval identifier.
|
|
605
|
+
* @param params - Approval details (operator, optional notes).
|
|
606
|
+
* @param options - Optional request options.
|
|
607
|
+
* @returns The updated approval.
|
|
608
|
+
*/
|
|
609
|
+
approve(approvalId: string, params: ApproveParams, options?: RequestOptions): Promise<Approval>;
|
|
610
|
+
/**
|
|
611
|
+
* Deny a pending action.
|
|
612
|
+
*
|
|
613
|
+
* @param approvalId - The approval identifier.
|
|
614
|
+
* @param params - Denial details (operator, reason).
|
|
615
|
+
* @param options - Optional request options.
|
|
616
|
+
* @returns The updated approval.
|
|
617
|
+
*/
|
|
618
|
+
deny(approvalId: string, params: DenyParams, options?: RequestOptions): Promise<Approval>;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Module for managing external integrations (Slack, webhooks, PagerDuty, etc.).
|
|
623
|
+
*
|
|
624
|
+
* @example
|
|
625
|
+
* ```typescript
|
|
626
|
+
* await vienna.integrations.create({
|
|
627
|
+
* type: 'slack',
|
|
628
|
+
* name: 'Ops Channel',
|
|
629
|
+
* config: { webhook_url: 'https://hooks.slack.com/...' },
|
|
630
|
+
* eventTypes: ['approval_required', 'policy_violation'],
|
|
631
|
+
* });
|
|
632
|
+
* ```
|
|
633
|
+
*/
|
|
634
|
+
declare class IntegrationsModule {
|
|
635
|
+
private readonly client;
|
|
636
|
+
constructor(client: ViennaClient);
|
|
637
|
+
/**
|
|
638
|
+
* List all configured integrations.
|
|
639
|
+
*
|
|
640
|
+
* @param options - Optional request options.
|
|
641
|
+
* @returns Array of integrations.
|
|
642
|
+
*/
|
|
643
|
+
list(options?: RequestOptions): Promise<Integration[]>;
|
|
644
|
+
/**
|
|
645
|
+
* Get a single integration by ID.
|
|
646
|
+
*
|
|
647
|
+
* @param integrationId - The integration identifier.
|
|
648
|
+
* @param options - Optional request options.
|
|
649
|
+
* @returns The integration.
|
|
650
|
+
*/
|
|
651
|
+
get(integrationId: string, options?: RequestOptions): Promise<Integration>;
|
|
652
|
+
/**
|
|
653
|
+
* Create a new integration.
|
|
654
|
+
*
|
|
655
|
+
* @param params - Integration configuration.
|
|
656
|
+
* @param options - Optional request options.
|
|
657
|
+
* @returns The created integration.
|
|
658
|
+
*/
|
|
659
|
+
create(params: IntegrationCreateParams, options?: RequestOptions): Promise<Integration>;
|
|
660
|
+
/**
|
|
661
|
+
* Update an existing integration.
|
|
662
|
+
*
|
|
663
|
+
* @param integrationId - The integration identifier.
|
|
664
|
+
* @param params - Fields to update.
|
|
665
|
+
* @param options - Optional request options.
|
|
666
|
+
* @returns The updated integration.
|
|
667
|
+
*/
|
|
668
|
+
update(integrationId: string, params: Partial<IntegrationCreateParams>, options?: RequestOptions): Promise<Integration>;
|
|
669
|
+
/**
|
|
670
|
+
* Delete an integration.
|
|
671
|
+
*
|
|
672
|
+
* @param integrationId - The integration identifier.
|
|
673
|
+
* @param options - Optional request options.
|
|
674
|
+
*/
|
|
675
|
+
delete(integrationId: string, options?: RequestOptions): Promise<void>;
|
|
676
|
+
/**
|
|
677
|
+
* Send a test event to an integration to verify connectivity.
|
|
678
|
+
*
|
|
679
|
+
* @param integrationId - The integration identifier.
|
|
680
|
+
* @param options - Optional request options.
|
|
681
|
+
* @returns Test result with success status and latency.
|
|
682
|
+
*/
|
|
683
|
+
test(integrationId: string, options?: RequestOptions): Promise<IntegrationTestResult>;
|
|
684
|
+
/**
|
|
685
|
+
* Toggle an integration's enabled/disabled state.
|
|
686
|
+
*
|
|
687
|
+
* @param integrationId - The integration identifier.
|
|
688
|
+
* @param params - Enable or disable.
|
|
689
|
+
* @param options - Optional request options.
|
|
690
|
+
* @returns The updated integration.
|
|
691
|
+
*/
|
|
692
|
+
toggle(integrationId: string, params: {
|
|
693
|
+
enabled: boolean;
|
|
694
|
+
}, options?: RequestOptions): Promise<Integration>;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* Module for compliance reporting and statistics.
|
|
699
|
+
*
|
|
700
|
+
* @example
|
|
701
|
+
* ```typescript
|
|
702
|
+
* const report = await vienna.compliance.generate({
|
|
703
|
+
* type: 'quarterly',
|
|
704
|
+
* periodStart: '2026-01-01',
|
|
705
|
+
* periodEnd: '2026-03-31',
|
|
706
|
+
* });
|
|
707
|
+
* const stats = await vienna.compliance.quickStats({ days: 30 });
|
|
708
|
+
* ```
|
|
709
|
+
*/
|
|
710
|
+
declare class ComplianceModule {
|
|
711
|
+
private readonly client;
|
|
712
|
+
constructor(client: ViennaClient);
|
|
713
|
+
/**
|
|
714
|
+
* Generate a new compliance report.
|
|
715
|
+
*
|
|
716
|
+
* @param params - Report parameters (type, period).
|
|
717
|
+
* @param options - Optional request options.
|
|
718
|
+
* @returns The created report (may still be generating).
|
|
719
|
+
*/
|
|
720
|
+
generate(params: ComplianceGenerateParams, options?: RequestOptions): Promise<ComplianceReport>;
|
|
721
|
+
/**
|
|
722
|
+
* Get a compliance report by ID.
|
|
723
|
+
*
|
|
724
|
+
* @param reportId - The report identifier.
|
|
725
|
+
* @param options - Optional request options.
|
|
726
|
+
* @returns The compliance report with summary data.
|
|
727
|
+
*/
|
|
728
|
+
get(reportId: string, options?: RequestOptions): Promise<ComplianceReport>;
|
|
729
|
+
/**
|
|
730
|
+
* List all compliance reports.
|
|
731
|
+
*
|
|
732
|
+
* @param options - Optional request options.
|
|
733
|
+
* @returns Array of compliance reports.
|
|
734
|
+
*/
|
|
735
|
+
list(options?: RequestOptions): Promise<ComplianceReport[]>;
|
|
736
|
+
/**
|
|
737
|
+
* Get quick compliance statistics for a rolling window.
|
|
738
|
+
*
|
|
739
|
+
* @param params - Stats parameters (number of days).
|
|
740
|
+
* @param options - Optional request options.
|
|
741
|
+
* @returns Compliance summary statistics.
|
|
742
|
+
*/
|
|
743
|
+
quickStats(params: QuickStatsParams, options?: RequestOptions): Promise<ComplianceSummary>;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Main client for the Vienna OS API.
|
|
748
|
+
*
|
|
749
|
+
* @example
|
|
750
|
+
* ```typescript
|
|
751
|
+
* import { ViennaClient } from '@vienna/sdk';
|
|
752
|
+
*
|
|
753
|
+
* const vienna = new ViennaClient({ apiKey: 'vna_your_api_key' });
|
|
754
|
+
* const result = await vienna.intent.submit({ action: 'deploy', source: 'ci-bot', payload: {} });
|
|
755
|
+
* ```
|
|
756
|
+
*/
|
|
757
|
+
declare class ViennaClient {
|
|
758
|
+
private readonly apiKey;
|
|
759
|
+
private readonly baseUrl;
|
|
760
|
+
private readonly timeout;
|
|
761
|
+
private readonly retries;
|
|
762
|
+
private readonly onError?;
|
|
763
|
+
/** Intent submission and status. */
|
|
764
|
+
readonly intent: IntentModule;
|
|
765
|
+
/** Policy management. */
|
|
766
|
+
readonly policies: PoliciesModule;
|
|
767
|
+
/** Fleet and agent management. */
|
|
768
|
+
readonly fleet: FleetModule;
|
|
769
|
+
/** Approval workflows. */
|
|
770
|
+
readonly approvals: ApprovalsModule;
|
|
771
|
+
/** External integrations. */
|
|
772
|
+
readonly integrations: IntegrationsModule;
|
|
773
|
+
/** Compliance reporting. */
|
|
774
|
+
readonly compliance: ComplianceModule;
|
|
775
|
+
constructor(config: ViennaConfig);
|
|
776
|
+
/**
|
|
777
|
+
* Make an authenticated request to the Vienna API.
|
|
778
|
+
*
|
|
779
|
+
* @param method - HTTP method.
|
|
780
|
+
* @param path - API path (e.g. `/api/v1/intents`).
|
|
781
|
+
* @param body - Optional JSON request body.
|
|
782
|
+
* @param options - Per-request options (signal, timeout override).
|
|
783
|
+
* @returns Parsed response data.
|
|
784
|
+
*/
|
|
785
|
+
request<T>(method: string, path: string, body?: unknown, options?: RequestOptions): Promise<T>;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Base error class for all Vienna SDK errors.
|
|
790
|
+
* Extends native Error with HTTP status, error code, and optional details.
|
|
791
|
+
*/
|
|
792
|
+
declare class ViennaError extends Error {
|
|
793
|
+
/** Machine-readable error code from the API (e.g. `POLICY_VIOLATION`). */
|
|
794
|
+
readonly code: string;
|
|
795
|
+
/** HTTP status code. */
|
|
796
|
+
readonly status: number;
|
|
797
|
+
/** Additional error details from the API response. */
|
|
798
|
+
readonly details?: unknown;
|
|
799
|
+
constructor(message: string, status: number, code: string, details?: unknown);
|
|
800
|
+
}
|
|
801
|
+
/** Thrown when the API key is missing or invalid (HTTP 401). */
|
|
802
|
+
declare class ViennaAuthError extends ViennaError {
|
|
803
|
+
constructor(message: string, code?: string, details?: unknown);
|
|
804
|
+
}
|
|
805
|
+
/** Thrown when the authenticated user lacks permission (HTTP 403). */
|
|
806
|
+
declare class ViennaForbiddenError extends ViennaError {
|
|
807
|
+
constructor(message: string, code?: string, details?: unknown);
|
|
808
|
+
}
|
|
809
|
+
/** Thrown when the requested resource does not exist (HTTP 404). */
|
|
810
|
+
declare class ViennaNotFoundError extends ViennaError {
|
|
811
|
+
constructor(message: string, code?: string, details?: unknown);
|
|
812
|
+
}
|
|
813
|
+
/** Thrown when the rate limit is exceeded (HTTP 429). */
|
|
814
|
+
declare class ViennaRateLimitError extends ViennaError {
|
|
815
|
+
/** Seconds to wait before retrying. */
|
|
816
|
+
readonly retryAfter: number;
|
|
817
|
+
constructor(message: string, retryAfter: number, code?: string, details?: unknown);
|
|
818
|
+
}
|
|
819
|
+
/** Thrown when request validation fails (HTTP 400). */
|
|
820
|
+
declare class ViennaValidationError extends ViennaError {
|
|
821
|
+
/** Field-level validation errors. */
|
|
822
|
+
readonly fields?: Record<string, string>;
|
|
823
|
+
constructor(message: string, code?: string, fields?: Record<string, string>, details?: unknown);
|
|
824
|
+
}
|
|
825
|
+
/** Thrown on server-side errors (HTTP 5xx). */
|
|
826
|
+
declare class ViennaServerError extends ViennaError {
|
|
827
|
+
constructor(message: string, status?: number, code?: string, details?: unknown);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Framework-specific convenience wrappers for Vienna OS SDK.
|
|
832
|
+
*
|
|
833
|
+
* These wrappers provide simplified interfaces for popular AI agent frameworks,
|
|
834
|
+
* focusing on the core governance operations: submitIntent, waitForApproval,
|
|
835
|
+
* reportExecution, and register.
|
|
836
|
+
*/
|
|
837
|
+
|
|
838
|
+
/** Base configuration for framework adapters */
|
|
839
|
+
interface FrameworkConfig {
|
|
840
|
+
/** Vienna OS API key (starts with `vna_`) */
|
|
841
|
+
apiKey: string;
|
|
842
|
+
/** Base URL of Vienna OS API (optional, defaults to production) */
|
|
843
|
+
baseUrl?: string;
|
|
844
|
+
/** Agent identifier for this framework instance (optional) */
|
|
845
|
+
agentId?: string;
|
|
846
|
+
}
|
|
847
|
+
/** Simplified interface focused on core governance operations */
|
|
848
|
+
interface FrameworkAdapter {
|
|
849
|
+
/** Submit an intent for governance evaluation */
|
|
850
|
+
submitIntent(action: string, payload: Record<string, unknown>): Promise<IntentResult>;
|
|
851
|
+
/** Wait for approval on a pending intent */
|
|
852
|
+
waitForApproval(intentId: string, timeoutMs?: number): Promise<IntentStatus>;
|
|
853
|
+
/** Report execution results back to Vienna */
|
|
854
|
+
reportExecution(intentId: string, result: 'success' | 'failure', details?: Record<string, unknown>): Promise<void>;
|
|
855
|
+
/** Register this agent with the Vienna fleet */
|
|
856
|
+
register(metadata?: Record<string, string>): Promise<void>;
|
|
857
|
+
}
|
|
858
|
+
/** Internal base adapter implementation */
|
|
859
|
+
declare abstract class BaseFrameworkAdapter implements FrameworkAdapter {
|
|
860
|
+
protected readonly vienna: ViennaClient;
|
|
861
|
+
protected readonly agentId: string;
|
|
862
|
+
constructor(config: FrameworkConfig, frameworkName: string);
|
|
863
|
+
submitIntent(action: string, payload: Record<string, unknown>): Promise<IntentResult>;
|
|
864
|
+
waitForApproval(intentId: string, timeoutMs?: number): Promise<IntentStatus>;
|
|
865
|
+
reportExecution(intentId: string, result: 'success' | 'failure', details?: Record<string, unknown>): Promise<void>;
|
|
866
|
+
register(metadata?: Record<string, string>): Promise<void>;
|
|
867
|
+
protected abstract getFrameworkName(): string;
|
|
868
|
+
}
|
|
869
|
+
/** LangChain-specific adapter */
|
|
870
|
+
declare class LangChainAdapter extends BaseFrameworkAdapter {
|
|
871
|
+
constructor(config: FrameworkConfig);
|
|
872
|
+
protected getFrameworkName(): string;
|
|
873
|
+
/** Enhanced submitIntent with LangChain tool context */
|
|
874
|
+
submitToolIntent(toolName: string, toolArgs: Record<string, unknown>, chainContext?: Record<string, unknown>): Promise<IntentResult>;
|
|
875
|
+
}
|
|
876
|
+
/** CrewAI-specific adapter */
|
|
877
|
+
declare class CrewAIAdapter extends BaseFrameworkAdapter {
|
|
878
|
+
constructor(config: FrameworkConfig);
|
|
879
|
+
protected getFrameworkName(): string;
|
|
880
|
+
/** Enhanced submitIntent with CrewAI task context */
|
|
881
|
+
submitTaskIntent(taskType: string, taskPayload: Record<string, unknown>, crewContext?: Record<string, unknown>): Promise<IntentResult>;
|
|
882
|
+
}
|
|
883
|
+
/** AutoGen-specific adapter */
|
|
884
|
+
declare class AutoGenAdapter extends BaseFrameworkAdapter {
|
|
885
|
+
constructor(config: FrameworkConfig);
|
|
886
|
+
protected getFrameworkName(): string;
|
|
887
|
+
/** Enhanced submitIntent with AutoGen conversation context */
|
|
888
|
+
submitConversationIntent(functionName: string, functionArgs: Record<string, unknown>, conversationContext?: Record<string, unknown>): Promise<IntentResult>;
|
|
889
|
+
}
|
|
890
|
+
/** OpenClaw-specific adapter */
|
|
891
|
+
declare class OpenClawAdapter extends BaseFrameworkAdapter {
|
|
892
|
+
constructor(config: FrameworkConfig);
|
|
893
|
+
protected getFrameworkName(): string;
|
|
894
|
+
/** Enhanced submitIntent with OpenClaw skill context */
|
|
895
|
+
submitSkillIntent(skillName: string, skillArgs: Record<string, unknown>, sessionContext?: Record<string, unknown>): Promise<IntentResult>;
|
|
896
|
+
}
|
|
897
|
+
/**
|
|
898
|
+
* Create a LangChain-optimized Vienna adapter.
|
|
899
|
+
*
|
|
900
|
+
* @example
|
|
901
|
+
* ```typescript
|
|
902
|
+
* const vienna = createForLangChain({
|
|
903
|
+
* apiKey: process.env.VIENNA_API_KEY!,
|
|
904
|
+
* agentId: 'langchain-bot-1',
|
|
905
|
+
* });
|
|
906
|
+
*
|
|
907
|
+
* const result = await vienna.submitToolIntent('web_search', { query: 'AI governance' });
|
|
908
|
+
* ```
|
|
909
|
+
*/
|
|
910
|
+
declare function createForLangChain(config: FrameworkConfig): LangChainAdapter;
|
|
911
|
+
/**
|
|
912
|
+
* Create a CrewAI-optimized Vienna adapter.
|
|
913
|
+
*
|
|
914
|
+
* @example
|
|
915
|
+
* ```typescript
|
|
916
|
+
* const vienna = createForCrewAI({
|
|
917
|
+
* apiKey: process.env.VIENNA_API_KEY!,
|
|
918
|
+
* agentId: 'crew-researcher',
|
|
919
|
+
* });
|
|
920
|
+
*
|
|
921
|
+
* const result = await vienna.submitTaskIntent('research', { topic: 'market analysis' });
|
|
922
|
+
* ```
|
|
923
|
+
*/
|
|
924
|
+
declare function createForCrewAI(config: FrameworkConfig): CrewAIAdapter;
|
|
925
|
+
/**
|
|
926
|
+
* Create an AutoGen-optimized Vienna adapter.
|
|
927
|
+
*
|
|
928
|
+
* @example
|
|
929
|
+
* ```typescript
|
|
930
|
+
* const vienna = createForAutoGen({
|
|
931
|
+
* apiKey: process.env.VIENNA_API_KEY!,
|
|
932
|
+
* agentId: 'autogen-assistant',
|
|
933
|
+
* });
|
|
934
|
+
*
|
|
935
|
+
* const result = await vienna.submitConversationIntent('get_stock_price', { symbol: 'NVDA' });
|
|
936
|
+
* ```
|
|
937
|
+
*/
|
|
938
|
+
declare function createForAutoGen(config: FrameworkConfig): AutoGenAdapter;
|
|
939
|
+
/**
|
|
940
|
+
* Create an OpenClaw-optimized Vienna adapter.
|
|
941
|
+
*
|
|
942
|
+
* @example
|
|
943
|
+
* ```typescript
|
|
944
|
+
* const vienna = createForOpenClaw({
|
|
945
|
+
* apiKey: process.env.VIENNA_API_KEY!,
|
|
946
|
+
* agentId: 'openclaw-agent',
|
|
947
|
+
* });
|
|
948
|
+
*
|
|
949
|
+
* const result = await vienna.submitSkillIntent('web_search', { query: 'OpenAI news' });
|
|
950
|
+
* ```
|
|
951
|
+
*/
|
|
952
|
+
declare function createForOpenClaw(config: FrameworkConfig): OpenClawAdapter;
|
|
953
|
+
|
|
954
|
+
export { type ActionType, type AgentActivity, type AgentMetrics, type AgentStatus, type AlertSeverity, type ApiResponse, type Approval, type ApprovalListParams, type ApprovalStatus, ApprovalsModule, type ApproveParams, type AuditEntry, type ComplianceGenerateParams, ComplianceModule, type ComplianceReport, type ComplianceReportType, type ComplianceSummary, type ConditionOperator, type DenyParams, type FleetAgent, type FleetAlert, type FleetAlertParams, FleetModule, type FrameworkAdapter, type FrameworkConfig, type Integration, type IntegrationCreateParams, type IntegrationTestResult, type IntegrationType, IntegrationsModule, IntentModule, type IntentRequest, type IntentResult, type IntentSimulationResult, type IntentStatus, type IntentStatusResponse, type PaginatedList, type PaginationParams, PoliciesModule, type PolicyAction, type PolicyCondition, type PolicyCreateParams, type PolicyEvaluation, type PolicyListParams, type PolicyMatch, type PolicyRule, type PolicyTemplate, type PolicyUpdateParams, type QuickStatsParams, type ReportStatus, type RequestOptions, type RiskTier, ViennaAuthError, ViennaClient, type ViennaConfig, ViennaError, ViennaForbiddenError, ViennaNotFoundError, ViennaRateLimitError, ViennaServerError, ViennaValidationError, type Warrant, createForAutoGen, createForCrewAI, createForLangChain, createForOpenClaw };
|