@deepraxis/sdk 0.1.1-dev.32f52b5 → 0.1.1-dev.339ef7d

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.
@@ -793,6 +793,34 @@ export const getSessionContext = (options) => (options.client ?? client).get({
793
793
  url: '/agent/v1/sessions/{session_id}/context',
794
794
  ...options
795
795
  });
796
+ /**
797
+ * Read one turn's platform prompt Revs
798
+ *
799
+ * Read back which platform prompt inputs one turn ran on, from the session's own ledger.
800
+ *
801
+ * The answer carries the configuration revision the turn pinned, that revision's version number, one 8-hex content Rev per platform input and when the record was taken. The platform inputs are ONE map keyed by each input's own name — `section:<name>` for a prompt section, plus `catalog` and `tools` — because catalog and tools are ordinary entries of that map, not layers of their own. Revs are content hashes: no prompt text, no tool description and no catalog content is ever in the answer, so the body can be compared across turns and releases without exposing what it names.
802
+ *
803
+ * With `run_id` you read that run's own record; without it you read the LAST record written. The last record is rewritten when the Rev set moves, not once per turn, so it may be several turns older than this call — which is why the answer's `run_id` is null in that case rather than naming a turn the record does not belong to, and why `at` is there: it is how you see how old the answer is. `at` never takes part in a comparison.
804
+ *
805
+ * **This read constructs the session object once.** A Durable Object cannot be read without being entered, so the call runs the object's startup, which may settle an interrupted turn; `acknowledge_wake=true` is required for exactly that reason, and the answer reports `reaped_turns` — how many interrupted turns this call's own arrival settled, `0` when it settled none. Only a value above 0 is evidence about this call. The read writes no row and does not refresh the eviction ordering key of the session's cached context parts.
806
+ *
807
+ * **What this method does not tell you:** whether the object was a new instance or a rebuilt first probe. That distinction is not in the contract yet; when `agent.sessions.tablesInfo`'s contract face carries `start_phase`, the two read methods move to it together. Do not infer it from this answer.
808
+ *
809
+ * A run that was never recorded, or a session that has recorded nothing yet, answers 404 with `reason: unknown_run`; a session that is absent or unreadable answers 404 with `reason: unknown_session`. Neither 404 body carries a record field — not even `run_id: null` — because "no record" and "an empty record" must not look the same. Own face only: the compatible face's vocabulary is the vendor's.
810
+ */
811
+ export const getSessionPromptRevs = (options) => (options.client ?? client).get({
812
+ security: [{
813
+ key: 'BearerAuth',
814
+ scheme: 'bearer',
815
+ type: 'http'
816
+ }, {
817
+ key: 'ApiKeyAuth',
818
+ name: 'X-API-Key',
819
+ type: 'apiKey'
820
+ }],
821
+ url: '/agent/v1/sessions/{session_id}/prompt-revs',
822
+ ...options
823
+ });
796
824
  /**
797
825
  * Fork Session (Extension)
798
826
  *
@@ -1766,6 +1794,414 @@ export const metaDocsRetrieve = (options) => (options.client ?? client).get({ ur
1766
1794
  * Find guides and references by keyword before reading them with praxis.meta.docs.retrieve. Public; no API key required. Matches documentation titles, headings and page text without case sensitivity; all query words must occur. q is required; limit defaults to 20 and accepts 1–50. lang defaults to zh or use en for English. Returns paths, page titles, canonical URLs and short matching snippets; no matches returns an empty array.
1767
1795
  */
1768
1796
  export const metaDocsSearch = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/search', ...options });
1797
+ /**
1798
+ * List streams
1799
+ *
1800
+ * List the streams of your organization, newest first, to find a stream id or to see which are active; to read one stream use streams.retrieve. Pages hold limit streams (1 to 100, default 20); when has_more is true pass the id of the last stream you received as starting_after to get the next page. A stream that is deleted leaves the list at once. The list never shows another organization's streams. Example: GET /media/v1/streams?limit=20.
1801
+ */
1802
+ export const listMediaStreams = (options) => (options?.client ?? client).get({
1803
+ security: [{
1804
+ key: 'BearerAuth',
1805
+ scheme: 'bearer',
1806
+ type: 'http'
1807
+ }, {
1808
+ key: 'ApiKeyAuth',
1809
+ name: 'X-API-Key',
1810
+ type: 'apiKey'
1811
+ }],
1812
+ url: '/media/v1/streams',
1813
+ ...options
1814
+ });
1815
+ /**
1816
+ * Create a stream
1817
+ *
1818
+ * Register one live source and get its id; use it before anything else on this face, and use streams.update instead to change a stream you already have. Send input as {kind: pull, url} to have Praxis pull an https, http, rtmp or rtmps address (an HLS .m3u8 or HTTP-FLV playlist, or an RTMP URL; SRT is not supported and answers 400), or as {kind: push} to receive a push address: the response then carries push {url, token, expires_at}, and the token is shown only in this response and in streams.resetToken.create because only its hash is kept. The answer shows the stream idle. A pull stream starts pulling as soon as it is created, so a read a few seconds later shows waiting or active; a push stream stays idle until a source connects. Nothing is charged until a source goes active. reconnect_window_s (0 to 1800, default 60) is how long a source that drops may come back and continue the same broadcast; max_continuous_duration_s (60 to 43200, default 43200) ends a broadcast that runs that long. recording defaults to off. The owner is your organization (and the agent and session when a session token calls); the body cannot set it and unknown fields answer 400. Example: {"input":{"kind":"pull","url":"https://live.example.com/room/index.m3u8"},"recording":{"mode":"automatic","rendition":"source"}}.
1819
+ */
1820
+ export const createMediaStream = (options) => (options.client ?? client).post({
1821
+ security: [{
1822
+ key: 'BearerAuth',
1823
+ scheme: 'bearer',
1824
+ type: 'http'
1825
+ }, {
1826
+ key: 'ApiKeyAuth',
1827
+ name: 'X-API-Key',
1828
+ type: 'apiKey'
1829
+ }],
1830
+ url: '/media/v1/streams',
1831
+ ...options,
1832
+ headers: {
1833
+ 'Content-Type': 'application/json',
1834
+ ...options.headers
1835
+ }
1836
+ });
1837
+ /**
1838
+ * Delete a stream
1839
+ *
1840
+ * Delete a stream and its event log for good; only an idle or disabled stream can be deleted, so stop a live one first with streams.disable.create. The stream leaves the list at once and gives back any slot it held. Recordings it already made are Media assets and stay. Deleting is not undone and the id is not reused. Example: DELETE /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec.
1841
+ */
1842
+ export const deleteMediaStream = (options) => (options.client ?? client).delete({
1843
+ security: [{
1844
+ key: 'BearerAuth',
1845
+ scheme: 'bearer',
1846
+ type: 'http'
1847
+ }, {
1848
+ key: 'ApiKeyAuth',
1849
+ name: 'X-API-Key',
1850
+ type: 'apiKey'
1851
+ }],
1852
+ url: '/media/v1/streams/{stream_id}',
1853
+ ...options
1854
+ });
1855
+ /**
1856
+ * Retrieve a stream
1857
+ *
1858
+ * Read one stream: its status, input, reconnect and duration limits, recording settings, pipeline, the asset of the current broadcast and the recent ones. Use it to check whether a stream is idle, waiting, active or disabled; to follow what happened to it read streams.events.list instead. The push token is never returned here, only in the create and reset-token responses. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec.
1859
+ */
1860
+ export const getMediaStream = (options) => (options.client ?? client).get({
1861
+ security: [{
1862
+ key: 'BearerAuth',
1863
+ scheme: 'bearer',
1864
+ type: 'http'
1865
+ }, {
1866
+ key: 'ApiKeyAuth',
1867
+ name: 'X-API-Key',
1868
+ type: 'apiKey'
1869
+ }],
1870
+ url: '/media/v1/streams/{stream_id}',
1871
+ ...options
1872
+ });
1873
+ /**
1874
+ * Update a stream
1875
+ *
1876
+ * Change the settings of a stream you own; send only the fields to change. reconnect_window_s and max_continuous_duration_s take the same ranges as on create. recording is merged onto the current settings (send {rendition: sd} to change only the rendition; a null optional field such as library_id clears it). pipeline_id is stored as given (null clears it). input can change only the url of a pull stream and only while it is idle or disabled; a push stream has no address to change and a live pull stream answers 409. An empty patch, an unknown field or an invalid value answers 400. Example: {"reconnect_window_s":120,"recording":{"mode":"automatic"}}.
1877
+ */
1878
+ export const updateMediaStream = (options) => (options.client ?? client).patch({
1879
+ security: [{
1880
+ key: 'BearerAuth',
1881
+ scheme: 'bearer',
1882
+ type: 'http'
1883
+ }, {
1884
+ key: 'ApiKeyAuth',
1885
+ name: 'X-API-Key',
1886
+ type: 'apiKey'
1887
+ }],
1888
+ url: '/media/v1/streams/{stream_id}',
1889
+ ...options,
1890
+ headers: {
1891
+ 'Content-Type': 'application/json',
1892
+ ...options.headers
1893
+ }
1894
+ });
1895
+ /**
1896
+ * Enable a stream
1897
+ *
1898
+ * Bring a disabled stream back to idle so a source may drive it again; it does not start anything by itself. Only a disabled stream can be enabled; an idle, waiting or active stream answers 409. Use streams.disable.create to stop a stream. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/enable with no body.
1899
+ */
1900
+ export const enableMediaStream = (options) => (options.client ?? client).post({
1901
+ security: [{
1902
+ key: 'BearerAuth',
1903
+ scheme: 'bearer',
1904
+ type: 'http'
1905
+ }, {
1906
+ key: 'ApiKeyAuth',
1907
+ name: 'X-API-Key',
1908
+ type: 'apiKey'
1909
+ }],
1910
+ url: '/media/v1/streams/{stream_id}/enable',
1911
+ ...options
1912
+ });
1913
+ /**
1914
+ * Disable a stream
1915
+ *
1916
+ * Stop a stream from any status: a live stream is closed out (its log records stream.disconnected and stream.idle), it gives back its active slot, and a source can no longer drive it until streams.enable.create. Disabling a disabled stream changes nothing and answers 200. Use it before deleting a live stream or to switch a source off without losing the stream. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/disable with no body.
1917
+ */
1918
+ export const disableMediaStream = (options) => (options.client ?? client).post({
1919
+ security: [{
1920
+ key: 'BearerAuth',
1921
+ scheme: 'bearer',
1922
+ type: 'http'
1923
+ }, {
1924
+ key: 'ApiKeyAuth',
1925
+ name: 'X-API-Key',
1926
+ type: 'apiKey'
1927
+ }],
1928
+ url: '/media/v1/streams/{stream_id}/disable',
1929
+ ...options
1930
+ });
1931
+ /**
1932
+ * Get the address and capability to subscribe to a stream's events
1933
+ *
1934
+ * Mint a subscribe capability for the stream's event socket: a WebSocket that sends every event after a sequence number, then each new event as it is written. Use it for live delivery to an app or a dashboard; to read the log in pages without holding a socket use streams.events.list, and to receive events at your server use a webhook element of a pipeline. The response carries {url, token, expires_at}: open the url as a WebSocket and append &after=<seq> with the highest seq you have already seen (omit it, or use 0, to read from the start). A subscriber that was away comes back with its last seq and is sent every event it missed, then the live ones; the same event can arrive again, so de-duplicate on the event id. The token opens the socket and nothing else, is valid for one hour, may be held by any number of subscribers at once and is shown only in this response; mint a new one to reconnect after it expires. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/subscribe-token with no body.
1935
+ */
1936
+ export const createMediaStreamSubscription = (options) => (options.client ?? client).post({
1937
+ security: [{
1938
+ key: 'BearerAuth',
1939
+ scheme: 'bearer',
1940
+ type: 'http'
1941
+ }, {
1942
+ key: 'ApiKeyAuth',
1943
+ name: 'X-API-Key',
1944
+ type: 'apiKey'
1945
+ }],
1946
+ url: '/media/v1/streams/{stream_id}/subscribe-token',
1947
+ ...options
1948
+ });
1949
+ /**
1950
+ * Get the address and capability to play a stream live
1951
+ *
1952
+ * Mint a playback capability for the stream: an address of its live HLS playlist that a browser player can open with no API key. Call it from your own server and hand the address to the page, so the API key never reaches the browser; the Praxis Kit LiveStreamPlayer takes it as playbackUrl. The stream must have playback.enabled set (or record automatically), otherwise nothing is kept to play and the answer is 409. The response carries {url, expires_at}: the token is valid for one hour, any number can be held at once, and it opens this stream's playlist and nothing else. The playlist shows the newest six segments of the broadcast in progress with PROGRAM-DATE-TIME on each, and ends (EXT-X-ENDLIST) when the stream is idle or disabled. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/playback-token with no body.
1953
+ */
1954
+ export const createMediaStreamPlayback = (options) => (options.client ?? client).post({
1955
+ security: [{
1956
+ key: 'BearerAuth',
1957
+ scheme: 'bearer',
1958
+ type: 'http'
1959
+ }, {
1960
+ key: 'ApiKeyAuth',
1961
+ name: 'X-API-Key',
1962
+ type: 'apiKey'
1963
+ }],
1964
+ url: '/media/v1/streams/{stream_id}/playback-token',
1965
+ ...options
1966
+ });
1967
+ /**
1968
+ * Read the live HLS playlist of a stream
1969
+ *
1970
+ * The live HLS playlist of the broadcast in progress: a sliding window of the newest six segments, each with EXT-X-PROGRAM-DATE-TIME (the wall clock of its first frame) and the address of its media, signed for ten minutes. Players read it again every few seconds. It carries no media itself and takes no API key: the token in the address (minted by streams.playbackToken) is the credential, and the answer is open to any browser origin. Use the address as given; do not build it by hand. The playlist ends with EXT-X-ENDLIST once the stream is idle or disabled. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/live.m3u8?token=Qm9v.
1971
+ */
1972
+ export const getMediaStreamLivePlaylist = (options) => (options.client ?? client).get({ url: '/media/v1/streams/{stream_id}/live.m3u8', ...options });
1973
+ /**
1974
+ * Reset the push token of a stream
1975
+ *
1976
+ * Mint a new push token for a push stream and invalidate the old one, for example when the token leaked or has expired (a token is valid for 24 hours). The response carries the new push {url, token, expires_at}; the token is shown only here. A pull stream has no token and answers 409. Example: POST /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/reset-token with no body.
1977
+ */
1978
+ export const resetMediaStreamToken = (options) => (options.client ?? client).post({
1979
+ security: [{
1980
+ key: 'BearerAuth',
1981
+ scheme: 'bearer',
1982
+ type: 'http'
1983
+ }, {
1984
+ key: 'ApiKeyAuth',
1985
+ name: 'X-API-Key',
1986
+ type: 'apiKey'
1987
+ }],
1988
+ url: '/media/v1/streams/{stream_id}/reset-token',
1989
+ ...options
1990
+ });
1991
+ /**
1992
+ * List the events of a stream
1993
+ *
1994
+ * Read the stream's event log in order, to follow what the stream did or to catch up after a disconnect: pass after set to the highest seq you have seen and you receive every later event, oldest first, up to limit (1 to 100, default 100). Events are delivered at least once and each has a stable id, so a repeat is the same event. Kinds are the life cycle of the stream (stream.waiting, stream.connected, stream.active, stream.disconnected, stream.idle), recording.ready and recording.failed, output.status, and the results of its pipeline (transcript.partial, transcript.final, frame.described, alert, pipeline.unsupported_audio, pipeline.describe_failed). at is wall-clock time and at_source says whether it came from the source (program_date_time) or was the time Praxis received it; offset_ms is the position inside the stream when known. Events are kept at least 24 hours. When has_more is false next_after is the seq to pass next time. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/events?after=12&limit=50.
1995
+ */
1996
+ export const listMediaStreamEvents = (options) => (options.client ?? client).get({
1997
+ security: [{
1998
+ key: 'BearerAuth',
1999
+ scheme: 'bearer',
2000
+ type: 'http'
2001
+ }, {
2002
+ key: 'ApiKeyAuth',
2003
+ name: 'X-API-Key',
2004
+ type: 'apiKey'
2005
+ }],
2006
+ url: '/media/v1/streams/{stream_id}/events',
2007
+ ...options
2008
+ });
2009
+ /**
2010
+ * List pipelines
2011
+ *
2012
+ * List the pipelines of your organization, newest first, to find a pipeline id; to read one use pipelines.retrieve. Pages hold limit pipelines (1 to 100, default 20); when has_more is true pass the id of the last pipeline you received as starting_after to get the next page. Example: GET /media/v1/pipelines?limit=20.
2013
+ */
2014
+ export const listMediaPipelines = (options) => (options?.client ?? client).get({
2015
+ security: [{
2016
+ key: 'BearerAuth',
2017
+ scheme: 'bearer',
2018
+ type: 'http'
2019
+ }, {
2020
+ key: 'ApiKeyAuth',
2021
+ name: 'X-API-Key',
2022
+ type: 'apiKey'
2023
+ }],
2024
+ url: '/media/v1/pipelines',
2025
+ ...options
2026
+ });
2027
+ /**
2028
+ * Create a pipeline
2029
+ *
2030
+ * Describe what to run while a stream is live, once, and attach it to as many streams as you like with pipeline_id. A pipeline is an ordered list of elements: processors that read the broadcast and sinks that receive the results. transcribe {language?, hot_words?} turns the speech into transcript.partial and transcript.final events (each carries offset_ms in the stream, end_ms and the wall-clock time at, which is the source's own PROGRAM-DATE-TIME when it has one and the time received otherwise). describe_frames {interval_s 5 to 300 default 10, prompt?, model?} describes one keyframe every interval_s as a frame.described event; a slow description skips the frames in between, it never queues them. match_keywords {keywords} raises an alert event when a final sentence of the transcript holds one of the words, as a keyword_match alert rule does; the sinks send the results on: webhook {url} posts every event of the stream to your server, signed as Standard Webhooks (the secret whsec_ is shown once, in the response that adds the webhook), and agent {session_id} sends them to an agent session; the events sink is always on. A processor appears once; webhook and agent sinks up to five each. alert_rules holds keyword_match {keywords} and model_judgment {prompt}. A stream runs the pipeline as it was when the broadcast began: editing it changes the next broadcast, not the one on air. Example: {"name":"jewellery room","elements":[{"type":"transcribe","language":"zh"},{"type":"describe_frames","interval_s":20}]}.
2031
+ */
2032
+ export const createMediaPipeline = (options) => (options.client ?? client).post({
2033
+ security: [{
2034
+ key: 'BearerAuth',
2035
+ scheme: 'bearer',
2036
+ type: 'http'
2037
+ }, {
2038
+ key: 'ApiKeyAuth',
2039
+ name: 'X-API-Key',
2040
+ type: 'apiKey'
2041
+ }],
2042
+ url: '/media/v1/pipelines',
2043
+ ...options,
2044
+ headers: {
2045
+ 'Content-Type': 'application/json',
2046
+ ...options.headers
2047
+ }
2048
+ });
2049
+ /**
2050
+ * Delete a pipeline
2051
+ *
2052
+ * Delete a pipeline that no stream names. A stream that still has it as its pipeline_id keeps the deletion from happening, so detach it first with streams.update (pipeline_id: null) or delete the stream. Deleting is not undone and the id is not reused. Example: DELETE /media/v1/pipelines/msp_zpnqd7a2kxwg3vhr5tj4bfm6ec.
2053
+ */
2054
+ export const deleteMediaPipeline = (options) => (options.client ?? client).delete({
2055
+ security: [{
2056
+ key: 'BearerAuth',
2057
+ scheme: 'bearer',
2058
+ type: 'http'
2059
+ }, {
2060
+ key: 'ApiKeyAuth',
2061
+ name: 'X-API-Key',
2062
+ type: 'apiKey'
2063
+ }],
2064
+ url: '/media/v1/pipelines/{pipeline_id}',
2065
+ ...options
2066
+ });
2067
+ /**
2068
+ * Retrieve a pipeline
2069
+ *
2070
+ * Read one pipeline: its name, elements and alert rules, as a stream that names it will run them. Example: GET /media/v1/pipelines/msp_zpnqd7a2kxwg3vhr5tj4bfm6ec.
2071
+ */
2072
+ export const getMediaPipeline = (options) => (options.client ?? client).get({
2073
+ security: [{
2074
+ key: 'BearerAuth',
2075
+ scheme: 'bearer',
2076
+ type: 'http'
2077
+ }, {
2078
+ key: 'ApiKeyAuth',
2079
+ name: 'X-API-Key',
2080
+ type: 'apiKey'
2081
+ }],
2082
+ url: '/media/v1/pipelines/{pipeline_id}',
2083
+ ...options
2084
+ });
2085
+ /**
2086
+ * Update a pipeline
2087
+ *
2088
+ * Change a pipeline's name, elements or alert_rules; each field you send replaces the whole of that field (elements is a list, not a merge) and a field you leave out stays. A stream that is live keeps the pipeline it began its broadcast with; the change takes effect from its next broadcast. An empty body answers 400. Example: {"elements":[{"type":"transcribe"}]}.
2089
+ */
2090
+ export const updateMediaPipeline = (options) => (options.client ?? client).patch({
2091
+ security: [{
2092
+ key: 'BearerAuth',
2093
+ scheme: 'bearer',
2094
+ type: 'http'
2095
+ }, {
2096
+ key: 'ApiKeyAuth',
2097
+ name: 'X-API-Key',
2098
+ type: 'apiKey'
2099
+ }],
2100
+ url: '/media/v1/pipelines/{pipeline_id}',
2101
+ ...options,
2102
+ headers: {
2103
+ 'Content-Type': 'application/json',
2104
+ ...options.headers
2105
+ }
2106
+ });
2107
+ /**
2108
+ * List a stream's re-broadcast targets
2109
+ *
2110
+ * List every output of one stream, oldest first, with the status of each (idle, starting, broadcasting or errored) and the error of an errored one. Use it to see at a glance which targets are live; to change one use streams.outputs.update and to follow status changes as they happen read streams.events.list. A stream has at most 5 outputs, so the list is one page. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs.
2111
+ */
2112
+ export const listMediaStreamOutputs = (options) => (options.client ?? client).get({
2113
+ security: [{
2114
+ key: 'BearerAuth',
2115
+ scheme: 'bearer',
2116
+ type: 'http'
2117
+ }, {
2118
+ key: 'ApiKeyAuth',
2119
+ name: 'X-API-Key',
2120
+ type: 'apiKey'
2121
+ }],
2122
+ url: '/media/v1/streams/{stream_id}/outputs',
2123
+ ...options
2124
+ });
2125
+ /**
2126
+ * Add a re-broadcast target to a stream
2127
+ *
2128
+ * Re-broadcast a live stream to another service (simulcast): give the target's RTMP address in url and its stream key in stream_key, and every broadcast of this stream is also sent there, without transcoding, while the stream is active. Use it to feed YouTube, Twitch or your own RTMP server from one source; to follow what the target does read streams.events.list for output.status events, and use streams.outputs.retrieve for its current status. url must be rtmp:// or rtmps:// on a public host and name the application (rtmp://a.rtmp.youtube.com/live2); the key is write-only, it is never returned, a read only says stream_key_set is true. A stream has at most 5 outputs. A new output is idle and starts with the next broadcast, or at once when the stream is active. One output that is slow or down never affects the others, the recording or the pipeline. Example: {"url":"rtmps://live.example.com:443/app","stream_key":"live_abc123"}.
2129
+ */
2130
+ export const createMediaStreamOutput = (options) => (options.client ?? client).post({
2131
+ security: [{
2132
+ key: 'BearerAuth',
2133
+ scheme: 'bearer',
2134
+ type: 'http'
2135
+ }, {
2136
+ key: 'ApiKeyAuth',
2137
+ name: 'X-API-Key',
2138
+ type: 'apiKey'
2139
+ }],
2140
+ url: '/media/v1/streams/{stream_id}/outputs',
2141
+ ...options,
2142
+ headers: {
2143
+ 'Content-Type': 'application/json',
2144
+ ...options.headers
2145
+ }
2146
+ });
2147
+ /**
2148
+ * Remove a re-broadcast target
2149
+ *
2150
+ * Stop re-broadcasting to a target and forget it: its connection is closed at once and its key is deleted. The stream, its recording and its other outputs are not touched. Deleting is not undone and the id is not reused; to send there again create a new output. Example: DELETE /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs/mso_zpnqd7a2kxwg3vhr5tj4bfm6ec.
2151
+ */
2152
+ export const deleteMediaStreamOutput = (options) => (options.client ?? client).delete({
2153
+ security: [{
2154
+ key: 'BearerAuth',
2155
+ scheme: 'bearer',
2156
+ type: 'http'
2157
+ }, {
2158
+ key: 'ApiKeyAuth',
2159
+ name: 'X-API-Key',
2160
+ type: 'apiKey'
2161
+ }],
2162
+ url: '/media/v1/streams/{stream_id}/outputs/{output_id}',
2163
+ ...options
2164
+ });
2165
+ /**
2166
+ * Read one re-broadcast target
2167
+ *
2168
+ * Read one output: its address, whether a key is set (the key itself is never returned), its status and, when it is errored, why. Use it to check a target after streams.outputs.create or after an output.status event; status broadcasting means the target accepted the stream and is receiving it. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs/mso_zpnqd7a2kxwg3vhr5tj4bfm6ec.
2169
+ */
2170
+ export const getMediaStreamOutput = (options) => (options.client ?? client).get({
2171
+ security: [{
2172
+ key: 'BearerAuth',
2173
+ scheme: 'bearer',
2174
+ type: 'http'
2175
+ }, {
2176
+ key: 'ApiKeyAuth',
2177
+ name: 'X-API-Key',
2178
+ type: 'apiKey'
2179
+ }],
2180
+ url: '/media/v1/streams/{stream_id}/outputs/{output_id}',
2181
+ ...options
2182
+ });
2183
+ /**
2184
+ * Change a re-broadcast target
2185
+ *
2186
+ * Change the address or the key of an output, for example after the target gave you a new key or an errored output was refused for a bad one; send at least one of url and stream_key. An output that is running starts over with the new values: its connection is closed and opened again, and its status goes through starting again. Use streams.outputs.delete to stop sending to a target for good. Example: {"stream_key":"live_new456"}.
2187
+ */
2188
+ export const updateMediaStreamOutput = (options) => (options.client ?? client).patch({
2189
+ security: [{
2190
+ key: 'BearerAuth',
2191
+ scheme: 'bearer',
2192
+ type: 'http'
2193
+ }, {
2194
+ key: 'ApiKeyAuth',
2195
+ name: 'X-API-Key',
2196
+ type: 'apiKey'
2197
+ }],
2198
+ url: '/media/v1/streams/{stream_id}/outputs/{output_id}',
2199
+ ...options,
2200
+ headers: {
2201
+ 'Content-Type': 'application/json',
2202
+ ...options.headers
2203
+ }
2204
+ });
1769
2205
  /**
1770
2206
  * List Models
1771
2207
  *
@@ -3393,7 +3829,7 @@ export const listOrganizationDepartments = (options) => (options?.client ?? clie
3393
3829
  /**
3394
3830
  * Establish a department
3395
3831
  *
3396
- * Creates a department under an existing active parent department; use it to grow the tree, and use reorganize to rename or move one that already exists. order defaults to one after the last active sibling. The new department has no head position and no charter: open a position in it, then designate that position as head. Requires an organization owner or admin, or the head of the parent department or of a department above it. Errors: 400 INVALID_PARAMS for a missing or empty name, a name over 100 characters, an unknown body field or an active sibling with the same name; 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND when the parent does not exist; 409 DEPARTMENT_DISSOLVED when the parent is dissolved. Example body: {"parent_id":"dept_123","name":"Support"}.
3832
+ * Creates a department under an existing active parent department; use it to grow the tree, and use reorganize to rename or move one that already exists. order defaults to one after the last active sibling. The new department has no head position: open a position in it, then designate that position as head. Requires an organization owner or admin, or the head of the parent department or of a department above it. Errors: 400 INVALID_PARAMS for a missing or empty name, a name over 100 characters, an unknown body field or an active sibling with the same name; 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND when the parent does not exist; 409 DEPARTMENT_DISSOLVED when the parent is dissolved. Example body: {"parent_id":"dept_123","name":"Support"}.
3397
3833
  */
3398
3834
  export const establishOrganizationDepartment = (options) => (options.client ?? client).post({
3399
3835
  security: [{
@@ -3415,7 +3851,7 @@ export const establishOrganizationDepartment = (options) => (options.client ?? c
3415
3851
  /**
3416
3852
  * Get a department
3417
3853
  *
3418
- * Reads one department with its head position id and its charter, including the charter revision you need before amending the charter. Read-only. Errors: 404 DEPARTMENT_NOT_FOUND when the id is not a department of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
3854
+ * Reads one department with its head position id. A department's charter is the document of its spec (GET /workforce/v1/specs/department/{id}), not a field of the department. Read-only. Errors: 404 DEPARTMENT_NOT_FOUND when the id is not a department of your organization; 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
3419
3855
  */
3420
3856
  export const getOrganizationDepartment = (options) => (options.client ?? client).get({
3421
3857
  security: [{
@@ -3471,9 +3907,11 @@ export const dissolveOrganizationDepartment = (options) => (options.client ?? cl
3471
3907
  ...options
3472
3908
  });
3473
3909
  /**
3474
- * Amend a department charter
3910
+ * Amend a department charter (gone)
3911
+ *
3912
+ * Deprecated: use PUT /workforce/v1/specs/department/{id} instead; this path stops working on 2026-11-28. A department's charter is now the `document` of its spec, not a field of the department: read it at GET /workforce/v1/specs/department/{id} and replace it with PUT /workforce/v1/specs/department/{id} sending metadata.revision and spec.document. The root department's charter is the organization's own spec at /workforce/v1/specs/organization/{organization_id}. Until then this path answers 410 with code DEPARTMENT_CHARTER_GONE and the same instruction.
3475
3913
  *
3476
- * Replaces the charter of a department: free-text rules that apply to the department and are inherited by every department below it. Send the charter.revision you last read as expected_revision (0 when the department has no charter yet); each successful amendment raises the revision by one. Requires an organization owner or admin, or the head of the department or of a department above it. Errors: 400 INVALID_PARAMS for text over 2000 characters or a non-integer expected_revision; 403 PERMISSION_DENIED; 404 DEPARTMENT_NOT_FOUND; 409 DEPARTMENT_DISSOLVED; 409 REVISION_CONFLICT when the charter moved on, so get the department again, merge your change and retry with its revision.
3914
+ * @deprecated
3477
3915
  */
3478
3916
  export const amendOrganizationDepartmentCharter = (options) => (options.client ?? client).put({
3479
3917
  security: [{
@@ -3486,11 +3924,7 @@ export const amendOrganizationDepartmentCharter = (options) => (options.client ?
3486
3924
  type: 'apiKey'
3487
3925
  }],
3488
3926
  url: '/workforce/v1/departments/{id}/charter',
3489
- ...options,
3490
- headers: {
3491
- 'Content-Type': 'application/json',
3492
- ...options.headers
3493
- }
3927
+ ...options
3494
3928
  });
3495
3929
  /**
3496
3930
  * List jobs
@@ -4029,7 +4463,7 @@ export const listOrganizationActors = (options) => (options?.client ?? client).g
4029
4463
  /**
4030
4464
  * Get the position chain of an actor
4031
4465
  *
4032
- * Reads where an actor, person or agent, sits in the organization: its primary position and its concurrent positions, each with the department path from the root down with every level's charter, the job, title and level name, the manager (the first filled position up the reporting line), the position's own duties and methods, and objectives. Use it to answer who this actor is and what it is responsible for. An actor that holds no position is not an error: primary is null and concurrent is empty. Read-only. Errors: 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
4466
+ * Reads where an actor, person or agent, sits in the organization: its primary position and its concurrent positions, each with the department path from the root down (ids and names; a department's charter is its spec's document, read through /workforce/v1/specs), the job, title and level name, the manager (the first filled position up the reporting line), the position's own duties and methods, and objectives. Use it to answer who this actor is and what it is responsible for. An actor that holds no position is not an error: primary is null and concurrent is empty. Read-only. Errors: 403 PERMISSION_DENIED for a run or computer token, or a session token that names no agent.
4033
4467
  */
4034
4468
  export const getOrganizationActor = (options) => (options.client ?? client).get({
4035
4469
  security: [{
@@ -7707,6 +8141,84 @@ export const canvasRestoreCanvas = (options) => (options.client ?? client).post(
7707
8141
  ...options.headers
7708
8142
  }
7709
8143
  });
8144
+ /**
8145
+ * Publish canvas library
8146
+ *
8147
+ * Freeze the reusable components of a canvas as the next numbered library version, so other canvases can use them; the first publish turns the canvas into a library. Supply a canvas_id from canvases.list or create after marking frames as components. The result lists which components were added, changed (compared by content) or removed since the previous version, and whether variables or themes changed. A removed component stays readable in the new version, marked removed. Publishing is not an edit, so the canvas version does not change. Component libraries are available only to organizations where the canvas-libraries feature is enabled; others receive FEATURE_DISABLED.
8148
+ */
8149
+ export const canvasPublishLibrary = (options) => (options.client ?? client).post({
8150
+ security: [{
8151
+ key: 'canvas-bearerAuth',
8152
+ scheme: 'bearer',
8153
+ type: 'http'
8154
+ }],
8155
+ url: '/canvas/v1/canvases/{canvas_id}:publish',
8156
+ ...options,
8157
+ headers: {
8158
+ 'Content-Type': 'application/json',
8159
+ ...options.headers
8160
+ }
8161
+ });
8162
+ /**
8163
+ * List library versions
8164
+ *
8165
+ * Read the release history of a library canvas, newest first, including each version's description and what it added, changed or removed. Supply a canvas_id of a canvas that has been published at least once; a canvas that never was answers NOT_A_LIBRARY. limit is 1–100 and defaults to 30; pass next_cursor as cursor until it is null. Library versions are never pruned. Listing does not change the canvas. Available only to organizations where the canvas-libraries feature is enabled.
8166
+ */
8167
+ export const canvasListLibraryVersions = (options) => (options.client ?? client).get({
8168
+ security: [{
8169
+ key: 'canvas-bearerAuth',
8170
+ scheme: 'bearer',
8171
+ type: 'http'
8172
+ }],
8173
+ url: '/canvas/v1/canvases/{canvas_id}/library_versions',
8174
+ ...options
8175
+ });
8176
+ /**
8177
+ * List libraries
8178
+ *
8179
+ * Discover the component libraries of the API key's organization, most recently published first. A library is a canvas that has been published at least once; each item gives its latest version, component count and how many live canvases use it. query keeps only libraries whose name contains the text, ignoring case. limit is 1–100 and defaults to 50; pass next_cursor as cursor until it is null. Deleted canvases are not listed. Available only to organizations where the canvas-libraries feature is enabled.
8180
+ */
8181
+ export const canvasListLibraries = (options) => (options?.client ?? client).get({
8182
+ security: [{
8183
+ key: 'canvas-bearerAuth',
8184
+ scheme: 'bearer',
8185
+ type: 'http'
8186
+ }],
8187
+ url: '/canvas/v1/libraries',
8188
+ ...options
8189
+ });
8190
+ /**
8191
+ * Import canvas library
8192
+ *
8193
+ * Make a published library's components usable in this canvas under an alias, or move an existing alias to another library version. Supply this canvas's canvas_id and the library's canvas id from libraries.list; the library must have been published at least once, and a library cannot itself import another library. After importing, reference a component as alias:component_id (for example ref ui:btn in a script) and a library variable as $alias:name; library nodes are read-only here. Moving an alias to a newer version keeps every instance and its overrides. The import is one new canvas version, so restoring an earlier version also restores the library versions it used. Importing the same alias and version again changes nothing. Component libraries are available only to organizations where the canvas-libraries feature is enabled.
8194
+ */
8195
+ export const canvasSetImport = (options) => (options.client ?? client).post({
8196
+ security: [{
8197
+ key: 'canvas-bearerAuth',
8198
+ scheme: 'bearer',
8199
+ type: 'http'
8200
+ }],
8201
+ url: '/canvas/v1/canvases/{canvas_id}/imports',
8202
+ ...options,
8203
+ headers: {
8204
+ 'Content-Type': 'application/json',
8205
+ ...options.headers
8206
+ }
8207
+ });
8208
+ /**
8209
+ * Remove canvas library import
8210
+ *
8211
+ * Stop using an imported library in this canvas. Supply this canvas's canvas_id and the alias it was imported under, as listed in imports of retrieve. The import is refused while any node still instantiates one of the library's components (the count is in error.details.instances, and retrieve lists them per component), so delete or replace those nodes first. The removal is one new canvas version. Component libraries are available only to organizations where the canvas-libraries feature is enabled.
8212
+ */
8213
+ export const canvasDeleteImport = (options) => (options.client ?? client).delete({
8214
+ security: [{
8215
+ key: 'canvas-bearerAuth',
8216
+ scheme: 'bearer',
8217
+ type: 'http'
8218
+ }],
8219
+ url: '/canvas/v1/canvases/{canvas_id}/imports/{alias}',
8220
+ ...options
8221
+ });
7710
8222
  /**
7711
8223
  * List contents
7712
8224
  *
@@ -8509,7 +9021,7 @@ export const customerCreateGrantCode = (options) => (options.client ?? client).p
8509
9021
  /**
8510
9022
  * Exchange a grant code or publishable key
8511
9023
  *
8512
- * Turn a grant code, or a publishable key for an anonymous visitor, into the Praxis customer access token that authorizes the Kit's sessions and playbacks. It is PRE-AUTH: no platform API key is needed, because the grant code or the publishable key is the credential; the Kit calls it from the browser, so send the page Origin when the code or key is bound to one. Send exactly one of grant_code or publishable_key — the door refuses any other combination with 400. With grant_code the code is consumed atomically: concurrent attempts have exactly one winner, and unknown, already used, expired and foreign codes all answer 401 GRANT_CODE_INVALID. With publishable_key a new anonymous customer (anon_…) is created and merged into the identified one later if it signs in. The sign-in may be bound to an origin at creation; when the request Origin does not satisfy it, the exchange answers 403 ORIGIN_NOT_ALLOWED, and a blocked end user answers 403 CUSTOMER_BLOCKED. The access token lasts at most two hours and never outlives the sign-in; renew it with praxis.customer.accessTokens.renew before expires_at. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After.
9024
+ * Turn a grant code, or a publishable key for an anonymous visitor, into the Praxis customer access token that authorizes the Kit's sessions and playbacks. It is PRE-AUTH: no platform API key is needed, because the grant code or the publishable key is the credential; the Kit calls it from the browser, so send the page Origin when the code or key is bound to one. Send exactly one of grant_code or publishable_key — the door refuses any other combination with 400. With grant_code the code is consumed atomically: concurrent attempts have exactly one winner, and unknown, already used, expired and foreign codes all answer 401 GRANT_CODE_INVALID. With publishable_key a new anonymous customer (anon_…) is created and merged into the identified one later if it signs in. The sign-in may be bound to an origin at creation; when the request Origin does not satisfy it, the exchange answers 403 ORIGIN_NOT_ALLOWED, and a blocked end user answers 403 CUSTOMER_BLOCKED. The access token lasts at most two hours and never outlives the sign-in; renew it with praxis.customer.accessTokens.renew before expires_at. This door has its own per-IP anonymous budget: over it answers 429 RATE_LIMITED with Retry-After. A publishable key may also carry its own limits (anon_rate_per_min and daily_session_cap, set on the key): over the key's per-minute exchanges the door answers 429 PUBLISHABLE_KEY_RATE_LIMITED, and once the key has admitted daily_session_cap new anonymous visitors in the current UTC day it answers 429 PUBLISHABLE_KEY_DAILY_CAP_REACHED to a new visitor while a returning visitor with a continuation_token still continues; both carry Retry-After, the seconds until their UTC minute or day ends.
8513
9025
  */
8514
9026
  export const customerCreateAccessToken = (options) => (options.client ?? client).post({
8515
9027
  url: '/customer/v1/access_tokens',
@@ -8682,7 +9194,7 @@ export const customerListPublishableKeys = (options) => (options?.client ?? clie
8682
9194
  /**
8683
9195
  * Create a publishable key
8684
9196
  *
8685
- * Mint a publishable key so a page can admit anonymous visitors without you signing each one in from your backend. name labels the key for the console and the key list. resources is required and names what an anonymous visitor may reach, in the same form as the grant-code scopes: agent:<id>:chat, content:<id>:play or application:<id>:visit, with * for every object of one type; give it only what the anonymous experience needs, because any visitor who has the page can use the key. The response carries the plaintext key once, in key, and the store keeps only its hash — save it then, because no later call returns it. Returns HTTP 201; the exchange that consumes it is praxis.customer.accessTokens.create with publishable_key.
9197
+ * Mint a publishable key so a page can admit anonymous visitors without you signing each one in from your backend. name labels the key for the console and the key list. resources is required and names what an anonymous visitor may reach, in the same form as the grant-code scopes: agent:<id>:chat, content:<id>:play or application:<id>:visit, with * for every object of one type; give it only what the anonymous experience needs, because any visitor who has the page can use the key. The response carries the plaintext key once, in key, and the store keeps only its hash — save it then, because no later call returns it. anon_rate_per_min and daily_session_cap are optional limits of the key itself, both absent by default: the first caps how many exchanges the key allows per UTC minute across all visitors, the second how many new anonymous visitors it admits per UTC day (returning visitors are not counted); change them later with praxis.customer.publishableKeys.update. Returns HTTP 201; the exchange that consumes it is praxis.customer.accessTokens.create with publishable_key.
8686
9198
  */
8687
9199
  export const customerCreatePublishableKey = (options) => (options.client ?? client).post({
8688
9200
  security: [{
@@ -8719,6 +9231,28 @@ export const customerDeletePublishableKey = (options) => (options.client ?? clie
8719
9231
  url: '/customer/v1/publishable_keys/{key_id}',
8720
9232
  ...options
8721
9233
  });
9234
+ /**
9235
+ * Update a publishable key
9236
+ *
9237
+ * Change the name of a publishable key or its own limits on anonymous admittance, for example to cap a page that is drawing more anonymous visitors than you want to pay for. Send at least one of name, anon_rate_per_min or daily_session_cap; a field left out keeps its value, and null removes that limit. anon_rate_per_min caps the exchanges of this key per UTC minute across all visitors (returning visitors included), and daily_session_cap caps the new anonymous visitors it admits per UTC day; a returning visitor that sends its continuation_token is never counted toward or refused by the daily cap. A new limit applies from the next exchange. The resources a key grants and its plaintext value never change; mint a new key for different resources. Get the key id from the publishable key list. An unknown, deleted or foreign id answers 400 INVALID_PARAMS, as does a limit outside its range.
9238
+ */
9239
+ export const customerUpdatePublishableKey = (options) => (options.client ?? client).patch({
9240
+ security: [{
9241
+ key: 'BearerAuth',
9242
+ scheme: 'bearer',
9243
+ type: 'http'
9244
+ }, {
9245
+ key: 'ApiKeyAuth',
9246
+ name: 'X-API-Key',
9247
+ type: 'apiKey'
9248
+ }],
9249
+ url: '/customer/v1/publishable_keys/{key_id}',
9250
+ ...options,
9251
+ headers: {
9252
+ 'Content-Type': 'application/json',
9253
+ ...options.headers
9254
+ }
9255
+ });
8722
9256
  /**
8723
9257
  * List projects
8724
9258
  *