@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.
@@ -207,7 +207,7 @@ export const operations = [
207
207
  "type": "array",
208
208
  "itemType": "string",
209
209
  "required": false,
210
- "description": "Default vaults of a service agent: the vault_ids a new session gets when it names none, so the agent's credentials follow the version. At most 50 ids without duplicates; each must be a vault of your organization that is not archived, otherwise 400 vault_ids[<index>] <id> was not found. Saved with the agent version like other configuration, so apply=false keeps the previous vaults in effect for new sessions until that version is applied; a session that sets vault_ids itself, [] included, overrides it. Omit on create for []; on update, omit to keep the list and send an array to replace it as a whole. Versions saved before this field existed read as []. Embed tokens use the vault_ids of the version they pin; vault_ids on the embed policy is deprecated, still accepted and ignored. Personal agents get no default vaults: a non-empty value returns 400 and the field is not returned. /agent/v1 only; /anthropic neither accepts nor returns it."
210
+ "description": "Default vaults of the agent: the vault_ids every new session carries, so the agent's credentials follow the version. A department or organization rule's grants write this list on the agents it reaches (the agent's vaults become exactly the rule's set). Their secrets reach each session's machine as environment variables and match its MCP servers; sessions.create says which are skipped. At most 50 ids without duplicates; each must be a vault of your organization that is not archived, otherwise 400 vault_ids[<index>] <id> was not found. Saved with the agent version like other configuration, so apply=false keeps the previous vaults in effect for new sessions until that version is applied; a session that sets vault_ids itself adds its vaults to these and does not replace them; sessions already open keep the vaults they were created with. Omit on create for []; on update, omit to keep the list and send an array to replace it as a whole. Versions saved before this field existed read as []. Embed tokens use the vault_ids of the version they pin; vault_ids on the embed policy is deprecated, still accepted and ignored. General and assume agents hold vaults on themselves the same way. /agent/v1 only; /anthropic neither accepts nor returns it."
211
211
  },
212
212
  {
213
213
  "name": "computers",
@@ -215,6 +215,12 @@ export const operations = [
215
215
  "required": false,
216
216
  "description": "General agents only: the agent's computers, configured like its models. default is the template its Computer starts on; allowed lists the computers resize may switch to, and a resize to anything else is refused with COMPUTER_NOT_CONFIGURED. Omit on create for {default: base, allowed: Small base-small, Base base, Large base-large}; on update, omit to keep it, send an object to replace it as a whole. Service and assume agents return 400 computers is for general agents; service agents use environment_id. /agent/v1 only."
217
217
  },
218
+ {
219
+ "name": "browser",
220
+ "type": "object",
221
+ "required": false,
222
+ "description": "ADR-205: which browser the agent drives. {byob: byb_…} names one of your organization's paired browsers (browser.byob.browsers.list), which the agent then drives through connect() instead of a cloud browser; null or absent is the cloud browser. The browser must belong to your organization (otherwise 400) and must grant this agent before a session can open it. Omit on update to keep it, send an object to replace it, or null to go back to the cloud browser. /agent/v1 only."
223
+ },
218
224
  {
219
225
  "name": "preset",
220
226
  "type": "string",
@@ -435,7 +441,7 @@ export const operations = [
435
441
  "type": "array",
436
442
  "itemType": "string",
437
443
  "required": false,
438
- "description": "Default vaults of a service agent: the vault_ids a new session gets when it names none, so the agent's credentials follow the version. At most 50 ids without duplicates; each must be a vault of your organization that is not archived, otherwise 400 vault_ids[<index>] <id> was not found. Saved with the agent version like other configuration, so apply=false keeps the previous vaults in effect for new sessions until that version is applied; a session that sets vault_ids itself, [] included, overrides it. Omit on create for []; on update, omit to keep the list and send an array to replace it as a whole. Versions saved before this field existed read as []. Embed tokens use the vault_ids of the version they pin; vault_ids on the embed policy is deprecated, still accepted and ignored. Personal agents get no default vaults: a non-empty value returns 400 and the field is not returned. /agent/v1 only; /anthropic neither accepts nor returns it."
444
+ "description": "Default vaults of the agent: the vault_ids every new session carries, so the agent's credentials follow the version. A department or organization rule's grants write this list on the agents it reaches (the agent's vaults become exactly the rule's set). Their secrets reach each session's machine as environment variables and match its MCP servers; sessions.create says which are skipped. At most 50 ids without duplicates; each must be a vault of your organization that is not archived, otherwise 400 vault_ids[<index>] <id> was not found. Saved with the agent version like other configuration, so apply=false keeps the previous vaults in effect for new sessions until that version is applied; a session that sets vault_ids itself adds its vaults to these and does not replace them; sessions already open keep the vaults they were created with. Omit on create for []; on update, omit to keep the list and send an array to replace it as a whole. Versions saved before this field existed read as []. Embed tokens use the vault_ids of the version they pin; vault_ids on the embed policy is deprecated, still accepted and ignored. General and assume agents hold vaults on themselves the same way. /agent/v1 only; /anthropic neither accepts nor returns it."
439
445
  },
440
446
  {
441
447
  "name": "computers",
@@ -443,6 +449,12 @@ export const operations = [
443
449
  "required": false,
444
450
  "description": "General agents only: the agent's computers, configured like its models. default is the template its Computer starts on; allowed lists the computers resize may switch to, and a resize to anything else is refused with COMPUTER_NOT_CONFIGURED. Omit on create for {default: base, allowed: Small base-small, Base base, Large base-large}; on update, omit to keep it, send an object to replace it as a whole. Service and assume agents return 400 computers is for general agents; service agents use environment_id. /agent/v1 only."
445
451
  },
452
+ {
453
+ "name": "browser",
454
+ "type": "object",
455
+ "required": false,
456
+ "description": "ADR-205: which browser the agent drives. {byob: byb_…} names one of your organization's paired browsers (browser.byob.browsers.list), which the agent then drives through connect() instead of a cloud browser; null or absent is the cloud browser. The browser must belong to your organization (otherwise 400) and must grant this agent before a session can open it. Omit on update to keep it, send an object to replace it, or null to go back to the cloud browser. /agent/v1 only."
457
+ },
446
458
  {
447
459
  "name": "preset",
448
460
  "type": "string",
@@ -776,6 +788,42 @@ export const operations = [
776
788
  ],
777
789
  "query": []
778
790
  },
791
+ {
792
+ "resource": "agent.agents.devices.localSessions",
793
+ "method": "list",
794
+ "summary": "List the Claude Code sessions already on a device",
795
+ "description": "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.",
796
+ "http": "GET",
797
+ "path": "/agent/v1/agents/{agent_id}/devices/{device_id}/local-sessions",
798
+ "streaming": "no",
799
+ "pagination": true,
800
+ "pathParams": [
801
+ {
802
+ "name": "agent_id",
803
+ "sdkName": "agent_id",
804
+ "description": "The BYOA agent: its agent_… id, eight character identity number or handle, from agents.list; resolved in your organization. Also accepts an 8-character identity number (0–9, A–Z); malformed, absent and foreign references return 404, and response ids always use agent_…."
805
+ },
806
+ {
807
+ "name": "device_id",
808
+ "sdkName": "device_id",
809
+ "description": "The paired desktop device (byd_ and 26 hex characters) whose sessions to list; you must be the person who paired it."
810
+ }
811
+ ],
812
+ "query": [
813
+ {
814
+ "name": "cwd",
815
+ "type": "string",
816
+ "required": true,
817
+ "description": "The absolute directory on the device, exactly as the device registered it and bound it to this agent."
818
+ },
819
+ {
820
+ "name": "cursor",
821
+ "type": "string",
822
+ "required": false,
823
+ "description": "The next_cursor of the previous page; leave it out for the first page."
824
+ }
825
+ ]
826
+ },
779
827
  {
780
828
  "resource": "agent.agents",
781
829
  "method": "retrieveEmbedPolicy",
@@ -1216,7 +1264,7 @@ export const operations = [
1216
1264
  "resource": "agent.computers",
1217
1265
  "method": "update",
1218
1266
  "summary": "Update Computer",
1219
- "description": "Rename a computer.\n\nPraxis 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.",
1267
+ "description": "Rename a computer, declare its environment, or drop that declaration without touching the machine.\n\nPraxis 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.",
1220
1268
  "http": "POST",
1221
1269
  "path": "/agent/v1/computers/{computer_id}",
1222
1270
  "streaming": "no",
@@ -1235,8 +1283,14 @@ export const operations = [
1235
1283
  {
1236
1284
  "name": "name",
1237
1285
  "type": "string",
1238
- "required": true,
1239
- "description": "Name of the entry or object."
1286
+ "required": false,
1287
+ "description": "New display name, 1 to 255 characters after trimming. Omit to keep the current name."
1288
+ },
1289
+ {
1290
+ "name": "environment_id",
1291
+ "type": "string",
1292
+ "required": false,
1293
+ "description": "Environment recipe the computer declares (agent.environments.list or agent.environments.create, or a built-in id). A string sets the declaration and is checked as in computers.create: an unknown, foreign or archived environment is refused. null removes the declaration. Omit to leave it unchanged. Only the record changes: the machine is not touched or restarted, so the new declaration applies from the computer's next start; restart the computer once to apply it at once."
1240
1294
  }
1241
1295
  ]
1242
1296
  }
@@ -1292,7 +1346,7 @@ export const operations = [
1292
1346
  "resource": "agent.computers",
1293
1347
  "method": "connect",
1294
1348
  "summary": "Connect computer",
1295
- "description": "Resume the computer and issue a sandbox connection.\n\nOwn-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.\n\nConnect 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.",
1349
+ "description": "Resume the computer and issue a sandbox connection.\n\nOwn-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.\n\nConnect 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.",
1296
1350
  "http": "POST",
1297
1351
  "path": "/agent/v1/computers/{computer_id}/connect",
1298
1352
  "streaming": "no",
@@ -1316,7 +1370,7 @@ export const operations = [
1316
1370
  "heavy"
1317
1371
  ],
1318
1372
  "required": false,
1319
- "description": "Defaults to light. light uses the lightweight shell, or the heavy instance while it is running. heavy requests a full Linux computer for interactive programs; heavy running time counts toward the daily budget in seconds."
1373
+ "description": "Accepted for compatibility and ignored: light and heavy both reach the same machine, because a Computer is one machine. Omit it."
1320
1374
  }
1321
1375
  ]
1322
1376
  }
@@ -1683,7 +1737,7 @@ export const operations = [
1683
1737
  "resource": "agent.deployments",
1684
1738
  "method": "create",
1685
1739
  "summary": "Create deployment",
1686
- "description": "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\"}}.",
1740
+ "description": "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\"}}.",
1687
1741
  "http": "POST",
1688
1742
  "path": "/agent/v1/deployments",
1689
1743
  "streaming": "no",
@@ -2247,7 +2301,7 @@ export const operations = [
2247
2301
  "resource": "agent.sessions",
2248
2302
  "method": "create",
2249
2303
  "summary": "Create session",
2250
- "description": "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.",
2304
+ "description": "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.",
2251
2305
  "http": "POST",
2252
2306
  "path": "/agent/v1/sessions",
2253
2307
  "streaming": "no",
@@ -2391,7 +2445,7 @@ export const operations = [
2391
2445
  "resource": "agent.sessions",
2392
2446
  "method": "update",
2393
2447
  "summary": "Update session",
2394
- "description": "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.",
2448
+ "description": "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.",
2395
2449
  "http": "POST",
2396
2450
  "path": "/agent/v1/sessions/{session_id}",
2397
2451
  "streaming": "no",
@@ -2430,7 +2484,7 @@ export const operations = [
2430
2484
  "type": "array",
2431
2485
  "itemType": "string",
2432
2486
  "required": false,
2433
- "description": "Vault IDs (`vlt_*`) to attach to the session. Not yet supported;\nrequests setting this field are rejected. Reserved for future use."
2487
+ "description": "The vaults this session carries, replacing the whole set it has now, including the vaults it took from its agent when it was created: send those ids again to keep them. At most 50 ids, each a vault of your organization that is not archived. The next command the session runs sees the new set: the secrets of the vaults become environment variables on its machine and are matched against its MCP servers, as sessions.create describes."
2434
2488
  },
2435
2489
  {
2436
2490
  "name": "model",
@@ -7584,6 +7638,195 @@ export const operations = [
7584
7638
  "pathParams": [],
7585
7639
  "query": []
7586
7640
  },
7641
+ {
7642
+ "resource": "browser.byob.browsers",
7643
+ "method": "list",
7644
+ "summary": "列出自带浏览器",
7645
+ "description": "分页列出当前组织已配对且未断开的自带浏览器,按 ID 升序。将 nextCursor 原样传入读取下一页,直到其为 null。",
7646
+ "http": "GET",
7647
+ "path": "/browser/v1/byob/browsers",
7648
+ "streaming": "no",
7649
+ "pagination": false,
7650
+ "pathParams": [],
7651
+ "query": [
7652
+ {
7653
+ "name": "cursor",
7654
+ "type": "string",
7655
+ "required": false,
7656
+ "description": "上一页返回的 nextCursor,原样传入;省略时读取第一页。"
7657
+ },
7658
+ {
7659
+ "name": "limit",
7660
+ "type": "integer",
7661
+ "required": false,
7662
+ "description": "每页最多返回的浏览器数量;默认 50,范围 1–100。"
7663
+ }
7664
+ ]
7665
+ },
7666
+ {
7667
+ "resource": "browser.byob.browsers",
7668
+ "method": "retrieve",
7669
+ "summary": "读取自带浏览器",
7670
+ "description": "读取当前组织的指定自带浏览器,包括已断开的(revoked_at 不为 null)。不存在或不属于当前组织时返回 404 BROWSER_NOT_FOUND。",
7671
+ "http": "GET",
7672
+ "path": "/browser/v1/byob/browsers/{browser_id}",
7673
+ "streaming": "no",
7674
+ "pagination": false,
7675
+ "pathParams": [
7676
+ {
7677
+ "name": "browser_id",
7678
+ "sdkName": "browser_id",
7679
+ "description": "自带浏览器 ID,以 byb_ 开头;使用配对认领或列出自带浏览器返回的 id。"
7680
+ }
7681
+ ],
7682
+ "query": []
7683
+ },
7684
+ {
7685
+ "resource": "browser.byob.browsers",
7686
+ "method": "update",
7687
+ "summary": "更新自带浏览器的名称、授权智能体与允许站点",
7688
+ "description": "给自带浏览器改名,只改请求里出现的字段。已断开的浏览器返回 410 BROWSER_REVOKED,需要重新配对。",
7689
+ "http": "PATCH",
7690
+ "path": "/browser/v1/byob/browsers/{browser_id}",
7691
+ "streaming": "no",
7692
+ "pagination": false,
7693
+ "pathParams": [
7694
+ {
7695
+ "name": "browser_id",
7696
+ "sdkName": "browser_id",
7697
+ "description": "自带浏览器 ID,以 byb_ 开头;使用配对认领或列出自带浏览器返回的 id。"
7698
+ }
7699
+ ],
7700
+ "query": [],
7701
+ "body": {
7702
+ "required": true,
7703
+ "fields": [
7704
+ {
7705
+ "name": "name",
7706
+ "type": "string",
7707
+ "required": false,
7708
+ "description": "新的显示名称,1–80 个字符。"
7709
+ }
7710
+ ]
7711
+ }
7712
+ },
7713
+ {
7714
+ "resource": "browser.byob.browsers.disconnect",
7715
+ "method": "create",
7716
+ "summary": "断开自带浏览器",
7717
+ "description": "断开自带浏览器:之后没有任何智能体能再驱动它,要用必须重新配对。可重复调用,结果相同;功能开关关闭时也能断开。",
7718
+ "http": "POST",
7719
+ "path": "/browser/v1/byob/browsers/{browser_id}/disconnect",
7720
+ "streaming": "no",
7721
+ "pagination": false,
7722
+ "pathParams": [
7723
+ {
7724
+ "name": "browser_id",
7725
+ "sdkName": "browser_id",
7726
+ "description": "自带浏览器 ID,以 byb_ 开头;使用配对认领或列出自带浏览器返回的 id。"
7727
+ }
7728
+ ],
7729
+ "query": []
7730
+ },
7731
+ {
7732
+ "resource": "browser.byob.pairings",
7733
+ "method": "create",
7734
+ "summary": "创建浏览器配对码",
7735
+ "description": "为一个要接入的 Chrome 或 Edge 创建 8 位配对码,一次性、10 分钟有效;把它交给用户,由用户在浏览器扩展里输入或由 Console 直接交给扩展,用户点「允许」后配对完成。需要组织已开通 BYOB,否则返回 501 PROVIDER_UNSUPPORTED。",
7736
+ "http": "POST",
7737
+ "path": "/browser/v1/byob/pairings",
7738
+ "streaming": "no",
7739
+ "pagination": false,
7740
+ "pathParams": [],
7741
+ "query": []
7742
+ },
7743
+ {
7744
+ "resource": "browser.byob.pairings",
7745
+ "method": "retrieve",
7746
+ "summary": "读取浏览器配对授权页信息",
7747
+ "description": "扩展的授权页读取配对码对应的组织与发起人,让用户确认后再点「允许」。不需要 API Key,配对码就是凭证;码不存在、已过期、已使用一律返回 404 PAIRING_NOT_FOUND,不区分原因。",
7748
+ "http": "GET",
7749
+ "path": "/browser/v1/byob/pairings/{code}",
7750
+ "streaming": "no",
7751
+ "pagination": false,
7752
+ "pathParams": [
7753
+ {
7754
+ "name": "code",
7755
+ "sdkName": "code",
7756
+ "description": "8 位配对码,来自创建配对码的结果。"
7757
+ }
7758
+ ],
7759
+ "query": []
7760
+ },
7761
+ {
7762
+ "resource": "browser.byob.pairings.claim",
7763
+ "method": "create",
7764
+ "summary": "认领浏览器配对码",
7765
+ "description": "用户点「允许」后,扩展用配对码认领一次,登记这个浏览器并取得 browser_id 和要拨入的 link_url。不需要 API Key,配对码就是凭证,只能使用一次;码不存在、已过期、已使用一律返回 404 PAIRING_NOT_FOUND。请求体不合格时返回 400 且不消耗配对码。",
7766
+ "http": "POST",
7767
+ "path": "/browser/v1/byob/pairings/{code}/claim",
7768
+ "streaming": "no",
7769
+ "pagination": false,
7770
+ "pathParams": [
7771
+ {
7772
+ "name": "code",
7773
+ "sdkName": "code",
7774
+ "description": "8 位配对码,来自创建配对码的结果。"
7775
+ }
7776
+ ],
7777
+ "query": [],
7778
+ "body": {
7779
+ "required": true,
7780
+ "fields": [
7781
+ {
7782
+ "name": "browser",
7783
+ "type": "string",
7784
+ "enum": [
7785
+ "chrome",
7786
+ "edge"
7787
+ ],
7788
+ "required": true,
7789
+ "description": "要登记的浏览器种类,只支持 Chrome 和 Edge。"
7790
+ },
7791
+ {
7792
+ "name": "version",
7793
+ "type": "string",
7794
+ "required": true,
7795
+ "description": "浏览器版本号,1–64 个字符。"
7796
+ },
7797
+ {
7798
+ "name": "os",
7799
+ "type": "string",
7800
+ "required": true,
7801
+ "description": "操作系统,1–64 个字符。"
7802
+ },
7803
+ {
7804
+ "name": "name",
7805
+ "type": "string",
7806
+ "required": true,
7807
+ "description": "浏览器的显示名称,1–80 个字符。"
7808
+ },
7809
+ {
7810
+ "name": "public_key",
7811
+ "type": "string",
7812
+ "required": true,
7813
+ "description": "扩展用 WebCrypto 生成的不可导出 ECDSA P-256 密钥对的公钥;平台只保存公钥。"
7814
+ },
7815
+ {
7816
+ "name": "extension_id",
7817
+ "type": "string",
7818
+ "required": true,
7819
+ "description": "扩展 ID,1–64 个字符。"
7820
+ },
7821
+ {
7822
+ "name": "install_key",
7823
+ "type": "string",
7824
+ "required": false,
7825
+ "description": "扩展保存的随机安装密钥,8–128 个字母、数字、_ 或 -;同一个 profile 带同一密钥重新配对会复用原来的浏览器,平台只保存它的哈希。省略则每次认领都是新浏览器。"
7826
+ }
7827
+ ]
7828
+ }
7829
+ },
7587
7830
  {
7588
7831
  "resource": "browser.connect",
7589
7832
  "method": "retrieve",
@@ -7890,7 +8133,7 @@ export const operations = [
7890
8133
  "resource": "browser.sessions",
7891
8134
  "method": "create",
7892
8135
  "summary": "创建浏览器会话",
7893
- "description": "创建云端 Chrome,返回自带凭证的 connectUrl;它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。",
8136
+ "description": "创建云端 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 也不豁免;该事件记录判据读数。",
7894
8137
  "http": "POST",
7895
8138
  "path": "/browser/v1/sessions",
7896
8139
  "streaming": "no",
@@ -7914,7 +8157,7 @@ export const operations = [
7914
8157
  "organization"
7915
8158
  ],
7916
8159
  "required": false,
7917
- "description": "谁能看到这个新会话:默认 private 只有创建者;organization 允许同组织其他成员只读观看画面。"
8160
+ "description": "谁能看到这个新会话:默认 private 只有创建者;organization 允许同组织其他成员只读观看画面。自带浏览器(source.type 为 byob)的会话一律是 organization,传 private 也会被改成 organization,不报错。"
7918
8161
  },
7919
8162
  {
7920
8163
  "name": "keepAlive",
@@ -7938,7 +8181,13 @@ export const operations = [
7938
8181
  "name": "proxies",
7939
8182
  "type": "object",
7940
8183
  "required": false,
7941
- "description": "仅省略、false 或 [{type: 'none'}] 可用;其它代理配置返回 501。"
8184
+ "description": "省略、false 或 [{type: 'none'}] 表示不用代理。一条 {type: 'external', server, username?, password? | password_secret?} 让会话在我们的 Chrome 容器里经这个 HTTP 代理出网(需要组织已开通容器后端,否则返回 501 PROVIDER_UNSUPPORTED);不能与 source.type 为 cloud 或 byob 同用,返回 400 INVALID_PARAMS。其它代理类型返回 501。"
8185
+ },
8186
+ {
8187
+ "name": "source",
8188
+ "type": "object",
8189
+ "required": false,
8190
+ "description": "选择浏览器后端。{type: 'cloud'}:Browser Run,启动最快、不能用代理、自动化特征可被网站发现。{type: 'container'}:我们自己的 Chrome 容器,可带代理也可不带;组织未开通容器后端时返回 501 PROVIDER_UNSUPPORTED。{type: 'byob', browser: 'byb_…'}:用户自己配对的浏览器,不能与 proxies 或登录态同用。简写 {byob: 'byb_…'} 等同最后一种。省略时按旧规则:带 proxies 进容器,否则 Browser Run。cloud 加代理、未知 type、格式错误都返回 400 INVALID_PARAMS。"
7942
8191
  },
7943
8192
  {
7944
8193
  "name": "region",
@@ -14994,7 +15243,7 @@ export const operations = [
14994
15243
  "resource": "devops.changes",
14995
15244
  "method": "openPullRequest",
14996
15245
  "summary": "Open a change's pull request",
14997
- "description": "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.",
15246
+ "description": "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.",
14998
15247
  "http": "POST",
14999
15248
  "path": "/devops/v1/changes/{id}:openPullRequest",
15000
15249
  "streaming": "no",
@@ -15027,6 +15276,12 @@ export const operations = [
15027
15276
  "type": "boolean",
15028
15277
  "required": false,
15029
15278
  "description": "Open it as a draft. Defaults to false."
15279
+ },
15280
+ {
15281
+ "name": "head",
15282
+ "type": "string",
15283
+ "required": false,
15284
+ "description": "The branch the pull request is opened from, for a later slice of the change: <change id>--<n>, as `slices.create` answered it; omit it for the change's own branch. A branch that belongs to another change is refused with INVALID_ARGUMENT."
15030
15285
  }
15031
15286
  ]
15032
15287
  }
@@ -15945,6 +16200,40 @@ export const operations = [
15945
16200
  }
15946
16201
  }
15947
16202
  },
16203
+ {
16204
+ "resource": "devops.changes.slices",
16205
+ "method": "create",
16206
+ "summary": "Open a new slice",
16207
+ "description": "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>`.",
16208
+ "http": "POST",
16209
+ "path": "/devops/v1/projects/{project}/changes/{change}/slices",
16210
+ "streaming": "no",
16211
+ "pagination": false,
16212
+ "pathParams": [
16213
+ {
16214
+ "name": "project",
16215
+ "sdkName": "project",
16216
+ "description": "Identifies the project whose data you are reading, from the project list or create answer."
16217
+ },
16218
+ {
16219
+ "name": "change",
16220
+ "sdkName": "change",
16221
+ "description": "The change whose slice you are opening: its id, which is its branch name <type>/<slug> from a change list or create answer. Give it as it comes back — `feat/run-page-v2`; the SDK and the CLI encode the slash themselves."
16222
+ }
16223
+ ],
16224
+ "query": [],
16225
+ "body": {
16226
+ "required": false,
16227
+ "fields": [
16228
+ {
16229
+ "name": "from",
16230
+ "type": "string",
16231
+ "required": false,
16232
+ "description": "Another branch of the same change to cut the slice from, such as feat/run-page-v2--2; omit it to cut from the default branch. A slice cut from a branch is restacked onto the default branch when that branch merges."
16233
+ }
16234
+ ]
16235
+ }
16236
+ },
15948
16237
  {
15949
16238
  "resource": "devops.projects.cleanups",
15950
16239
  "method": "list",
@@ -18886,7 +19175,7 @@ export const operations = [
18886
19175
  "resource": "file.uploads",
18887
19176
  "method": "createSigned",
18888
19177
  "summary": "Create a one-time upload URL",
18889
- "description": "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 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid or cross-organization URLs return 404, and so does a link whose upload record no longer exists. A URL that is authentic but names another action returns 403 CAPABILITY_MISMATCH: 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\"}.",
19178
+ "description": "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\"}.",
18890
19179
  "http": "POST",
18891
19180
  "path": "/file/v1/uploads/signed",
18892
19181
  "streaming": "no",
@@ -22558,7 +22847,7 @@ export const operations = [
22558
22847
  "resource": "media.streams.outputs",
22559
22848
  "method": "list",
22560
22849
  "summary": "List a stream's re-broadcast targets",
22561
- "description": "List every output of one stream, oldest first, with the status of each (idle, starting, broadcasting or errored) and the error of an errored one. Use it to see at a glance which targets are live; to change one use streams.outputs.update and to follow status changes as they happen read streams.events.list. A stream has at most 5 outputs, so the list is one page. Example: GET /media/v1/streams/mst_zpnqd7a2kxwg3vhr5tj4bfm6ec/outputs.",
22850
+ "description": "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.",
22562
22851
  "http": "GET",
22563
22852
  "path": "/media/v1/streams/{stream_id}/outputs",
22564
22853
  "streaming": "no",
@@ -22634,7 +22923,7 @@ export const operations = [
22634
22923
  "resource": "media.streams.outputs",
22635
22924
  "method": "retrieve",
22636
22925
  "summary": "Read one re-broadcast target",
22637
- "description": "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.",
22926
+ "description": "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.",
22638
22927
  "http": "GET",
22639
22928
  "path": "/media/v1/streams/{stream_id}/outputs/{output_id}",
22640
22929
  "streaming": "no",
@@ -27455,7 +27744,7 @@ export const operations = [
27455
27744
  "linux"
27456
27745
  ],
27457
27746
  "required": true,
27458
- "description": "The device's platform. macos and linux are accepted only for an organization with the local-agent-connect flag on; with it off, and for any other value, the claim answers INVALID_PARAMS."
27747
+ "description": "The device's platform. macos and linux are accepted for every organization; any other value than android, macos or linux answers INVALID_PARAMS."
27459
27748
  },
27460
27749
  {
27461
27750
  "name": "name",
@@ -34627,7 +34916,7 @@ export const operations = [
34627
34916
  "resource": "vault.vaults",
34628
34917
  "method": "create",
34629
34918
  "summary": "Create vault",
34630
- "description": "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.",
34919
+ "description": "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.",
34631
34920
  "http": "POST",
34632
34921
  "path": "/vault/v1/vaults",
34633
34922
  "streaming": "no",