@deepraxis/sdk 0.1.1-dev.75f07a9 → 0.1.1-dev.77dc43d

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.
@@ -61,7 +61,7 @@ export const operations = [
61
61
  "resource": "agent.agents",
62
62
  "method": "create",
63
63
  "summary": "Create agent",
64
- "description": "Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: \"custom\", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send \"latest\", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: \"agent_toolset_20260401\"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: \"agent_toolset_20260401\", default_config: {enabled: false}, configs: [{name: \"codemode\", enabled: true}, {name: \"bash\", enabled: true, permission_policy: {type: \"always_ask\"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 \"model <id> is not in the model catalog\" and an embedding, image or speech model returns 400 \"model <id> cannot run an agent\". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {\"name\":\"helper\",\"model\":{\"id\":\"deepseek-flash\"},\"tools\":[{\"type\":\"agent_toolset_20260401\"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; omit computer_id to register a new computer named after the agent without starting an instance, or provide an existing computer_id; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.",
64
+ "description": "Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. Omit kind to create a service agent (Managed Agents behaviour: a fresh environment per session). Pass kind: \"general\" for an employee-style agent with its own computer, created with it; size and template come from the agent's computers configuration. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: \"custom\", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send \"latest\", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: \"agent_toolset_20260401\"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: \"agent_toolset_20260401\", default_config: {enabled: false}, configs: [{name: \"codemode\", enabled: true}, {name: \"bash\", enabled: true, permission_policy: {type: \"always_ask\"}}]}]; every tool not listed, including todo_write, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 \"model <id> is not in the model catalog\" and an embedding, image or speech model returns 400 \"model <id> cannot run an agent\". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {\"name\":\"helper\",\"model\":{\"id\":\"deepseek-flash\"},\"tools\":[{\"type\":\"agent_toolset_20260401\"}]}. kind defaults to service when it is omitted and no computer_id is given, and to general when computer_id is given; it cannot change after creation. A general or assume agent created without computer_id gets a new computer registered in the same request, named after the agent; a service agent with computer_id returns 400. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.",
65
65
  "http": "POST",
66
66
  "path": "/agent/v1/agents",
67
67
  "streaming": "no",
@@ -144,7 +144,7 @@ export const operations = [
144
144
  "assume"
145
145
  ],
146
146
  "required": false,
147
- "description": "Immutable agent kind. general requires computer_id; on creation, assume may omit computer_id to register a new computer named after the agent, without starting an instance; assume has no conversation model and rejects model, models, subagent_model, subagents and multiagent; service cannot bind a computer. Omit on create to infer from computer_id (general with a computer, service without). On update, the same kind is ignored; changing kind or crossing its computer binding returns 400 invalid_request_error."
147
+ "description": "Immutable agent kind. general uses a durable computer and acts for its owner; service uses a clean environment per session; assume is driven over MCP with a durable computer and no conversation model. Omit on create to infer from computer_id (general with a computer, service without). A general or assume agent created without computer_id registers a new computer named after the agent in the same request; a service agent cannot take computer_id. assume rejects model, models, subagent_model, subagents and multiagent. On update, the same kind is ignored; changing kind or crossing its computer binding returns 400 invalid_request_error."
148
148
  },
149
149
  {
150
150
  "name": "computer_id",
@@ -372,7 +372,7 @@ export const operations = [
372
372
  "assume"
373
373
  ],
374
374
  "required": false,
375
- "description": "Immutable agent kind. general requires computer_id; on creation, assume may omit computer_id to register a new computer named after the agent, without starting an instance; assume has no conversation model and rejects model, models, subagent_model, subagents and multiagent; service cannot bind a computer. Omit on create to infer from computer_id (general with a computer, service without). On update, the same kind is ignored; changing kind or crossing its computer binding returns 400 invalid_request_error."
375
+ "description": "Immutable agent kind. general uses a durable computer and acts for its owner; service uses a clean environment per session; assume is driven over MCP with a durable computer and no conversation model. Omit on create to infer from computer_id (general with a computer, service without). A general or assume agent created without computer_id registers a new computer named after the agent in the same request; a service agent cannot take computer_id. assume rejects model, models, subagent_model, subagents and multiagent. On update, the same kind is ignored; changing kind or crossing its computer binding returns 400 invalid_request_error."
376
376
  },
377
377
  {
378
378
  "name": "computer_id",
@@ -1090,7 +1090,7 @@ export const operations = [
1090
1090
  "resource": "agent.computers",
1091
1091
  "method": "list",
1092
1092
  "summary": "List Computers",
1093
- "description": "List the computers of your organization, archived ones included.\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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1093
+ "description": "List the computers of your organization, archived ones included.\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.",
1094
1094
  "http": "GET",
1095
1095
  "path": "/agent/v1/computers",
1096
1096
  "streaming": "no",
@@ -1115,7 +1115,7 @@ export const operations = [
1115
1115
  "resource": "agent.computers",
1116
1116
  "method": "create",
1117
1117
  "summary": "Create Computer",
1118
- "description": "Create a durable computer: a named machine whose files outlive sessions, for general agents.\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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1118
+ "description": "Create a durable computer: a named machine whose files outlive sessions, for general agents.\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.",
1119
1119
  "http": "POST",
1120
1120
  "path": "/agent/v1/computers",
1121
1121
  "streaming": "no",
@@ -1162,7 +1162,7 @@ export const operations = [
1162
1162
  "resource": "agent.computers",
1163
1163
  "method": "retrieve",
1164
1164
  "summary": "Get Computer",
1165
- "description": "Read one computer's status, storage use and sandbox id.\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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1165
+ "description": "Read one computer's status, storage use and sandbox id.\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.",
1166
1166
  "http": "GET",
1167
1167
  "path": "/agent/v1/computers/{computer_id}",
1168
1168
  "streaming": "no",
@@ -1180,7 +1180,7 @@ export const operations = [
1180
1180
  "resource": "agent.computers",
1181
1181
  "method": "update",
1182
1182
  "summary": "Update Computer",
1183
- "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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1183
+ "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.",
1184
1184
  "http": "POST",
1185
1185
  "path": "/agent/v1/computers/{computer_id}",
1186
1186
  "streaming": "no",
@@ -1209,7 +1209,7 @@ export const operations = [
1209
1209
  "resource": "agent.computers",
1210
1210
  "method": "archive",
1211
1211
  "summary": "Archive Computer",
1212
- "description": "Archive a computer: its files stay readable but new sessions cannot use it.\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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1212
+ "description": "Archive a computer: its files stay readable but new sessions cannot use it.\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. A computer an active agent holds is refused with 409 COMPUTER_IN_USE; archive the agent first.",
1213
1213
  "http": "POST",
1214
1214
  "path": "/agent/v1/computers/{computer_id}/archive",
1215
1215
  "streaming": "no",
@@ -1289,7 +1289,7 @@ export const operations = [
1289
1289
  "resource": "agent.computers.files",
1290
1290
  "method": "list",
1291
1291
  "summary": "List Computer Files",
1292
- "description": "List the entries of one directory on 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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1292
+ "description": "List the entries of one directory on 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.",
1293
1293
  "http": "GET",
1294
1294
  "path": "/agent/v1/computers/{computer_id}/files",
1295
1295
  "streaming": "no",
@@ -1314,7 +1314,7 @@ export const operations = [
1314
1314
  "resource": "agent.computers.files",
1315
1315
  "method": "retrieveContent",
1316
1316
  "summary": "Get Computer File Content",
1317
- "description": "Download the bytes of one file on a computer, up to 16 MiB, with single-range support.\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; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.",
1317
+ "description": "Download the bytes of one file on a computer, up to 16 MiB, with single-range support.\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.",
1318
1318
  "http": "GET",
1319
1319
  "path": "/agent/v1/computers/{computer_id}/files/content",
1320
1320
  "streaming": "no",
@@ -1360,6 +1360,50 @@ export const operations = [
1360
1360
  }
1361
1361
  ]
1362
1362
  },
1363
+ {
1364
+ "resource": "agent.computers.files",
1365
+ "method": "retrievePreview",
1366
+ "summary": "Preview a computer file",
1367
+ "description": "The preview product of one version of one computer file: an image becomes a 1600 px WebP, an Office document a linearized PDF, text and source the first 64 KiB, and PDF, xlsx, epub, GIF, SVG and unknown types their original bytes. Products live in the File service and are keyed by computer, path, size, mtime, variant and format version. A request that pins `v` answers from that registry without stat'ing or waking the computer; without `v` the file is read and the product generated once. A file over the size threshold, or a deployment without the File service, answers `fallback: \"content\"` so the caller keeps the ordinary content door.",
1368
+ "http": "GET",
1369
+ "path": "/agent/v1/computers/{computer_id}/files/preview",
1370
+ "streaming": "no",
1371
+ "pagination": false,
1372
+ "pathParams": [
1373
+ {
1374
+ "name": "computer_id",
1375
+ "sdkName": "computer_id",
1376
+ "description": "Computer id from computer creation or listing; a computer another tenant owns is not found."
1377
+ }
1378
+ ],
1379
+ "query": [
1380
+ {
1381
+ "name": "path",
1382
+ "type": "string",
1383
+ "required": true,
1384
+ "description": "Absolute path of the file on the computer, or a /workspace/ relative path."
1385
+ },
1386
+ {
1387
+ "name": "v",
1388
+ "type": "string",
1389
+ "required": false,
1390
+ "description": "The file version to answer for: the file listing's version (<size>-<mtimeMs>), or the full product version (<size>-<mtimeMs>-<variant>-fmt<N>) a previous answer returned. A pinned version answers from the product registry without a stat or a wake."
1391
+ },
1392
+ {
1393
+ "name": "variant",
1394
+ "type": "string",
1395
+ "enum": [
1396
+ "auto",
1397
+ "image",
1398
+ "pdf",
1399
+ "text",
1400
+ "original"
1401
+ ],
1402
+ "required": false,
1403
+ "description": "The product to answer; auto picks the kind's own (image, pdf, text or original). A variant the file cannot produce answers 400 PREVIEW_VARIANT_UNAVAILABLE."
1404
+ }
1405
+ ]
1406
+ },
1363
1407
  {
1364
1408
  "resource": "agent.computers.leases",
1365
1409
  "method": "delete",
@@ -2742,6 +2786,35 @@ export const operations = [
2742
2786
  ]
2743
2787
  }
2744
2788
  },
2789
+ {
2790
+ "resource": "agent.sessions.name",
2791
+ "method": "create",
2792
+ "summary": "Rename Session (Extension)",
2793
+ "description": "Give a session a short, branch-like name; the main session is always main and cannot be renamed.\n\nAvailable only on /agent/v1. The name is normalized first (surrounding whitespace trimmed, upper case folded to lowercase, runs of whitespace become one hyphen, characters the rule does not admit dropped, and no hyphen left hanging at either end) and then validated: non-empty, at most 32 display columns wide (a Han character counts as two), made only of Han characters, lowercase ASCII letters, digits and hyphens, and never the reserved word main. A name another of the caller's own sessions already holds is not an error: the answer carries a numeric suffix (base-2, base-3, …). Renaming the main session returns 400; a missing session, one that belongs to another caller, or one the caller cannot write returns 404. Returns 200 with the same Session shape as retrieval, name set to the new name; one rename writes a session.renamed event. Example: POST /agent/v1/sessions/sesn_login/name with body {\"name\":\"login-fix\"}.",
2794
+ "http": "POST",
2795
+ "path": "/agent/v1/sessions/{session_id}/name",
2796
+ "streaming": "no",
2797
+ "pagination": false,
2798
+ "pathParams": [
2799
+ {
2800
+ "name": "session_id",
2801
+ "sdkName": "session_id",
2802
+ "description": "Session id from session creation or listing. The reserved name main is not renameable."
2803
+ }
2804
+ ],
2805
+ "query": [],
2806
+ "body": {
2807
+ "required": true,
2808
+ "fields": [
2809
+ {
2810
+ "name": "name",
2811
+ "type": "string",
2812
+ "required": true,
2813
+ "description": "The session's new short name: Han characters, lowercase ASCII letters, digits and hyphens, at most 32 columns (a Han character counts as two), never the reserved word main. Surrounding whitespace is trimmed and uppercase is folded to lowercase."
2814
+ }
2815
+ ]
2816
+ }
2817
+ },
2745
2818
  {
2746
2819
  "resource": "agent.sessions.requests",
2747
2820
  "method": "list",
@@ -4080,7 +4153,7 @@ export const operations = [
4080
4153
  "resource": "application.workers.versions",
4081
4154
  "method": "create",
4082
4155
  "summary": "Create version",
4083
- "description": "Upload code and bindings as a new version; a version serves nothing until deployed. Set deploy true to create the pending deployment in the same call. Rejected binding types return UNSUPPORTED.",
4156
+ "description": "Upload code and bindings as a new version; a version serves nothing until deployed. Set deploy true to create the pending deployment in the same call. Rejected binding types return UNSUPPORTED. Send an Idempotency-Key to make a create safe to retry: within 24 hours the same key with the same body answers the first version (and its deployment) again instead of creating a second one, and the same key with a different body is refused.",
4084
4157
  "http": "POST",
4085
4158
  "path": "/application/v1/workers/{worker_id}/versions",
4086
4159
  "streaming": "no",
@@ -12539,7 +12612,7 @@ export const operations = [
12539
12612
  "resource": "devops.changes",
12540
12613
  "method": "abandon",
12541
12614
  "summary": "Abandon a change",
12542
- "description": "Stop a change for good: it no longer moves forward and its stage becomes abandoned. reason is required and is kept with the change. Pull requests that were already merged are not undone — the system cleans them up, or a new change reverts them — so abandoning is a statement about the change, not a rollback of code. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2). A change that is already abandoned is refused with INVALID_ARGUMENT, which is how a caller tells an earlier abandon apart from a call that had no effect.",
12615
+ "description": "Stop a change for good: it no longer moves forward and its stage becomes abandoned. reason is required and is kept with the change. Pull requests it has not merged are closed with it: each one is closed on GitHub with a note naming the change and this reason, so an abandoned change never leaves an open pull request behind for someone else to clean up — a change with no open pull request makes no GitHub call at all. That close happens BEFORE the change is marked, so an abandon that cannot close them is refused with GITHUB_UNAVAILABLE and nothing has changed; send it again. Pull requests that were already merged are not undone — the system cleans them up, or a new change reverts them — so abandoning is a statement about the change, not a rollback of code. The id is the branch name and its slash must be percent-encoded in the path (feat%2Frun-page-v2). Repeating the call on a change that is already abandoned answers the change as it stands instead of refusing it: the first abandon is the fact, and a caller that lost the answer gets it back.",
12543
12616
  "http": "POST",
12544
12617
  "path": "/devops/v1/changes/{id}:abandon",
12545
12618
  "streaming": "no",
@@ -15221,6 +15294,35 @@ export const operations = [
15221
15294
  }
15222
15295
  ]
15223
15296
  },
15297
+ {
15298
+ "resource": "devops.pullRequests",
15299
+ "method": "close",
15300
+ "summary": "Close a pull request without merging it",
15301
+ "description": "End a pull request that will never land, without abandoning the change it belongs to. DevOps closes it on GitHub through the project's own App installation, after writing this reason on the pull request, so it leaves the review queue instead of waiting for a merge that is not coming and whoever finds it later sees who ended it and why. Use it when one slice of a change is dropped while the change continues; abandoning the CHANGE closes its unmerged pull requests on its own and needs no second call. Only an open pull request can be closed: a merged one is refused with PULL_REQUEST_NOT_OPEN, because closing does not undo a merge and GitHub will not move a merged pull request back to closed, and one that is already closed answers itself unchanged, so repeating the call is safe. A pull request GitHub no longer has open is refused the same way — nothing was closed, and the platform's record catches up with GitHub on its next delivery.",
15302
+ "http": "POST",
15303
+ "path": "/devops/v1/pull-requests/{id}:close",
15304
+ "streaming": "no",
15305
+ "pagination": false,
15306
+ "pathParams": [
15307
+ {
15308
+ "name": "id",
15309
+ "sdkName": "id",
15310
+ "description": "The pull request's platform id (pr_…) from a pull request list, not GitHub's pull request number; the retrieve, rerunGate, merge and recordVerdict calls all address the pull request by it."
15311
+ }
15312
+ ],
15313
+ "query": [],
15314
+ "body": {
15315
+ "required": true,
15316
+ "fields": [
15317
+ {
15318
+ "name": "reason",
15319
+ "type": "string",
15320
+ "required": true,
15321
+ "description": "Why, in a sentence the next reader of the pull request can act on. It is posted as a note on the pull request before it is closed, and the note names the change when the head branch is one."
15322
+ }
15323
+ ]
15324
+ }
15325
+ },
15224
15326
  {
15225
15327
  "resource": "devops.pullRequests",
15226
15328
  "method": "merge",
@@ -17262,6 +17364,17 @@ export const operations = [
17262
17364
  "required": false,
17263
17365
  "description": "Model role overrides. Omitted roles keep their current values on update and use defaults on creation; null restores all defaults, and a null role restores that role’s default. Changing embedding is rejected while the library contains assets."
17264
17366
  },
17367
+ {
17368
+ "name": "default_tier",
17369
+ "type": "string",
17370
+ "enum": [
17371
+ "economy",
17372
+ "balanced",
17373
+ "quality"
17374
+ ],
17375
+ "required": false,
17376
+ "description": "Performance tier to run this request in, an alternative to naming a model: economy is the cheapest and fastest, balanced is the best value, quality puts the result first. Send tier or model, never both — a request that carries both is refused with INVALID_PARAMS in the tier field. A capability with no model for the exact tier answers the nearest declared tier, and a tie goes to the cheaper one, so a request never pays more than it asked for; a capability that has only one model answers every tier with that model. The job and the produced asset’s provenance report the tier that actually served the request."
17377
+ },
17265
17378
  {
17266
17379
  "name": "name",
17267
17380
  "type": "string",
@@ -17393,6 +17506,17 @@ export const operations = [
17393
17506
  "required": false,
17394
17507
  "description": "Model role overrides. Omitted roles keep their current values on update and use defaults on creation; null restores all defaults, and a null role restores that role’s default. Changing embedding is rejected while the library contains assets."
17395
17508
  },
17509
+ {
17510
+ "name": "default_tier",
17511
+ "type": "string",
17512
+ "enum": [
17513
+ "economy",
17514
+ "balanced",
17515
+ "quality"
17516
+ ],
17517
+ "required": false,
17518
+ "description": "Performance tier to run this request in, an alternative to naming a model: economy is the cheapest and fastest, balanced is the best value, quality puts the result first. Send tier or model, never both — a request that carries both is refused with INVALID_PARAMS in the tier field. A capability with no model for the exact tier answers the nearest declared tier, and a tie goes to the cheaper one, so a request never pays more than it asked for; a capability that has only one model answers every tier with that model. The job and the produced asset’s provenance report the tier that actually served the request."
17519
+ },
17396
17520
  {
17397
17521
  "name": "name",
17398
17522
  "type": "string",
@@ -17860,7 +17984,7 @@ export const operations = [
17860
17984
  "resource": "media.assets",
17861
17985
  "method": "edit",
17862
17986
  "summary": "Edit asset",
17863
- "description": "Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background, upscale and talking_avatar (the portrait speaks a recording of the same library); on a video, upscale, reframe, redact, trim, mute, crop, erase (removes burned-in subtitles, captions and corner watermarks, found automatically or inside the boxes given), replace_person (puts the person of an image of the same library in place of the video’s person), lip_sync (re-syncs the lips to a recording of the same library), animate_person (an image of the same library performs the video’s motion) and remove_background; on a recording or a video’s audio, enhance_voice; and to_video, frame and resynthesize on the material each takes. Any other type answers OPERATION_NOT_SUPPORTED, and an edit that does not fit the source’s material answers REFERENCE_TYPE_MISMATCH. Video and audio edits take their model from the platform catalogue (override with operation.model); an edit whose catalogue is empty answers OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video makes a portrait matte: output mask is a small black-and-white video to use as a Cut track mask (the choice for compositing), output alpha (the default) a transparent ProRes 4444 file of about 870 MB per 15 s of 1080p, for when the transparent file itself is the deliverable; pick model from types.matting.models of the generation capabilities. output and model on an image source answer INVALID_PARAMS. The new asset records the source in derived_from; assets.lineage reads the whole edit chain. Charges are at the model API prices (video and audio edits per second of input) and appear in the Job’s usage; repeating the same edit of the same source answers the asset already made instead of paying again. The response is 202 with a queued Job whose source_asset_id is the edited asset; poll GET /media/v1/libraries/{library_id}/jobs/{job_id}, give the output’s viewer_url to the person and tell them usage.",
17987
+ "description": "Change an existing asset and store the result as a new asset; the source is never overwritten. {library_id} also accepts default, the organization’s default library. The body is operation (its type selects the edit and carries that edit’s own fields) plus optional model, asset_folder, understanding and idempotency_key. Edits by material: on an image, variations (near copies of a take you like), inpaint (mask, a PNG File id beginning with file-, whose transparent area is replaced by what prompt describes), erase, replace_object, recolor, replace_background, remove_background, upscale and talking_avatar (the portrait speaks a recording of the same library); on a video, upscale, reframe, redact, trim, mute, crop, extract_audio (pulls the sound out of a video as its own audio asset), erase (removes burned-in subtitles, captions and corner watermarks, found automatically or inside the boxes given), replace_person (puts the person of an image of the same library in place of the video’s person), lip_sync (re-syncs the lips to a recording of the same library), animate_person (an image of the same library performs the video’s motion), edit_video (the video changed by a one-line instruction, optionally guided by one image of the same library) and remove_background; on a recording or a video’s audio, enhance_voice; and to_video, frame and resynthesize on the material each takes. Any other type answers OPERATION_NOT_SUPPORTED, and an edit that does not fit the source’s material answers REFERENCE_TYPE_MISMATCH. Video and audio edits take their model from the platform catalogue (override with operation.model; extract_audio takes no model, it has exactly one function); an edit whose catalogue is empty answers OPERATION_NOT_SUPPORTED, 尚未上架. remove_background on a video makes a portrait matte: output mask is a small black-and-white video to use as a Cut track mask (the choice for compositing), output alpha (the default) a transparent ProRes 4444 file of about 870 MB per 15 s of 1080p, for when the transparent file itself is the deliverable; pick model from types.matting.models of the generation capabilities. output and model on an image source answer INVALID_PARAMS. The new asset records the source in derived_from; assets.lineage reads the whole edit chain. Charges are at the model API prices (video and audio edits per second of input) and appear in the Job’s usage; repeating the same edit of the same source answers the asset already made instead of paying again. The response is 202 with a queued Job whose source_asset_id is the edited asset; poll GET /media/v1/libraries/{library_id}/jobs/{job_id}, give the output’s viewer_url to the person and tell them usage.",
17864
17988
  "http": "POST",
17865
17989
  "path": "/media/v1/libraries/{library_id}/assets/{asset_id}/edits",
17866
17990
  "streaming": "no",
@@ -17885,13 +18009,24 @@ export const operations = [
17885
18009
  "name": "operation",
17886
18010
  "type": "object",
17887
18011
  "required": true,
17888
- "description": "One edit to apply to the source asset. type selects the operation and the discriminating branch carries that operation’s fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe, redact, trim, mute and crop through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe, redact, trim, mute and crop on a video), erase, replace_person, lip_sync and animate_person on a video and talking_avatar on an image through the same lane, and to_video, frame and resynthesize on the material each takes; every other type here describes the operation vocabulary and is refused with OPERATION_NOT_SUPPORTED. align is not an edit — it compares two assets and has its own endpoint, POST /media/v1/libraries/{library_id}/assets/{asset_id}/align."
18012
+ "description": "One edit to apply to the source asset. type selects the operation and the discriminating branch carries that operation’s fields. This release performs variations, inpaint, erase, replace_object, recolor and replace_background on images, remove_background on an image or a video, upscale, enhance_voice, reframe, redact, trim, mute, crop and extract_audio through Media’s processing lane (upscale on a picture or a video; enhance_voice on a recording or a video, whose audio is used; reframe, redact, trim, mute, crop and extract_audio on a video), erase, replace_person, lip_sync, animate_person and edit_video on a video and talking_avatar on an image through the same lane, and to_video, frame and resynthesize on the material each takes; every other type here describes the operation vocabulary and is refused with OPERATION_NOT_SUPPORTED. align is not an edit — it compares two assets and has its own endpoint, POST /media/v1/libraries/{library_id}/assets/{asset_id}/align."
17889
18013
  },
17890
18014
  {
17891
18015
  "name": "model",
17892
18016
  "type": "string",
17893
18017
  "required": false,
17894
- "description": "Model that performs the edit; omit it to use the library default image model."
18018
+ "description": "Model that performs the edit; omit it to use the library default image model. This is the transition-window parameter; prefer tier, and send only one of the two. A value that is exactly a tier name (economy, balanced or quality) is read as that tier; any other value is a real model id, which keeps working only during the transition and is refused once the platform retires the parameter."
18019
+ },
18020
+ {
18021
+ "name": "tier",
18022
+ "type": "string",
18023
+ "enum": [
18024
+ "economy",
18025
+ "balanced",
18026
+ "quality"
18027
+ ],
18028
+ "required": false,
18029
+ "description": "Performance tier to run this request in, an alternative to naming a model: economy is the cheapest and fastest, balanced is the best value, quality puts the result first. Send tier or model, never both — a request that carries both is refused with INVALID_PARAMS in the tier field. A capability with no model for the exact tier answers the nearest declared tier, and a tie goes to the cheaper one, so a request never pays more than it asked for; a capability that has only one model answers every tier with that model. The job and the produced asset’s provenance report the tier that actually served the request."
17895
18030
  },
17896
18031
  {
17897
18032
  "name": "asset_folder",
@@ -18545,7 +18680,18 @@ export const operations = [
18545
18680
  "name": "model",
18546
18681
  "type": "string",
18547
18682
  "required": false,
18548
- "description": "Model with image-generation capability; omit it to use the library default image model."
18683
+ "description": "Model with image-generation capability; omit it to use the library default image model. This is the transition-window parameter; prefer tier, and send only one of the two. A value that is exactly a tier name (economy, balanced or quality) is read as that tier; any other value is a real model id, which keeps working only during the transition and is refused once the platform retires the parameter."
18684
+ },
18685
+ {
18686
+ "name": "tier",
18687
+ "type": "string",
18688
+ "enum": [
18689
+ "economy",
18690
+ "balanced",
18691
+ "quality"
18692
+ ],
18693
+ "required": false,
18694
+ "description": "Performance tier to run this request in, an alternative to naming a model: economy is the cheapest and fastest, balanced is the best value, quality puts the result first. Send tier or model, never both — a request that carries both is refused with INVALID_PARAMS in the tier field. A capability with no model for the exact tier answers the nearest declared tier, and a tie goes to the cheaper one, so a request never pays more than it asked for; a capability that has only one model answers every tier with that model. The job and the produced asset’s provenance report the tier that actually served the request."
18549
18695
  },
18550
18696
  {
18551
18697
  "name": "asset_folder",
@@ -19292,7 +19438,18 @@ export const operations = [
19292
19438
  "name": "model",
19293
19439
  "type": "string",
19294
19440
  "required": false,
19295
- "description": "Model with video-generation capability; omit it to use the library default video model."
19441
+ "description": "Model with video-generation capability; omit it to use the library default video model. This is the transition-window parameter; prefer tier, and send only one of the two. A value that is exactly a tier name (economy, balanced or quality) is read as that tier; any other value is a real model id, which keeps working only during the transition and is refused once the platform retires the parameter."
19442
+ },
19443
+ {
19444
+ "name": "tier",
19445
+ "type": "string",
19446
+ "enum": [
19447
+ "economy",
19448
+ "balanced",
19449
+ "quality"
19450
+ ],
19451
+ "required": false,
19452
+ "description": "Performance tier to run this request in, an alternative to naming a model: economy is the cheapest and fastest, balanced is the best value, quality puts the result first. Send tier or model, never both — a request that carries both is refused with INVALID_PARAMS in the tier field. A capability with no model for the exact tier answers the nearest declared tier, and a tie goes to the cheaper one, so a request never pays more than it asked for; a capability that has only one model answers every tier with that model. The job and the produced asset’s provenance report the tier that actually served the request."
19296
19453
  },
19297
19454
  {
19298
19455
  "name": "asset_folder",
@@ -19319,6 +19476,79 @@ export const operations = [
19319
19476
  ]
19320
19477
  }
19321
19478
  },
19479
+ {
19480
+ "resource": "media.libraries.voices",
19481
+ "method": "create",
19482
+ "summary": "Create voice",
19483
+ "description": "Create a voice for this library. Send exactly one of the two shapes: consent_id with samples (a real person’s recordings, a consented voice, cloned before it can speak) or design_asset_id (a preview the voice-design run produced in this library, a generated voice). A generated voice is not cloned: it is ready when the call answers, its job already completed, and it speaks only through the speech model recorded on it, so speech naming another model is refused with INVALID_PARAMS. Each preview builds at most one voice, and building one gives back the design’s other previews, which then cannot be used. Sending both shapes, or neither, is refused with INVALID_PARAMS, and origin is written by the platform only. Answers 202 with a job.",
19484
+ "http": "POST",
19485
+ "path": "/media/v1/libraries/{library_id}/voices",
19486
+ "streaming": "no",
19487
+ "pagination": false,
19488
+ "pathParams": [
19489
+ {
19490
+ "name": "library_id",
19491
+ "sdkName": "library_id",
19492
+ "description": "Library ID returned by creation."
19493
+ }
19494
+ ],
19495
+ "query": [],
19496
+ "body": {
19497
+ "required": true,
19498
+ "fields": []
19499
+ }
19500
+ },
19501
+ {
19502
+ "resource": "media.libraries.voices.designs",
19503
+ "method": "create",
19504
+ "summary": "Design a voice",
19505
+ "description": "Design a voice from a text description. The model makes count preview recordings (default 3), each stored in this library as an audio asset; listen, then create a voice whose design_asset_id names the preview you chose. Send description (1 to 500 characters), preview_text (15 to 200 characters, the line each preview speaks), language (zh or en) and optionally count (1 to 3). A description that fails review fails the slot with CONTENT_REJECTED and is never retried, so changing the words is the fix. Answers 202 with a job to poll.",
19506
+ "http": "POST",
19507
+ "path": "/media/v1/libraries/{library_id}/voices/designs",
19508
+ "streaming": "no",
19509
+ "pagination": false,
19510
+ "pathParams": [
19511
+ {
19512
+ "name": "library_id",
19513
+ "sdkName": "library_id",
19514
+ "description": "Library ID returned by creation."
19515
+ }
19516
+ ],
19517
+ "query": [],
19518
+ "body": {
19519
+ "required": true,
19520
+ "fields": [
19521
+ {
19522
+ "name": "description",
19523
+ "type": "string",
19524
+ "required": true,
19525
+ "description": "Text description of the voice to design, 1 to 500 characters. The model makes every preview from it; a description that fails review answers CONTENT_REJECTED."
19526
+ },
19527
+ {
19528
+ "name": "preview_text",
19529
+ "type": "string",
19530
+ "required": true,
19531
+ "description": "Line each preview speaks, 15 to 200 characters: long enough to hear the voice, short enough for one model call."
19532
+ },
19533
+ {
19534
+ "name": "language",
19535
+ "type": "string",
19536
+ "enum": [
19537
+ "zh",
19538
+ "en"
19539
+ ],
19540
+ "required": true,
19541
+ "description": "Language the previews speak: zh or en only."
19542
+ },
19543
+ {
19544
+ "name": "count",
19545
+ "type": "number",
19546
+ "required": false,
19547
+ "description": "How many preview recordings to design, 1 to 3; defaults to 3. Each one is stored as an audio asset."
19548
+ }
19549
+ ]
19550
+ }
19551
+ },
19322
19552
  {
19323
19553
  "resource": "meta.docs",
19324
19554
  "method": "search",
@@ -20772,6 +21002,7 @@ export const operations = [
20772
21002
  "enum": [
20773
21003
  "anthropic.messages",
20774
21004
  "cohere.rerank",
21005
+ "dashscope.voice_design",
20775
21006
  "google.generateContent",
20776
21007
  "mistral.ocr",
20777
21008
  "openai.audio.speech",
@@ -24387,7 +24618,7 @@ export const operations = [
24387
24618
  "resource": "registry.packages",
24388
24619
  "method": "retrieve",
24389
24620
  "summary": "Retrieve package",
24390
- "description": "读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。",
24621
+ "description": "读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。软删期间这个包一律 404,恢复后才重新出现。",
24391
24622
  "http": "GET",
24392
24623
  "path": "/registry/v1/packages/{package_id}",
24393
24624
  "streaming": "no",
@@ -24401,6 +24632,119 @@ export const operations = [
24401
24632
  ],
24402
24633
  "query": []
24403
24634
  },
24635
+ {
24636
+ "resource": "registry.packages.git.commits",
24637
+ "method": "retrieve",
24638
+ "summary": "Read a commit",
24639
+ "description": "按对象 id 读一个提交(完整 sha,不解析缩写)。返回提交信息、作者、提交时间与父提交。仓库里没有这个对象返回 404。",
24640
+ "http": "GET",
24641
+ "path": "/registry/v1/packages/{package_id}/git/commits/{sha}",
24642
+ "streaming": "no",
24643
+ "pagination": false,
24644
+ "pathParams": [
24645
+ {
24646
+ "name": "package_id",
24647
+ "sdkName": "package_id",
24648
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
24649
+ },
24650
+ {
24651
+ "name": "sha",
24652
+ "sdkName": "sha",
24653
+ "description": "完整的 git 对象 id(40 或 64 位十六进制),不接受缩写。"
24654
+ }
24655
+ ],
24656
+ "query": []
24657
+ },
24658
+ {
24659
+ "resource": "registry.packages.git.files",
24660
+ "method": "retrieve",
24661
+ "summary": "Download a file from a ref",
24662
+ "description": "按引用读一个文件的原始字节,边读边发(流式),没有大小上限。path 是仓库内相对路径,可以含斜杠;ref 不给就是默认分支。路径不是文件或引用不存在返回 404。",
24663
+ "http": "GET",
24664
+ "path": "/registry/v1/packages/{package_id}/git/files/{path}",
24665
+ "streaming": "no",
24666
+ "pagination": false,
24667
+ "pathParams": [
24668
+ {
24669
+ "name": "package_id",
24670
+ "sdkName": "package_id",
24671
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
24672
+ },
24673
+ {
24674
+ "name": "path",
24675
+ "sdkName": "path",
24676
+ "description": "仓库内的相对文件路径,可以含斜杠(例如 src/main.ts);不要以 / 开头,不能含 ..。"
24677
+ }
24678
+ ],
24679
+ "query": [
24680
+ {
24681
+ "name": "ref",
24682
+ "type": "string",
24683
+ "required": false,
24684
+ "description": "分支名、标签名、refs/… 全名或完整对象 id;不给就是包的默认分支。"
24685
+ }
24686
+ ]
24687
+ },
24688
+ {
24689
+ "resource": "registry.packages.git",
24690
+ "method": "retrieveLog",
24691
+ "summary": "List commits",
24692
+ "description": "列出一个 git 包的提交历史,最新的在前。ref 不给就是包的默认分支;limit 与 offset 分页,has_more 为 true 表示还有下一页。只读:提交只能通过 git 协议推送(clone 地址在包的 clone_url)。OCI 包没有 git 读接口,返回 404。",
24693
+ "http": "GET",
24694
+ "path": "/registry/v1/packages/{package_id}/git/log",
24695
+ "streaming": "no",
24696
+ "pagination": false,
24697
+ "pathParams": [
24698
+ {
24699
+ "name": "package_id",
24700
+ "sdkName": "package_id",
24701
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
24702
+ }
24703
+ ],
24704
+ "query": [
24705
+ {
24706
+ "name": "ref",
24707
+ "type": "string",
24708
+ "required": false,
24709
+ "description": "分支名、标签名、refs/… 全名或完整对象 id;不给就是包的默认分支。"
24710
+ },
24711
+ {
24712
+ "name": "limit",
24713
+ "type": "integer",
24714
+ "required": false,
24715
+ "description": "这一页最多返回多少个提交,1 到 100,默认 20。"
24716
+ },
24717
+ {
24718
+ "name": "offset",
24719
+ "type": "integer",
24720
+ "required": false,
24721
+ "description": "从历史开头跳过多少个提交,用来翻页;非负整数,默认 0。"
24722
+ }
24723
+ ]
24724
+ },
24725
+ {
24726
+ "resource": "registry.packages.git.trees",
24727
+ "method": "retrieve",
24728
+ "summary": "List a tree",
24729
+ "description": "读一个树对象(或一个提交的根树)的条目:名字、类型(blob / tree / commit)、模式、对象 id,以及已知时的大小。只列这一层,不递归。",
24730
+ "http": "GET",
24731
+ "path": "/registry/v1/packages/{package_id}/git/trees/{sha}",
24732
+ "streaming": "no",
24733
+ "pagination": false,
24734
+ "pathParams": [
24735
+ {
24736
+ "name": "package_id",
24737
+ "sdkName": "package_id",
24738
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
24739
+ },
24740
+ {
24741
+ "name": "sha",
24742
+ "sdkName": "sha",
24743
+ "description": "完整的 git 对象 id(40 或 64 位十六进制),不接受缩写。"
24744
+ }
24745
+ ],
24746
+ "query": []
24747
+ },
24404
24748
  {
24405
24749
  "resource": "registry.packages.installations",
24406
24750
  "method": "list",
@@ -32274,7 +32618,7 @@ export const operations = [
32274
32618
  "type": "array",
32275
32619
  "itemType": "string",
32276
32620
  "required": false,
32277
- "description": "Allowed destinations for the secret. Omitting allowed_hosts on creation stores an empty list for name-based resolution only: host-based redemption never matches. When supplied, list 1–16 bare domain names, dotted-decimal IPv4 addresses or leading *. domain wildcards. A wildcard matches subdomains, not the domain itself. URLs, ports, paths, IPv6, local/private and platform hosts are rejected. Entries are lowercased, one trailing dot is removed, internationalized domains use Punycode, and duplicates are removed."
32621
+ "description": "Allowed destinations for the secret. Omit it to keep the current list; an empty list removes the declaration, leaving the credential for name-based resolution only — host-based redemption never matches. When supplied with entries, list 1–16 bare domain names, dotted-decimal IPv4 addresses or leading *. domain wildcards. A wildcard matches subdomains, not the domain itself. URLs, ports, paths, IPv6, local/private and platform hosts are rejected. Entries are lowercased, one trailing dot is removed, internationalized domains use Punycode, and duplicates are removed."
32278
32622
  },
32279
32623
  {
32280
32624
  "name": "description",