@deepraxis/sdk 0.2.0-dev.2fd72e1 → 0.2.0-dev.4128f2c

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",
@@ -5326,7 +5380,7 @@ export const operations = [
5326
5380
  "trigger"
5327
5381
  ],
5328
5382
  "required": false,
5329
- "description": "Root initiator type: user, api_key, agent or trigger, inherited by child runs. run returns INPUT_INVALID; filter origin with channel=run or parent_run_id. Separate multiple values with commas to match any value."
5383
+ "description": "Root initiator type: user, api_key, agent, trigger or application, inherited by child runs. run returns INPUT_INVALID; filter origin with channel=run or parent_run_id. Separate multiple values with commas to match any value."
5330
5384
  },
5331
5385
  {
5332
5386
  "name": "initiator",
@@ -7584,11 +7638,200 @@ 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",
7590
7833
  "summary": "连接云端浏览器",
7591
- "description": "CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl。这是完整 CDP 连接:真手指或指针事件(Emulation.setTouchEmulationEnabled 加 Input.dispatchTouchEvent、拖拽用的 Input.dispatchMouseEvent)只能从这里发,页面动作接口只做按 ref 的语义动作。要挂指定登录态,可用 context 参数,或直接连接 sessions.create 返回的 connectUrl。",
7834
+ "description": "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。",
7592
7835
  "http": "GET",
7593
7836
  "path": "/browser/v1/connect",
7594
7837
  "streaming": "no",
@@ -7713,6 +7956,12 @@ export const operations = [
7713
7956
  "type": "object",
7714
7957
  "required": false,
7715
7958
  "description": "自定义字符串标签;最多 32 项,键最多 128 个 UTF-8 字节,值最多 1024 个 UTF-8 字节。"
7959
+ },
7960
+ {
7961
+ "name": "proxy",
7962
+ "type": "object",
7963
+ "required": false,
7964
+ "description": "给登录态绑定一个固定的外部代理(如住宅 IP),使用这个登录态的会话没有写 proxies 时都经它出网,让同一账号始终从同一个出口地址出去。只存保管库引用(password_secret),不存密码;会话自己写了 proxies 时以会话的为准。需要组织已开通容器后端,否则返回 501 PROVIDER_UNSUPPORTED。"
7716
7965
  }
7717
7966
  ]
7718
7967
  }
@@ -7784,6 +8033,12 @@ export const operations = [
7784
8033
  "type": "object",
7785
8034
  "required": false,
7786
8035
  "description": "自定义字符串标签;最多 32 项,键最多 128 个 UTF-8 字节,值最多 1024 个 UTF-8 字节。 更新时整体替换;空对象清除标签,省略则保留。"
8036
+ },
8037
+ {
8038
+ "name": "proxy",
8039
+ "type": "object",
8040
+ "required": false,
8041
+ "description": "给登录态绑定一个固定的外部代理(如住宅 IP),使用这个登录态的会话没有写 proxies 时都经它出网,让同一账号始终从同一个出口地址出去。只存保管库引用(password_secret),不存密码;会话自己写了 proxies 时以会话的为准。需要组织已开通容器后端,否则返回 501 PROVIDER_UNSUPPORTED。 更新时传 null 解除绑定,省略则保留原绑定。"
7787
8042
  }
7788
8043
  ]
7789
8044
  }
@@ -7792,7 +8047,7 @@ export const operations = [
7792
8047
  "resource": "browser.live",
7793
8048
  "method": "retrieve",
7794
8049
  "summary": "打开实时浏览器画面",
7795
- "description": "使用 debug 返回的完整实时观看地址打开浏览器画面,成功后跳转到对应会话或标签页。必须保留地址中的 t 凭证,无需额外 API Key;链接失效时重新调用 debug 获取地址。",
8050
+ "description": "旧版 debug 返回的带 t 凭证的地址,凭证在有效期内时跳转到该会话在 Console 的会话页。debug 现在直接返回 Console 会话页地址,新代码不要拼这个地址。",
7796
8051
  "http": "GET",
7797
8052
  "path": "/browser/v1/live/{sessionId}/{pageId}",
7798
8053
  "streaming": "no",
@@ -7890,7 +8145,7 @@ export const operations = [
7890
8145
  "resource": "browser.sessions",
7891
8146
  "method": "create",
7892
8147
  "summary": "创建浏览器会话",
7893
- "description": "创建云端 Chrome,返回自带凭证的 connectUrl;它是一条完整 CDP 连接,真指针事件(触摸、拖拽、按坐标点击)从那里发送,页面动作接口只做按 ref 的语义动作。API 会话默认断开后结束;最长 6 小时。运行中服务每 60 秒做一次健康检查(Browser.getVersion,超时 10 秒),连续 2 次失败即以 closeReason=watchdog 结束会话,keepAlive=true 也不豁免;该事件记录判据读数。",
8148
+ "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
8149
  "http": "POST",
7895
8150
  "path": "/browser/v1/sessions",
7896
8151
  "streaming": "no",
@@ -7914,7 +8169,7 @@ export const operations = [
7914
8169
  "organization"
7915
8170
  ],
7916
8171
  "required": false,
7917
- "description": "谁能看到这个新会话:默认 private 只有创建者;organization 允许同组织其他成员只读观看画面。"
8172
+ "description": "谁能看到这个新会话:默认 private 只有创建者;organization 允许同组织其他成员只读观看画面。自带浏览器(source.type 为 byob)的会话一律是 organization,传 private 也会被改成 organization,不报错。"
7918
8173
  },
7919
8174
  {
7920
8175
  "name": "keepAlive",
@@ -7938,7 +8193,13 @@ export const operations = [
7938
8193
  "name": "proxies",
7939
8194
  "type": "object",
7940
8195
  "required": false,
7941
- "description": "仅省略、false 或 [{type: 'none'}] 可用;其它代理配置返回 501。"
8196
+ "description": "让会话经一个固定的外部 HTTP 代理(如住宅 IP)出网:[{type: 'external', server: 'host:port', username?, password_secret?}];省略、false 或 [{type: 'none'}] 表示不用代理。只能有一个代理条目;密码推荐用 password_secret 引用保管库(只在连接代理主机时兑换),也可以直接给明文 password,二者不能同时出现。带代理的会话一定在我们的 Chrome 容器里运行,需要组织已开通容器后端,否则返回 501 PROVIDER_UNSUPPORTED;不能与 source.type 为 cloud 或 byob 同用,返回 400 INVALID_PARAMS(格式错误、私网地址、用户名没有密码等同样返回 400,reason 写明原因)。其它代理类型和 socks5 返回 501 PROVIDER_UNSUPPORTED。要让某个账号始终从同一个出口地址出去,把代理绑定在登录态上(contexts 的 proxy),不必每次会话重复传。"
8197
+ },
8198
+ {
8199
+ "name": "source",
8200
+ "type": "object",
8201
+ "required": false,
8202
+ "description": "选择浏览器后端,只有 container 支持外部代理:cloud(Browser Run)和 byob 都不能用代理。{type: 'cloud'}:Browser Run,启动最快、不能用代理、自动化特征可被网站发现。{type: 'container'}:我们自己的 Chrome 容器,可带 proxies(或用登录态绑定的代理),也可不带;组织未开通容器后端时返回 501 PROVIDER_UNSUPPORTED。{type: 'byob', browser: 'byb_…'}:用户自己配对的浏览器,不能与 proxies 或登录态同用。简写 {byob: 'byb_…'} 等同最后一种。省略时按旧规则:带 proxies 进容器,否则 Browser Run。cloud 加代理、未知 type、格式错误都返回 400 INVALID_PARAMS。"
7942
8203
  },
7943
8204
  {
7944
8205
  "name": "region",
@@ -18584,7 +18845,7 @@ export const operations = [
18584
18845
  "resource": "devops.units",
18585
18846
  "method": "push",
18586
18847
  "summary": "Push a unit's branch",
18587
- "description": "Publish the unit's local commits to the remote for the change: the machine itself holds no git credential and cannot reach the remote, so this verb is the way work done on a unit lands. ref says what to push — branch for the change's own branch, wip for this unit's own refs/praxis/wip/<change>, or a full ref name; anything else (the default branch, another change's branch, a tag, another unit's wip ref) is refused with 400 PUSH_REF_FORBIDDEN and nothing is pushed. expectedHead is the commit you believe the remote branch is at now; DevOps checks it before signing anything, and a remote that has moved since answers 409 HEAD_MOVED with nothing pushed, so fetch first when unsure, reconcile, and send the new head. For branch the call also takes a lease on that head, so the push cannot silently overwrite work that landed in between; wip is this change's own ref and is force-pushed. On success the answer is pushedSha, the commit that landed. Commit inside the machine first, through the sandbox instance API — this verb pushes commits, it does not create them. The unit must be available with a machine and a checkout, or the call answers 409 UNIT_INVALID_STATE; a push that git refuses inside the machine answers with the cause in the error message and in details.detail (the last 4000 characters of git's output, credentials redacted) and details.exitCode (git's exit code): 409 PUSH_REJECTED_BY_HOOK when a pre-push hook such as lefthook rejected it, so read the hook output, fix the content and push again, 409 PUSH_REJECTED_NON_FAST_FORWARD when the remote moved ahead, so fetch and reconcile, 409 HEAD_MOVED when the lease on expectedHead no longer holds, and 500 PUSH_FAILED for anything else. Do not retry the same push unchanged.",
18848
+ "description": "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.",
18588
18849
  "http": "POST",
18589
18850
  "path": "/devops/v1/units/{id}:push",
18590
18851
  "streaming": "no",
@@ -20919,6 +21180,42 @@ export const operations = [
20919
21180
  ],
20920
21181
  "query": []
20921
21182
  },
21183
+ {
21184
+ "resource": "media.libraries.assets.works",
21185
+ "method": "list",
21186
+ "summary": "List works using an asset",
21187
+ "description": "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.",
21188
+ "http": "GET",
21189
+ "path": "/media/v1/libraries/{library_id}/assets/{asset_id}/works",
21190
+ "streaming": "no",
21191
+ "pagination": true,
21192
+ "pathParams": [
21193
+ {
21194
+ "name": "library_id",
21195
+ "sdkName": "library_id",
21196
+ "description": "Library ID returned by creation."
21197
+ },
21198
+ {
21199
+ "name": "asset_id",
21200
+ "sdkName": "asset_id",
21201
+ "description": "32-character asset ID."
21202
+ }
21203
+ ],
21204
+ "query": [
21205
+ {
21206
+ "name": "limit",
21207
+ "type": "integer",
21208
+ "required": false,
21209
+ "description": "Maximum entries in this page, from 1 through 100; defaults to 100."
21210
+ },
21211
+ {
21212
+ "name": "cursor",
21213
+ "type": "string",
21214
+ "required": false,
21215
+ "description": "Cursor from the previous next_cursor."
21216
+ }
21217
+ ]
21218
+ },
20922
21219
  {
20923
21220
  "resource": "media.libraries.assets",
20924
21221
  "method": "batch",
@@ -22188,6 +22485,213 @@ export const operations = [
22188
22485
  ]
22189
22486
  }
22190
22487
  },
22488
+ {
22489
+ "resource": "media.libraries.works",
22490
+ "method": "list",
22491
+ "summary": "List works",
22492
+ "description": "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.",
22493
+ "http": "GET",
22494
+ "path": "/media/v1/libraries/{library_id}/works",
22495
+ "streaming": "no",
22496
+ "pagination": true,
22497
+ "pathParams": [
22498
+ {
22499
+ "name": "library_id",
22500
+ "sdkName": "library_id",
22501
+ "description": "Library ID returned by creation."
22502
+ }
22503
+ ],
22504
+ "query": [
22505
+ {
22506
+ "name": "kind",
22507
+ "type": "string",
22508
+ "enum": [
22509
+ "gallery",
22510
+ "article",
22511
+ "product_listing"
22512
+ ],
22513
+ "required": false,
22514
+ "description": "Only works of this kind: gallery, article or product_listing."
22515
+ },
22516
+ {
22517
+ "name": "series",
22518
+ "type": "string",
22519
+ "required": false,
22520
+ "description": "Only works of this series."
22521
+ },
22522
+ {
22523
+ "name": "q",
22524
+ "type": "string",
22525
+ "required": false,
22526
+ "description": "Only works whose title contains this text, at most 100 characters."
22527
+ },
22528
+ {
22529
+ "name": "limit",
22530
+ "type": "integer",
22531
+ "required": false,
22532
+ "description": "Maximum entries in this page, from 1 through 100; defaults to 100."
22533
+ },
22534
+ {
22535
+ "name": "cursor",
22536
+ "type": "string",
22537
+ "required": false,
22538
+ "description": "Cursor from the previous next_cursor."
22539
+ }
22540
+ ]
22541
+ },
22542
+ {
22543
+ "resource": "media.libraries.works",
22544
+ "method": "create",
22545
+ "summary": "Create work",
22546
+ "description": "Create a work in a library: a gallery (图文), an article (长文) or a product listing (商品图组) that orders references to assets of this same library and adds a title and text. Upload or generate the pictures first, then send kind and body. In an article an inline image is written ![alt](asset:<asset_id>) where it should appear. Every asset the body names must be a live image or sticker of this library (a gallery item may also be a video), or the request is refused naming every bad reference and nothing is saved. Price, stock and other unknown fields are refused. Several platform versions of one story are several works with the same series. A work copies no file and changes no asset; creating one is free. Answers 201 with the work. Example: POST /media/v1/libraries/default/works with {\"kind\":\"gallery\",\"series\":\"ai-diary-01\",\"body\":{\"title\":\"AI 创业第一天就踩坑\",\"items\":[{\"asset_id\":\"<asset id>\"}]}}.",
22547
+ "http": "POST",
22548
+ "path": "/media/v1/libraries/{library_id}/works",
22549
+ "streaming": "no",
22550
+ "pagination": false,
22551
+ "pathParams": [
22552
+ {
22553
+ "name": "library_id",
22554
+ "sdkName": "library_id",
22555
+ "description": "Library ID returned by creation."
22556
+ }
22557
+ ],
22558
+ "query": [],
22559
+ "body": {
22560
+ "required": true,
22561
+ "fields": [
22562
+ {
22563
+ "name": "kind",
22564
+ "type": "string",
22565
+ "enum": [
22566
+ "gallery",
22567
+ "article",
22568
+ "product_listing"
22569
+ ],
22570
+ "required": true,
22571
+ "description": "Kind of work: gallery (图文), article (长文) or product_listing (商品图组). short_video is reserved."
22572
+ },
22573
+ {
22574
+ "name": "body",
22575
+ "type": "object",
22576
+ "required": true
22577
+ },
22578
+ {
22579
+ "name": "series",
22580
+ "type": "string",
22581
+ "required": false,
22582
+ "description": "Groups the platform versions of one story: 1 to 64 characters of a-z, 0-9, _ and -."
22583
+ },
22584
+ {
22585
+ "name": "custom",
22586
+ "type": "object",
22587
+ "required": false
22588
+ }
22589
+ ]
22590
+ }
22591
+ },
22592
+ {
22593
+ "resource": "media.libraries.works",
22594
+ "method": "delete",
22595
+ "summary": "Delete work",
22596
+ "description": "Delete a work. Only the work goes: every asset it named stays in the library unchanged.",
22597
+ "http": "DELETE",
22598
+ "path": "/media/v1/libraries/{library_id}/works/{work_id}",
22599
+ "streaming": "no",
22600
+ "pagination": false,
22601
+ "pathParams": [
22602
+ {
22603
+ "name": "library_id",
22604
+ "sdkName": "library_id",
22605
+ "description": "Library ID returned by creation."
22606
+ },
22607
+ {
22608
+ "name": "work_id",
22609
+ "sdkName": "work_id",
22610
+ "description": "Work id (wrk_…) returned by creation or listing."
22611
+ }
22612
+ ],
22613
+ "query": []
22614
+ },
22615
+ {
22616
+ "resource": "media.libraries.works",
22617
+ "method": "retrieve",
22618
+ "summary": "Get work",
22619
+ "description": "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.",
22620
+ "http": "GET",
22621
+ "path": "/media/v1/libraries/{library_id}/works/{work_id}",
22622
+ "streaming": "no",
22623
+ "pagination": false,
22624
+ "pathParams": [
22625
+ {
22626
+ "name": "library_id",
22627
+ "sdkName": "library_id",
22628
+ "description": "Library ID returned by creation."
22629
+ },
22630
+ {
22631
+ "name": "work_id",
22632
+ "sdkName": "work_id",
22633
+ "description": "Work id (wrk_…) returned by creation or listing."
22634
+ }
22635
+ ],
22636
+ "query": [
22637
+ {
22638
+ "name": "expand",
22639
+ "type": "string",
22640
+ "required": false,
22641
+ "description": "assets returns every referenced asset with its URLs and size."
22642
+ }
22643
+ ]
22644
+ },
22645
+ {
22646
+ "resource": "media.libraries.works",
22647
+ "method": "update",
22648
+ "summary": "Update work",
22649
+ "description": "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}}}.",
22650
+ "http": "PATCH",
22651
+ "path": "/media/v1/libraries/{library_id}/works/{work_id}",
22652
+ "streaming": "no",
22653
+ "pagination": false,
22654
+ "pathParams": [
22655
+ {
22656
+ "name": "library_id",
22657
+ "sdkName": "library_id",
22658
+ "description": "Library ID returned by creation."
22659
+ },
22660
+ {
22661
+ "name": "work_id",
22662
+ "sdkName": "work_id",
22663
+ "description": "Work id (wrk_…) returned by creation or listing."
22664
+ }
22665
+ ],
22666
+ "query": [],
22667
+ "body": {
22668
+ "required": true,
22669
+ "fields": [
22670
+ {
22671
+ "name": "body",
22672
+ "type": "object",
22673
+ "required": false
22674
+ },
22675
+ {
22676
+ "name": "series",
22677
+ "type": "string",
22678
+ "required": false,
22679
+ "description": "A new series, or null to clear it."
22680
+ },
22681
+ {
22682
+ "name": "custom",
22683
+ "type": "object",
22684
+ "required": false
22685
+ },
22686
+ {
22687
+ "name": "if_revision",
22688
+ "type": "number",
22689
+ "required": false,
22690
+ "description": "Apply the change only if the work is still at this revision; otherwise the answer is 409 REVISION_CONFLICT with the current revision."
22691
+ }
22692
+ ]
22693
+ }
22694
+ },
22191
22695
  {
22192
22696
  "resource": "media.pipelines",
22193
22697
  "method": "list",
@@ -25823,7 +26327,7 @@ export const operations = [
25823
26327
  "resource": "organization.costs",
25824
26328
  "method": "list",
25825
26329
  "summary": "List Organization Costs",
25826
- "description": "Billed cost per time bucket per group (AWS GetCostAndUsage shape). Buckets are whole UTC hour/day periods; a window is answered over the aligned envelope covering it. Amounts are exact decimal strings in the currency the organization was charged in (BillingCurrency, CNY or USD); a group charged in two currencies is two results. estimated is always false: charges are final when they are recorded. Windows span at most 93 days; longer ranges belong to the charges export.\n",
26330
+ "description": "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.\n",
25827
26331
  "http": "GET",
25828
26332
  "path": "/organization/v1/costs",
25829
26333
  "streaming": "no",
@@ -25856,7 +26360,7 @@ export const operations = [
25856
26360
  "name": "time_zone",
25857
26361
  "type": "string",
25858
26362
  "required": false,
25859
- "description": "IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. The window widens to whole local buckets; a day that crosses a daylight-saving change lasts 23 or 25 hours. starting_at and ending_at stay UTC instants.\n"
26363
+ "description": "IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. Only zones whose UTC offset is a whole number of hours across the whole window are supported; zones such as Asia/Kolkata (+05:30) or Asia/Kathmandu (+05:45) are rejected with 400 VALIDATION_ERROR, because Billing buckets in UTC hours and a local hour of those zones straddles two of them. With bucket_width=1d the window widens to whole local days, each bucket carries its real UTC starting_at and ending_at, and a day that crosses a daylight-saving change lasts 23 or 25 hours; the whole window is then answered in one page (has_more is false and page is not accepted). starting_at and ending_at stay UTC instants.\n"
25860
26364
  },
25861
26365
  {
25862
26366
  "name": "group_by",
@@ -26222,29 +26726,46 @@ export const operations = [
26222
26726
  {
26223
26727
  "resource": "organization.notifications.letters",
26224
26728
  "method": "list",
26225
- "summary": "List the letters addressed to you",
26226
- "description": "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.",
26729
+ "summary": "List the letters addressed to you, or the ones you sent",
26730
+ "description": "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.",
26227
26731
  "http": "GET",
26228
26732
  "path": "/organization/v1/notifications/letters",
26229
26733
  "streaming": "no",
26230
26734
  "pagination": false,
26231
26735
  "pathParams": [],
26232
26736
  "query": [
26737
+ {
26738
+ "name": "direction",
26739
+ "type": "string",
26740
+ "enum": [
26741
+ "received",
26742
+ "sent"
26743
+ ],
26744
+ "required": false,
26745
+ "description": "received (the default) lists the letters addressed to you; sent lists the letters you wrote, scheduled ones included, in the same row shape — a script or an agent finds its own alarm clocks there. A run credential's sent list is the letters automation wrote on behalf of the person it acts for."
26746
+ },
26233
26747
  {
26234
26748
  "name": "status",
26235
26749
  "type": "string",
26236
26750
  "enum": [
26237
26751
  "unread",
26238
- "read"
26752
+ "read",
26753
+ "scheduled"
26239
26754
  ],
26240
26755
  "required": false,
26241
- "description": "Only unread letters, or only read ones; omit for both."
26756
+ "description": "Only unread letters, only read ones, or (direction=sent only) only letters written but not yet delivered, whose deliveredAt is null; omit for all. On a sent list, unread and read are the recipient's state."
26757
+ },
26758
+ {
26759
+ "name": "thread",
26760
+ "type": "string",
26761
+ "required": false,
26762
+ "description": "Only letters of this conversation, for received and sent alike; omit for all."
26242
26763
  },
26243
26764
  {
26244
26765
  "name": "archived",
26245
26766
  "type": "boolean",
26246
26767
  "required": false,
26247
- "description": "false (the default) hides archived letters; true lists only the archived ones."
26768
+ "description": "false (the default) hides archived letters; true lists only the archived ones. Archiving is the addressee's act, so it is ignored when direction=sent."
26248
26769
  },
26249
26770
  {
26250
26771
  "name": "limit",
@@ -26260,6 +26781,64 @@ export const operations = [
26260
26781
  }
26261
26782
  ]
26262
26783
  },
26784
+ {
26785
+ "resource": "organization.notifications.letters",
26786
+ "method": "create",
26787
+ "summary": "Send a letter to a person or an agent",
26788
+ "description": "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.",
26789
+ "http": "POST",
26790
+ "path": "/organization/v1/notifications/letters",
26791
+ "streaming": "no",
26792
+ "pagination": false,
26793
+ "pathParams": [],
26794
+ "query": [],
26795
+ "body": {
26796
+ "required": true,
26797
+ "fields": [
26798
+ {
26799
+ "name": "to",
26800
+ "type": "string",
26801
+ "required": true,
26802
+ "description": "The recipient's address: human:<user id> or agent:<agent id>, a member or an agent of this organization."
26803
+ },
26804
+ {
26805
+ "name": "body",
26806
+ "type": "string",
26807
+ "required": true,
26808
+ "description": "The whole letter, 1 to 16000 characters."
26809
+ },
26810
+ {
26811
+ "name": "summary",
26812
+ "type": "string",
26813
+ "required": false,
26814
+ "description": "One sentence saying what the reader is asked to do or needs to know, at most 60 characters. Required when to is a person; refused, never cut, when longer."
26815
+ },
26816
+ {
26817
+ "name": "kind",
26818
+ "type": "string",
26819
+ "enum": [
26820
+ "notice",
26821
+ "mention",
26822
+ "decision"
26823
+ ],
26824
+ "required": false,
26825
+ "description": "The letter's kind; it decides the channels. Defaults to mention."
26826
+ },
26827
+ {
26828
+ "name": "thread",
26829
+ "type": "string",
26830
+ "required": false,
26831
+ "description": "The conversation the letter belongs to, free text; omit for none."
26832
+ },
26833
+ {
26834
+ "name": "deliver_at",
26835
+ "type": "string",
26836
+ "required": false,
26837
+ "description": "When to deliver it, ISO 8601, at most 366 days ahead. A past time or no value means now."
26838
+ }
26839
+ ]
26840
+ }
26841
+ },
26263
26842
  {
26264
26843
  "resource": "organization.notifications.letters",
26265
26844
  "method": "retrieve",
@@ -26342,6 +26921,124 @@ export const operations = [
26342
26921
  ]
26343
26922
  }
26344
26923
  },
26924
+ {
26925
+ "resource": "organization.notifications.messages",
26926
+ "method": "list",
26927
+ "summary": "List your bell messages",
26928
+ "description": "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.",
26929
+ "http": "GET",
26930
+ "path": "/organization/v1/notifications/messages",
26931
+ "streaming": "no",
26932
+ "pagination": false,
26933
+ "pathParams": [],
26934
+ "query": [
26935
+ {
26936
+ "name": "archived",
26937
+ "type": "string",
26938
+ "enum": [
26939
+ "0",
26940
+ "1"
26941
+ ],
26942
+ "required": false,
26943
+ "description": "0 (the default) lists the inbox tab, 1 lists archived messages."
26944
+ },
26945
+ {
26946
+ "name": "limit",
26947
+ "type": "integer",
26948
+ "required": false,
26949
+ "description": "Messages per page, 1 to 100; defaults to 20."
26950
+ },
26951
+ {
26952
+ "name": "page",
26953
+ "type": "string",
26954
+ "required": false,
26955
+ "description": "Opaque nextPageToken from the previous response; omit for the first page."
26956
+ }
26957
+ ]
26958
+ },
26959
+ {
26960
+ "resource": "organization.notifications.messages",
26961
+ "method": "delete",
26962
+ "summary": "Delete one of your bell messages",
26963
+ "description": "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.",
26964
+ "http": "DELETE",
26965
+ "path": "/organization/v1/notifications/messages/{name}",
26966
+ "streaming": "no",
26967
+ "pagination": false,
26968
+ "pathParams": [
26969
+ {
26970
+ "name": "name",
26971
+ "sdkName": "name",
26972
+ "description": "The message's `name` from the messages list, subscribers/{user}/messages/{id}, URL-encoded."
26973
+ }
26974
+ ],
26975
+ "query": []
26976
+ },
26977
+ {
26978
+ "resource": "organization.notifications.messages",
26979
+ "method": "retrieve",
26980
+ "summary": "Open one of your bell messages",
26981
+ "description": "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.",
26982
+ "http": "GET",
26983
+ "path": "/organization/v1/notifications/messages/{name}",
26984
+ "streaming": "no",
26985
+ "pagination": false,
26986
+ "pathParams": [
26987
+ {
26988
+ "name": "name",
26989
+ "sdkName": "name",
26990
+ "description": "The message's `name` from the messages list, subscribers/{user}/messages/{id}, URL-encoded."
26991
+ }
26992
+ ],
26993
+ "query": []
26994
+ },
26995
+ {
26996
+ "resource": "organization.notifications.messages",
26997
+ "method": "update",
26998
+ "summary": "Mark one of your bell messages read or archived",
26999
+ "description": "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.",
27000
+ "http": "POST",
27001
+ "path": "/organization/v1/notifications/messages/{name}",
27002
+ "streaming": "no",
27003
+ "pagination": false,
27004
+ "pathParams": [
27005
+ {
27006
+ "name": "name",
27007
+ "sdkName": "name",
27008
+ "description": "The message's `name` from the messages list, subscribers/{user}/messages/{id}, URL-encoded."
27009
+ }
27010
+ ],
27011
+ "query": [],
27012
+ "body": {
27013
+ "required": true,
27014
+ "fields": [
27015
+ {
27016
+ "name": "read",
27017
+ "type": "boolean",
27018
+ "required": false,
27019
+ "description": "Mark the message read (true) or unread (false); omit to leave it."
27020
+ },
27021
+ {
27022
+ "name": "archived",
27023
+ "type": "boolean",
27024
+ "required": false,
27025
+ "description": "Archive the message (true) or move it back to the inbox (false); omit to leave it."
27026
+ }
27027
+ ]
27028
+ }
27029
+ },
27030
+ {
27031
+ "resource": "organization.notifications.messages",
27032
+ "method": "readAll",
27033
+ "summary": "Mark all your unread bell messages read",
27034
+ "description": "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.",
27035
+ "http": "POST",
27036
+ "path": "/organization/v1/notifications/messages:readAll",
27037
+ "streaming": "no",
27038
+ "pagination": false,
27039
+ "pathParams": [],
27040
+ "query": []
27041
+ },
26345
27042
  {
26346
27043
  "resource": "organization.notifications",
26347
27044
  "method": "retrieveOrganizationDefault",
@@ -26453,7 +27150,7 @@ export const operations = [
26453
27150
  "resource": "organization.usage",
26454
27151
  "method": "list",
26455
27152
  "summary": "List Organization Usage",
26456
- "description": "Consumed quantity per time bucket per group. Buckets are whole UTC hour/day periods covering the requested window. Each result carries exactly one ConsumedQuantity + ConsumedUnit — quantities of different units are never added together.\n",
27153
+ "description": "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.\n",
26457
27154
  "http": "GET",
26458
27155
  "path": "/organization/v1/usage",
26459
27156
  "streaming": "no",
@@ -26486,7 +27183,7 @@ export const operations = [
26486
27183
  "name": "time_zone",
26487
27184
  "type": "string",
26488
27185
  "required": false,
26489
- "description": "IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. The window widens to whole local buckets; a day that crosses a daylight-saving change lasts 23 or 25 hours. starting_at and ending_at stay UTC instants.\n"
27186
+ "description": "IANA time zone name (for example Asia/Shanghai) whose local hours or days form the buckets. Defaults to UTC. Offsets such as +08:00 are rejected. Only zones whose UTC offset is a whole number of hours across the whole window are supported; zones such as Asia/Kolkata (+05:30) or Asia/Kathmandu (+05:45) are rejected with 400 VALIDATION_ERROR, because Billing buckets in UTC hours and a local hour of those zones straddles two of them. With bucket_width=1d the window widens to whole local days, each bucket carries its real UTC starting_at and ending_at, and a day that crosses a daylight-saving change lasts 23 or 25 hours; the whole window is then answered in one page (has_more is false and page is not accepted). starting_at and ending_at stay UTC instants.\n"
26490
27187
  },
26491
27188
  {
26492
27189
  "name": "group_by",
@@ -27495,7 +28192,7 @@ export const operations = [
27495
28192
  "linux"
27496
28193
  ],
27497
28194
  "required": true,
27498
- "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."
28195
+ "description": "The device's platform. macos and linux are accepted for every organization; any other value than android, macos or linux answers INVALID_PARAMS."
27499
28196
  },
27500
28197
  {
27501
28198
  "name": "name",
@@ -34667,7 +35364,7 @@ export const operations = [
34667
35364
  "resource": "vault.vaults",
34668
35365
  "method": "create",
34669
35366
  "summary": "Create vault",
34670
- "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.",
35367
+ "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.",
34671
35368
  "http": "POST",
34672
35369
  "path": "/vault/v1/vaults",
34673
35370
  "streaming": "no",