@oxy-hq/sdk 2.0.1 → 2.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @oxy-hq/sdk
2
2
 
3
- React SDK for building **customer-app bundles** on the [Oxy](https://oxy.tech)
3
+ React SDK for building **customer-app bundles** on the [Oxy](https://oxygen-hq.com)
4
4
  platform. A bundle is a normal Vite + React app that reads from its linked oxy
5
5
  project — raw SQL, the semantic layer, agents, and procedures — through a
6
6
  small set of hooks, plus a couple of drop-in components.
@@ -83,10 +83,17 @@ couldn't already read.
83
83
  | `useSemanticQuery({ topic, dimensions, measures, … })` | Semantic-layer query compiled by airlayer. |
84
84
  | `useAgentRun({ agentId })` | `.ask(question)` starts an analytics agent run; streams events over SSE; `.cancel()`. |
85
85
  | `useProcedureRun({ procedureId })` | Start a long-running procedure, poll, cancel (beta). |
86
+ | `useFunction(name)` | `.invoke(body?)` runs a server-side **Oxy Function** (`functions/<name>.ts`) on oxy's isolate runtime; returns its JSON `Response`. For work the browser shouldn't do — warehouse writes, ELT, external APIs. |
86
87
  | `<OxyChat agentId="…" />` | Drop-in chat UI over `useAgentRun`. |
87
88
  | `<OxyAnswer … />` | Renders markdown + SQL artifacts + thread link. URL schemes are allowlisted (rejects `javascript:` etc.). |
88
89
  | `OxyApiError` | Structured `{ message, code? }` server-error envelope. |
89
90
 
91
+ ### Metric Tree
92
+
93
+ Additional exports for programmatic metric-tree analyses (`AnomaliesClient`,
94
+ `MetricTreeClient` and all related types) are available from the package root
95
+ — see [metricTree.ts](src/metricTree.ts) and [anomalies.ts](src/anomalies.ts).
96
+
90
97
  Hooks fail loudly if called outside `<OxyAppProvider>`. The default fetcher
91
98
  sends `credentials: "include"` so same-origin (served-by-oxy) calls carry the
92
99
  session cookie automatically.
@@ -98,6 +105,7 @@ session cookie automatically.
98
105
  - SDK flow reference: `docs/sdk-flow.md` in that repo.
99
106
  - Platform internals: `internal-docs/customer-apps.md` in oxygen-internal.
100
107
 
108
+
101
109
  ## License
102
110
 
103
111
  MIT