@sailfish-ai/sf-veritas 0.2.2 → 0.2.3

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.
@@ -62,6 +62,7 @@ export declare class FuncspanConfigLoader {
62
62
  export declare function initializeConfigLoader(rootPaths?: string[], debug?: boolean): Promise<void>;
63
63
  /**
64
64
  * Get configuration for a file and function
65
+ * In worker processes where config loader isn't initialized, returns env config
65
66
  */
66
67
  export declare function getGlobalConfig(filePath: string, functionName?: string): FuncspanConfig;
67
68
  /**
@@ -0,0 +1,33 @@
1
+ import { BaseTransmitter } from "./baseTransmitter";
2
+ /**
3
+ * FunctionSpanTransmitter - Transmits function span data to the backend
4
+ */
5
+ export declare class FunctionSpanTransmitter extends BaseTransmitter {
6
+ constructor();
7
+ /**
8
+ * Send function span data to the backend
9
+ * Sends each span individually as the backend expects single spans, not arrays
10
+ * This is TRULY non-blocking - fire and forget
11
+ */
12
+ send(functionSpans: FunctionSpanData[]): void;
13
+ /**
14
+ * GraphQL mutation query for collecting function spans
15
+ */
16
+ private getQuery;
17
+ }
18
+ export interface FunctionSpanData {
19
+ functionName: string;
20
+ filePath: string;
21
+ metadata: {
22
+ line: number;
23
+ column: number;
24
+ paramNames: string[];
25
+ };
26
+ args: Record<string, any> | null;
27
+ result: any;
28
+ error: string | null;
29
+ duration: number;
30
+ async: boolean;
31
+ spanId: string;
32
+ parentSpanId: string | null;
33
+ }
@@ -86,6 +86,11 @@ declare class AppConfig {
86
86
  get serviceIdentificationReceived(): boolean;
87
87
  setServiceIdentificationReceived(value: boolean): void;
88
88
  }
89
+ /**
90
+ * Retrieves the global configuration instance without throwing an error if not initialized.
91
+ * Returns undefined if configuration hasn't been initialized yet.
92
+ */
93
+ export declare function getGlobalConfigUnsafe(): AppConfig | undefined;
89
94
  /**
90
95
  * Create the global configuration with the provided SetupOptions
91
96
  * This should be called once at the start of the application.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sailfish-ai/sf-veritas",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "publishPublicly": true,
5
5
  "description": "A versatile Edge Runtime-compatible package for JavaScript and TypeScript backend systems and scripts.",
6
6
  "main": "./dist/sf-veritas.cjs",