raindrop-ai 0.0.84 → 0.0.85
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/{chunk-UEKYAG7S.mjs → chunk-EVQT43DR.mjs} +1 -1
- package/dist/index.d.mts +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +44 -1
- package/dist/index.mjs +44 -1
- package/dist/tracing/index.js +1 -1
- package/dist/tracing/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -72,6 +72,20 @@ type AgentSignal = BasicSignal & {
|
|
|
72
72
|
type: "agent" | "agent_internal";
|
|
73
73
|
};
|
|
74
74
|
type SignalEvent = DefaultSignal | FeedbackSignal | EditSignal | AgentSignal;
|
|
75
|
+
type SelfDiagnoseOptions = {
|
|
76
|
+
/** The interaction/event ID this diagnostic belongs to. */
|
|
77
|
+
eventId: string;
|
|
78
|
+
/** A human-readable description of the issue. */
|
|
79
|
+
description: string;
|
|
80
|
+
/** Optional category to group the diagnostic under (e.g. "missing_context", "capability_gap"). Defaults to "general". */
|
|
81
|
+
category?: string;
|
|
82
|
+
/** Optional source identifier (e.g. your agent or service name). */
|
|
83
|
+
source?: string;
|
|
84
|
+
/** Signal sentiment. Defaults to "NEGATIVE". */
|
|
85
|
+
sentiment?: "POSITIVE" | "NEGATIVE";
|
|
86
|
+
/** Additional custom properties to attach to the signal. */
|
|
87
|
+
properties?: Record<string, unknown>;
|
|
88
|
+
};
|
|
75
89
|
type SelfDiagnosticsSignalDefinition = {
|
|
76
90
|
description: string;
|
|
77
91
|
sentiment?: "POSITIVE" | "NEGATIVE";
|
|
@@ -847,6 +861,28 @@ declare class Raindrop {
|
|
|
847
861
|
*/
|
|
848
862
|
trackAi(event: AiTrackEvent | AiTrackEvent[]): string | Array<string | undefined> | undefined;
|
|
849
863
|
setUserDetails(event: IdentifyEvent): void;
|
|
864
|
+
/**
|
|
865
|
+
* Report a self-diagnostic signal. This is a convenient shorthand for sending
|
|
866
|
+
* signals that appear in the Self Diagnostics tab of the Raindrop dashboard.
|
|
867
|
+
*
|
|
868
|
+
* @param options - The diagnostic details.
|
|
869
|
+
* @param options.eventId - The interaction/event ID this diagnostic belongs to.
|
|
870
|
+
* @param options.description - A human-readable description of the issue.
|
|
871
|
+
* @param options.category - Optional category (e.g. "missing_context"). Defaults to "general".
|
|
872
|
+
* @param options.source - Optional source identifier. Defaults to "selfDiagnose".
|
|
873
|
+
* @param options.sentiment - Signal sentiment. Defaults to "NEGATIVE".
|
|
874
|
+
* @param options.properties - Additional custom properties.
|
|
875
|
+
*
|
|
876
|
+
* @example
|
|
877
|
+
* ```typescript
|
|
878
|
+
* raindrop.selfDiagnose({
|
|
879
|
+
* eventId: "evt_123",
|
|
880
|
+
* description: "User asked for production DB access but no credentials were provided.",
|
|
881
|
+
* category: "missing_context",
|
|
882
|
+
* });
|
|
883
|
+
* ```
|
|
884
|
+
*/
|
|
885
|
+
selfDiagnose(options: SelfDiagnoseOptions): void;
|
|
850
886
|
trackSignal(signal: SignalEvent | SignalEvent[]): void | void[];
|
|
851
887
|
private getSize;
|
|
852
888
|
private saveToBuffer;
|
|
@@ -884,4 +920,4 @@ declare class Raindrop {
|
|
|
884
920
|
close(): Promise<void>;
|
|
885
921
|
}
|
|
886
922
|
|
|
887
|
-
export { type AiTrackEvent, type Attachment, type AttachmentType, type BeginInteractionOptions, type FinishInteractionOptions, type IdentifyEvent, type Interaction, MAX_INGEST_SIZE_BYTES, type PartialAiTrackEvent, Raindrop, type RaindropSpanProcessor, type SelfDiagnosticsExecuteContext, type SelfDiagnosticsExecuteResult, type SelfDiagnosticsSignalDefinition, type SelfDiagnosticsSignalDefinitions, type SelfDiagnosticsTool, type SelfDiagnosticsToolInputSchema, type SelfDiagnosticsToolOptions, type SignalEvent, type SpanParams, type ToolParams, type ToolSpan, type TraceContext, type Tracer, type TrackToolParams, type WorkflowParams, Raindrop as default };
|
|
923
|
+
export { type AiTrackEvent, type Attachment, type AttachmentType, type BeginInteractionOptions, type FinishInteractionOptions, type IdentifyEvent, type Interaction, MAX_INGEST_SIZE_BYTES, type PartialAiTrackEvent, Raindrop, type RaindropSpanProcessor, type SelfDiagnoseOptions, type SelfDiagnosticsExecuteContext, type SelfDiagnosticsExecuteResult, type SelfDiagnosticsSignalDefinition, type SelfDiagnosticsSignalDefinitions, type SelfDiagnosticsTool, type SelfDiagnosticsToolInputSchema, type SelfDiagnosticsToolOptions, type SignalEvent, type SpanParams, type ToolParams, type ToolSpan, type TraceContext, type Tracer, type TrackToolParams, type WorkflowParams, Raindrop as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -72,6 +72,20 @@ type AgentSignal = BasicSignal & {
|
|
|
72
72
|
type: "agent" | "agent_internal";
|
|
73
73
|
};
|
|
74
74
|
type SignalEvent = DefaultSignal | FeedbackSignal | EditSignal | AgentSignal;
|
|
75
|
+
type SelfDiagnoseOptions = {
|
|
76
|
+
/** The interaction/event ID this diagnostic belongs to. */
|
|
77
|
+
eventId: string;
|
|
78
|
+
/** A human-readable description of the issue. */
|
|
79
|
+
description: string;
|
|
80
|
+
/** Optional category to group the diagnostic under (e.g. "missing_context", "capability_gap"). Defaults to "general". */
|
|
81
|
+
category?: string;
|
|
82
|
+
/** Optional source identifier (e.g. your agent or service name). */
|
|
83
|
+
source?: string;
|
|
84
|
+
/** Signal sentiment. Defaults to "NEGATIVE". */
|
|
85
|
+
sentiment?: "POSITIVE" | "NEGATIVE";
|
|
86
|
+
/** Additional custom properties to attach to the signal. */
|
|
87
|
+
properties?: Record<string, unknown>;
|
|
88
|
+
};
|
|
75
89
|
type SelfDiagnosticsSignalDefinition = {
|
|
76
90
|
description: string;
|
|
77
91
|
sentiment?: "POSITIVE" | "NEGATIVE";
|
|
@@ -847,6 +861,28 @@ declare class Raindrop {
|
|
|
847
861
|
*/
|
|
848
862
|
trackAi(event: AiTrackEvent | AiTrackEvent[]): string | Array<string | undefined> | undefined;
|
|
849
863
|
setUserDetails(event: IdentifyEvent): void;
|
|
864
|
+
/**
|
|
865
|
+
* Report a self-diagnostic signal. This is a convenient shorthand for sending
|
|
866
|
+
* signals that appear in the Self Diagnostics tab of the Raindrop dashboard.
|
|
867
|
+
*
|
|
868
|
+
* @param options - The diagnostic details.
|
|
869
|
+
* @param options.eventId - The interaction/event ID this diagnostic belongs to.
|
|
870
|
+
* @param options.description - A human-readable description of the issue.
|
|
871
|
+
* @param options.category - Optional category (e.g. "missing_context"). Defaults to "general".
|
|
872
|
+
* @param options.source - Optional source identifier. Defaults to "selfDiagnose".
|
|
873
|
+
* @param options.sentiment - Signal sentiment. Defaults to "NEGATIVE".
|
|
874
|
+
* @param options.properties - Additional custom properties.
|
|
875
|
+
*
|
|
876
|
+
* @example
|
|
877
|
+
* ```typescript
|
|
878
|
+
* raindrop.selfDiagnose({
|
|
879
|
+
* eventId: "evt_123",
|
|
880
|
+
* description: "User asked for production DB access but no credentials were provided.",
|
|
881
|
+
* category: "missing_context",
|
|
882
|
+
* });
|
|
883
|
+
* ```
|
|
884
|
+
*/
|
|
885
|
+
selfDiagnose(options: SelfDiagnoseOptions): void;
|
|
850
886
|
trackSignal(signal: SignalEvent | SignalEvent[]): void | void[];
|
|
851
887
|
private getSize;
|
|
852
888
|
private saveToBuffer;
|
|
@@ -884,4 +920,4 @@ declare class Raindrop {
|
|
|
884
920
|
close(): Promise<void>;
|
|
885
921
|
}
|
|
886
922
|
|
|
887
|
-
export { type AiTrackEvent, type Attachment, type AttachmentType, type BeginInteractionOptions, type FinishInteractionOptions, type IdentifyEvent, type Interaction, MAX_INGEST_SIZE_BYTES, type PartialAiTrackEvent, Raindrop, type RaindropSpanProcessor, type SelfDiagnosticsExecuteContext, type SelfDiagnosticsExecuteResult, type SelfDiagnosticsSignalDefinition, type SelfDiagnosticsSignalDefinitions, type SelfDiagnosticsTool, type SelfDiagnosticsToolInputSchema, type SelfDiagnosticsToolOptions, type SignalEvent, type SpanParams, type ToolParams, type ToolSpan, type TraceContext, type Tracer, type TrackToolParams, type WorkflowParams, Raindrop as default };
|
|
923
|
+
export { type AiTrackEvent, type Attachment, type AttachmentType, type BeginInteractionOptions, type FinishInteractionOptions, type IdentifyEvent, type Interaction, MAX_INGEST_SIZE_BYTES, type PartialAiTrackEvent, Raindrop, type RaindropSpanProcessor, type SelfDiagnoseOptions, type SelfDiagnosticsExecuteContext, type SelfDiagnosticsExecuteResult, type SelfDiagnosticsSignalDefinition, type SelfDiagnosticsSignalDefinitions, type SelfDiagnosticsTool, type SelfDiagnosticsToolInputSchema, type SelfDiagnosticsToolOptions, type SignalEvent, type SpanParams, type ToolParams, type ToolSpan, type TraceContext, type Tracer, type TrackToolParams, type WorkflowParams, Raindrop as default };
|
package/dist/index.js
CHANGED
|
@@ -138,7 +138,7 @@ var CategorizationRequestSchema = import_zod.z.object({
|
|
|
138
138
|
// package.json
|
|
139
139
|
var package_default = {
|
|
140
140
|
name: "raindrop-ai",
|
|
141
|
-
version: "0.0.
|
|
141
|
+
version: "0.0.85",
|
|
142
142
|
main: "dist/index.js",
|
|
143
143
|
module: "dist/index.mjs",
|
|
144
144
|
types: "dist/index.d.ts",
|
|
@@ -1880,6 +1880,49 @@ var Raindrop = class {
|
|
|
1880
1880
|
...parsed.data
|
|
1881
1881
|
});
|
|
1882
1882
|
}
|
|
1883
|
+
/**
|
|
1884
|
+
* Report a self-diagnostic signal. This is a convenient shorthand for sending
|
|
1885
|
+
* signals that appear in the Self Diagnostics tab of the Raindrop dashboard.
|
|
1886
|
+
*
|
|
1887
|
+
* @param options - The diagnostic details.
|
|
1888
|
+
* @param options.eventId - The interaction/event ID this diagnostic belongs to.
|
|
1889
|
+
* @param options.description - A human-readable description of the issue.
|
|
1890
|
+
* @param options.category - Optional category (e.g. "missing_context"). Defaults to "general".
|
|
1891
|
+
* @param options.source - Optional source identifier. Defaults to "selfDiagnose".
|
|
1892
|
+
* @param options.sentiment - Signal sentiment. Defaults to "NEGATIVE".
|
|
1893
|
+
* @param options.properties - Additional custom properties.
|
|
1894
|
+
*
|
|
1895
|
+
* @example
|
|
1896
|
+
* ```typescript
|
|
1897
|
+
* raindrop.selfDiagnose({
|
|
1898
|
+
* eventId: "evt_123",
|
|
1899
|
+
* description: "User asked for production DB access but no credentials were provided.",
|
|
1900
|
+
* category: "missing_context",
|
|
1901
|
+
* });
|
|
1902
|
+
* ```
|
|
1903
|
+
*/
|
|
1904
|
+
selfDiagnose(options) {
|
|
1905
|
+
var _a, _b, _c;
|
|
1906
|
+
if (this.disabled) {
|
|
1907
|
+
return;
|
|
1908
|
+
}
|
|
1909
|
+
const category = ((_a = options.category) == null ? void 0 : _a.trim()) || "general";
|
|
1910
|
+
const source = ((_b = options.source) == null ? void 0 : _b.trim()) || "selfDiagnose";
|
|
1911
|
+
const sentiment = (_c = options.sentiment) != null ? _c : "NEGATIVE";
|
|
1912
|
+
this.trackSignal({
|
|
1913
|
+
eventId: options.eventId,
|
|
1914
|
+
name: `self diagnostics - ${category}`,
|
|
1915
|
+
type: "agent",
|
|
1916
|
+
sentiment,
|
|
1917
|
+
properties: {
|
|
1918
|
+
...options.properties,
|
|
1919
|
+
source,
|
|
1920
|
+
category,
|
|
1921
|
+
detail: options.description,
|
|
1922
|
+
signal_description: options.description
|
|
1923
|
+
}
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1883
1926
|
trackSignal(signal) {
|
|
1884
1927
|
if (this.disabled) {
|
|
1885
1928
|
return;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
package_default,
|
|
3
3
|
tracing
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EVQT43DR.mjs";
|
|
5
5
|
|
|
6
6
|
// ../schemas/src/ingest/index.ts
|
|
7
7
|
import { z } from "zod";
|
|
@@ -679,6 +679,49 @@ var Raindrop = class {
|
|
|
679
679
|
...parsed.data
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
|
+
/**
|
|
683
|
+
* Report a self-diagnostic signal. This is a convenient shorthand for sending
|
|
684
|
+
* signals that appear in the Self Diagnostics tab of the Raindrop dashboard.
|
|
685
|
+
*
|
|
686
|
+
* @param options - The diagnostic details.
|
|
687
|
+
* @param options.eventId - The interaction/event ID this diagnostic belongs to.
|
|
688
|
+
* @param options.description - A human-readable description of the issue.
|
|
689
|
+
* @param options.category - Optional category (e.g. "missing_context"). Defaults to "general".
|
|
690
|
+
* @param options.source - Optional source identifier. Defaults to "selfDiagnose".
|
|
691
|
+
* @param options.sentiment - Signal sentiment. Defaults to "NEGATIVE".
|
|
692
|
+
* @param options.properties - Additional custom properties.
|
|
693
|
+
*
|
|
694
|
+
* @example
|
|
695
|
+
* ```typescript
|
|
696
|
+
* raindrop.selfDiagnose({
|
|
697
|
+
* eventId: "evt_123",
|
|
698
|
+
* description: "User asked for production DB access but no credentials were provided.",
|
|
699
|
+
* category: "missing_context",
|
|
700
|
+
* });
|
|
701
|
+
* ```
|
|
702
|
+
*/
|
|
703
|
+
selfDiagnose(options) {
|
|
704
|
+
var _a, _b, _c;
|
|
705
|
+
if (this.disabled) {
|
|
706
|
+
return;
|
|
707
|
+
}
|
|
708
|
+
const category = ((_a = options.category) == null ? void 0 : _a.trim()) || "general";
|
|
709
|
+
const source = ((_b = options.source) == null ? void 0 : _b.trim()) || "selfDiagnose";
|
|
710
|
+
const sentiment = (_c = options.sentiment) != null ? _c : "NEGATIVE";
|
|
711
|
+
this.trackSignal({
|
|
712
|
+
eventId: options.eventId,
|
|
713
|
+
name: `self diagnostics - ${category}`,
|
|
714
|
+
type: "agent",
|
|
715
|
+
sentiment,
|
|
716
|
+
properties: {
|
|
717
|
+
...options.properties,
|
|
718
|
+
source,
|
|
719
|
+
category,
|
|
720
|
+
detail: options.description,
|
|
721
|
+
signal_description: options.description
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
}
|
|
682
725
|
trackSignal(signal) {
|
|
683
726
|
if (this.disabled) {
|
|
684
727
|
return;
|
package/dist/tracing/index.js
CHANGED
package/dist/tracing/index.mjs
CHANGED