@deepraxis/sdk 0.2.0-dev.bc5a12b → 0.2.0-dev.bda9e20
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 +41 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +67 -13
- package/dist/generated/sdk.gen.js +141 -12
- package/dist/generated/types.gen.d.ts +1594 -218
- package/dist/helpers/browser-actions.d.ts +2 -0
- package/dist/helpers/browser-actions.js +5 -1
- package/dist/helpers/browser-connect-error.d.ts +7 -1
- package/dist/helpers/browser-connect-error.js +12 -1
- package/dist/helpers/browser-connect.d.ts +1 -1
- package/dist/helpers/browser-connect.js +16 -5
- package/dist/helpers/browser-decisions.d.ts +3 -0
- package/dist/helpers/browser-decisions.js +5 -0
- package/dist/helpers/browser-documentation.d.ts +1 -1
- package/dist/helpers/browser-documentation.js +3 -0
- package/dist/operations.generated.js +309 -20
- package/dist/resources.generated.d.ts +90 -0
- package/dist/resources.generated.js +25 -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
|
|
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 小时。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。
|
|
1214
1232
|
*/
|
|
1215
1233
|
export const browserCreateSession = (options) => (options.client ?? client).post({
|
|
1216
1234
|
security: [{
|
|
@@ -1445,6 +1463,99 @@ export const browserUpdateContext = (options) => (options.client ?? client).put(
|
|
|
1445
1463
|
...options.headers
|
|
1446
1464
|
}
|
|
1447
1465
|
});
|
|
1466
|
+
/**
|
|
1467
|
+
* 创建浏览器配对码
|
|
1468
|
+
*
|
|
1469
|
+
* 为一个要接入的 Chrome 或 Edge 创建 8 位配对码,一次性、10 分钟有效;把它交给用户,由用户在浏览器扩展里输入或由 Console 直接交给扩展,用户点「允许」后配对完成。需要组织已开通 BYOB,否则返回 501 PROVIDER_UNSUPPORTED。
|
|
1470
|
+
*/
|
|
1471
|
+
export const browserCreateByobPairing = (options) => (options?.client ?? client).post({
|
|
1472
|
+
security: [{
|
|
1473
|
+
key: 'BrowserBearer',
|
|
1474
|
+
scheme: 'bearer',
|
|
1475
|
+
type: 'http'
|
|
1476
|
+
}],
|
|
1477
|
+
url: '/browser/v1/byob/pairings',
|
|
1478
|
+
...options
|
|
1479
|
+
});
|
|
1480
|
+
/**
|
|
1481
|
+
* 列出自带浏览器
|
|
1482
|
+
*
|
|
1483
|
+
* 分页列出当前组织已配对且未断开的自带浏览器,按 ID 升序。将 nextCursor 原样传入读取下一页,直到其为 null。
|
|
1484
|
+
*/
|
|
1485
|
+
export const browserListByobBrowsers = (options) => (options?.client ?? client).get({
|
|
1486
|
+
security: [{
|
|
1487
|
+
key: 'BrowserBearer',
|
|
1488
|
+
scheme: 'bearer',
|
|
1489
|
+
type: 'http'
|
|
1490
|
+
}],
|
|
1491
|
+
url: '/browser/v1/byob/browsers',
|
|
1492
|
+
...options
|
|
1493
|
+
});
|
|
1494
|
+
/**
|
|
1495
|
+
* 读取自带浏览器
|
|
1496
|
+
*
|
|
1497
|
+
* 读取当前组织的指定自带浏览器,包括已断开的(revoked_at 不为 null)。不存在或不属于当前组织时返回 404 BROWSER_NOT_FOUND。
|
|
1498
|
+
*/
|
|
1499
|
+
export const browserGetByobBrowser = (options) => (options.client ?? client).get({
|
|
1500
|
+
security: [{
|
|
1501
|
+
key: 'BrowserBearer',
|
|
1502
|
+
scheme: 'bearer',
|
|
1503
|
+
type: 'http'
|
|
1504
|
+
}],
|
|
1505
|
+
url: '/browser/v1/byob/browsers/{browser_id}',
|
|
1506
|
+
...options
|
|
1507
|
+
});
|
|
1508
|
+
/**
|
|
1509
|
+
* 更新自带浏览器的名称、授权智能体与允许站点
|
|
1510
|
+
*
|
|
1511
|
+
* 给自带浏览器改名,只改请求里出现的字段。已断开的浏览器返回 410 BROWSER_REVOKED,需要重新配对。
|
|
1512
|
+
*/
|
|
1513
|
+
export const browserUpdateByobBrowser = (options) => (options.client ?? client).patch({
|
|
1514
|
+
security: [{
|
|
1515
|
+
key: 'BrowserBearer',
|
|
1516
|
+
scheme: 'bearer',
|
|
1517
|
+
type: 'http'
|
|
1518
|
+
}],
|
|
1519
|
+
url: '/browser/v1/byob/browsers/{browser_id}',
|
|
1520
|
+
...options,
|
|
1521
|
+
headers: {
|
|
1522
|
+
'Content-Type': 'application/json',
|
|
1523
|
+
...options.headers
|
|
1524
|
+
}
|
|
1525
|
+
});
|
|
1526
|
+
/**
|
|
1527
|
+
* 断开自带浏览器
|
|
1528
|
+
*
|
|
1529
|
+
* 断开自带浏览器:之后没有任何智能体能再驱动它,要用必须重新配对。可重复调用,结果相同;功能开关关闭时也能断开。
|
|
1530
|
+
*/
|
|
1531
|
+
export const browserDisconnectByobBrowser = (options) => (options.client ?? client).post({
|
|
1532
|
+
security: [{
|
|
1533
|
+
key: 'BrowserBearer',
|
|
1534
|
+
scheme: 'bearer',
|
|
1535
|
+
type: 'http'
|
|
1536
|
+
}],
|
|
1537
|
+
url: '/browser/v1/byob/browsers/{browser_id}/disconnect',
|
|
1538
|
+
...options
|
|
1539
|
+
});
|
|
1540
|
+
/**
|
|
1541
|
+
* 读取浏览器配对授权页信息
|
|
1542
|
+
*
|
|
1543
|
+
* 扩展的授权页读取配对码对应的组织与发起人,让用户确认后再点「允许」。不需要 API Key,配对码就是凭证;码不存在、已过期、已使用一律返回 404 PAIRING_NOT_FOUND,不区分原因。
|
|
1544
|
+
*/
|
|
1545
|
+
export const browserReadByobPairing = (options) => (options.client ?? client).get({ url: '/browser/v1/byob/pairings/{code}', ...options });
|
|
1546
|
+
/**
|
|
1547
|
+
* 认领浏览器配对码
|
|
1548
|
+
*
|
|
1549
|
+
* 用户点「允许」后,扩展用配对码认领一次,登记这个浏览器并取得 browser_id 和要拨入的 link_url。不需要 API Key,配对码就是凭证,只能使用一次;码不存在、已过期、已使用一律返回 404 PAIRING_NOT_FOUND。请求体不合格时返回 400 且不消耗配对码。
|
|
1550
|
+
*/
|
|
1551
|
+
export const browserClaimByobPairing = (options) => (options.client ?? client).post({
|
|
1552
|
+
url: '/browser/v1/byob/pairings/{code}/claim',
|
|
1553
|
+
...options,
|
|
1554
|
+
headers: {
|
|
1555
|
+
'Content-Type': 'application/json',
|
|
1556
|
+
...options.headers
|
|
1557
|
+
}
|
|
1558
|
+
});
|
|
1448
1559
|
/**
|
|
1449
1560
|
* 连接云端浏览器
|
|
1450
1561
|
*
|
|
@@ -1705,7 +1816,7 @@ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
|
|
|
1705
1816
|
/**
|
|
1706
1817
|
* Create a one-time upload URL
|
|
1707
1818
|
*
|
|
1708
|
-
* Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns
|
|
1819
|
+
* Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 201 with the same file, because a lost answer must not cost the file. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. An expired upload answers 410 UPLOAD_EXPIRED on its status_url and complete_url while the upload still exists in the caller's organization; revoked, invalid, cross-organization or unknown URLs return 404, including a link whose upload record no longer exists. A signed URL used for another action answers 403 CAPABILITY_MISMATCH, judged before expiry, so a status link posted to complete_url answers it and so does a completion link fetched as status_url. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1709
1820
|
*/
|
|
1710
1821
|
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1711
1822
|
security: [{
|
|
@@ -2127,7 +2238,7 @@ export const updateMediaPipeline = (options) => (options.client ?? client).patch
|
|
|
2127
2238
|
/**
|
|
2128
2239
|
* List a stream's re-broadcast targets
|
|
2129
2240
|
*
|
|
2130
|
-
* List every output of one stream, oldest first, with the status of each (idle, starting, broadcasting or errored) and the
|
|
2241
|
+
* List every output of one stream, oldest first, with the status of each (idle, starting, broadcasting or errored) and the reason of one that is errored or trying again. Use it to see at a glance which targets are live; to change one use streams.outputs.update and to follow status changes as they happen read streams.events.list. A stream has at most 5 outputs, so the list is one page. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs.
|
|
2131
2242
|
*/
|
|
2132
2243
|
export const listMediaStreamOutputs = (options) => (options.client ?? client).get({
|
|
2133
2244
|
security: [{
|
|
@@ -2185,7 +2296,7 @@ export const deleteMediaStreamOutput = (options) => (options.client ?? client).d
|
|
|
2185
2296
|
/**
|
|
2186
2297
|
* Read one re-broadcast target
|
|
2187
2298
|
*
|
|
2188
|
-
* Read one output: its address, whether a key is set (the key itself is never returned), its status and, when it is errored, why. Use it to check a target after streams.outputs.create or after an output.status event; status broadcasting means the target accepted the stream and is receiving it. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs/mso_zpnqd7a2kxwg3vhr5tj4bfm6ec.
|
|
2299
|
+
* Read one output: its address, whether a key is set (the key itself is never returned), its status and, when it is errored or trying again, why. Use it to check a target after streams.outputs.create or after an output.status event; status broadcasting means the target accepted the stream and is receiving it. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs/mso_zpnqd7a2kxwg3vhr5tj4bfm6ec.
|
|
2189
2300
|
*/
|
|
2190
2301
|
export const getMediaStreamOutput = (options) => (options.client ?? client).get({
|
|
2191
2302
|
security: [{
|
|
@@ -5067,7 +5178,7 @@ export const sessionsRetrieve = (options) => (options.client ?? client).get({
|
|
|
5067
5178
|
/**
|
|
5068
5179
|
* Update session
|
|
5069
5180
|
*
|
|
5070
|
-
* 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;
|
|
5181
|
+
* 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.
|
|
5071
5182
|
*/
|
|
5072
5183
|
export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
5073
5184
|
security: [{
|
|
@@ -5223,7 +5334,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
5223
5334
|
/**
|
|
5224
5335
|
* Create session
|
|
5225
5336
|
*
|
|
5226
|
-
* 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.
|
|
5337
|
+
* 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.
|
|
5227
5338
|
*/
|
|
5228
5339
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
5229
5340
|
security: [{
|
|
@@ -5603,7 +5714,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
5603
5714
|
/**
|
|
5604
5715
|
* Create deployment
|
|
5605
5716
|
*
|
|
5606
|
-
* 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;
|
|
5717
|
+
* 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"}}.
|
|
5607
5718
|
*/
|
|
5608
5719
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
5609
5720
|
security: [{
|
|
@@ -12028,10 +12139,28 @@ export const devopsChangesMarkLastSlice = (options) => (options.client ?? client
|
|
|
12028
12139
|
...options.headers
|
|
12029
12140
|
}
|
|
12030
12141
|
});
|
|
12142
|
+
/**
|
|
12143
|
+
* Open a new slice
|
|
12144
|
+
*
|
|
12145
|
+
* Open one more slice of a change: another pull request on the same change, developed beside the ones already open. Use it when a second piece of the change can be built in parallel; for the change's first pull request there is nothing to open — work on the branch `praxis devops change checkout` gave you. The call cuts the next slice branch, named <id>--<n> where n is one more than the highest slice number the change's pull requests and its workspace already hold (so two calls give two different slices), and gives it its own git worktree in the change's workspace. If the change has no live workspace one is opened. Everything after that is automatic: the branch name, the worktree, removing the worktree once its pull request merges, and restacking a slice cut from another onto the default branch when that slice merges. A restack that conflicts is aborted and reported with the conflicting files; resolve those by hand on the slice branch, nothing is resolved for you. Without from the slice is cut from the default branch; with from set to another branch of the same change it is cut from that slice (the right choice when it builds on it). An abandoned change is refused with INVALID_ARGUMENT. The change id is the branch name <type>/<slug>; give it as it comes back — the SDK and the CLI encode the slash themselves. The workspace may still be starting when the call returns: directory is the path the worktree will have once it is available, and exists at once when the workspace is already running. From a terminal: `praxis devops changes slice <change>`.
|
|
12146
|
+
*/
|
|
12147
|
+
export const devopsChangesSlicesCreate = (options) => (options.client ?? client).post({
|
|
12148
|
+
security: [{
|
|
12149
|
+
key: 'devops-bearerAuth',
|
|
12150
|
+
scheme: 'bearer',
|
|
12151
|
+
type: 'http'
|
|
12152
|
+
}],
|
|
12153
|
+
url: '/devops/v1/projects/{project}/changes/{change}/slices',
|
|
12154
|
+
...options,
|
|
12155
|
+
headers: {
|
|
12156
|
+
'Content-Type': 'application/json',
|
|
12157
|
+
...options.headers
|
|
12158
|
+
}
|
|
12159
|
+
});
|
|
12031
12160
|
/**
|
|
12032
12161
|
* Open a change's pull request
|
|
12033
12162
|
*
|
|
12034
|
-
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. Only an open pull request can be rewritten: once it is merged or closed its head branch is usually deleted with it, so a call that names a title or a body is refused with PULL_REQUEST_NOT_OPEN, naming that pull request and the branch, instead of trying to open a second one. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name; give it as it comes back (fix/expired-links) — the SDK and the CLI encode the slash themselves, and only a hand-written HTTP request sends fix%2Fexpired-links.
|
|
12163
|
+
* Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. Only an open pull request can be rewritten: once it is merged or closed its head branch is usually deleted with it, so a call that names a title or a body is refused with PULL_REQUEST_NOT_OPEN, naming that pull request and the branch, instead of trying to open a second one. The pull request then appears on the change and runs its merge gate as usual. For a later slice opened with `slices.create`, pass head set to that slice's branch (<id>--<n>): the pull request is opened from it instead of the change's own branch, and a branch that belongs to another change is refused with INVALID_ARGUMENT. The id is the branch name; give it as it comes back (fix/expired-links) — the SDK and the CLI encode the slash themselves, and only a hand-written HTTP request sends fix%2Fexpired-links.
|
|
12035
12164
|
*/
|
|
12036
12165
|
export const devopsChangesOpenPullRequest = (options) => (options.client ?? client).post({
|
|
12037
12166
|
security: [{
|
|
@@ -16958,7 +17087,7 @@ export const vaultListVaults = (options) => (options?.client ?? client).get({
|
|
|
16958
17087
|
/**
|
|
16959
17088
|
* Create vault
|
|
16960
17089
|
*
|
|
16961
|
-
* 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.
|
|
17090
|
+
* 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.
|
|
16962
17091
|
*/
|
|
16963
17092
|
export const vaultCreateVault = (options) => (options.client ?? client).post({
|
|
16964
17093
|
security: [{
|