@zespan/sdk 1.1.0 → 1.3.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.d.mts +9 -11
- package/dist/index.d.ts +9 -11
- package/dist/index.js +11 -10
- package/dist/index.mjs +11 -10
- package/package.json +6 -1
package/dist/index.d.mts
CHANGED
|
@@ -272,9 +272,7 @@ declare class ZespanClient {
|
|
|
272
272
|
}
|
|
273
273
|
declare const initZespan: (o: ZespanOptions) => void;
|
|
274
274
|
declare const getZespanClient: () => ZespanClient;
|
|
275
|
-
|
|
276
275
|
declare const init: (o: ZespanOptions) => void;
|
|
277
|
-
declare const getLumiqClient: () => ZespanClient;
|
|
278
276
|
|
|
279
277
|
declare function wrapOpenAI<T extends any>(client: T, options?: WrapperGuardrailsOptions): T;
|
|
280
278
|
|
|
@@ -282,6 +280,8 @@ declare function wrapAnthropic<T extends any>(client: T, options?: WrapperGuardr
|
|
|
282
280
|
|
|
283
281
|
declare function wrapGoogle<T extends any>(client: T, options?: WrapperGuardrailsOptions): T;
|
|
284
282
|
|
|
283
|
+
declare function wrapGoogleGenAI<T extends object>(client: T, options?: WrapperGuardrailsOptions): T;
|
|
284
|
+
|
|
285
285
|
declare function wrapOpenRouter(baseClient: OpenAI, options?: WrapperGuardrailsOptions): OpenAI;
|
|
286
286
|
|
|
287
287
|
interface WrapBedrockOptions extends WrapperGuardrailsOptions {
|
|
@@ -333,7 +333,6 @@ declare class ZespanCallbackHandler extends BaseCallbackHandler {
|
|
|
333
333
|
handleRetrieverEnd(documents: any[], runId: string): Promise<void>;
|
|
334
334
|
handleRetrieverError(err: any, runId: string): Promise<void>;
|
|
335
335
|
}
|
|
336
|
-
declare const LumiqCallbackHandler: typeof ZespanCallbackHandler;
|
|
337
336
|
|
|
338
337
|
declare class ZespanADKCallbackHandler {
|
|
339
338
|
private agentStates;
|
|
@@ -398,9 +397,9 @@ declare function instrumentVercelAI(): {
|
|
|
398
397
|
tracer: Tracer;
|
|
399
398
|
telemetry: TelemetrySettings;
|
|
400
399
|
};
|
|
401
|
-
declare function
|
|
400
|
+
declare function getZespanVercelTelemetry(): TelemetrySettings;
|
|
402
401
|
|
|
403
|
-
declare class
|
|
402
|
+
declare class ZespanLlamaIndexHandler {
|
|
404
403
|
private runs;
|
|
405
404
|
private guardrailSettings;
|
|
406
405
|
constructor(options?: WrapperGuardrailsOptions);
|
|
@@ -447,8 +446,6 @@ interface ZespanContextOptions {
|
|
|
447
446
|
declare function withZespanContext<T>(options: ZespanContextOptions, fn: () => T | Promise<T>): T | Promise<T>;
|
|
448
447
|
declare function withZespanTrace<T>(fn: () => T | Promise<T>, options?: ZespanContextOptions): T | Promise<T>;
|
|
449
448
|
declare const withZespan: typeof withZespanTrace;
|
|
450
|
-
type LumiqContextOptions = ZespanContextOptions;
|
|
451
|
-
declare const withLumiqContext: typeof withZespanContext;
|
|
452
449
|
|
|
453
450
|
interface AgentOptions {
|
|
454
451
|
name: string;
|
|
@@ -516,7 +513,7 @@ declare function getCrewAIInstrumentationGuide(): string;
|
|
|
516
513
|
* Attach trace context to an AutoGen message payload.
|
|
517
514
|
*/
|
|
518
515
|
declare function attachTraceToAutoGenMessage<T extends Record<string, unknown>>(message: T, delegationReason?: string): T & {
|
|
519
|
-
|
|
516
|
+
_zespan_trace: Record<string, string>;
|
|
520
517
|
};
|
|
521
518
|
/**
|
|
522
519
|
* Extract trace context from an incoming AutoGen message.
|
|
@@ -546,6 +543,7 @@ declare const zespan: {
|
|
|
546
543
|
wrapOpenAI: typeof wrapOpenAI;
|
|
547
544
|
wrapAnthropic: typeof wrapAnthropic;
|
|
548
545
|
wrapGoogle: typeof wrapGoogle;
|
|
546
|
+
wrapGoogleGenAI: typeof wrapGoogleGenAI;
|
|
549
547
|
wrapOpenRouter: typeof wrapOpenRouter;
|
|
550
548
|
wrapADKAgent: typeof wrapADKAgent;
|
|
551
549
|
wrapADKRunner: typeof wrapADKRunner;
|
|
@@ -565,8 +563,8 @@ declare const zespan: {
|
|
|
565
563
|
markFrameworkActive: typeof markFrameworkActive;
|
|
566
564
|
markFrameworkInactive: typeof markFrameworkInactive;
|
|
567
565
|
instrumentVercelAI: typeof instrumentVercelAI;
|
|
568
|
-
|
|
569
|
-
|
|
566
|
+
getZespanVercelTelemetry: typeof getZespanVercelTelemetry;
|
|
567
|
+
ZespanLlamaIndexHandler: typeof ZespanLlamaIndexHandler;
|
|
570
568
|
};
|
|
571
569
|
|
|
572
|
-
export { type ADKAgentOptions, type ADKRunnerOptions, AgentContext, type AgentOptions, BaggageSpanProcessor, CREWAI_OTEL_ENV, GuardrailBlockedError, type GuardrailCheckInput, type GuardrailCheckResponse, type GuardrailResult, type InstrumentADKOptions,
|
|
570
|
+
export { type ADKAgentOptions, type ADKRunnerOptions, AgentContext, type AgentOptions, BaggageSpanProcessor, CREWAI_OTEL_ENV, GuardrailBlockedError, type GuardrailCheckInput, type GuardrailCheckResponse, type GuardrailResult, type InstrumentADKOptions, type OTelConfig, type Prompt, PromptClient, type PromptOptions, type ResolvedWrapperGuardrailsSettings, type WrapperGuardrailsOptions, type WrapperGuardrailsSettings, ZespanADKCallbackHandler, ZespanCallbackHandler, ZespanClient, type ZespanContextOptions, ZespanLlamaIndexHandler, attachTraceToAutoGenMessage, autopatch, createSpan, extractAgentContext, extractAgentContext as extractAutoGenContext, extractTraceFromAutoGenMessage, getCrewAIInstrumentationGuide, getPydanticAIConfig, getTracer, getZespanClient, getZespanVercelTelemetry, init, initOTel, initZespan, injectAgentContext, injectAgentContext as injectAutoGenContext, instrumentADK, instrumentVercelAI, markFrameworkActive, markFrameworkInactive, startSpan, withAgent, withSpan, withZespan, withZespanContext, withZespanTrace, wrapADKAgent, wrapADKRunner, wrapAnthropic, wrapBedrock, wrapGoogle, wrapGoogleGenAI, wrapGroq, wrapLiteLLM, wrapMistral, wrapOpenAI, wrapOpenRouter, wrapZespanADKAgent, zespan };
|
package/dist/index.d.ts
CHANGED
|
@@ -272,9 +272,7 @@ declare class ZespanClient {
|
|
|
272
272
|
}
|
|
273
273
|
declare const initZespan: (o: ZespanOptions) => void;
|
|
274
274
|
declare const getZespanClient: () => ZespanClient;
|
|
275
|
-
|
|
276
275
|
declare const init: (o: ZespanOptions) => void;
|
|
277
|
-
declare const getLumiqClient: () => ZespanClient;
|
|
278
276
|
|
|
279
277
|
declare function wrapOpenAI<T extends any>(client: T, options?: WrapperGuardrailsOptions): T;
|
|
280
278
|
|
|
@@ -282,6 +280,8 @@ declare function wrapAnthropic<T extends any>(client: T, options?: WrapperGuardr
|
|
|
282
280
|
|
|
283
281
|
declare function wrapGoogle<T extends any>(client: T, options?: WrapperGuardrailsOptions): T;
|
|
284
282
|
|
|
283
|
+
declare function wrapGoogleGenAI<T extends object>(client: T, options?: WrapperGuardrailsOptions): T;
|
|
284
|
+
|
|
285
285
|
declare function wrapOpenRouter(baseClient: OpenAI, options?: WrapperGuardrailsOptions): OpenAI;
|
|
286
286
|
|
|
287
287
|
interface WrapBedrockOptions extends WrapperGuardrailsOptions {
|
|
@@ -333,7 +333,6 @@ declare class ZespanCallbackHandler extends BaseCallbackHandler {
|
|
|
333
333
|
handleRetrieverEnd(documents: any[], runId: string): Promise<void>;
|
|
334
334
|
handleRetrieverError(err: any, runId: string): Promise<void>;
|
|
335
335
|
}
|
|
336
|
-
declare const LumiqCallbackHandler: typeof ZespanCallbackHandler;
|
|
337
336
|
|
|
338
337
|
declare class ZespanADKCallbackHandler {
|
|
339
338
|
private agentStates;
|
|
@@ -398,9 +397,9 @@ declare function instrumentVercelAI(): {
|
|
|
398
397
|
tracer: Tracer;
|
|
399
398
|
telemetry: TelemetrySettings;
|
|
400
399
|
};
|
|
401
|
-
declare function
|
|
400
|
+
declare function getZespanVercelTelemetry(): TelemetrySettings;
|
|
402
401
|
|
|
403
|
-
declare class
|
|
402
|
+
declare class ZespanLlamaIndexHandler {
|
|
404
403
|
private runs;
|
|
405
404
|
private guardrailSettings;
|
|
406
405
|
constructor(options?: WrapperGuardrailsOptions);
|
|
@@ -447,8 +446,6 @@ interface ZespanContextOptions {
|
|
|
447
446
|
declare function withZespanContext<T>(options: ZespanContextOptions, fn: () => T | Promise<T>): T | Promise<T>;
|
|
448
447
|
declare function withZespanTrace<T>(fn: () => T | Promise<T>, options?: ZespanContextOptions): T | Promise<T>;
|
|
449
448
|
declare const withZespan: typeof withZespanTrace;
|
|
450
|
-
type LumiqContextOptions = ZespanContextOptions;
|
|
451
|
-
declare const withLumiqContext: typeof withZespanContext;
|
|
452
449
|
|
|
453
450
|
interface AgentOptions {
|
|
454
451
|
name: string;
|
|
@@ -516,7 +513,7 @@ declare function getCrewAIInstrumentationGuide(): string;
|
|
|
516
513
|
* Attach trace context to an AutoGen message payload.
|
|
517
514
|
*/
|
|
518
515
|
declare function attachTraceToAutoGenMessage<T extends Record<string, unknown>>(message: T, delegationReason?: string): T & {
|
|
519
|
-
|
|
516
|
+
_zespan_trace: Record<string, string>;
|
|
520
517
|
};
|
|
521
518
|
/**
|
|
522
519
|
* Extract trace context from an incoming AutoGen message.
|
|
@@ -546,6 +543,7 @@ declare const zespan: {
|
|
|
546
543
|
wrapOpenAI: typeof wrapOpenAI;
|
|
547
544
|
wrapAnthropic: typeof wrapAnthropic;
|
|
548
545
|
wrapGoogle: typeof wrapGoogle;
|
|
546
|
+
wrapGoogleGenAI: typeof wrapGoogleGenAI;
|
|
549
547
|
wrapOpenRouter: typeof wrapOpenRouter;
|
|
550
548
|
wrapADKAgent: typeof wrapADKAgent;
|
|
551
549
|
wrapADKRunner: typeof wrapADKRunner;
|
|
@@ -565,8 +563,8 @@ declare const zespan: {
|
|
|
565
563
|
markFrameworkActive: typeof markFrameworkActive;
|
|
566
564
|
markFrameworkInactive: typeof markFrameworkInactive;
|
|
567
565
|
instrumentVercelAI: typeof instrumentVercelAI;
|
|
568
|
-
|
|
569
|
-
|
|
566
|
+
getZespanVercelTelemetry: typeof getZespanVercelTelemetry;
|
|
567
|
+
ZespanLlamaIndexHandler: typeof ZespanLlamaIndexHandler;
|
|
570
568
|
};
|
|
571
569
|
|
|
572
|
-
export { type ADKAgentOptions, type ADKRunnerOptions, AgentContext, type AgentOptions, BaggageSpanProcessor, CREWAI_OTEL_ENV, GuardrailBlockedError, type GuardrailCheckInput, type GuardrailCheckResponse, type GuardrailResult, type InstrumentADKOptions,
|
|
570
|
+
export { type ADKAgentOptions, type ADKRunnerOptions, AgentContext, type AgentOptions, BaggageSpanProcessor, CREWAI_OTEL_ENV, GuardrailBlockedError, type GuardrailCheckInput, type GuardrailCheckResponse, type GuardrailResult, type InstrumentADKOptions, type OTelConfig, type Prompt, PromptClient, type PromptOptions, type ResolvedWrapperGuardrailsSettings, type WrapperGuardrailsOptions, type WrapperGuardrailsSettings, ZespanADKCallbackHandler, ZespanCallbackHandler, ZespanClient, type ZespanContextOptions, ZespanLlamaIndexHandler, attachTraceToAutoGenMessage, autopatch, createSpan, extractAgentContext, extractAgentContext as extractAutoGenContext, extractTraceFromAutoGenMessage, getCrewAIInstrumentationGuide, getPydanticAIConfig, getTracer, getZespanClient, getZespanVercelTelemetry, init, initOTel, initZespan, injectAgentContext, injectAgentContext as injectAutoGenContext, instrumentADK, instrumentVercelAI, markFrameworkActive, markFrameworkInactive, startSpan, withAgent, withSpan, withZespan, withZespanContext, withZespanTrace, wrapADKAgent, wrapADKRunner, wrapAnthropic, wrapBedrock, wrapGoogle, wrapGoogleGenAI, wrapGroq, wrapLiteLLM, wrapMistral, wrapOpenAI, wrapOpenRouter, wrapZespanADKAgent, zespan };
|