@oxy-hq/sdk 2.9.1 → 2.10.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/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-DBG6Pfp_.cjs";
2
+ import { $ as loadCustomAppManifest, A as UseSemanticQueryOpts, B as FunctionError, C as UseProcedureRunInput, D as UseQueryOpts, E as UseQueryInput, F as useProcedureRun, G as apiErrorFromResponse, H as FunctionResult, I as useQuery, J as OxyAppFunctionManifest, K as interpretCustomAppError, L as useResolvedManifest, M as useAgentRun, N as useFunction, O as UseQueryResult, P as useOxyApp, Q as _resetCustomAppManifestCacheForTest, R as useSemanticQuery, S as UseFunctionResult, T as UseProcedureRunResult, U as CustomAppErrorReport, V as FunctionLog, W as OxyApiError, X as OxyAppPerformanceManifest, Y as OxyAppManifest, Z as ResolvedCustomAppManifest, _ 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 LoadManifestOptions, 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-BGUzRMxq.cjs";
3
3
  //#region src/config.d.ts
4
4
  /**
5
5
  * Configuration for the Oxy SDK
@@ -894,8 +894,26 @@ type OxyFetchInit = RequestInit & {
894
894
  */
895
895
  encoding?: "utf8" | "base64";
896
896
  };
897
- /** `ctx.warehouse.*` — writes to one of the app's configured destination databases. */
897
+ /**
898
+ * `ctx.warehouse.*` — one of the app's configured databases by name.
899
+ *
900
+ * The writes require the database in the function's `destinations` allowlist;
901
+ * `query` does not, because that allowlist is about modifying a project's
902
+ * warehouse, and a `postgres_managed` database resolves the read-only analyst
903
+ * for every caller regardless.
904
+ */
898
905
  interface OxyWarehouseApi {
906
+ /**
907
+ * Read from a named database.
908
+ *
909
+ * `ctx.query` only ever reaches the project's DEFAULT database, so this is
910
+ * how an app reads its own per-org OLTP store, which sits beside whatever
911
+ * warehouse the project analyses.
912
+ */
913
+ query(database: string, sql: string): Promise<{
914
+ rows: OxyFunctionRow[];
915
+ truncated: boolean;
916
+ }>;
899
917
  insert(database: string, table: string, rows: OxyFunctionRow[]): Promise<unknown>;
900
918
  exec(database: string, sql: string): Promise<unknown>;
901
919
  upsert(database: string, table: string, rows: OxyFunctionRow[], conflictColumns: string[]): Promise<unknown>;
@@ -918,6 +936,49 @@ interface OxyTransaction {
918
936
  /** Run a statement for its effect; resolves to the number of rows affected. */
919
937
  exec(sql: string, params?: unknown[]): Promise<number>;
920
938
  }
939
+ /**
940
+ * `ctx.oltp` — read and WRITE the app's OWN per-org OLTP schema (`app_<writer>`)
941
+ * on the managed Postgres tenant, and nothing else.
942
+ *
943
+ * This is the write half `ctx.warehouse` cannot give an app: for a
944
+ * `postgres_managed` database `ctx.warehouse` resolves the read-only analyst
945
+ * (org-wide read, the org's `raw_*` extracts included), so a write authenticates
946
+ * and then fails `permission denied`. `ctx.oltp` resolves the app's **writer**
947
+ * role instead — DML rights scoped to the one `app_<writer>` schema, so it is
948
+ * narrower on reads (no `raw_*`) and finally writable.
949
+ *
950
+ * Gated by the fail-closed `oltp` manifest capability (`"oltp": { "enabled":
951
+ * true }`) — a pure gate. The target schema is derived from the app's own slug
952
+ * (`oltp-bookings` → `app_oltp_bookings`), never named in the manifest, so a
953
+ * manifest cannot point `ctx.oltp` at another app's schema. The store must be
954
+ * provisioned first (ask whoever operates the org). No database name is passed —
955
+ * the app's own store is implicit.
956
+ *
957
+ * Both methods take **bound parameters** (`$1`, `$2`, …). Never build SQL by
958
+ * concatenating request data — a booking form is exactly the surface that takes
959
+ * end-user input, and placeholders are the only thing that makes it safe. Each
960
+ * call auto-commits; a failed statement rolls back.
961
+ *
962
+ * **Cost:** each call opens its own connection to the tenant (a TCP + TLS
963
+ * handshake, and a wake-up if the compute was idle) and its own transaction, so
964
+ * a per-row loop pays that per row. Prefer one statement over many — a
965
+ * multi-row `INSERT`, an `INSERT … SELECT`, or `INSERT … RETURNING` to avoid a
966
+ * follow-up read — and reach for `ctx.oltp` a handful of times per request, not
967
+ * in a hot loop.
968
+ *
969
+ * ```ts
970
+ * const [row] = await ctx.oltp.query(
971
+ * "INSERT INTO bookings (name, party_size) VALUES ($1, $2) RETURNING id",
972
+ * [name, partySize],
973
+ * );
974
+ * ```
975
+ */
976
+ interface OxyOltpApi {
977
+ /** Run a row-returning statement (including `INSERT … RETURNING`). */
978
+ query(sql: string, params?: unknown[]): Promise<OxyFunctionRow[]>;
979
+ /** Run a statement for its effect; resolves to the number of rows affected. */
980
+ exec(sql: string, params?: unknown[]): Promise<number>;
981
+ }
921
982
  /** `ctx.secrets` — write app-scoped secrets (gated by the `secrets.write` capability). */
922
983
  interface OxySecretsApi {
923
984
  set(key: string, value: string): Promise<void>;
@@ -1245,6 +1306,13 @@ interface OxyFunctionContext {
1245
1306
  * ```
1246
1307
  */
1247
1308
  tx<T>(database: string, fn: (tx: OxyTransaction) => Promise<T> | T): Promise<T>;
1309
+ /**
1310
+ * Read/write the app's OWN per-org OLTP schema (derived from its slug). The
1311
+ * write half `ctx.warehouse` cannot give an app on a managed database. Gated
1312
+ * by the fail-closed `oltp` manifest capability (`{ enabled: true }`). See
1313
+ * {@link OxyOltpApi}.
1314
+ */
1315
+ oltp: OxyOltpApi;
1248
1316
  secrets: OxySecretsApi;
1249
1317
  semantic: OxySemanticApi;
1250
1318
  airway: OxyAirwayApi;
@@ -1485,7 +1553,7 @@ interface UseWorldModelGraphResult {
1485
1553
  * project's `.world-model.yml` display config server-side.
1486
1554
  *
1487
1555
  * @remarks
1488
- * This returns the raw semantic-layer entity graph. For the higher-level
1556
+ * This returns the raw semantic-model entity graph. For the higher-level
1489
1557
  * node-paradigm interface (`world.metric(id)` speaking `expand` / `explain` /
1490
1558
  * `size`), use {@link useWorldModel} from `./world-node` instead.
1491
1559
  */
@@ -1616,10 +1684,10 @@ declare function createWorldModel(projectId: string | null, fetcher: AppFetcher)
1616
1684
  * ```
1617
1685
  *
1618
1686
  * @remarks
1619
- * This is the node-paradigm hook. For the raw semantic-layer entity/measure
1687
+ * This is the node-paradigm hook. For the raw semantic-model entity/measure
1620
1688
  * graph, use {@link useWorldModelGraph} instead.
1621
1689
  */
1622
1690
  declare function useWorldModel(): WorldModelApi;
1623
1691
  //#endregion
1624
- export { type AdditivityClass, type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalyFilter, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type BulkUpdateStatusResponse, 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 OxyIdentityKind, type OxyInjectedAppConfig, type OxyOrgTeam, type OxySecretsApi, type OxySemanticApi, type OxyStorageApi, type OxyTransaction, 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 };
1692
+ export { type AdditivityClass, type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalyFilter, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type BulkUpdateStatusResponse, 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 FunctionError, type FunctionLog, type FunctionResult, 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, type OxyAppPerformanceManifest, OxyAppProvider, type OxyAppProviderProps, OxyChat, type OxyChatProps, type OxyEmailApi, type OxyFetchResult, type OxyFunctionContext, type OxyFunctionHandler, type OxyFunctionRequest, type OxyFunctionRow, type OxyFunctionUser, type OxyIdentityKind, type OxyInjectedAppConfig, type OxyOltpApi, type OxyOrgTeam, type OxySecretsApi, type OxySemanticApi, type OxyStorageApi, type OxyTransaction, 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 };
1625
1693
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
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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;EAChB,YAAY,cAAc,OAAO;;;;;;;iBAkBnB,iBAAiB,0BAA0B,SAAS,aAAa;;;;;;;;;;;;;;;;;;;;;;iBAqGjE,iBAAiB"}
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;EACA,MAAM;;EAEN;EACA;EACA,cAAc;;KAGJ;EAEN;EACA;EACA;EACA;;EAGA;EACA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aAAa;;;;;;;;cAST,wCAAwC;WAC1C;WACA,OAAO;EAChB,YAAY,cAAc,OAAO;;;;;;;iBAkBnB,iBAAiB,0BAA0B,SAAS,aAAa;;;;;;;;;;;;;;;;;;;;;;iBAqGjE,iBAAiB"}
package/dist/index.d.mts 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-DBG6Pfp_.mjs";
2
+ import { $ as loadCustomAppManifest, A as UseSemanticQueryOpts, B as FunctionError, C as UseProcedureRunInput, D as UseQueryOpts, E as UseQueryInput, F as useProcedureRun, G as apiErrorFromResponse, H as FunctionResult, I as useQuery, J as OxyAppFunctionManifest, K as interpretCustomAppError, L as useResolvedManifest, M as useAgentRun, N as useFunction, O as UseQueryResult, P as useOxyApp, Q as _resetCustomAppManifestCacheForTest, R as useSemanticQuery, S as UseFunctionResult, T as UseProcedureRunResult, U as CustomAppErrorReport, V as FunctionLog, W as OxyApiError, X as OxyAppPerformanceManifest, Y as OxyAppManifest, Z as ResolvedCustomAppManifest, _ 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 LoadManifestOptions, 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-BGUzRMxq.mjs";
3
3
  //#region src/config.d.ts
4
4
  /**
5
5
  * Configuration for the Oxy SDK
@@ -894,8 +894,26 @@ type OxyFetchInit = RequestInit & {
894
894
  */
895
895
  encoding?: "utf8" | "base64";
896
896
  };
897
- /** `ctx.warehouse.*` — writes to one of the app's configured destination databases. */
897
+ /**
898
+ * `ctx.warehouse.*` — one of the app's configured databases by name.
899
+ *
900
+ * The writes require the database in the function's `destinations` allowlist;
901
+ * `query` does not, because that allowlist is about modifying a project's
902
+ * warehouse, and a `postgres_managed` database resolves the read-only analyst
903
+ * for every caller regardless.
904
+ */
898
905
  interface OxyWarehouseApi {
906
+ /**
907
+ * Read from a named database.
908
+ *
909
+ * `ctx.query` only ever reaches the project's DEFAULT database, so this is
910
+ * how an app reads its own per-org OLTP store, which sits beside whatever
911
+ * warehouse the project analyses.
912
+ */
913
+ query(database: string, sql: string): Promise<{
914
+ rows: OxyFunctionRow[];
915
+ truncated: boolean;
916
+ }>;
899
917
  insert(database: string, table: string, rows: OxyFunctionRow[]): Promise<unknown>;
900
918
  exec(database: string, sql: string): Promise<unknown>;
901
919
  upsert(database: string, table: string, rows: OxyFunctionRow[], conflictColumns: string[]): Promise<unknown>;
@@ -918,6 +936,49 @@ interface OxyTransaction {
918
936
  /** Run a statement for its effect; resolves to the number of rows affected. */
919
937
  exec(sql: string, params?: unknown[]): Promise<number>;
920
938
  }
939
+ /**
940
+ * `ctx.oltp` — read and WRITE the app's OWN per-org OLTP schema (`app_<writer>`)
941
+ * on the managed Postgres tenant, and nothing else.
942
+ *
943
+ * This is the write half `ctx.warehouse` cannot give an app: for a
944
+ * `postgres_managed` database `ctx.warehouse` resolves the read-only analyst
945
+ * (org-wide read, the org's `raw_*` extracts included), so a write authenticates
946
+ * and then fails `permission denied`. `ctx.oltp` resolves the app's **writer**
947
+ * role instead — DML rights scoped to the one `app_<writer>` schema, so it is
948
+ * narrower on reads (no `raw_*`) and finally writable.
949
+ *
950
+ * Gated by the fail-closed `oltp` manifest capability (`"oltp": { "enabled":
951
+ * true }`) — a pure gate. The target schema is derived from the app's own slug
952
+ * (`oltp-bookings` → `app_oltp_bookings`), never named in the manifest, so a
953
+ * manifest cannot point `ctx.oltp` at another app's schema. The store must be
954
+ * provisioned first (ask whoever operates the org). No database name is passed —
955
+ * the app's own store is implicit.
956
+ *
957
+ * Both methods take **bound parameters** (`$1`, `$2`, …). Never build SQL by
958
+ * concatenating request data — a booking form is exactly the surface that takes
959
+ * end-user input, and placeholders are the only thing that makes it safe. Each
960
+ * call auto-commits; a failed statement rolls back.
961
+ *
962
+ * **Cost:** each call opens its own connection to the tenant (a TCP + TLS
963
+ * handshake, and a wake-up if the compute was idle) and its own transaction, so
964
+ * a per-row loop pays that per row. Prefer one statement over many — a
965
+ * multi-row `INSERT`, an `INSERT … SELECT`, or `INSERT … RETURNING` to avoid a
966
+ * follow-up read — and reach for `ctx.oltp` a handful of times per request, not
967
+ * in a hot loop.
968
+ *
969
+ * ```ts
970
+ * const [row] = await ctx.oltp.query(
971
+ * "INSERT INTO bookings (name, party_size) VALUES ($1, $2) RETURNING id",
972
+ * [name, partySize],
973
+ * );
974
+ * ```
975
+ */
976
+ interface OxyOltpApi {
977
+ /** Run a row-returning statement (including `INSERT … RETURNING`). */
978
+ query(sql: string, params?: unknown[]): Promise<OxyFunctionRow[]>;
979
+ /** Run a statement for its effect; resolves to the number of rows affected. */
980
+ exec(sql: string, params?: unknown[]): Promise<number>;
981
+ }
921
982
  /** `ctx.secrets` — write app-scoped secrets (gated by the `secrets.write` capability). */
922
983
  interface OxySecretsApi {
923
984
  set(key: string, value: string): Promise<void>;
@@ -1245,6 +1306,13 @@ interface OxyFunctionContext {
1245
1306
  * ```
1246
1307
  */
1247
1308
  tx<T>(database: string, fn: (tx: OxyTransaction) => Promise<T> | T): Promise<T>;
1309
+ /**
1310
+ * Read/write the app's OWN per-org OLTP schema (derived from its slug). The
1311
+ * write half `ctx.warehouse` cannot give an app on a managed database. Gated
1312
+ * by the fail-closed `oltp` manifest capability (`{ enabled: true }`). See
1313
+ * {@link OxyOltpApi}.
1314
+ */
1315
+ oltp: OxyOltpApi;
1248
1316
  secrets: OxySecretsApi;
1249
1317
  semantic: OxySemanticApi;
1250
1318
  airway: OxyAirwayApi;
@@ -1485,7 +1553,7 @@ interface UseWorldModelGraphResult {
1485
1553
  * project's `.world-model.yml` display config server-side.
1486
1554
  *
1487
1555
  * @remarks
1488
- * This returns the raw semantic-layer entity graph. For the higher-level
1556
+ * This returns the raw semantic-model entity graph. For the higher-level
1489
1557
  * node-paradigm interface (`world.metric(id)` speaking `expand` / `explain` /
1490
1558
  * `size`), use {@link useWorldModel} from `./world-node` instead.
1491
1559
  */
@@ -1616,10 +1684,10 @@ declare function createWorldModel(projectId: string | null, fetcher: AppFetcher)
1616
1684
  * ```
1617
1685
  *
1618
1686
  * @remarks
1619
- * This is the node-paradigm hook. For the raw semantic-layer entity/measure
1687
+ * This is the node-paradigm hook. For the raw semantic-model entity/measure
1620
1688
  * graph, use {@link useWorldModelGraph} instead.
1621
1689
  */
1622
1690
  declare function useWorldModel(): WorldModelApi;
1623
1691
  //#endregion
1624
- export { type AdditivityClass, type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalyFilter, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type BulkUpdateStatusResponse, 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 OxyIdentityKind, type OxyInjectedAppConfig, type OxyOrgTeam, type OxySecretsApi, type OxySemanticApi, type OxyStorageApi, type OxyTransaction, 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 };
1692
+ export { type AdditivityClass, type AgentArtifact, type AgentRunEvent, type AgentRunState, type AgentSqlArtifact, AnomaliesClient, type Anomaly, type AnomalyFilter, type AnomalySeverity, type AnomalyStatus, type AppFetcher, type BulkUpdateStatusResponse, 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 FunctionError, type FunctionLog, type FunctionResult, 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, type OxyAppPerformanceManifest, OxyAppProvider, type OxyAppProviderProps, OxyChat, type OxyChatProps, type OxyEmailApi, type OxyFetchResult, type OxyFunctionContext, type OxyFunctionHandler, type OxyFunctionRequest, type OxyFunctionRow, type OxyFunctionUser, type OxyIdentityKind, type OxyInjectedAppConfig, type OxyOltpApi, type OxyOrgTeam, type OxySecretsApi, type OxySemanticApi, type OxyStorageApi, type OxyTransaction, 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 };
1625
1693
  //# sourceMappingURL=index.d.mts.map
@@ -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;EAC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O,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/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;EACA,MAAM;;EAEN;EACA;EACA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,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-sACIu6Ea.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-B7zt-0RH.mjs";
3
3
  import * as React from "react";
4
4
 
5
5
  //#region src/anomalies.ts
@@ -496,7 +496,7 @@ function worldModelPath(projectId) {
496
496
  * project's `.world-model.yml` display config server-side.
497
497
  *
498
498
  * @remarks
499
- * This returns the raw semantic-layer entity graph. For the higher-level
499
+ * This returns the raw semantic-model entity graph. For the higher-level
500
500
  * node-paradigm interface (`world.metric(id)` speaking `expand` / `explain` /
501
501
  * `size`), use {@link useWorldModel} from `./world-node` instead.
502
502
  */
@@ -805,7 +805,7 @@ function createWorldModel(projectId, fetcher) {
805
805
  * ```
806
806
  *
807
807
  * @remarks
808
- * This is the node-paradigm hook. For the raw semantic-layer entity/measure
808
+ * This is the node-paradigm hook. For the raw semantic-model entity/measure
809
809
  * graph, use {@link useWorldModelGraph} instead.
810
810
  */
811
811
  function useWorldModel() {