@oxy-hq/sdk 2.11.0 → 2.13.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.
Files changed (42) hide show
  1. package/README.md +44 -4
  2. package/dist/function-context-D8eyZuw_.d.cts +720 -0
  3. package/dist/function-context-D8eyZuw_.d.cts.map +1 -0
  4. package/dist/function-context-D8eyZuw_.d.mts +720 -0
  5. package/dist/function-context-D8eyZuw_.d.mts.map +1 -0
  6. package/dist/index.cjs +217 -11
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.cts +499 -638
  9. package/dist/index.d.cts.map +1 -1
  10. package/dist/index.d.mts +499 -638
  11. package/dist/index.d.mts.map +1 -1
  12. package/dist/index.mjs +215 -12
  13. package/dist/index.mjs.map +1 -1
  14. package/dist/ops.cjs +85 -0
  15. package/dist/ops.cjs.map +1 -0
  16. package/dist/ops.d.cts +61 -0
  17. package/dist/ops.d.cts.map +1 -0
  18. package/dist/ops.d.mts +61 -0
  19. package/dist/ops.d.mts.map +1 -0
  20. package/dist/ops.mjs +79 -0
  21. package/dist/ops.mjs.map +1 -0
  22. package/dist/{react-riTxd9ce.cjs → react-CkAQg9wB.cjs} +72 -7
  23. package/dist/react-CkAQg9wB.cjs.map +1 -0
  24. package/dist/{react-DqnINwTi.mjs → react-Cq3xULOr.mjs} +72 -7
  25. package/dist/react-Cq3xULOr.mjs.map +1 -0
  26. package/dist/{react-CLONxcnA.d.cts → react-D-Sf973d.d.cts} +94 -2
  27. package/dist/react-D-Sf973d.d.cts.map +1 -0
  28. package/dist/{react-CLONxcnA.d.mts → react-D-Sf973d.d.mts} +94 -2
  29. package/dist/react-D-Sf973d.d.mts.map +1 -0
  30. package/dist/shell.cjs +68 -4
  31. package/dist/shell.cjs.map +1 -1
  32. package/dist/shell.d.cts +62 -7
  33. package/dist/shell.d.cts.map +1 -1
  34. package/dist/shell.d.mts +62 -7
  35. package/dist/shell.d.mts.map +1 -1
  36. package/dist/shell.mjs +66 -5
  37. package/dist/shell.mjs.map +1 -1
  38. package/package.json +13 -2
  39. package/dist/react-CLONxcnA.d.cts.map +0 -1
  40. package/dist/react-CLONxcnA.d.mts.map +0 -1
  41. package/dist/react-DqnINwTi.mjs.map +0 -1
  42. package/dist/react-riTxd9ce.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","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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EvC,QAAQ,MAAM,aAAa,SAAS,cAAc,QAAQ;;EAE1D,KAAK,MAAM,UAAU,SAAS,cAAc,QAAQ;;EAEpD,MAAM,OAAO,yBAAyB;;;;;;;UAQvB;;WAEN;;EAET,KAAK,eAAe,SAAS,cAAc,QAAQ;;EAEnD,OAAO,aAAa;;;;;;;;cAST,wCAAwC;WAC1C;WACA,OAAO;EAChB,YAAY,cAAc,OAAO;;;;;;;iBAkBnB,iBAAiB,0BAA0B,SAAS,aAAa;;;;;;;;;;;;;;;;;;;;;;iBAqGjE,iBAAiB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/config.ts","../src/peerCohort.ts","../src/metricTree.ts","../src/anomalies.ts","../src/custom-app/base64.ts","../src/custom-app/debug.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;;;;;;KC/BU;;;;;;;;;UAUK;;;EAGf;;;EAGA;;;;;;;;;;;;UAae;EACf;EACA;;;;EAIA;;;;EAIA;;;EAGA;EACA;;;EAGA;;;;;;UAOe;EACf;EACA;EACA;EACA,WAAW;;EAEX;;;;;;;;;;;;;EAaA;EACA,UAAU;EACV,UAAU;;;;;;;UAQK;;;;;;;;;EASf;EACA;EACA;;EAEA;;EAEA;;EAEA;;;;;;;KAUU,eAAa,GAAG,kBAAkB,UAAU,gBAAgB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;cAwBnE;mBACM;mBACA;EAEjB,YAAY,QAAQ,WAAW,SAAS;UAKhC;UAIA;;;;;;;;;;;;;;EAoBF,QAAQ,SAAS,gBAAgB,QAAQ;;;;KCvKrC;KACA;KACA;KACA;;;;;;;;;KASA;UAWK;EACf;EACA;EACA;EACA;EACA;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EACf;EACA;EACA;EACA;;;;KAKU;EAEN;EACA;EACA,OAAO,KAAK;EACZ,OAAO;;EAEP;EAAe;EAAiB;EAAsB;;EACtD;;;;UAIW;EACf;EACA,OAAO;EACP,OAAO;;;;UC9GQ;EACf,MAAM;EACN;EACA,OAAO;EACP;;;;;;;;;;;;iBAac,mBAAmB;EAAQ;IAA2B;UA6CrD;;EAEf;;EAEA;EACA;;;;;;;;EAQA;;UAGe;EACf,MAAM;EACN;EACA,OAAO;EACP;;;;;;;iBAQc,uBACd,yBACA,OAAM,6BACL;UAwDc;;EAEf,WAAW;EACX;EACA;EACA,OAAO;;;;;;;;iBAmCO,oBACd,yBACA,yBACA,yBACC;;;;KClLS,cAAc,SAAS;;;KAIvB,cAAc,KAAK;;;KAInB,WAAW,KAAK;;;UAIX;;EAEf,MAAM;;EAEN,MAAM;;EAEN,QAAQ;;;;;;;UAQO;;WAEN;;WAEA,OAAO;;EAEhB,KAAK,SAAS,cAAc,QAAQ;;EAEpC,OAAO,SAAS,cAAc,QAAQ;;EAEtC,QAAQ,SAAS,cAAc,QAAQ;;EAEvC,QAAQ,MAAM,aAAa,SAAS,cAAc,QAAQ;;EAE1D,KAAK,MAAM,UAAU,SAAS,cAAc,QAAQ;;EAEpD,MAAM,OAAO,yBAAyB;;;;;;;UAQvB;;WAEN;;EAET,KAAK,eAAe,SAAS,cAAc,QAAQ;;EAEnD,OAAO,aAAa;;;;;;;;cAST,wCAAwC;WAC1C;WACA,OAAO;EAChB,YAAY,cAAc,OAAO;;;;;;;iBAkBnB,iBAAiB,0BAA0B,SAAS,aAAa;;;;;;;;;;;;;;;;;;;;;;iBAqGjE,iBAAiB"}
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // @oxy/sdk - TypeScript SDK for Oxy data platform
2
- import { _ as interpretCustomAppError, a as useFunction, c as useQuery, d as useTrackEvent, f as _resetCustomAppManifestCacheForTest, g as apiErrorFromResponse, h as OxyApiError, i as useAgentRun, l as useResolvedManifest, m as readInjectedAppConfig, n as OxyAppProvider, o as useOxyApp, p as loadCustomAppManifest, r as OxyChat, s as useProcedureRun, t as OxyAnswer, u as useSemanticQuery, v as getOxyAppLogger, y as setOxyAppLogger } from "./react-DqnINwTi.mjs";
2
+ import { _ as interpretCustomAppError, a as useFunction, c as useQuery, d as useTrackEvent, f as _resetCustomAppManifestCacheForTest, g as apiErrorFromResponse, h as OxyApiError, i as useAgentRun, l as useResolvedManifest, m as readInjectedAppConfig, n as OxyAppProvider, o as useOxyApp, p as loadCustomAppManifest, r as OxyChat, s as useProcedureRun, t as OxyAnswer, u as useSemanticQuery, v as getOxyAppLogger, y as setOxyAppLogger } from "./react-Cq3xULOr.mjs";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/anomalies.ts
@@ -386,14 +386,69 @@ function useSensitivity(measureId, opts = {}) {
386
386
  * Propagate hypothetical `(measure, delta)` changes upward through the
387
387
  * tree and return the estimated impact on every downstream measure — a
388
388
  * pure metric-tree walk, no warehouse query. Pass `null` to stay idle.
389
+ *
390
+ * Because it is database-free it can only use the coefficients it is GIVEN.
391
+ * Without `opts.coefficients` from {@link useBaseline}, every driver edge
392
+ * whose `.view.yml` declares no `coefficient:` contributes nothing and its
393
+ * downstream measures are simply absent from `impacts` — no error, no
394
+ * refusal. Without `opts.values`, multiplicative component edges come back
395
+ * `unquantifiable` rather than sized.
389
396
  */
390
397
  function usePredict(changes, opts = {}) {
391
398
  const { projectId, fetcher } = useOxyApp();
392
399
  const enabled = opts.enabled !== false;
400
+ const { values, coefficients } = opts;
401
+ const body = {
402
+ changes,
403
+ ...values ? { values } : {},
404
+ ...coefficients?.length ? { coefficients } : {}
405
+ };
393
406
  return useMetricTreeEndpoint(projectId && changes ? JSON.stringify({
394
407
  projectId,
395
- changes
396
- }) : null, (signal) => postJson(fetcher, `${metricTreePath(projectId)}/predict`, { changes }, signal), enabled);
408
+ body
409
+ }) : null, (signal) => postJson(fetcher, `${metricTreePath(projectId)}/predict`, body, signal), enabled);
410
+ }
411
+ /**
412
+ * Value a scenario's starting point, and measure the coefficients it needs.
413
+ *
414
+ * Two warehouse reads: the current value of every node reachable from
415
+ * `request.roots`, and — for driver edges declaring no `coefficient:` — a fit
416
+ * over the window. Both are expensive, which is why they live here and not in
417
+ * {@link usePredict}: predict is database-free by design so it can re-run per
418
+ * keystroke, and it CANNOT measure a coefficient itself.
419
+ *
420
+ * That is the whole reason to call this. Feed `data.values` and `data.fitted`
421
+ * into `usePredict`; omit them and an undeclared edge propagates nothing.
422
+ * Pass `null` to stay idle until levers and a period are chosen.
423
+ */
424
+ function useBaseline(request, opts = {}) {
425
+ const { projectId, fetcher } = useOxyApp();
426
+ const enabled = opts.enabled !== false;
427
+ return useMetricTreeEndpoint(projectId && request ? JSON.stringify({
428
+ projectId,
429
+ request
430
+ }) : null, (signal) => postJson(fetcher, `${metricTreePath(projectId)}/baseline`, request, signal), enabled);
431
+ }
432
+ /**
433
+ * Bucketed history for the levers and everything downstream, plus the forward
434
+ * curve the forecaster expects next — the scenario's time axis.
435
+ *
436
+ * One warehouse query, so it belongs on a window change, not on a lever edit.
437
+ * It returns the BASELINE curve only: the scenario's second curve is
438
+ * arithmetic over this and a `usePredict` result — a proportional shift
439
+ * landing `lag` buckets in — composed client-side precisely so editing a lever
440
+ * costs no query.
441
+ *
442
+ * Treat a series with a `refusal` as a stated absence: it must not render as a
443
+ * flat forward line. Pass `null` to stay idle.
444
+ */
445
+ function useProjection(request, opts = {}) {
446
+ const { projectId, fetcher } = useOxyApp();
447
+ const enabled = opts.enabled !== false;
448
+ return useMetricTreeEndpoint(projectId && request ? JSON.stringify({
449
+ projectId,
450
+ request
451
+ }) : null, (signal) => postJson(fetcher, `${metricTreePath(projectId)}/projection`, request, signal), enabled);
397
452
  }
398
453
  /**
399
454
  * Period-over-period root-cause decomposition: recursively splits the
@@ -554,9 +609,9 @@ function useWorldModelGraph(opts = {}) {
554
609
  * to stay idle until an entity is chosen.
555
610
  */
556
611
  function useWorldModelInstances(entityId, opts = {}) {
557
- const { projectId, fetcher } = useOxyApp();
612
+ const { projectId, appId, fetcher } = useOxyApp();
558
613
  const enabled = opts.enabled !== false;
559
- const { search, limit } = opts;
614
+ const { search, limit, scope } = opts;
560
615
  const [data, setData] = React.useState(null);
561
616
  const [loading, setLoading] = React.useState(enabled && !!projectId && !!entityId);
562
617
  const [error, setError] = React.useState(null);
@@ -573,6 +628,10 @@ function useWorldModelInstances(entityId, opts = {}) {
573
628
  const params = new URLSearchParams({ entity: entityId });
574
629
  if (search) params.set("search", search);
575
630
  if (limit != null) params.set("limit", String(limit));
631
+ if (scope) {
632
+ params.set("scope", scope);
633
+ if (appId) params.set("app", appId);
634
+ }
576
635
  fetcher(`${worldModelPath(projectId)}/instances?${params}`, {
577
636
  method: "GET",
578
637
  signal: ctrl.signal
@@ -599,7 +658,9 @@ function useWorldModelInstances(entityId, opts = {}) {
599
658
  entityId,
600
659
  search,
601
660
  limit,
602
- fetcher
661
+ fetcher,
662
+ scope,
663
+ appId
603
664
  ]);
604
665
  return {
605
666
  data,
@@ -816,9 +877,10 @@ function useWorldModel() {
816
877
  //#endregion
817
878
  //#region src/metricTree.ts
818
879
  /**
819
- * Client for the `/semantic/metric-tree*` endpoints. Surfaces the four
820
- * airlayer metric-tree analyses (tree introspection, sensitivity, predict,
821
- * explain, opportunity) over typed methods.
880
+ * Client for the `/semantic/metric-tree*` endpoints. Surfaces the airlayer
881
+ * metric-tree analyses — tree introspection, sensitivity, explain, opportunity
882
+ * — plus the three legs of scenario forecasting (`baseline` levels,
883
+ * `predict` propagation, `projection` curves) over typed methods.
822
884
  *
823
885
  * Construction is internal to {@link OxyClient} — call `client.metricTree`
824
886
  * to access an instance rather than building one yourself.
@@ -878,9 +940,50 @@ var MetricTreeClient = class {
878
940
  return this.request(this.path(`/${encodeURIComponent(measureId)}/sensitivity${query}`));
879
941
  }
880
942
  /**
943
+ * Value a change's starting point, and measure the coefficients it needs.
944
+ *
945
+ * Two warehouse reads: the current value of every node reachable from
946
+ * `roots`, and — for driver edges that declare no `coefficient:` — a fit
947
+ * over the window. Both are expensive, which is why they live here and not
948
+ * in `predict`: `predict` is database-free by design so it can re-run per
949
+ * keystroke, and it CANNOT measure a coefficient itself.
950
+ *
951
+ * That is the whole reason to call this. Pass `fitted` back into `predict`
952
+ * and an undeclared edge propagates; omit it and `predict` has nothing to
953
+ * multiply by, so the impact is simply absent — no error, no refusal, just a
954
+ * downstream measure that never appears.
955
+ *
956
+ * @example
957
+ * ```typescript
958
+ * const baseline = await client.metricTree.getBaseline({
959
+ * roots: ["marketing_spend.total_spend"],
960
+ * time_dimension: "orders.order_date",
961
+ * period: ["2025-09-01", "2025-09-30"],
962
+ * });
963
+ * const result = await client.metricTree.predict(
964
+ * [{ measure: "marketing_spend.total_spend", delta: 10000 }],
965
+ * { values: baseline.values, coefficients: baseline.fitted }
966
+ * );
967
+ * ```
968
+ */
969
+ async getBaseline(request) {
970
+ const query = this.buildQuery();
971
+ return this.request(this.path(`/baseline${query}`), {
972
+ method: "POST",
973
+ body: JSON.stringify(request)
974
+ });
975
+ }
976
+ /**
881
977
  * Propagate hypothetical `(measure, delta)` changes upward through the
882
978
  * tree. Returns the estimated impact on every downstream measure.
883
979
  *
980
+ * Database-free, so it re-runs cheaply — and so it can only use
981
+ * coefficients it is GIVEN. Without `options.coefficients` from
982
+ * {@link getBaseline}, every edge whose `.view.yml` declares no
983
+ * `coefficient:` contributes nothing and its downstream measures are
984
+ * silently missing from `impacts`. Without `options.values`, multiplicative
985
+ * component edges come back `unquantifiable` rather than sized.
986
+ *
884
987
  * @example
885
988
  * ```typescript
886
989
  * const result = await client.metricTree.predict([
@@ -888,11 +991,51 @@ var MetricTreeClient = class {
888
991
  * ]);
889
992
  * ```
890
993
  */
891
- async predict(changes) {
994
+ async predict(changes, options = {}) {
892
995
  const query = this.buildQuery();
893
996
  return this.request(this.path(`/predict${query}`), {
894
997
  method: "POST",
895
- body: JSON.stringify({ changes })
998
+ body: JSON.stringify({
999
+ changes,
1000
+ ...options.values ? { values: options.values } : {},
1001
+ ...options.coefficients?.length ? { coefficients: options.coefficients } : {}
1002
+ })
1003
+ });
1004
+ }
1005
+ /**
1006
+ * Draw the scenario's time axis: bucketed history for the levers and
1007
+ * everything downstream, plus the forward curve the detector's own model
1008
+ * expects next.
1009
+ *
1010
+ * The third leg of scenario forecasting. {@link getBaseline} gives levels
1011
+ * and coefficients, {@link predict} propagates a change with no database at
1012
+ * all, and this gives time — one warehouse query, so treat it like the
1013
+ * baseline: fetch on a window change, not on a lever edit.
1014
+ *
1015
+ * **Returns the BASELINE curve only.** The scenario's second curve is
1016
+ * arithmetic over this and a `predict` result — a proportional shift landing
1017
+ * `lag` buckets in — and is composed client-side deliberately, so editing a
1018
+ * lever costs no query.
1019
+ *
1020
+ * @example
1021
+ * ```typescript
1022
+ * const projection = await client.metricTree.getProjection({
1023
+ * roots: ["marketing_spend.total_spend"],
1024
+ * time_dimension: "orders.order_date",
1025
+ * period: ["2024-09-01", "2025-08-31"],
1026
+ * granularity: "day",
1027
+ * horizon: 30,
1028
+ * });
1029
+ * for (const series of projection.series) {
1030
+ * if (series.refusal) console.warn(series.measure, series.refusal);
1031
+ * }
1032
+ * ```
1033
+ */
1034
+ async getProjection(request) {
1035
+ const query = this.buildQuery();
1036
+ return this.request(this.path(`/projection${query}`), {
1037
+ method: "POST",
1038
+ body: JSON.stringify(request)
896
1039
  });
897
1040
  }
898
1041
  /**
@@ -942,5 +1085,65 @@ var MetricTreeClient = class {
942
1085
  };
943
1086
 
944
1087
  //#endregion
945
- export { AnomaliesClient, MetricTreeClient, OxyAnswer, OxyApiError, OxyAppProvider, OxyChat, 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 };
1088
+ //#region src/peerCohort.ts
1089
+ /**
1090
+ * Client for the `/semantic/cohort` endpoint. Surfaces airlayer's peer-cohort
1091
+ * benchmarking — comparing an entity's subjects against their declared peers
1092
+ * on a measure, with exclusions explained rather than silently dropped.
1093
+ *
1094
+ * Construction is internal to {@link OxyClient} — call `client.peerCohort`
1095
+ * to access an instance rather than building one yourself.
1096
+ *
1097
+ * @example
1098
+ * ```typescript
1099
+ * const client = await OxyClient.create({ projectId: "...", apiKey: "..." });
1100
+ * const result = await client.peerCohort.resolve({
1101
+ * entity: "restaurant_id",
1102
+ * measure: "orders.net_revenue",
1103
+ * time_dimension: "orders.order_date",
1104
+ * period: ["2025-09-01", "2025-09-30"],
1105
+ * });
1106
+ * for (const excluded of result.excluded) {
1107
+ * console.warn(excluded.key, excluded.reason);
1108
+ * }
1109
+ * ```
1110
+ */
1111
+ var PeerCohortClient = class {
1112
+ constructor(config, request) {
1113
+ this.config = config;
1114
+ this.request = request;
1115
+ }
1116
+ path(suffix) {
1117
+ return `/${this.config.projectId}${suffix}`;
1118
+ }
1119
+ buildQuery(extra = {}) {
1120
+ const params = { ...extra };
1121
+ if (this.config.branch) params.branch = this.config.branch;
1122
+ const qs = new URLSearchParams(params).toString();
1123
+ return qs ? `?${qs}` : "";
1124
+ }
1125
+ /**
1126
+ * Resolve a subject's peer cohort and every peer's comparison against it.
1127
+ *
1128
+ * @example
1129
+ * ```typescript
1130
+ * const result = await client.peerCohort.resolve({
1131
+ * entity: "restaurant_id",
1132
+ * measure: "orders.net_revenue",
1133
+ * time_dimension: "orders.order_date",
1134
+ * period: ["2025-09-01", "2025-09-30"],
1135
+ * });
1136
+ * ```
1137
+ */
1138
+ async resolve(request) {
1139
+ const query = this.buildQuery();
1140
+ return this.request(this.path(`/semantic/cohort${query}`), {
1141
+ method: "POST",
1142
+ body: JSON.stringify(request)
1143
+ });
1144
+ }
1145
+ };
1146
+
1147
+ //#endregion
1148
+ export { AnomaliesClient, MetricTreeClient, OxyAnswer, OxyApiError, OxyAppProvider, OxyChat, PeerCohortClient, WorldModelScopeUnsupportedError, _resetCustomAppManifestCacheForTest, apiErrorFromResponse, base64ToBytes, bytesToBase64, createWorldModel, getCustomAppDebug, getOxyAppLogger, interpretCustomAppError, loadCustomAppManifest, readInjectedAppConfig, readJsonSseStream, setOxyAppLogger, useAgentRun, useBaseline, useDistribution, useExplain, useFunction, useMeasureBreakdown, useMetricTree, useOpportunity, useOxyApp, usePredict, useProcedureRun, useProjection, useQuery, useResolvedManifest, useSemanticQuery, useSensitivity, useTimeDimensions, useTrackEvent, useWorldModel, useWorldModelGraph, useWorldModelInstances };
946
1149
  //# sourceMappingURL=index.mjs.map