veryfront 0.1.521 → 0.1.523
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/esm/cli/templates/manifest.d.ts +405 -405
- package/esm/cli/templates/manifest.js +454 -454
- package/esm/deno.d.ts +2 -7
- package/esm/deno.js +4 -16
- package/esm/extensions/{ext-tracing-opentelemetry → ext-observability-opentelemetry}/src/index.d.ts +3 -3
- package/esm/extensions/ext-observability-opentelemetry/src/index.d.ts.map +1 -0
- package/esm/extensions/{ext-tracing-opentelemetry → ext-observability-opentelemetry}/src/index.js +10 -10
- package/esm/src/agent/service/config.d.ts.map +1 -1
- package/esm/src/agent/service/config.js +2 -0
- package/esm/src/agent/service/node-telemetry.d.ts +1 -1
- package/esm/src/agent/service/node-telemetry.d.ts.map +1 -1
- package/esm/src/agent/service/node-telemetry.js +1 -1
- package/esm/src/agent/testing/index.d.ts +1 -1
- package/esm/src/agent/testing/index.d.ts.map +1 -1
- package/esm/src/agent/testing/index.js +1 -1
- package/esm/src/agent/testing/live-evals/index.d.ts +2 -1
- package/esm/src/agent/testing/live-evals/index.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/index.js +2 -1
- package/esm/src/agent/testing/live-evals/request.d.ts +16 -17
- package/esm/src/agent/testing/live-evals/request.d.ts.map +1 -1
- package/esm/src/agent/testing/live-evals/runner.d.ts +124 -0
- package/esm/src/agent/testing/live-evals/runner.d.ts.map +1 -0
- package/esm/src/agent/testing/live-evals/runner.js +391 -0
- package/esm/src/agent/veryfront-cloud-agent-service.js +2 -2
- package/esm/src/extensions/{tracing → observability}/index.d.ts +2 -2
- package/esm/src/extensions/observability/index.d.ts.map +1 -0
- package/esm/src/extensions/{tracing → observability}/index.js +2 -2
- package/esm/src/extensions/{tracing → observability}/node-telemetry-provider.d.ts +2 -2
- package/esm/src/extensions/observability/node-telemetry-provider.d.ts.map +1 -0
- package/esm/src/extensions/{tracing → observability}/node-telemetry-provider.js +2 -2
- package/esm/src/extensions/{tracing → observability}/tracing-exporter.d.ts +2 -2
- package/esm/src/extensions/observability/tracing-exporter.d.ts.map +1 -0
- package/esm/src/extensions/observability/tracing-exporter.js +8 -0
- package/esm/src/extensions/recommendations.js +2 -2
- package/esm/src/observability/metrics/manager.js +1 -1
- package/esm/src/observability/simple-metrics/otel-instruments.js +1 -1
- package/esm/src/observability/tracing/api-shim.d.ts +4 -4
- package/esm/src/observability/tracing/api-shim.js +7 -7
- package/esm/src/observability/tracing/manager.js +2 -2
- package/esm/src/observability/tracing/otlp-setup.d.ts +1 -1
- package/esm/src/observability/tracing/otlp-setup.js +4 -4
- package/esm/src/proxy/tracing.d.ts +1 -1
- package/esm/src/proxy/tracing.js +2 -2
- package/esm/src/react/components/chat/theme.d.ts.map +1 -1
- package/esm/src/react/components/chat/theme.js +4 -2
- package/esm/src/server/dev-ui/manifest.d.ts +17 -17
- package/esm/src/server/dev-ui/manifest.js +17 -17
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +4 -1
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +4 -4
- package/src/cli/templates/manifest.js +454 -454
- package/src/deno.js +4 -16
- package/src/extensions/{ext-tracing-opentelemetry → ext-observability-opentelemetry}/src/index.ts +12 -12
- package/src/src/agent/service/config.ts +2 -0
- package/src/src/agent/service/node-telemetry.ts +1 -1
- package/src/src/agent/testing/index.ts +12 -0
- package/src/src/agent/testing/live-evals/index.ts +18 -1
- package/src/src/agent/testing/live-evals/request.ts +19 -1
- package/src/src/agent/testing/live-evals/runner.ts +629 -0
- package/src/src/agent/veryfront-cloud-agent-service.ts +2 -2
- package/src/src/extensions/{tracing → observability}/index.ts +2 -2
- package/src/src/extensions/{tracing → observability}/node-telemetry-provider.ts +2 -2
- package/src/src/extensions/{tracing → observability}/tracing-exporter.ts +2 -2
- package/src/src/extensions/recommendations.ts +2 -2
- package/src/src/observability/metrics/manager.ts +1 -1
- package/src/src/observability/simple-metrics/otel-instruments.ts +1 -1
- package/src/src/observability/tracing/api-shim.ts +7 -7
- package/src/src/observability/tracing/manager.ts +2 -2
- package/src/src/observability/tracing/otlp-setup.ts +4 -4
- package/src/src/proxy/tracing.ts +2 -2
- package/src/src/react/components/chat/theme.ts +4 -2
- package/src/src/server/bootstrap.ts +1 -1
- package/src/src/server/dev-ui/manifest.js +17 -17
- package/src/src/server/handlers/dev/framework-candidates.generated.ts +4 -1
- package/src/src/utils/version-constant.ts +1 -1
- package/esm/extensions/ext-tracing-opentelemetry/src/index.d.ts.map +0 -1
- package/esm/src/extensions/tracing/index.d.ts.map +0 -1
- package/esm/src/extensions/tracing/node-telemetry-provider.d.ts.map +0 -1
- package/esm/src/extensions/tracing/tracing-exporter.d.ts.map +0 -1
- package/esm/src/extensions/tracing/tracing-exporter.js +0 -8
|
@@ -27,7 +27,7 @@ export async function ensureOtelInstruments(): Promise<void> {
|
|
|
27
27
|
if (!isDeno) return;
|
|
28
28
|
|
|
29
29
|
try {
|
|
30
|
-
// The metrics API is injected by ext-
|
|
30
|
+
// The metrics API is injected by ext-observability-opentelemetry via setGlobalMetricsAPI().
|
|
31
31
|
// When the extension is not active, the meter is unavailable and we return.
|
|
32
32
|
const metricsApi = getGlobalMetricsAPI();
|
|
33
33
|
if (!metricsApi) return;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Thin in-process shim for `@opentelemetry/api`.
|
|
3
3
|
*
|
|
4
4
|
* Core files that previously imported directly from `@opentelemetry/api` now
|
|
5
|
-
* import from this module. When the `ext-
|
|
5
|
+
* import from this module. When the `ext-observability-opentelemetry` extension is present
|
|
6
6
|
* the real SDK provider is wired in via `setGlobalTracerProvider`; otherwise
|
|
7
7
|
* every call falls back to a no-op implementation so the core boots without the
|
|
8
8
|
* extension installed.
|
|
@@ -172,7 +172,7 @@ export interface MetricsAPI {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
// ---------------------------------------------------------------------------
|
|
175
|
-
// No-op provider (default when ext-
|
|
175
|
+
// No-op provider (default when ext-observability-opentelemetry is not installed)
|
|
176
176
|
// ---------------------------------------------------------------------------
|
|
177
177
|
|
|
178
178
|
function createNoopContext(): Context {
|
|
@@ -254,7 +254,7 @@ let _propagator: TextMapPropagator | null = null;
|
|
|
254
254
|
|
|
255
255
|
/**
|
|
256
256
|
* Optional accessor for the currently active span. Wired by
|
|
257
|
-
* ext-
|
|
257
|
+
* ext-observability-opentelemetry (via `setGlobalActiveSpanAccessor`) so `trace.getActiveSpan()`
|
|
258
258
|
* and `trace.getSpan()` return the real SDK span once the extension is active.
|
|
259
259
|
*/
|
|
260
260
|
let _activeSpanAccessor: {
|
|
@@ -264,7 +264,7 @@ let _activeSpanAccessor: {
|
|
|
264
264
|
|
|
265
265
|
/**
|
|
266
266
|
* Register the real OTel trace API's span accessors. Called by the
|
|
267
|
-
* ext-
|
|
267
|
+
* ext-observability-opentelemetry extension after it wires the SDK so that the shim's
|
|
268
268
|
* `trace.getActiveSpan()` / `trace.getSpan()` can return real spans.
|
|
269
269
|
*/
|
|
270
270
|
export function setGlobalActiveSpanAccessor(
|
|
@@ -287,7 +287,7 @@ export function getGlobalTracerProvider(): TracerProvider {
|
|
|
287
287
|
|
|
288
288
|
/**
|
|
289
289
|
* Get a tracer from the active provider.
|
|
290
|
-
* Returns the no-op tracer when ext-
|
|
290
|
+
* Returns the no-op tracer when ext-observability-opentelemetry is not installed.
|
|
291
291
|
*/
|
|
292
292
|
export function getTracer(name: string, version?: string): Tracer {
|
|
293
293
|
return _provider.getTracer(name, version);
|
|
@@ -378,14 +378,14 @@ export const defaultTextMapSetter: TextMapSetter<Record<string, string>> = {
|
|
|
378
378
|
};
|
|
379
379
|
|
|
380
380
|
// ---------------------------------------------------------------------------
|
|
381
|
-
// Metrics API registry (injected by ext-
|
|
381
|
+
// Metrics API registry (injected by ext-observability-opentelemetry when active)
|
|
382
382
|
// ---------------------------------------------------------------------------
|
|
383
383
|
|
|
384
384
|
let _metricsApi: MetricsAPI | null = null;
|
|
385
385
|
|
|
386
386
|
/**
|
|
387
387
|
* Register the OTel Metrics API (from the SDK).
|
|
388
|
-
* Called by ext-
|
|
388
|
+
* Called by ext-observability-opentelemetry in its setup hook so the metrics subsystem
|
|
389
389
|
* can use `getMeter()` when available.
|
|
390
390
|
*/
|
|
391
391
|
export function setGlobalMetricsAPI(api: MetricsAPI): void {
|
|
@@ -56,7 +56,7 @@ export class TracingManager {
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
private async initializeTracer(config: TracingConfig): Promise<void> {
|
|
59
|
-
// Use the shim API — delegates to the real SDK when ext-
|
|
59
|
+
// Use the shim API — delegates to the real SDK when ext-observability-opentelemetry is wired.
|
|
60
60
|
const shimApi = await import("./api-shim.js");
|
|
61
61
|
const api: OpenTelemetryAPI = {
|
|
62
62
|
trace: {
|
|
@@ -79,7 +79,7 @@ export class TracingManager {
|
|
|
79
79
|
|
|
80
80
|
this.state.tracer = api.trace.getTracer(config.serviceName ?? "veryfront", VERSION);
|
|
81
81
|
|
|
82
|
-
// No-op propagator used only when ext-
|
|
82
|
+
// No-op propagator used only when ext-observability-opentelemetry is NOT installed.
|
|
83
83
|
// When the extension is active, it registers W3CTraceContextPropagator
|
|
84
84
|
// on the shim directly; we intentionally do NOT wrap shimApi.propagation
|
|
85
85
|
// here (doing so would cause infinite recursion when the global
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**************************
|
|
2
2
|
* OpenTelemetry OTLP Setup
|
|
3
3
|
*
|
|
4
|
-
* Thin wrapper that delegates to the `ext-
|
|
4
|
+
* Thin wrapper that delegates to the `ext-observability-opentelemetry` extension via the
|
|
5
5
|
* `TracingExporter` contract. When the extension is not installed, all span
|
|
6
6
|
* operations silently no-op.
|
|
7
7
|
*
|
|
@@ -81,15 +81,15 @@ export async function initializeOTLP(): Promise<void> {
|
|
|
81
81
|
logger.debug("Already initialized");
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
|
-
// Actual provider setup is handled by ext-
|
|
84
|
+
// Actual provider setup is handled by ext-observability-opentelemetry via bootstrap.
|
|
85
85
|
// This is kept for backward compatibility.
|
|
86
86
|
initialized = true;
|
|
87
|
-
logger.debug("OTLP setup delegated to ext-
|
|
87
|
+
logger.debug("OTLP setup delegated to ext-observability-opentelemetry extension");
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export async function shutdownOTLP(): Promise<void> {
|
|
91
91
|
// Actual shutdown is handled by the extension loader teardown.
|
|
92
|
-
logger.debug("OTLP shutdown delegated to ext-
|
|
92
|
+
logger.debug("OTLP shutdown delegated to ext-observability-opentelemetry extension");
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
export function isOTLPEnabled(): boolean {
|
package/src/src/proxy/tracing.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/****
|
|
2
2
|
* OpenTelemetry OTLP tracing for proxy.
|
|
3
3
|
*
|
|
4
|
-
* Uses the core api-shim for in-process tracing; when ext-
|
|
4
|
+
* Uses the core api-shim for in-process tracing; when ext-observability-opentelemetry
|
|
5
5
|
* is loaded, the shim delegates to the real SDK provider.
|
|
6
6
|
*
|
|
7
7
|
* Env: OTEL_TRACES_ENABLED, OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT,
|
|
@@ -71,7 +71,7 @@ export async function initializeOTLPWithApis(): Promise<void> {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
try {
|
|
74
|
-
// The shim's provider is wired by ext-
|
|
74
|
+
// The shim's provider is wired by ext-observability-opentelemetry via bootstrap.ts.
|
|
75
75
|
// We simply get a tracer from the shim — it delegates to the real SDK
|
|
76
76
|
// when the extension is active, otherwise returns the no-op tracer.
|
|
77
77
|
tracer = shimTrace.getTracer(config.serviceName);
|
|
@@ -247,8 +247,10 @@ function variantClasses<TVariants extends VariantMap>(
|
|
|
247
247
|
const classes: ClassValue[] = [base];
|
|
248
248
|
|
|
249
249
|
for (const [variantName, variantValues] of Object.entries(config.variants)) {
|
|
250
|
-
const
|
|
251
|
-
|
|
250
|
+
const option = options[variantName];
|
|
251
|
+
const selected = Object.hasOwn(options, variantName) && option !== undefined
|
|
252
|
+
? option
|
|
253
|
+
: config.defaultVariants?.[variantName];
|
|
252
254
|
if (selected === null || selected === undefined) continue;
|
|
253
255
|
classes.push(variantValues[String(selected)]);
|
|
254
256
|
}
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from "../extensions/builtin-extensions.js";
|
|
14
14
|
import { MISSING_EXTENSION_ERROR } from "../extensions/errors.js";
|
|
15
15
|
import { getRecommendation } from "../extensions/recommendations.js";
|
|
16
|
-
import type { TracingExporter } from "../extensions/
|
|
16
|
+
import type { TracingExporter } from "../extensions/observability/tracing-exporter.js";
|
|
17
17
|
import {
|
|
18
18
|
setGlobalActiveSpanAccessor,
|
|
19
19
|
setGlobalMetricsAPI,
|