@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.
@@ -15450,7 +15450,7 @@ export const operations = [
15450
15450
  "resource": "file.uploads",
15451
15451
  "method": "createSigned",
15452
15452
  "summary": "Create a one-time upload URL",
15453
- "description": "Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, 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\"}.",
15453
+ "description": "Upload a local file of up to 20 GiB from a coding agent without sending bytes through the model. Provide filename (the stored basename), exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes) and PUT each chunk to its numbered parts[].url in any order; an interrupted client GETs status_url to see the received parts and resends only what is missing, then POSTs complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid or cross-organization URLs return 404, and so does a link whose upload record no longer exists. A URL that is authentic but names another action returns 403 CAPABILITY_MISMATCH: a status link posted to complete_url answers it, and so does a completion link fetched as status_url. URL lifetime defaults to 900 seconds for single PUT or 604800 (7 days) for multipart, at most 604800; all multipart URLs, including status_url, share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {\"filename\":\"photo.png\",\"bytes\":2048,\"content_type\":\"image/png\"}.",
15454
15454
  "http": "POST",
15455
15455
  "path": "/file/v1/uploads/signed",
15456
15456
  "streaming": "no",
@@ -17174,6 +17174,69 @@ export const operations = [
17174
17174
  ]
17175
17175
  }
17176
17176
  },
17177
+ {
17178
+ "resource": "media.libraries.assets.hls",
17179
+ "method": "list",
17180
+ "summary": "Get HLS renditions",
17181
+ "description": "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.",
17182
+ "http": "GET",
17183
+ "path": "/media/v1/libraries/{library_id}/assets/{asset_id}/hls",
17184
+ "streaming": "no",
17185
+ "pagination": false,
17186
+ "pathParams": [
17187
+ {
17188
+ "name": "library_id",
17189
+ "sdkName": "library_id",
17190
+ "description": "Library ID returned by creation."
17191
+ },
17192
+ {
17193
+ "name": "asset_id",
17194
+ "sdkName": "asset_id",
17195
+ "description": "32-character asset ID."
17196
+ }
17197
+ ],
17198
+ "query": []
17199
+ },
17200
+ {
17201
+ "resource": "media.libraries.assets.hls",
17202
+ "method": "create",
17203
+ "summary": "Request HLS renditions",
17204
+ "description": "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]}.",
17205
+ "http": "POST",
17206
+ "path": "/media/v1/libraries/{library_id}/assets/{asset_id}/hls",
17207
+ "streaming": "no",
17208
+ "pagination": false,
17209
+ "pathParams": [
17210
+ {
17211
+ "name": "library_id",
17212
+ "sdkName": "library_id",
17213
+ "description": "Library ID returned by creation."
17214
+ },
17215
+ {
17216
+ "name": "asset_id",
17217
+ "sdkName": "asset_id",
17218
+ "description": "32-character asset ID."
17219
+ }
17220
+ ],
17221
+ "query": [],
17222
+ "body": {
17223
+ "required": true,
17224
+ "fields": [
17225
+ {
17226
+ "name": "heights",
17227
+ "type": "array",
17228
+ "itemType": "integer",
17229
+ "enum": [
17230
+ 480,
17231
+ 720,
17232
+ 1080
17233
+ ],
17234
+ "required": false,
17235
+ "description": "The clarity rungs to build: a non-empty subset of 480, 720 and 1080 with no repeats. Omitted or empty builds all three. The ladder never upscales, so a rung above the source’s short side is dropped."
17236
+ }
17237
+ ]
17238
+ }
17239
+ },
17177
17240
  {
17178
17241
  "resource": "media.assets",
17179
17242
  "method": "lineage",
@@ -23459,6 +23522,570 @@ export const operations = [
23459
23522
  }
23460
23523
  ]
23461
23524
  },
23525
+ {
23526
+ "resource": "registry.installations",
23527
+ "method": "delete",
23528
+ "summary": "Remove an installation",
23529
+ "description": "把包从目标上卸下来,并删掉这条安装记录:技能从智能体的技能列表里移除,插件从电脑上卸载。目标那边已经没有它时也算完成。包本身和它的版本不受影响,之后可以重新安装。记录删除后重发会 404,所以删除前先用 installations.list 确认。",
23530
+ "http": "DELETE",
23531
+ "path": "/registry/v1/installations/{installation_id}",
23532
+ "streaming": "no",
23533
+ "pagination": false,
23534
+ "pathParams": [
23535
+ {
23536
+ "name": "installation_id",
23537
+ "sdkName": "installation_id",
23538
+ "description": "安装记录的标识,来自 packages.installations.list 或 packages.installations.create 返回的 id(ins_ 开头);不要传包或目标的 id。"
23539
+ }
23540
+ ],
23541
+ "query": []
23542
+ },
23543
+ {
23544
+ "resource": "registry.installations",
23545
+ "method": "update",
23546
+ "summary": "Update an installation",
23547
+ "description": "把一条安装记录换到另一个版本。技能可以换到任何未撤回的版本(升级或回退),version 省略时换到最新版;插件只能换到库里的最新版本,version 给了也必须等于最新版。撤回的版本不能换过去。对账为 missing 的记录用它可以重新装回去。同名冲突和 20 个技能上限的规则与安装时相同。",
23548
+ "http": "POST",
23549
+ "path": "/registry/v1/installations/{installation_id}:update",
23550
+ "streaming": "no",
23551
+ "pagination": false,
23552
+ "pathParams": [
23553
+ {
23554
+ "name": "installation_id",
23555
+ "sdkName": "installation_id",
23556
+ "description": "安装记录的标识,来自 packages.installations.list 或 packages.installations.create 返回的 id(ins_ 开头);不要传包或目标的 id。"
23557
+ }
23558
+ ],
23559
+ "query": [],
23560
+ "body": {
23561
+ "required": true,
23562
+ "fields": [
23563
+ {
23564
+ "name": "version",
23565
+ "type": "string",
23566
+ "required": false,
23567
+ "description": "要换到的版本号,完整 semver;省略时换到最新版;插件给了也必须等于最新版,撤回的版本不能换。"
23568
+ }
23569
+ ]
23570
+ }
23571
+ },
23572
+ {
23573
+ "resource": "registry.packages",
23574
+ "method": "retrieve",
23575
+ "summary": "Retrieve package",
23576
+ "description": "读一个包的元数据:种类、所属库、当前 latest_version、作者、标签和累计下载量。package_id 来自 packages.list 或 packages.create;另一个组织或不存在都返回 404。",
23577
+ "http": "GET",
23578
+ "path": "/registry/v1/packages/{package_id}",
23579
+ "streaming": "no",
23580
+ "pagination": false,
23581
+ "pathParams": [
23582
+ {
23583
+ "name": "package_id",
23584
+ "sdkName": "package_id",
23585
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23586
+ }
23587
+ ],
23588
+ "query": []
23589
+ },
23590
+ {
23591
+ "resource": "registry.packages.installations",
23592
+ "method": "list",
23593
+ "summary": "List installations",
23594
+ "description": "列出这个包装在哪些智能体和电脑上。每次读取都会和目标那边对账,以目标现在的实际情况为准,所以每条记录的 state 是读取这一刻的结论:installed 表示目标上有它且版本与记录一致;drifted 表示目标上有它但版本不同,此时 version 显示目标上的版本;missing 表示目标上已经没有它(被人在智能体或电脑那边删掉了),记录仍保留,可以用 installations.delete 清掉,或用 installations.update 重新装回;unknown 表示这次问不到目标,不代表没装,稍后重读。withdrawn 表示这条记录的版本已被撤回。一次返回全部记录,没有分页,按创建时间排序。",
23595
+ "http": "GET",
23596
+ "path": "/registry/v1/packages/{package_id}/installations",
23597
+ "streaming": "no",
23598
+ "pagination": false,
23599
+ "pathParams": [
23600
+ {
23601
+ "name": "package_id",
23602
+ "sdkName": "package_id",
23603
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23604
+ }
23605
+ ],
23606
+ "query": []
23607
+ },
23608
+ {
23609
+ "resource": "registry.packages.installations",
23610
+ "method": "create",
23611
+ "summary": "Install a package",
23612
+ "description": "把一个包装到目标上:技能装到智能体(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 里。",
23613
+ "http": "POST",
23614
+ "path": "/registry/v1/packages/{package_id}/installations",
23615
+ "streaming": "no",
23616
+ "pagination": false,
23617
+ "pathParams": [
23618
+ {
23619
+ "name": "package_id",
23620
+ "sdkName": "package_id",
23621
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23622
+ }
23623
+ ],
23624
+ "query": [],
23625
+ "body": {
23626
+ "required": true,
23627
+ "fields": [
23628
+ {
23629
+ "name": "agent_ids",
23630
+ "type": "array",
23631
+ "itemType": "string",
23632
+ "required": false,
23633
+ "description": "要装到的智能体标识,1 到 50 个,重复的会合并;只用于技能,来自智能体列表的 id。"
23634
+ },
23635
+ {
23636
+ "name": "computer_ids",
23637
+ "type": "array",
23638
+ "itemType": "string",
23639
+ "required": false,
23640
+ "description": "要装到的电脑标识,1 到 50 个,重复的会合并;只用于插件,来自电脑列表的 id。"
23641
+ },
23642
+ {
23643
+ "name": "version",
23644
+ "type": "string",
23645
+ "required": false,
23646
+ "description": "要装的版本号,完整 semver;省略时装最新版;插件给了也必须等于最新版,撤回的版本不能装。"
23647
+ }
23648
+ ]
23649
+ }
23650
+ },
23651
+ {
23652
+ "resource": "registry.packages.versions",
23653
+ "method": "list",
23654
+ "summary": "List versions",
23655
+ "description": "列出一个包的所有版本,含已撤回的。撤回的版本仍在列表里(它占着版本号),withdrawn 为 true,并带 withdraw_time。按发布顺序返回。",
23656
+ "http": "GET",
23657
+ "path": "/registry/v1/packages/{package_id}/versions",
23658
+ "streaming": "no",
23659
+ "pagination": true,
23660
+ "pathParams": [
23661
+ {
23662
+ "name": "package_id",
23663
+ "sdkName": "package_id",
23664
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23665
+ }
23666
+ ],
23667
+ "query": [
23668
+ {
23669
+ "name": "page_size",
23670
+ "type": "integer",
23671
+ "required": false,
23672
+ "description": "每页返回多少条,1 到 100;省略时默认 20。超过 100 会被截到 100。"
23673
+ },
23674
+ {
23675
+ "name": "cursor",
23676
+ "type": "string",
23677
+ "required": false,
23678
+ "description": "上一页返回的 next_cursor,用来取下一页;第一页省略它,next_cursor 为 null 时停止翻页。"
23679
+ }
23680
+ ]
23681
+ },
23682
+ {
23683
+ "resource": "registry.packages.versions",
23684
+ "method": "create",
23685
+ "summary": "Publish a version",
23686
+ "description": "给一个已有的包发新版本。请求体与 packages.create 相同(multipart:version 必填,archive 或 files 给内容),但种类和名字沿用这个包,不再从上传内容重判。version 必须比已发布的最高版本高(撤回的版本也占号,不能复用);比它低或相等返回 FAILED_PRECONDITION。一个包的作者和标签不随新版本改变。",
23687
+ "http": "POST",
23688
+ "path": "/registry/v1/packages/{package_id}/versions",
23689
+ "streaming": "no",
23690
+ "pagination": false,
23691
+ "multipart": true,
23692
+ "pathParams": [
23693
+ {
23694
+ "name": "package_id",
23695
+ "sdkName": "package_id",
23696
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23697
+ }
23698
+ ],
23699
+ "query": [],
23700
+ "body": {
23701
+ "required": true,
23702
+ "fields": [
23703
+ {
23704
+ "name": "version",
23705
+ "type": "string",
23706
+ "required": true,
23707
+ "description": "要发布的版本号,完整 semver,例如 1.2.0;每个包内必须严格递增,撤回的版本也占号。"
23708
+ },
23709
+ {
23710
+ "name": "archive",
23711
+ "type": "string",
23712
+ "required": false,
23713
+ "description": "一个 zip 文件,内含包的内容;与 files 二选一。单个顶层目录会被剥掉。"
23714
+ },
23715
+ {
23716
+ "name": "files",
23717
+ "type": "array",
23718
+ "itemType": "string",
23719
+ "required": false,
23720
+ "description": "直接上传的一组文件,每个 part 的 filename 是相对路径;与 archive 二选一。"
23721
+ },
23722
+ {
23723
+ "name": "title",
23724
+ "type": "string",
23725
+ "required": false,
23726
+ "description": "给人看的标题;省略时从包内容里取。"
23727
+ },
23728
+ {
23729
+ "name": "description",
23730
+ "type": "string",
23731
+ "required": false,
23732
+ "description": "包说明;省略时从包内容里取。"
23733
+ },
23734
+ {
23735
+ "name": "tags",
23736
+ "type": "string",
23737
+ "required": false,
23738
+ "description": "逗号分隔的标签,例如 review,quality;省略时没有标签。"
23739
+ }
23740
+ ]
23741
+ }
23742
+ },
23743
+ {
23744
+ "resource": "registry.packages.versions",
23745
+ "method": "retrieveArchive",
23746
+ "summary": "Download version archive",
23747
+ "description": "下载一个版本的完整 zip 归档,用来整包安装或转存。每次调用都计入这个包的 downloads,所以不要为了看内容而反复拉 archive——先读 contents,只取需要的文件用 files 下载。",
23748
+ "http": "GET",
23749
+ "path": "/registry/v1/packages/{package_id}/versions/{version}/archive",
23750
+ "streaming": "no",
23751
+ "pagination": false,
23752
+ "pathParams": [
23753
+ {
23754
+ "name": "package_id",
23755
+ "sdkName": "package_id",
23756
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23757
+ },
23758
+ {
23759
+ "name": "version",
23760
+ "sdkName": "version",
23761
+ "description": "要读的版本号,来自 versions.list 或 versions.create 返回的 version;必须是完整 semver,形如 1.2.0,不接受 latest 或范围。"
23762
+ }
23763
+ ],
23764
+ "query": []
23765
+ },
23766
+ {
23767
+ "resource": "registry.packages.versions.contents",
23768
+ "method": "list",
23769
+ "summary": "List version contents",
23770
+ "description": "列出一个版本解压后的文件清单(路径和大小),用来在不下载整个包的前提下看它包含什么。路径是相对包根的,例如 SKILL.md 或 plugin/skills/review.md。已撤回的版本仍可读清单。",
23771
+ "http": "GET",
23772
+ "path": "/registry/v1/packages/{package_id}/versions/{version}/contents",
23773
+ "streaming": "no",
23774
+ "pagination": false,
23775
+ "pathParams": [
23776
+ {
23777
+ "name": "package_id",
23778
+ "sdkName": "package_id",
23779
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23780
+ },
23781
+ {
23782
+ "name": "version",
23783
+ "sdkName": "version",
23784
+ "description": "要读的版本号,来自 versions.list 或 versions.create 返回的 version;必须是完整 semver,形如 1.2.0,不接受 latest 或范围。"
23785
+ }
23786
+ ],
23787
+ "query": []
23788
+ },
23789
+ {
23790
+ "resource": "registry.packages.versions.files",
23791
+ "method": "retrieve",
23792
+ "summary": "Download a file",
23793
+ "description": "下载一个版本里的单个文件,返回原始字节。path 是 contents 给出的路径,可以含斜杠(例如 plugin/skills/review.md)。用它按文件取内容,装到磁盘上时保留这个相对路径。不计入 downloads。",
23794
+ "http": "GET",
23795
+ "path": "/registry/v1/packages/{package_id}/versions/{version}/files/{path}",
23796
+ "streaming": "no",
23797
+ "pagination": false,
23798
+ "pathParams": [
23799
+ {
23800
+ "name": "package_id",
23801
+ "sdkName": "package_id",
23802
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23803
+ },
23804
+ {
23805
+ "name": "version",
23806
+ "sdkName": "version",
23807
+ "description": "要读的版本号,来自 versions.list 或 versions.create 返回的 version;必须是完整 semver,形如 1.2.0,不接受 latest 或范围。"
23808
+ },
23809
+ {
23810
+ "name": "path",
23811
+ "sdkName": "path",
23812
+ "description": "版本内的相对文件路径,取自 contents 返回的 path,可以含斜杠(例如 plugin/skills/review.md);不要以 / 开头。"
23813
+ }
23814
+ ],
23815
+ "query": []
23816
+ },
23817
+ {
23818
+ "resource": "registry.packages.versions",
23819
+ "method": "withdraw",
23820
+ "summary": "Withdraw a version",
23821
+ "description": "撤回一个版本。撤回后它不再是 latest、不能被新装;已经装好的照常可用。版本号仍被占着,不能再用它发新版本。已经撤回的版本再撤回会返回 FAILED_PRECONDITION。撤回是不可逆的:要重新提供这个版本,用更高的版本号重新发布。",
23822
+ "http": "POST",
23823
+ "path": "/registry/v1/packages/{package_id}/versions/{version}:withdraw",
23824
+ "streaming": "no",
23825
+ "pagination": false,
23826
+ "pathParams": [
23827
+ {
23828
+ "name": "package_id",
23829
+ "sdkName": "package_id",
23830
+ "description": "包的标识,来自 repositories.packages.list 或 repositories.packages.create 返回的 id;不要传包名。"
23831
+ },
23832
+ {
23833
+ "name": "version",
23834
+ "sdkName": "version",
23835
+ "description": "要读的版本号,来自 versions.list 或 versions.create 返回的 version;必须是完整 semver,形如 1.2.0,不接受 latest 或范围。"
23836
+ }
23837
+ ],
23838
+ "query": []
23839
+ },
23840
+ {
23841
+ "resource": "registry.repositories",
23842
+ "method": "list",
23843
+ "summary": "List repositories",
23844
+ "description": "列出这个组织现有的库,默认库也在其中。库很少,一页通常装得下;用 next_cursor 翻页。先在这里拿到 repository_id,再用它列出或发布包。",
23845
+ "http": "GET",
23846
+ "path": "/registry/v1/repositories",
23847
+ "streaming": "no",
23848
+ "pagination": true,
23849
+ "pathParams": [],
23850
+ "query": [
23851
+ {
23852
+ "name": "page_size",
23853
+ "type": "integer",
23854
+ "required": false,
23855
+ "description": "每页返回多少条,1 到 100;省略时默认 20。超过 100 会被截到 100。"
23856
+ },
23857
+ {
23858
+ "name": "cursor",
23859
+ "type": "string",
23860
+ "required": false,
23861
+ "description": "上一页返回的 next_cursor,用来取下一页;第一页省略它,next_cursor 为 null 时停止翻页。"
23862
+ }
23863
+ ]
23864
+ },
23865
+ {
23866
+ "resource": "registry.repositories",
23867
+ "method": "create",
23868
+ "summary": "Create repository",
23869
+ "description": "新建一个库来分类存放包。name 是库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且不能和已有的库重名;display_name 和 description 是给人看的。每个组织本来就有一个默认库,需要新分类时才建;一个库非空时不能删除,所以不要用库来临时隔离一次上传。",
23870
+ "http": "POST",
23871
+ "path": "/registry/v1/repositories",
23872
+ "streaming": "no",
23873
+ "pagination": false,
23874
+ "pathParams": [],
23875
+ "query": [],
23876
+ "body": {
23877
+ "required": true,
23878
+ "fields": [
23879
+ {
23880
+ "name": "name",
23881
+ "type": "string",
23882
+ "required": true,
23883
+ "description": "新库的唯一标识,小写字母、数字和连字符,最多 63 个字符,且在这个组织里未被使用;不能只有一个连字符结尾。"
23884
+ },
23885
+ {
23886
+ "name": "display_name",
23887
+ "type": "string",
23888
+ "required": false,
23889
+ "description": "给人看的库名;省略时后续显示 name。"
23890
+ },
23891
+ {
23892
+ "name": "description",
23893
+ "type": "string",
23894
+ "required": false,
23895
+ "description": "库的说明;省略时不写。"
23896
+ }
23897
+ ]
23898
+ }
23899
+ },
23900
+ {
23901
+ "resource": "registry.repositories",
23902
+ "method": "delete",
23903
+ "summary": "Delete repository",
23904
+ "description": "删一个空的库。默认库不能删(FAILED_PRECONDITION);库里还有包时也不能删,先把包删掉或改用别的库。删除请求重发会 404,所以删除前先读一次确认。",
23905
+ "http": "DELETE",
23906
+ "path": "/registry/v1/repositories/{repository_id}",
23907
+ "streaming": "no",
23908
+ "pagination": false,
23909
+ "pathParams": [
23910
+ {
23911
+ "name": "repository_id",
23912
+ "sdkName": "repository_id",
23913
+ "description": "库的标识,来自 repositories.list 或 repositories.create 返回的 id;不要传库的 name 或显示名。"
23914
+ }
23915
+ ],
23916
+ "query": []
23917
+ },
23918
+ {
23919
+ "resource": "registry.repositories",
23920
+ "method": "retrieve",
23921
+ "summary": "Retrieve repository",
23922
+ "description": "读一个库的名称、说明、包数量和默认标记。repository_id 来自 repositories.list 或 repositories.create;另一个组织的库或不存在的库一律 404,不区分两者。",
23923
+ "http": "GET",
23924
+ "path": "/registry/v1/repositories/{repository_id}",
23925
+ "streaming": "no",
23926
+ "pagination": false,
23927
+ "pathParams": [
23928
+ {
23929
+ "name": "repository_id",
23930
+ "sdkName": "repository_id",
23931
+ "description": "库的标识,来自 repositories.list 或 repositories.create 返回的 id;不要传库的 name 或显示名。"
23932
+ }
23933
+ ],
23934
+ "query": []
23935
+ },
23936
+ {
23937
+ "resource": "registry.repositories",
23938
+ "method": "update",
23939
+ "summary": "Update repository",
23940
+ "description": "改库的 display_name 或 description。只送要改的字段,省略的保持原值;name 建库之后不能改,它标识库。一个字段都不送会 400。",
23941
+ "http": "PATCH",
23942
+ "path": "/registry/v1/repositories/{repository_id}",
23943
+ "streaming": "no",
23944
+ "pagination": false,
23945
+ "pathParams": [
23946
+ {
23947
+ "name": "repository_id",
23948
+ "sdkName": "repository_id",
23949
+ "description": "库的标识,来自 repositories.list 或 repositories.create 返回的 id;不要传库的 name 或显示名。"
23950
+ }
23951
+ ],
23952
+ "query": [],
23953
+ "body": {
23954
+ "required": true,
23955
+ "fields": [
23956
+ {
23957
+ "name": "display_name",
23958
+ "type": "string",
23959
+ "required": false,
23960
+ "description": "新的显示名;显式传 null 会清空它。"
23961
+ },
23962
+ {
23963
+ "name": "description",
23964
+ "type": "string",
23965
+ "required": false,
23966
+ "description": "新的说明;显式传 null 会清空它。"
23967
+ }
23968
+ ]
23969
+ }
23970
+ },
23971
+ {
23972
+ "resource": "registry.repositories.packages",
23973
+ "method": "list",
23974
+ "summary": "List packages",
23975
+ "description": "列出一个库里的包,可按种类筛、按名字搜、按最近更新或下载量排序。kind=skill 只看技能,kind=plugin 只看插件,省略则两类都返回。q 在 name、title 和 description 上做子串匹配。sort 默认 updated;downloads 按累计下载量降序,用来找这个库最常用的资源。",
23976
+ "http": "GET",
23977
+ "path": "/registry/v1/repositories/{repository_id}/packages",
23978
+ "streaming": "no",
23979
+ "pagination": true,
23980
+ "pathParams": [
23981
+ {
23982
+ "name": "repository_id",
23983
+ "sdkName": "repository_id",
23984
+ "description": "库的标识,来自 repositories.list 或 repositories.create 返回的 id;不要传库的 name 或显示名。"
23985
+ }
23986
+ ],
23987
+ "query": [
23988
+ {
23989
+ "name": "kind",
23990
+ "type": "string",
23991
+ "enum": [
23992
+ "skill",
23993
+ "plugin"
23994
+ ],
23995
+ "required": false,
23996
+ "description": "只看某一类包;省略时技能和插件都返回。"
23997
+ },
23998
+ {
23999
+ "name": "q",
24000
+ "type": "string",
24001
+ "required": false,
24002
+ "description": "按子串搜索包,匹配 name、title 和 description;省略时不过滤。不区分大小写。"
24003
+ },
24004
+ {
24005
+ "name": "sort",
24006
+ "type": "string",
24007
+ "enum": [
24008
+ "updated",
24009
+ "downloads"
24010
+ ],
24011
+ "required": false,
24012
+ "description": "结果排序方式;省略时按 updated。"
24013
+ },
24014
+ {
24015
+ "name": "page_size",
24016
+ "type": "integer",
24017
+ "required": false,
24018
+ "description": "每页返回多少条,1 到 100;省略时默认 20。超过 100 会被截到 100。"
24019
+ },
24020
+ {
24021
+ "name": "cursor",
24022
+ "type": "string",
24023
+ "required": false,
24024
+ "description": "上一页返回的 next_cursor,用来取下一页;第一页省略它,next_cursor 为 null 时停止翻页。"
24025
+ }
24026
+ ]
24027
+ },
24028
+ {
24029
+ "resource": "registry.repositories.packages",
24030
+ "method": "create",
24031
+ "summary": "Publish a package",
24032
+ "description": "把一个新包发布进这个库,一次调用建立包并上传它的第一个版本。发布内容是 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 发布。",
24033
+ "http": "POST",
24034
+ "path": "/registry/v1/repositories/{repository_id}/packages",
24035
+ "streaming": "no",
24036
+ "pagination": false,
24037
+ "multipart": true,
24038
+ "pathParams": [
24039
+ {
24040
+ "name": "repository_id",
24041
+ "sdkName": "repository_id",
24042
+ "description": "库的标识,来自 repositories.list 或 repositories.create 返回的 id;不要传库的 name 或显示名。"
24043
+ }
24044
+ ],
24045
+ "query": [],
24046
+ "body": {
24047
+ "required": true,
24048
+ "fields": [
24049
+ {
24050
+ "name": "version",
24051
+ "type": "string",
24052
+ "required": true,
24053
+ "description": "要发布的版本号,完整 semver,例如 1.2.0;每个包内必须严格递增,撤回的版本也占号。"
24054
+ },
24055
+ {
24056
+ "name": "archive",
24057
+ "type": "string",
24058
+ "required": false,
24059
+ "description": "一个 zip 文件,内含包的内容;与 files 二选一。单个顶层目录会被剥掉。"
24060
+ },
24061
+ {
24062
+ "name": "files",
24063
+ "type": "array",
24064
+ "itemType": "string",
24065
+ "required": false,
24066
+ "description": "直接上传的一组文件,每个 part 的 filename 是相对路径;与 archive 二选一。"
24067
+ },
24068
+ {
24069
+ "name": "title",
24070
+ "type": "string",
24071
+ "required": false,
24072
+ "description": "给人看的标题;省略时从包内容里取。"
24073
+ },
24074
+ {
24075
+ "name": "description",
24076
+ "type": "string",
24077
+ "required": false,
24078
+ "description": "包说明;省略时从包内容里取。"
24079
+ },
24080
+ {
24081
+ "name": "tags",
24082
+ "type": "string",
24083
+ "required": false,
24084
+ "description": "逗号分隔的标签,例如 review,quality;省略时没有标签。"
24085
+ }
24086
+ ]
24087
+ }
24088
+ },
23462
24089
  {
23463
24090
  "resource": "sandbox.events.sandboxes",
23464
24091
  "method": "retrieve",