@oxy-hq/sdk 2.6.0 → 2.8.0
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 +54 -4
- package/dist/index.cjs +670 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +505 -9
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +505 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +654 -7
- package/dist/index.mjs.map +1 -1
- package/dist/{react-BAiiXftp.cjs → react-BFFCK4VM.cjs} +6 -1
- package/dist/react-BFFCK4VM.cjs.map +1 -0
- package/dist/{react-DnBdQ8dG.d.cts → react-kHG5gkd-.d.cts} +7 -2
- package/dist/react-kHG5gkd-.d.cts.map +1 -0
- package/dist/{react-DnBdQ8dG.d.mts → react-kHG5gkd-.d.mts} +7 -2
- package/dist/react-kHG5gkd-.d.mts.map +1 -0
- package/dist/{react-5HGW_0oy.mjs → react-sT7E4CbA.mjs} +6 -1
- package/dist/react-sT7E4CbA.mjs.map +1 -0
- package/dist/shell.cjs +4 -3
- package/dist/shell.cjs.map +1 -1
- package/dist/shell.css +28 -6
- package/dist/shell.d.cts +1 -1
- package/dist/shell.d.cts.map +1 -1
- package/dist/shell.d.mts +1 -1
- package/dist/shell.d.mts.map +1 -1
- package/dist/shell.mjs +4 -3
- package/dist/shell.mjs.map +1 -1
- package/package.json +5 -5
- package/dist/react-5HGW_0oy.mjs.map +0 -1
- package/dist/react-BAiiXftp.cjs.map +0 -1
- package/dist/react-DnBdQ8dG.d.cts.map +0 -1
- package/dist/react-DnBdQ8dG.d.mts.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { A as UseSemanticQueryOpts, B as CustomAppErrorReport, C as UseProcedureRunInput, D as UseQueryOpts, E as UseQueryInput, F as useProcedureRun, G as OxyAppFunctionManifest, H as apiErrorFromResponse, I as useQuery, J as _resetCustomAppManifestCacheForTest, K as OxyAppManifest, L as useResolvedManifest, M as useAgentRun, N as useFunction, O as UseQueryResult, P as useOxyApp, R as useSemanticQuery, S as UseFunctionResult, T as UseProcedureRunResult, U as interpretCustomAppError, V as OxyApiError, W as LoadManifestOptions, Y as loadCustomAppManifest, _ as SemanticFilter, a as AppFetcher, b as UseAgentRunInput, c as OxyAppProvider, d as OxyChatProps, f as ProcedureProgress, g as SemanticDateRangeOp, h as SemanticArrayOp, i as AgentSqlArtifact, j as UseSemanticQueryResult, k as UseSemanticQueryInput, l as OxyAppProviderProps, m as ProcedureRunState, n as AgentRunEvent, o as OxyAnswer, p as ProcedureResult, q as ResolvedCustomAppManifest, r as AgentRunState, s as OxyAnswerProps, t as AgentArtifact, u as OxyChat, v as SemanticScalarOp, w as UseProcedureRunOpts, x as UseAgentRunResult, y as SemanticTimeDimension, z as useTrackEvent } from "./react-
|
|
2
|
+
import { A as UseSemanticQueryOpts, B as CustomAppErrorReport, C as UseProcedureRunInput, D as UseQueryOpts, E as UseQueryInput, F as useProcedureRun, G as OxyAppFunctionManifest, H as apiErrorFromResponse, I as useQuery, J as _resetCustomAppManifestCacheForTest, K as OxyAppManifest, L as useResolvedManifest, M as useAgentRun, N as useFunction, O as UseQueryResult, P as useOxyApp, R as useSemanticQuery, S as UseFunctionResult, T as UseProcedureRunResult, U as interpretCustomAppError, V as OxyApiError, W as LoadManifestOptions, Y as loadCustomAppManifest, _ as SemanticFilter, a as AppFetcher, b as UseAgentRunInput, c as OxyAppProvider, d as OxyChatProps, f as ProcedureProgress, g as SemanticDateRangeOp, h as SemanticArrayOp, i as AgentSqlArtifact, j as UseSemanticQueryResult, k as UseSemanticQueryInput, l as OxyAppProviderProps, m as ProcedureRunState, n as AgentRunEvent, o as OxyAnswer, p as ProcedureResult, q as ResolvedCustomAppManifest, r as AgentRunState, s as OxyAnswerProps, t as AgentArtifact, u as OxyChat, v as SemanticScalarOp, w as UseProcedureRunOpts, x as UseAgentRunResult, y as SemanticTimeDimension, z as useTrackEvent } from "./react-kHG5gkd-.cjs";
|
|
3
3
|
//#region src/config.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Configuration for the Oxy SDK
|
|
@@ -141,15 +141,38 @@ interface ExplainNode {
|
|
|
141
141
|
dimension_count?: number;
|
|
142
142
|
children?: ExplainNode[];
|
|
143
143
|
}
|
|
144
|
+
/** Whether a driver's observed move pushes the target the way it actually
|
|
145
|
+
* moved (`contributing`) or against it (`counteracting` — it offset part of
|
|
146
|
+
* the move rather than causing it). `unknown` when no signed claim is
|
|
147
|
+
* available: `direction: unknown` with no coefficient, or a flat
|
|
148
|
+
* driver/target. */
|
|
149
|
+
type DriverContribution = "contributing" | "counteracting" | "unknown";
|
|
150
|
+
/** A driver's move split into the part its base forced and the part its own
|
|
151
|
+
* ratio contributed. Emitted only when the driver genuinely tracks a sibling
|
|
152
|
+
* rather than moving on its own — presence is the claim.
|
|
153
|
+
* `base_driven_delta + ratio_driven_delta === driver_delta`. */
|
|
154
|
+
interface PassthroughSplit {
|
|
155
|
+
base_measure: string;
|
|
156
|
+
ratio_previous: number;
|
|
157
|
+
ratio_current: number;
|
|
158
|
+
base_driven_delta: number;
|
|
159
|
+
ratio_driven_delta: number;
|
|
160
|
+
}
|
|
144
161
|
interface DriverAttribution {
|
|
145
162
|
driver_measure: string;
|
|
146
163
|
driver_previous: number;
|
|
147
164
|
driver_current: number;
|
|
148
165
|
driver_delta: number;
|
|
166
|
+
/** Both optional: an `explain_cache` row written before these fields shipped
|
|
167
|
+
* is served verbatim, so absent means unclassified — not a default. */
|
|
168
|
+
direction?: DriverDirection;
|
|
169
|
+
contribution?: DriverContribution;
|
|
149
170
|
coefficient?: number;
|
|
150
171
|
form: DriverForm;
|
|
172
|
+
/** Absent for a purely qualitative driver (no coefficient). */
|
|
151
173
|
estimated_target_impact?: number;
|
|
152
174
|
description?: string;
|
|
175
|
+
passthrough?: PassthroughSplit;
|
|
153
176
|
}
|
|
154
177
|
type ExplainWarning = {
|
|
155
178
|
type: "simpsons_paradox";
|
|
@@ -225,12 +248,31 @@ interface OpportunityResult {
|
|
|
225
248
|
target: string;
|
|
226
249
|
period: [string, string];
|
|
227
250
|
overall_value: number;
|
|
228
|
-
/**
|
|
251
|
+
/**
|
|
252
|
+
* "rows" (rate-based additive sizing — the only basis that yields a sized
|
|
253
|
+
* upside figure), "value_share" (additive) or "equal" (ratios).
|
|
254
|
+
*/
|
|
229
255
|
weight_basis: string;
|
|
230
256
|
dimensions: DimensionOpportunity[];
|
|
231
257
|
skipped_dimensions: SkippedDimension[];
|
|
232
258
|
downstream: PredictImpact[];
|
|
233
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Single-period structural decomposition. The server auto-derives the
|
|
262
|
+
* baseline as the equal-length window immediately before `period`, then
|
|
263
|
+
* returns an {@link ExplainResult}-shaped payload (so the same renderers
|
|
264
|
+
* work). Ignore the delta fields when rendering a pure distribution.
|
|
265
|
+
*/
|
|
266
|
+
interface DistributionRequest {
|
|
267
|
+
target: string;
|
|
268
|
+
time_dimension: string;
|
|
269
|
+
/** `[start, end]` inclusive date strings. */
|
|
270
|
+
period: [string, string];
|
|
271
|
+
}
|
|
272
|
+
interface TimeDimensionsResponse {
|
|
273
|
+
/** view name → fully-qualified time-dimension ids (`view.dim`). */
|
|
274
|
+
by_view: Record<string, string[]>;
|
|
275
|
+
}
|
|
234
276
|
/**
|
|
235
277
|
* Shape of the inner request helper exposed by `OxyClient`. The metric-tree
|
|
236
278
|
* client reuses it to inherit auth headers, timeout, baseUrl, and project
|
|
@@ -334,6 +376,13 @@ declare class MetricTreeClient {
|
|
|
334
376
|
//#region src/anomalies.d.ts
|
|
335
377
|
type AnomalyStatus = "new" | "acknowledged" | "dismissed";
|
|
336
378
|
type AnomalySeverity = "low" | "medium" | "high";
|
|
379
|
+
/** One filter pinning an anomaly (or a failed monitor) to a segment. */
|
|
380
|
+
interface AnomalyFilter {
|
|
381
|
+
/** Fully-qualified dimension id, e.g. `"sales_daily.restaurant_id"`. */
|
|
382
|
+
member: string;
|
|
383
|
+
/** Matched values (OR within a filter). */
|
|
384
|
+
values: string[];
|
|
385
|
+
}
|
|
337
386
|
/**
|
|
338
387
|
* One row in the anomaly inbox. Detected by `oxy-metric-monitoring` per
|
|
339
388
|
* `.monitor.yml` entry; upserted by repeat scans so unresolved anomalies
|
|
@@ -355,6 +404,18 @@ interface Anomaly {
|
|
|
355
404
|
severity: AnomalySeverity | string;
|
|
356
405
|
status: AnomalyStatus | string;
|
|
357
406
|
label?: string | null;
|
|
407
|
+
/**
|
|
408
|
+
* Stable key derived from the monitor's filters (e.g.
|
|
409
|
+
* `"sales_daily.restaurant_id=loc-abc"`). Empty for chain-wide monitors.
|
|
410
|
+
*/
|
|
411
|
+
dimension_key: string;
|
|
412
|
+
/**
|
|
413
|
+
* Raw filters identifying the segment; `null` for chain-wide monitors.
|
|
414
|
+
* Always present on the wire (the server serializes it unconditionally),
|
|
415
|
+
* hence required-nullable rather than optional — same shape as
|
|
416
|
+
* {@link ScanFailure.filters}.
|
|
417
|
+
*/
|
|
418
|
+
filters: AnomalyFilter[] | null;
|
|
358
419
|
/** Cached ExplainResult — populated by `POST /anomalies/:id/explain`. */
|
|
359
420
|
explain_cache?: ExplainResult | null;
|
|
360
421
|
explain_cached_at?: string | null;
|
|
@@ -373,10 +434,38 @@ interface ScanOptions {
|
|
|
373
434
|
/** Override the reference "now" date (YYYY-MM-DD) — useful for demos. */
|
|
374
435
|
as_of?: string;
|
|
375
436
|
}
|
|
437
|
+
/** One `.monitor.yml` entry that errored during a scan. */
|
|
438
|
+
interface ScanFailure {
|
|
439
|
+
measure: string;
|
|
440
|
+
time_dimension: string;
|
|
441
|
+
granularity: string;
|
|
442
|
+
label: string | null;
|
|
443
|
+
/** Segment key for a `group_by`/filtered monitor; empty for chain-wide. */
|
|
444
|
+
dimension_key: string;
|
|
445
|
+
/** Raw filters identifying the segment; null for chain-wide monitors. */
|
|
446
|
+
filters: AnomalyFilter[] | null;
|
|
447
|
+
error: string;
|
|
448
|
+
}
|
|
376
449
|
interface ScanResponse {
|
|
377
450
|
monitors_scanned: number;
|
|
378
451
|
monitors_failed: number;
|
|
379
452
|
anomalies_persisted: number;
|
|
453
|
+
/**
|
|
454
|
+
* True when the scan is still running server-side (it exceeded the 55 s
|
|
455
|
+
* synchronous window, or a scan started within the last 60 s and this call
|
|
456
|
+
* was debounced). The counts are all `0` in that case — they are NOT a
|
|
457
|
+
* "nothing found" result. Refetch with `list()` after a short delay.
|
|
458
|
+
*/
|
|
459
|
+
pending: boolean;
|
|
460
|
+
/**
|
|
461
|
+
* Per-monitor failures. Empty array (never absent) on a clean scan and on
|
|
462
|
+
* the `pending` path, where failures aren't known yet.
|
|
463
|
+
*/
|
|
464
|
+
failures: ScanFailure[];
|
|
465
|
+
}
|
|
466
|
+
interface ExplainOptions {
|
|
467
|
+
/** Recompute even when the row already has a cached result. */
|
|
468
|
+
refresh?: boolean;
|
|
380
469
|
}
|
|
381
470
|
type RequestFn = <T>(endpoint: string, options?: RequestInit) => Promise<T>;
|
|
382
471
|
/**
|
|
@@ -413,11 +502,20 @@ declare class AnomaliesClient {
|
|
|
413
502
|
* workspace, runs the detector, and upserts matching rows into the
|
|
414
503
|
* inbox. Returns counts of scanned / failed / persisted.
|
|
415
504
|
*
|
|
505
|
+
* Long-running: the server waits up to 55 s, then returns
|
|
506
|
+
* `pending: true` with zeroed counts while the scan finishes in the
|
|
507
|
+
* background. Always check `pending` before treating `0` as "nothing
|
|
508
|
+
* found", and refetch with {@link list} shortly after.
|
|
509
|
+
*
|
|
416
510
|
* @example
|
|
417
511
|
* ```typescript
|
|
418
512
|
* // Scan against a known-good reference date (matches the seed dataset)
|
|
419
513
|
* const result = await client.anomalies.scan({ as_of: "2025-12-15" });
|
|
420
|
-
*
|
|
514
|
+
* if (result.pending) {
|
|
515
|
+
* console.log("scan still running — refetch shortly");
|
|
516
|
+
* } else {
|
|
517
|
+
* console.log(`${result.anomalies_persisted} anomalies detected`);
|
|
518
|
+
* }
|
|
421
519
|
* ```
|
|
422
520
|
*/
|
|
423
521
|
scan(options?: ScanOptions): Promise<ScanResponse>;
|
|
@@ -427,11 +525,43 @@ declare class AnomaliesClient {
|
|
|
427
525
|
updateStatus(anomalyId: string, status: AnomalyStatus): Promise<Anomaly>;
|
|
428
526
|
/**
|
|
429
527
|
* Run the metric-tree `explain` for an anomaly and cache the result on
|
|
430
|
-
* the row. Subsequent calls return the cached `ExplainResult` instantly
|
|
528
|
+
* the row. Subsequent calls return the cached `ExplainResult` instantly;
|
|
529
|
+
* pass `{ refresh: true }` to bust the cache and recompute.
|
|
530
|
+
*
|
|
531
|
+
* The uncached path runs a 20-30 s recursive driver search — budget for it
|
|
532
|
+
* (or read `explain_cache` off the row from {@link list} when it's already
|
|
533
|
+
* populated).
|
|
431
534
|
*/
|
|
432
|
-
explain(anomalyId: string): Promise<ExplainResult>;
|
|
535
|
+
explain(anomalyId: string, options?: ExplainOptions): Promise<ExplainResult>;
|
|
433
536
|
}
|
|
434
537
|
//#endregion
|
|
538
|
+
//#region src/custom-app/base64.d.ts
|
|
539
|
+
/**
|
|
540
|
+
* Encode bytes as standard (padded) base64.
|
|
541
|
+
*
|
|
542
|
+
* ```ts
|
|
543
|
+
* const pdf = new Uint8Array(await renderReport());
|
|
544
|
+
* await ctx.email.send({
|
|
545
|
+
* to: ctx.user.email,
|
|
546
|
+
* subject: "Report",
|
|
547
|
+
* text: "attached",
|
|
548
|
+
* attachments: [{ filename: "report.pdf", content: bytesToBase64(pdf) }]
|
|
549
|
+
* });
|
|
550
|
+
* ```
|
|
551
|
+
*
|
|
552
|
+
* For **text** you generated, skip this entirely and pass the string with
|
|
553
|
+
* `encoding: "utf8"` — it needs no encoder and stays byte-exact for non-ASCII.
|
|
554
|
+
*/
|
|
555
|
+
declare function bytesToBase64(input: Uint8Array | ArrayBuffer | ArrayBufferView): string;
|
|
556
|
+
/**
|
|
557
|
+
* Decode standard base64 to bytes — e.g. the body from
|
|
558
|
+
* `ctx.storage.get(key, { encoding: "base64" })`.
|
|
559
|
+
*
|
|
560
|
+
* Throws on malformed input rather than returning a short buffer: a truncated
|
|
561
|
+
* decode that reports success is a corrupt file nobody notices.
|
|
562
|
+
*/
|
|
563
|
+
declare function base64ToBytes(base64: string): Uint8Array;
|
|
564
|
+
//#endregion
|
|
435
565
|
//#region src/custom-app/debug.d.ts
|
|
436
566
|
/** Untyped at the boundary — keep it loose so server-side schema
|
|
437
567
|
* additions don't break older bundles. Stable enough for inspection
|
|
@@ -508,8 +638,24 @@ interface OxyFunctionUser {
|
|
|
508
638
|
/** Result of a `ctx.fetch` call. */
|
|
509
639
|
interface OxyFetchResult {
|
|
510
640
|
status: number;
|
|
641
|
+
/** Response body, decoded per the requested {@link OxyFetchInit.encoding}. */
|
|
511
642
|
body: string;
|
|
643
|
+
/** Echoes how `body` was encoded (`"utf8"` unless base64 was requested). */
|
|
644
|
+
encoding?: "utf8" | "base64";
|
|
512
645
|
}
|
|
646
|
+
/**
|
|
647
|
+
* `init` for `ctx.fetch` — the standard `RequestInit` fields the host honours
|
|
648
|
+
* (`method`, `headers`, `body`) plus how to decode the response.
|
|
649
|
+
*/
|
|
650
|
+
type OxyFetchInit = RequestInit & {
|
|
651
|
+
/**
|
|
652
|
+
* How to decode the response body. `"utf8"` (default) is **lossy for
|
|
653
|
+
* binary** — every non-UTF-8 byte becomes U+FFFD, so a fetched PDF/PNG comes
|
|
654
|
+
* back corrupt. Pass `"base64"` for any binary response, e.g. to hand it
|
|
655
|
+
* straight to an email attachment.
|
|
656
|
+
*/
|
|
657
|
+
encoding?: "utf8" | "base64";
|
|
658
|
+
};
|
|
513
659
|
/** `ctx.warehouse.*` — writes to one of the app's configured destination databases. */
|
|
514
660
|
interface OxyWarehouseApi {
|
|
515
661
|
insert(database: string, table: string, rows: OxyFunctionRow[]): Promise<unknown>;
|
|
@@ -561,6 +707,9 @@ interface EmailSendInput {
|
|
|
561
707
|
* Files to attach. Max 20 per send, and **10 MiB decoded in total** — SES
|
|
562
708
|
* caps a whole message near 40 MB, so for anything larger store the file with
|
|
563
709
|
* {@link OxyStorageApi} and email a presigned link instead of inlining it.
|
|
710
|
+
*
|
|
711
|
+
* `content` is base64 by default; for generated text set
|
|
712
|
+
* `encoding: "utf8"` and attach the string as-is.
|
|
564
713
|
*/
|
|
565
714
|
attachments?: EmailAttachment[];
|
|
566
715
|
}
|
|
@@ -568,8 +717,23 @@ interface EmailSendInput {
|
|
|
568
717
|
interface EmailAttachment {
|
|
569
718
|
/** Filename shown to the recipient. Required; path separators are stripped. */
|
|
570
719
|
filename: string;
|
|
571
|
-
/**
|
|
720
|
+
/**
|
|
721
|
+
* File contents, interpreted per {@link EmailAttachment.encoding} — base64 by
|
|
722
|
+
* default, which is the only way binary crosses the isolate boundary.
|
|
723
|
+
*/
|
|
572
724
|
content: string;
|
|
725
|
+
/**
|
|
726
|
+
* How `content` is encoded. Defaults to `"base64"`.
|
|
727
|
+
*
|
|
728
|
+
* Use `"utf8"` to attach text the function just generated (CSV, JSON, HTML)
|
|
729
|
+
* — it needs no encoder and is byte-exact for non-ASCII. `btoa` is the wrong
|
|
730
|
+
* tool there: it encodes U+0080..U+00FF as *Latin1*, so accented text comes
|
|
731
|
+
* out as mojibake rather than as an error. For binary, take base64 straight
|
|
732
|
+
* from the source — `ctx.storage.get(key, { encoding: "base64" })` or
|
|
733
|
+
* `ctx.fetch(url, { encoding: "base64" })` — or {@link bytesToBase64} for a
|
|
734
|
+
* `Uint8Array` you built yourself.
|
|
735
|
+
*/
|
|
736
|
+
encoding?: "base64" | "utf8";
|
|
573
737
|
/** MIME type; defaults to `application/octet-stream`. */
|
|
574
738
|
contentType?: string;
|
|
575
739
|
/** Render inline (e.g. an image referenced as `cid:<contentId>`) instead of as a download. */
|
|
@@ -762,8 +926,12 @@ interface OxyFunctionContext {
|
|
|
762
926
|
queryStream(sql: string, opts?: {
|
|
763
927
|
batchSize?: number;
|
|
764
928
|
}): AsyncGenerator<OxyFunctionRow[], void, unknown>;
|
|
765
|
-
/**
|
|
766
|
-
|
|
929
|
+
/**
|
|
930
|
+
* SSRF-allowlisted outbound HTTP with a response-size cap. Pass
|
|
931
|
+
* `{ encoding: "base64" }` for a binary response — the default UTF-8 decode
|
|
932
|
+
* corrupts it.
|
|
933
|
+
*/
|
|
934
|
+
fetch(url: string, init?: OxyFetchInit): Promise<OxyFetchResult>;
|
|
767
935
|
warehouse: OxyWarehouseApi;
|
|
768
936
|
secrets: OxySecretsApi;
|
|
769
937
|
semantic: OxySemanticApi;
|
|
@@ -813,5 +981,333 @@ declare function setOxyAppLogger(logger: OxyAppLogger | null): void;
|
|
|
813
981
|
/** Used by the SDK internals; not part of the public surface. */
|
|
814
982
|
declare function getOxyAppLogger(): OxyAppLogger;
|
|
815
983
|
//#endregion
|
|
816
|
-
|
|
984
|
+
//#region src/custom-app/metric-tree-hooks.d.ts
|
|
985
|
+
/** Shared result envelope for every metric-tree hook. */
|
|
986
|
+
interface MetricTreeHookResult<Data> {
|
|
987
|
+
data: Data | null;
|
|
988
|
+
loading: boolean;
|
|
989
|
+
error: Error | null;
|
|
990
|
+
/** Force a re-run, bypassing nothing — the server honors `?refresh`. */
|
|
991
|
+
refetch: () => void;
|
|
992
|
+
}
|
|
993
|
+
interface EndpointOpts {
|
|
994
|
+
/** Set false to skip the request (e.g. waiting on a user selection). */
|
|
995
|
+
enabled?: boolean;
|
|
996
|
+
}
|
|
997
|
+
interface UseMetricTreeOpts extends EndpointOpts {
|
|
998
|
+
/** Optional measure id to root the returned subtree at. */
|
|
999
|
+
root?: string;
|
|
1000
|
+
}
|
|
1001
|
+
/**
|
|
1002
|
+
* The project's metric tree — measures (nodes) and their component /
|
|
1003
|
+
* driver relationships (edges) — or the subtree rooted at `opts.root`.
|
|
1004
|
+
* The structural backbone every other metric-tree analysis reads against.
|
|
1005
|
+
*/
|
|
1006
|
+
declare function useMetricTree(opts?: UseMetricTreeOpts): MetricTreeHookResult<MetricTree>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Ranked drivers of `measureId`, by influence — the "what moves this
|
|
1009
|
+
* measure" question. Pass `null` to stay idle until a measure is chosen.
|
|
1010
|
+
*/
|
|
1011
|
+
declare function useSensitivity(measureId: string | null, opts?: EndpointOpts): MetricTreeHookResult<SensitivityResult>;
|
|
1012
|
+
/**
|
|
1013
|
+
* Propagate hypothetical `(measure, delta)` changes upward through the
|
|
1014
|
+
* tree and return the estimated impact on every downstream measure — a
|
|
1015
|
+
* pure metric-tree walk, no warehouse query. Pass `null` to stay idle.
|
|
1016
|
+
*/
|
|
1017
|
+
declare function usePredict(changes: PredictChange[] | null, opts?: EndpointOpts): MetricTreeHookResult<PredictResult>;
|
|
1018
|
+
/**
|
|
1019
|
+
* Period-over-period root-cause decomposition: recursively splits the
|
|
1020
|
+
* target measure by components and dimensions until the move concentrates.
|
|
1021
|
+
* This is the heavy one — it can fire many warehouse queries and the
|
|
1022
|
+
* server caps it at 45s. Pass `null` to defer until periods are chosen.
|
|
1023
|
+
*/
|
|
1024
|
+
declare function useExplain(request: ExplainRequest | null, opts?: EndpointOpts): MetricTreeHookResult<ExplainResult>;
|
|
1025
|
+
/**
|
|
1026
|
+
* Single-period distribution of a measure — an {@link ExplainResult}
|
|
1027
|
+
* against an auto-derived immediately-prior baseline. Same renderers as
|
|
1028
|
+
* `useExplain`; ignore the delta fields for a pure distribution view.
|
|
1029
|
+
*/
|
|
1030
|
+
declare function useDistribution(request: DistributionRequest | null, opts?: EndpointOpts): MetricTreeHookResult<ExplainResult>;
|
|
1031
|
+
/**
|
|
1032
|
+
* Segment opportunity sizing for a measure over a period: finds
|
|
1033
|
+
* underperforming segments and sizes the addressable upside of closing
|
|
1034
|
+
* each rate gap against a benchmark peer. Pass `null` to stay idle until
|
|
1035
|
+
* a target + period are chosen.
|
|
1036
|
+
*/
|
|
1037
|
+
declare function useOpportunity(request: OpportunityRequest | null, opts?: EndpointOpts): MetricTreeHookResult<OpportunityResult>;
|
|
1038
|
+
/**
|
|
1039
|
+
* The queryable time dimensions per view (`view.dim` ids) — what a
|
|
1040
|
+
* bundle offers as the period axis for `explain` / `opportunity` /
|
|
1041
|
+
* `distribution` instead of hardcoding a curated map.
|
|
1042
|
+
*/
|
|
1043
|
+
declare function useTimeDimensions(opts?: EndpointOpts): MetricTreeHookResult<TimeDimensionsResponse>;
|
|
1044
|
+
//#endregion
|
|
1045
|
+
//#region src/custom-app/sse.d.ts
|
|
1046
|
+
/**
|
|
1047
|
+
* Read a `text/event-stream` response, invoking `onEvent` with each parsed
|
|
1048
|
+
* JSON frame. Frames that fail to parse are skipped (a malformed frame must
|
|
1049
|
+
* not tear down the whole stream). Resolves when the body closes.
|
|
1050
|
+
*/
|
|
1051
|
+
declare function readJsonSseStream<E>(resp: Response, onEvent: (event: E) => void): Promise<void>;
|
|
1052
|
+
//#endregion
|
|
1053
|
+
//#region src/worldModel.d.ts
|
|
1054
|
+
/** How a measure aggregates across the entity hierarchy. */
|
|
1055
|
+
type AdditivityClass = "additive" | "non_additive" | "passthrough";
|
|
1056
|
+
interface WorldModelMeasure {
|
|
1057
|
+
name: string;
|
|
1058
|
+
measure_type: string;
|
|
1059
|
+
additivity: AdditivityClass;
|
|
1060
|
+
description?: string | null;
|
|
1061
|
+
expr?: string | null;
|
|
1062
|
+
label?: string | null;
|
|
1063
|
+
/** True when the measure decomposes into a metric-tree driver breakdown. */
|
|
1064
|
+
has_breakdown?: boolean;
|
|
1065
|
+
}
|
|
1066
|
+
/** A measure promoted onto this entity from a descendant view. */
|
|
1067
|
+
interface WorldModelInducedMeasure extends WorldModelMeasure {
|
|
1068
|
+
/** View the measure is actually declared on. */
|
|
1069
|
+
promoted_from: string;
|
|
1070
|
+
/** Promotion path from the declaring view up to this entity. */
|
|
1071
|
+
path: string[];
|
|
1072
|
+
}
|
|
1073
|
+
interface WorldModelDimension {
|
|
1074
|
+
name: string;
|
|
1075
|
+
dim_type: string;
|
|
1076
|
+
description?: string | null;
|
|
1077
|
+
label?: string | null;
|
|
1078
|
+
}
|
|
1079
|
+
interface WorldModelEntity {
|
|
1080
|
+
id: string;
|
|
1081
|
+
label: string;
|
|
1082
|
+
view: string;
|
|
1083
|
+
description?: string | null;
|
|
1084
|
+
depth: number;
|
|
1085
|
+
dimensions: WorldModelDimension[];
|
|
1086
|
+
own_measures: WorldModelMeasure[];
|
|
1087
|
+
induced_measures: WorldModelInducedMeasure[];
|
|
1088
|
+
display_field?: string | null;
|
|
1089
|
+
}
|
|
1090
|
+
/** A promotion edge: measures on `from` promote up to `to`. */
|
|
1091
|
+
interface WorldModelEdge {
|
|
1092
|
+
from: string;
|
|
1093
|
+
to: string;
|
|
1094
|
+
functional: boolean;
|
|
1095
|
+
}
|
|
1096
|
+
interface WorldModel {
|
|
1097
|
+
entities: WorldModelEntity[];
|
|
1098
|
+
edges: WorldModelEdge[];
|
|
1099
|
+
}
|
|
1100
|
+
interface WmInstance {
|
|
1101
|
+
key: string;
|
|
1102
|
+
display: string;
|
|
1103
|
+
}
|
|
1104
|
+
interface WmInstancesResponse {
|
|
1105
|
+
total: number;
|
|
1106
|
+
has_more: boolean;
|
|
1107
|
+
items: WmInstance[];
|
|
1108
|
+
}
|
|
1109
|
+
interface WmEntityCount {
|
|
1110
|
+
matched: number;
|
|
1111
|
+
total: number;
|
|
1112
|
+
/** Sample of reachable descendant rows at this grain (display strings). */
|
|
1113
|
+
sample?: string[];
|
|
1114
|
+
/** Navigation keys aligned with `sample`. */
|
|
1115
|
+
sample_keys?: string[];
|
|
1116
|
+
}
|
|
1117
|
+
interface WmFilterCountsResponse {
|
|
1118
|
+
counts: Record<string, WmEntityCount>;
|
|
1119
|
+
}
|
|
1120
|
+
interface WmBreakdownNode {
|
|
1121
|
+
/** Metric node id `view.measure`. */
|
|
1122
|
+
id: string;
|
|
1123
|
+
view: string;
|
|
1124
|
+
measure: string;
|
|
1125
|
+
label: string;
|
|
1126
|
+
measure_type: string;
|
|
1127
|
+
is_composite: boolean;
|
|
1128
|
+
is_root: boolean;
|
|
1129
|
+
expr?: string | null;
|
|
1130
|
+
/** Filled by `value` frames; null while pending. */
|
|
1131
|
+
value: string | null;
|
|
1132
|
+
unvalued_reason: string | null;
|
|
1133
|
+
}
|
|
1134
|
+
interface WmBreakdownEdge {
|
|
1135
|
+
from: string;
|
|
1136
|
+
to: string;
|
|
1137
|
+
operator: "add" | "sub" | "mul" | "div";
|
|
1138
|
+
sign: number;
|
|
1139
|
+
}
|
|
1140
|
+
/** One frame of the measure-breakdown stream. The `init` frame carries the
|
|
1141
|
+
* graph shape; `value` frames fill node values in as they resolve. */
|
|
1142
|
+
type WmMeasureBreakdownEvent = {
|
|
1143
|
+
kind: "init";
|
|
1144
|
+
root: string;
|
|
1145
|
+
nodes: Omit<WmBreakdownNode, "value" | "unvalued_reason">[];
|
|
1146
|
+
edges: WmBreakdownEdge[];
|
|
1147
|
+
} | {
|
|
1148
|
+
kind: "value";
|
|
1149
|
+
node_id: string;
|
|
1150
|
+
value: string | null;
|
|
1151
|
+
unvalued_reason: string | null;
|
|
1152
|
+
} | {
|
|
1153
|
+
kind: "done";
|
|
1154
|
+
};
|
|
1155
|
+
/** Accumulated breakdown — the shape `useMeasureBreakdown` folds the
|
|
1156
|
+
* stream into. */
|
|
1157
|
+
interface WmMeasureBreakdown {
|
|
1158
|
+
root: string;
|
|
1159
|
+
nodes: WmBreakdownNode[];
|
|
1160
|
+
edges: WmBreakdownEdge[];
|
|
1161
|
+
}
|
|
1162
|
+
//#endregion
|
|
1163
|
+
//#region src/custom-app/world-model-hooks.d.ts
|
|
1164
|
+
interface UseWorldModelGraphResult {
|
|
1165
|
+
data: WorldModel | null;
|
|
1166
|
+
loading: boolean;
|
|
1167
|
+
error: Error | null;
|
|
1168
|
+
refetch: () => void;
|
|
1169
|
+
}
|
|
1170
|
+
/**
|
|
1171
|
+
* The world-model graph — entities (nodes), their measures/dimensions, and
|
|
1172
|
+
* how measures promote across the entity hierarchy (edges). Applies the
|
|
1173
|
+
* project's `.world-model.yml` display config server-side.
|
|
1174
|
+
*
|
|
1175
|
+
* @remarks
|
|
1176
|
+
* This returns the raw semantic-layer entity graph. For the higher-level
|
|
1177
|
+
* node-paradigm interface (`world.metric(id)` speaking `expand` / `explain` /
|
|
1178
|
+
* `size`), use {@link useWorldModel} from `./world-node` instead.
|
|
1179
|
+
*/
|
|
1180
|
+
declare function useWorldModelGraph(opts?: {
|
|
1181
|
+
enabled?: boolean;
|
|
1182
|
+
}): UseWorldModelGraphResult;
|
|
1183
|
+
interface UseWorldModelInstancesOpts {
|
|
1184
|
+
/** Substring/prefix search over the entity's display field. */
|
|
1185
|
+
search?: string;
|
|
1186
|
+
/** Max rows to return (default 50 server-side). */
|
|
1187
|
+
limit?: number;
|
|
1188
|
+
enabled?: boolean;
|
|
1189
|
+
}
|
|
1190
|
+
interface UseWorldModelInstancesResult {
|
|
1191
|
+
data: WmInstancesResponse | null;
|
|
1192
|
+
loading: boolean;
|
|
1193
|
+
error: Error | null;
|
|
1194
|
+
refetch: () => void;
|
|
1195
|
+
}
|
|
1196
|
+
/**
|
|
1197
|
+
* List the instances (rows) of `entityId` — a bounded, searchable picker
|
|
1198
|
+
* over the entity's primary keys + display label. Pass `null` for `entityId`
|
|
1199
|
+
* to stay idle until an entity is chosen.
|
|
1200
|
+
*/
|
|
1201
|
+
declare function useWorldModelInstances(entityId: string | null, opts?: UseWorldModelInstancesOpts): UseWorldModelInstancesResult;
|
|
1202
|
+
interface UseMeasureBreakdownResult {
|
|
1203
|
+
/** Accumulated breakdown graph; null until the `init` frame. */
|
|
1204
|
+
breakdown: WmMeasureBreakdown | null;
|
|
1205
|
+
loading: boolean;
|
|
1206
|
+
done: boolean;
|
|
1207
|
+
error: Error | null;
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Stream the driver-tree breakdown of one instance's measure — the metric
|
|
1211
|
+
* decomposition (add/sub/mul/div component graph) with each node's value
|
|
1212
|
+
* filling in as it resolves. This is the per-instance RCA view. Pass `null`
|
|
1213
|
+
* for `measure` to stay idle.
|
|
1214
|
+
*/
|
|
1215
|
+
declare function useMeasureBreakdown(entityId: string | null, keyValue: string | null, measure: string | null): UseMeasureBreakdownResult;
|
|
1216
|
+
//#endregion
|
|
1217
|
+
//#region src/custom-app/world-node.d.ts
|
|
1218
|
+
/** A `dimension → value` scope narrowed onto a node via {@link MetricHandle.drill}. */
|
|
1219
|
+
type MetricScope = Readonly<Record<string, string>>;
|
|
1220
|
+
/** Options for {@link MetricHandle.explain} — an {@link ExplainRequest} minus
|
|
1221
|
+
* the `target`, which the handle supplies from its own id. */
|
|
1222
|
+
type ExplainOpts = Omit<ExplainRequest, "target">;
|
|
1223
|
+
/** Options for {@link MetricHandle.size} — an {@link OpportunityRequest} minus
|
|
1224
|
+
* the `target`. */
|
|
1225
|
+
type SizeOpts = Omit<OpportunityRequest, "target">;
|
|
1226
|
+
/** One child revealed by {@link MetricHandle.expand}: the child measure's
|
|
1227
|
+
* node, the edge that connects it to the parent, and a handle to recurse. */
|
|
1228
|
+
interface ExpandedNode {
|
|
1229
|
+
/** The child measure (a component or a driver of the parent). */
|
|
1230
|
+
node: MetricNode;
|
|
1231
|
+
/** The parent → child edge — `kind`, `direction`, `strength`, `form`, … */
|
|
1232
|
+
edge: MetricEdge;
|
|
1233
|
+
/** A live handle on the child, carrying the parent's scope. */
|
|
1234
|
+
handle: MetricHandle;
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* A live handle on one metric node. Carry it around and call a verb; every
|
|
1238
|
+
* verb returns either more nodes (`expand`), a scoped handle (`drill`), or an
|
|
1239
|
+
* analysis result (`explain` / `size` / `drivers`).
|
|
1240
|
+
*/
|
|
1241
|
+
interface MetricHandle {
|
|
1242
|
+
/** Fully-qualified measure id (`view.measure`). */
|
|
1243
|
+
readonly id: string;
|
|
1244
|
+
/** The scope narrowed onto this handle by `drill` (empty for a root handle). */
|
|
1245
|
+
readonly scope: MetricScope;
|
|
1246
|
+
/** The measure's own tree node (label, expr, is_composite). */
|
|
1247
|
+
node(signal?: AbortSignal): Promise<MetricNode>;
|
|
1248
|
+
/** One hop of relationships — the metric's components and drivers as child nodes. */
|
|
1249
|
+
expand(signal?: AbortSignal): Promise<ExpandedNode[]>;
|
|
1250
|
+
/** The declared drivers of this measure, ranked by influence (sensitivity). */
|
|
1251
|
+
drivers(signal?: AbortSignal): Promise<SensitivityResult>;
|
|
1252
|
+
/** Root-cause a period-over-period move: why it dropped or climbed. */
|
|
1253
|
+
explain(opts: ExplainOpts, signal?: AbortSignal): Promise<ExplainResult>;
|
|
1254
|
+
/** Compare this node to its peers across each dimension and size the gap. */
|
|
1255
|
+
size(opts: SizeOpts, signal?: AbortSignal): Promise<OpportunityResult>;
|
|
1256
|
+
/** Narrow into a segment or entity instance — returns a scoped handle. */
|
|
1257
|
+
drill(scope: Record<string, string>): MetricHandle;
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* The World Model interface, scoped to one project. The whole surface hangs
|
|
1261
|
+
* off this: grab a {@link MetricHandle} with `metric(id)` and the handle
|
|
1262
|
+
* speaks the verbs, or pull the whole graph with `tree(root?)`.
|
|
1263
|
+
*/
|
|
1264
|
+
interface WorldModelApi {
|
|
1265
|
+
/** The active project id, or `null` before `<OxyAppProvider>` resolves one. */
|
|
1266
|
+
readonly projectId: string | null;
|
|
1267
|
+
/** The metric tree, rooted anywhere you like (default: the whole tree). */
|
|
1268
|
+
tree(root?: string, signal?: AbortSignal): Promise<MetricTree>;
|
|
1269
|
+
/** A live handle on one measure node. */
|
|
1270
|
+
metric(id: string): MetricHandle;
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Thrown by the value verbs (`explain` / `size`) when called on a handle that
|
|
1274
|
+
* has been `drill`ed. The metric-tree backend cannot yet scope these analyses
|
|
1275
|
+
* to a segment, so failing loud beats returning population numbers for a
|
|
1276
|
+
* question that asked about one segment.
|
|
1277
|
+
*/
|
|
1278
|
+
declare class WorldModelScopeUnsupportedError extends Error {
|
|
1279
|
+
readonly code = "world_model_scope_unsupported";
|
|
1280
|
+
readonly scope: MetricScope;
|
|
1281
|
+
constructor(verb: string, scope: MetricScope);
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Build a {@link WorldModelApi} over a project id and fetcher. Framework-
|
|
1285
|
+
* agnostic — `useWorldModel()` wraps this for React, but it is directly
|
|
1286
|
+
* unit-testable with a mock fetcher.
|
|
1287
|
+
*/
|
|
1288
|
+
declare function createWorldModel(projectId: string | null, fetcher: AppFetcher): WorldModelApi;
|
|
1289
|
+
/**
|
|
1290
|
+
* The World Model node interface, scoped to the active `<OxyAppProvider>`
|
|
1291
|
+
* project. Returns a stable {@link WorldModelApi} — grab a node with
|
|
1292
|
+
* `world.metric(id)` and let it speak the verbs.
|
|
1293
|
+
*
|
|
1294
|
+
* @example
|
|
1295
|
+
* ```tsx
|
|
1296
|
+
* const world = useWorldModel();
|
|
1297
|
+
* const revenue = world.metric("orders.net_revenue");
|
|
1298
|
+
* const children = await revenue.expand(); // components + drivers
|
|
1299
|
+
* const rca = await revenue.explain({
|
|
1300
|
+
* time_dimension: "orders.order_date",
|
|
1301
|
+
* current_period: ["2026-06-01", "2026-06-30"],
|
|
1302
|
+
* previous_period: ["2026-05-01", "2026-05-31"],
|
|
1303
|
+
* });
|
|
1304
|
+
* ```
|
|
1305
|
+
*
|
|
1306
|
+
* @remarks
|
|
1307
|
+
* This is the node-paradigm hook. For the raw semantic-layer entity/measure
|
|
1308
|
+
* graph, use {@link useWorldModelGraph} instead.
|
|
1309
|
+
*/
|
|
1310
|
+
declare function useWorldModel(): WorldModelApi;
|
|
1311
|
+
//#endregion
|
|
1312
|
+
export { type AdditivityClass, type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalyFilter, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type CustomAppDebugSnapshot, type CustomAppErrorReport, type DimensionOpportunity, type DistributionRequest, type DriverAttribution, type DriverConfidence, type DriverDirection, type DriverForm, type DriverStrength, type EdgeKind, type EmailAttachment, type EmailSendInput, type EmailSendResult, type ExpandedNode, type ExplainConfigOverride, type ExplainNode, type ExplainOptions, type ExplainOpts, type ExplainRequest, type ExplainResult, type ExplainSibling, type ExplainWarning, type ListAnomaliesOptions, type ListAnomaliesResponse, type LoadManifestOptions, type MetricEdge, type MetricHandle, type MetricNode, type MetricScope, type MetricTree, MetricTreeClient, type MetricTreeHookResult, type OpportunityRequest, type OpportunityResult, type OxyAirwayApi, OxyAnswer, type OxyAnswerProps, OxyApiError, type OxyAppFunctionManifest, type OxyAppLogLevel, type OxyAppLogger, type OxyAppManifest, OxyAppProvider, type OxyAppProviderProps, OxyChat, type OxyChatProps, type OxyEmailApi, type OxyFetchResult, type OxyFunctionContext, type OxyFunctionHandler, type OxyFunctionRequest, type OxyFunctionRow, type OxyFunctionUser, type OxyInjectedAppConfig, type OxySecretsApi, type OxySemanticApi, type OxyStorageApi, type OxyWarehouseApi, type PredictChange, type PredictImpact, type PredictResult, type ProcedureProgress, type ProcedureResult, type ProcedureRunState, type ResolvedCustomAppManifest, type ScanFailure, type ScanOptions, type ScanResponse, type SegmentOpportunity, type SemanticArrayOp, type SemanticDateRangeOp, type SemanticFilter, type SemanticScalarOp, type SemanticTimeDimension, type SensitivityDriver, type SensitivityResult, type SizeOpts, type SkippedDimension, type SplitKind, type StorageDownloadUrl, type StorageListPage, type StorageObject, type StoragePutOptions, type StoragePutResult, type StorageUploadUrl, type StorageUploadUrlInput, type TimeDimensionsResponse, type UseAgentRunInput, type UseAgentRunResult, type UseFunctionResult, type UseMeasureBreakdownResult, type UseMetricTreeOpts, type UseProcedureRunInput, type UseProcedureRunOpts, type UseProcedureRunResult, type UseQueryInput, type UseQueryOpts, type UseQueryResult, type UseSemanticQueryInput, type UseSemanticQueryOpts, type UseSemanticQueryResult, type UseWorldModelGraphResult, type UseWorldModelInstancesOpts, type UseWorldModelInstancesResult, type WmBreakdownEdge, type WmBreakdownNode, type WmEntityCount, type WmFilterCountsResponse, type WmInstance, type WmInstancesResponse, type WmMeasureBreakdown, type WmMeasureBreakdownEvent, type WorldModel, type WorldModelApi, type WorldModelDimension, type WorldModelEdge, type WorldModelEntity, type WorldModelInducedMeasure, type WorldModelMeasure, WorldModelScopeUnsupportedError, _resetCustomAppManifestCacheForTest, apiErrorFromResponse, base64ToBytes, bytesToBase64, createWorldModel, getCustomAppDebug, getOxyAppLogger, interpretCustomAppError, loadCustomAppManifest, readInjectedAppConfig, readJsonSseStream, setOxyAppLogger, useAgentRun, useDistribution, useExplain, useFunction, useMeasureBreakdown, useMetricTree, useOpportunity, useOxyApp, usePredict, useProcedureRun, useQuery, useResolvedManifest, useSemanticQuery, useSensitivity, useTimeDimensions, useTrackEvent, useWorldModel, useWorldModelGraph, useWorldModelInstances };
|
|
817
1313
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/config.ts","../src/metricTree.ts","../src/anomalies.ts","../src/custom-app/debug.ts","../src/custom-app/function-context.ts","../src/custom-app/inject.ts","../src/custom-app/logger.ts"],"mappings":";;;;;;UAGiB;;;;EAIf;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;;;;EAQA;;;;;EAMA;;;;KCjCU;KACA;KACA;KACA;KACA;UAEK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA,MAAM;;EAEN;EACA,WAAW;EACX,UAAU;EACV,YAAY;EACZ;EACA,MAAM;EACN;EACA;EACA;EACA;;UAGe;EACf,OAAO;EACP,OAAO;EACP;;UAKe;EACf;EACA;EACA;EACA;EACA,OAAO;EACP,WAAW;EACX,UAAU;EACV;EACA;;UAGe;EACf;EACA,SAAS;;UAKM;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;;UAGe;EACf,QAAQ;EACR,SAAS;;KAKC;EACN;EAAmB;;EACnB;EAAmB;EAAmB;;EACtC;EAA6B;EAAmB;;EAChD;EAAuB;EAAmB;EAAe;;UAE9C;EACf,OAAO;EACP;EACA;EACA;;UAGe;EACf,OAAO;EACP;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA,WAAW
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/config.ts","../src/metricTree.ts","../src/anomalies.ts","../src/custom-app/base64.ts","../src/custom-app/debug.ts","../src/custom-app/function-context.ts","../src/custom-app/inject.ts","../src/custom-app/logger.ts","../src/custom-app/metric-tree-hooks.tsx","../src/custom-app/sse.ts","../src/worldModel.ts","../src/custom-app/world-model-hooks.tsx","../src/custom-app/world-node.tsx"],"mappings":";;;;;;UAGiB;;;;EAIf;;;;EAKA;;;;EAKA;;;;EAKA;;;;EAKA;;;;;;;EAQA;;;;;EAMA;;;;KCjCU;KACA;KACA;KACA;KACA;UAEK;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA,MAAM;;EAEN;EACA,WAAW;EACX,UAAU;EACV,YAAY;EACZ;EACA,MAAM;EACN;EACA;EACA;EACA;;UAGe;EACf,OAAO;EACP,OAAO;EACP;;UAKe;EACf;EACA;EACA;EACA;EACA,OAAO;EACP,WAAW;EACX,UAAU;EACV;EACA;;UAGe;EACf;EACA,SAAS;;UAKM;EACf;EACA;;UAGe;EACf;EACA;EACA;EACA;EACA,MAAM;EACN;;UAGe;EACf,QAAQ;EACR,SAAS;;KAKC;EACN;EAAmB;;EACnB;EAAmB;EAAmB;;EACtC;EAA6B;EAAmB;;EAChD;EAAuB;EAAmB;EAAe;;UAE9C;EACf,OAAO;EACP;EACA;EACA;;UAGe;EACf,OAAO;EACP;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA,WAAW;;;;;;;KAQD;;;;;UAMK;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;EACA;;;EAGA,YAAY;EACZ,eAAe;EACf;E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