@deepraxis/sdk 0.2.0-dev.93f321b → 0.2.0-dev.a24e748

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.
@@ -117,6 +117,24 @@ export const listAgentInboxLetters = (options) => (options.client ?? client).get
117
117
  url: '/agent/v1/agents/{agent_id}/inbox/letters',
118
118
  ...options
119
119
  });
120
+ /**
121
+ * List the Claude Code sessions already on a device
122
+ *
123
+ * List the Claude Code sessions that already exist on a person's paired machine for a directory bound to this BYOA agent (started in a terminal, not on the platform), newest first, so one can be continued from the platform: pick an id and create a session with runtime.resume_session_id set to it (runtime.type device, the same device_id and cwd). Only the person who paired the device may ask. cwd is required and must be the directory exactly as the device registered it and bound it to this agent. Pass next_cursor back as cursor for the next page; null means the last page.
124
+ */
125
+ export const listAgentDeviceLocalSessions = (options) => (options.client ?? client).get({
126
+ security: [{
127
+ key: 'BearerAuth',
128
+ scheme: 'bearer',
129
+ type: 'http'
130
+ }, {
131
+ key: 'ApiKeyAuth',
132
+ name: 'X-API-Key',
133
+ type: 'apiKey'
134
+ }],
135
+ url: '/agent/v1/agents/{agent_id}/devices/{device_id}/local-sessions',
136
+ ...options
137
+ });
120
138
  /**
121
139
  * Create a login intent for the calling agent
122
140
  *
@@ -540,7 +558,7 @@ export const computersRetrieve = (options) => (options.client ?? client).get({
540
558
  /**
541
559
  * Update Computer
542
560
  *
543
- * Rename a computer.
561
+ * Rename a computer, declare its environment, or drop that declaration without touching the machine.
544
562
  *
545
563
  * Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; a computer starts on first use and exposes the public SDK sandbox_id. Lists include archived computers.
546
564
  */
@@ -714,9 +732,9 @@ export const computersFilesConvert = (options) => (options.client ?? client).pos
714
732
  *
715
733
  * Resume the computer and issue a sandbox connection.
716
734
  *
717
- * Own-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus the machine tier the computer is on now (light or heavy) and the lease that keeps it there (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the full machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.
735
+ * Own-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus tier (kept for compatibility: a Computer is one machine, so tier does not name a machine you can choose) and the lease that keeps the machine in service (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.
718
736
  *
719
- * Connect to a computer with a caller-held lease. Omit the body or send {} to request light: the lightweight shell, or the heavy instance while it is running. Send {"need":"heavy"} to request full Linux for interactive programs; files are synchronized before the heavy connection is returned with tier heavy. Renew the lease while using the connection and release it with DELETE when finished.
737
+ * Connect to a computer with a caller-held lease. Omit the body or send {}: the optional need field is accepted for compatibility and changes nothing, because a Computer is one machine. Renew the lease while using the connection and release it with DELETE when finished.
720
738
  */
721
739
  export const connectComputer = (options) => (options.client ?? client).post({
722
740
  security: [{
@@ -1210,7 +1228,7 @@ export const browserListSessions = (options) => (options?.client ?? client).get(
1210
1228
  /**
1211
1229
  * 创建浏览器会话
1212
1230
  *
1213
- * 创建云端 Chrome,返回自带凭证的 connectUrl;带 name 时按名字幂等:本账户已有同名且 RUNNING(未在释放中)、挂载的登录态与本次相同(都没挂也算相同)的会话,就直接返回这个会话(HTTP 200,reused=true,不新开、不计费),同名但登录态不同返回 409 SESSION_NAME_IN_USE(消息写明已有会话的 id),同名会话已在释放或已结束则新开;不带 name 时每次都新开(HTTP 201,reused=false)。同一件事请固定一个会话名并复用,不要每步新开再关闭:频繁新开会话对网站来说像同一账号不断换新设备登录,容易触发风控。persist 写入租约仍只属于这一个会话。它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
1231
+ * 创建云端 Chrome,返回自带凭证的 connectUrl;带 name 时按名字幂等:本账户已有同名且 RUNNING(未在释放中)、挂载的登录态与本次相同(都没挂也算相同)的会话,就直接返回这个会话(HTTP 200,reused=true,不新开、不计费),同名但登录态不同返回 409 SESSION_NAME_IN_USE(消息写明已有会话的 id),同名会话已在释放或已结束则新开;不带 name 时每次都新开(HTTP 201,reused=false)。同一件事请固定一个会话名并复用,不要每步新开再关闭:频繁新开会话对网站来说像同一账号不断换新设备登录,容易触发风控。persist 写入租约仍只属于这一个会话。它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。请求体里不认识的字段返回 400 INVALID_PARAMS 并写明字段名,不会被静默忽略;登录态写在 browserSettings.context({ id, persist }),写在顶层会被拒绝。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
1214
1232
  */
1215
1233
  export const browserCreateSession = (options) => (options.client ?? client).post({
1216
1234
  security: [{
@@ -1288,7 +1306,7 @@ export const browserListEvents = (options) => (options.client ?? client).get({
1288
1306
  /**
1289
1307
  * 执行页面动作
1290
1308
  *
1291
- * 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。动作都是语义动作:click、fill、select 按快照 ref 定位元素,scroll 派发滚轮事件;没有触摸、拖拽或按坐标点击,也没有按坐标派发指针事件的动作。页面必须收到真手指或指针事件(touchstart/touchmove/touchend、拖拽、按坐标点击)时,改用 CDP 连接:使用创建会话返回的 connectUrl,或 /browser/v1/connect 建立连接,再发送 Input.dispatchTouchEvent、Input.dispatchMouseEvent 等 CDP 命令。
1309
+ * 在会话的浏览器里执行一个页面动作并返回结果,由浏览器服务执行,客户端不需要 Playwright。同一会话的动作按到达顺序串行执行,单个动作 30 秒内完成。先用 snapshot 读取页面:元素带 [ref=eN],click、fill、select 按 ref 操作;ref 只在最近一次快照里有效,页面跳转后失效(409 ACTION_REF_STALE,重新 snapshot)。省略 tab 时作用于当前标签页。动作都是语义动作:click、fill、select 按快照 ref 定位元素,scroll 派发滚轮事件;网络层用 route、unroute、routes 拦截请求(对标 Playwright 的 context.route 与 CDP Fetch 域):规则挂在会话上,open、reload、新开标签页之后仍然有效,会话结束时清除,多条规则都匹配时后注册的优先;没有触摸、拖拽或按坐标点击,也没有按坐标派发指针事件的动作。页面必须收到真手指或指针事件(touchstart/touchmove/touchend、拖拽、按坐标点击)时,改用 CDP 连接:使用创建会话返回的 connectUrl,或 /browser/v1/connect 建立连接,再发送 Input.dispatchTouchEvent、Input.dispatchMouseEvent 等 CDP 命令。
1292
1310
  */
1293
1311
  export const browserRunPageAction = (options) => (options.client ?? client).post({
1294
1312
  security: [{
@@ -1490,7 +1508,7 @@ export const browserGetByobBrowser = (options) => (options.client ?? client).get
1490
1508
  /**
1491
1509
  * 更新自带浏览器的名称、授权智能体与允许站点
1492
1510
  *
1493
- * 更新自带浏览器的名称、授权智能体或允许站点,只改请求里出现的字段;granted_agents 和 allowed_sites 整体替换原列表。已断开的浏览器返回 410 BROWSER_REVOKED,需要重新配对。
1511
+ * 给自带浏览器改名,只改请求里出现的字段。已断开的浏览器返回 410 BROWSER_REVOKED,需要重新配对。
1494
1512
  */
1495
1513
  export const browserUpdateByobBrowser = (options) => (options.client ?? client).patch({
1496
1514
  security: [{
@@ -1508,7 +1526,7 @@ export const browserUpdateByobBrowser = (options) => (options.client ?? client).
1508
1526
  /**
1509
1527
  * 断开自带浏览器
1510
1528
  *
1511
- * 断开自带浏览器:撤销它的授权,之后没有任何智能体能再驱动它,要用必须重新配对。可重复调用,结果相同;功能开关关闭时也能断开。
1529
+ * 断开自带浏览器:之后没有任何智能体能再驱动它,要用必须重新配对。可重复调用,结果相同;功能开关关闭时也能断开。
1512
1530
  */
1513
1531
  export const browserDisconnectByobBrowser = (options) => (options.client ?? client).post({
1514
1532
  security: [{
@@ -1541,7 +1559,7 @@ export const browserClaimByobPairing = (options) => (options.client ?? client).p
1541
1559
  /**
1542
1560
  * 连接云端浏览器
1543
1561
  *
1544
- * CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl。这是完整 CDP 连接:真手指或指针事件(Emulation.setTouchEmulationEnabled 加 Input.dispatchTouchEvent、拖拽用的 Input.dispatchMouseEvent)只能从这里发,页面动作接口只做按 ref 的语义动作。要挂指定登录态,可用 context 参数,或直接连接 sessions.create 返回的 connectUrl。
1562
+ * CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl(两者都是该会话在 Console 的会话页)。这是完整 CDP 连接:真手指或指针事件(Emulation.setTouchEmulationEnabled 加 Input.dispatchTouchEvent、拖拽用的 Input.dispatchMouseEvent)只能从这里发,页面动作接口只做按 ref 的语义动作。要挂指定登录态,可用 context 参数,或直接连接 sessions.create 返回的 connectUrl。
1545
1563
  */
1546
1564
  export const browserConnect = (options) => (options?.client ?? client).get({
1547
1565
  security: [{
@@ -1559,7 +1577,7 @@ export const browserConnect = (options) => (options?.client ?? client).get({
1559
1577
  /**
1560
1578
  * 打开实时浏览器画面
1561
1579
  *
1562
- * 使用 debug 返回的完整实时观看地址打开浏览器画面,成功后跳转到对应会话或标签页。必须保留地址中的 t 凭证,无需额外 API Key;链接失效时重新调用 debug 获取地址。
1580
+ * 旧版 debug 返回的带 t 凭证的地址,凭证在有效期内时跳转到该会话在 Console 的会话页。debug 现在直接返回 Console 会话页地址,新代码不要拼这个地址。
1563
1581
  */
1564
1582
  export const browserLiveView = (options) => (options.client ?? client).get({
1565
1583
  security: [{
@@ -3147,7 +3165,7 @@ export const createOrganizationFeedbackMessage = (options) => (options.client ??
3147
3165
  /**
3148
3166
  * List Organization Costs
3149
3167
  *
3150
- * Billed cost per time bucket per group (AWS GetCostAndUsage shape). Buckets are whole UTC hour/day periods; a window is answered over the aligned envelope covering it. Amounts are exact decimal strings in the currency the organization was charged in (BillingCurrency, CNY or USD); a group charged in two currencies is two results. estimated is always false: charges are final when they are recorded. Windows span at most 93 days; longer ranges belong to the charges export.
3168
+ * Billed cost per time bucket per group (AWS GetCostAndUsage shape). Buckets are whole hour or day periods in time_zone (UTC by default); a window is answered over the aligned envelope covering it. Amounts are exact decimal strings in the currency the organization was charged in (BillingCurrency, CNY or USD); a group charged in two currencies is two results. estimated is always false: charges are final when they are recorded. Windows span at most 93 days; longer ranges belong to the charges export.
3151
3169
  *
3152
3170
  */
3153
3171
  export const listOrganizationCosts = (options) => (options.client ?? client).get({
@@ -3166,7 +3184,7 @@ export const listOrganizationCosts = (options) => (options.client ?? client).get
3166
3184
  /**
3167
3185
  * List Organization Usage
3168
3186
  *
3169
- * Consumed quantity per time bucket per group. Buckets are whole UTC hour/day periods covering the requested window. Each result carries exactly one ConsumedQuantity + ConsumedUnit — quantities of different units are never added together.
3187
+ * Consumed quantity per time bucket per group. Buckets are whole hour or day periods in time_zone (UTC by default) covering the requested window. Each result carries exactly one ConsumedQuantity + ConsumedUnit — quantities of different units are never added together.
3170
3188
  *
3171
3189
  */
3172
3190
  export const listOrganizationUsage = (options) => (options.client ?? client).get({
@@ -3258,9 +3276,9 @@ export const getOrganizationNotificationsInbox = (options) => (options?.client ?
3258
3276
  ...options
3259
3277
  });
3260
3278
  /**
3261
- * List the letters addressed to you
3279
+ * List the letters addressed to you, or the ones you sent
3262
3280
  *
3263
- * The letters this person received in this organization, newest first, as the notification center lists them (ADR-193 §5, #4107): the sender, the summary and the whole body are the copy this reader receives — every human:/agent: address is rendered as the directory's display name, and one the directory cannot name reads 「未知成员」, never an address or an internal id. Also the kind, when it arrived, whether it is read, and one line saying why it reached this person. The address is the credential's own and is never a request field. Details stay whole in body; open one by its id. Pass next_cursor unchanged as cursor; null ends the list. Read-only; no usage charge.
3281
+ * The letters this person received (or, with direction=sent, wrote) in this organization, newest first, as the notification center lists them (ADR-193 §5, #4107): the sender, the summary and the whole body are the copy this reader receives — every human:/agent: address is rendered as the directory's display name, and one the directory cannot name reads 「未知成员」, never an address or an internal id. Also the kind, when it arrived, whether it is read, and one line saying why it reached this person. The address is the credential's own and is never a request field. Details stay whole in body; open one by its id. Pass next_cursor unchanged as cursor; null ends the list. Read-only; no usage charge.
3264
3282
  */
3265
3283
  export const listOrganizationNotificationLetters = (options) => (options?.client ?? client).get({
3266
3284
  security: [{
@@ -3275,6 +3293,28 @@ export const listOrganizationNotificationLetters = (options) => (options?.client
3275
3293
  url: '/organization/v1/notifications/letters',
3276
3294
  ...options
3277
3295
  });
3296
+ /**
3297
+ * Send a letter to a person or an agent
3298
+ *
3299
+ * Write one letter to a member or an agent of this organization, for an automation script or an outside caller that needs to reach someone, or to leave itself an alarm: a letter to your own address is allowed and arrives at its deliver_at. The sender is the credential's own and is never a request field — a person writes as themselves, an agent as itself, and an automation run (a scheduled or service-started one included) as the platform's automation sender with the run recorded in the letter's source; a `sender` in the body is ignored. Any other credential (an organization API key, an application) has no address to write from and is refused with 403. The recipient must belong to this organization: a person or agent of another organization answers 404 without saying whether it exists. A letter to a person needs a summary of at most 60 characters — one sentence saying what the reader must do or know; a longer one is refused, never cut. An agent's letter may leave summary out and the first line of body stands in. Repeating the same letter (same recipient, kind, thread, body and time) returns the same id and writes it once. Usage charge: none.
3300
+ */
3301
+ export const createOrganizationNotificationLetter = (options) => (options.client ?? client).post({
3302
+ security: [{
3303
+ key: 'BearerAuth',
3304
+ scheme: 'bearer',
3305
+ type: 'http'
3306
+ }, {
3307
+ key: 'ApiKeyAuth',
3308
+ name: 'X-API-Key',
3309
+ type: 'apiKey'
3310
+ }],
3311
+ url: '/organization/v1/notifications/letters',
3312
+ ...options,
3313
+ headers: {
3314
+ 'Content-Type': 'application/json',
3315
+ ...options.headers
3316
+ }
3317
+ });
3278
3318
  /**
3279
3319
  * Open one of your letters by its id
3280
3320
  *
@@ -3351,6 +3391,100 @@ export const archiveOrganizationNotificationLetter = (options) => (options.clien
3351
3391
  url: '/organization/v1/notifications/letters/{id}:archive',
3352
3392
  ...options
3353
3393
  });
3394
+ /**
3395
+ * List your bell messages
3396
+ *
3397
+ * The calling person's bell messages in this organization, newest first: the inbox tab by default, or the archive tab with archived=1. The person is always the credential's own; the request cannot name another member. Pass nextPageToken unchanged as page for the next page; it is absent on the last one. Read-only; no usage charge.
3398
+ */
3399
+ export const listOrganizationNotificationMessages = (options) => (options?.client ?? client).get({
3400
+ security: [{
3401
+ key: 'BearerAuth',
3402
+ scheme: 'bearer',
3403
+ type: 'http'
3404
+ }, {
3405
+ key: 'ApiKeyAuth',
3406
+ name: 'X-API-Key',
3407
+ type: 'apiKey'
3408
+ }],
3409
+ url: '/organization/v1/notifications/messages',
3410
+ ...options
3411
+ });
3412
+ /**
3413
+ * Delete one of your bell messages
3414
+ *
3415
+ * Delete one of the calling person's own bell messages for good. A message that is not theirs — another person's, another organization's — answers 404 exactly as one that does not exist, and nothing is deleted. Deleting a message does not delete the letter or notice it announced. No usage charge.
3416
+ */
3417
+ export const deleteOrganizationNotificationMessage = (options) => (options.client ?? client).delete({
3418
+ security: [{
3419
+ key: 'BearerAuth',
3420
+ scheme: 'bearer',
3421
+ type: 'http'
3422
+ }, {
3423
+ key: 'ApiKeyAuth',
3424
+ name: 'X-API-Key',
3425
+ type: 'apiKey'
3426
+ }],
3427
+ url: '/organization/v1/notifications/messages/{name}',
3428
+ ...options
3429
+ });
3430
+ /**
3431
+ * Open one of your bell messages
3432
+ *
3433
+ * One bell message of the calling person by its name. A message that is not theirs — another person's, another organization's — answers 404 exactly as one that does not exist, without saying which. Read-only; no usage charge.
3434
+ */
3435
+ export const getOrganizationNotificationMessage = (options) => (options.client ?? client).get({
3436
+ security: [{
3437
+ key: 'BearerAuth',
3438
+ scheme: 'bearer',
3439
+ type: 'http'
3440
+ }, {
3441
+ key: 'ApiKeyAuth',
3442
+ name: 'X-API-Key',
3443
+ type: 'apiKey'
3444
+ }],
3445
+ url: '/organization/v1/notifications/messages/{name}',
3446
+ ...options
3447
+ });
3448
+ /**
3449
+ * Mark one of your bell messages read or archived
3450
+ *
3451
+ * Change the read or archived flag of one of the calling person's own bell messages and return it. Name at least one flag. Reading a message also tells the notification still waiting on it, so it is not emailed later as unread. A message that is not theirs answers 404 like one that does not exist. No usage charge.
3452
+ */
3453
+ export const updateOrganizationNotificationMessage = (options) => (options.client ?? client).post({
3454
+ security: [{
3455
+ key: 'BearerAuth',
3456
+ scheme: 'bearer',
3457
+ type: 'http'
3458
+ }, {
3459
+ key: 'ApiKeyAuth',
3460
+ name: 'X-API-Key',
3461
+ type: 'apiKey'
3462
+ }],
3463
+ url: '/organization/v1/notifications/messages/{name}',
3464
+ ...options,
3465
+ headers: {
3466
+ 'Content-Type': 'application/json',
3467
+ ...options.headers
3468
+ }
3469
+ });
3470
+ /**
3471
+ * Mark all your unread bell messages read
3472
+ *
3473
+ * Mark every unread, unarchived bell message of the calling person in this organization as read, and tell the notifications still waiting on them. Nothing of anyone else's is touched. Returns how many messages changed; 0 when there was nothing unread. No usage charge.
3474
+ */
3475
+ export const readAllOrganizationNotificationMessages = (options) => (options?.client ?? client).post({
3476
+ security: [{
3477
+ key: 'BearerAuth',
3478
+ scheme: 'bearer',
3479
+ type: 'http'
3480
+ }, {
3481
+ key: 'ApiKeyAuth',
3482
+ name: 'X-API-Key',
3483
+ type: 'apiKey'
3484
+ }],
3485
+ url: '/organization/v1/notifications/messages:readAll',
3486
+ ...options
3487
+ });
3354
3488
  /**
3355
3489
  * Your notification switches, and what they resolve to
3356
3490
  *
@@ -3917,6 +4051,24 @@ export const getByodPairing = (options) => (options.client ?? client).get({
3917
4051
  url: '/sandbox/v1/byod/pairings/{code}',
3918
4052
  ...options
3919
4053
  });
4054
+ /**
4055
+ * Read which device claimed your pairing
4056
+ *
4057
+ * Read one of your organization's own pairings: its code, its deadline and the device that claimed it. Poll it after showing the QR payload to learn that this very code was claimed, instead of guessing from the device list: claimed_device is null until a phone taps Allow, then it is the device that code registered (a phone that was paired before is reused, so it is the same device id). Unlike getByodPairing this call is authenticated and organization-scoped. An unknown code and another organization's code both answer 404, so the answer never reveals that a foreign pairing exists. Example: GET /sandbox/v1/byod/pairings/K7M4PQRS/status returns {code:'K7M4PQRS',expires_at:'2026-11-22T13:10:00.000Z',claimed_device:null}.
4058
+ */
4059
+ export const getByodPairingStatus = (options) => (options.client ?? client).get({
4060
+ security: [{
4061
+ key: 'BearerAuth',
4062
+ scheme: 'bearer',
4063
+ type: 'http'
4064
+ }, {
4065
+ key: 'ApiKeyAuth',
4066
+ name: 'X-API-Key',
4067
+ type: 'apiKey'
4068
+ }],
4069
+ url: '/sandbox/v1/byod/pairings/{code}/status',
4070
+ ...options
4071
+ });
3920
4072
  /**
3921
4073
  * Claim a pairing and register the phone
3922
4074
  *
@@ -5160,7 +5312,7 @@ export const sessionsRetrieve = (options) => (options.client ?? client).get({
5160
5312
  /**
5161
5313
  * Update session
5162
5314
  *
5163
- * Update a session's title, metadata, model or thinking selection. metadata follows patch semantics: a string value sets the key, null deletes it, a null metadata clears all keys, untouched keys stay. model must be allowed by the session's agent version; thinking is {effort} or null (null restores inheritance); a model-only change clears a session thinking that the new model does not support, and combined changes are validated against the new model, with the previous selection kept on a 400. Changes apply from the next turn, not to a turn already running. Agent overrides are not supported (400 naming the field). Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. A budget limit must exceed consumed cost; null removes it permanently for this session. Updating an archived session returns 409.
5315
+ * Update a session's title, metadata, model or thinking selection. metadata follows patch semantics: a string value sets the key, null deletes it, a null metadata clears all keys, untouched keys stay. model must be allowed by the session's agent version; thinking is {effort} or null (null restores inheritance); a model-only change clears a session thinking that the new model does not support, and combined changes are validated against the new model, with the previous selection kept on a 400. Changes apply from the next turn, not to a turn already running. Agent overrides are not supported (400 naming the field). Supports vault_ids, up to 50, owned by the current organization and not archived; secrets reach the session's machine as environment variables and are matched against its MCP servers. A budget limit must exceed consumed cost; null removes it permanently for this session. Updating an archived session returns 409.
5164
5316
  */
5165
5317
  export const sessionsUpdate = (options) => (options.client ?? client).post({
5166
5318
  security: [{
@@ -5316,7 +5468,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
5316
5468
  /**
5317
5469
  * Create session
5318
5470
  *
5319
- * Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (node22 for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. The retired "light" returns 400 naming the two forms that work: "node22", or null for no machine. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
5471
+ * Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (node22 for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. The retired "light" returns 400 naming the two forms that work: "node22", or null for no machine. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. vault_ids (at most 50, owned by the organization, not archived) adds vaults to the agent's own vault_ids, the ones its department or organization rule grants attach, and the session carries both sets from creation; sessions.update replaces the session's own set later. The secrets of those vaults reach the session's machine as environment variables named after the secret, in every command it runs, and are matched against its MCP servers; a service agent's session skips OAuth credentials and secrets that declare allowed_hosts, and names the platform login owns are never taken. allowed_hosts does not limit what a command does with an exported value. A session with no machine has no environment. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
5320
5472
  */
5321
5473
  export const sessionsCreate = (options) => (options.client ?? client).post({
5322
5474
  security: [{
@@ -5696,7 +5848,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
5696
5848
  /**
5697
5849
  * Create deployment
5698
5850
  *
5699
- * Freeze session parameters as a deployment; this operation does not open a session. An agent reference with only an id follows the agent's active version: each run uses the version in effect at that moment, so a later agent save reaches the next run with no edit here. Name a version to pin it; only a version that is applied can be pinned, so a save made with apply false is refused with 409 AGENT_VERSION_NOT_APPLIED. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. environment_id and target are alternatives: send at least one of them; target:{type:"computer"} is for general agents and needs no environment_id, while target:{type:"environment"} still requires one. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {"agent":"agent_123","name":"weekly report","initial_events":[{"type":"user.message","content":[{"type":"text","text":"Write the weekly report."}]}],"target":{"type":"computer"},"schedule":{"type":"cron","expression":"0 9 * * 1","timezone":"America/Los_Angeles"}}.
5851
+ * Freeze session parameters as a deployment; this operation does not open a session. An agent reference with only an id follows the agent's active version: each run uses the version in effect at that moment, so a later agent save reaches the next run with no edit here. Name a version to pin it; only a version that is applied can be pinned, so a save made with apply false is refused with 409 AGENT_VERSION_NOT_APPLIED. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. environment_id and target are alternatives: send at least one of them; target:{type:"computer"} is for general agents and needs no environment_id, while target:{type:"environment"} still requires one. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; secrets reach the session's machine as environment variables and are matched against its MCP servers. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400. Example, a weekly cron deployment on the agent's computer: {"agent":"agent_123","name":"weekly report","initial_events":[{"type":"user.message","content":[{"type":"text","text":"Write the weekly report."}]}],"target":{"type":"computer"},"schedule":{"type":"cron","expression":"0 9 * * 1","timezone":"America/Los_Angeles"}}.
5700
5852
  */
5701
5853
  export const deploymentsCreate = (options) => (options.client ?? client).post({
5702
5854
  security: [{
@@ -6481,7 +6633,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
6481
6633
  name: 'X-API-Key',
6482
6634
  type: 'apiKey'
6483
6635
  }],
6484
- url: '/automation/v1/actions/{ns}/{name}',
6636
+ url: '/automation/v1/actions/{namespace}/{name}',
6485
6637
  ...options
6486
6638
  });
6487
6639
  /**
@@ -6499,7 +6651,7 @@ export const automationActionsUpdate = (options) => (options.client ?? client).p
6499
6651
  name: 'X-API-Key',
6500
6652
  type: 'apiKey'
6501
6653
  }],
6502
- url: '/automation/v1/actions/{ns}/{name}',
6654
+ url: '/automation/v1/actions/{namespace}/{name}',
6503
6655
  ...options,
6504
6656
  headers: {
6505
6657
  'Content-Type': 'application/json',
@@ -6521,7 +6673,7 @@ export const automationActionsRevisions = (options) => (options.client ?? client
6521
6673
  name: 'X-API-Key',
6522
6674
  type: 'apiKey'
6523
6675
  }],
6524
- url: '/automation/v1/actions/{ns}/{name}/revisions',
6676
+ url: '/automation/v1/actions/{namespace}/{name}/revisions',
6525
6677
  ...options
6526
6678
  });
6527
6679
  /**
@@ -6539,7 +6691,7 @@ export const automationActionsRevision = (options) => (options.client ?? client)
6539
6691
  name: 'X-API-Key',
6540
6692
  type: 'apiKey'
6541
6693
  }],
6542
- url: '/automation/v1/actions/{ns}/{name}/revisions/{revision}',
6694
+ url: '/automation/v1/actions/{namespace}/{name}/revisions/{revision}',
6543
6695
  ...options
6544
6696
  });
6545
6697
  /**
@@ -6557,7 +6709,7 @@ export const automationActionsRollback = (options) => (options.client ?? client)
6557
6709
  name: 'X-API-Key',
6558
6710
  type: 'apiKey'
6559
6711
  }],
6560
- url: '/automation/v1/actions/{ns}/{name}/rollback',
6712
+ url: '/automation/v1/actions/{namespace}/{name}/rollback',
6561
6713
  ...options,
6562
6714
  headers: {
6563
6715
  'Content-Type': 'application/json',
@@ -6580,7 +6732,7 @@ export const automationActionsInvocations = (options) => (options.client ?? clie
6580
6732
  name: 'X-API-Key',
6581
6733
  type: 'apiKey'
6582
6734
  }],
6583
- url: '/automation/v1/actions/{ns}/{name}/invocations',
6735
+ url: '/automation/v1/actions/{namespace}/{name}/invocations',
6584
6736
  ...options
6585
6737
  });
6586
6738
  /**
@@ -6598,7 +6750,7 @@ export const automationActionsDependents = (options) => (options.client ?? clien
6598
6750
  name: 'X-API-Key',
6599
6751
  type: 'apiKey'
6600
6752
  }],
6601
- url: '/automation/v1/actions/{ns}/{name}/dependents',
6753
+ url: '/automation/v1/actions/{namespace}/{name}/dependents',
6602
6754
  ...options
6603
6755
  });
6604
6756
  /**
@@ -6616,7 +6768,7 @@ export const automationActionsArchive = (options) => (options.client ?? client).
6616
6768
  name: 'X-API-Key',
6617
6769
  type: 'apiKey'
6618
6770
  }],
6619
- url: '/automation/v1/actions/{ns}/{name}/archive',
6771
+ url: '/automation/v1/actions/{namespace}/{name}/archive',
6620
6772
  ...options,
6621
6773
  headers: {
6622
6774
  'Content-Type': 'application/json',
@@ -6638,7 +6790,7 @@ export const automationActionsRestore = (options) => (options.client ?? client).
6638
6790
  name: 'X-API-Key',
6639
6791
  type: 'apiKey'
6640
6792
  }],
6641
- url: '/automation/v1/actions/{ns}/{name}/restore',
6793
+ url: '/automation/v1/actions/{namespace}/{name}/restore',
6642
6794
  ...options,
6643
6795
  headers: {
6644
6796
  'Content-Type': 'application/json',
@@ -6667,7 +6819,7 @@ export const automationScriptsList = (options) => (options?.client ?? client).ge
6667
6819
  /**
6668
6820
  * Create a script
6669
6821
  *
6670
- * Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. The return value is limited to 1 MiB: write large results to a file with call("write-file", ...) and return the file ID. A call error carries errors[] (pointer, detail, hint); String(e) is only the summary. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.
6822
+ * Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. The return value is limited to 1 MiB: write large results to a file with call("write-file", ...) and return the file ID. A call error carries errors[] (pointer, detail, hint); String(e) is only the summary. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, send the returned draft.revision as draft.revision of the publish request.
6671
6823
  */
6672
6824
  export const automationScriptsCreate = (options) => (options.client ?? client).post({
6673
6825
  security: [{
@@ -6689,7 +6841,7 @@ export const automationScriptsCreate = (options) => (options.client ?? client).p
6689
6841
  /**
6690
6842
  * Get a script
6691
6843
  *
6692
- * Read script details and draft source. The ETag is the draft revision to use in If-Match for updates.
6844
+ * Read script details and draft source. The draft revision is draft.revision (also the ETag); send it back as draft.revision when updating.
6693
6845
  */
6694
6846
  export const automationScriptsGet = (options) => (options.client ?? client).get({
6695
6847
  security: [{
@@ -6701,13 +6853,13 @@ export const automationScriptsGet = (options) => (options.client ?? client).get(
6701
6853
  name: 'X-API-Key',
6702
6854
  type: 'apiKey'
6703
6855
  }],
6704
- url: '/automation/v1/scripts/{ns}/{name}',
6856
+ url: '/automation/v1/scripts/{namespace}/{name}',
6705
6857
  ...options
6706
6858
  });
6707
6859
  /**
6708
6860
  * Update a script draft
6709
6861
  *
6710
- * Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist.
6862
+ * Update description, labels or draft with the current draft revision in the body as draft.revision (the If-Match header is a deprecated alias); draft may be the object a read returns, and a bare string still means { source }. Even metadata-only updates create a new draft revision. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist.
6711
6863
  */
6712
6864
  export const automationScriptsPatch = (options) => (options.client ?? client).patch({
6713
6865
  security: [{
@@ -6719,7 +6871,7 @@ export const automationScriptsPatch = (options) => (options.client ?? client).pa
6719
6871
  name: 'X-API-Key',
6720
6872
  type: 'apiKey'
6721
6873
  }],
6722
- url: '/automation/v1/scripts/{ns}/{name}',
6874
+ url: '/automation/v1/scripts/{namespace}/{name}',
6723
6875
  ...options,
6724
6876
  headers: {
6725
6877
  'Content-Type': 'application/json',
@@ -6741,7 +6893,7 @@ export const automationScriptsArchive = (options) => (options.client ?? client).
6741
6893
  name: 'X-API-Key',
6742
6894
  type: 'apiKey'
6743
6895
  }],
6744
- url: '/automation/v1/scripts/{ns}/{name}/archive',
6896
+ url: '/automation/v1/scripts/{namespace}/{name}/archive',
6745
6897
  ...options,
6746
6898
  headers: {
6747
6899
  'Content-Type': 'application/json',
@@ -6763,7 +6915,7 @@ export const automationScriptsRestore = (options) => (options.client ?? client).
6763
6915
  name: 'X-API-Key',
6764
6916
  type: 'apiKey'
6765
6917
  }],
6766
- url: '/automation/v1/scripts/{ns}/{name}/restore',
6918
+ url: '/automation/v1/scripts/{namespace}/{name}/restore',
6767
6919
  ...options,
6768
6920
  headers: {
6769
6921
  'Content-Type': 'application/json',
@@ -6785,13 +6937,13 @@ export const automationScriptsVersions = (options) => (options.client ?? client)
6785
6937
  name: 'X-API-Key',
6786
6938
  type: 'apiKey'
6787
6939
  }],
6788
- url: '/automation/v1/scripts/{ns}/{name}/versions',
6940
+ url: '/automation/v1/scripts/{namespace}/{name}/versions',
6789
6941
  ...options
6790
6942
  });
6791
6943
  /**
6792
6944
  * Publish a script version
6793
6945
  *
6794
- * Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. Publishing removes +build metadata from the version number.
6946
+ * Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Send draft.revision from create or retrieve as draft.revision in the body (expected_draft_revision is a deprecated alias). The draft must match it; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. Publishing removes +build metadata from the version number.
6795
6947
  */
6796
6948
  export const automationScriptsPublish = (options) => (options.client ?? client).post({
6797
6949
  security: [{
@@ -6803,7 +6955,7 @@ export const automationScriptsPublish = (options) => (options.client ?? client).
6803
6955
  name: 'X-API-Key',
6804
6956
  type: 'apiKey'
6805
6957
  }],
6806
- url: '/automation/v1/scripts/{ns}/{name}/versions',
6958
+ url: '/automation/v1/scripts/{namespace}/{name}/versions',
6807
6959
  ...options,
6808
6960
  headers: {
6809
6961
  'Content-Type': 'application/json',
@@ -6825,7 +6977,7 @@ export const automationScriptsVersion = (options) => (options.client ?? client).
6825
6977
  name: 'X-API-Key',
6826
6978
  type: 'apiKey'
6827
6979
  }],
6828
- url: '/automation/v1/scripts/{ns}/{name}/versions/{version}',
6980
+ url: '/automation/v1/scripts/{namespace}/{name}/versions/{version}',
6829
6981
  ...options
6830
6982
  });
6831
6983
  /**
@@ -6843,7 +6995,7 @@ export const automationScriptsDeprecate = (options) => (options.client ?? client
6843
6995
  name: 'X-API-Key',
6844
6996
  type: 'apiKey'
6845
6997
  }],
6846
- url: '/automation/v1/scripts/{ns}/{name}/versions/{version}/deprecate',
6998
+ url: '/automation/v1/scripts/{namespace}/{name}/versions/{version}/deprecate',
6847
6999
  ...options,
6848
7000
  headers: {
6849
7001
  'Content-Type': 'application/json',
@@ -6865,7 +7017,7 @@ export const automationScriptsDistTags = (options) => (options.client ?? client)
6865
7017
  name: 'X-API-Key',
6866
7018
  type: 'apiKey'
6867
7019
  }],
6868
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags',
7020
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags',
6869
7021
  ...options
6870
7022
  });
6871
7023
  /**
@@ -6883,7 +7035,7 @@ export const automationScriptsDeleteDistTag = (options) => (options.client ?? cl
6883
7035
  name: 'X-API-Key',
6884
7036
  type: 'apiKey'
6885
7037
  }],
6886
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}',
7038
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags/{tag}',
6887
7039
  ...options
6888
7040
  });
6889
7041
  /**
@@ -6901,7 +7053,7 @@ export const automationScriptsSetDistTag = (options) => (options.client ?? clien
6901
7053
  name: 'X-API-Key',
6902
7054
  type: 'apiKey'
6903
7055
  }],
6904
- url: '/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}',
7056
+ url: '/automation/v1/scripts/{namespace}/{name}/dist-tags/{tag}',
6905
7057
  ...options,
6906
7058
  headers: {
6907
7059
  'Content-Type': 'application/json',
@@ -6952,7 +7104,7 @@ export const automationWorkflowsCreate = (options) => (options.client ?? client)
6952
7104
  /**
6953
7105
  * Get a workflow
6954
7106
  *
6955
- * Read workflow details and draft source. The ETag is the draft revision to use in If-Match for updates.
7107
+ * Read workflow details and draft source. The draft revision is draft.revision (also the ETag); send it back as draft.revision when updating.
6956
7108
  */
6957
7109
  export const automationWorkflowsGet = (options) => (options.client ?? client).get({
6958
7110
  security: [{
@@ -6964,13 +7116,13 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
6964
7116
  name: 'X-API-Key',
6965
7117
  type: 'apiKey'
6966
7118
  }],
6967
- url: '/automation/v1/workflows/{ns}/{name}',
7119
+ url: '/automation/v1/workflows/{namespace}/{name}',
6968
7120
  ...options
6969
7121
  });
6970
7122
  /**
6971
7123
  * Update a workflow draft
6972
7124
  *
6973
- * Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
7125
+ * Update description, labels or draft with the current draft revision in the body as draft.revision, taken from the get-workflow response (the If-Match header is a deprecated alias); draft may be the object a read returns, and a bare string still means { source }. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://docs.deepraxis.com/developers/automation/reference/workflow-syntax.
6974
7126
  */
6975
7127
  export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
6976
7128
  security: [{
@@ -6982,7 +7134,7 @@ export const automationWorkflowsPatch = (options) => (options.client ?? client).
6982
7134
  name: 'X-API-Key',
6983
7135
  type: 'apiKey'
6984
7136
  }],
6985
- url: '/automation/v1/workflows/{ns}/{name}',
7137
+ url: '/automation/v1/workflows/{namespace}/{name}',
6986
7138
  ...options,
6987
7139
  headers: {
6988
7140
  'Content-Type': 'application/json',
@@ -7004,7 +7156,7 @@ export const automationWorkflowsArchive = (options) => (options.client ?? client
7004
7156
  name: 'X-API-Key',
7005
7157
  type: 'apiKey'
7006
7158
  }],
7007
- url: '/automation/v1/workflows/{ns}/{name}/archive',
7159
+ url: '/automation/v1/workflows/{namespace}/{name}/archive',
7008
7160
  ...options,
7009
7161
  headers: {
7010
7162
  'Content-Type': 'application/json',
@@ -7026,7 +7178,7 @@ export const automationWorkflowsRestore = (options) => (options.client ?? client
7026
7178
  name: 'X-API-Key',
7027
7179
  type: 'apiKey'
7028
7180
  }],
7029
- url: '/automation/v1/workflows/{ns}/{name}/restore',
7181
+ url: '/automation/v1/workflows/{namespace}/{name}/restore',
7030
7182
  ...options,
7031
7183
  headers: {
7032
7184
  'Content-Type': 'application/json',
@@ -7048,13 +7200,13 @@ export const automationWorkflowsVersions = (options) => (options.client ?? clien
7048
7200
  name: 'X-API-Key',
7049
7201
  type: 'apiKey'
7050
7202
  }],
7051
- url: '/automation/v1/workflows/{ns}/{name}/versions',
7203
+ url: '/automation/v1/workflows/{namespace}/{name}/versions',
7052
7204
  ...options
7053
7205
  });
7054
7206
  /**
7055
7207
  * Publish a workflow version
7056
7208
  *
7057
- * Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number. For a workflow, document namespace, name and version must equal the publish target, otherwise DEFINITION_IDENTITY_MISMATCH; where a DEFINITION_INVALID failure sits is listed in errors[] (pointer, detail, hint).
7209
+ * Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Send draft.revision from create or retrieve as draft.revision in the body (expected_draft_revision is a deprecated alias). The draft must match it; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number. For a workflow, document namespace, name and version must equal the publish target, otherwise DEFINITION_IDENTITY_MISMATCH; where a DEFINITION_INVALID failure sits is listed in errors[] (pointer, detail, hint).
7058
7210
  */
7059
7211
  export const automationWorkflowsPublish = (options) => (options.client ?? client).post({
7060
7212
  security: [{
@@ -7066,7 +7218,7 @@ export const automationWorkflowsPublish = (options) => (options.client ?? client
7066
7218
  name: 'X-API-Key',
7067
7219
  type: 'apiKey'
7068
7220
  }],
7069
- url: '/automation/v1/workflows/{ns}/{name}/versions',
7221
+ url: '/automation/v1/workflows/{namespace}/{name}/versions',
7070
7222
  ...options,
7071
7223
  headers: {
7072
7224
  'Content-Type': 'application/json',
@@ -7088,7 +7240,7 @@ export const automationWorkflowsVersion = (options) => (options.client ?? client
7088
7240
  name: 'X-API-Key',
7089
7241
  type: 'apiKey'
7090
7242
  }],
7091
- url: '/automation/v1/workflows/{ns}/{name}/versions/{version}',
7243
+ url: '/automation/v1/workflows/{namespace}/{name}/versions/{version}',
7092
7244
  ...options
7093
7245
  });
7094
7246
  /**
@@ -7106,7 +7258,7 @@ export const automationWorkflowsDeprecate = (options) => (options.client ?? clie
7106
7258
  name: 'X-API-Key',
7107
7259
  type: 'apiKey'
7108
7260
  }],
7109
- url: '/automation/v1/workflows/{ns}/{name}/versions/{version}/deprecate',
7261
+ url: '/automation/v1/workflows/{namespace}/{name}/versions/{version}/deprecate',
7110
7262
  ...options,
7111
7263
  headers: {
7112
7264
  'Content-Type': 'application/json',
@@ -7128,7 +7280,7 @@ export const automationWorkflowsDistTags = (options) => (options.client ?? clien
7128
7280
  name: 'X-API-Key',
7129
7281
  type: 'apiKey'
7130
7282
  }],
7131
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags',
7283
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags',
7132
7284
  ...options
7133
7285
  });
7134
7286
  /**
@@ -7146,7 +7298,7 @@ export const automationWorkflowsDeleteDistTag = (options) => (options.client ??
7146
7298
  name: 'X-API-Key',
7147
7299
  type: 'apiKey'
7148
7300
  }],
7149
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}',
7301
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags/{tag}',
7150
7302
  ...options
7151
7303
  });
7152
7304
  /**
@@ -7164,7 +7316,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
7164
7316
  name: 'X-API-Key',
7165
7317
  type: 'apiKey'
7166
7318
  }],
7167
- url: '/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}',
7319
+ url: '/automation/v1/workflows/{namespace}/{name}/dist-tags/{tag}',
7168
7320
  ...options,
7169
7321
  headers: {
7170
7322
  'Content-Type': 'application/json',
@@ -7297,7 +7449,7 @@ export const automationRunsGet = (options) => (options.client ?? client).get({
7297
7449
  name: 'X-API-Key',
7298
7450
  type: 'apiKey'
7299
7451
  }],
7300
- url: '/automation/v1/runs/{id}',
7452
+ url: '/automation/v1/runs/{run_id}',
7301
7453
  ...options
7302
7454
  });
7303
7455
  /**
@@ -7315,7 +7467,7 @@ export const automationRunsCancel = (options) => (options.client ?? client).post
7315
7467
  name: 'X-API-Key',
7316
7468
  type: 'apiKey'
7317
7469
  }],
7318
- url: '/automation/v1/runs/{id}/cancel',
7470
+ url: '/automation/v1/runs/{run_id}/cancel',
7319
7471
  ...options,
7320
7472
  headers: {
7321
7473
  'Content-Type': 'application/json',
@@ -7337,7 +7489,7 @@ export const automationRunsRerun = (options) => (options.client ?? client).post(
7337
7489
  name: 'X-API-Key',
7338
7490
  type: 'apiKey'
7339
7491
  }],
7340
- url: '/automation/v1/runs/{id}/rerun',
7492
+ url: '/automation/v1/runs/{run_id}/rerun',
7341
7493
  ...options,
7342
7494
  headers: {
7343
7495
  'Content-Type': 'application/json',
@@ -7359,7 +7511,7 @@ export const automationRunsSuspend = (options) => (options.client ?? client).pos
7359
7511
  name: 'X-API-Key',
7360
7512
  type: 'apiKey'
7361
7513
  }],
7362
- url: '/automation/v1/runs/{id}/suspend',
7514
+ url: '/automation/v1/runs/{run_id}/suspend',
7363
7515
  ...options,
7364
7516
  headers: {
7365
7517
  'Content-Type': 'application/json',
@@ -7381,7 +7533,7 @@ export const automationRunsResume = (options) => (options.client ?? client).post
7381
7533
  name: 'X-API-Key',
7382
7534
  type: 'apiKey'
7383
7535
  }],
7384
- url: '/automation/v1/runs/{id}/resume',
7536
+ url: '/automation/v1/runs/{run_id}/resume',
7385
7537
  ...options,
7386
7538
  headers: {
7387
7539
  'Content-Type': 'application/json',
@@ -7403,7 +7555,7 @@ export const automationRunsWaits = (options) => (options.client ?? client).get({
7403
7555
  name: 'X-API-Key',
7404
7556
  type: 'apiKey'
7405
7557
  }],
7406
- url: '/automation/v1/runs/{id}/waits',
7558
+ url: '/automation/v1/runs/{run_id}/waits',
7407
7559
  ...options
7408
7560
  });
7409
7561
  /**
@@ -7421,7 +7573,7 @@ export const automationRunsCalls = (options) => (options.client ?? client).get({
7421
7573
  name: 'X-API-Key',
7422
7574
  type: 'apiKey'
7423
7575
  }],
7424
- url: '/automation/v1/runs/{id}/calls',
7576
+ url: '/automation/v1/runs/{run_id}/calls',
7425
7577
  ...options
7426
7578
  });
7427
7579
  /**
@@ -7439,7 +7591,7 @@ export const automationRunsArtifacts = (options) => (options.client ?? client).g
7439
7591
  name: 'X-API-Key',
7440
7592
  type: 'apiKey'
7441
7593
  }],
7442
- url: '/automation/v1/runs/{id}/artifacts',
7594
+ url: '/automation/v1/runs/{run_id}/artifacts',
7443
7595
  ...options
7444
7596
  });
7445
7597
  /**
@@ -7457,7 +7609,7 @@ export const automationRunsCompleteWait = (options) => (options.client ?? client
7457
7609
  name: 'X-API-Key',
7458
7610
  type: 'apiKey'
7459
7611
  }],
7460
- url: '/automation/v1/runs/{id}/waits/{wait_id}/complete',
7612
+ url: '/automation/v1/runs/{run_id}/waits/{wait_id}/complete',
7461
7613
  ...options,
7462
7614
  headers: {
7463
7615
  'Content-Type': 'application/json',
@@ -7479,7 +7631,7 @@ export const automationRunsTasks = (options) => (options.client ?? client).get({
7479
7631
  name: 'X-API-Key',
7480
7632
  type: 'apiKey'
7481
7633
  }],
7482
- url: '/automation/v1/runs/{id}/tasks',
7634
+ url: '/automation/v1/runs/{run_id}/tasks',
7483
7635
  ...options
7484
7636
  });
7485
7637
  /**
@@ -7497,7 +7649,7 @@ export const automationRunsEvents = (options) => (options.client ?? client).get(
7497
7649
  name: 'X-API-Key',
7498
7650
  type: 'apiKey'
7499
7651
  }],
7500
- url: '/automation/v1/runs/{id}/events',
7652
+ url: '/automation/v1/runs/{run_id}/events',
7501
7653
  ...options
7502
7654
  });
7503
7655
  /**
@@ -7515,7 +7667,7 @@ export const automationRunsLogs = (options) => (options.client ?? client).get({
7515
7667
  name: 'X-API-Key',
7516
7668
  type: 'apiKey'
7517
7669
  }],
7518
- url: '/automation/v1/runs/{id}/logs',
7670
+ url: '/automation/v1/runs/{run_id}/logs',
7519
7671
  ...options
7520
7672
  });
7521
7673
  /**
@@ -7533,7 +7685,7 @@ export const automationRunsSource = (options) => (options.client ?? client).get(
7533
7685
  name: 'X-API-Key',
7534
7686
  type: 'apiKey'
7535
7687
  }],
7536
- url: '/automation/v1/runs/{id}/source',
7688
+ url: '/automation/v1/runs/{run_id}/source',
7537
7689
  ...options
7538
7690
  });
7539
7691
  /**
@@ -7545,7 +7697,8 @@ export const automationTriggersList = (options) => (options?.client ?? client).g
7545
7697
  querySerializer: { parameters: {
7546
7698
  target: { array: { explode: false } },
7547
7699
  kind: { array: { explode: false } },
7548
- state: { array: { explode: false } }
7700
+ state: { array: { explode: false } },
7701
+ status: { array: { explode: false } }
7549
7702
  } },
7550
7703
  security: [{
7551
7704
  key: 'BearerAuth',
@@ -7596,7 +7749,7 @@ export const automationTriggersDelete = (options) => (options.client ?? client).
7596
7749
  name: 'X-API-Key',
7597
7750
  type: 'apiKey'
7598
7751
  }],
7599
- url: '/automation/v1/triggers/{id}',
7752
+ url: '/automation/v1/triggers/{trigger_id}',
7600
7753
  ...options
7601
7754
  });
7602
7755
  /**
@@ -7614,7 +7767,7 @@ export const automationTriggersGet = (options) => (options.client ?? client).get
7614
7767
  name: 'X-API-Key',
7615
7768
  type: 'apiKey'
7616
7769
  }],
7617
- url: '/automation/v1/triggers/{id}',
7770
+ url: '/automation/v1/triggers/{trigger_id}',
7618
7771
  ...options
7619
7772
  });
7620
7773
  /**
@@ -7632,7 +7785,7 @@ export const automationTriggersPatch = (options) => (options.client ?? client).p
7632
7785
  name: 'X-API-Key',
7633
7786
  type: 'apiKey'
7634
7787
  }],
7635
- url: '/automation/v1/triggers/{id}',
7788
+ url: '/automation/v1/triggers/{trigger_id}',
7636
7789
  ...options,
7637
7790
  headers: {
7638
7791
  'Content-Type': 'application/json',
@@ -7654,7 +7807,7 @@ export const automationTriggersPause = (options) => (options.client ?? client).p
7654
7807
  name: 'X-API-Key',
7655
7808
  type: 'apiKey'
7656
7809
  }],
7657
- url: '/automation/v1/triggers/{id}/pause',
7810
+ url: '/automation/v1/triggers/{trigger_id}/pause',
7658
7811
  ...options
7659
7812
  });
7660
7813
  /**
@@ -7672,7 +7825,7 @@ export const automationTriggersResume = (options) => (options.client ?? client).
7672
7825
  name: 'X-API-Key',
7673
7826
  type: 'apiKey'
7674
7827
  }],
7675
- url: '/automation/v1/triggers/{id}/resume',
7828
+ url: '/automation/v1/triggers/{trigger_id}/resume',
7676
7829
  ...options
7677
7830
  });
7678
7831
  /**
@@ -7690,7 +7843,7 @@ export const automationTriggersFire = (options) => (options.client ?? client).po
7690
7843
  name: 'X-API-Key',
7691
7844
  type: 'apiKey'
7692
7845
  }],
7693
- url: '/automation/v1/triggers/{id}/fire',
7846
+ url: '/automation/v1/triggers/{trigger_id}/fire',
7694
7847
  ...options
7695
7848
  });
7696
7849
  /**
@@ -7708,7 +7861,7 @@ export const automationTriggersRotateWebhook = (options) => (options.client ?? c
7708
7861
  name: 'X-API-Key',
7709
7862
  type: 'apiKey'
7710
7863
  }],
7711
- url: '/automation/v1/triggers/{id}/rotate-webhook',
7864
+ url: '/automation/v1/triggers/{trigger_id}/rotate-webhook',
7712
7865
  ...options
7713
7866
  });
7714
7867
  /**
@@ -7727,7 +7880,7 @@ export const automationTriggersFirings = (options) => (options.client ?? client)
7727
7880
  name: 'X-API-Key',
7728
7881
  type: 'apiKey'
7729
7882
  }],
7730
- url: '/automation/v1/triggers/{id}/firings',
7883
+ url: '/automation/v1/triggers/{trigger_id}/firings',
7731
7884
  ...options
7732
7885
  });
7733
7886
  /**
@@ -7755,7 +7908,7 @@ export const automationTriggersPreview = (options) => (options.client ?? client)
7755
7908
  /**
7756
7909
  * Receive a webhook
7757
7910
  *
7758
- * No API key is needed: the URL token authenticates requests. Invalid tokens, absent triggers, wrong kinds and inactive time windows return 404; a paused trigger (circuit breaker after 5 consecutive failures, or manual pause) returns 409 TRIGGER_PAUSED whose message gives the reason and whose hint gives the way back, POST /automation/v1/triggers/{id}/resume. Raw bodies are limited to 512 KiB; serialized run input, including raw and parsed copies, must fit within 1 MiB. Exceeding either limit returns 413 synchronously without recording a firing; webhook-id deduplicates for 24 hours. A 202 with outcome=accepted acknowledges receipt; the final outcome is updated later, and repeats return deduped. Invalid JSON yields body=null; other UTF-8 is text and non-UTF-8 is base64. The envelope contains body, raw_body, raw_body_encoding, allowlisted headers, webhook_id and received_at. raw_body preserves exact bytes with utf8 or base64 encoding for caller-side signature verification.
7911
+ * No API key is needed: the URL token authenticates requests. Invalid tokens, absent triggers, wrong kinds and inactive time windows return 404; a paused trigger (circuit breaker after 5 consecutive failures, or manual pause) returns 409 TRIGGER_PAUSED whose message gives the reason and whose hint gives the way back, POST /automation/v1/triggers/{trigger_id}/resume. Raw bodies are limited to 512 KiB; serialized run input, including raw and parsed copies, must fit within 1 MiB. Exceeding either limit returns 413 synchronously without recording a firing; webhook-id deduplicates for 24 hours. A 202 with outcome=accepted acknowledges receipt; the final outcome is updated later, and repeats return deduped. Invalid JSON yields body=null; other UTF-8 is text and non-UTF-8 is base64. The envelope contains body, raw_body, raw_body_encoding, allowlisted headers, webhook_id and received_at. raw_body preserves exact bytes with utf8 or base64 encoding for caller-side signature verification.
7759
7912
  */
7760
7913
  export const automationHooksReceive = (options) => (options.client ?? client).post({
7761
7914
  url: '/automation/v1/hooks/{trigger_id}/{token}',
@@ -7799,7 +7952,7 @@ export const automationHumanTasksGet = (options) => (options.client ?? client).g
7799
7952
  name: 'X-API-Key',
7800
7953
  type: 'apiKey'
7801
7954
  }],
7802
- url: '/automation/v1/human-tasks/{id}',
7955
+ url: '/automation/v1/human-tasks/{task_id}',
7803
7956
  ...options
7804
7957
  });
7805
7958
  /**
@@ -7817,7 +7970,7 @@ export const automationHumanTasksRespond = (options) => (options.client ?? clien
7817
7970
  name: 'X-API-Key',
7818
7971
  type: 'apiKey'
7819
7972
  }],
7820
- url: '/automation/v1/human-tasks/{id}/respond',
7973
+ url: '/automation/v1/human-tasks/{task_id}/respond',
7821
7974
  ...options,
7822
7975
  headers: {
7823
7976
  'Content-Type': 'application/json',
@@ -7839,7 +7992,7 @@ export const automationHumanTasksCancel = (options) => (options.client ?? client
7839
7992
  name: 'X-API-Key',
7840
7993
  type: 'apiKey'
7841
7994
  }],
7842
- url: '/automation/v1/human-tasks/{id}/cancel',
7995
+ url: '/automation/v1/human-tasks/{task_id}/cancel',
7843
7996
  ...options,
7844
7997
  headers: {
7845
7998
  'Content-Type': 'application/json',
@@ -7861,7 +8014,7 @@ export const automationHumanTasksDelegate = (options) => (options.client ?? clie
7861
8014
  name: 'X-API-Key',
7862
8015
  type: 'apiKey'
7863
8016
  }],
7864
- url: '/automation/v1/human-tasks/{id}/delegate',
8017
+ url: '/automation/v1/human-tasks/{task_id}/delegate',
7865
8018
  ...options,
7866
8019
  headers: {
7867
8020
  'Content-Type': 'application/json',
@@ -7883,7 +8036,7 @@ export const automationScriptsVaultsList = (options) => (options.client ?? clien
7883
8036
  name: 'X-API-Key',
7884
8037
  type: 'apiKey'
7885
8038
  }],
7886
- url: '/automation/v1/scripts/{ns}/{name}/vaults',
8039
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults',
7887
8040
  ...options
7888
8041
  });
7889
8042
  /**
@@ -7901,7 +8054,7 @@ export const automationScriptsVaultsDelete = (options) => (options.client ?? cli
7901
8054
  name: 'X-API-Key',
7902
8055
  type: 'apiKey'
7903
8056
  }],
7904
- url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
8057
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults/{alias}',
7905
8058
  ...options
7906
8059
  });
7907
8060
  /**
@@ -7919,7 +8072,7 @@ export const automationScriptsVaultsSet = (options) => (options.client ?? client
7919
8072
  name: 'X-API-Key',
7920
8073
  type: 'apiKey'
7921
8074
  }],
7922
- url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
8075
+ url: '/automation/v1/scripts/{namespace}/{name}/vaults/{alias}',
7923
8076
  ...options,
7924
8077
  headers: {
7925
8078
  'Content-Type': 'application/json',
@@ -7941,7 +8094,7 @@ export const automationWorkflowsVaultsList = (options) => (options.client ?? cli
7941
8094
  name: 'X-API-Key',
7942
8095
  type: 'apiKey'
7943
8096
  }],
7944
- url: '/automation/v1/workflows/{ns}/{name}/vaults',
8097
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults',
7945
8098
  ...options
7946
8099
  });
7947
8100
  /**
@@ -7959,7 +8112,7 @@ export const automationWorkflowsVaultsDelete = (options) => (options.client ?? c
7959
8112
  name: 'X-API-Key',
7960
8113
  type: 'apiKey'
7961
8114
  }],
7962
- url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
8115
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults/{alias}',
7963
8116
  ...options
7964
8117
  });
7965
8118
  /**
@@ -7977,7 +8130,7 @@ export const automationWorkflowsVaultsSet = (options) => (options.client ?? clie
7977
8130
  name: 'X-API-Key',
7978
8131
  type: 'apiKey'
7979
8132
  }],
7980
- url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
8133
+ url: '/automation/v1/workflows/{namespace}/{name}/vaults/{alias}',
7981
8134
  ...options,
7982
8135
  headers: {
7983
8136
  'Content-Type': 'application/json',
@@ -12592,7 +12745,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
12592
12745
  /**
12593
12746
  * Push a unit's branch
12594
12747
  *
12595
- * Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that git refuses inside the machine answers with the cause in the error message and in details.detail (the last 4000 characters of git's output, credentials redacted) and details.exitCode (git's exit code): 409 PUSH_REJECTED_BY_HOOK when a pre-push hook such as lefthook rejected it, so read the hook output, fix the content and push again, 409 PUSH_REJECTED_NON_FAST_FORWARD when the remote moved ahead, so fetch and reconcile, 409 HEAD_MOVED when the lease on expectedHead no longer holds, and 500 PUSH_FAILED for anything else. Do not retry the same push unchanged.
12748
+ * Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, naming the head it is at now in the message and in details.remoteHead. Read the starting value from the unit's git.remoteHead (fetch first when someone else may have pushed). For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that git refuses inside the machine answers with the cause in the error message and in details.detail (the last 4000 characters of git's output, credentials redacted) and details.exitCode (git's exit code): 409 PUSH_REJECTED_BY_HOOK when a pre-push hook such as lefthook rejected it, so read the hook output, fix the content and push again, 409 PUSH_REJECTED_NON_FAST_FORWARD when the remote moved ahead, so fetch and reconcile, 409 HEAD_MOVED when the lease on expectedHead no longer holds, and 500 PUSH_FAILED for anything else. Do not retry the same push unchanged.
12596
12749
  */
12597
12750
  export const devopsUnitsPush = (options) => (options.client ?? client).post({
12598
12751
  security: [{
@@ -12653,6 +12806,80 @@ export const devopsUnitsTransitionsList = (options) => (options.client ?? client
12653
12806
  url: '/devops/v1/units/{id}/transitions',
12654
12807
  ...options
12655
12808
  });
12809
+ /**
12810
+ * List event types
12811
+ *
12812
+ * Find which facts about your organization's resources you can subscribe to, and which filters each one allows, before you create a subscription. Each entry is one event type at one schema version: type is what you pass in subscriptions.create types, data_schema describes the event's data, and filterable lists the names a filter may use (subject, actor, and data.<field> for each top-level field of data_schema). Only tenant event types are listed; the list is generated from the platform's event declarations, so a new tenant event appears here without an API change. When a breaking change publishes a new schemaversion, both versions are listed side by side. The list is one page: next_cursor is always null today. Read-only. Errors: 503 PROVIDER_UNAVAILABLE (retryable) when the catalog cannot be read right now; wait and call again.
12813
+ */
12814
+ export const eventsListTypes = (options) => (options?.client ?? client).get({
12815
+ security: [{
12816
+ key: 'events-bearerAuth',
12817
+ scheme: 'bearer',
12818
+ type: 'http'
12819
+ }],
12820
+ url: '/events/v1/types',
12821
+ ...options
12822
+ });
12823
+ /**
12824
+ * List event subscriptions
12825
+ *
12826
+ * See which subscriptions you still have waiting, for example to avoid subscribing twice to the same run or to find an id to delete. Only subscriptions you created, in your organization, that have not expired are listed. The list is one page of at most limit entries: next_cursor is always null today. Read-only. Errors: 400 INVALID_PARAMS for an unknown query parameter or a limit outside 1 to 100.
12827
+ */
12828
+ export const eventsListSubscriptions = (options) => (options?.client ?? client).get({
12829
+ security: [{
12830
+ key: 'events-bearerAuth',
12831
+ scheme: 'bearer',
12832
+ type: 'http'
12833
+ }],
12834
+ url: '/events/v1/subscriptions',
12835
+ ...options
12836
+ });
12837
+ /**
12838
+ * Create event subscription
12839
+ *
12840
+ * Ask to be told, as an inbox letter, when something happens to a resource of your organization. Typical use: an agent that started an automation run subscribes to `automation.run.finished` with `filters: [{ exact: { subject: "runs/<run id>" } }]`, then ends its turn; when the run finishes, one letter of kind event arrives in the agent's inbox and wakes it. With codemode: `const run = await praxis.automation.runs.create({ ... }); await praxis.events.subscriptions.create({ types: ["automation.run.finished"], filters: [{ exact: { subject: `runs/${run.id}` } }] });` Name 1 to 10 types from events.types.list; filters must all hold, may be empty, and use exact or prefix on subject, actor or a data.<field> the type declares. once defaults to true: the first match writes one letter and the subscription ends. Set once false for a standing subscription, which delivers at most 30 letters an hour, counts the matches it holds back, and never delivers an event whose actor is its own sink. expires_at defaults to 7 days from now and may be at most 30 days; a subscription past it stops matching. The sink is the caller's own inbox; the organization comes from your credential and is not a field. The letter's summary is `<type> · <subject>` and its body is the event, with the type's sensitive fields removed. Errors: 400 UNSUPPORTED_FILTER_DIALECT for any filter form other than exact and prefix; 400 INVALID_PARAMS for a type that is not a tenant type, a filter field the type does not declare, a field not listed here (the organization is never a field), too many types or filters, or an expires_at beyond 30 days; 503 PROVIDER_UNAVAILABLE (retryable) when the catalog cannot be read, wait and call again.
12841
+ */
12842
+ export const eventsCreateSubscription = (options) => (options.client ?? client).post({
12843
+ security: [{
12844
+ key: 'events-bearerAuth',
12845
+ scheme: 'bearer',
12846
+ type: 'http'
12847
+ }],
12848
+ url: '/events/v1/subscriptions',
12849
+ ...options,
12850
+ headers: {
12851
+ 'Content-Type': 'application/json',
12852
+ ...options.headers
12853
+ }
12854
+ });
12855
+ /**
12856
+ * Delete event subscription
12857
+ *
12858
+ * Stop waiting for an event, for example when the run you were waiting for was canceled by you. The subscription stops matching at once and a letter already written stays in the inbox. A once subscription that has already fired is gone, so deleting it answers 404 SUBSCRIPTION_NOT_FOUND; treat that as done. Take the id from subscriptions.create or subscriptions.list.
12859
+ */
12860
+ export const eventsDeleteSubscription = (options) => (options.client ?? client).delete({
12861
+ security: [{
12862
+ key: 'events-bearerAuth',
12863
+ scheme: 'bearer',
12864
+ type: 'http'
12865
+ }],
12866
+ url: '/events/v1/subscriptions/{subscription_id}',
12867
+ ...options
12868
+ });
12869
+ /**
12870
+ * Retrieve event subscription
12871
+ *
12872
+ * Read one subscription to check its filters, its sink and when it expires. Take the id from subscriptions.create or subscriptions.list. A subscription that does not exist, has expired, belongs to someone else or to another organization answers the same 404 SUBSCRIPTION_NOT_FOUND. Read-only.
12873
+ */
12874
+ export const eventsRetrieveSubscription = (options) => (options.client ?? client).get({
12875
+ security: [{
12876
+ key: 'events-bearerAuth',
12877
+ scheme: 'bearer',
12878
+ type: 'http'
12879
+ }],
12880
+ url: '/events/v1/subscriptions/{subscription_id}',
12881
+ ...options
12882
+ });
12656
12883
  /**
12657
12884
  * List knowledge bases
12658
12885
  *
@@ -13757,6 +13984,98 @@ export const mediaDesignVoice = (options) => (options.client ?? client).post({
13757
13984
  ...options.headers
13758
13985
  }
13759
13986
  });
13987
+ /**
13988
+ * List works
13989
+ *
13990
+ * List the works of a library as summaries, most recently changed first: id, kind, title, series, cover_url, item_count, missing_count and updated_at. Filter with kind and series (for example all platform versions of one story), match the title with q, and continue with next_cursor.
13991
+ */
13992
+ export const mediaListWorks = (options) => (options.client ?? client).get({
13993
+ security: [{
13994
+ key: 'media-BearerAuth',
13995
+ scheme: 'bearer',
13996
+ type: 'http'
13997
+ }],
13998
+ url: '/media/v1/libraries/{library_id}/works',
13999
+ ...options
14000
+ });
14001
+ /**
14002
+ * Create work
14003
+ *
14004
+ * Create a work in a library: a gallery (图文), an article (长文), a product listing (商品图组) or a general work (blocks, 通用作品, Editor.js saved data whose image blocks name library assets in data.asset_id) that orders references to assets of this same library and adds a title and text. Upload or generate the pictures first, then send kind and body. In an article an inline image is written ![alt](asset:<asset_id>) where it should appear. Every asset the body names must be a live image or sticker of this library (a gallery item may also be a video), or the request is refused naming every bad reference and nothing is saved. Price, stock and other unknown fields are refused. Several platform versions of one story are several works with the same series. A work copies no file and changes no asset; creating one is free. Answers 201 with the work. Example: POST /media/v1/libraries/default/works with {"kind":"gallery","series":"ai-diary-01","body":{"title":"AI 创业第一天就踩坑","items":[{"asset_id":"<asset id>"}]}}.
14005
+ */
14006
+ export const mediaCreateWork = (options) => (options.client ?? client).post({
14007
+ security: [{
14008
+ key: 'media-BearerAuth',
14009
+ scheme: 'bearer',
14010
+ type: 'http'
14011
+ }],
14012
+ url: '/media/v1/libraries/{library_id}/works',
14013
+ ...options,
14014
+ headers: {
14015
+ 'Content-Type': 'application/json',
14016
+ ...options.headers
14017
+ }
14018
+ });
14019
+ /**
14020
+ * Delete work
14021
+ *
14022
+ * Delete a work. Only the work goes: every asset it named stays in the library unchanged.
14023
+ */
14024
+ export const mediaDeleteWork = (options) => (options.client ?? client).delete({
14025
+ security: [{
14026
+ key: 'media-BearerAuth',
14027
+ scheme: 'bearer',
14028
+ type: 'http'
14029
+ }],
14030
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14031
+ ...options
14032
+ });
14033
+ /**
14034
+ * Get work
14035
+ *
14036
+ * Read one work with its body, custom fields, revision and missing (asset ids deleted since; the body keeps them in place). Add expand=assets to receive every referenced asset’s type, short-lived url, thumbnail_url and size in the same answer, which is what a publish script needs to send the work out. Use work_id from creation or listing.
14037
+ */
14038
+ export const mediaGetWork = (options) => (options.client ?? client).get({
14039
+ security: [{
14040
+ key: 'media-BearerAuth',
14041
+ scheme: 'bearer',
14042
+ type: 'http'
14043
+ }],
14044
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14045
+ ...options
14046
+ });
14047
+ /**
14048
+ * Update work
14049
+ *
14050
+ * Change a work. body replaces the whole body and is checked like a new one; series replaces the series and null clears it; custom is a JSON Merge Patch (RFC 7396), so a script writing back its published link and numbers sends only its own keys and never erases keys another script wrote, and null removes a key. Send if_revision with the revision you read to apply the change only if nobody changed the work since; otherwise the answer is 409 REVISION_CONFLICT. Example: PATCH /media/v1/libraries/default/works/<work id> with {"custom":{"published_url":"https://…","stats":{"likes":120}}}.
14051
+ */
14052
+ export const mediaUpdateWork = (options) => (options.client ?? client).patch({
14053
+ security: [{
14054
+ key: 'media-BearerAuth',
14055
+ scheme: 'bearer',
14056
+ type: 'http'
14057
+ }],
14058
+ url: '/media/v1/libraries/{library_id}/works/{work_id}',
14059
+ ...options,
14060
+ headers: {
14061
+ 'Content-Type': 'application/json',
14062
+ ...options.headers
14063
+ }
14064
+ });
14065
+ /**
14066
+ * List works using an asset
14067
+ *
14068
+ * List the works whose body names one asset, as work summaries, most recently changed first. Check it before deleting an asset: the delete is never blocked, and those works would then show the asset as missing.
14069
+ */
14070
+ export const mediaListAssetWorks = (options) => (options.client ?? client).get({
14071
+ security: [{
14072
+ key: 'media-BearerAuth',
14073
+ scheme: 'bearer',
14074
+ type: 'http'
14075
+ }],
14076
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/works',
14077
+ ...options
14078
+ });
13760
14079
  /**
13761
14080
  * List types
13762
14081
  *
@@ -17069,7 +17388,7 @@ export const vaultListVaults = (options) => (options?.client ?? client).get({
17069
17388
  /**
17070
17389
  * Create vault
17071
17390
  *
17072
- * Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. Agent sessions and deployments accept up to 50 vault_ids and match their credentials against the session's MCP servers, so a stored static or oauth credential does serve as vault-backed MCP authentication; only environment_variable credentials are not yet placed, because the egress proxy ADR-058 §6 gives them is not built. Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.
17391
+ * Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. A session carries its agent's vaults (agent vault_ids, which a department or organization rule's grants also write) plus its own vault_ids, at most 50 together, and it matches their credentials against its MCP servers, so a stored static or oauth credential serves as vault-backed MCP authentication, and it exports their secrets to its machine as environment variables named after the secret, with real values (a service agent's session leaves out OAuth credentials and secrets that declare allowed_hosts; allowed_hosts does not limit what a command does with an exported value). Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.
17073
17392
  */
17074
17393
  export const vaultCreateVault = (options) => (options.client ?? client).post({
17075
17394
  security: [{