@probelabs/probe 0.6.0-rc134 → 0.6.0-rc136
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/build/agent/ProbeAgent.js +15 -15
- package/build/agent/index.js +82362 -224
- package/build/agent/schemaUtils.js +5 -2
- package/build/agent/telemetry.js +3 -4
- package/build/index.js +7 -1
- package/cjs/agent/ProbeAgent.cjs +798 -740
- package/cjs/agent/simpleTelemetry.cjs +250 -0
- package/cjs/agent/telemetry.cjs +373 -0
- package/cjs/index.cjs +1375 -691
- package/index.d.ts +155 -0
- package/package.json +5 -1
- package/src/agent/ProbeAgent.js +15 -15
- package/src/agent/schemaUtils.js +5 -2
- package/src/agent/telemetry.js +3 -4
- package/src/index.js +7 -1
|
@@ -765,6 +765,9 @@ Ensure all Mermaid diagrams are properly formatted within \`\`\`mermaid code blo
|
|
|
765
765
|
return prompt;
|
|
766
766
|
}
|
|
767
767
|
|
|
768
|
+
// Counter to ensure unique session IDs even when created in the same millisecond
|
|
769
|
+
let sessionIdCounter = 0;
|
|
770
|
+
|
|
768
771
|
/**
|
|
769
772
|
* Specialized JSON fixing agent
|
|
770
773
|
* Uses a separate ProbeAgent instance optimized for JSON syntax correction
|
|
@@ -774,7 +777,7 @@ export class JsonFixingAgent {
|
|
|
774
777
|
// Import ProbeAgent dynamically to avoid circular dependencies
|
|
775
778
|
this.ProbeAgent = null;
|
|
776
779
|
this.options = {
|
|
777
|
-
sessionId: options.sessionId || `json-fixer-${Date.now()}`,
|
|
780
|
+
sessionId: options.sessionId || `json-fixer-${Date.now()}-${sessionIdCounter++}`,
|
|
778
781
|
path: options.path || process.cwd(),
|
|
779
782
|
provider: options.provider,
|
|
780
783
|
model: options.model,
|
|
@@ -1001,7 +1004,7 @@ export class MermaidFixingAgent {
|
|
|
1001
1004
|
// Import ProbeAgent dynamically to avoid circular dependencies
|
|
1002
1005
|
this.ProbeAgent = null;
|
|
1003
1006
|
this.options = {
|
|
1004
|
-
sessionId: options.sessionId || `mermaid-fixer-${Date.now()}`,
|
|
1007
|
+
sessionId: options.sessionId || `mermaid-fixer-${Date.now()}-${sessionIdCounter++}`,
|
|
1005
1008
|
path: options.path || process.cwd(),
|
|
1006
1009
|
provider: options.provider,
|
|
1007
1010
|
model: options.model,
|
package/build/agent/telemetry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import nodeSDKPkg from '@opentelemetry/sdk-node';
|
|
2
2
|
import resourcesPkg from '@opentelemetry/resources';
|
|
3
|
-
import
|
|
3
|
+
import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from '@opentelemetry/semantic-conventions';
|
|
4
4
|
import { trace, context, SpanStatusCode } from '@opentelemetry/api';
|
|
5
5
|
import otlpPkg from '@opentelemetry/exporter-trace-otlp-http';
|
|
6
6
|
import spanPkg from '@opentelemetry/sdk-trace-base';
|
|
@@ -10,8 +10,7 @@ import { dirname } from 'path';
|
|
|
10
10
|
import { FileSpanExporter } from './fileSpanExporter.js';
|
|
11
11
|
|
|
12
12
|
const { NodeSDK } = nodeSDKPkg;
|
|
13
|
-
const {
|
|
14
|
-
const { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } = semanticConventionsPkg;
|
|
13
|
+
const { Resource } = resourcesPkg;
|
|
15
14
|
const { OTLPTraceExporter } = otlpPkg;
|
|
16
15
|
const { BatchSpanProcessor, ConsoleSpanExporter } = spanPkg;
|
|
17
16
|
|
|
@@ -40,7 +39,7 @@ export class TelemetryConfig {
|
|
|
40
39
|
return;
|
|
41
40
|
}
|
|
42
41
|
|
|
43
|
-
const resource =
|
|
42
|
+
const resource = new Resource({
|
|
44
43
|
[ATTR_SERVICE_NAME]: this.serviceName,
|
|
45
44
|
[ATTR_SERVICE_VERSION]: this.serviceVersion,
|
|
46
45
|
});
|
package/build/index.js
CHANGED
|
@@ -35,6 +35,8 @@ import { searchTool, queryTool, extractTool, delegateTool } from './tools/vercel
|
|
|
35
35
|
import { bashTool } from './tools/bash.js';
|
|
36
36
|
import { ProbeAgent } from './agent/ProbeAgent.js';
|
|
37
37
|
import { SimpleTelemetry, SimpleAppTracer, initializeSimpleTelemetryFromOptions } from './agent/simpleTelemetry.js';
|
|
38
|
+
import { TelemetryConfig, initializeTelemetryFromOptions } from './agent/telemetry.js';
|
|
39
|
+
import { AppTracer } from './agent/appTracer.js';
|
|
38
40
|
import { listFilesToolInstance, searchFilesToolInstance } from './agent/probeTool.js';
|
|
39
41
|
import { StorageAdapter, InMemoryStorageAdapter } from './agent/storage/index.js';
|
|
40
42
|
import { HookManager, HOOK_TYPES } from './agent/hooks/index.js';
|
|
@@ -58,10 +60,14 @@ export {
|
|
|
58
60
|
// Export hooks
|
|
59
61
|
HookManager,
|
|
60
62
|
HOOK_TYPES,
|
|
61
|
-
// Export telemetry classes
|
|
63
|
+
// Export simple telemetry classes (no OpenTelemetry dependencies)
|
|
62
64
|
SimpleTelemetry,
|
|
63
65
|
SimpleAppTracer,
|
|
64
66
|
initializeSimpleTelemetryFromOptions,
|
|
67
|
+
// Export full OpenTelemetry telemetry classes
|
|
68
|
+
TelemetryConfig,
|
|
69
|
+
AppTracer,
|
|
70
|
+
initializeTelemetryFromOptions,
|
|
65
71
|
// Export tool generators directly
|
|
66
72
|
searchTool,
|
|
67
73
|
queryTool,
|