hngr 0.2.0 → 0.3.0
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.
- package/dist/{auth-BT8HuCif.mjs → auth-CgBUQUQn.mjs} +172 -29
- package/dist/{catalog-jU0-wzh3.mjs → catalog-DbGLqQ8a.mjs} +713 -73
- package/dist/{commands-BchmocR_.mjs → commands-BHXSZ04F.mjs} +1 -1
- package/dist/index.mjs +21 -23
- package/dist/{mcp-DeWHHgQK.mjs → mcp-b6bE3ZRt.mjs} +4 -4
- package/dist/{publish-D7zaQl9x.mjs → publish-EUqgdp0G.mjs} +39 -9
- package/dist/{skills-DwoDzsXd.mjs → skills-XDbBCC5f.mjs} +6 -6
- package/package.json +1 -1
|
@@ -36,9 +36,35 @@ const EXCLUDED_PATHS = [
|
|
|
36
36
|
"/api/v1/me/sessions",
|
|
37
37
|
"/api/v1/me/sessions/{id}",
|
|
38
38
|
"/api/v1/capabilities/{capability_id}/versions/{version}/content",
|
|
39
|
+
"/api/v1/capabilities/{capability_id}/versions/{version}/files",
|
|
40
|
+
"/api/v1/capabilities/{capability_id}/versions/{version}/file",
|
|
39
41
|
"/api/v1/auth/methods",
|
|
40
42
|
"/api/v1/auth/oidc/login",
|
|
41
|
-
"/api/v1/auth/oidc/callback"
|
|
43
|
+
"/api/v1/auth/oidc/callback",
|
|
44
|
+
"/api/v1/auth/device/code",
|
|
45
|
+
"/api/v1/auth/device/token",
|
|
46
|
+
"/api/v1/auth/device/lookup",
|
|
47
|
+
"/api/v1/auth/device/approve",
|
|
48
|
+
"/api/v1/auth/device/deny"
|
|
49
|
+
];
|
|
50
|
+
/**
|
|
51
|
+
* Single operations whose path still generates other commands. Category
|
|
52
|
+
* curation lives in the Web console in v1, so `categories list` stays while
|
|
53
|
+
* create, rename and delete are hidden.
|
|
54
|
+
*/
|
|
55
|
+
const EXCLUDED_OPERATIONS = [
|
|
56
|
+
{
|
|
57
|
+
method: "POST",
|
|
58
|
+
path: "/api/v1/categories"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
method: "PATCH",
|
|
62
|
+
path: "/api/v1/categories/{category_id}"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
method: "DELETE",
|
|
66
|
+
path: "/api/v1/categories/{category_id}"
|
|
67
|
+
}
|
|
42
68
|
];
|
|
43
69
|
/**
|
|
44
70
|
* Root-noun aliases. Aliases only affect parsing: help annotates the canonical
|
|
@@ -124,13 +150,14 @@ const METHOD_KEY = {
|
|
|
124
150
|
*/
|
|
125
151
|
function deriveCommands(doc) {
|
|
126
152
|
const excluded = new Set(EXCLUDED_PATHS);
|
|
153
|
+
const excludedOperations = new Set(EXCLUDED_OPERATIONS.map((operation) => `${operation.method} ${operation.path}`));
|
|
127
154
|
const overrides = new Map(COMMAND_OVERRIDES.map((item) => [overrideKey(item), item]));
|
|
128
155
|
const commands = [];
|
|
129
156
|
for (const [path, pathItem] of Object.entries(doc.paths)) {
|
|
130
157
|
if (excluded.has(path)) continue;
|
|
131
158
|
for (const method of METHODS) {
|
|
132
159
|
const operation = pathItem[METHOD_KEY[method]];
|
|
133
|
-
if (!operation) continue;
|
|
160
|
+
if (!operation || excludedOperations.has(`${method} ${path}`)) continue;
|
|
134
161
|
commands.push(deriveCommand(doc, path, pathItem, method, operation, overrides));
|
|
135
162
|
}
|
|
136
163
|
}
|
|
@@ -564,6 +591,111 @@ const COMMANDS = deriveCommands({
|
|
|
564
591
|
"default": { "$ref": "#/components/responses/Problem" }
|
|
565
592
|
}
|
|
566
593
|
} },
|
|
594
|
+
"/api/v1/auth/device/code": { "post": {
|
|
595
|
+
"operationId": "createDeviceAuthorization",
|
|
596
|
+
"summary": "Request a Device Authorization for the CLI.",
|
|
597
|
+
"description": "Anonymous, and rate-limited to 10 requests per client address in any\n15-minute window. The device code is a credential: it is returned once\nand stored only as a keyed digest. The user code is a short public\nidentifier shown on the verification page; it is 8 Crockford Base32\ncharacters displayed as `XXXX-XXXX`, and case, hyphens and spaces are\nignored on input with `I` read as `1` and `O` as `0`. Expired,\nunconsumed requests are cleared by the next successful create.\n",
|
|
598
|
+
"security": [],
|
|
599
|
+
"requestBody": {
|
|
600
|
+
"required": true,
|
|
601
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateDeviceAuthorizationRequest" } } }
|
|
602
|
+
},
|
|
603
|
+
"responses": {
|
|
604
|
+
"200": {
|
|
605
|
+
"description": "The new Device Authorization request.",
|
|
606
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceAuthorizationCode" } } }
|
|
607
|
+
},
|
|
608
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
609
|
+
"413": { "$ref": "#/components/responses/Problem" },
|
|
610
|
+
"429": { "$ref": "#/components/responses/Problem" },
|
|
611
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
612
|
+
}
|
|
613
|
+
} },
|
|
614
|
+
"/api/v1/auth/device/lookup": { "post": {
|
|
615
|
+
"operationId": "lookupDeviceAuthorization",
|
|
616
|
+
"summary": "Look up a Device Authorization by user code.",
|
|
617
|
+
"description": "Session-only; a Bearer Access Token is refused even though it\nauthenticates elsewhere. The code travels in the body, never in the\npath or query. Input is normalized like creation input. Denied and\nconsumed requests stay readable so a reload shows their resulting\nstate; unknown, expired and invalidated codes answer 404.\n",
|
|
618
|
+
"security": [{ "sessionCookie": [] }],
|
|
619
|
+
"requestBody": {
|
|
620
|
+
"required": true,
|
|
621
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/LookupDeviceAuthorizationRequest" } } }
|
|
622
|
+
},
|
|
623
|
+
"responses": {
|
|
624
|
+
"200": {
|
|
625
|
+
"description": "The request, in whatever state it reached.",
|
|
626
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceAuthorization" } } }
|
|
627
|
+
},
|
|
628
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
629
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
630
|
+
"403": { "$ref": "#/components/responses/Problem" },
|
|
631
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
632
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
633
|
+
}
|
|
634
|
+
} },
|
|
635
|
+
"/api/v1/auth/device/token": { "post": {
|
|
636
|
+
"operationId": "pollDeviceAuthorization",
|
|
637
|
+
"summary": "Poll a Device Authorization for its Access Token.",
|
|
638
|
+
"description": "Anonymous; the device code travels in the body. A pending request\nanswers 400 with the `authorization-pending` problem type, and a poll\ninside the advertised interval answers `slow-down`. A denied request\nanswers `access-denied`; an expired, invalidated, consumed or unknown\none answers `expired-token`. Approval mints nothing: the Access Token\nis created on the poll that observes the approval and its value is\nreturned exactly once. Unknown device codes are rate-limited per client\naddress.\n",
|
|
639
|
+
"security": [],
|
|
640
|
+
"requestBody": {
|
|
641
|
+
"required": true,
|
|
642
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/PollDeviceAuthorizationRequest" } } }
|
|
643
|
+
},
|
|
644
|
+
"responses": {
|
|
645
|
+
"200": {
|
|
646
|
+
"description": "The minted Access Token and its Principal.",
|
|
647
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceAuthorizationToken" } } }
|
|
648
|
+
},
|
|
649
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
650
|
+
"413": { "$ref": "#/components/responses/Problem" },
|
|
651
|
+
"429": { "$ref": "#/components/responses/Problem" },
|
|
652
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
653
|
+
}
|
|
654
|
+
} },
|
|
655
|
+
"/api/v1/auth/device/approve": { "post": {
|
|
656
|
+
"operationId": "approveDeviceAuthorization",
|
|
657
|
+
"summary": "Approve a Device Authorization.",
|
|
658
|
+
"description": "Session-only; a Bearer Access Token is refused. Records the approving\nPrincipal and the approval time and mints nothing. The Access Token is\ncreated only when the waiting CLI polls. A code that exists but is no\nlonger actionable counts as one failed attempt; at five attempts the\ncode is invalid for every operation and answers 404.\n",
|
|
659
|
+
"security": [{ "sessionCookie": [] }],
|
|
660
|
+
"requestBody": {
|
|
661
|
+
"required": true,
|
|
662
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApproveDeviceAuthorizationRequest" } } }
|
|
663
|
+
},
|
|
664
|
+
"responses": {
|
|
665
|
+
"200": {
|
|
666
|
+
"description": "The request in its approved state.",
|
|
667
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceAuthorization" } } }
|
|
668
|
+
},
|
|
669
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
670
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
671
|
+
"403": { "$ref": "#/components/responses/Problem" },
|
|
672
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
673
|
+
"413": { "$ref": "#/components/responses/Problem" },
|
|
674
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
675
|
+
}
|
|
676
|
+
} },
|
|
677
|
+
"/api/v1/auth/device/deny": { "post": {
|
|
678
|
+
"operationId": "denyDeviceAuthorization",
|
|
679
|
+
"summary": "Deny a Device Authorization.",
|
|
680
|
+
"description": "Session-only; a Bearer Access Token is refused. Records the denial and\nmints nothing. The waiting CLI's next poll answers `access-denied`. A\ncode that exists but is no longer actionable counts as one failed\nattempt; at five attempts the code is invalid for every operation and\nanswers 404.\n",
|
|
681
|
+
"security": [{ "sessionCookie": [] }],
|
|
682
|
+
"requestBody": {
|
|
683
|
+
"required": true,
|
|
684
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/DenyDeviceAuthorizationRequest" } } }
|
|
685
|
+
},
|
|
686
|
+
"responses": {
|
|
687
|
+
"200": {
|
|
688
|
+
"description": "The request in its denied state.",
|
|
689
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeviceAuthorization" } } }
|
|
690
|
+
},
|
|
691
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
692
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
693
|
+
"403": { "$ref": "#/components/responses/Problem" },
|
|
694
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
695
|
+
"413": { "$ref": "#/components/responses/Problem" },
|
|
696
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
697
|
+
}
|
|
698
|
+
} },
|
|
567
699
|
"/api/v1/logout": { "post": {
|
|
568
700
|
"operationId": "logout",
|
|
569
701
|
"summary": "Revoke the current Session and clear its cookie.",
|
|
@@ -1036,12 +1168,12 @@ const COMMANDS = deriveCommands({
|
|
|
1036
1168
|
}
|
|
1037
1169
|
},
|
|
1038
1170
|
{
|
|
1039
|
-
"name": "
|
|
1171
|
+
"name": "category",
|
|
1040
1172
|
"in": "query",
|
|
1041
|
-
"description": "
|
|
1173
|
+
"description": "A Category reference: `slug` for the system Namespace, otherwise\n`namespace/slug`. A Capability matches when it carries that\nCategory; the match combines with every other filter using AND.\nA syntactically invalid reference answers 400; a well-formed but\nunknown one matches nothing.\n",
|
|
1042
1174
|
"schema": {
|
|
1043
1175
|
"type": "string",
|
|
1044
|
-
"maxLength":
|
|
1176
|
+
"maxLength": 129
|
|
1045
1177
|
}
|
|
1046
1178
|
},
|
|
1047
1179
|
{ "$ref": "#/components/parameters/Cursor" },
|
|
@@ -1096,7 +1228,7 @@ const COMMANDS = deriveCommands({
|
|
|
1096
1228
|
"get": {
|
|
1097
1229
|
"operationId": "lookupCapability",
|
|
1098
1230
|
"summary": "Return a Capability the caller can read.",
|
|
1099
|
-
"description": "Anonymous callers read public Capabilities, authenticated Principals\nalso read internal ones, and the managers of the owning Namespace and\nPlatform Admins also read private ones. A Capability that is deleted,\nunavailable, owned by a disabled Team or Principal, or not readable by\nthe caller answers 404.\n\nThe `ETag` header covers management metadata only: it excludes
|
|
1231
|
+
"description": "Anonymous callers read public Capabilities, authenticated Principals\nalso read internal ones, and the managers of the owning Namespace and\nPlatform Admins also read private ones. A Capability that is deleted,\nunavailable, owned by a disabled Team or Principal, or not readable by\nthe caller answers 404.\n\nThe `ETag` header covers management metadata only: it includes the\nassigned Category's id, name and slug, and excludes `download_count`\nand any caller-relative field, so a download never invalidates an\neditor's `If-Match`.\n",
|
|
1100
1232
|
"security": [
|
|
1101
1233
|
{},
|
|
1102
1234
|
{ "sessionCookie": [] },
|
|
@@ -1115,8 +1247,8 @@ const COMMANDS = deriveCommands({
|
|
|
1115
1247
|
},
|
|
1116
1248
|
"patch": {
|
|
1117
1249
|
"operationId": "updateCapability",
|
|
1118
|
-
"summary": "Change a Capability's description or
|
|
1119
|
-
"description": "Omitted fields are left unchanged. The change
|
|
1250
|
+
"summary": "Change a Capability's description, visibility or Category.",
|
|
1251
|
+
"description": "Omitted fields are left unchanged. `category` is three-state: omitted\nleaves the Category unchanged, `null` clears it, and a slug replaces it\nwith a live Category of the Capability's own Namespace. The change\napplies to every Version at once and publishes none. `kind`,\n`namespace` and `name` are immutable, so sending any of them returns\n400.\n\nThe caller must manage the Capability's Namespace, under the same\nrules as `createCapability`. A deleted or unavailable Capability, one\nin an unusable Namespace, and a private one the caller does not manage\nreturn 404; those checks come before the precondition. `If-Match`\nmust then carry the current strong `ETag` of `lookupCapability`: a\nmissing value answers 428 and a stale one 412. That `ETag` covers\nmanagement metadata only, including the assigned Category's id, name\nand slug, and excluding `download_count` and caller-relative fields,\nso downloads do not cause spurious 412s.\n",
|
|
1120
1252
|
"security": [{ "sessionCookie": [] }, { "bearerToken": [] }],
|
|
1121
1253
|
"parameters": [{ "$ref": "#/components/parameters/IfMatch" }],
|
|
1122
1254
|
"requestBody": {
|
|
@@ -1285,43 +1417,249 @@ const COMMANDS = deriveCommands({
|
|
|
1285
1417
|
"default": { "$ref": "#/components/responses/Problem" }
|
|
1286
1418
|
}
|
|
1287
1419
|
} },
|
|
1288
|
-
"/api/v1/
|
|
1289
|
-
"
|
|
1290
|
-
|
|
1291
|
-
|
|
1420
|
+
"/api/v1/categories": {
|
|
1421
|
+
"get": {
|
|
1422
|
+
"operationId": "listCategories",
|
|
1423
|
+
"summary": "List Categories as a usage view or one Namespace's full taxonomy.",
|
|
1424
|
+
"description": "The usage view lists only Categories carrying at least one Capability\nthe caller may read, with `count` set to those readable Capabilities. It\nis readable anonymously, under the same visibility rules as\n`listCapabilities`; `view=usage` with `namespace` scopes it to that\nNamespace without requiring any management fact. The taxonomy view lists\none live Namespace's full taxonomy, including Categories with\n`count: 0`, and requires `can_create_in_namespace` there or Platform\nAdmin: an unknown or non-live Namespace answers 404, an anonymous\ncaller 401 and a caller with neither fact 403. A Platform Admin may read\na team or principal taxonomy to assign a Category, but `can_manage`\nstays the `can_manage_category` fact, so it is `false` there. Omit\n`view` to keep the namespace-inferred behavior: `namespace` asks for the\ntaxonomy, no `namespace` for the usage view. `q` is a case-insensitive\nsubstring of the name or slug.\nUsage rows are ordered by `count` descending, then Namespace name, then\nname; taxonomy rows by name. The response is not paginated: counts\nchange with Capability edits, so `truncated` reports that more\nCategories exist than `limit` instead of offering a cursor.\n`can_manage` reports whether the caller may create, rename or delete\nCategories of that Namespace: it is the server's `can_manage_category`\nfact in the taxonomy view, and always `false` in the usage view, where\nno single Namespace is governed.\n",
|
|
1425
|
+
"security": [
|
|
1426
|
+
{},
|
|
1427
|
+
{ "sessionCookie": [] },
|
|
1428
|
+
{ "bearerToken": [] }
|
|
1429
|
+
],
|
|
1430
|
+
"parameters": [
|
|
1431
|
+
{
|
|
1432
|
+
"name": "view",
|
|
1433
|
+
"in": "query",
|
|
1434
|
+
"description": "`usage` lists Categories carrying at least one readable Capability,\noptionally scoped by `namespace`. `taxonomy` lists one Namespace's\nfull taxonomy and requires `namespace`. Omitted, a `namespace`\nselects the taxonomy and no `namespace` selects the usage view.\n",
|
|
1435
|
+
"schema": {
|
|
1436
|
+
"type": "string",
|
|
1437
|
+
"enum": ["usage", "taxonomy"]
|
|
1438
|
+
}
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"name": "namespace",
|
|
1442
|
+
"in": "query",
|
|
1443
|
+
"description": "With the taxonomy view, the live Namespace whose full taxonomy to\nlist. With the usage view, the Namespace its counts are scoped to.\n",
|
|
1444
|
+
"schema": { "$ref": "#/components/schemas/Name" }
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
"name": "q",
|
|
1448
|
+
"in": "query",
|
|
1449
|
+
"description": "Case-insensitive text found in the name or slug. Empty means no filter.",
|
|
1450
|
+
"schema": {
|
|
1451
|
+
"type": "string",
|
|
1452
|
+
"maxLength": 200
|
|
1453
|
+
}
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
"name": "limit",
|
|
1457
|
+
"in": "query",
|
|
1458
|
+
"description": "The most Categories the response holds.",
|
|
1459
|
+
"schema": {
|
|
1460
|
+
"type": "integer",
|
|
1461
|
+
"minimum": 1,
|
|
1462
|
+
"maximum": 200,
|
|
1463
|
+
"default": 100
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
],
|
|
1467
|
+
"responses": {
|
|
1468
|
+
"200": {
|
|
1469
|
+
"description": "The matching Categories and their readable counts.",
|
|
1470
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CategoryList" } } }
|
|
1471
|
+
},
|
|
1472
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
1473
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
1474
|
+
"403": { "$ref": "#/components/responses/Problem" },
|
|
1475
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
1476
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1479
|
+
"post": {
|
|
1480
|
+
"operationId": "createCategory",
|
|
1481
|
+
"summary": "Create a Category in a Namespace the caller owns.",
|
|
1482
|
+
"description": "Allowed for the Namespace owner: a Platform Admin for `system`, an\nEffective Team Admin for a Team's Namespace and the owning Principal for\na principal Namespace. The name is normalized and must be 1–32\ncharacters without a comma or a control character. `slug` is optional;\nwhen omitted the server derives it from the normalized name and answers\n400 if the name cannot form a valid slug. Both name and slug are unique\nwithin the Namespace, and a duplicate answers 409.\n",
|
|
1483
|
+
"security": [{ "sessionCookie": [] }, { "bearerToken": [] }],
|
|
1484
|
+
"requestBody": {
|
|
1485
|
+
"required": true,
|
|
1486
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCategoryRequest" } } }
|
|
1487
|
+
},
|
|
1488
|
+
"responses": {
|
|
1489
|
+
"201": {
|
|
1490
|
+
"description": "The created Category.",
|
|
1491
|
+
"headers": { "Location": {
|
|
1492
|
+
"description": "`/api/v1/categories/{id}`",
|
|
1493
|
+
"schema": { "type": "string" }
|
|
1494
|
+
} },
|
|
1495
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" } } }
|
|
1496
|
+
},
|
|
1497
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
1498
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
1499
|
+
"403": { "$ref": "#/components/responses/Problem" },
|
|
1500
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
1501
|
+
"409": { "$ref": "#/components/responses/Problem" },
|
|
1502
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
},
|
|
1506
|
+
"/api/v1/capabilities/{capability_id}/versions/{version}/files": { "get": {
|
|
1507
|
+
"operationId": "listCapabilityVersionFiles",
|
|
1508
|
+
"summary": "List the entries of one Skill Version's package.",
|
|
1509
|
+
"description": "The entries come from the package's ZIP central directory; no entry is\ndecompressed. They are returned as stored, including `__MACOSX/` and\n`.DS_Store` entries, and missing ancestor directories are synthesized\nwith `size` 0, `mode` `\"0755\"` and `is_dir` true. `mode` is the\nfour-digit octal permission bits the archive declares, `\"0644\"` for\nfiles and `\"0755\"` for directories when it declares none. Entries are\nsorted by `path` in byte order and the list is not paginated.\n\nAn MCP Version, a Version the caller cannot read, or a Capability with\nno such Version answers 404. A Skill package missing from storage or\nunreadable answers 500. Listing is not a download and leaves the\nCapability's `download_count` unchanged.\n",
|
|
1292
1510
|
"security": [
|
|
1293
1511
|
{},
|
|
1294
1512
|
{ "sessionCookie": [] },
|
|
1295
1513
|
{ "bearerToken": [] }
|
|
1296
1514
|
],
|
|
1297
|
-
"parameters": [{
|
|
1298
|
-
"name": "
|
|
1299
|
-
"in": "
|
|
1300
|
-
"
|
|
1301
|
-
"schema": {
|
|
1302
|
-
"type": "string",
|
|
1303
|
-
"maxLength": 200
|
|
1304
|
-
}
|
|
1305
|
-
}, {
|
|
1306
|
-
"name": "limit",
|
|
1307
|
-
"in": "query",
|
|
1308
|
-
"description": "The most tags the response holds.",
|
|
1309
|
-
"schema": {
|
|
1310
|
-
"type": "integer",
|
|
1311
|
-
"minimum": 1,
|
|
1312
|
-
"maximum": 200,
|
|
1313
|
-
"default": 100
|
|
1314
|
-
}
|
|
1515
|
+
"parameters": [{ "$ref": "#/components/parameters/CapabilityID" }, {
|
|
1516
|
+
"name": "version",
|
|
1517
|
+
"in": "path",
|
|
1518
|
+
"required": true,
|
|
1519
|
+
"schema": { "$ref": "#/components/schemas/CalVer" }
|
|
1315
1520
|
}],
|
|
1316
1521
|
"responses": {
|
|
1317
1522
|
"200": {
|
|
1318
|
-
"description": "
|
|
1319
|
-
"
|
|
1523
|
+
"description": "Every entry of the package.",
|
|
1524
|
+
"headers": { "Cache-Control": { "$ref": "#/components/headers/ContentCacheControl" } },
|
|
1525
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/PackageEntryList" } } }
|
|
1526
|
+
},
|
|
1527
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
1528
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
1529
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
1530
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
1531
|
+
}
|
|
1532
|
+
} },
|
|
1533
|
+
"/api/v1/capabilities/{capability_id}/versions/{version}/file": { "get": {
|
|
1534
|
+
"operationId": "lookupCapabilityVersionFile",
|
|
1535
|
+
"summary": "Return one entry of a Skill Version's package.",
|
|
1536
|
+
"description": "`path` must equal an entry path exactly. It is never interpreted as a\nfilesystem path: a `..` segment, an absolute path, a backslash, a NUL\nbyte, a directory and an unknown name all answer 404. Nothing is\nextracted to disk.\n\n`Content-Length` is the size the central directory declares. The strong\n`ETag` is the quoted hex sha256 of the package digest, a NUL byte and\nthe entry path, so it is known before decompression and every package\nchange invalidates every entry; `If-None-Match` answers 304 with the\nsame tag. PNG, JPEG, GIF and WebP entries are served with their image\nmedia type, text-like entries (Markdown and common extensionless files\nsuch as `Dockerfile` and `LICENSE` included) as\n`text/plain; charset=utf-8`, and everything else, including SVG, HTML,\nXML, JavaScript and CSS, as `application/octet-stream` with\n`Content-Disposition: attachment`. Every response, including 304,\ncarries `X-Content-Type-Options: nosniff`.\n\nAn MCP Version, a Version the caller cannot read, or a Capability with\nno such Version answers 404. A Skill package missing from storage or\nunreadable answers 500. Reading one entry is not a download and leaves\nthe Capability's `download_count` unchanged.\n",
|
|
1537
|
+
"security": [
|
|
1538
|
+
{},
|
|
1539
|
+
{ "sessionCookie": [] },
|
|
1540
|
+
{ "bearerToken": [] }
|
|
1541
|
+
],
|
|
1542
|
+
"parameters": [
|
|
1543
|
+
{ "$ref": "#/components/parameters/CapabilityID" },
|
|
1544
|
+
{
|
|
1545
|
+
"name": "version",
|
|
1546
|
+
"in": "path",
|
|
1547
|
+
"required": true,
|
|
1548
|
+
"schema": { "$ref": "#/components/schemas/CalVer" }
|
|
1549
|
+
},
|
|
1550
|
+
{
|
|
1551
|
+
"name": "path",
|
|
1552
|
+
"in": "query",
|
|
1553
|
+
"description": "An entry path exactly as listed by the files endpoint.",
|
|
1554
|
+
"required": true,
|
|
1555
|
+
"schema": { "type": "string" }
|
|
1556
|
+
},
|
|
1557
|
+
{
|
|
1558
|
+
"name": "If-None-Match",
|
|
1559
|
+
"in": "header",
|
|
1560
|
+
"description": "Entity tags the caller holds. A match, or `*`, answers 304.",
|
|
1561
|
+
"required": false,
|
|
1562
|
+
"schema": { "type": "string" }
|
|
1563
|
+
}
|
|
1564
|
+
],
|
|
1565
|
+
"responses": {
|
|
1566
|
+
"200": {
|
|
1567
|
+
"description": "The entry's bytes.",
|
|
1568
|
+
"headers": {
|
|
1569
|
+
"ETag": { "$ref": "#/components/headers/ETag" },
|
|
1570
|
+
"Cache-Control": { "$ref": "#/components/headers/ContentCacheControl" },
|
|
1571
|
+
"Content-Disposition": { "$ref": "#/components/headers/ContentDisposition" },
|
|
1572
|
+
"X-Content-Type-Options": { "$ref": "#/components/headers/XContentTypeOptions" }
|
|
1573
|
+
},
|
|
1574
|
+
"content": {
|
|
1575
|
+
"application/octet-stream": { "schema": {
|
|
1576
|
+
"type": "string",
|
|
1577
|
+
"format": "binary"
|
|
1578
|
+
} },
|
|
1579
|
+
"image/png": { "schema": {
|
|
1580
|
+
"type": "string",
|
|
1581
|
+
"format": "binary"
|
|
1582
|
+
} },
|
|
1583
|
+
"image/jpeg": { "schema": {
|
|
1584
|
+
"type": "string",
|
|
1585
|
+
"format": "binary"
|
|
1586
|
+
} },
|
|
1587
|
+
"image/gif": { "schema": {
|
|
1588
|
+
"type": "string",
|
|
1589
|
+
"format": "binary"
|
|
1590
|
+
} },
|
|
1591
|
+
"image/webp": { "schema": {
|
|
1592
|
+
"type": "string",
|
|
1593
|
+
"format": "binary"
|
|
1594
|
+
} },
|
|
1595
|
+
"text/plain": { "schema": {
|
|
1596
|
+
"type": "string",
|
|
1597
|
+
"format": "binary"
|
|
1598
|
+
} }
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
"304": {
|
|
1602
|
+
"description": "The caller's copy is current. No body.",
|
|
1603
|
+
"headers": {
|
|
1604
|
+
"ETag": { "$ref": "#/components/headers/ETag" },
|
|
1605
|
+
"Cache-Control": { "$ref": "#/components/headers/ContentCacheControl" },
|
|
1606
|
+
"X-Content-Type-Options": { "$ref": "#/components/headers/XContentTypeOptions" }
|
|
1607
|
+
}
|
|
1320
1608
|
},
|
|
1321
1609
|
"400": { "$ref": "#/components/responses/Problem" },
|
|
1610
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
1611
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
1322
1612
|
"default": { "$ref": "#/components/responses/Problem" }
|
|
1323
1613
|
}
|
|
1324
1614
|
} },
|
|
1615
|
+
"/api/v1/categories/{category_id}": {
|
|
1616
|
+
"parameters": [{
|
|
1617
|
+
"name": "category_id",
|
|
1618
|
+
"in": "path",
|
|
1619
|
+
"required": true,
|
|
1620
|
+
"schema": {
|
|
1621
|
+
"type": "string",
|
|
1622
|
+
"format": "uuid"
|
|
1623
|
+
}
|
|
1624
|
+
}],
|
|
1625
|
+
"patch": {
|
|
1626
|
+
"operationId": "renameCategory",
|
|
1627
|
+
"summary": "Rename a Category, keeping its immutable slug.",
|
|
1628
|
+
"description": "Allowed for the same callers as `createCategory`. Only the display name\nchanges; the slug is immutable, so sending `slug` answers 400. A\nduplicate name in the same Namespace answers 409.\n",
|
|
1629
|
+
"security": [{ "sessionCookie": [] }, { "bearerToken": [] }],
|
|
1630
|
+
"requestBody": {
|
|
1631
|
+
"required": true,
|
|
1632
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/RenameCategoryRequest" } } }
|
|
1633
|
+
},
|
|
1634
|
+
"responses": {
|
|
1635
|
+
"200": {
|
|
1636
|
+
"description": "The renamed Category.",
|
|
1637
|
+
"content": { "application/json": { "schema": { "$ref": "#/components/schemas/Category" } } }
|
|
1638
|
+
},
|
|
1639
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
1640
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
1641
|
+
"403": { "$ref": "#/components/responses/Problem" },
|
|
1642
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
1643
|
+
"409": { "$ref": "#/components/responses/Problem" },
|
|
1644
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
1645
|
+
}
|
|
1646
|
+
},
|
|
1647
|
+
"delete": {
|
|
1648
|
+
"operationId": "deleteCategory",
|
|
1649
|
+
"summary": "Delete an unused Category.",
|
|
1650
|
+
"description": "Allowed for the same callers as `createCategory`. Deletion is physical.\nA Category referenced by a live Capability answers 409 with the in-use\ncount; references held by soft-deleted Capabilities are nulled by the\nforeign key and do not block.\n",
|
|
1651
|
+
"security": [{ "sessionCookie": [] }, { "bearerToken": [] }],
|
|
1652
|
+
"responses": {
|
|
1653
|
+
"204": { "description": "The Category is deleted." },
|
|
1654
|
+
"400": { "$ref": "#/components/responses/Problem" },
|
|
1655
|
+
"401": { "$ref": "#/components/responses/Problem" },
|
|
1656
|
+
"403": { "$ref": "#/components/responses/Problem" },
|
|
1657
|
+
"404": { "$ref": "#/components/responses/Problem" },
|
|
1658
|
+
"409": { "$ref": "#/components/responses/Problem" },
|
|
1659
|
+
"default": { "$ref": "#/components/responses/Problem" }
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
},
|
|
1325
1663
|
"/api/v1/audit-events": { "get": {
|
|
1326
1664
|
"operationId": "listAuditEvents",
|
|
1327
1665
|
"summary": "List the Platform's Audit Events, newest first.",
|
|
@@ -1349,6 +1687,11 @@ const COMMANDS = deriveCommands({
|
|
|
1349
1687
|
"capability.updated",
|
|
1350
1688
|
"capability.deleted",
|
|
1351
1689
|
"capability.version_published",
|
|
1690
|
+
"category.created",
|
|
1691
|
+
"category.renamed",
|
|
1692
|
+
"category.deleted",
|
|
1693
|
+
"cli.device_authorized",
|
|
1694
|
+
"cli.device_denied",
|
|
1352
1695
|
"principal.created",
|
|
1353
1696
|
"principal.disabled",
|
|
1354
1697
|
"principal.enabled",
|
|
@@ -1378,6 +1721,8 @@ const COMMANDS = deriveCommands({
|
|
|
1378
1721
|
"enum": [
|
|
1379
1722
|
"access_token",
|
|
1380
1723
|
"capability",
|
|
1724
|
+
"category",
|
|
1725
|
+
"device_authorization",
|
|
1381
1726
|
"principal",
|
|
1382
1727
|
"session",
|
|
1383
1728
|
"team"
|
|
@@ -1772,7 +2117,7 @@ const COMMANDS = deriveCommands({
|
|
|
1772
2117
|
} },
|
|
1773
2118
|
"headers": {
|
|
1774
2119
|
"ETag": {
|
|
1775
|
-
"description": "A strong entity tag of the resource's management metadata: the fields\nthat describe how the resource is governed, such as a Capability's\
|
|
2120
|
+
"description": "A strong entity tag of the resource's management metadata: the fields\nthat describe how the resource is governed, such as a Capability's\nassigned Category's id, name and slug, excluding mutable counters like\na Capability's `download_count` and any caller-relative field. A\ndownload therefore never invalidates an editor's `If-Match`, and every\ncaller sees the same tag.\n",
|
|
1776
2121
|
"required": true,
|
|
1777
2122
|
"schema": { "type": "string" }
|
|
1778
2123
|
},
|
|
@@ -1780,6 +2125,16 @@ const COMMANDS = deriveCommands({
|
|
|
1780
2125
|
"description": "`private, no-store` when the Content is not public to anonymous\nreaders; absent for public Content.\n",
|
|
1781
2126
|
"required": false,
|
|
1782
2127
|
"schema": { "type": "string" }
|
|
2128
|
+
},
|
|
2129
|
+
"ContentDisposition": {
|
|
2130
|
+
"description": "`attachment` carrying the entry's file name for types served as\n`application/octet-stream`; absent when the entry is served inline.\n",
|
|
2131
|
+
"required": false,
|
|
2132
|
+
"schema": { "type": "string" }
|
|
2133
|
+
},
|
|
2134
|
+
"XContentTypeOptions": {
|
|
2135
|
+
"description": "Always `nosniff`.",
|
|
2136
|
+
"required": false,
|
|
2137
|
+
"schema": { "type": "string" }
|
|
1783
2138
|
}
|
|
1784
2139
|
},
|
|
1785
2140
|
"responses": {
|
|
@@ -1938,6 +2293,168 @@ const COMMANDS = deriveCommands({
|
|
|
1938
2293
|
},
|
|
1939
2294
|
"additionalProperties": false
|
|
1940
2295
|
},
|
|
2296
|
+
"CreateDeviceAuthorizationRequest": {
|
|
2297
|
+
"type": "object",
|
|
2298
|
+
"required": ["device_name", "token_name"],
|
|
2299
|
+
"properties": {
|
|
2300
|
+
"device_name": {
|
|
2301
|
+
"type": "string",
|
|
2302
|
+
"minLength": 1,
|
|
2303
|
+
"maxLength": 128,
|
|
2304
|
+
"description": "The device name the CLI reports, shown to the approver."
|
|
2305
|
+
},
|
|
2306
|
+
"token_name": {
|
|
2307
|
+
"type": "string",
|
|
2308
|
+
"minLength": 1,
|
|
2309
|
+
"maxLength": 64,
|
|
2310
|
+
"description": "The name of the Access Token approval would create."
|
|
2311
|
+
}
|
|
2312
|
+
},
|
|
2313
|
+
"additionalProperties": false
|
|
2314
|
+
},
|
|
2315
|
+
"DeviceAuthorizationCode": {
|
|
2316
|
+
"type": "object",
|
|
2317
|
+
"required": [
|
|
2318
|
+
"device_code",
|
|
2319
|
+
"user_code",
|
|
2320
|
+
"verification_uri",
|
|
2321
|
+
"verification_uri_complete",
|
|
2322
|
+
"expires_in",
|
|
2323
|
+
"interval"
|
|
2324
|
+
],
|
|
2325
|
+
"properties": {
|
|
2326
|
+
"device_code": {
|
|
2327
|
+
"type": "string",
|
|
2328
|
+
"description": "The credential the CLI polls with. Returned only here and stored as\na keyed digest.\n"
|
|
2329
|
+
},
|
|
2330
|
+
"user_code": {
|
|
2331
|
+
"type": "string",
|
|
2332
|
+
"description": "The short public code displayed as `XXXX-XXXX`."
|
|
2333
|
+
},
|
|
2334
|
+
"verification_uri": {
|
|
2335
|
+
"type": "string",
|
|
2336
|
+
"description": "Where the user approves the request."
|
|
2337
|
+
},
|
|
2338
|
+
"verification_uri_complete": {
|
|
2339
|
+
"type": "string",
|
|
2340
|
+
"description": "The verification URI with the user code already applied."
|
|
2341
|
+
},
|
|
2342
|
+
"expires_in": {
|
|
2343
|
+
"type": "integer",
|
|
2344
|
+
"description": "Seconds until the request expires. Always 900."
|
|
2345
|
+
},
|
|
2346
|
+
"interval": {
|
|
2347
|
+
"type": "integer",
|
|
2348
|
+
"description": "The minimum seconds between polls. Always 5."
|
|
2349
|
+
}
|
|
2350
|
+
},
|
|
2351
|
+
"additionalProperties": false
|
|
2352
|
+
},
|
|
2353
|
+
"LookupDeviceAuthorizationRequest": {
|
|
2354
|
+
"type": "object",
|
|
2355
|
+
"required": ["user_code"],
|
|
2356
|
+
"properties": { "user_code": {
|
|
2357
|
+
"type": "string",
|
|
2358
|
+
"minLength": 1,
|
|
2359
|
+
"maxLength": 32
|
|
2360
|
+
} },
|
|
2361
|
+
"additionalProperties": false
|
|
2362
|
+
},
|
|
2363
|
+
"PollDeviceAuthorizationRequest": {
|
|
2364
|
+
"type": "object",
|
|
2365
|
+
"required": ["device_code"],
|
|
2366
|
+
"properties": { "device_code": {
|
|
2367
|
+
"type": "string",
|
|
2368
|
+
"minLength": 1,
|
|
2369
|
+
"maxLength": 128
|
|
2370
|
+
} },
|
|
2371
|
+
"additionalProperties": false
|
|
2372
|
+
},
|
|
2373
|
+
"ApproveDeviceAuthorizationRequest": {
|
|
2374
|
+
"type": "object",
|
|
2375
|
+
"required": ["user_code"],
|
|
2376
|
+
"properties": { "user_code": {
|
|
2377
|
+
"type": "string",
|
|
2378
|
+
"minLength": 1,
|
|
2379
|
+
"maxLength": 32
|
|
2380
|
+
} },
|
|
2381
|
+
"additionalProperties": false
|
|
2382
|
+
},
|
|
2383
|
+
"DenyDeviceAuthorizationRequest": {
|
|
2384
|
+
"type": "object",
|
|
2385
|
+
"required": ["user_code"],
|
|
2386
|
+
"properties": { "user_code": {
|
|
2387
|
+
"type": "string",
|
|
2388
|
+
"minLength": 1,
|
|
2389
|
+
"maxLength": 32
|
|
2390
|
+
} },
|
|
2391
|
+
"additionalProperties": false
|
|
2392
|
+
},
|
|
2393
|
+
"DeviceAuthorization": {
|
|
2394
|
+
"type": "object",
|
|
2395
|
+
"required": [
|
|
2396
|
+
"device_name",
|
|
2397
|
+
"source_ip",
|
|
2398
|
+
"requested_at",
|
|
2399
|
+
"token_name",
|
|
2400
|
+
"expires_at",
|
|
2401
|
+
"state"
|
|
2402
|
+
],
|
|
2403
|
+
"properties": {
|
|
2404
|
+
"device_name": { "type": "string" },
|
|
2405
|
+
"source_ip": { "type": "string" },
|
|
2406
|
+
"requested_at": {
|
|
2407
|
+
"type": "string",
|
|
2408
|
+
"format": "date-time"
|
|
2409
|
+
},
|
|
2410
|
+
"token_name": { "type": "string" },
|
|
2411
|
+
"expires_at": {
|
|
2412
|
+
"type": "string",
|
|
2413
|
+
"format": "date-time"
|
|
2414
|
+
},
|
|
2415
|
+
"state": {
|
|
2416
|
+
"type": "string",
|
|
2417
|
+
"enum": [
|
|
2418
|
+
"pending",
|
|
2419
|
+
"approved",
|
|
2420
|
+
"denied",
|
|
2421
|
+
"consumed"
|
|
2422
|
+
],
|
|
2423
|
+
"description": "The request's lifecycle state. Denied and consumed requests stay\nreadable so a reload shows the outcome.\n"
|
|
2424
|
+
}
|
|
2425
|
+
},
|
|
2426
|
+
"additionalProperties": false
|
|
2427
|
+
},
|
|
2428
|
+
"DeviceAuthorizationToken": {
|
|
2429
|
+
"type": "object",
|
|
2430
|
+
"required": [
|
|
2431
|
+
"token",
|
|
2432
|
+
"token_id",
|
|
2433
|
+
"token_prefix",
|
|
2434
|
+
"name",
|
|
2435
|
+
"principal"
|
|
2436
|
+
],
|
|
2437
|
+
"properties": {
|
|
2438
|
+
"token": {
|
|
2439
|
+
"type": "string",
|
|
2440
|
+
"description": "The Access Token value. Returned exactly once, by the poll that\nconsumes the approval.\n"
|
|
2441
|
+
},
|
|
2442
|
+
"token_id": {
|
|
2443
|
+
"type": "string",
|
|
2444
|
+
"format": "uuid"
|
|
2445
|
+
},
|
|
2446
|
+
"token_prefix": {
|
|
2447
|
+
"type": "string",
|
|
2448
|
+
"description": "The first eight random characters, for display."
|
|
2449
|
+
},
|
|
2450
|
+
"name": {
|
|
2451
|
+
"type": "string",
|
|
2452
|
+
"description": "The token name shown on the verification page."
|
|
2453
|
+
},
|
|
2454
|
+
"principal": { "$ref": "#/components/schemas/Principal" }
|
|
2455
|
+
},
|
|
2456
|
+
"additionalProperties": false
|
|
2457
|
+
},
|
|
1941
2458
|
"Principal": {
|
|
1942
2459
|
"type": "object",
|
|
1943
2460
|
"required": [
|
|
@@ -2035,6 +2552,8 @@ const COMMANDS = deriveCommands({
|
|
|
2035
2552
|
"enum": [
|
|
2036
2553
|
"access_token",
|
|
2037
2554
|
"capability",
|
|
2555
|
+
"category",
|
|
2556
|
+
"device_authorization",
|
|
2038
2557
|
"principal",
|
|
2039
2558
|
"session",
|
|
2040
2559
|
"team"
|
|
@@ -2263,13 +2782,6 @@ const COMMANDS = deriveCommands({
|
|
|
2263
2782
|
"additionalProperties": true,
|
|
2264
2783
|
"x-go-type": "json.RawMessage"
|
|
2265
2784
|
},
|
|
2266
|
-
"Tag": {
|
|
2267
|
-
"type": "string",
|
|
2268
|
-
"description": "A normalized tag: 1–32 Unicode characters after trimming, collapsing\ninternal whitespace and case-folding to lowercase. It cannot contain a\ncomma or a control character. Writers and readers normalize the same\nway, so a tag compares and filters by its normalized form.\n",
|
|
2269
|
-
"minLength": 1,
|
|
2270
|
-
"maxLength": 32,
|
|
2271
|
-
"pattern": "^[^,\\x00-\\x1F\\x7F]+$"
|
|
2272
|
-
},
|
|
2273
2785
|
"CreateMCPCapabilityRequest": {
|
|
2274
2786
|
"type": "object",
|
|
2275
2787
|
"required": [
|
|
@@ -2288,11 +2800,9 @@ const COMMANDS = deriveCommands({
|
|
|
2288
2800
|
"description": { "$ref": "#/components/schemas/Description" },
|
|
2289
2801
|
"visibility": { "$ref": "#/components/schemas/Visibility" },
|
|
2290
2802
|
"readme": { "$ref": "#/components/schemas/Readme" },
|
|
2291
|
-
"
|
|
2292
|
-
"type": "
|
|
2293
|
-
"description": "
|
|
2294
|
-
"maxItems": 8,
|
|
2295
|
-
"items": { "$ref": "#/components/schemas/Tag" }
|
|
2803
|
+
"category": {
|
|
2804
|
+
"type": "string",
|
|
2805
|
+
"description": "A Category slug inside the target Namespace. Omit it or send an\nempty value for uncategorized; an unknown slug, or one owned by\nanother or a non-live Namespace, answers 400.\n"
|
|
2296
2806
|
},
|
|
2297
2807
|
"config": { "$ref": "#/components/schemas/MCPConfig" }
|
|
2298
2808
|
},
|
|
@@ -2320,10 +2830,9 @@ const COMMANDS = deriveCommands({
|
|
|
2320
2830
|
"type": "string",
|
|
2321
2831
|
"description": "Markdown, at most 1 MiB of UTF-8. Omitted means no README."
|
|
2322
2832
|
},
|
|
2323
|
-
"
|
|
2833
|
+
"category": {
|
|
2324
2834
|
"type": "string",
|
|
2325
|
-
"description": "
|
|
2326
|
-
"maxLength": 512
|
|
2835
|
+
"description": "A Category slug inside the target Namespace, sent as one multipart\nfield. Omit it or send an empty value for uncategorized; an unknown\nslug, or one owned by another or a non-live Namespace, answers 400.\n"
|
|
2327
2836
|
},
|
|
2328
2837
|
"package": {
|
|
2329
2838
|
"type": "string",
|
|
@@ -2337,11 +2846,11 @@ const COMMANDS = deriveCommands({
|
|
|
2337
2846
|
"properties": {
|
|
2338
2847
|
"description": { "$ref": "#/components/schemas/Description" },
|
|
2339
2848
|
"visibility": { "$ref": "#/components/schemas/Visibility" },
|
|
2340
|
-
"
|
|
2341
|
-
"
|
|
2342
|
-
"
|
|
2343
|
-
"
|
|
2344
|
-
"
|
|
2849
|
+
"category": {
|
|
2850
|
+
"description": "Three-state: omitted leaves the Category unchanged, `null` clears\nit, and a slug must name a live Category of this Capability's own\nNamespace. An unknown or foreign slug answers 400.\n",
|
|
2851
|
+
"type": ["string", "null"],
|
|
2852
|
+
"x-go-type": "json.RawMessage",
|
|
2853
|
+
"x-go-type-skip-optional-pointer": true
|
|
2345
2854
|
},
|
|
2346
2855
|
"kind": {
|
|
2347
2856
|
"description": "Immutable; any value returns 400.",
|
|
@@ -2398,7 +2907,7 @@ const COMMANDS = deriveCommands({
|
|
|
2398
2907
|
"path",
|
|
2399
2908
|
"visibility",
|
|
2400
2909
|
"description",
|
|
2401
|
-
"
|
|
2910
|
+
"category",
|
|
2402
2911
|
"download_count",
|
|
2403
2912
|
"current_version",
|
|
2404
2913
|
"created_at",
|
|
@@ -2432,11 +2941,9 @@ const COMMANDS = deriveCommands({
|
|
|
2432
2941
|
},
|
|
2433
2942
|
"visibility": { "$ref": "#/components/schemas/Visibility" },
|
|
2434
2943
|
"description": { "$ref": "#/components/schemas/Description" },
|
|
2435
|
-
"
|
|
2436
|
-
"
|
|
2437
|
-
"
|
|
2438
|
-
"maxItems": 8,
|
|
2439
|
-
"items": { "$ref": "#/components/schemas/Tag" }
|
|
2944
|
+
"category": {
|
|
2945
|
+
"description": "The assigned Category, or null when the Capability is uncategorized.",
|
|
2946
|
+
"oneOf": [{ "$ref": "#/components/schemas/CategoryRef" }, { "type": "null" }]
|
|
2440
2947
|
},
|
|
2441
2948
|
"download_count": {
|
|
2442
2949
|
"type": "integer",
|
|
@@ -2455,32 +2962,120 @@ const COMMANDS = deriveCommands({
|
|
|
2455
2962
|
}
|
|
2456
2963
|
}
|
|
2457
2964
|
},
|
|
2458
|
-
"
|
|
2965
|
+
"CategoryRef": {
|
|
2966
|
+
"type": "object",
|
|
2967
|
+
"required": [
|
|
2968
|
+
"id",
|
|
2969
|
+
"name",
|
|
2970
|
+
"slug"
|
|
2971
|
+
],
|
|
2972
|
+
"properties": {
|
|
2973
|
+
"id": {
|
|
2974
|
+
"type": "string",
|
|
2975
|
+
"format": "uuid"
|
|
2976
|
+
},
|
|
2977
|
+
"name": {
|
|
2978
|
+
"type": "string",
|
|
2979
|
+
"minLength": 1,
|
|
2980
|
+
"maxLength": 32,
|
|
2981
|
+
"description": "The Category's normalized display name."
|
|
2982
|
+
},
|
|
2983
|
+
"slug": {
|
|
2984
|
+
"$ref": "#/components/schemas/Name",
|
|
2985
|
+
"description": "The Category's immutable ASCII reference inside its Namespace."
|
|
2986
|
+
}
|
|
2987
|
+
},
|
|
2988
|
+
"additionalProperties": false
|
|
2989
|
+
},
|
|
2990
|
+
"Category": {
|
|
2459
2991
|
"type": "object",
|
|
2460
|
-
"required": [
|
|
2992
|
+
"required": [
|
|
2993
|
+
"id",
|
|
2994
|
+
"namespace",
|
|
2995
|
+
"namespace_kind",
|
|
2996
|
+
"name",
|
|
2997
|
+
"slug",
|
|
2998
|
+
"count"
|
|
2999
|
+
],
|
|
2461
3000
|
"properties": {
|
|
2462
|
-
"
|
|
3001
|
+
"id": {
|
|
3002
|
+
"type": "string",
|
|
3003
|
+
"format": "uuid"
|
|
3004
|
+
},
|
|
3005
|
+
"namespace": { "$ref": "#/components/schemas/Name" },
|
|
3006
|
+
"namespace_kind": { "$ref": "#/components/schemas/NamespaceKind" },
|
|
3007
|
+
"name": {
|
|
3008
|
+
"type": "string",
|
|
3009
|
+
"minLength": 1,
|
|
3010
|
+
"maxLength": 32,
|
|
3011
|
+
"description": "The normalized display name: trimmed and with internal whitespace\ncollapsed, with the caller's case preserved. Chinese names are\nsupported.\n"
|
|
3012
|
+
},
|
|
3013
|
+
"slug": {
|
|
3014
|
+
"$ref": "#/components/schemas/Name",
|
|
3015
|
+
"description": "The immutable ASCII reference of the Category inside its Namespace.\n"
|
|
3016
|
+
},
|
|
2463
3017
|
"count": {
|
|
2464
3018
|
"type": "integer",
|
|
2465
3019
|
"format": "int64",
|
|
2466
|
-
"minimum": 0
|
|
3020
|
+
"minimum": 0,
|
|
3021
|
+
"description": "The number of Capabilities carrying the Category that the caller may\nread. It is 0 in the Namespace taxonomy when no readable Capability\nuses the Category.\n"
|
|
2467
3022
|
}
|
|
2468
3023
|
}
|
|
2469
3024
|
},
|
|
2470
|
-
"
|
|
3025
|
+
"CategoryList": {
|
|
2471
3026
|
"type": "object",
|
|
2472
|
-
"required": [
|
|
3027
|
+
"required": [
|
|
3028
|
+
"items",
|
|
3029
|
+
"truncated",
|
|
3030
|
+
"can_manage"
|
|
3031
|
+
],
|
|
2473
3032
|
"properties": {
|
|
2474
3033
|
"items": {
|
|
2475
3034
|
"type": "array",
|
|
2476
|
-
"items": { "$ref": "#/components/schemas/
|
|
3035
|
+
"items": { "$ref": "#/components/schemas/Category" }
|
|
2477
3036
|
},
|
|
2478
3037
|
"truncated": {
|
|
2479
3038
|
"type": "boolean",
|
|
2480
|
-
"description": "More
|
|
3039
|
+
"description": "More Categories exist than the requested `limit`."
|
|
3040
|
+
},
|
|
3041
|
+
"can_manage": {
|
|
3042
|
+
"type": "boolean",
|
|
3043
|
+
"description": "Whether the caller may create, rename or delete Categories of the\nlisted Namespace. It is the authoritative `can_manage_category`\nfact in the Namespace view and always `false` in the usage view,\nwhere no single Namespace is named.\n"
|
|
2481
3044
|
}
|
|
2482
3045
|
}
|
|
2483
3046
|
},
|
|
3047
|
+
"CreateCategoryRequest": {
|
|
3048
|
+
"type": "object",
|
|
3049
|
+
"required": ["namespace", "name"],
|
|
3050
|
+
"properties": {
|
|
3051
|
+
"namespace": {
|
|
3052
|
+
"$ref": "#/components/schemas/Name",
|
|
3053
|
+
"description": "The name of the live Namespace that will own the Category."
|
|
3054
|
+
},
|
|
3055
|
+
"name": {
|
|
3056
|
+
"type": "string",
|
|
3057
|
+
"minLength": 1,
|
|
3058
|
+
"maxLength": 64,
|
|
3059
|
+
"description": "The display name. The server trims it and collapses internal\nwhitespace, preserving case, then requires 1–32 characters without\na comma or a control character.\n"
|
|
3060
|
+
},
|
|
3061
|
+
"slug": {
|
|
3062
|
+
"$ref": "#/components/schemas/Name",
|
|
3063
|
+
"description": "Optional immutable slug. Omitted means derive it from the normalized\nname; a name that cannot form a valid slug then answers 400.\n"
|
|
3064
|
+
}
|
|
3065
|
+
},
|
|
3066
|
+
"additionalProperties": false
|
|
3067
|
+
},
|
|
3068
|
+
"RenameCategoryRequest": {
|
|
3069
|
+
"type": "object",
|
|
3070
|
+
"required": ["name"],
|
|
3071
|
+
"properties": { "name": {
|
|
3072
|
+
"type": "string",
|
|
3073
|
+
"minLength": 1,
|
|
3074
|
+
"maxLength": 64,
|
|
3075
|
+
"description": "The new display name, normalized like `CreateCategoryRequest.name`.\nSending a `slug` property answers 400: the slug is immutable, and\nthe server rejects the property even though it is not declared.\n"
|
|
3076
|
+
} },
|
|
3077
|
+
"additionalProperties": false
|
|
3078
|
+
},
|
|
2484
3079
|
"CapabilityList": {
|
|
2485
3080
|
"type": "object",
|
|
2486
3081
|
"required": ["items", "next_cursor"],
|
|
@@ -2596,6 +3191,53 @@ const COMMANDS = deriveCommands({
|
|
|
2596
3191
|
],
|
|
2597
3192
|
"additionalProperties": false
|
|
2598
3193
|
},
|
|
3194
|
+
"PackageEntry": {
|
|
3195
|
+
"type": "object",
|
|
3196
|
+
"description": "One entry of a Skill package's ZIP central directory.",
|
|
3197
|
+
"properties": {
|
|
3198
|
+
"path": {
|
|
3199
|
+
"type": "string",
|
|
3200
|
+
"description": "The entry path, without a trailing slash."
|
|
3201
|
+
},
|
|
3202
|
+
"size": {
|
|
3203
|
+
"type": "integer",
|
|
3204
|
+
"format": "int64",
|
|
3205
|
+
"minimum": 0,
|
|
3206
|
+
"description": "The declared uncompressed size; 0 for a directory."
|
|
3207
|
+
},
|
|
3208
|
+
"mode": {
|
|
3209
|
+
"type": "string",
|
|
3210
|
+
"pattern": "^[0-7]{4}$",
|
|
3211
|
+
"description": "Four-digit octal permission bits, such as `\"0644\"`."
|
|
3212
|
+
},
|
|
3213
|
+
"is_dir": {
|
|
3214
|
+
"type": "boolean",
|
|
3215
|
+
"description": "Whether the entry is a directory."
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
"required": [
|
|
3219
|
+
"path",
|
|
3220
|
+
"size",
|
|
3221
|
+
"mode",
|
|
3222
|
+
"is_dir"
|
|
3223
|
+
],
|
|
3224
|
+
"additionalProperties": false
|
|
3225
|
+
},
|
|
3226
|
+
"PackageEntryList": {
|
|
3227
|
+
"type": "object",
|
|
3228
|
+
"required": ["items"],
|
|
3229
|
+
"properties": {
|
|
3230
|
+
"items": {
|
|
3231
|
+
"type": "array",
|
|
3232
|
+
"items": { "$ref": "#/components/schemas/PackageEntry" }
|
|
3233
|
+
},
|
|
3234
|
+
"default_path": {
|
|
3235
|
+
"type": "string",
|
|
3236
|
+
"description": "The entry the Package Browser selects by default: `SKILL.md` at the\npackage root or inside its single top-level directory. Omitted when\nthe package has none.\n"
|
|
3237
|
+
}
|
|
3238
|
+
},
|
|
3239
|
+
"additionalProperties": false
|
|
3240
|
+
},
|
|
2599
3241
|
"VersionList": {
|
|
2600
3242
|
"type": "object",
|
|
2601
3243
|
"required": ["items", "next_cursor"],
|
|
@@ -3037,10 +3679,9 @@ function workflowCatalog() {
|
|
|
3037
3679
|
description: "Markdown file to attach"
|
|
3038
3680
|
},
|
|
3039
3681
|
{
|
|
3040
|
-
name: "
|
|
3682
|
+
name: "category",
|
|
3041
3683
|
type: "string",
|
|
3042
|
-
|
|
3043
|
-
description: "Capability tag"
|
|
3684
|
+
description: "Category slug in the target namespace (create only)"
|
|
3044
3685
|
},
|
|
3045
3686
|
{
|
|
3046
3687
|
name: "new",
|
|
@@ -3119,10 +3760,9 @@ function workflowCatalog() {
|
|
|
3119
3760
|
description: "Markdown file to attach"
|
|
3120
3761
|
},
|
|
3121
3762
|
{
|
|
3122
|
-
name: "
|
|
3763
|
+
name: "category",
|
|
3123
3764
|
type: "string",
|
|
3124
|
-
|
|
3125
|
-
description: "Capability tag"
|
|
3765
|
+
description: "Category slug in the target namespace (create only)"
|
|
3126
3766
|
},
|
|
3127
3767
|
{
|
|
3128
3768
|
name: "new",
|