@deepraxis/sdk 0.2.0-dev.826472f → 0.2.0-dev.855f099
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/METHODS.md +34 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +97 -19
- package/dist/generated/sdk.gen.js +244 -18
- package/dist/generated/types.gen.d.ts +2274 -336
- package/dist/helpers/browser-actions.d.ts +2 -0
- package/dist/helpers/browser-actions.js +2 -0
- package/dist/helpers/browser-connect-error.d.ts +1 -1
- package/dist/helpers/browser-connect-error.js +1 -1
- package/dist/helpers/browser-connect.d.ts +10 -1
- package/dist/helpers/browser-connect.js +29 -6
- package/dist/helpers/browser-decisions.d.ts +2 -0
- package/dist/helpers/browser-decisions.js +7 -0
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +2 -1
- package/dist/operations.generated.js +530 -46
- package/dist/resources.generated.d.ts +97 -0
- package/dist/resources.generated.js +23 -0
- package/package.json +1 -1
|
@@ -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
|
|
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 {}
|
|
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
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
*
|
|
@@ -5160,7 +5294,7 @@ export const sessionsRetrieve = (options) => (options.client ?? client).get({
|
|
|
5160
5294
|
/**
|
|
5161
5295
|
* Update session
|
|
5162
5296
|
*
|
|
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;
|
|
5297
|
+
* 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
5298
|
*/
|
|
5165
5299
|
export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
5166
5300
|
security: [{
|
|
@@ -5316,7 +5450,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
5316
5450
|
/**
|
|
5317
5451
|
* Create session
|
|
5318
5452
|
*
|
|
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.
|
|
5453
|
+
* 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
5454
|
*/
|
|
5321
5455
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
5322
5456
|
security: [{
|
|
@@ -5696,7 +5830,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
5696
5830
|
/**
|
|
5697
5831
|
* Create deployment
|
|
5698
5832
|
*
|
|
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;
|
|
5833
|
+
* 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
5834
|
*/
|
|
5701
5835
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
5702
5836
|
security: [{
|
|
@@ -12592,7 +12726,7 @@ export const devopsUnitsFetch = (options) => (options.client ?? client).post({
|
|
|
12592
12726
|
/**
|
|
12593
12727
|
* Push a unit's branch
|
|
12594
12728
|
*
|
|
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,
|
|
12729
|
+
* 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
12730
|
*/
|
|
12597
12731
|
export const devopsUnitsPush = (options) => (options.client ?? client).post({
|
|
12598
12732
|
security: [{
|
|
@@ -13757,6 +13891,98 @@ export const mediaDesignVoice = (options) => (options.client ?? client).post({
|
|
|
13757
13891
|
...options.headers
|
|
13758
13892
|
}
|
|
13759
13893
|
});
|
|
13894
|
+
/**
|
|
13895
|
+
* List works
|
|
13896
|
+
*
|
|
13897
|
+
* 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.
|
|
13898
|
+
*/
|
|
13899
|
+
export const mediaListWorks = (options) => (options.client ?? client).get({
|
|
13900
|
+
security: [{
|
|
13901
|
+
key: 'media-BearerAuth',
|
|
13902
|
+
scheme: 'bearer',
|
|
13903
|
+
type: 'http'
|
|
13904
|
+
}],
|
|
13905
|
+
url: '/media/v1/libraries/{library_id}/works',
|
|
13906
|
+
...options
|
|
13907
|
+
});
|
|
13908
|
+
/**
|
|
13909
|
+
* Create work
|
|
13910
|
+
*
|
|
13911
|
+
* 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  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>"}]}}.
|
|
13912
|
+
*/
|
|
13913
|
+
export const mediaCreateWork = (options) => (options.client ?? client).post({
|
|
13914
|
+
security: [{
|
|
13915
|
+
key: 'media-BearerAuth',
|
|
13916
|
+
scheme: 'bearer',
|
|
13917
|
+
type: 'http'
|
|
13918
|
+
}],
|
|
13919
|
+
url: '/media/v1/libraries/{library_id}/works',
|
|
13920
|
+
...options,
|
|
13921
|
+
headers: {
|
|
13922
|
+
'Content-Type': 'application/json',
|
|
13923
|
+
...options.headers
|
|
13924
|
+
}
|
|
13925
|
+
});
|
|
13926
|
+
/**
|
|
13927
|
+
* Delete work
|
|
13928
|
+
*
|
|
13929
|
+
* Delete a work. Only the work goes: every asset it named stays in the library unchanged.
|
|
13930
|
+
*/
|
|
13931
|
+
export const mediaDeleteWork = (options) => (options.client ?? client).delete({
|
|
13932
|
+
security: [{
|
|
13933
|
+
key: 'media-BearerAuth',
|
|
13934
|
+
scheme: 'bearer',
|
|
13935
|
+
type: 'http'
|
|
13936
|
+
}],
|
|
13937
|
+
url: '/media/v1/libraries/{library_id}/works/{work_id}',
|
|
13938
|
+
...options
|
|
13939
|
+
});
|
|
13940
|
+
/**
|
|
13941
|
+
* Get work
|
|
13942
|
+
*
|
|
13943
|
+
* 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.
|
|
13944
|
+
*/
|
|
13945
|
+
export const mediaGetWork = (options) => (options.client ?? client).get({
|
|
13946
|
+
security: [{
|
|
13947
|
+
key: 'media-BearerAuth',
|
|
13948
|
+
scheme: 'bearer',
|
|
13949
|
+
type: 'http'
|
|
13950
|
+
}],
|
|
13951
|
+
url: '/media/v1/libraries/{library_id}/works/{work_id}',
|
|
13952
|
+
...options
|
|
13953
|
+
});
|
|
13954
|
+
/**
|
|
13955
|
+
* Update work
|
|
13956
|
+
*
|
|
13957
|
+
* 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}}}.
|
|
13958
|
+
*/
|
|
13959
|
+
export const mediaUpdateWork = (options) => (options.client ?? client).patch({
|
|
13960
|
+
security: [{
|
|
13961
|
+
key: 'media-BearerAuth',
|
|
13962
|
+
scheme: 'bearer',
|
|
13963
|
+
type: 'http'
|
|
13964
|
+
}],
|
|
13965
|
+
url: '/media/v1/libraries/{library_id}/works/{work_id}',
|
|
13966
|
+
...options,
|
|
13967
|
+
headers: {
|
|
13968
|
+
'Content-Type': 'application/json',
|
|
13969
|
+
...options.headers
|
|
13970
|
+
}
|
|
13971
|
+
});
|
|
13972
|
+
/**
|
|
13973
|
+
* List works using an asset
|
|
13974
|
+
*
|
|
13975
|
+
* 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.
|
|
13976
|
+
*/
|
|
13977
|
+
export const mediaListAssetWorks = (options) => (options.client ?? client).get({
|
|
13978
|
+
security: [{
|
|
13979
|
+
key: 'media-BearerAuth',
|
|
13980
|
+
scheme: 'bearer',
|
|
13981
|
+
type: 'http'
|
|
13982
|
+
}],
|
|
13983
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/works',
|
|
13984
|
+
...options
|
|
13985
|
+
});
|
|
13760
13986
|
/**
|
|
13761
13987
|
* List types
|
|
13762
13988
|
*
|
|
@@ -17069,7 +17295,7 @@ export const vaultListVaults = (options) => (options?.client ?? client).get({
|
|
|
17069
17295
|
/**
|
|
17070
17296
|
* Create vault
|
|
17071
17297
|
*
|
|
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.
|
|
17298
|
+
* 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
17299
|
*/
|
|
17074
17300
|
export const vaultCreateVault = (options) => (options.client ?? client).post({
|
|
17075
17301
|
security: [{
|