@tryvira/sdk 0.1.75 → 0.1.94

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.
@@ -1,781 +0,0 @@
1
- export interface RuntimeRequest {
2
- organizationId: string;
3
- projectId: string;
4
- environmentId: string;
5
- revisionId: string;
6
- idempotencyKey: string;
7
- nonce: string;
8
- expiresAt: number;
9
- }
10
- export interface SdkRequest {
11
- method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
12
- path: string;
13
- query?: Readonly<Record<string, string>>;
14
- body?: Readonly<Record<string, unknown>>;
15
- }
16
- export type SdkFailureMode = "throw" | "open";
17
- export interface ViraClientOptions {
18
- baseUrl: string;
19
- /** Explicit opt-in for plain HTTP on loopback during local development only. */
20
- allowInsecureLocalhost?: boolean;
21
- apiKey?: string;
22
- fetcher?: typeof fetch;
23
- timeoutMs?: number;
24
- retries?: number;
25
- failureMode?: SdkFailureMode;
26
- defaultHeaders?: Readonly<Record<string, string>>;
27
- /** Connection selected by connectOnce or supplied by the host integration. */
28
- connectionId?: string;
29
- }
30
- export interface ViraResponse<T = unknown> {
31
- status: number;
32
- body: T;
33
- requestId: string;
34
- }
35
- export interface BehaviorProjection {
36
- rendered: string;
37
- projectionDigest: string;
38
- programDigest: string;
39
- [key: string]: unknown;
40
- }
41
- export interface ProjectionReceipt {
42
- projectionDigest: string;
43
- programDigest: string;
44
- artifactDigest: string;
45
- receiptDigest: string;
46
- [key: string]: unknown;
47
- }
48
- export interface RuntimeResolution {
49
- behaviorPoint: string;
50
- strategySelection?: ClientBody | null;
51
- behaviorProjection?: BehaviorProjection;
52
- projectionReceipt?: ProjectionReceipt;
53
- projectionMode?: "active" | "unavailable" | "not-applicable";
54
- [key: string]: unknown;
55
- }
56
- export type TaskRunMode = "SINGLE" | "STRATEGY" | "COMPOUND" | "HYBRID";
57
- export interface ScopedListOptions {
58
- limit?: number;
59
- cursor?: string;
60
- status?: string;
61
- search?: string;
62
- }
63
- export type TaskRunRequestedMode = TaskRunMode | "AUTO";
64
- export interface TaskRunChildMode {
65
- semanticTaskKey: string;
66
- mode: "SINGLE" | "STRATEGY";
67
- }
68
- export type SemanticAbstainReason = "EXACT_NEGATIVE_MATCH" | "NO_EXACT_MATCH" | "PROVIDER_TASK_NOT_FOUND" | "PROVIDER_EXCLUDED_TASK" | "PROVIDER_CONFIDENCE_BELOW_THRESHOLD" | "PROVIDER_WINNER_MARGIN" | "SEMANTIC_PROVIDER_TIMEOUT";
69
- export interface SemanticActivationReceipt extends Record<string, unknown> {
70
- outcome: "select" | "continue" | "switch" | "clarify" | "abstain" | "unknown";
71
- taskKey?: string;
72
- confidence: number;
73
- runnerUpConfidence: number;
74
- abstainReason?: SemanticAbstainReason;
75
- clarifyReason?: "AMBIGUOUS_MATCH" | "PROVIDER_LOW_CONFIDENCE";
76
- }
77
- export interface SemanticResolveBody extends Record<string, unknown> {
78
- receipt?: SemanticActivationReceipt;
79
- }
80
- export interface TaskRunRouteRequest {
81
- input: string;
82
- requestedMode?: TaskRunRequestedMode;
83
- intentCount?: number;
84
- hostCapabilities?: readonly string[];
85
- hybridPlan?: readonly TaskRunChildMode[];
86
- connectionId?: string;
87
- }
88
- export interface TaskRunBudget {
89
- maxChildren?: number;
90
- maxCalls?: number;
91
- maxLatencyMs?: number;
92
- maxCostMicros?: number;
93
- }
94
- export interface TaskRunAdmissionRequest {
95
- taskRunId: string;
96
- requestId: string;
97
- input: unknown;
98
- ownerActorRef?: string;
99
- requestedMode?: TaskRunRequestedMode;
100
- hostCapabilities?: readonly string[];
101
- hybridPlan?: readonly TaskRunChildMode[];
102
- compoundPlanId?: string;
103
- conversationId?: string;
104
- episodeId?: string;
105
- traceRootRef?: string;
106
- budget?: TaskRunBudget;
107
- connectionId?: string;
108
- }
109
- export interface TaskRunPromptRequest {
110
- input: unknown;
111
- taskRunId?: string;
112
- requestId?: string;
113
- conversationId?: string;
114
- episodeId?: string;
115
- traceRootRef?: string;
116
- budget?: TaskRunBudget;
117
- connectionId?: string;
118
- hostCapabilities?: readonly string[];
119
- }
120
- export interface ConnectOnceResult {
121
- system: ClientBody;
122
- connection: ClientBody;
123
- handshake: ClientBody;
124
- }
125
- export interface StrategyContinuationInput {
126
- authorityDigest?: string;
127
- state?: Readonly<Record<string, unknown>>;
128
- references?: Readonly<Record<string, unknown>>;
129
- }
130
- export type ViraLearningNamespaces = {
131
- evaluations: {
132
- createPlan: (input: ClientBody, options?: {
133
- idempotencyKey?: string;
134
- }) => Promise<ViraResponse<ClientBody> | null>;
135
- get: (id: string) => Promise<ViraResponse<ClientBody> | null>;
136
- compare: (id: string) => Promise<ViraResponse<ClientBody> | null>;
137
- reviewFinding: (evaluationId: string, findingId: string, input: {
138
- decision: 'ACCEPT' | 'REJECT' | 'EDIT' | 'MORE_EVIDENCE';
139
- reason?: string;
140
- }, options?: {
141
- idempotencyKey?: string;
142
- }) => Promise<ViraResponse<ClientBody> | null>;
143
- proposeImprovement: (id: string, input: ClientBody, options?: {
144
- idempotencyKey?: string;
145
- }) => Promise<ViraResponse<ClientBody> | null>;
146
- };
147
- teach: {
148
- review: (id: string, action?: 'request-review' | 'approve' | 'reject', options?: {
149
- idempotencyKey?: string;
150
- }) => Promise<ViraResponse<ClientBody> | null>;
151
- createCandidate: (input: ClientBody, options?: {
152
- idempotencyKey?: string;
153
- }) => Promise<ViraResponse<ClientBody> | null>;
154
- evaluateCandidate: (id: string, input: ClientBody, options?: {
155
- idempotencyKey?: string;
156
- }) => Promise<ViraResponse<ClientBody> | null>;
157
- };
158
- packs: {
159
- createRevision: (input: ClientBody, options?: {
160
- idempotencyKey?: string;
161
- }) => Promise<ViraResponse<ClientBody> | null>;
162
- getRevision: (id: string) => Promise<ViraResponse<ClientBody> | null>;
163
- diffRevision: (id: string) => Promise<ViraResponse<ClientBody> | null>;
164
- transitionRevision: (id: string, transition: 'validate' | 'request-approval' | 'approve' | 'release' | 'reject', options?: {
165
- idempotencyKey?: string;
166
- }) => Promise<ViraResponse<ClientBody> | null>;
167
- };
168
- };
169
- export declare class ViraApiError extends Error {
170
- readonly status: number;
171
- readonly body: unknown;
172
- readonly requestId: string;
173
- constructor(message: string, status: number, body: unknown, requestId: string);
174
- }
175
- type ClientBody = Record<string, unknown>;
176
- type ClientObservationScope = {
177
- organizationId: string;
178
- projectId: string;
179
- environmentId: string;
180
- };
181
- type ClientObservation = ClientObservationScope & {
182
- eventId: string;
183
- eventType: string;
184
- aiSystemId: string;
185
- connectionId: string;
186
- /** Optional composed-scope members. They are carried as server-readable
187
- * identity, never as model/client authority. */
188
- workspaceId?: string;
189
- userId?: string;
190
- sessionId?: string;
191
- [key: string]: unknown;
192
- };
193
- export interface ViraHttpRequestOptions {
194
- apiKey?: string;
195
- method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
196
- body?: unknown;
197
- idempotencyKey?: string;
198
- fetcher?: typeof fetch;
199
- timeoutMs?: number;
200
- retries?: number;
201
- defaultHeaders?: Readonly<Record<string, string>>;
202
- }
203
- /** Shared transport policy for SDK-adjacent integrations such as MCP. */
204
- export declare function viraHttpRequest<T = unknown>(url: string | URL, options: ViraHttpRequestOptions): Promise<ViraResponse<T>>;
205
- /** Small, authority-aware client over the existing versioned control API. */
206
- export declare class ViraClient {
207
- readonly evaluations: ViraLearningNamespaces['evaluations'];
208
- readonly teach: ViraLearningNamespaces['teach'];
209
- readonly packs: ViraLearningNamespaces['packs'];
210
- private readonly baseUrl;
211
- private readonly apiKey?;
212
- private readonly fetcher;
213
- private readonly timeoutMs;
214
- private readonly retries;
215
- private readonly failureMode;
216
- private readonly defaultHeaders;
217
- private boundConnectionId?;
218
- constructor(options: ViraClientOptions);
219
- private request;
220
- connectSystem(input: {
221
- name: string;
222
- systemType: string;
223
- organizationId: string;
224
- projectId: string;
225
- environmentId: string;
226
- idempotencyKey?: string;
227
- }): Promise<ViraResponse<{
228
- system: ClientBody;
229
- }> | null>;
230
- listAISystems(options?: ScopedListOptions): Promise<ViraResponse<ClientBody> | null>;
231
- deleteAISystem(systemId: string, options?: {
232
- confirm?: boolean;
233
- idempotencyKey?: string;
234
- }): Promise<ViraResponse<ClientBody> | null>;
235
- deleteAISystemCascade(systemId: string, options?: {
236
- confirm?: boolean;
237
- deleteObservations?: boolean;
238
- idempotencyKey?: string;
239
- }): Promise<ViraResponse<ClientBody> | null>;
240
- getAISystem(systemId: string): Promise<ViraResponse<ClientBody> | null>;
241
- connectAdapter(systemId: string, input: {
242
- id?: string;
243
- adapterType: string;
244
- adapterVersion: string;
245
- capabilities?: readonly string[];
246
- config?: unknown;
247
- idempotencyKey?: string;
248
- }): Promise<ViraResponse<{
249
- connection: ClientBody;
250
- handshake: ClientBody;
251
- }> | null>;
252
- connectOnce(input: {
253
- id?: string;
254
- name: string;
255
- systemType: string;
256
- organizationId: string;
257
- projectId: string;
258
- environmentId: string;
259
- adapterType: string;
260
- adapterVersion: string;
261
- capabilities?: readonly string[];
262
- config?: unknown;
263
- idempotencyKey?: string;
264
- reuseExistingConnectionOnConflict?: boolean;
265
- }): Promise<ViraResponse<ConnectOnceResult> | null>;
266
- /** Canonical verb-noun name; connectOnce remains for source compatibility. */
267
- connectAiSystem(input: Parameters<ViraClient['connectOnce']>[0]): Promise<ViraResponse<ConnectOnceResult> | null>;
268
- observe(event: ClientObservation, options?: {
269
- idempotencyKey?: string;
270
- }): Promise<ViraResponse<ClientBody> | null>;
271
- listObservations(input?: {
272
- limit?: number;
273
- cursor?: string;
274
- }): Promise<ViraResponse<ClientBody> | null>;
275
- getObservation(eventId: string): Promise<ViraResponse<ClientBody> | null>;
276
- trace(event: ClientObservationScope & {
277
- eventId: string;
278
- aiSystemId: string;
279
- connectionId: string;
280
- traceId?: string;
281
- spanId?: string;
282
- [key: string]: unknown;
283
- }, options?: {
284
- idempotencyKey?: string;
285
- }): Promise<ViraResponse<ClientBody> | null>;
286
- searchRuntimeTraces(query?: {
287
- limit?: number;
288
- cursor?: string;
289
- query?: string;
290
- event?: string;
291
- }): Promise<ViraResponse<ClientBody> | null>;
292
- outcome(event: ClientObservationScope & {
293
- eventId: string;
294
- aiSystemId: string;
295
- connectionId: string;
296
- [key: string]: unknown;
297
- }, options?: {
298
- idempotencyKey?: string;
299
- }): Promise<ViraResponse<ClientBody> | null>;
300
- feedback(event: ClientObservationScope & {
301
- eventId: string;
302
- aiSystemId: string;
303
- connectionId: string;
304
- [key: string]: unknown;
305
- }, options?: {
306
- idempotencyKey?: string;
307
- }): Promise<ViraResponse<ClientBody> | null>;
308
- recordBusinessOutcome(event: Parameters<ViraClient['outcome']>[0], options?: {
309
- idempotencyKey?: string;
310
- }): Promise<ViraResponse<ClientBody> | null>;
311
- recordUserFeedback(event: Parameters<ViraClient['feedback']>[0], options?: {
312
- idempotencyKey?: string;
313
- }): Promise<ViraResponse<ClientBody> | null>;
314
- observeBatch(events: readonly (ClientObservationScope & {
315
- eventId: string;
316
- eventType: string;
317
- aiSystemId: string;
318
- connectionId: string;
319
- [key: string]: unknown;
320
- })[], options?: {
321
- idempotencyKey?: string;
322
- }): Promise<ViraResponse<SemanticResolveBody> | null>;
323
- observeSdk(delivery: ClientBody, options?: {
324
- idempotencyKey?: string;
325
- }): Promise<ViraResponse<ClientBody> | null>;
326
- discover(options?: {
327
- reviewState?: string;
328
- limit?: number;
329
- cursor?: string;
330
- search?: string;
331
- }): Promise<ViraResponse<{
332
- candidates: readonly ClientBody[];
333
- }> | null>;
334
- reviewDiscoveryCandidate(kind: string, key: string, input: ClientBody, options?: {
335
- idempotencyKey?: string;
336
- }): Promise<ViraResponse<ClientBody> | null>;
337
- createSignalDiscoveryProposal(input: ClientBody, options?: {
338
- idempotencyKey?: string;
339
- }): Promise<ViraResponse<ClientBody> | null>;
340
- reviewSignalDiscoveryProposal(proposalId: string, decision: "APPROVE" | "REJECT", options?: {
341
- idempotencyKey?: string;
342
- }): Promise<ViraResponse<ClientBody> | null>;
343
- materializeSignalDiscovery(proposalId: string, input?: ClientBody, options?: {
344
- idempotencyKey?: string;
345
- }): Promise<ViraResponse<ClientBody> | null>;
346
- createSignalMapping(input: ClientBody, options?: {
347
- idempotencyKey?: string;
348
- }): Promise<ViraResponse<ClientBody> | null>;
349
- getSignalMapping(mappingId: string): Promise<ViraResponse<ClientBody> | null>;
350
- reviewSignalMapping(mappingId: string, input?: ClientBody, options?: {
351
- idempotencyKey?: string;
352
- }): Promise<ViraResponse<ClientBody> | null>;
353
- connectionHealth(connectionId: string): Promise<ViraResponse<ClientBody> | null>;
354
- getConnection(connectionId: string): Promise<ViraResponse<ClientBody> | null>;
355
- listSystemConnections(systemId: string, options?: ScopedListOptions): Promise<ViraResponse<ClientBody> | null>;
356
- inventory(systemId: string): Promise<ViraResponse<ClientBody> | null>;
357
- listPacks(options?: ScopedListOptions): Promise<ViraResponse<{
358
- packs: readonly ClientBody[];
359
- }> | null>;
360
- getPack(packId: string): Promise<ViraResponse<ClientBody> | null>;
361
- deletePack(packId: string, options?: {
362
- confirm?: boolean;
363
- idempotencyKey?: string;
364
- }): Promise<ViraResponse<ClientBody> | null>;
365
- importPack(input: {
366
- manifest?: unknown;
367
- objects?: Record<string, unknown>;
368
- archiveBase64?: string;
369
- fileName?: string;
370
- idempotencyKey?: string;
371
- }): Promise<ViraResponse<ClientBody> | null>;
372
- installPack(packId: string, variables?: Record<string, unknown>): Promise<ViraResponse<ClientBody> | null>;
373
- diagnosePack(packId: string, input?: {
374
- runtimeBindings?: readonly string[];
375
- knownVerifiers?: readonly string[];
376
- }): Promise<ViraResponse<ClientBody> | null>;
377
- evaluatePack(packId: string, input: {
378
- evaluationId: string;
379
- }): Promise<ViraResponse<ClientBody> | null>;
380
- approvePack(packId: string, options?: {
381
- manualApproval?: boolean;
382
- reason?: string;
383
- }): Promise<ViraResponse<ClientBody> | null>;
384
- releasePack(packId: string): Promise<ViraResponse<ClientBody> | null>;
385
- previewPackUpgrade(packId: string, incoming: ClientBody): Promise<ViraResponse<ClientBody> | null>;
386
- executeRuntime(input: RuntimeRequest & Record<string, unknown>): Promise<ViraResponse<ClientBody> | null>;
387
- resolveRuntime(input: {
388
- behaviorPoint?: string;
389
- executionBoundary?: Record<string, unknown>;
390
- semanticContext?: Record<string, unknown>;
391
- signalAttestationRefs?: readonly {
392
- stableKey: string;
393
- mappingId: string;
394
- eventId: string;
395
- }[];
396
- idempotencyKey?: string;
397
- }): Promise<ViraResponse<RuntimeResolution> | null>;
398
- /** Resolve a runtime route from a governed execution boundary and semantic context. */
399
- resolveBoundary(input: {
400
- executionBoundary: Record<string, unknown>;
401
- semanticContext?: Record<string, unknown>;
402
- idempotencyKey?: string;
403
- }): Promise<ViraResponse<RuntimeResolution> | null>;
404
- /** Classify input only; use resolveRuntime for one BehaviorPoint or resolveTaskRun/startTaskRun for TaskRun routing and execution. */
405
- resolveSemantic(input: {
406
- input: string;
407
- profile?: Record<string, unknown>;
408
- sessionId?: string;
409
- selection?: Record<string, unknown>;
410
- candidates?: readonly string[];
411
- timeoutMs?: number;
412
- requestId?: string;
413
- executionBoundary?: Record<string, unknown>;
414
- idempotencyKey?: string;
415
- }): Promise<ViraResponse<ClientBody> | null>;
416
- resolveSemanticRuntime(input: {
417
- input: string;
418
- profile?: Record<string, unknown>;
419
- sessionId?: string;
420
- timeoutMs?: number;
421
- requestId?: string;
422
- revisionId?: string;
423
- executionBoundary?: Record<string, unknown>;
424
- signalAttestationRefs?: readonly {
425
- stableKey: string;
426
- mappingId: string;
427
- eventId: string;
428
- }[];
429
- idempotencyKey?: string;
430
- }): Promise<{
431
- semantic: ViraResponse<ClientBody>;
432
- runtime: ViraResponse<RuntimeResolution> | null;
433
- taskKeys: string[];
434
- capsules: ClientBody[];
435
- multiTask: boolean;
436
- } | null>;
437
- authorizeHostAction(input: {
438
- executionId: string;
439
- sessionId: string;
440
- dataVersion: string;
441
- scope: {
442
- organizationId: string;
443
- projectId: string;
444
- environmentId: string;
445
- };
446
- context: Record<string, unknown>;
447
- proposal: Record<string, unknown>;
448
- approval?: Record<string, unknown>;
449
- }): Promise<ViraResponse<ClientBody> | null>;
450
- createHostActionApproval(input: {
451
- sessionId: string;
452
- dataVersion: string;
453
- proposal: Record<string, unknown>;
454
- confirmation: {
455
- proposalId: string;
456
- toolName: string;
457
- argumentsDigest: string;
458
- requestContextDigest: string;
459
- acknowledgedAt: string;
460
- };
461
- ttlSeconds?: number;
462
- }): Promise<ViraResponse<ClientBody> | null>;
463
- listBehaviorStrategies(options?: ScopedListOptions): Promise<ViraResponse<ClientBody> | null>;
464
- deleteBehaviorStrategy(strategyId: string, options?: {
465
- confirm?: boolean;
466
- idempotencyKey?: string;
467
- }): Promise<ViraResponse<ClientBody> | null>;
468
- getBehaviorStrategy(strategyId: string): Promise<ViraResponse<ClientBody> | null>;
469
- createBehaviorStrategy(definition: Record<string, unknown>, id?: string): Promise<ViraResponse<ClientBody> | null>;
470
- listSemanticTasks(options?: ScopedListOptions): Promise<ViraResponse<ClientBody> | null>;
471
- deleteSemanticTask(taskId: string, options?: {
472
- confirm?: boolean;
473
- idempotencyKey?: string;
474
- }): Promise<ViraResponse<ClientBody> | null>;
475
- createSemanticTask(task: {
476
- taskKey: string;
477
- description?: string;
478
- version?: number;
479
- aliases?: readonly string[];
480
- examples?: readonly string[];
481
- negativeExamples?: readonly string[];
482
- }, options?: {
483
- id?: string;
484
- idempotencyKey?: string;
485
- }): Promise<ViraResponse<ClientBody> | null>;
486
- listBehaviorPoints(options?: ScopedListOptions): Promise<ViraResponse<ClientBody> | null>;
487
- deleteBehaviorPoint(pointId: string, options?: {
488
- confirm?: boolean;
489
- idempotencyKey?: string;
490
- }): Promise<ViraResponse<ClientBody> | null>;
491
- createBehaviorPoint(point: {
492
- key: string;
493
- taskId?: string;
494
- taskIds?: readonly string[];
495
- constraints?: unknown;
496
- }, options?: {
497
- id?: string;
498
- idempotencyKey?: string;
499
- }): Promise<ViraResponse<ClientBody> | null>;
500
- createBehaviorStrategyVariant(strategyId: string, variant: Record<string, unknown>, options?: {
501
- idempotencyKey?: string;
502
- }): Promise<ViraResponse<ClientBody> | null>;
503
- validateBehaviorStrategy(strategyId: string): Promise<ViraResponse<ClientBody> | null>;
504
- activateBehaviorStrategy(strategyId: string): Promise<ViraResponse<ClientBody> | null>;
505
- simulateBehaviorStrategy(strategyId: string, initialState?: Record<string, unknown>): Promise<ViraResponse<ClientBody> | null>;
506
- startStrategyExecution(input: {
507
- artifactDigest: string;
508
- organizationId: string;
509
- projectId: string;
510
- environmentId: string;
511
- revisionId: string;
512
- idempotencyKey: string;
513
- nonce: string;
514
- expiresAt: number;
515
- decisionPlanId: string;
516
- candidates: readonly Record<string, unknown>[];
517
- policy: string;
518
- behaviorPoint?: string;
519
- executionBoundary?: Record<string, unknown>;
520
- allowedIds?: readonly string[];
521
- calibrationId?: string;
522
- postModelJudge?: unknown;
523
- shadow?: unknown;
524
- traceId?: string;
525
- executionId?: string;
526
- state?: Record<string, unknown>;
527
- }): Promise<ViraResponse<ClientBody> | null>;
528
- getStrategyExecution(executionId: string): Promise<ViraResponse<ClientBody> | null>;
529
- getStrategyExecutionTrace(executionId: string): Promise<ViraResponse<ClientBody> | null>;
530
- continueStrategyExecution(executionId: string, continuation?: string | StrategyContinuationInput): Promise<ViraResponse<ClientBody> | null>;
531
- cancelStrategyExecution(executionId: string): Promise<ViraResponse<ClientBody> | null>;
532
- resolveTaskRun(input: TaskRunRouteRequest): Promise<ViraResponse<ClientBody> | null>;
533
- startTaskRun(input: TaskRunAdmissionRequest, options?: {
534
- idempotencyKey?: string;
535
- }): Promise<ViraResponse<ClientBody> | null>;
536
- startTaskRunFromPrompt(input: TaskRunPromptRequest, options?: {
537
- idempotencyKey?: string;
538
- }): Promise<ViraResponse<ClientBody> | null>;
539
- getTaskRun(taskRunId: string): Promise<ViraResponse<ClientBody> | null>;
540
- listTaskRunEvents(taskRunId: string): Promise<ViraResponse<ClientBody> | null>;
541
- continueTaskRun(taskRunId: string, expectedVersion: number, options?: {
542
- cursor?: string;
543
- idempotencyKey?: string;
544
- }): Promise<ViraResponse<ClientBody> | null>;
545
- cancelTaskRun(taskRunId: string, expectedVersion?: number | undefined, options?: {
546
- idempotencyKey?: string;
547
- }): Promise<ViraResponse<ClientBody> | null>;
548
- retryTaskRun(taskRunId: string, expectedVersion: number, options?: {
549
- idempotencyKey?: string;
550
- }): Promise<ViraResponse<ClientBody> | null>;
551
- listBehaviorPrograms(options?: ScopedListOptions): Promise<ViraResponse<{
552
- programs: readonly ClientBody[];
553
- }> | null>;
554
- listCapabilities(options?: {
555
- surface?: 'studio' | 'sdk' | 'python' | 'mcp' | 'api';
556
- }): Promise<ViraResponse<{
557
- capabilities: readonly ClientBody[];
558
- scope: ClientBody;
559
- }> | null>;
560
- getBehaviorProgram(programId: string): Promise<ViraResponse<{
561
- program: ClientBody;
562
- }> | null>;
563
- deleteBehaviorProgram(programId: string, options?: {
564
- confirm?: boolean;
565
- idempotencyKey?: string;
566
- }): Promise<ViraResponse<ClientBody> | null>;
567
- deleteBehaviorProgramCascade(programId: string, options?: {
568
- confirm?: boolean;
569
- purgeRuntime?: boolean;
570
- idempotencyKey?: string;
571
- }): Promise<ViraResponse<ClientBody> | null>;
572
- createBehaviorProgram(program: ClientBody, options?: {
573
- idempotencyKey?: string;
574
- }): Promise<ViraResponse<{
575
- program: ClientBody;
576
- }> | null>;
577
- attestCapabilities(attestation: ClientBody, options?: {
578
- idempotencyKey?: string;
579
- }): Promise<ViraResponse<ClientBody> | null>;
580
- resolveCapabilities(attestationId: string, request: ClientBody, options?: {
581
- idempotencyKey?: string;
582
- }): Promise<ViraResponse<ClientBody> | null>;
583
- recordCapabilityTrace(decisionDigest: string, trace: ClientBody, options?: {
584
- idempotencyKey?: string;
585
- }): Promise<ViraResponse<ClientBody> | null>;
586
- resolveModelServing(request: ClientBody, options?: {
587
- idempotencyKey?: string;
588
- }): Promise<ViraResponse<ClientBody> | null>;
589
- recordModelServingTrace(trace: ClientBody, selection: ClientBody, options?: {
590
- idempotencyKey?: string;
591
- }): Promise<ViraResponse<ClientBody> | null>;
592
- submitTeachEvidence(evidence: ClientBody, options?: {
593
- idempotencyKey?: string;
594
- }): Promise<ViraResponse<ClientBody> | null>;
595
- submitTeachConversationEvidence(evidence: ClientBody, options?: {
596
- idempotencyKey?: string;
597
- }): Promise<ViraResponse<ClientBody> | null>;
598
- listConversationArchive(input?: {
599
- limit?: number;
600
- cursor?: string;
601
- }): Promise<ViraResponse<ClientBody> | null>;
602
- importConversationArchive(conversations: readonly ClientBody[], options?: {
603
- idempotencyKey?: string;
604
- }): Promise<ViraResponse<ClientBody> | null>;
605
- revokeConversation(evidenceId: string, reason: string, options?: {
606
- idempotencyKey?: string;
607
- }): Promise<ViraResponse<ClientBody> | null>;
608
- createTeachAnalysis(evidenceIds: readonly string[], options?: {
609
- idempotencyKey?: string;
610
- analysisId?: string;
611
- controlPointId?: string;
612
- summary?: string;
613
- }): Promise<ViraResponse<ClientBody> | null>;
614
- getTeachAnalysis(analysisId: string): Promise<ViraResponse<ClientBody> | null>;
615
- createCrossConversationTeachAnalysis(input: {
616
- conversationRefs: readonly ClientBody[];
617
- analysisId?: string;
618
- controlPointId?: string;
619
- objective?: string;
620
- }, options?: {
621
- idempotencyKey?: string;
622
- }): Promise<ViraResponse<ClientBody> | null>;
623
- createTeachProposal(input: ClientBody, options?: {
624
- idempotencyKey?: string;
625
- }): Promise<ViraResponse<ClientBody> | null>;
626
- getTeachRunBehaviorSet(teachRunId: string): Promise<ViraResponse<ClientBody> | null>;
627
- listTeachRuns(input?: {
628
- limit?: number;
629
- cursor?: string;
630
- status?: string;
631
- }): Promise<ViraResponse<ClientBody> | null>;
632
- getTeachRunRecommendation(teachRunId: string): Promise<ViraResponse<ClientBody> | null>;
633
- acceptTeachRecommendation(teachRunId: string, actorId: string, options?: {
634
- idempotencyKey?: string;
635
- }): Promise<ViraResponse<ClientBody> | null>;
636
- rejectTeachRecommendation(teachRunId: string, reason: string, options?: {
637
- idempotencyKey?: string;
638
- }): Promise<ViraResponse<ClientBody> | null>;
639
- editTeachRecommendation(teachRunId: string, input: {
640
- revisionId: string;
641
- reason: string;
642
- behaviorSet: ClientBody;
643
- }, options?: {
644
- idempotencyKey?: string;
645
- }): Promise<ViraResponse<ClientBody> | null>;
646
- transitionTeachProposal(proposalId: string, transition: 'review' | 'evaluate' | 'promote', input?: ClientBody, options?: {
647
- idempotencyKey?: string;
648
- }): Promise<ViraResponse<ClientBody> | null>;
649
- requestTeachProposalChanges(proposalId: string, feedback: string, options?: {
650
- idempotencyKey?: string;
651
- }): Promise<ViraResponse<ClientBody> | null>;
652
- /** Start a standalone or comparative evaluation; use evaluatePack for Pack lifecycle evaluation. */
653
- startEvaluation(input: ClientBody, options?: {
654
- idempotencyKey?: string;
655
- }): Promise<ViraResponse<ClientBody> | null>;
656
- /** Request a server-executed OFF/current-ON/candidate-ON comparison.
657
- * The server owns arm execution and receipts; callers cannot submit outputs.
658
- */
659
- startComparativeEvaluation(input: ClientBody & {
660
- comparisonPlan: ClientBody;
661
- }, options?: {
662
- idempotencyKey?: string;
663
- }): Promise<ViraResponse<ClientBody> | null>;
664
- evaluateQuality(input: ClientBody, options?: {
665
- idempotencyKey?: string;
666
- }): Promise<ViraResponse<ClientBody> | null>;
667
- getEvaluation(evaluationId: string): Promise<ViraResponse<ClientBody> | null>;
668
- listEvaluations(input?: {
669
- limit?: number;
670
- cursor?: string;
671
- status?: string;
672
- }): Promise<ViraResponse<ClientBody> | null>;
673
- getEvaluationComparison(evaluationId: string): Promise<ViraResponse<ClientBody> | null>;
674
- reviewComparativeFinding(evaluationId: string, findingId: string, input: {
675
- decision: 'ACCEPT' | 'REJECT' | 'EDIT' | 'MORE_EVIDENCE';
676
- reason?: string;
677
- }, options?: {
678
- idempotencyKey?: string;
679
- }): Promise<ViraResponse<ClientBody> | null>;
680
- createEvaluationPlan(input: ClientBody, options?: {
681
- idempotencyKey?: string;
682
- }): Promise<ViraResponse<ClientBody> | null>;
683
- getEvaluationPlan(planId: string): Promise<ViraResponse<ClientBody> | null>;
684
- sealEvaluationPlan(planId: string, options?: {
685
- idempotencyKey?: string;
686
- }): Promise<ViraResponse<ClientBody> | null>;
687
- createImprovementProposal(evaluationId: string, input: ClientBody, options?: {
688
- idempotencyKey?: string;
689
- }): Promise<ViraResponse<ClientBody> | null>;
690
- getImprovementProposal(proposalId: string): Promise<ViraResponse<ClientBody> | null>;
691
- reviewImprovementProposal(proposalId: string, action?: 'request-review' | 'approve' | 'reject', options?: {
692
- idempotencyKey?: string;
693
- }): Promise<ViraResponse<ClientBody> | null>;
694
- editImprovementProposalAsNew(proposalId: string, input: {
695
- id: string;
696
- behaviorSet: ClientBody;
697
- reason: string;
698
- }, options?: {
699
- idempotencyKey?: string;
700
- }): Promise<ViraResponse<ClientBody> | null>;
701
- createBehaviorRevisionCandidate(input: ClientBody, options?: {
702
- idempotencyKey?: string;
703
- }): Promise<ViraResponse<ClientBody> | null>;
704
- evaluateBehaviorRevisionCandidate(candidateId: string, input: ClientBody, options?: {
705
- idempotencyKey?: string;
706
- }): Promise<ViraResponse<ClientBody> | null>;
707
- transitionBehaviorRevisionCandidate(candidateId: string, transition: 'evaluate' | 'accept' | 'reject' | 'pack', input?: ClientBody, options?: {
708
- idempotencyKey?: string;
709
- }): Promise<ViraResponse<ClientBody> | null>;
710
- createPackRevision(input: ClientBody, options?: {
711
- idempotencyKey?: string;
712
- }): Promise<ViraResponse<ClientBody> | null>;
713
- getPackRevision(revisionId: string): Promise<ViraResponse<ClientBody> | null>;
714
- getPackRevisionDiff(revisionId: string): Promise<ViraResponse<ClientBody> | null>;
715
- transitionPackRevision(revisionId: string, transition: 'validate' | 'request-approval' | 'approve' | 'release' | 'reject', options?: {
716
- idempotencyKey?: string;
717
- }): Promise<ViraResponse<ClientBody> | null>;
718
- materializePackRevision(revisionId: string, input: ClientBody, options?: {
719
- idempotencyKey?: string;
720
- }): Promise<ViraResponse<ClientBody> | null>;
721
- createRelease(input: ClientBody, options?: {
722
- idempotencyKey?: string;
723
- }): Promise<ViraResponse<ClientBody> | null>;
724
- createManualRelease(input: ClientBody, options?: {
725
- idempotencyKey?: string;
726
- }): Promise<ViraResponse<ClientBody> | null>;
727
- releaseProgramManually(input: {
728
- programId: string;
729
- reason: string;
730
- }, options?: {
731
- idempotencyKey?: string;
732
- }): Promise<ViraResponse<ClientBody> | null>;
733
- recordDeploymentComparison(deploymentId: string, comparison: ClientBody, options?: {
734
- idempotencyKey?: string;
735
- }): Promise<ViraResponse<ClientBody> | null>;
736
- recordDeploymentHealth(deploymentId: string, health: ClientBody, options?: {
737
- idempotencyKey?: string;
738
- }): Promise<ViraResponse<ClientBody> | null>;
739
- compileBehaviorCapsule(input: {
740
- programId: string;
741
- input: string;
742
- selection?: Record<string, unknown>;
743
- candidates?: readonly string[];
744
- idempotencyKey?: string;
745
- }): Promise<ViraResponse<ClientBody> | null>;
746
- serveBehaviorProjection(input: {
747
- programId?: string;
748
- input: string;
749
- provider: string;
750
- protocol?: string;
751
- idempotencyKey?: string;
752
- }): Promise<ViraResponse<ClientBody> | null>;
753
- testConnection(connectionId: string): Promise<ViraResponse<ClientBody> | null>;
754
- }
755
- export declare function buildRuntimeRequest(input: RuntimeRequest & Record<string, unknown>): RuntimeRequest & Record<string, unknown>;
756
- export declare function buildPublicContentRequest(input: {
757
- slug: string;
758
- version?: string;
759
- }): SdkRequest;
760
- export declare function buildDocsQueryRequest(input: {
761
- query: string;
762
- operation?: "search" | "ask";
763
- }): SdkRequest;
764
- export declare function buildAISystemRequest(input: {
765
- name: string;
766
- systemType: string;
767
- organizationId: string;
768
- projectId: string;
769
- environmentId: string;
770
- }): SdkRequest;
771
- export declare function buildObservationRequest(event: {
772
- organizationId: string;
773
- projectId: string;
774
- environmentId: string;
775
- eventId: string;
776
- eventType: string;
777
- aiSystemId: string;
778
- connectionId: string;
779
- [key: string]: unknown;
780
- }): SdkRequest;
781
- export {};