risicare 0.2.1 → 0.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.
Files changed (74) hide show
  1. package/README.md +131 -45
  2. package/dist/frameworks/instructor.cjs +45 -17
  3. package/dist/frameworks/instructor.cjs.map +1 -1
  4. package/dist/frameworks/instructor.js +47 -17
  5. package/dist/frameworks/instructor.js.map +1 -1
  6. package/dist/frameworks/langchain.cjs +73 -6
  7. package/dist/frameworks/langchain.cjs.map +1 -1
  8. package/dist/frameworks/langchain.d.cts +20 -4
  9. package/dist/frameworks/langchain.d.ts +20 -4
  10. package/dist/frameworks/langchain.js +75 -6
  11. package/dist/frameworks/langchain.js.map +1 -1
  12. package/dist/frameworks/langgraph.cjs +73 -6
  13. package/dist/frameworks/langgraph.cjs.map +1 -1
  14. package/dist/frameworks/langgraph.js +75 -6
  15. package/dist/frameworks/langgraph.js.map +1 -1
  16. package/dist/frameworks/llamaindex.cjs +41 -14
  17. package/dist/frameworks/llamaindex.cjs.map +1 -1
  18. package/dist/frameworks/llamaindex.js +43 -14
  19. package/dist/frameworks/llamaindex.js.map +1 -1
  20. package/dist/index.cjs +1494 -67
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +436 -1
  23. package/dist/index.d.ts +436 -1
  24. package/dist/index.js +1515 -67
  25. package/dist/index.js.map +1 -1
  26. package/dist/providers/anthropic/index.cjs +74 -24
  27. package/dist/providers/anthropic/index.cjs.map +1 -1
  28. package/dist/providers/anthropic/index.js +76 -24
  29. package/dist/providers/anthropic/index.js.map +1 -1
  30. package/dist/providers/bedrock/index.cjs +81 -24
  31. package/dist/providers/bedrock/index.cjs.map +1 -1
  32. package/dist/providers/bedrock/index.js +83 -24
  33. package/dist/providers/bedrock/index.js.map +1 -1
  34. package/dist/providers/cerebras/index.cjs +78 -25
  35. package/dist/providers/cerebras/index.cjs.map +1 -1
  36. package/dist/providers/cerebras/index.js +80 -25
  37. package/dist/providers/cerebras/index.js.map +1 -1
  38. package/dist/providers/cohere/index.cjs +95 -25
  39. package/dist/providers/cohere/index.cjs.map +1 -1
  40. package/dist/providers/cohere/index.js +97 -25
  41. package/dist/providers/cohere/index.js.map +1 -1
  42. package/dist/providers/google/index.cjs +77 -25
  43. package/dist/providers/google/index.cjs.map +1 -1
  44. package/dist/providers/google/index.js +79 -25
  45. package/dist/providers/google/index.js.map +1 -1
  46. package/dist/providers/groq/index.cjs +80 -25
  47. package/dist/providers/groq/index.cjs.map +1 -1
  48. package/dist/providers/groq/index.js +82 -25
  49. package/dist/providers/groq/index.js.map +1 -1
  50. package/dist/providers/huggingface/index.cjs +80 -25
  51. package/dist/providers/huggingface/index.cjs.map +1 -1
  52. package/dist/providers/huggingface/index.js +82 -25
  53. package/dist/providers/huggingface/index.js.map +1 -1
  54. package/dist/providers/mistral/index.cjs +72 -24
  55. package/dist/providers/mistral/index.cjs.map +1 -1
  56. package/dist/providers/mistral/index.js +74 -24
  57. package/dist/providers/mistral/index.js.map +1 -1
  58. package/dist/providers/ollama/index.cjs +83 -25
  59. package/dist/providers/ollama/index.cjs.map +1 -1
  60. package/dist/providers/ollama/index.js +85 -25
  61. package/dist/providers/ollama/index.js.map +1 -1
  62. package/dist/providers/openai/index.cjs +1429 -28
  63. package/dist/providers/openai/index.cjs.map +1 -1
  64. package/dist/providers/openai/index.js +1447 -28
  65. package/dist/providers/openai/index.js.map +1 -1
  66. package/dist/providers/together/index.cjs +80 -25
  67. package/dist/providers/together/index.cjs.map +1 -1
  68. package/dist/providers/together/index.js +82 -25
  69. package/dist/providers/together/index.js.map +1 -1
  70. package/dist/providers/vercel-ai/index.cjs +45 -17
  71. package/dist/providers/vercel-ai/index.cjs.map +1 -1
  72. package/dist/providers/vercel-ai/index.js +47 -17
  73. package/dist/providers/vercel-ai/index.js.map +1 -1
  74. package/package.json +17 -7
package/dist/index.d.cts CHANGED
@@ -374,6 +374,7 @@ declare function getMetrics(): {
374
374
  * Report a caught exception to the self-healing pipeline.
375
375
  *
376
376
  * Creates an error span that triggers diagnosis and fix generation.
377
+ * Deduplicates identical errors within a 5-minute window (SHA256 fingerprint).
377
378
  * This function never throws and is non-blocking.
378
379
  *
379
380
  * @param error - The caught exception (Error object or string)
@@ -638,6 +639,11 @@ interface TraceContext {
638
639
  }
639
640
  /**
640
641
  * Get the current trace context as a serializable object.
642
+ *
643
+ * When called inside a span context, returns the active span's IDs.
644
+ * When called outside a span (e.g. inside session() but before agent()),
645
+ * pre-allocates a trace ID and stores it in context so the next
646
+ * startSpan() call inherits it — preventing trace ID mismatch.
641
647
  */
642
648
  declare function getTraceContext(): TraceContext;
643
649
  /**
@@ -728,4 +734,433 @@ declare function suppressProviderInstrumentation<T>(fn: () => T): T;
728
734
  */
729
735
  declare function isProviderInstrumentationSuppressed(): boolean;
730
736
 
731
- export { type AgentContext, type AgentOptions, AgentRole, MessageType, type RisicareConfig, SemanticPhase, type SessionContext, type SessionOptions, Span, SpanKind, type SpanOptions, SpanStatus, type StartSpanOptions, type TraceContext, type TracedStreamOptions, Tracer, agent, disable, enable, extractTraceContext, flush, getCurrentAgent, getCurrentAgentId, getCurrentContext, getCurrentPhase, getCurrentSession, getCurrentSessionId, getCurrentSpan, getCurrentSpanId, getCurrentTraceId, getMetrics, getSpanById, getTraceContent, getTraceContext, getTracer, init, injectTraceContext, isEnabled, isProviderInstrumentationSuppressed, registerSpan, reportError, score, session, shutdown, suppressProviderInstrumentation, traceAct, traceCoordinate, traceDecide, traceDelegate, traceMessage, traceObserve, traceThink, tracedStream, unregisterSpan, withAgent, withPhase, withSession };
737
+ /**
738
+ * Fix Runtime Configuration.
739
+ *
740
+ * Settings for the fix runtime including caching, refresh intervals,
741
+ * A/B testing, and fix application behavior.
742
+ *
743
+ * Port of Python SDK's runtime/config.py adapted for Node.js patterns.
744
+ */
745
+ interface FixRuntimeConfig {
746
+ /** API endpoint URL (e.g., "https://app.risicare.ai") */
747
+ apiEndpoint: string;
748
+ /** API key for authentication (format: "rsk-{random}") */
749
+ apiKey: string;
750
+ /** Whether the fix runtime is enabled (default: true) */
751
+ enabled?: boolean;
752
+ /** Whether caching is enabled (default: true) */
753
+ cacheEnabled?: boolean;
754
+ /** Cache entry TTL in milliseconds (default: 300_000 = 5 min) */
755
+ cacheTtlMs?: number;
756
+ /** Maximum number of cache entries (default: 1000) */
757
+ cacheMaxEntries?: number;
758
+ /** Whether to auto-refresh fixes in background (default: true) */
759
+ autoRefresh?: boolean;
760
+ /** Background refresh interval in milliseconds (default: 60_000 = 1 min) */
761
+ refreshIntervalMs?: number;
762
+ /** Log but don't apply fixes (default: false) */
763
+ dryRun?: boolean;
764
+ /** Whether A/B testing bucketing is active (default: true) */
765
+ abTestingEnabled?: boolean;
766
+ /** Timeout for API requests in milliseconds (default: 1000) */
767
+ timeoutMs?: number;
768
+ /** Enable debug logging (default: false) */
769
+ debug?: boolean;
770
+ }
771
+ type FixType = 'prompt' | 'parameter' | 'retry' | 'fallback' | 'guard' | 'routing' | 'tool';
772
+ interface ActiveFix {
773
+ fixId: string;
774
+ deploymentId?: string;
775
+ errorCode: string;
776
+ fixType: FixType;
777
+ config: Record<string, unknown>;
778
+ trafficPercentage: number;
779
+ version: number;
780
+ }
781
+
782
+ /**
783
+ * Fix Cache — Local cache for active fixes with TTL eviction.
784
+ *
785
+ * Provides fast lookup of fixes keyed by error code with exact match
786
+ * and wildcard fallback. No locks needed — JS is single-threaded.
787
+ *
788
+ * Port of Python SDK's runtime/cache.py.
789
+ */
790
+
791
+ interface CacheStats {
792
+ hits: number;
793
+ misses: number;
794
+ evictions: number;
795
+ size: number;
796
+ lastRefresh: number | null;
797
+ }
798
+ declare class FixCache {
799
+ private readonly _ttlMs;
800
+ private readonly _maxEntries;
801
+ private readonly _enabled;
802
+ private _cache;
803
+ private _stats;
804
+ constructor(config?: Pick<FixRuntimeConfig, 'cacheEnabled' | 'cacheTtlMs' | 'cacheMaxEntries'>);
805
+ /** Whether caching is enabled. */
806
+ get enabled(): boolean;
807
+ /**
808
+ * Get a fix by error code.
809
+ *
810
+ * Checks exact match first, then scans for wildcard matches.
811
+ * Expired entries are evicted on access.
812
+ */
813
+ get(errorCode: string): ActiveFix | null;
814
+ /**
815
+ * Add a single fix to the cache.
816
+ *
817
+ * Evicts the oldest entry if at capacity.
818
+ */
819
+ set(fix: ActiveFix): void;
820
+ /**
821
+ * Replace all cached fixes (bulk refresh).
822
+ *
823
+ * Clears the cache and populates with the given fixes.
824
+ */
825
+ setAll(fixes: ActiveFix[]): void;
826
+ /**
827
+ * Get all non-expired fixes.
828
+ */
829
+ getAll(): ActiveFix[];
830
+ /** Clear all cache entries. Returns the number of entries cleared. */
831
+ clear(): number;
832
+ /** Get cache statistics. */
833
+ get stats(): CacheStats;
834
+ /** Evict the oldest cache entry. */
835
+ private _evictOldest;
836
+ }
837
+
838
+ /**
839
+ * Fix Applier — Applies fixes to agent operations.
840
+ *
841
+ * Handles different fix types:
842
+ * - PromptFix: Modify system/user prompts (prepend, append, replace, few_shot)
843
+ * - ParameterFix: Adjust LLM parameters (temperature, model, etc.)
844
+ * - RetryFix: Retry with exponential backoff + jitter
845
+ * - FallbackFix: Switch to fallback model or default response
846
+ * - GuardFix: Input/output validation (content filter, format check, length)
847
+ *
848
+ * Port of Python SDK's runtime/applier.py adapted for Node.js.
849
+ */
850
+
851
+ interface ApplyResult {
852
+ applied: boolean;
853
+ fixId?: string;
854
+ deploymentId?: string;
855
+ fixType?: string;
856
+ modifications: Record<string, unknown>;
857
+ error?: string;
858
+ }
859
+ declare class FixApplier {
860
+ private readonly _config;
861
+ private readonly _cache;
862
+ private _applicationLog;
863
+ constructor(config: FixRuntimeConfig, cache: FixCache);
864
+ /**
865
+ * Get applicable fix for an error code.
866
+ *
867
+ * Considers A/B testing bucket if sessionId is provided. Uses
868
+ * crypto.createHash('md5') for deterministic bucketing across restarts.
869
+ */
870
+ getFixForError(errorCode: string, sessionId?: string): ActiveFix | null;
871
+ /**
872
+ * Apply a prompt fix to messages.
873
+ *
874
+ * Supports 4 modification types:
875
+ * - prepend: Add content before first system message
876
+ * - append: Add content after first system message
877
+ * - replace: Regex replace across all messages
878
+ * - few_shot: Insert user/assistant example pairs after system message
879
+ */
880
+ applyPromptFix(fix: ActiveFix, messages: Record<string, unknown>[]): {
881
+ messages: Record<string, unknown>[];
882
+ result: ApplyResult;
883
+ };
884
+ /**
885
+ * Apply a parameter fix — merge config.parameters into params.
886
+ */
887
+ applyParameterFix(fix: ActiveFix, params: Record<string, unknown>): {
888
+ params: Record<string, unknown>;
889
+ result: ApplyResult;
890
+ };
891
+ /**
892
+ * Apply a retry fix to an async operation.
893
+ *
894
+ * Retries with exponential backoff + jitter using
895
+ * `await new Promise(r => setTimeout(r, delay))`.
896
+ */
897
+ applyRetryFix<T>(fix: ActiveFix, operation: () => Promise<T>): Promise<{
898
+ value: T;
899
+ result: ApplyResult;
900
+ }>;
901
+ /**
902
+ * Apply a fallback fix.
903
+ *
904
+ * - 'model': Replace params.model with the fallback model
905
+ * - 'default': Set params._fallbackResponse for the caller to use
906
+ */
907
+ applyFallbackFix(fix: ActiveFix, params: Record<string, unknown>): {
908
+ params: Record<string, unknown>;
909
+ result: ApplyResult;
910
+ };
911
+ /**
912
+ * Apply a guard fix (validation).
913
+ *
914
+ * Guard types:
915
+ * - content_filter: Regex-based blocked patterns
916
+ * - format_check: JSON.parse() validity
917
+ * - input_validation / output_validation: min/max length
918
+ */
919
+ applyGuardFix(fix: ActiveFix, content: string, isInput?: boolean): {
920
+ content: string;
921
+ passed: boolean;
922
+ result: ApplyResult;
923
+ };
924
+ /** Log a fix application result. */
925
+ logApplication(result: ApplyResult): void;
926
+ /** Get the application log. */
927
+ getApplicationLog(): ApplyResult[];
928
+ /**
929
+ * Safely compile a regex pattern from untrusted input.
930
+ * Returns null if invalid or too long.
931
+ */
932
+ private _safeCompileRegex;
933
+ /** Prepend content to the first message matching the target role. */
934
+ private _prependToTarget;
935
+ /** Append content to the first message matching the target role. */
936
+ private _appendToTarget;
937
+ /** Regex replace across all messages. */
938
+ private _replaceInMessages;
939
+ /** Add few-shot examples after the first system message. */
940
+ private _addFewShotExamples;
941
+ }
942
+
943
+ /**
944
+ * Fix Loader — Fetches active fixes from the Risicare API.
945
+ *
946
+ * Handles:
947
+ * - Initial loading of fixes on startup
948
+ * - Periodic background refresh via setInterval (unref'd)
949
+ * - Exponential backoff on failure
950
+ * - Circuit breaker: after 3 consecutive failures, stop trying for 30s
951
+ *
952
+ * Uses native fetch (Node.js 18+) with AbortController for timeouts.
953
+ *
954
+ * Port of Python SDK's runtime/loader.py adapted for Node.js.
955
+ */
956
+
957
+ declare class FixLoader {
958
+ private readonly _config;
959
+ private readonly _cache;
960
+ private _refreshTimer;
961
+ private _lastLoadTime;
962
+ private _consecutiveFailures;
963
+ private _circuitOpenUntil;
964
+ private _onLoadCallbacks;
965
+ private static readonly CIRCUIT_BREAKER_THRESHOLD;
966
+ private static readonly CIRCUIT_BREAKER_COOLDOWN_MS;
967
+ constructor(config: FixRuntimeConfig, cache: FixCache);
968
+ /** Timestamp of last successful load. */
969
+ get lastLoadTime(): number | null;
970
+ /**
971
+ * Start the loader: perform initial load and start background refresh.
972
+ *
973
+ * Never throws — failures are logged and the runtime degrades gracefully.
974
+ */
975
+ start(): void;
976
+ /** Stop the loader: clear the refresh interval. */
977
+ stop(): void;
978
+ /**
979
+ * Register a callback invoked after each successful load.
980
+ */
981
+ onLoad(callback: (fixes: ActiveFix[]) => void): void;
982
+ /**
983
+ * Load fixes from the API.
984
+ *
985
+ * Name kept as "loadSync" for parity with the Python SDK, but this
986
+ * returns a Promise in JS (there's no synchronous fetch in Node.js).
987
+ */
988
+ loadSync(): Promise<ActiveFix[]>;
989
+ /** Get currently cached fixes without hitting the API. */
990
+ getCached(): ActiveFix[];
991
+ private _parseResponse;
992
+ private _onLoadSuccess;
993
+ private _onLoadFailure;
994
+ private _startRefreshInterval;
995
+ }
996
+
997
+ /**
998
+ * Fix Interceptors — Hook into LLM/tool calls to apply fixes.
999
+ *
1000
+ * Interceptors are registered with the runtime and called during agent
1001
+ * execution to apply relevant fixes at three interception points:
1002
+ * - preCall: Before the LLM/tool call (prompt/parameter/fallback fixes)
1003
+ * - postCall: After the call (output guard validation)
1004
+ * - onError: When an error occurs (retry/fallback decisions)
1005
+ *
1006
+ * Port of Python SDK's runtime/interceptors.py adapted for Node.js.
1007
+ */
1008
+
1009
+ interface InterceptContext {
1010
+ /** Type of operation: "llm_call", "tool_call", "agent_delegate" */
1011
+ operationType: string;
1012
+ /** Name of the operation: model name, tool name, agent name */
1013
+ operationName: string;
1014
+ /** Session ID for A/B testing bucketing */
1015
+ sessionId?: string;
1016
+ /** Trace ID for correlation */
1017
+ traceId?: string;
1018
+ /** Error code (set when retrying after error) */
1019
+ errorCode?: string;
1020
+ /** Error message (set when retrying after error) */
1021
+ errorMessage?: string;
1022
+ /** Current attempt number (1-based) */
1023
+ attempt: number;
1024
+ /** Fixes applied during this intercept lifecycle */
1025
+ appliedFixes: ApplyResult[];
1026
+ }
1027
+ interface FixInterceptor {
1028
+ /**
1029
+ * Called before an LLM/tool call.
1030
+ * Returns modified messages and params.
1031
+ */
1032
+ preCall(ctx: InterceptContext, messages: unknown[] | null, params: Record<string, unknown>): {
1033
+ messages: unknown[] | null;
1034
+ params: Record<string, unknown>;
1035
+ };
1036
+ /**
1037
+ * Called after an LLM/tool call.
1038
+ * Returns modified response and whether to continue.
1039
+ */
1040
+ postCall(ctx: InterceptContext, response: unknown): {
1041
+ response: unknown;
1042
+ shouldContinue: boolean;
1043
+ };
1044
+ /**
1045
+ * Called when an error occurs.
1046
+ * Returns whether to retry and optional modified params.
1047
+ */
1048
+ onError(ctx: InterceptContext, error: Error): {
1049
+ shouldRetry: boolean;
1050
+ modifiedParams: Record<string, unknown> | null;
1051
+ };
1052
+ }
1053
+
1054
+ /**
1055
+ * Fix Runtime — Main orchestrator for the fix application system.
1056
+ *
1057
+ * Manages:
1058
+ * - Loading active fixes from the API (via FixLoader)
1059
+ * - Caching fixes locally (via FixCache)
1060
+ * - Applying fixes via interceptors (via DefaultFixInterceptor)
1061
+ * - Tracking fix effectiveness
1062
+ *
1063
+ * Singleton management via globalThis (same pattern as the tracer).
1064
+ *
1065
+ * Port of Python SDK's runtime/runtime.py adapted for Node.js.
1066
+ */
1067
+
1068
+ declare class FixRuntime {
1069
+ private readonly _config;
1070
+ private readonly _cache;
1071
+ private readonly _loader;
1072
+ private readonly _applier;
1073
+ private readonly _interceptor;
1074
+ private _started;
1075
+ private _fixApplications;
1076
+ private _fixSuccesses;
1077
+ constructor(config: FixRuntimeConfig);
1078
+ /** Runtime configuration (with defaults resolved). */
1079
+ get config(): Required<FixRuntimeConfig>;
1080
+ /** Whether the runtime is enabled and started. */
1081
+ get isEnabled(): boolean;
1082
+ /** The fix cache. */
1083
+ get cache(): FixCache;
1084
+ /** The fix loader. */
1085
+ get loader(): FixLoader;
1086
+ /** The fix applier. */
1087
+ get applier(): FixApplier;
1088
+ /** The interceptor. */
1089
+ get interceptor(): FixInterceptor;
1090
+ /**
1091
+ * Start the runtime.
1092
+ *
1093
+ * Triggers initial fix load and starts background refresh.
1094
+ * Never throws — failures degrade gracefully.
1095
+ */
1096
+ start(): void;
1097
+ /**
1098
+ * Stop the runtime.
1099
+ *
1100
+ * Stops background refresh and clears the cache.
1101
+ * Never throws.
1102
+ */
1103
+ stop(): void;
1104
+ /**
1105
+ * Intercept a call: create context and run preCall fixes.
1106
+ *
1107
+ * Returns modified messages/params and the InterceptContext for
1108
+ * use in subsequent interceptResponse / interceptError calls.
1109
+ */
1110
+ interceptCall(operationType: string, operationName: string, messages: unknown[] | null, params: Record<string, unknown>, options?: {
1111
+ sessionId?: string;
1112
+ traceId?: string;
1113
+ errorCode?: string;
1114
+ }): {
1115
+ messages: unknown[] | null;
1116
+ params: Record<string, unknown>;
1117
+ ctx: InterceptContext;
1118
+ };
1119
+ /**
1120
+ * Intercept a response: run postCall fixes (output validation).
1121
+ */
1122
+ interceptResponse(ctx: InterceptContext, response: unknown): {
1123
+ response: unknown;
1124
+ shouldContinue: boolean;
1125
+ };
1126
+ /**
1127
+ * Intercept an error: decide on retry/fallback.
1128
+ */
1129
+ interceptError(ctx: InterceptContext, error: Error): {
1130
+ shouldRetry: boolean;
1131
+ modifiedParams: Record<string, unknown> | null;
1132
+ };
1133
+ /**
1134
+ * Get applicable fix for an error code.
1135
+ */
1136
+ getFix(errorCode: string, sessionId?: string): ActiveFix | null;
1137
+ /**
1138
+ * Manually refresh fixes from the API.
1139
+ */
1140
+ refreshFixes(): Promise<ActiveFix[]>;
1141
+ /** Get effectiveness statistics for all fixes. */
1142
+ getEffectivenessStats(): Record<string, {
1143
+ applications: number;
1144
+ successes: number;
1145
+ successRate: number;
1146
+ }>;
1147
+ private _trackSuccess;
1148
+ private _trackFailure;
1149
+ }
1150
+ /** Get the global FixRuntime instance, if initialized. */
1151
+ declare function getFixRuntime(): FixRuntime | undefined;
1152
+ /**
1153
+ * Initialize and start the global FixRuntime.
1154
+ *
1155
+ * If already initialized, returns the existing instance.
1156
+ * Never throws — initialization failures degrade gracefully.
1157
+ */
1158
+ declare function initFixRuntime(config: FixRuntimeConfig): FixRuntime;
1159
+ /**
1160
+ * Shutdown and remove the global FixRuntime.
1161
+ *
1162
+ * Never throws.
1163
+ */
1164
+ declare function shutdownFixRuntime(): void;
1165
+
1166
+ export { type ActiveFix, type AgentContext, type AgentOptions, AgentRole, type FixRuntimeConfig, MessageType, type RisicareConfig, SemanticPhase, type SessionContext, type SessionOptions, Span, SpanKind, type SpanOptions, SpanStatus, type StartSpanOptions, type TraceContext, type TracedStreamOptions, Tracer, agent, disable, enable, extractTraceContext, flush, getCurrentAgent, getCurrentAgentId, getCurrentContext, getCurrentPhase, getCurrentSession, getCurrentSessionId, getCurrentSpan, getCurrentSpanId, getCurrentTraceId, getFixRuntime, getMetrics, getSpanById, getTraceContent, getTraceContext, getTracer, init, initFixRuntime, injectTraceContext, isEnabled, isProviderInstrumentationSuppressed, registerSpan, reportError, score, session, shutdown, shutdownFixRuntime, suppressProviderInstrumentation, traceAct, traceCoordinate, traceDecide, traceDelegate, traceMessage, traceObserve, traceThink, tracedStream, unregisterSpan, withAgent, withPhase, withSession };