@deepraxis/sdk 0.1.1-dev.98b62a1 → 0.1.1-dev.99bbb95

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.
@@ -1498,7 +1498,7 @@ export const fileRetrieveUpload = (options) => (options.client ?? client).get({
1498
1498
  /**
1499
1499
  * Create a one-time upload URL
1500
1500
  *
1501
- * Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
1501
+ * Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid or cross-organization URLs return 404, and so does a link whose upload record no longer exists. A URL that is authentic but names another action returns 403 CAPABILITY_MISMATCH: a status link posted to complete_url answers it, and so does a completion link fetched as status_url. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
1502
1502
  */
1503
1503
  export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
1504
1504
  security: [{
@@ -11001,6 +11001,38 @@ export const mediaAlignAsset = (options) => (options.client ?? client).post({
11001
11001
  ...options.headers
11002
11002
  }
11003
11003
  });
11004
+ /**
11005
+ * Get HLS renditions
11006
+ *
11007
+ * Read how ready a video asset’s on-demand ladder is, rung by rung, without building anything. Use library_id and asset_id as everywhere else. The answer names the asset, its current version, the asset’s own facts (resource_type, is_audio and duration) and one entry per recorded rung — name, height, the first indexed piece’s width, the rung’s bitrate and stored bytes, and its state (processing while pieces run, ready when every piece is ready, failed when a piece gave up). A ladder that was never requested, and an asset that is not a video, answer an empty renditions rather than an error. This read mints no capability and signs nothing, so play the ladder through the content service, which issues the short-lived play address for the current version. Example: GET /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/hls.
11008
+ */
11009
+ export const mediaGetHlsRenditions = (options) => (options.client ?? client).get({
11010
+ security: [{
11011
+ key: 'media-BearerAuth',
11012
+ scheme: 'bearer',
11013
+ type: 'http'
11014
+ }],
11015
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
11016
+ ...options
11017
+ });
11018
+ /**
11019
+ * Request HLS renditions
11020
+ *
11021
+ * Build a video asset’s adaptive HLS ladder for its current version, so one asset plays at several clarities on an ordinary player. Use library_id from creation or listing and the asset_id of a video asset; the ladder belongs to the version the asset has now, and a later version gets its own. heights names the rungs to build: a non-empty subset of 480, 720 and 1080 with no repeats, or omitted to build all three. The ladder never upscales — a rung above the source’s short side is dropped, and a list entirely above it keeps its lowest rung. The call is asynchronous and starts paid transcoding: the work runs as the video-transcode-hls model, one piece per rung per ten minutes of source, and it is charged per output minute at that model’s published price to the organization that owns the asset (ADR-146 §5) — a rung the source cannot carry, and a failed rung, are not charged. A source longer than eight hours (28800 seconds) is refused with SOURCE_TOO_LONG before anything is planned. Repeating the call is safe: a rung already processing, ready or failed is left as it is and is never encoded twice. The response is 202 with the asset_id, its current version and one entry per rung — name, height, width, bitrate, bytes and state, where processing means the rung is still being encoded, ready means it plays and failed means it gave up and can be retried by asking again. Poll GET /media/v1/libraries/{library_id}/assets/{asset_id}/hls until every rung is ready, then play the ladder through the content service, which mints the short-lived play address. Example: POST /media/v1/libraries/lib_example/assets/9dfa312ef9bc4b00816339b598b1152c/hls with {"heights":[480,720,1080]}.
11022
+ */
11023
+ export const mediaRequestHlsRenditions = (options) => (options.client ?? client).post({
11024
+ security: [{
11025
+ key: 'media-BearerAuth',
11026
+ scheme: 'bearer',
11027
+ type: 'http'
11028
+ }],
11029
+ url: '/media/v1/libraries/{library_id}/assets/{asset_id}/hls',
11030
+ ...options,
11031
+ headers: {
11032
+ 'Content-Type': 'application/json',
11033
+ ...options.headers
11034
+ }
11035
+ });
11004
11036
  /**
11005
11037
  * List types
11006
11038
  *
@@ -11243,6 +11275,284 @@ export const ontologySearch = (options) => (options.client ?? client).post({
11243
11275
  ...options.headers
11244
11276
  }
11245
11277
  });
11278
+ /**
11279
+ * List repositories
11280
+ *
11281
+ * 列出这个组织现有的库,默认库也在其中。库很少,一页通常装得下;用 next_cursor 翻页。先在这里拿到 repository_id,再用它列出或发布包。
11282
+ */
11283
+ export const registryRepositoriesList = (options) => (options?.client ?? client).get({
11284
+ security: [{
11285
+ key: 'registry-bearerAuth',
11286
+ scheme: 'bearer',
11287
+ type: 'http'
11288
+ }],
11289
+ url: '/registry/v1/repositories',
11290
+ ...options
11291
+ });
11292
+ /**
11293
+ * Create repository
11294
+ *
11295
+ * 新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。
11296
+ */
11297
+ export const registryRepositoriesCreate = (options) => (options.client ?? client).post({
11298
+ security: [{
11299
+ key: 'registry-bearerAuth',
11300
+ scheme: 'bearer',
11301
+ type: 'http'
11302
+ }],
11303
+ url: '/registry/v1/repositories',
11304
+ ...options,
11305
+ headers: {
11306
+ 'Content-Type': 'application/json',
11307
+ ...options.headers
11308
+ }
11309
+ });
11310
+ /**
11311
+ * Delete repository
11312
+ *
11313
+ * 删一个空的库。默认库不能删(FAILED_PRECONDITION);库里还有包时也不能删,先把包删掉或改用别的库。删除请求重发会 404,所以删除前先读一次确认。
11314
+ */
11315
+ export const registryRepositoriesDelete = (options) => (options.client ?? client).delete({
11316
+ security: [{
11317
+ key: 'registry-bearerAuth',
11318
+ scheme: 'bearer',
11319
+ type: 'http'
11320
+ }],
11321
+ url: '/registry/v1/repositories/{repository_id}',
11322
+ ...options
11323
+ });
11324
+ /**
11325
+ * Retrieve repository
11326
+ *
11327
+ * 读一个库的名称、说明、包数量和默认标记。repository_id 来自 repositories.list 或 repositories.create;另一个组织的库或不存在的库一律 404,不区分两者。
11328
+ */
11329
+ export const registryRepositoriesRetrieve = (options) => (options.client ?? client).get({
11330
+ security: [{
11331
+ key: 'registry-bearerAuth',
11332
+ scheme: 'bearer',
11333
+ type: 'http'
11334
+ }],
11335
+ url: '/registry/v1/repositories/{repository_id}',
11336
+ ...options
11337
+ });
11338
+ /**
11339
+ * Update repository
11340
+ *
11341
+ * 改库的 display_name 或 description。只送要改的字段,省略的保持原值;name 建库之后不能改,它标识库。一个字段都不送会 400。
11342
+ */
11343
+ export const registryRepositoriesUpdate = (options) => (options.client ?? client).patch({
11344
+ security: [{
11345
+ key: 'registry-bearerAuth',
11346
+ scheme: 'bearer',
11347
+ type: 'http'
11348
+ }],
11349
+ url: '/registry/v1/repositories/{repository_id}',
11350
+ ...options,
11351
+ headers: {
11352
+ 'Content-Type': 'application/json',
11353
+ ...options.headers
11354
+ }
11355
+ });
11356
+ /**
11357
+ * List packages
11358
+ *
11359
+ * 列出一个库里的包,可按种类筛、按名字搜、按最近更新或下载量排序。kind=skill 只看技能,kind=plugin 只看插件,省略则两类都返回。q 在 name、title 和 description 上做子串匹配。sort 默认 updated;downloads 按累计下载量降序,用来找这个库最常用的资源。
11360
+ */
11361
+ export const registryRepositoriesPackagesList = (options) => (options.client ?? client).get({
11362
+ security: [{
11363
+ key: 'registry-bearerAuth',
11364
+ scheme: 'bearer',
11365
+ type: 'http'
11366
+ }],
11367
+ url: '/registry/v1/repositories/{repository_id}/packages',
11368
+ ...options
11369
+ });
11370
+ /**
11371
+ * Publish a package
11372
+ *
11373
+ * 把一个新包发布进这个库,一次调用建立包并上传它的第一个版本。发布内容是 multipart:version 必填,archive 给一个 zip,或者 files 给一组文件(每个文件的 filename 是相对上传根的路径,例如 pdf/SKILL.md)。单个顶层目录会被剥掉。种类按根上有什么判:有 SKILL.md 就是 skill,有 .claude-plugin/plugin.json 就是 plugin;两者都没有、或都有,会被拒。名字从 SKILL.md 或 plugin.json 里读,不从路径或 query 猜。限额:上传 ≤25 MiB,解压后 ≤50 MiB,≤1000 个文件。版本必须是 semver 且严格递增;第一个版本可以是任意合法 semver,之后每个新版本都要比已发布的最高版本高。把已有智能体的技能搬过来时,先用 GET /agent/v1/skills/{id}/versions/{v}/content 导出 zip,再在这里作为 archive 发布。
11374
+ */
11375
+ export const registryRepositoriesPackagesCreate = (options) => (options.client ?? client).post({
11376
+ ...formDataBodySerializer,
11377
+ security: [{
11378
+ key: 'registry-bearerAuth',
11379
+ scheme: 'bearer',
11380
+ type: 'http'
11381
+ }],
11382
+ url: '/registry/v1/repositories/{repository_id}/packages',
11383
+ ...options,
11384
+ headers: {
11385
+ 'Content-Type': null,
11386
+ ...options.headers
11387
+ }
11388
+ });
11389
+ /**
11390
+ * Retrieve package
11391
+ *
11392
+ * 读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。
11393
+ */
11394
+ export const registryPackagesRetrieve = (options) => (options.client ?? client).get({
11395
+ security: [{
11396
+ key: 'registry-bearerAuth',
11397
+ scheme: 'bearer',
11398
+ type: 'http'
11399
+ }],
11400
+ url: '/registry/v1/packages/{package_id}',
11401
+ ...options
11402
+ });
11403
+ /**
11404
+ * List versions
11405
+ *
11406
+ * 列出一个包的所有版本,含已撤回的。撤回的版本仍在列表里(它占着版本号),withdrawn 为 true,并带 withdraw_time。按发布顺序返回。
11407
+ */
11408
+ export const registryPackagesVersionsList = (options) => (options.client ?? client).get({
11409
+ security: [{
11410
+ key: 'registry-bearerAuth',
11411
+ scheme: 'bearer',
11412
+ type: 'http'
11413
+ }],
11414
+ url: '/registry/v1/packages/{package_id}/versions',
11415
+ ...options
11416
+ });
11417
+ /**
11418
+ * Publish a version
11419
+ *
11420
+ * 给一个已有的包发新版本。请求体与 packages.create 相同(multipart:version 必填,archive 或 files 给内容),但种类和名字沿用这个包,不再从上传内容重判。version 必须比已发布的最高版本高(撤回的版本也占号,不能复用);比它低或相等返回 FAILED_PRECONDITION。一个包的作者和标签不随新版本改变。
11421
+ */
11422
+ export const registryPackagesVersionsCreate = (options) => (options.client ?? client).post({
11423
+ ...formDataBodySerializer,
11424
+ security: [{
11425
+ key: 'registry-bearerAuth',
11426
+ scheme: 'bearer',
11427
+ type: 'http'
11428
+ }],
11429
+ url: '/registry/v1/packages/{package_id}/versions',
11430
+ ...options,
11431
+ headers: {
11432
+ 'Content-Type': null,
11433
+ ...options.headers
11434
+ }
11435
+ });
11436
+ /**
11437
+ * List version contents
11438
+ *
11439
+ * 列出一个版本解压后的文件清单(路径和大小),用来在不下载整个包的前提下看它包含什么。路径是相对包根的,例如 SKILL.md 或 plugin/skills/review.md。已撤回的版本仍可读清单。
11440
+ */
11441
+ export const registryPackagesVersionsContents = (options) => (options.client ?? client).get({
11442
+ security: [{
11443
+ key: 'registry-bearerAuth',
11444
+ scheme: 'bearer',
11445
+ type: 'http'
11446
+ }],
11447
+ url: '/registry/v1/packages/{package_id}/versions/{version}/contents',
11448
+ ...options
11449
+ });
11450
+ /**
11451
+ * Download a file
11452
+ *
11453
+ * 下载一个版本里的单个文件,返回原始字节。path 是 contents 给出的路径,可以含斜杠(例如 plugin/skills/review.md)。用它按文件取内容,装到磁盘上时保留这个相对路径。不计入 downloads。
11454
+ */
11455
+ export const registryPackagesVersionsFilesRetrieve = (options) => (options.client ?? client).get({
11456
+ security: [{
11457
+ key: 'registry-bearerAuth',
11458
+ scheme: 'bearer',
11459
+ type: 'http'
11460
+ }],
11461
+ url: '/registry/v1/packages/{package_id}/versions/{version}/files/{path}',
11462
+ ...options
11463
+ });
11464
+ /**
11465
+ * Download version archive
11466
+ *
11467
+ * 下载一个版本的完整 zip 归档,用来整包安装或转存。每次调用都计入这个包的 downloads,所以不要为了看内容而反复拉 archive——先读 contents,只取需要的文件用 files 下载。
11468
+ */
11469
+ export const registryPackagesVersionsArchive = (options) => (options.client ?? client).get({
11470
+ security: [{
11471
+ key: 'registry-bearerAuth',
11472
+ scheme: 'bearer',
11473
+ type: 'http'
11474
+ }],
11475
+ url: '/registry/v1/packages/{package_id}/versions/{version}/archive',
11476
+ ...options
11477
+ });
11478
+ /**
11479
+ * Withdraw a version
11480
+ *
11481
+ * 撤回一个版本。撤回后它不再是 latest、不能被新装;已经装好的照常可用。版本号仍被占着,不能再用它发新版本。已经撤回的版本再撤回会返回 FAILED_PRECONDITION。撤回是不可逆的:要重新提供这个版本,用更高的版本号重新发布。
11482
+ */
11483
+ export const registryPackagesVersionsWithdraw = (options) => (options.client ?? client).post({
11484
+ security: [{
11485
+ key: 'registry-bearerAuth',
11486
+ scheme: 'bearer',
11487
+ type: 'http'
11488
+ }],
11489
+ url: '/registry/v1/packages/{package_id}/versions/{version}:withdraw',
11490
+ ...options
11491
+ });
11492
+ /**
11493
+ * List installations
11494
+ *
11495
+ * 列出这个包装在哪些智能体和电脑上。每次读取都会和目标那边对账,以目标现在的实际情况为准,所以每条记录的 state 是读取这一刻的结论:installed 表示目标上有它且版本与记录一致;drifted 表示目标上有它但版本不同,此时 version 显示目标上的版本;missing 表示目标上已经没有它(被人在智能体或电脑那边删掉了),记录仍保留,可以用 installations.delete 清掉,或用 installations.update 重新装回;unknown 表示这次问不到目标,不代表没装,稍后重读。withdrawn 表示这条记录的版本已被撤回。一次返回全部记录,没有分页,按创建时间排序。
11496
+ */
11497
+ export const registryPackagesInstallationsList = (options) => (options.client ?? client).get({
11498
+ security: [{
11499
+ key: 'registry-bearerAuth',
11500
+ scheme: 'bearer',
11501
+ type: 'http'
11502
+ }],
11503
+ url: '/registry/v1/packages/{package_id}/installations',
11504
+ ...options
11505
+ });
11506
+ /**
11507
+ * Install a package
11508
+ *
11509
+ * 把一个包装到目标上:技能装到智能体(agent_ids),插件装到电脑(computer_ids),一次最多 50 个目标;目标种类给错会被拒(400),包的种类可从 packages.retrieve 的 kind 得知。技能装的是具体版本,version 省略时装最新版,之后不会自动升级,要换版本用 installations.update。插件只能装库里的最新版本,version 若给了就必须等于最新版,否则 FAILED_PRECONDITION。撤回的版本不能新装。同一目标重复装同一个包不会报错,而是把它移到这个版本。技能被拒的情形:智能体上已有同名的另一个技能(名字冲突),或这个智能体已经有 20 个技能。各目标独立处理:只要有一个成功就返回 201,成功的在 data 里,失败的目标在 errors 里逐个列出 target_id、code 和 message,按消息修正后只对失败的目标重发;全部失败时不返回 201,而是按第一个失败返回错误状态。装到智能体或电脑上要求调用者本人有权限,权限不足会出现在该目标的 errors 里。
11510
+ */
11511
+ export const registryPackagesInstallationsCreate = (options) => (options.client ?? client).post({
11512
+ security: [{
11513
+ key: 'registry-bearerAuth',
11514
+ scheme: 'bearer',
11515
+ type: 'http'
11516
+ }],
11517
+ url: '/registry/v1/packages/{package_id}/installations',
11518
+ ...options,
11519
+ headers: {
11520
+ 'Content-Type': 'application/json',
11521
+ ...options.headers
11522
+ }
11523
+ });
11524
+ /**
11525
+ * Update an installation
11526
+ *
11527
+ * 把一条安装记录换到另一个版本。技能可以换到任何未撤回的版本(升级或回退),version 省略时换到最新版;插件只能换到库里的最新版本,version 给了也必须等于最新版。撤回的版本不能换过去。对账为 missing 的记录用它可以重新装回去。同名冲突和 20 个技能上限的规则与安装时相同。
11528
+ */
11529
+ export const registryInstallationsUpdate = (options) => (options.client ?? client).post({
11530
+ security: [{
11531
+ key: 'registry-bearerAuth',
11532
+ scheme: 'bearer',
11533
+ type: 'http'
11534
+ }],
11535
+ url: '/registry/v1/installations/{installation_id}:update',
11536
+ ...options,
11537
+ headers: {
11538
+ 'Content-Type': 'application/json',
11539
+ ...options.headers
11540
+ }
11541
+ });
11542
+ /**
11543
+ * Remove an installation
11544
+ *
11545
+ * 把包从目标上卸下来,并删掉这条安装记录:技能从智能体的技能列表里移除,插件从电脑上卸载。目标那边已经没有它时也算完成。包本身和它的版本不受影响,之后可以重新安装。记录删除后重发会 404,所以删除前先用 installations.list 确认。
11546
+ */
11547
+ export const registryInstallationsDelete = (options) => (options.client ?? client).delete({
11548
+ security: [{
11549
+ key: 'registry-bearerAuth',
11550
+ scheme: 'bearer',
11551
+ type: 'http'
11552
+ }],
11553
+ url: '/registry/v1/installations/{installation_id}',
11554
+ ...options
11555
+ });
11246
11556
  /**
11247
11557
  * List sandboxes (v2)
11248
11558
  *