@raindrop-ai/pi-agent 0.0.3 → 0.0.5
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/README.md +13 -4
- package/dist/{chunk-MHIMKMK7.js → chunk-2NGOEVWI.js} +488 -75
- package/dist/extension.cjs +501 -79
- package/dist/extension.d.cts +2 -2
- package/dist/extension.d.ts +2 -2
- package/dist/extension.js +16 -5
- package/dist/index.cjs +491 -78
- package/dist/index.d-CRPiWjXE.d.cts +369 -0
- package/dist/index.d-CRPiWjXE.d.ts +369 -0
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -4
- package/package.json +7 -7
- package/dist/index.d-CtwaEReY.d.cts +0 -228
- package/dist/index.d-CtwaEReY.d.ts +0 -228
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
type OtlpAnyValue = {
|
|
2
|
-
stringValue?: string;
|
|
3
|
-
intValue?: string;
|
|
4
|
-
doubleValue?: number;
|
|
5
|
-
boolValue?: boolean;
|
|
6
|
-
arrayValue?: {
|
|
7
|
-
values: OtlpAnyValue[];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
type OtlpKeyValue = {
|
|
11
|
-
key: string;
|
|
12
|
-
value: OtlpAnyValue;
|
|
13
|
-
};
|
|
14
|
-
declare const SpanStatusCode: {
|
|
15
|
-
readonly UNSET: 0;
|
|
16
|
-
readonly OK: 1;
|
|
17
|
-
readonly ERROR: 2;
|
|
18
|
-
};
|
|
19
|
-
type OtlpSpanStatus = {
|
|
20
|
-
code: (typeof SpanStatusCode)[keyof typeof SpanStatusCode] | number;
|
|
21
|
-
message?: string;
|
|
22
|
-
};
|
|
23
|
-
type OtlpSpan = {
|
|
24
|
-
traceId: string;
|
|
25
|
-
spanId: string;
|
|
26
|
-
parentSpanId?: string;
|
|
27
|
-
name: string;
|
|
28
|
-
startTimeUnixNano: string;
|
|
29
|
-
endTimeUnixNano: string;
|
|
30
|
-
attributes?: OtlpKeyValue[];
|
|
31
|
-
status?: OtlpSpanStatus;
|
|
32
|
-
};
|
|
33
|
-
type SpanIds = {
|
|
34
|
-
traceIdB64: string;
|
|
35
|
-
spanIdB64: string;
|
|
36
|
-
parentSpanIdB64?: string;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
type Attachment = {
|
|
40
|
-
type: string;
|
|
41
|
-
role: string;
|
|
42
|
-
name?: string;
|
|
43
|
-
value: string;
|
|
44
|
-
};
|
|
45
|
-
type IdentifyInput = {
|
|
46
|
-
userId: string;
|
|
47
|
-
traits?: Record<string, unknown>;
|
|
48
|
-
};
|
|
49
|
-
type Patch = {
|
|
50
|
-
eventName?: string;
|
|
51
|
-
userId?: string;
|
|
52
|
-
convoId?: string;
|
|
53
|
-
input?: string;
|
|
54
|
-
output?: string;
|
|
55
|
-
model?: string;
|
|
56
|
-
properties?: Record<string, unknown>;
|
|
57
|
-
attachments?: Attachment[];
|
|
58
|
-
isPending?: boolean;
|
|
59
|
-
timestamp?: string;
|
|
60
|
-
};
|
|
61
|
-
type SignalInput = {
|
|
62
|
-
eventId: string;
|
|
63
|
-
name: string;
|
|
64
|
-
type?: "default" | "feedback" | "edit" | "standard" | "agent" | "agent_internal";
|
|
65
|
-
sentiment?: "POSITIVE" | "NEGATIVE";
|
|
66
|
-
timestamp?: string;
|
|
67
|
-
properties?: Record<string, unknown>;
|
|
68
|
-
attachmentId?: string;
|
|
69
|
-
comment?: string;
|
|
70
|
-
after?: string;
|
|
71
|
-
};
|
|
72
|
-
type EventShipperOptions = {
|
|
73
|
-
writeKey?: string;
|
|
74
|
-
endpoint?: string;
|
|
75
|
-
enabled?: boolean;
|
|
76
|
-
debug: boolean;
|
|
77
|
-
partialFlushMs?: number;
|
|
78
|
-
sdkName?: string;
|
|
79
|
-
libraryName?: string;
|
|
80
|
-
libraryVersion?: string;
|
|
81
|
-
defaultEventName?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Explicit Workshop / local debugger URL. Wins over env vars + auto-detect.
|
|
84
|
-
* Pass `null` to opt out of all mirroring (including auto-detect).
|
|
85
|
-
*/
|
|
86
|
-
localDebuggerUrl?: string | null;
|
|
87
|
-
};
|
|
88
|
-
declare class EventShipper {
|
|
89
|
-
private baseUrl;
|
|
90
|
-
private writeKey?;
|
|
91
|
-
private enabled;
|
|
92
|
-
private debug;
|
|
93
|
-
private partialFlushMs;
|
|
94
|
-
private sdkName;
|
|
95
|
-
private prefix;
|
|
96
|
-
private defaultEventName;
|
|
97
|
-
private context;
|
|
98
|
-
private buffers;
|
|
99
|
-
private sticky;
|
|
100
|
-
private timers;
|
|
101
|
-
private inFlight;
|
|
102
|
-
/** URL of the local debugger / Workshop daemon, when one is reachable. */
|
|
103
|
-
private localDebuggerUrl;
|
|
104
|
-
constructor(opts: EventShipperOptions);
|
|
105
|
-
isDebugEnabled(): boolean;
|
|
106
|
-
private authHeaders;
|
|
107
|
-
patch(eventId: string, patch: Patch): Promise<void>;
|
|
108
|
-
finish(eventId: string, patch: {
|
|
109
|
-
output?: string;
|
|
110
|
-
model?: string;
|
|
111
|
-
properties?: Record<string, unknown>;
|
|
112
|
-
userId?: string;
|
|
113
|
-
}): Promise<void>;
|
|
114
|
-
flush(): Promise<void>;
|
|
115
|
-
shutdown(): Promise<void>;
|
|
116
|
-
trackSignal(signal: SignalInput): Promise<void>;
|
|
117
|
-
identify(users: IdentifyInput | IdentifyInput[]): Promise<void>;
|
|
118
|
-
private flushOne;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
type InternalSpan = {
|
|
122
|
-
ids: SpanIds;
|
|
123
|
-
name: string;
|
|
124
|
-
startTimeUnixNano: string;
|
|
125
|
-
endTimeUnixNano?: string;
|
|
126
|
-
attributes: Array<OtlpKeyValue | undefined>;
|
|
127
|
-
};
|
|
128
|
-
type TraceShipperOptions = {
|
|
129
|
-
writeKey?: string;
|
|
130
|
-
endpoint?: string;
|
|
131
|
-
enabled?: boolean;
|
|
132
|
-
debug: boolean;
|
|
133
|
-
debugSpans?: boolean;
|
|
134
|
-
flushIntervalMs?: number;
|
|
135
|
-
maxBatchSize?: number;
|
|
136
|
-
maxQueueSize?: number;
|
|
137
|
-
sdkName?: string;
|
|
138
|
-
serviceName?: string;
|
|
139
|
-
serviceVersion?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Explicit Workshop / local debugger URL. Wins over env vars + auto-detect.
|
|
142
|
-
* Pass `null` to opt out of all mirroring (including auto-detect).
|
|
143
|
-
*/
|
|
144
|
-
localDebuggerUrl?: string | null;
|
|
145
|
-
};
|
|
146
|
-
declare class TraceShipper {
|
|
147
|
-
private baseUrl;
|
|
148
|
-
private writeKey?;
|
|
149
|
-
private enabled;
|
|
150
|
-
private debug;
|
|
151
|
-
private debugSpans;
|
|
152
|
-
private sdkName;
|
|
153
|
-
private prefix;
|
|
154
|
-
private serviceName;
|
|
155
|
-
private serviceVersion;
|
|
156
|
-
private flushIntervalMs;
|
|
157
|
-
private maxBatchSize;
|
|
158
|
-
private maxQueueSize;
|
|
159
|
-
private queue;
|
|
160
|
-
private timer;
|
|
161
|
-
private inFlight;
|
|
162
|
-
/** URL of the local debugger / Workshop daemon, when one is reachable. */
|
|
163
|
-
private localDebuggerUrl;
|
|
164
|
-
constructor(opts: TraceShipperOptions);
|
|
165
|
-
isDebugEnabled(): boolean;
|
|
166
|
-
private authHeaders;
|
|
167
|
-
startSpan(args: {
|
|
168
|
-
name: string;
|
|
169
|
-
parent?: {
|
|
170
|
-
traceIdB64: string;
|
|
171
|
-
spanIdB64: string;
|
|
172
|
-
};
|
|
173
|
-
eventId: string;
|
|
174
|
-
operationId?: string;
|
|
175
|
-
attributes?: Array<OtlpKeyValue | undefined>;
|
|
176
|
-
startTimeUnixNano?: string;
|
|
177
|
-
}): InternalSpan;
|
|
178
|
-
endSpan(span: InternalSpan, extra?: {
|
|
179
|
-
attributes?: InternalSpan["attributes"];
|
|
180
|
-
error?: unknown;
|
|
181
|
-
status?: OtlpSpanStatus;
|
|
182
|
-
endTimeUnixNano?: string;
|
|
183
|
-
}): void;
|
|
184
|
-
createSpan(args: {
|
|
185
|
-
name: string;
|
|
186
|
-
parent?: {
|
|
187
|
-
traceIdB64: string;
|
|
188
|
-
spanIdB64: string;
|
|
189
|
-
};
|
|
190
|
-
eventId: string;
|
|
191
|
-
startTimeUnixNano: string;
|
|
192
|
-
endTimeUnixNano: string;
|
|
193
|
-
attributes?: Array<OtlpKeyValue | undefined>;
|
|
194
|
-
status?: OtlpSpanStatus;
|
|
195
|
-
}): void;
|
|
196
|
-
enqueue(span: OtlpSpan): void;
|
|
197
|
-
flush(): Promise<void>;
|
|
198
|
-
shutdown(): Promise<void>;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
type ParentSpanContext = {
|
|
202
|
-
traceIdB64: string;
|
|
203
|
-
spanIdB64: string;
|
|
204
|
-
eventId: string;
|
|
205
|
-
};
|
|
206
|
-
interface ContextSpan {
|
|
207
|
-
readonly traceIdB64: string;
|
|
208
|
-
readonly spanIdB64: string;
|
|
209
|
-
readonly eventId: string;
|
|
210
|
-
log?(data: Record<string, unknown>): void;
|
|
211
|
-
}
|
|
212
|
-
interface AsyncLocalStorageLike<T> {
|
|
213
|
-
getStore(): T | undefined;
|
|
214
|
-
run<R>(store: T, callback: () => R): R;
|
|
215
|
-
enterWith?(store: T): void;
|
|
216
|
-
}
|
|
217
|
-
declare abstract class ContextManager {
|
|
218
|
-
abstract getParentSpanIds(): ParentSpanContext | undefined;
|
|
219
|
-
abstract runInContext<R>(span: ContextSpan, callback: () => R): R;
|
|
220
|
-
abstract getCurrentSpan(): ContextSpan | undefined;
|
|
221
|
-
abstract isReady(): boolean;
|
|
222
|
-
}
|
|
223
|
-
declare global {
|
|
224
|
-
var RAINDROP_CONTEXT_MANAGER: (new () => ContextManager) | undefined;
|
|
225
|
-
var RAINDROP_ASYNC_LOCAL_STORAGE: (new <T>() => AsyncLocalStorageLike<T>) | undefined;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
export { type Attachment as A, EventShipper as E, type OtlpSpan as O, TraceShipper as T };
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
type OtlpAnyValue = {
|
|
2
|
-
stringValue?: string;
|
|
3
|
-
intValue?: string;
|
|
4
|
-
doubleValue?: number;
|
|
5
|
-
boolValue?: boolean;
|
|
6
|
-
arrayValue?: {
|
|
7
|
-
values: OtlpAnyValue[];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
type OtlpKeyValue = {
|
|
11
|
-
key: string;
|
|
12
|
-
value: OtlpAnyValue;
|
|
13
|
-
};
|
|
14
|
-
declare const SpanStatusCode: {
|
|
15
|
-
readonly UNSET: 0;
|
|
16
|
-
readonly OK: 1;
|
|
17
|
-
readonly ERROR: 2;
|
|
18
|
-
};
|
|
19
|
-
type OtlpSpanStatus = {
|
|
20
|
-
code: (typeof SpanStatusCode)[keyof typeof SpanStatusCode] | number;
|
|
21
|
-
message?: string;
|
|
22
|
-
};
|
|
23
|
-
type OtlpSpan = {
|
|
24
|
-
traceId: string;
|
|
25
|
-
spanId: string;
|
|
26
|
-
parentSpanId?: string;
|
|
27
|
-
name: string;
|
|
28
|
-
startTimeUnixNano: string;
|
|
29
|
-
endTimeUnixNano: string;
|
|
30
|
-
attributes?: OtlpKeyValue[];
|
|
31
|
-
status?: OtlpSpanStatus;
|
|
32
|
-
};
|
|
33
|
-
type SpanIds = {
|
|
34
|
-
traceIdB64: string;
|
|
35
|
-
spanIdB64: string;
|
|
36
|
-
parentSpanIdB64?: string;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
type Attachment = {
|
|
40
|
-
type: string;
|
|
41
|
-
role: string;
|
|
42
|
-
name?: string;
|
|
43
|
-
value: string;
|
|
44
|
-
};
|
|
45
|
-
type IdentifyInput = {
|
|
46
|
-
userId: string;
|
|
47
|
-
traits?: Record<string, unknown>;
|
|
48
|
-
};
|
|
49
|
-
type Patch = {
|
|
50
|
-
eventName?: string;
|
|
51
|
-
userId?: string;
|
|
52
|
-
convoId?: string;
|
|
53
|
-
input?: string;
|
|
54
|
-
output?: string;
|
|
55
|
-
model?: string;
|
|
56
|
-
properties?: Record<string, unknown>;
|
|
57
|
-
attachments?: Attachment[];
|
|
58
|
-
isPending?: boolean;
|
|
59
|
-
timestamp?: string;
|
|
60
|
-
};
|
|
61
|
-
type SignalInput = {
|
|
62
|
-
eventId: string;
|
|
63
|
-
name: string;
|
|
64
|
-
type?: "default" | "feedback" | "edit" | "standard" | "agent" | "agent_internal";
|
|
65
|
-
sentiment?: "POSITIVE" | "NEGATIVE";
|
|
66
|
-
timestamp?: string;
|
|
67
|
-
properties?: Record<string, unknown>;
|
|
68
|
-
attachmentId?: string;
|
|
69
|
-
comment?: string;
|
|
70
|
-
after?: string;
|
|
71
|
-
};
|
|
72
|
-
type EventShipperOptions = {
|
|
73
|
-
writeKey?: string;
|
|
74
|
-
endpoint?: string;
|
|
75
|
-
enabled?: boolean;
|
|
76
|
-
debug: boolean;
|
|
77
|
-
partialFlushMs?: number;
|
|
78
|
-
sdkName?: string;
|
|
79
|
-
libraryName?: string;
|
|
80
|
-
libraryVersion?: string;
|
|
81
|
-
defaultEventName?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Explicit Workshop / local debugger URL. Wins over env vars + auto-detect.
|
|
84
|
-
* Pass `null` to opt out of all mirroring (including auto-detect).
|
|
85
|
-
*/
|
|
86
|
-
localDebuggerUrl?: string | null;
|
|
87
|
-
};
|
|
88
|
-
declare class EventShipper {
|
|
89
|
-
private baseUrl;
|
|
90
|
-
private writeKey?;
|
|
91
|
-
private enabled;
|
|
92
|
-
private debug;
|
|
93
|
-
private partialFlushMs;
|
|
94
|
-
private sdkName;
|
|
95
|
-
private prefix;
|
|
96
|
-
private defaultEventName;
|
|
97
|
-
private context;
|
|
98
|
-
private buffers;
|
|
99
|
-
private sticky;
|
|
100
|
-
private timers;
|
|
101
|
-
private inFlight;
|
|
102
|
-
/** URL of the local debugger / Workshop daemon, when one is reachable. */
|
|
103
|
-
private localDebuggerUrl;
|
|
104
|
-
constructor(opts: EventShipperOptions);
|
|
105
|
-
isDebugEnabled(): boolean;
|
|
106
|
-
private authHeaders;
|
|
107
|
-
patch(eventId: string, patch: Patch): Promise<void>;
|
|
108
|
-
finish(eventId: string, patch: {
|
|
109
|
-
output?: string;
|
|
110
|
-
model?: string;
|
|
111
|
-
properties?: Record<string, unknown>;
|
|
112
|
-
userId?: string;
|
|
113
|
-
}): Promise<void>;
|
|
114
|
-
flush(): Promise<void>;
|
|
115
|
-
shutdown(): Promise<void>;
|
|
116
|
-
trackSignal(signal: SignalInput): Promise<void>;
|
|
117
|
-
identify(users: IdentifyInput | IdentifyInput[]): Promise<void>;
|
|
118
|
-
private flushOne;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
type InternalSpan = {
|
|
122
|
-
ids: SpanIds;
|
|
123
|
-
name: string;
|
|
124
|
-
startTimeUnixNano: string;
|
|
125
|
-
endTimeUnixNano?: string;
|
|
126
|
-
attributes: Array<OtlpKeyValue | undefined>;
|
|
127
|
-
};
|
|
128
|
-
type TraceShipperOptions = {
|
|
129
|
-
writeKey?: string;
|
|
130
|
-
endpoint?: string;
|
|
131
|
-
enabled?: boolean;
|
|
132
|
-
debug: boolean;
|
|
133
|
-
debugSpans?: boolean;
|
|
134
|
-
flushIntervalMs?: number;
|
|
135
|
-
maxBatchSize?: number;
|
|
136
|
-
maxQueueSize?: number;
|
|
137
|
-
sdkName?: string;
|
|
138
|
-
serviceName?: string;
|
|
139
|
-
serviceVersion?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Explicit Workshop / local debugger URL. Wins over env vars + auto-detect.
|
|
142
|
-
* Pass `null` to opt out of all mirroring (including auto-detect).
|
|
143
|
-
*/
|
|
144
|
-
localDebuggerUrl?: string | null;
|
|
145
|
-
};
|
|
146
|
-
declare class TraceShipper {
|
|
147
|
-
private baseUrl;
|
|
148
|
-
private writeKey?;
|
|
149
|
-
private enabled;
|
|
150
|
-
private debug;
|
|
151
|
-
private debugSpans;
|
|
152
|
-
private sdkName;
|
|
153
|
-
private prefix;
|
|
154
|
-
private serviceName;
|
|
155
|
-
private serviceVersion;
|
|
156
|
-
private flushIntervalMs;
|
|
157
|
-
private maxBatchSize;
|
|
158
|
-
private maxQueueSize;
|
|
159
|
-
private queue;
|
|
160
|
-
private timer;
|
|
161
|
-
private inFlight;
|
|
162
|
-
/** URL of the local debugger / Workshop daemon, when one is reachable. */
|
|
163
|
-
private localDebuggerUrl;
|
|
164
|
-
constructor(opts: TraceShipperOptions);
|
|
165
|
-
isDebugEnabled(): boolean;
|
|
166
|
-
private authHeaders;
|
|
167
|
-
startSpan(args: {
|
|
168
|
-
name: string;
|
|
169
|
-
parent?: {
|
|
170
|
-
traceIdB64: string;
|
|
171
|
-
spanIdB64: string;
|
|
172
|
-
};
|
|
173
|
-
eventId: string;
|
|
174
|
-
operationId?: string;
|
|
175
|
-
attributes?: Array<OtlpKeyValue | undefined>;
|
|
176
|
-
startTimeUnixNano?: string;
|
|
177
|
-
}): InternalSpan;
|
|
178
|
-
endSpan(span: InternalSpan, extra?: {
|
|
179
|
-
attributes?: InternalSpan["attributes"];
|
|
180
|
-
error?: unknown;
|
|
181
|
-
status?: OtlpSpanStatus;
|
|
182
|
-
endTimeUnixNano?: string;
|
|
183
|
-
}): void;
|
|
184
|
-
createSpan(args: {
|
|
185
|
-
name: string;
|
|
186
|
-
parent?: {
|
|
187
|
-
traceIdB64: string;
|
|
188
|
-
spanIdB64: string;
|
|
189
|
-
};
|
|
190
|
-
eventId: string;
|
|
191
|
-
startTimeUnixNano: string;
|
|
192
|
-
endTimeUnixNano: string;
|
|
193
|
-
attributes?: Array<OtlpKeyValue | undefined>;
|
|
194
|
-
status?: OtlpSpanStatus;
|
|
195
|
-
}): void;
|
|
196
|
-
enqueue(span: OtlpSpan): void;
|
|
197
|
-
flush(): Promise<void>;
|
|
198
|
-
shutdown(): Promise<void>;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
type ParentSpanContext = {
|
|
202
|
-
traceIdB64: string;
|
|
203
|
-
spanIdB64: string;
|
|
204
|
-
eventId: string;
|
|
205
|
-
};
|
|
206
|
-
interface ContextSpan {
|
|
207
|
-
readonly traceIdB64: string;
|
|
208
|
-
readonly spanIdB64: string;
|
|
209
|
-
readonly eventId: string;
|
|
210
|
-
log?(data: Record<string, unknown>): void;
|
|
211
|
-
}
|
|
212
|
-
interface AsyncLocalStorageLike<T> {
|
|
213
|
-
getStore(): T | undefined;
|
|
214
|
-
run<R>(store: T, callback: () => R): R;
|
|
215
|
-
enterWith?(store: T): void;
|
|
216
|
-
}
|
|
217
|
-
declare abstract class ContextManager {
|
|
218
|
-
abstract getParentSpanIds(): ParentSpanContext | undefined;
|
|
219
|
-
abstract runInContext<R>(span: ContextSpan, callback: () => R): R;
|
|
220
|
-
abstract getCurrentSpan(): ContextSpan | undefined;
|
|
221
|
-
abstract isReady(): boolean;
|
|
222
|
-
}
|
|
223
|
-
declare global {
|
|
224
|
-
var RAINDROP_CONTEXT_MANAGER: (new () => ContextManager) | undefined;
|
|
225
|
-
var RAINDROP_ASYNC_LOCAL_STORAGE: (new <T>() => AsyncLocalStorageLike<T>) | undefined;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
export { type Attachment as A, EventShipper as E, type OtlpSpan as O, TraceShipper as T };
|