@prefactor/sdk 0.1.3 → 0.1.4

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 (56) hide show
  1. package/dist/index.cjs +16 -1253
  2. package/dist/index.cjs.map +4 -17
  3. package/dist/index.d.ts +2 -81
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +4 -1255
  6. package/dist/index.js.map +4 -17
  7. package/package.json +6 -22
  8. package/LICENSE +0 -14
  9. package/README.md +0 -313
  10. package/dist/LICENSE +0 -14
  11. package/dist/README.md +0 -313
  12. package/dist/config.d.ts +0 -259
  13. package/dist/config.d.ts.map +0 -1
  14. package/dist/config.js +0 -110
  15. package/dist/config.js.map +0 -1
  16. package/dist/instrumentation/langchain/metadata-extractor.d.ts +0 -20
  17. package/dist/instrumentation/langchain/metadata-extractor.d.ts.map +0 -1
  18. package/dist/instrumentation/langchain/metadata-extractor.js +0 -54
  19. package/dist/instrumentation/langchain/metadata-extractor.js.map +0 -1
  20. package/dist/instrumentation/langchain/middleware.d.ts +0 -84
  21. package/dist/instrumentation/langchain/middleware.d.ts.map +0 -1
  22. package/dist/instrumentation/langchain/middleware.js +0 -181
  23. package/dist/instrumentation/langchain/middleware.js.map +0 -1
  24. package/dist/package.json +0 -56
  25. package/dist/tracing/context.d.ts +0 -53
  26. package/dist/tracing/context.d.ts.map +0 -1
  27. package/dist/tracing/context.js +0 -65
  28. package/dist/tracing/context.js.map +0 -1
  29. package/dist/tracing/span.d.ts +0 -68
  30. package/dist/tracing/span.d.ts.map +0 -1
  31. package/dist/tracing/span.js +0 -21
  32. package/dist/tracing/span.js.map +0 -1
  33. package/dist/tracing/tracer.d.ts +0 -100
  34. package/dist/tracing/tracer.d.ts.map +0 -1
  35. package/dist/tracing/tracer.js +0 -151
  36. package/dist/tracing/tracer.js.map +0 -1
  37. package/dist/transport/base.d.ts +0 -38
  38. package/dist/transport/base.d.ts.map +0 -1
  39. package/dist/transport/base.js +0 -2
  40. package/dist/transport/base.js.map +0 -1
  41. package/dist/transport/http.d.ts +0 -90
  42. package/dist/transport/http.d.ts.map +0 -1
  43. package/dist/transport/http.js +0 -399
  44. package/dist/transport/http.js.map +0 -1
  45. package/dist/transport/stdio.d.ts +0 -48
  46. package/dist/transport/stdio.d.ts.map +0 -1
  47. package/dist/transport/stdio.js +0 -71
  48. package/dist/transport/stdio.js.map +0 -1
  49. package/dist/utils/logging.d.ts +0 -29
  50. package/dist/utils/logging.d.ts.map +0 -1
  51. package/dist/utils/logging.js +0 -71
  52. package/dist/utils/logging.js.map +0 -1
  53. package/dist/utils/serialization.d.ts +0 -24
  54. package/dist/utils/serialization.d.ts.map +0 -1
  55. package/dist/utils/serialization.js +0 -60
  56. package/dist/utils/serialization.js.map +0 -1
@@ -1,100 +0,0 @@
1
- import { type Partition } from '@prefactor/pfid';
2
- import type { Transport } from '../transport/base.js';
3
- import type { Span, SpanType, TokenUsage } from './span.js';
4
- /**
5
- * Options for starting a new span
6
- */
7
- export interface StartSpanOptions {
8
- /** Name of the span */
9
- name: string;
10
- /** Type of operation this span represents */
11
- spanType: SpanType;
12
- /** Input data for this operation */
13
- inputs: Record<string, unknown>;
14
- /** ID of the parent span (optional) */
15
- parentSpanId?: string;
16
- /** Trace ID to use (optional, will generate if not provided) */
17
- traceId?: string;
18
- /** Additional metadata (optional) */
19
- metadata?: Record<string, unknown>;
20
- /** Tags for categorizing the span (optional) */
21
- tags?: string[];
22
- }
23
- /**
24
- * Options for ending a span
25
- */
26
- export interface EndSpanOptions {
27
- /** Output data from the operation */
28
- outputs?: Record<string, unknown>;
29
- /** Error that occurred (if any) */
30
- error?: Error;
31
- /** Token usage information (for LLM calls) */
32
- tokenUsage?: TokenUsage;
33
- }
34
- /**
35
- * Tracer manages the lifecycle of spans.
36
- *
37
- * The tracer is responsible for:
38
- * - Creating spans with unique IDs
39
- * - Managing span lifecycle (start/end)
40
- * - Delegating to the transport layer for span emission
41
- * - Handling agent instance lifecycle
42
- *
43
- * @example
44
- * ```typescript
45
- * const tracer = new Tracer(transport);
46
- *
47
- * const span = tracer.startSpan({
48
- * name: 'llm-call',
49
- * spanType: SpanType.LLM,
50
- * inputs: { prompt: 'Hello' }
51
- * });
52
- *
53
- * try {
54
- * // ... do work ...
55
- * tracer.endSpan(span, { outputs: { response: 'Hi!' } });
56
- * } catch (error) {
57
- * tracer.endSpan(span, { error });
58
- * }
59
- * ```
60
- */
61
- export declare class Tracer {
62
- private transport;
63
- private partition;
64
- /**
65
- * Initialize the tracer.
66
- *
67
- * @param transport - The transport to use for emitting spans
68
- * @param partition - The partition for ID generation. If not provided, a random partition will be generated.
69
- */
70
- constructor(transport: Transport, partition?: Partition);
71
- /**
72
- * Start a new span
73
- *
74
- * @param options - Span configuration options
75
- * @returns The created span
76
- */
77
- startSpan(options: StartSpanOptions): Span;
78
- /**
79
- * End a span and emit it to the transport
80
- *
81
- * @param span - The span to end
82
- * @param options - End span options (outputs, error, token usage)
83
- */
84
- endSpan(span: Span, options?: EndSpanOptions): void;
85
- /**
86
- * Signal the start of an agent instance execution
87
- */
88
- startAgentInstance(): void;
89
- /**
90
- * Signal the completion of an agent instance execution
91
- */
92
- finishAgentInstance(): void;
93
- /**
94
- * Close the tracer and flush any pending spans
95
- *
96
- * @returns Promise that resolves when the tracer is closed
97
- */
98
- close(): Promise<void>;
99
- }
100
- //# sourceMappingURL=tracer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../src/tracing/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IAEb,6CAA6C;IAC7C,QAAQ,EAAE,QAAQ,CAAC;IAEnB,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEhC,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC,gDAAgD;IAChD,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAElC,mCAAmC;IACnC,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd,8CAA8C;IAC9C,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,MAAM;IASL,OAAO,CAAC,SAAS;IAR7B,OAAO,CAAC,SAAS,CAAY;IAE7B;;;;;OAKG;gBACiB,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,SAAS;IAI/D;;;;;OAKG;IACH,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAkC1C;;;;;OAKG;IACH,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI;IA6BnD;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAQ1B;;OAEG;IACH,mBAAmB,IAAI,IAAI;IAQ3B;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}
@@ -1,151 +0,0 @@
1
- import { generate, generatePartition } from '@prefactor/pfid';
2
- import { SpanStatus } from './span.js';
3
- /**
4
- * Tracer manages the lifecycle of spans.
5
- *
6
- * The tracer is responsible for:
7
- * - Creating spans with unique IDs
8
- * - Managing span lifecycle (start/end)
9
- * - Delegating to the transport layer for span emission
10
- * - Handling agent instance lifecycle
11
- *
12
- * @example
13
- * ```typescript
14
- * const tracer = new Tracer(transport);
15
- *
16
- * const span = tracer.startSpan({
17
- * name: 'llm-call',
18
- * spanType: SpanType.LLM,
19
- * inputs: { prompt: 'Hello' }
20
- * });
21
- *
22
- * try {
23
- * // ... do work ...
24
- * tracer.endSpan(span, { outputs: { response: 'Hi!' } });
25
- * } catch (error) {
26
- * tracer.endSpan(span, { error });
27
- * }
28
- * ```
29
- */
30
- export class Tracer {
31
- transport;
32
- partition;
33
- /**
34
- * Initialize the tracer.
35
- *
36
- * @param transport - The transport to use for emitting spans
37
- * @param partition - The partition for ID generation. If not provided, a random partition will be generated.
38
- */
39
- constructor(transport, partition) {
40
- this.transport = transport;
41
- this.partition = partition ?? generatePartition();
42
- }
43
- /**
44
- * Start a new span
45
- *
46
- * @param options - Span configuration options
47
- * @returns The created span
48
- */
49
- startSpan(options) {
50
- const spanId = generate(this.partition);
51
- const traceId = options.traceId ?? generate(this.partition);
52
- const span = {
53
- spanId,
54
- parentSpanId: options.parentSpanId ?? null,
55
- traceId,
56
- name: options.name,
57
- spanType: options.spanType,
58
- startTime: Date.now(),
59
- endTime: null,
60
- status: SpanStatus.RUNNING,
61
- inputs: options.inputs,
62
- outputs: null,
63
- tokenUsage: null,
64
- error: null,
65
- metadata: options.metadata ?? {},
66
- tags: options.tags ?? [],
67
- };
68
- // AGENT spans are emitted immediately for real-time tracking
69
- // They will be finished later with finishSpan()
70
- if (options.spanType === 'agent') {
71
- try {
72
- this.transport.emit(span);
73
- }
74
- catch (error) {
75
- console.error('Failed to emit agent span:', error);
76
- }
77
- }
78
- return span;
79
- }
80
- /**
81
- * End a span and emit it to the transport
82
- *
83
- * @param span - The span to end
84
- * @param options - End span options (outputs, error, token usage)
85
- */
86
- endSpan(span, options) {
87
- span.endTime = Date.now();
88
- span.outputs = options?.outputs ?? null;
89
- span.tokenUsage = options?.tokenUsage ?? null;
90
- if (options?.error) {
91
- span.status = SpanStatus.ERROR;
92
- span.error = {
93
- errorType: options.error.constructor.name,
94
- message: options.error.message,
95
- stacktrace: options.error.stack ?? '',
96
- };
97
- }
98
- else {
99
- span.status = SpanStatus.SUCCESS;
100
- }
101
- try {
102
- // AGENT spans use finishSpan API (they were already emitted on start)
103
- // Other span types are emitted here
104
- if (span.spanType === 'agent') {
105
- this.transport.finishSpan(span.spanId, span.endTime);
106
- }
107
- else {
108
- this.transport.emit(span);
109
- }
110
- }
111
- catch (error) {
112
- console.error('Failed to emit/finish span:', error);
113
- }
114
- }
115
- /**
116
- * Signal the start of an agent instance execution
117
- */
118
- startAgentInstance() {
119
- try {
120
- this.transport.startAgentInstance();
121
- }
122
- catch (error) {
123
- console.error('Failed to start agent instance:', error);
124
- }
125
- }
126
- /**
127
- * Signal the completion of an agent instance execution
128
- */
129
- finishAgentInstance() {
130
- try {
131
- this.transport.finishAgentInstance();
132
- }
133
- catch (error) {
134
- console.error('Failed to finish agent instance:', error);
135
- }
136
- }
137
- /**
138
- * Close the tracer and flush any pending spans
139
- *
140
- * @returns Promise that resolves when the tracer is closed
141
- */
142
- async close() {
143
- try {
144
- await this.transport.close();
145
- }
146
- catch (error) {
147
- console.error('Failed to close transport:', error);
148
- }
149
- }
150
- }
151
- //# sourceMappingURL=tracer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tracer.js","sourceRoot":"","sources":["../../src/tracing/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAkB,MAAM,iBAAiB,CAAC;AAG9E,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AA0CvC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,OAAO,MAAM;IASG;IARZ,SAAS,CAAY;IAE7B;;;;;OAKG;IACH,YAAoB,SAAoB,EAAE,SAAqB;QAA3C,cAAS,GAA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AC,mBAAmB,EAAE,CAAC;QACvC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;QAC3D,CAAC;IACH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,KAAK;QACT,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;QAC/B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACrD,CAAC;IACH,CAAC;CACF"}
@@ -1,38 +0,0 @@
1
- import type { Span } from '../tracing/span.js';
2
- /**
3
- * Transport interface for emitting spans to different backends
4
- *
5
- * Transports are responsible for sending span data to a destination
6
- * (e.g., stdout, HTTP API). They implement the strategy pattern to allow
7
- * pluggable backends.
8
- */
9
- export interface Transport {
10
- /**
11
- * Emit a span to the transport destination
12
- *
13
- * @param span - The span to emit
14
- */
15
- emit(span: Span): void;
16
- /**
17
- * Finish a previously emitted span (for long-running spans like AGENT spans)
18
- *
19
- * @param spanId - ID of the span to finish
20
- * @param endTime - End time in milliseconds since Unix epoch
21
- */
22
- finishSpan(spanId: string, endTime: number): void;
23
- /**
24
- * Signal the start of an agent instance execution
25
- */
26
- startAgentInstance(): void;
27
- /**
28
- * Signal the completion of an agent instance execution
29
- */
30
- finishAgentInstance(): void;
31
- /**
32
- * Close the transport and flush any pending data
33
- *
34
- * @returns Promise that resolves when the transport is fully closed
35
- */
36
- close(): void | Promise<void>;
37
- }
38
- //# sourceMappingURL=base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/transport/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAEvB;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD;;OAEG;IACH,kBAAkB,IAAI,IAAI,CAAC;IAE3B;;OAEG;IACH,mBAAmB,IAAI,IAAI,CAAC;IAE5B;;;;OAIG;IACH,KAAK,IAAI,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/transport/base.ts"],"names":[],"mappings":""}
@@ -1,90 +0,0 @@
1
- import type { Transport } from './base.js';
2
- import type { HttpTransportConfig } from '../config.js';
3
- import type { Span } from '../tracing/span.js';
4
- /**
5
- * HTTP transport sends spans to a remote API endpoint.
6
- *
7
- * Features:
8
- * - Queue-based async processing
9
- * - Exponential backoff retry logic
10
- * - Span ID mapping (SDK ID → backend ID)
11
- * - Agent instance lifecycle management
12
- * - Graceful shutdown with timeout
13
- *
14
- * @example
15
- * ```typescript
16
- * const transport = new HttpTransport({
17
- * apiUrl: 'https://api.prefactor.ai',
18
- * apiToken: process.env.PREFACTOR_API_TOKEN!,
19
- * });
20
- * ```
21
- */
22
- export declare class HttpTransport implements Transport {
23
- private config;
24
- private queue;
25
- private processing;
26
- private closed;
27
- private agentInstanceId;
28
- private spanIdMap;
29
- constructor(config: HttpTransportConfig);
30
- /**
31
- * Emit a span (adds to queue for async processing)
32
- *
33
- * @param span - The span to emit
34
- */
35
- emit(span: Span): void;
36
- /**
37
- * Finish a previously emitted span (for AGENT spans)
38
- *
39
- * @param spanId - ID of the span to finish
40
- * @param endTime - End time in milliseconds since Unix epoch
41
- */
42
- finishSpan(spanId: string, endTime: number): void;
43
- /**
44
- * Signal the start of an agent instance execution
45
- */
46
- startAgentInstance(): void;
47
- /**
48
- * Signal the completion of an agent instance execution
49
- */
50
- finishAgentInstance(): void;
51
- /**
52
- * Start background queue processing
53
- */
54
- private startProcessing;
55
- /**
56
- * Send a span to the API
57
- */
58
- private sendSpan;
59
- /**
60
- * Transform span to backend API format with nested details/payload structure
61
- */
62
- private transformSpanToApiFormat;
63
- /**
64
- * Get default schema (v1.0.0) with span schemas for all supported types
65
- */
66
- private getDefaultSchema;
67
- /**
68
- * Ensure an agent instance is registered
69
- */
70
- private ensureAgentRegistered;
71
- /**
72
- * Start agent instance execution
73
- */
74
- private startAgentInstanceHttp;
75
- /**
76
- * Finish agent instance execution
77
- */
78
- private finishAgentInstanceHttp;
79
- /**
80
- * Finish a span via HTTP
81
- */
82
- private finishSpanHttp;
83
- /**
84
- * Close the transport and wait for queue to drain
85
- *
86
- * @returns Promise that resolves when transport is closed
87
- */
88
- close(): Promise<void>;
89
- }
90
- //# sourceMappingURL=http.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/transport/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAa/C;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,aAAc,YAAW,SAAS;IAOjC,OAAO,CAAC,MAAM;IAN1B,OAAO,CAAC,KAAK,CAAmB;IAChC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,SAAS,CAA6B;gBAE1B,MAAM,EAAE,mBAAmB;IAI/C;;;;OAIG;IACH,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAOtB;;;;;OAKG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAQjD;;OAEG;IACH,kBAAkB,IAAI,IAAI;IAO1B;;OAEG;IACH,mBAAmB,IAAI,IAAI;IAO3B;;OAEG;YACW,eAAe;IAuC7B;;OAEG;YACW,QAAQ;IAmDtB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAqDhC;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA4BxB;;OAEG;YACW,qBAAqB;IA6DnC;;OAEG;YACW,sBAAsB;IA6BpC;;OAEG;YACW,uBAAuB;IA2BrC;;OAEG;YACW,cAAc;IA4B5B;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAc7B"}