@agentxm/client-core 0.1.6 → 0.2.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.
Files changed (181) hide show
  1. package/dist/src/unstable/agents/coding-agent.d.ts +1 -1
  2. package/dist/src/unstable/agents/coding-agent.d.ts.map +1 -1
  3. package/dist/src/unstable/agents/coding-agent.js +1 -1
  4. package/dist/src/unstable/agents/coding-agent.js.map +1 -1
  5. package/dist/src/unstable/auth/auth-client.d.ts +1 -1
  6. package/dist/src/unstable/auth/auth-client.d.ts.map +1 -1
  7. package/dist/src/unstable/auth/auth-client.js +1 -1
  8. package/dist/src/unstable/auth/auth-client.js.map +1 -1
  9. package/dist/src/unstable/auth/credential-store.d.ts +1 -1
  10. package/dist/src/unstable/auth/credential-store.d.ts.map +1 -1
  11. package/dist/src/unstable/auth/credential-store.js +1 -1
  12. package/dist/src/unstable/auth/credential-store.js.map +1 -1
  13. package/dist/src/unstable/auth/device-login.d.ts +1 -1
  14. package/dist/src/unstable/auth/device-login.d.ts.map +1 -1
  15. package/dist/src/unstable/auth/device-login.js +1 -1
  16. package/dist/src/unstable/auth/device-login.js.map +1 -1
  17. package/dist/src/unstable/auth/guard-interaction.d.ts +1 -1
  18. package/dist/src/unstable/auth/guard-interaction.d.ts.map +1 -1
  19. package/dist/src/unstable/auth/guard-interaction.js +1 -1
  20. package/dist/src/unstable/auth/guard-interaction.js.map +1 -1
  21. package/dist/src/unstable/auth/login-interaction.d.ts +1 -1
  22. package/dist/src/unstable/auth/login-interaction.d.ts.map +1 -1
  23. package/dist/src/unstable/auth/login-interaction.js +1 -1
  24. package/dist/src/unstable/auth/login-interaction.js.map +1 -1
  25. package/dist/src/unstable/auth/registry-url.d.ts +1 -1
  26. package/dist/src/unstable/auth/registry-url.d.ts.map +1 -1
  27. package/dist/src/unstable/auth/registry-url.js +1 -1
  28. package/dist/src/unstable/auth/registry-url.js.map +1 -1
  29. package/dist/src/unstable/auth/schema.d.ts +3 -3
  30. package/dist/src/unstable/cli-flags/verbosity.d.ts +1 -1
  31. package/dist/src/unstable/cli-flags/verbosity.d.ts.map +1 -1
  32. package/dist/src/unstable/cli-flags/verbosity.js +1 -1
  33. package/dist/src/unstable/cli-flags/verbosity.js.map +1 -1
  34. package/dist/src/unstable/cli-renderer/cli-renderer.d.ts +1 -1
  35. package/dist/src/unstable/cli-renderer/cli-renderer.d.ts.map +1 -1
  36. package/dist/src/unstable/cli-renderer/cli-renderer.js +1 -1
  37. package/dist/src/unstable/cli-renderer/cli-renderer.js.map +1 -1
  38. package/dist/src/unstable/cli-runtime/command-argv.d.ts +1 -1
  39. package/dist/src/unstable/cli-runtime/command-argv.d.ts.map +1 -1
  40. package/dist/src/unstable/cli-runtime/command-argv.js +1 -1
  41. package/dist/src/unstable/cli-runtime/command-argv.js.map +1 -1
  42. package/dist/src/unstable/cli-runtime/graceful-shutdown.js +1 -1
  43. package/dist/src/unstable/cli-runtime/graceful-shutdown.js.map +1 -1
  44. package/dist/src/unstable/cli-runtime/telemetry.d.ts +1 -1
  45. package/dist/src/unstable/cli-runtime/telemetry.d.ts.map +1 -1
  46. package/dist/src/unstable/cli-runtime/telemetry.js +1 -1
  47. package/dist/src/unstable/cli-runtime/telemetry.js.map +1 -1
  48. package/dist/src/unstable/commands/manager.d.ts +1 -1
  49. package/dist/src/unstable/commands/manager.d.ts.map +1 -1
  50. package/dist/src/unstable/commands/manager.js +1 -1
  51. package/dist/src/unstable/commands/manager.js.map +1 -1
  52. package/dist/src/unstable/date-time.d.ts +2 -2
  53. package/dist/src/unstable/date-time.d.ts.map +1 -1
  54. package/dist/src/unstable/install-meta/install-meta.d.ts +1 -1
  55. package/dist/src/unstable/install-meta/install-meta.d.ts.map +1 -1
  56. package/dist/src/unstable/install-meta/install-meta.js +1 -1
  57. package/dist/src/unstable/install-meta/install-meta.js.map +1 -1
  58. package/dist/src/unstable/install-method/install-method.d.ts +1 -1
  59. package/dist/src/unstable/install-method/install-method.d.ts.map +1 -1
  60. package/dist/src/unstable/install-method/install-method.js +1 -1
  61. package/dist/src/unstable/install-method/install-method.js.map +1 -1
  62. package/dist/src/unstable/lockfile/schema.d.ts +404 -404
  63. package/dist/src/unstable/mcp-servers/manager.d.ts +1 -1
  64. package/dist/src/unstable/mcp-servers/manager.d.ts.map +1 -1
  65. package/dist/src/unstable/mcp-servers/manager.js +1 -1
  66. package/dist/src/unstable/mcp-servers/manager.js.map +1 -1
  67. package/dist/src/unstable/packs/manager.d.ts +1 -1
  68. package/dist/src/unstable/packs/manager.d.ts.map +1 -1
  69. package/dist/src/unstable/packs/manager.js +1 -1
  70. package/dist/src/unstable/packs/manager.js.map +1 -1
  71. package/dist/src/unstable/packs/operations/install.d.ts.map +1 -1
  72. package/dist/src/unstable/packs/operations/install.js +41 -0
  73. package/dist/src/unstable/packs/operations/install.js.map +1 -1
  74. package/dist/src/unstable/packs/operations/publish.d.ts.map +1 -1
  75. package/dist/src/unstable/packs/operations/publish.js +1 -0
  76. package/dist/src/unstable/packs/operations/publish.js.map +1 -1
  77. package/dist/src/unstable/registry/__generated__/registry-client.d.ts +675 -518
  78. package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
  79. package/dist/src/unstable/registry/__generated__/registry-client.js +546 -396
  80. package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
  81. package/dist/src/unstable/registry/remote-client.d.ts.map +1 -1
  82. package/dist/src/unstable/registry/remote-client.js +123 -18
  83. package/dist/src/unstable/registry/remote-client.js.map +1 -1
  84. package/dist/src/unstable/registry/schema.d.ts +2 -2
  85. package/dist/src/unstable/skills/manager.d.ts +1 -1
  86. package/dist/src/unstable/skills/manager.d.ts.map +1 -1
  87. package/dist/src/unstable/skills/manager.js +2 -2
  88. package/dist/src/unstable/skills/manager.js.map +1 -1
  89. package/dist/src/unstable/skills/materialization.js +1 -1
  90. package/dist/src/unstable/skills/materialization.js.map +1 -1
  91. package/dist/src/unstable/skills/operations/install.js +1 -1
  92. package/dist/src/unstable/skills/operations/install.js.map +1 -1
  93. package/dist/src/unstable/skills/operations/uninstall.js +1 -1
  94. package/dist/src/unstable/skills/operations/uninstall.js.map +1 -1
  95. package/dist/src/unstable/source-resolution/service.d.ts +1 -1
  96. package/dist/src/unstable/source-resolution/service.d.ts.map +1 -1
  97. package/dist/src/unstable/source-resolution/service.js +1 -1
  98. package/dist/src/unstable/source-resolution/service.js.map +1 -1
  99. package/dist/src/unstable/sources/types.d.ts +29 -29
  100. package/dist/src/unstable/sources/types.d.ts.map +1 -1
  101. package/dist/src/unstable/subagents/manager.d.ts +1 -1
  102. package/dist/src/unstable/subagents/manager.d.ts.map +1 -1
  103. package/dist/src/unstable/subagents/manager.js +4 -4
  104. package/dist/src/unstable/subagents/manager.js.map +1 -1
  105. package/dist/src/unstable/subagents/manifest-schema.js +2 -2
  106. package/dist/src/unstable/subagents/manifest-schema.js.map +1 -1
  107. package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts +20 -12
  108. package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts.map +1 -1
  109. package/dist/src/unstable/telemetry/__generated__/telemetry-client.js +11 -3
  110. package/dist/src/unstable/telemetry/__generated__/telemetry-client.js.map +1 -1
  111. package/dist/src/unstable/telemetry/client.d.ts +1 -1
  112. package/dist/src/unstable/telemetry/client.d.ts.map +1 -1
  113. package/dist/src/unstable/telemetry/client.js +1 -1
  114. package/dist/src/unstable/telemetry/client.js.map +1 -1
  115. package/dist/src/unstable/update-check/update-check.d.ts +1 -1
  116. package/dist/src/unstable/update-check/update-check.d.ts.map +1 -1
  117. package/dist/src/unstable/update-check/update-check.js +1 -1
  118. package/dist/src/unstable/update-check/update-check.js.map +1 -1
  119. package/dist/src/unstable/utils/fs-helpers.d.ts +7 -6
  120. package/dist/src/unstable/utils/fs-helpers.d.ts.map +1 -1
  121. package/dist/src/unstable/utils/fs-helpers.js +9 -9
  122. package/dist/src/unstable/utils/fs-helpers.js.map +1 -1
  123. package/dist/src/unstable/workspace/display-plan.js +1 -1
  124. package/dist/src/unstable/workspace/display-plan.js.map +1 -1
  125. package/dist/src/unstable/workspace/doctor/checks/extensions-active.d.ts +4 -0
  126. package/dist/src/unstable/workspace/doctor/checks/extensions-active.d.ts.map +1 -0
  127. package/dist/src/unstable/workspace/doctor/checks/extensions-active.js +238 -0
  128. package/dist/src/unstable/workspace/doctor/checks/extensions-active.js.map +1 -0
  129. package/dist/src/unstable/workspace/doctor/checks/extensions-current.d.ts +18 -0
  130. package/dist/src/unstable/workspace/doctor/checks/extensions-current.d.ts.map +1 -0
  131. package/dist/src/unstable/workspace/doctor/checks/extensions-current.js +92 -0
  132. package/dist/src/unstable/workspace/doctor/checks/extensions-current.js.map +1 -0
  133. package/dist/src/unstable/workspace/doctor/diagnose.d.ts +1 -1
  134. package/dist/src/unstable/workspace/doctor/diagnose.d.ts.map +1 -1
  135. package/dist/src/unstable/workspace/doctor/diagnose.js +16 -3
  136. package/dist/src/unstable/workspace/doctor/diagnose.js.map +1 -1
  137. package/dist/src/unstable/workspace/doctor/types.d.ts +2 -0
  138. package/dist/src/unstable/workspace/doctor/types.d.ts.map +1 -1
  139. package/dist/src/unstable/workspace/doctor/types.js +2 -0
  140. package/dist/src/unstable/workspace/doctor/types.js.map +1 -1
  141. package/dist/src/unstable/workspace/index.d.ts +1 -0
  142. package/dist/src/unstable/workspace/index.d.ts.map +1 -1
  143. package/dist/src/unstable/workspace/index.js +2 -0
  144. package/dist/src/unstable/workspace/index.js.map +1 -1
  145. package/dist/src/unstable/workspace/initialization-interaction.d.ts +1 -1
  146. package/dist/src/unstable/workspace/initialization-interaction.d.ts.map +1 -1
  147. package/dist/src/unstable/workspace/initialization-interaction.js +1 -1
  148. package/dist/src/unstable/workspace/initialization-interaction.js.map +1 -1
  149. package/dist/src/unstable/workspace/initialization.js +2 -2
  150. package/dist/src/unstable/workspace/initialization.js.map +1 -1
  151. package/dist/src/unstable/workspace/paths.d.ts +4 -3
  152. package/dist/src/unstable/workspace/paths.d.ts.map +1 -1
  153. package/dist/src/unstable/workspace/paths.js +7 -6
  154. package/dist/src/unstable/workspace/paths.js.map +1 -1
  155. package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts +1 -1
  156. package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts.map +1 -1
  157. package/dist/src/unstable/workspace/resolve-plan-interaction.js +1 -1
  158. package/dist/src/unstable/workspace/resolve-plan-interaction.js.map +1 -1
  159. package/dist/src/unstable/workspace/service-interface.d.ts +3 -1
  160. package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
  161. package/dist/src/unstable/workspace/service-interface.js +1 -1
  162. package/dist/src/unstable/workspace/service-interface.js.map +1 -1
  163. package/dist/src/unstable/workspace/service.js +1 -1
  164. package/dist/src/unstable/workspace/service.js.map +1 -1
  165. package/dist/src/unstable/workspace/version-currency/check-currency.d.ts +41 -0
  166. package/dist/src/unstable/workspace/version-currency/check-currency.d.ts.map +1 -0
  167. package/dist/src/unstable/workspace/version-currency/check-currency.js +50 -0
  168. package/dist/src/unstable/workspace/version-currency/check-currency.js.map +1 -0
  169. package/dist/src/unstable/workspace/version-currency/collectors.d.ts +55 -0
  170. package/dist/src/unstable/workspace/version-currency/collectors.d.ts.map +1 -0
  171. package/dist/src/unstable/workspace/version-currency/collectors.js +127 -0
  172. package/dist/src/unstable/workspace/version-currency/collectors.js.map +1 -0
  173. package/dist/src/unstable/workspace/version-currency/index.d.ts +11 -0
  174. package/dist/src/unstable/workspace/version-currency/index.d.ts.map +1 -0
  175. package/dist/src/unstable/workspace/version-currency/index.js +11 -0
  176. package/dist/src/unstable/workspace/version-currency/index.js.map +1 -0
  177. package/dist/src/unstable/workspace/version-currency/test-stubs.d.ts +5 -0
  178. package/dist/src/unstable/workspace/version-currency/test-stubs.d.ts.map +1 -0
  179. package/dist/src/unstable/workspace/version-currency/test-stubs.js +31 -0
  180. package/dist/src/unstable/workspace/version-currency/test-stubs.js.map +1 -0
  181. package/package.json +6 -6
@@ -8,46 +8,94 @@ import * as HttpClient from "effect/unstable/http/HttpClient";
8
8
  import * as HttpClientError from "effect/unstable/http/HttpClientError";
9
9
  import * as HttpClientRequest from "effect/unstable/http/HttpClientRequest";
10
10
  import * as HttpClientResponse from "effect/unstable/http/HttpClientResponse";
11
+ export const MetaResponse = Schema.Struct({
12
+ ok: Schema.Literal(true),
13
+ service: Schema.Literal("registry"),
14
+ message: Schema.String.annotate({ description: "Human-readable service greeting." }),
15
+ docs: Schema.Union([
16
+ Schema.String.annotate({
17
+ description: "Path to the interactive API documentation, or null when docs are disabled.",
18
+ format: "uri-reference",
19
+ }),
20
+ Schema.Null,
21
+ ]),
22
+ openapi: Schema.Union([
23
+ Schema.String.annotate({
24
+ description: "Path to the OpenAPI specification, or null when docs are disabled.",
25
+ format: "uri-reference",
26
+ }),
27
+ Schema.Null,
28
+ ]),
29
+ }).annotate({
30
+ title: "Meta Response",
31
+ description: "Registry service metadata including health status and documentation entry points.",
32
+ });
11
33
  export const DecodeErrorResponse = Schema.Struct({
12
34
  kind: Schema.Literal("DecodeErrorResponse"),
13
35
  type: Schema.String,
14
36
  title: Schema.String,
15
37
  status: Schema.Number.check(Schema.isInt()),
16
38
  detail: Schema.String,
17
- code: Schema.String,
18
39
  instance: Schema.optionalKey(Schema.String),
19
- });
20
- export const InternalError = Schema.Struct({
21
- kind: Schema.Literal("InternalError"),
22
- type: Schema.String,
23
- title: Schema.String,
24
- status: Schema.Number.check(Schema.isInt()),
25
- detail: Schema.String,
26
40
  code: Schema.String,
27
- instance: Schema.optionalKey(Schema.String),
28
- details: Schema.optionalKey(Schema.Struct({
29
- retryable: Schema.Boolean,
30
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
31
- requiredScope: Schema.optionalKey(Schema.String),
32
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
33
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
34
- })),
35
41
  });
36
- export const InvalidRequestError = Schema.Struct({
37
- kind: Schema.Literal("InvalidRequestError"),
38
- type: Schema.String,
39
- title: Schema.String,
40
- status: Schema.Number.check(Schema.isInt()),
41
- detail: Schema.String,
42
- code: Schema.String,
43
- instance: Schema.optionalKey(Schema.String),
44
- details: Schema.optionalKey(Schema.Struct({
45
- retryable: Schema.Boolean,
46
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
47
- requiredScope: Schema.optionalKey(Schema.String),
48
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
49
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
42
+ export const DeviceCodeResponse = Schema.Struct({
43
+ device_code: Schema.String.annotate({
44
+ description: "Device verification code for the polling client.",
45
+ }),
46
+ user_code: Schema.String.annotate({ description: "Short code the user enters in the browser." }),
47
+ verification_uri: Schema.String.annotate({
48
+ description: "URI where the user should navigate to enter the user code.",
49
+ format: "uri",
50
+ }),
51
+ verification_uri_complete: Schema.String.annotate({
52
+ description: "URI with the user code pre-filled, suitable for QR codes or direct links.",
53
+ format: "uri",
54
+ }),
55
+ expires_in: Schema.Number.annotate({
56
+ description: "Lifetime of the device code in seconds.",
57
+ }).check(Schema.isInt()),
58
+ interval: Schema.Number.annotate({ description: "Minimum polling interval in seconds." }).check(Schema.isInt()),
59
+ }).annotate({
60
+ title: "Device Code Response",
61
+ description: "Response from the OAuth device authorization endpoint (RFC 8628).",
62
+ });
63
+ export const PublishDetails = Schema.Struct({
64
+ retryable: Schema.Boolean.annotate({ description: "Whether the client may retry the request." }),
65
+ retryAfterSeconds: Schema.optionalKey(Schema.Number.annotate({ description: "Suggested delay in seconds before retrying." }).check(Schema.isFinite())),
66
+ requiredScope: Schema.optionalKey(Schema.String.annotate({
67
+ description: "The scope required to perform the operation, if applicable.",
68
+ })),
69
+ tokenScopes: Schema.optionalKey(Schema.Array(Schema.String).annotate({
70
+ description: "The scopes present on the token used for the request.",
50
71
  })),
72
+ requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null]).annotate({
73
+ description: "The collaborator role required, if applicable.",
74
+ })),
75
+ }).annotate({
76
+ title: "Publish Details",
77
+ description: "Extended error details for publish-related and retryable error responses.",
78
+ });
79
+ export const SessionTokenResponse = Schema.Struct({
80
+ access_token: Schema.String.annotate({ description: "OAuth 2.0 access token." }),
81
+ refresh_token: Schema.String.annotate({
82
+ description: "OAuth 2.0 refresh token for obtaining new token pairs.",
83
+ }),
84
+ token_type: Schema.Literal("Bearer"),
85
+ expires_in: Schema.Number.annotate({
86
+ description: "Access token lifetime remaining in seconds.",
87
+ }).check(Schema.isInt()),
88
+ expires_at: Schema.String.annotate({
89
+ description: "ISO 8601 timestamp when the access token expires.",
90
+ format: "date-time",
91
+ }),
92
+ scope: Schema.optionalKey(Schema.Union([
93
+ Schema.String.annotate({ description: "Space-delimited list of granted scopes." }),
94
+ Schema.Null,
95
+ ])),
96
+ }).annotate({
97
+ title: "Session Token Response",
98
+ description: "OAuth 2.0 token response containing an access/refresh token pair.",
51
99
  });
52
100
  export const DeviceTokenOAuthError = Schema.Struct({
53
101
  kind: Schema.Literal("DeviceTokenOAuthError"),
@@ -57,8 +105,34 @@ export const DeviceTokenOAuthError = Schema.Struct({
57
105
  "slow_down",
58
106
  "expired_token",
59
107
  "access_denied",
60
- ]),
61
- error_description: Schema.String,
108
+ ]).annotate({
109
+ title: "OAuth Device Error Code",
110
+ description: "RFC 8628 error code indicating the polling state.",
111
+ }),
112
+ error_description: Schema.String.annotate({
113
+ description: "Human-readable explanation of the error.",
114
+ }),
115
+ });
116
+ export const RefreshSessionTokenResponse = Schema.Struct({
117
+ access_token: Schema.String.annotate({ description: "OAuth 2.0 access token." }),
118
+ refresh_token: Schema.String.annotate({
119
+ description: "OAuth 2.0 refresh token for obtaining new token pairs.",
120
+ }),
121
+ token_type: Schema.Literal("Bearer"),
122
+ expires_in: Schema.Number.annotate({
123
+ description: "Access token lifetime remaining in seconds.",
124
+ }).check(Schema.isInt()),
125
+ expires_at: Schema.String.annotate({
126
+ description: "ISO 8601 timestamp when the access token expires.",
127
+ format: "date-time",
128
+ }),
129
+ scope: Schema.optionalKey(Schema.Union([
130
+ Schema.String.annotate({ description: "Space-delimited list of granted scopes." }),
131
+ Schema.Null,
132
+ ])),
133
+ }).annotate({
134
+ title: "Session Token Response",
135
+ description: "OAuth 2.0 token response containing an access/refresh token pair.",
62
136
  });
63
137
  export const RefreshTokenError = Schema.Struct({
64
138
  kind: Schema.Literal("RefreshTokenError"),
@@ -66,68 +140,199 @@ export const RefreshTokenError = Schema.Struct({
66
140
  title: Schema.String,
67
141
  status: Schema.Number.check(Schema.isInt()),
68
142
  detail: Schema.String,
69
- code: Schema.String,
70
143
  instance: Schema.optionalKey(Schema.String),
144
+ code: Schema.String,
71
145
  details: Schema.optionalKey(Schema.Unknown),
72
146
  });
73
147
  export const UserId = Schema.String.check(Schema.isPattern(new RegExp("^user_[0-7][0-9a-hjkmnp-tv-z]{25}$"), {
74
148
  title: "User ID",
75
- description: "Identifies a registered user account. Assigned at sign-up and referenced by tokens, memberships, and audit trails.",
149
+ description: "Unique user identifier.",
76
150
  examples: ["user_01h455vb4pexka56gq5w2r7cpc"],
77
151
  }));
78
152
  export const TokenId = Schema.String.check(Schema.isPattern(new RegExp("^tok_[0-7][0-9a-hjkmnp-tv-z]{25}$"), {
79
153
  title: "Token ID",
80
- description: "Identifies an access token or personal access token (PAT) issued to a user. Used to authenticate API requests to the registry.",
154
+ description: "Unique identifier of the token used for this request.",
81
155
  examples: ["tok_01h455vb4pexka56gq5w2r7cpc"],
82
156
  }));
157
+ export const ResourceRestrictions = Schema.Struct({
158
+ extensions: Schema.Union([Schema.Array(Schema.String), Schema.Null]).annotate({
159
+ description: "Extension patterns this token is limited to, or null if unrestricted.",
160
+ }),
161
+ }).annotate({
162
+ title: "Resource Restrictions",
163
+ description: "What this token is allowed to access.",
164
+ });
83
165
  export const UnauthorizedError = Schema.Struct({
84
166
  kind: Schema.Literal("UnauthorizedError"),
85
167
  type: Schema.String,
86
168
  title: Schema.String,
87
169
  status: Schema.Number.check(Schema.isInt()),
88
170
  detail: Schema.String,
89
- code: Schema.String,
90
171
  instance: Schema.optionalKey(Schema.String),
172
+ code: Schema.String,
91
173
  });
92
- export const NotImplementedError = Schema.Struct({
93
- kind: Schema.Literal("NotImplementedError"),
174
+ export const TokenId1 = Schema.String.check(Schema.isPattern(new RegExp("^tok_[0-7][0-9a-hjkmnp-tv-z]{25}$"), {
175
+ title: "Token ID",
176
+ description: "Unique token identifier.",
177
+ examples: ["tok_01h455vb4pexka56gq5w2r7cpc"],
178
+ }));
179
+ export const IsoDateTimeString = Schema.String.check(Schema.isMinLength(1));
180
+ export const ScopeCheckDetails = Schema.Struct({
181
+ requiredScope: Schema.String.annotate({
182
+ description: "The scope required to perform the requested operation.",
183
+ }),
184
+ grantedScopes: Schema.Array(Schema.String).annotate({
185
+ description: "The scopes granted to the current credential.",
186
+ }),
187
+ }).annotate({
188
+ title: "Scope Check Details",
189
+ description: "Diagnostic details returned when a request is denied due to insufficient scopes.",
190
+ });
191
+ export const AuthorizationDenyDetails = Schema.Struct({
192
+ requiredScope: Schema.String.annotate({
193
+ description: "The scope required to perform the requested operation.",
194
+ }),
195
+ tokenScopes: Schema.Array(Schema.String).annotate({
196
+ description: "The scopes present on the token used for the request.",
197
+ }),
198
+ requiredRole: Schema.optionalKey(Schema.String.annotate({ description: "The collaborator role required, if applicable." })),
199
+ }).annotate({
200
+ title: "Authorization Deny Details",
201
+ description: "Diagnostic details returned when a request is denied due to insufficient authorization.",
202
+ });
203
+ export const CreateTokenRequest = Schema.Struct({
204
+ name: Schema.String.check(Schema.isMinLength(1, {
205
+ description: "Human-readable name for the token.",
206
+ examples: ["CI publish token"],
207
+ })),
208
+ scopes: Schema.Array(Schema.String).check(Schema.isMinLength(1, {
209
+ description: "Permissions to grant this token (e.g. extensions:read, extensions:write).",
210
+ examples: [["extensions:read", "extensions:write"]],
211
+ })),
212
+ expires_in: Schema.Number.check(Schema.isInt())
213
+ .check(Schema.isFinite())
214
+ .check(Schema.isGreaterThanOrEqualTo(3600))
215
+ .check(Schema.isLessThanOrEqualTo(31536000, {
216
+ description: "How long the token lasts, in seconds (1 hour to 365 days).",
217
+ })),
218
+ }).annotate({
219
+ title: "Create Token Request",
220
+ description: "Request body for creating a new personal access token.",
221
+ });
222
+ export const TokenId2 = Schema.String.check(Schema.isPattern(new RegExp("^tok_[0-7][0-9a-hjkmnp-tv-z]{25}$"), {
223
+ title: "Token ID",
224
+ description: "Identifies an access token or personal access token (PAT) issued to a user. Used to authenticate API requests to the registry.",
225
+ examples: ["tok_01h455vb4pexka56gq5w2r7cpc"],
226
+ }));
227
+ export const Handle = Schema.String.check(Schema.isPattern(new RegExp("^@[a-z0-9_](?:[a-z0-9_-]*[a-z0-9_])?$"), {
228
+ title: "Handle",
229
+ description: "A unique username or organization name starting with @, like @my-org.",
230
+ examples: ["@my-org", "@username"],
231
+ }));
232
+ export const OwnerResponse = Schema.Struct({
233
+ displayName: Schema.String.annotate({ description: "Display name for the owner account." }),
234
+ }).annotate({ title: "Owner Response", description: "Minimal owner summary for machine clients." });
235
+ export const ExtensionName = Schema.String;
236
+ export const ExtensionType = Schema.Literals([
237
+ "skill",
238
+ "command",
239
+ "mcp-server",
240
+ "subagent",
241
+ "file",
242
+ "rule",
243
+ "pack",
244
+ ]).annotate({
245
+ title: "Extension Type",
246
+ description: "What kind of extension this is: skill, command, mcp-server, subagent, file, rule, or pack.",
247
+ });
248
+ export const ExactSemverVersion = Schema.String;
249
+ export const Author = Schema.Struct({
250
+ name: Schema.optionalKey(Schema.Union([
251
+ Schema.String.annotate({ description: "Display name of the extension author." }),
252
+ Schema.Null,
253
+ ])),
254
+ email: Schema.optionalKey(Schema.Union([
255
+ Schema.String.annotate({
256
+ description: "Contact email of the extension author.",
257
+ format: "email",
258
+ }),
259
+ Schema.Null,
260
+ ])),
261
+ url: Schema.optionalKey(Schema.Union([
262
+ Schema.String.annotate({
263
+ description: "URL for the extension author (homepage or profile).",
264
+ format: "uri",
265
+ }),
266
+ Schema.Null,
267
+ ])),
268
+ }).annotate({ title: "Author", description: "Author details: name, email, and homepage URL." });
269
+ export const VersionConstraint = Schema.String;
270
+ export const PatchVisibilityBody = Schema.Struct({
271
+ visibility: Schema.Literals(["public", "unlisted", "private"]).annotate({
272
+ title: "Visibility",
273
+ description: "Target visibility level for the extension.",
274
+ }),
275
+ }).annotate({
276
+ title: "Patch Visibility Body",
277
+ description: "Request body for updating an extension's visibility.",
278
+ });
279
+ export const ExtensionId = Schema.String.check(Schema.isPattern(new RegExp("^ext_[0-7][0-9a-hjkmnp-tv-z]{25}$"), {
280
+ title: "Extension ID",
281
+ description: "Identifies a registered extension in the registry. An extension groups all published versions under a single handle, type, and name.",
282
+ examples: ["ext_01h455vb4pexka56gq5w2r7cpc"],
283
+ }));
284
+ export const DeprecateBody = Schema.Struct({
285
+ notice: Schema.optionalKey(Schema.Union([
286
+ Schema.String.annotate({
287
+ description: "Message shown to users explaining why this extension is deprecated.",
288
+ examples: ["Use @example/skills/new-skill instead."],
289
+ }),
290
+ Schema.Null,
291
+ ])),
292
+ }).annotate({ title: "Deprecate Body", description: "Request body for deprecating an extension." });
293
+ export const UserId1 = Schema.String.check(Schema.isPattern(new RegExp("^user_[0-7][0-9a-hjkmnp-tv-z]{25}$"), {
294
+ title: "User ID",
295
+ description: "Identifies a registered user account. Assigned at sign-up and referenced by tokens, memberships, and audit trails.",
296
+ examples: ["user_01h455vb4pexka56gq5w2r7cpc"],
297
+ }));
298
+ export const PutCollaboratorBody = Schema.Struct({
299
+ role: Schema.Literals(["admin", "write", "read"]).annotate({
300
+ title: "Collaborator Role",
301
+ description: "The role to assign to the collaborator.",
302
+ }),
303
+ }).annotate({
304
+ title: "Put Collaborator Body",
305
+ description: "Request body for assigning a collaborator role on an extension.",
306
+ });
307
+ export const InternalError = Schema.Struct({
308
+ kind: Schema.Literal("InternalError"),
94
309
  type: Schema.String,
95
310
  title: Schema.String,
96
311
  status: Schema.Number.check(Schema.isInt()),
97
312
  detail: Schema.String,
98
- code: Schema.String,
99
313
  instance: Schema.optionalKey(Schema.String),
100
- details: Schema.optionalKey(Schema.Struct({
101
- retryable: Schema.Boolean,
102
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
103
- requiredScope: Schema.optionalKey(Schema.String),
104
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
105
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
106
- })),
314
+ code: Schema.String,
315
+ details: Schema.optionalKey(PublishDetails),
107
316
  });
108
- export const ForbiddenError = Schema.Struct({
109
- kind: Schema.Literal("ForbiddenError"),
317
+ export const InvalidRequestError = Schema.Struct({
318
+ kind: Schema.Literal("InvalidRequestError"),
110
319
  type: Schema.String,
111
320
  title: Schema.String,
112
321
  status: Schema.Number.check(Schema.isInt()),
113
322
  detail: Schema.String,
323
+ instance: Schema.optionalKey(Schema.String),
114
324
  code: Schema.String,
325
+ details: Schema.optionalKey(PublishDetails),
326
+ });
327
+ export const NotImplementedError = Schema.Struct({
328
+ kind: Schema.Literal("NotImplementedError"),
329
+ type: Schema.String,
330
+ title: Schema.String,
331
+ status: Schema.Number.check(Schema.isInt()),
332
+ detail: Schema.String,
115
333
  instance: Schema.optionalKey(Schema.String),
116
- details: Schema.optionalKey(Schema.Union([
117
- Schema.Struct({ requiredScope: Schema.String, grantedScopes: Schema.Array(Schema.String) }),
118
- Schema.Struct({
119
- requiredScope: Schema.String,
120
- tokenScopes: Schema.Array(Schema.String),
121
- requiredRole: Schema.optionalKey(Schema.String),
122
- }),
123
- Schema.Struct({
124
- retryable: Schema.Boolean,
125
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
126
- requiredScope: Schema.optionalKey(Schema.String),
127
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
128
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
129
- }),
130
- ])),
334
+ code: Schema.String,
335
+ details: Schema.optionalKey(PublishDetails),
131
336
  });
132
337
  export const UnprocessableEntityError = Schema.Struct({
133
338
  kind: Schema.Literal("UnprocessableEntityError"),
@@ -135,15 +340,9 @@ export const UnprocessableEntityError = Schema.Struct({
135
340
  title: Schema.String,
136
341
  status: Schema.Number.check(Schema.isInt()),
137
342
  detail: Schema.String,
138
- code: Schema.String,
139
343
  instance: Schema.optionalKey(Schema.String),
140
- details: Schema.optionalKey(Schema.Struct({
141
- retryable: Schema.Boolean,
142
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
143
- requiredScope: Schema.optionalKey(Schema.String),
144
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
145
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
146
- })),
344
+ code: Schema.String,
345
+ details: Schema.optionalKey(PublishDetails),
147
346
  });
148
347
  export const NotFoundError = Schema.Struct({
149
348
  kind: Schema.Literal("NotFoundError"),
@@ -151,36 +350,19 @@ export const NotFoundError = Schema.Struct({
151
350
  title: Schema.String,
152
351
  status: Schema.Number.check(Schema.isInt()),
153
352
  detail: Schema.String,
154
- code: Schema.String,
155
353
  instance: Schema.optionalKey(Schema.String),
156
- details: Schema.optionalKey(Schema.Struct({
157
- retryable: Schema.Boolean,
158
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
159
- requiredScope: Schema.optionalKey(Schema.String),
160
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
161
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
162
- })),
354
+ code: Schema.String,
355
+ details: Schema.optionalKey(PublishDetails),
163
356
  });
164
- export const ExtensionId = Schema.String.check(Schema.isPattern(new RegExp("^ext_[0-7][0-9a-hjkmnp-tv-z]{25}$"), {
165
- title: "Extension ID",
166
- description: "Identifies a registered extension in the registry. An extension groups all published versions under a single handle, type, and name.",
167
- examples: ["ext_01h455vb4pexka56gq5w2r7cpc"],
168
- }));
169
357
  export const ConflictError = Schema.Struct({
170
358
  kind: Schema.Literal("ConflictError"),
171
359
  type: Schema.String,
172
360
  title: Schema.String,
173
361
  status: Schema.Number.check(Schema.isInt()),
174
362
  detail: Schema.String,
175
- code: Schema.String,
176
363
  instance: Schema.optionalKey(Schema.String),
177
- details: Schema.optionalKey(Schema.Struct({
178
- retryable: Schema.Boolean,
179
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
180
- requiredScope: Schema.optionalKey(Schema.String),
181
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
182
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
183
- })),
364
+ code: Schema.String,
365
+ details: Schema.optionalKey(PublishDetails),
184
366
  });
185
367
  export const PayloadTooLargeError = Schema.Struct({
186
368
  kind: Schema.Literal("PayloadTooLargeError"),
@@ -188,15 +370,9 @@ export const PayloadTooLargeError = Schema.Struct({
188
370
  title: Schema.String,
189
371
  status: Schema.Number.check(Schema.isInt()),
190
372
  detail: Schema.String,
191
- code: Schema.String,
192
373
  instance: Schema.optionalKey(Schema.String),
193
- details: Schema.optionalKey(Schema.Struct({
194
- retryable: Schema.Boolean,
195
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
196
- requiredScope: Schema.optionalKey(Schema.String),
197
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
198
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
199
- })),
374
+ code: Schema.String,
375
+ details: Schema.optionalKey(PublishDetails),
200
376
  });
201
377
  export const UnsupportedMediaTypeError = Schema.Struct({
202
378
  kind: Schema.Literal("UnsupportedMediaTypeError"),
@@ -204,15 +380,9 @@ export const UnsupportedMediaTypeError = Schema.Struct({
204
380
  title: Schema.String,
205
381
  status: Schema.Number.check(Schema.isInt()),
206
382
  detail: Schema.String,
207
- code: Schema.String,
208
383
  instance: Schema.optionalKey(Schema.String),
209
- details: Schema.optionalKey(Schema.Struct({
210
- retryable: Schema.Boolean,
211
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
212
- requiredScope: Schema.optionalKey(Schema.String),
213
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
214
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
215
- })),
384
+ code: Schema.String,
385
+ details: Schema.optionalKey(PublishDetails),
216
386
  });
217
387
  export const TooManyRequestsError = Schema.Struct({
218
388
  kind: Schema.Literal("TooManyRequestsError"),
@@ -220,15 +390,9 @@ export const TooManyRequestsError = Schema.Struct({
220
390
  title: Schema.String,
221
391
  status: Schema.Number.check(Schema.isInt()),
222
392
  detail: Schema.String,
223
- code: Schema.String,
224
393
  instance: Schema.optionalKey(Schema.String),
225
- details: Schema.optionalKey(Schema.Struct({
226
- retryable: Schema.Boolean,
227
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
228
- requiredScope: Schema.optionalKey(Schema.String),
229
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
230
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
231
- })),
394
+ code: Schema.String,
395
+ details: Schema.optionalKey(PublishDetails),
232
396
  });
233
397
  export const ServiceUnavailableError = Schema.Struct({
234
398
  kind: Schema.Literal("ServiceUnavailableError"),
@@ -236,185 +400,202 @@ export const ServiceUnavailableError = Schema.Struct({
236
400
  title: Schema.String,
237
401
  status: Schema.Number.check(Schema.isInt()),
238
402
  detail: Schema.String,
403
+ instance: Schema.optionalKey(Schema.String),
239
404
  code: Schema.String,
405
+ details: Schema.optionalKey(PublishDetails),
406
+ });
407
+ export const AuthMeUser = Schema.Struct({
408
+ id: UserId,
409
+ handle: Schema.String.annotate({
410
+ description: "The user's registry handle.",
411
+ examples: ["@example"],
412
+ }),
413
+ email: Schema.Union([
414
+ Schema.String.annotate({
415
+ description: "The user's email address, if available.",
416
+ format: "email",
417
+ }),
418
+ Schema.Null,
419
+ ]),
420
+ }).annotate({ title: "Authenticated User", description: "Your profile information." });
421
+ export const AuthMeToken = Schema.Struct({
422
+ id: TokenId,
423
+ type: Schema.Literals(["session", "pat", "oidc"]).annotate({
424
+ title: "Token Type",
425
+ description: "The type of authentication token.",
426
+ }),
427
+ name: Schema.Union([
428
+ Schema.String.annotate({ description: "Human-readable name of the token, if assigned." }),
429
+ Schema.Null,
430
+ ]),
431
+ scopes: Schema.Array(Schema.String).annotate({ description: "Scopes granted to this token." }),
432
+ resource_restrictions: ResourceRestrictions,
433
+ expires_at: Schema.String.annotate({
434
+ description: "When this token expires.",
435
+ format: "date-time",
436
+ }),
437
+ }).annotate({
438
+ title: "Token Info",
439
+ description: "Details about the token you used to authenticate.",
440
+ });
441
+ export const TokenListItem = Schema.Struct({
442
+ id: TokenId1,
443
+ name: Schema.Union([
444
+ Schema.String.annotate({ description: "Human-readable name of the token, if assigned." }),
445
+ Schema.Null,
446
+ ]),
447
+ type: Schema.String.annotate({ description: "Token type (e.g. 'pat', 'session')." }),
448
+ scopes: Schema.Array(Schema.String).annotate({ description: "Scopes granted to this token." }),
449
+ created_at: IsoDateTimeString,
450
+ expires_at: IsoDateTimeString,
451
+ last_used_at: Schema.Union([IsoDateTimeString, Schema.Null]),
452
+ }).annotate({ title: "Token List Item", description: "Summary of an access token." });
453
+ export const ForbiddenError = Schema.Struct({
454
+ kind: Schema.Literal("ForbiddenError"),
455
+ type: Schema.String,
456
+ title: Schema.String,
457
+ status: Schema.Number.check(Schema.isInt()),
458
+ detail: Schema.String,
240
459
  instance: Schema.optionalKey(Schema.String),
241
- details: Schema.optionalKey(Schema.Struct({
242
- retryable: Schema.Boolean,
243
- retryAfterSeconds: Schema.optionalKey(Schema.Number.check(Schema.isFinite())),
244
- requiredScope: Schema.optionalKey(Schema.String),
245
- tokenScopes: Schema.optionalKey(Schema.Array(Schema.String)),
246
- requiredRole: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
247
- })),
460
+ code: Schema.String,
461
+ details: Schema.optionalKey(Schema.Union([ScopeCheckDetails, AuthorizationDenyDetails, PublishDetails])),
248
462
  });
249
- export const MetaGet200 = Schema.Struct({
250
- ok: Schema.Literal(true),
251
- service: Schema.Literal("registry"),
252
- message: Schema.String,
253
- docs: Schema.Union([Schema.String, Schema.Null]),
254
- openapi: Schema.Union([Schema.String, Schema.Null]),
463
+ export const CreateTokenResponse = Schema.Struct({
464
+ id: TokenId2,
465
+ token: Schema.String.annotate({
466
+ description: "The token value — save this, it won't be shown again.",
467
+ readOnly: true,
468
+ }),
469
+ name: Schema.String,
470
+ scopes: Schema.Array(Schema.String),
471
+ created_at: IsoDateTimeString,
472
+ expires_at: IsoDateTimeString,
473
+ }).annotate({
474
+ title: "Create Token Response",
475
+ description: "Your new access token. The token value is only shown once — save it now.",
255
476
  });
256
- export const MetaGet400 = DecodeErrorResponse;
257
- export const AuthIssueDeviceCodeRequestFormUrlEncoded = Schema.Struct({
258
- client_id: Schema.Literal("axm-cli"),
259
- scope: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
477
+ export const SearchHit = Schema.Struct({
478
+ name: ExtensionName,
479
+ owner: Handle,
480
+ type: ExtensionType,
481
+ latestVersion: ExactSemverVersion,
482
+ description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
483
+ repository: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
484
+ license: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
485
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
486
+ deprecated_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
487
+ deprecation_notice: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true }), Schema.Null])),
488
+ }).annotate({ title: "Search Hit", description: "A single extension matched by a search query." });
489
+ export const AuthMeResponse = Schema.Struct({
490
+ user: AuthMeUser,
491
+ orgs: Schema.Array(Schema.Never).annotate({
492
+ description: "Organizations the user belongs to (reserved, currently empty).",
493
+ }),
494
+ token: AuthMeToken,
495
+ }).annotate({
496
+ title: "Auth Me Response",
497
+ description: "Your user profile, organizations, and token details.",
260
498
  });
261
- export const AuthIssueDeviceCode200 = Schema.Struct({
262
- device_code: Schema.String.annotate({
263
- description: "Device verification code for the polling client.",
499
+ export const TokenListResponse = Schema.Struct({
500
+ tokens: Schema.Array(TokenListItem).annotate({
501
+ description: "List of access tokens for the authenticated user.",
264
502
  }),
265
- user_code: Schema.String.annotate({ description: "Short code the user enters in the browser." }),
266
- verification_uri: Schema.String.annotate({
267
- description: "URI where the user should navigate to enter the user code.",
268
- format: "uri",
503
+ has_more: Schema.Boolean.annotate({
504
+ description: "Whether additional tokens exist beyond this page.",
269
505
  }),
270
- verification_uri_complete: Schema.String.annotate({
271
- description: "URI with the user code pre-filled, suitable for QR codes or direct links.",
272
- format: "uri",
506
+ cursor: Schema.Union([
507
+ Schema.String.annotate({ description: "Opaque cursor for fetching the next page of results." }),
508
+ Schema.Null,
509
+ ]),
510
+ }).annotate({ title: "Token List Response", description: "A page of your access tokens." });
511
+ export const SearchResponse = Schema.Struct({
512
+ extensions: Schema.Array(SearchHit).annotate({
513
+ description: "Extensions matching the query, ordered by recency.",
273
514
  }),
274
- expires_in: Schema.Number.annotate({
275
- description: "Lifetime of the device code in seconds.",
276
- }).check(Schema.isInt()),
277
- interval: Schema.Number.annotate({ description: "Minimum polling interval in seconds." }).check(Schema.isInt()),
515
+ has_more: Schema.Boolean.annotate({
516
+ description: "Whether additional results exist beyond this page.",
517
+ }),
518
+ cursor: Schema.Union([
519
+ Schema.String.annotate({ description: "Opaque cursor for fetching the next page of results." }),
520
+ Schema.Null,
521
+ ]),
278
522
  }).annotate({
279
- title: "Device Code Response",
280
- description: "Response from the OAuth device authorization endpoint (RFC 8628).",
523
+ title: "Search Response",
524
+ description: "A page of extensions matching the search query.",
281
525
  });
526
+ export const MetaGet200 = MetaResponse;
527
+ export const MetaGet400 = DecodeErrorResponse;
528
+ export const AuthIssueDeviceCodeRequestFormUrlEncoded = Schema.Struct({
529
+ client_id: Schema.Literal("axm-cli").annotate({
530
+ description: "OAuth client identifier. Must be 'axm-cli'.",
531
+ }),
532
+ scope: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
533
+ });
534
+ export const AuthIssueDeviceCode200 = DeviceCodeResponse;
282
535
  export const AuthIssueDeviceCode400 = DecodeErrorResponse;
283
536
  export const AuthIssueDeviceCode500 = InternalError;
284
537
  export const AuthExchangeDeviceCodeRequestFormUrlEncoded = Schema.Struct({
285
- grant_type: Schema.String,
286
- device_code: Schema.String,
287
- client_id: Schema.String,
288
- });
289
- export const AuthExchangeDeviceCode200 = Schema.Struct({
290
- access_token: Schema.String.annotate({ description: "OAuth 2.0 access token." }),
291
- refresh_token: Schema.String.annotate({
292
- description: "OAuth 2.0 refresh token for obtaining new token pairs.",
538
+ grant_type: Schema.String.annotate({
539
+ description: "OAuth grant type. Must be 'urn:ietf:params:oauth:grant-type:device_code'.",
540
+ examples: ["urn:ietf:params:oauth:grant-type:device_code"],
293
541
  }),
294
- token_type: Schema.Literal("Bearer"),
295
- expires_in: Schema.Number.annotate({
296
- description: "Access token lifetime remaining in seconds.",
297
- }).check(Schema.isInt()),
298
- expires_at: Schema.String.annotate({
299
- description: "ISO 8601 timestamp when the access token expires.",
300
- format: "date-time",
542
+ device_code: Schema.String.annotate({
543
+ description: "The device verification code received from the /device/code endpoint.",
544
+ }),
545
+ client_id: Schema.String.annotate({
546
+ description: "OAuth client identifier, e.g. 'axm-cli'.",
547
+ examples: ["axm-cli"],
301
548
  }),
302
- scope: Schema.optionalKey(Schema.Union([
303
- Schema.String.annotate({ description: "Space-delimited list of granted scopes." }),
304
- Schema.Null,
305
- ])),
306
- }).annotate({
307
- title: "Session Token Response",
308
- description: "OAuth 2.0 token response containing an access/refresh token pair.",
309
549
  });
550
+ export const AuthExchangeDeviceCode200 = SessionTokenResponse;
310
551
  export const AuthExchangeDeviceCode400 = Schema.Union([
311
552
  Schema.Union([InvalidRequestError, DecodeErrorResponse]),
312
553
  DeviceTokenOAuthError,
313
554
  ]);
314
555
  export const AuthRefreshTokenRequestFormUrlEncoded = Schema.Struct({
315
- grant_type: Schema.Literal("refresh_token"),
316
- refresh_token: Schema.String.check(Schema.isMinLength(1)),
317
- client_id: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
318
- });
319
- export const AuthRefreshToken200 = Schema.Struct({
320
- access_token: Schema.String.annotate({ description: "OAuth 2.0 access token." }),
321
- refresh_token: Schema.String.annotate({
322
- description: "OAuth 2.0 refresh token for obtaining new token pairs.",
556
+ grant_type: Schema.Literal("refresh_token").annotate({
557
+ description: "OAuth grant type. Must be 'refresh_token'.",
323
558
  }),
324
- token_type: Schema.Literal("Bearer"),
325
- expires_in: Schema.Number.annotate({
326
- description: "Access token lifetime remaining in seconds.",
327
- }).check(Schema.isInt()),
328
- expires_at: Schema.String.annotate({
329
- description: "ISO 8601 timestamp when the access token expires.",
330
- format: "date-time",
331
- }),
332
- scope: Schema.optionalKey(Schema.Union([
333
- Schema.String.annotate({ description: "Space-delimited list of granted scopes." }),
559
+ refresh_token: Schema.String.check(Schema.isMinLength(1, { description: "The refresh token to exchange for a new token pair." })),
560
+ client_id: Schema.optionalKey(Schema.Union([
561
+ Schema.String.annotate({ description: "OAuth client identifier." }),
334
562
  Schema.Null,
335
563
  ])),
336
- }).annotate({
337
- title: "Session Token Response",
338
- description: "OAuth 2.0 token response containing an access/refresh token pair.",
339
564
  });
565
+ export const AuthRefreshToken200 = RefreshSessionTokenResponse;
340
566
  export const AuthRefreshToken400 = DecodeErrorResponse;
341
567
  export const AuthRefreshToken401 = RefreshTokenError;
342
568
  export const AuthRevokeTokenRequestFormUrlEncoded = Schema.Struct({
343
- token: Schema.String.check(Schema.isMinLength(1)),
569
+ token: Schema.String.check(Schema.isMinLength(1, {
570
+ description: "The access token or refresh token to revoke. Revocation is idempotent.",
571
+ })),
344
572
  });
345
573
  export const AuthRevokeToken400 = DecodeErrorResponse;
346
- export const AuthGetMe200 = Schema.Struct({
347
- user: Schema.Struct({
348
- id: UserId,
349
- handle: Schema.String,
350
- email: Schema.Union([Schema.String, Schema.Null]),
351
- }),
352
- orgs: Schema.Array(Schema.Never),
353
- token: Schema.Struct({
354
- id: TokenId,
355
- type: Schema.Literals(["session", "pat", "oidc"]),
356
- name: Schema.Union([Schema.String, Schema.Null]),
357
- scopes: Schema.Array(Schema.String),
358
- resource_restrictions: Schema.Struct({
359
- extensions: Schema.Union([Schema.Array(Schema.String), Schema.Null]),
360
- }),
361
- expires_at: Schema.String.annotate({ format: "date-time" }),
362
- }),
363
- });
574
+ export const AuthGetMe200 = AuthMeResponse;
364
575
  export const AuthGetMe400 = DecodeErrorResponse;
365
576
  export const AuthGetMe401 = UnauthorizedError;
366
577
  export const AuthExchangeOidcToken400 = DecodeErrorResponse;
367
578
  export const AuthExchangeOidcToken501 = NotImplementedError;
368
579
  export const TokensListParams = Schema.Struct({
369
- cursor: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
370
- limit: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
371
- });
372
- export const TokensList200 = Schema.Struct({
373
- tokens: Schema.Array(Schema.Struct({
374
- id: TokenId,
375
- name: Schema.Union([Schema.String, Schema.Null]),
376
- type: Schema.String,
377
- scopes: Schema.Array(Schema.String),
378
- created_at: Schema.String.annotate({ readOnly: true, format: "date-time" }),
379
- expires_at: Schema.String.annotate({ readOnly: true, format: "date-time" }),
380
- last_used_at: Schema.Union([
381
- Schema.String.annotate({ readOnly: true, format: "date-time" }),
382
- Schema.Null,
383
- ]),
384
- })),
385
- has_more: Schema.Boolean,
386
- cursor: Schema.Union([Schema.String, Schema.Null]),
580
+ cursor: Schema.optionalKey(Schema.Union([
581
+ Schema.String.annotate({
582
+ description: "Opaque cursor from a previous response for pagination.",
583
+ }),
584
+ Schema.Null,
585
+ ])),
586
+ limit: Schema.optionalKey(Schema.Union([
587
+ Schema.String.annotate({
588
+ description: "Maximum number of tokens to return (1–100, default 50).",
589
+ }),
590
+ Schema.Null,
591
+ ])),
387
592
  });
593
+ export const TokensList200 = TokenListResponse;
388
594
  export const TokensList400 = DecodeErrorResponse;
389
595
  export const TokensList401 = UnauthorizedError;
390
596
  export const TokensList403 = ForbiddenError;
391
- export const TokensCreateRequestJson = Schema.Struct({
392
- name: Schema.String.check(Schema.isMinLength(1, { description: "Human-readable name for the token." })),
393
- scopes: Schema.Array(Schema.String).check(Schema.isMinLength(1)),
394
- expires_in: Schema.Number.check(Schema.isInt())
395
- .check(Schema.isFinite())
396
- .check(Schema.isGreaterThanOrEqualTo(3600))
397
- .check(Schema.isLessThanOrEqualTo(31536000, {
398
- description: "Token lifetime in seconds (3600–31536000).",
399
- })),
400
- }).annotate({
401
- title: "Create Token Request",
402
- description: "Request body for creating a new personal access token.",
403
- });
404
- export const TokensCreate201 = Schema.Struct({
405
- id: TokenId,
406
- token: Schema.String.annotate({
407
- description: "The full token value. Only returned once at creation time.",
408
- readOnly: true,
409
- }),
410
- name: Schema.String,
411
- scopes: Schema.Array(Schema.String),
412
- created_at: Schema.String.annotate({ readOnly: true, format: "date-time" }),
413
- expires_at: Schema.String.annotate({ readOnly: true, format: "date-time" }),
414
- }).annotate({
415
- title: "Create Token Response",
416
- description: "Newly created personal access token with the plaintext token value.",
417
- });
597
+ export const TokensCreateRequestJson = CreateTokenRequest;
598
+ export const TokensCreate201 = CreateTokenResponse;
418
599
  export const TokensCreate400 = DecodeErrorResponse;
419
600
  export const TokensCreate401 = UnauthorizedError;
420
601
  export const TokensCreate403 = ForbiddenError;
@@ -422,100 +603,72 @@ export const TokensCreate422 = UnprocessableEntityError;
422
603
  export const TokensDelete400 = DecodeErrorResponse;
423
604
  export const TokensDelete401 = UnauthorizedError;
424
605
  export const TokensDelete403 = ForbiddenError;
606
+ export const OwnersGetOwner200 = OwnerResponse;
607
+ export const OwnersGetOwner400 = DecodeErrorResponse;
608
+ export const OwnersGetOwner404 = NotFoundError;
425
609
  export const ExtensionsListByOwner200 = Schema.Struct({
426
610
  extensions: Schema.Array(Schema.Struct({
427
- name: Schema.String,
428
- owner: Schema.String,
429
- type: Schema.Literals(["skill", "command", "mcp-server", "subagent", "file", "rule", "pack"]),
430
- latestVersion: Schema.String,
611
+ name: ExtensionName,
612
+ owner: Handle,
613
+ type: ExtensionType,
614
+ latestVersion: ExactSemverVersion,
431
615
  description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
432
616
  repository: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
433
617
  license: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
434
- authors: Schema.optionalKey(Schema.Union([
435
- Schema.Array(Schema.Struct({
436
- name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
437
- email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
438
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
439
- })),
440
- Schema.Null,
441
- ])),
618
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
442
619
  visibility: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true }), Schema.Null])),
443
- deprecated_at: Schema.optionalKey(Schema.Union([
444
- Schema.String.annotate({ readOnly: true, format: "date-time" }),
445
- Schema.Null,
446
- ])),
620
+ deprecated_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
447
621
  deprecation_notice: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true }), Schema.Null])),
448
622
  })),
449
623
  });
450
624
  export const ExtensionsListByOwner400 = DecodeErrorResponse;
451
625
  export const ExtensionsListByType200 = Schema.Struct({
452
626
  extensions: Schema.Array(Schema.Struct({
453
- name: Schema.String,
454
- owner: Schema.String,
455
- type: Schema.Literals(["skill", "command", "mcp-server", "subagent", "file", "rule", "pack"]),
456
- latestVersion: Schema.String,
627
+ name: ExtensionName,
628
+ owner: Handle,
629
+ type: ExtensionType,
630
+ latestVersion: ExactSemverVersion,
457
631
  description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
458
632
  repository: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
459
633
  license: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
460
- authors: Schema.optionalKey(Schema.Union([
461
- Schema.Array(Schema.Struct({
462
- name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
463
- email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
464
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
465
- })),
466
- Schema.Null,
467
- ])),
634
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
468
635
  visibility: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true }), Schema.Null])),
469
- deprecated_at: Schema.optionalKey(Schema.Union([
470
- Schema.String.annotate({ readOnly: true, format: "date-time" }),
471
- Schema.Null,
472
- ])),
636
+ deprecated_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
473
637
  deprecation_notice: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true }), Schema.Null])),
474
638
  })),
475
639
  });
476
640
  export const ExtensionsListByType400 = DecodeErrorResponse;
477
641
  export const ExtensionsGet200 = Schema.Struct({
478
- name: Schema.String,
479
- owner: Schema.String,
480
- type: Schema.Literals(["skill", "command", "mcp-server", "subagent", "file", "rule", "pack"]),
642
+ name: ExtensionName,
643
+ owner: Handle,
644
+ type: ExtensionType,
481
645
  description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
482
646
  repository: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
483
647
  license: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
484
- authors: Schema.optionalKey(Schema.Union([
485
- Schema.Array(Schema.Struct({
486
- name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
487
- email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
488
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
489
- })),
490
- Schema.Null,
491
- ])),
648
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
492
649
  versions: Schema.Array(Schema.Struct({
493
- version: Schema.String,
494
- published: Schema.String.annotate({ readOnly: true, format: "date-time" }),
650
+ version: ExactSemverVersion,
651
+ published: IsoDateTimeString,
495
652
  integrity: Schema.String.annotate({ readOnly: true }),
496
- dependencies: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
497
- yanked_at: Schema.optionalKey(Schema.Union([
498
- Schema.String.annotate({ readOnly: true, format: "date-time" }),
499
- Schema.Null,
500
- ])),
653
+ dependencies: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, VersionConstraint), Schema.Null])),
654
+ compatiblePackages: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
655
+ yanked_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
501
656
  })),
502
657
  visibility: Schema.optionalKey(Schema.Union([
503
658
  Schema.Literals(["public", "unlisted", "private"]).annotate({ readOnly: true }),
504
659
  Schema.Null,
505
660
  ])),
506
- deprecated_at: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true, format: "date-time" }), Schema.Null])),
661
+ deprecated_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
507
662
  deprecation_notice: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true }), Schema.Null])),
508
663
  });
509
664
  export const ExtensionsGet400 = DecodeErrorResponse;
510
665
  export const ExtensionsGet404 = NotFoundError;
511
- export const ExtensionsUpdateVisibilityRequestJson = Schema.Struct({
512
- visibility: Schema.Literals(["public", "unlisted", "private"]),
513
- });
666
+ export const ExtensionsUpdateVisibilityRequestJson = PatchVisibilityBody;
514
667
  export const ExtensionsUpdateVisibility200 = Schema.Struct({
515
668
  id: ExtensionId,
516
- owner: Schema.String,
517
- type: Schema.String,
518
- name: Schema.String,
669
+ owner: Handle,
670
+ type: ExtensionType,
671
+ name: ExtensionName,
519
672
  visibility: Schema.String,
520
673
  updatedAt: Schema.String.annotate({ readOnly: true, format: "date-time" }),
521
674
  });
@@ -527,27 +680,21 @@ export const ExtensionsUpdateVisibility401 = UnauthorizedError;
527
680
  export const ExtensionsUpdateVisibility403 = ForbiddenError;
528
681
  export const ExtensionsUpdateVisibility404 = NotFoundError;
529
682
  export const ExtensionsGetVersion200 = Schema.Struct({
530
- name: Schema.String,
531
- owner: Schema.String,
532
- type: Schema.String,
533
- version: Schema.String,
683
+ name: ExtensionName,
684
+ owner: Handle,
685
+ type: ExtensionType,
686
+ version: ExactSemverVersion,
534
687
  status: Schema.Literals(["pending", "available", "failed"]).annotate({ readOnly: true }),
535
- published: Schema.String.annotate({ readOnly: true, format: "date-time" }),
688
+ published: IsoDateTimeString,
536
689
  integrity: Schema.String.annotate({ readOnly: true }),
537
690
  description: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
538
691
  repository: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
539
692
  license: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
540
- authors: Schema.optionalKey(Schema.Union([
541
- Schema.Array(Schema.Struct({
542
- name: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
543
- email: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
544
- url: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
545
- })),
546
- Schema.Null,
547
- ])),
548
- dependencies: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, Schema.String), Schema.Null])),
549
- yanked_at: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true, format: "date-time" }), Schema.Null])),
550
- deleted_at: Schema.optionalKey(Schema.Union([Schema.String.annotate({ readOnly: true, format: "date-time" }), Schema.Null])),
693
+ authors: Schema.optionalKey(Schema.Union([Schema.Array(Author), Schema.Null])),
694
+ dependencies: Schema.optionalKey(Schema.Union([Schema.Record(Schema.String, VersionConstraint), Schema.Null])),
695
+ compatiblePackages: Schema.optionalKey(Schema.Union([Schema.Array(Schema.String), Schema.Null])),
696
+ yanked_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
697
+ deleted_at: Schema.optionalKey(Schema.Union([IsoDateTimeString, Schema.Null])),
551
698
  });
552
699
  export const ExtensionsGetVersion400 = DecodeErrorResponse;
553
700
  export const ExtensionsGetVersion404 = NotFoundError;
@@ -556,24 +703,24 @@ export const ExtensionsPublishVersionRequestFormData = Schema.Struct({
556
703
  integrity: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
557
704
  });
558
705
  export const ExtensionsPublishVersion200 = Schema.Struct({
559
- owner: Schema.String,
560
- type: Schema.String,
561
- name: Schema.String,
562
- version: Schema.String,
706
+ owner: Handle,
707
+ type: ExtensionType,
708
+ name: ExtensionName,
709
+ version: ExactSemverVersion,
563
710
  integrity: Schema.String.annotate({ readOnly: true }),
564
711
  sha256_hex: Schema.String.annotate({ readOnly: true }),
565
- published_at: Schema.String.annotate({ readOnly: true, format: "date-time" }),
566
- publish_status: Schema.String.annotate({ readOnly: true }),
712
+ published_at: IsoDateTimeString,
713
+ publish_status: Schema.Literals(["pending", "available", "failed"]).annotate({ readOnly: true }),
567
714
  });
568
715
  export const ExtensionsPublishVersion201 = Schema.Struct({
569
- owner: Schema.String,
570
- type: Schema.String,
571
- name: Schema.String,
572
- version: Schema.String,
716
+ owner: Handle,
717
+ type: ExtensionType,
718
+ name: ExtensionName,
719
+ version: ExactSemverVersion,
573
720
  integrity: Schema.String.annotate({ readOnly: true }),
574
721
  sha256_hex: Schema.String.annotate({ readOnly: true }),
575
- published_at: Schema.String.annotate({ readOnly: true, format: "date-time" }),
576
- publish_status: Schema.String.annotate({ readOnly: true }),
722
+ published_at: IsoDateTimeString,
723
+ publish_status: Schema.Literals(["pending", "available", "failed"]).annotate({ readOnly: true }),
577
724
  });
578
725
  export const ExtensionsPublishVersion400 = Schema.Union([InvalidRequestError, DecodeErrorResponse]);
579
726
  export const ExtensionsPublishVersion401 = UnauthorizedError;
@@ -585,7 +732,6 @@ export const ExtensionsPublishVersion415 = UnsupportedMediaTypeError;
585
732
  export const ExtensionsPublishVersion422 = UnprocessableEntityError;
586
733
  export const ExtensionsPublishVersion429 = TooManyRequestsError;
587
734
  export const ExtensionsPublishVersion500 = InternalError;
588
- export const ExtensionsPublishVersion501 = NotImplementedError;
589
735
  export const ExtensionsPublishVersion503 = ServiceUnavailableError;
590
736
  export const ExtensionsDeleteVersion400 = DecodeErrorResponse;
591
737
  export const ExtensionsDeleteVersion401 = UnauthorizedError;
@@ -594,22 +740,11 @@ export const ExtensionsDeleteVersion404 = NotFoundError;
594
740
  export const ExtensionsDownloadArchive400 = DecodeErrorResponse;
595
741
  export const ExtensionsDownloadArchive404 = NotFoundError;
596
742
  export const ExtensionsDownloadArchive500 = InternalError;
597
- export const ExtensionsGetOwnerProfile200 = Schema.Struct({
598
- ok: Schema.Literal(true),
599
- mock: Schema.Literal(true),
600
- method: Schema.Literal("GET"),
601
- route: Schema.Literal("/v1/extensions/{owner}/profile"),
602
- message: Schema.String,
603
- params: Schema.Struct({ owner: Schema.String }),
604
- });
605
- export const ExtensionsGetOwnerProfile400 = DecodeErrorResponse;
606
- export const ExtensionsDeprecateRequestJson = Schema.Struct({
607
- notice: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
608
- });
743
+ export const ExtensionsDeprecateRequestJson = DeprecateBody;
609
744
  export const ExtensionsDeprecate200 = Schema.Struct({
610
- owner: Schema.String,
611
- type: Schema.String,
612
- name: Schema.String,
745
+ owner: Handle,
746
+ type: ExtensionType,
747
+ name: ExtensionName,
613
748
  deprecatedAt: Schema.Union([
614
749
  Schema.String.annotate({ readOnly: true, format: "date-time" }),
615
750
  Schema.Null,
@@ -621,9 +756,9 @@ export const ExtensionsDeprecate401 = UnauthorizedError;
621
756
  export const ExtensionsDeprecate403 = ForbiddenError;
622
757
  export const ExtensionsDeprecate404 = NotFoundError;
623
758
  export const ExtensionsUndeprecate200 = Schema.Struct({
624
- owner: Schema.String,
625
- type: Schema.String,
626
- name: Schema.String,
759
+ owner: Handle,
760
+ type: ExtensionType,
761
+ name: ExtensionName,
627
762
  deprecatedAt: Schema.Null,
628
763
  deprecationNotice: Schema.Null,
629
764
  });
@@ -632,24 +767,21 @@ export const ExtensionsUndeprecate401 = UnauthorizedError;
632
767
  export const ExtensionsUndeprecate403 = ForbiddenError;
633
768
  export const ExtensionsUndeprecate404 = NotFoundError;
634
769
  export const ExtensionsYankVersion200 = Schema.Struct({
635
- owner: Schema.String,
636
- type: Schema.String,
637
- name: Schema.String,
638
- version: Schema.String,
639
- yankedAt: Schema.Union([
640
- Schema.String.annotate({ readOnly: true, format: "date-time" }),
641
- Schema.Null,
642
- ]),
770
+ owner: Handle,
771
+ type: ExtensionType,
772
+ name: ExtensionName,
773
+ version: ExactSemverVersion,
774
+ yankedAt: Schema.Union([IsoDateTimeString, Schema.Null]),
643
775
  });
644
776
  export const ExtensionsYankVersion400 = DecodeErrorResponse;
645
777
  export const ExtensionsYankVersion401 = UnauthorizedError;
646
778
  export const ExtensionsYankVersion403 = ForbiddenError;
647
779
  export const ExtensionsYankVersion404 = NotFoundError;
648
780
  export const ExtensionsUnyankVersion200 = Schema.Struct({
649
- owner: Schema.String,
650
- type: Schema.String,
651
- name: Schema.String,
652
- version: Schema.String,
781
+ owner: Handle,
782
+ type: ExtensionType,
783
+ name: ExtensionName,
784
+ version: ExactSemverVersion,
653
785
  yankedAt: Schema.Null,
654
786
  });
655
787
  export const ExtensionsUnyankVersion400 = DecodeErrorResponse;
@@ -658,9 +790,9 @@ export const ExtensionsUnyankVersion403 = ForbiddenError;
658
790
  export const ExtensionsUnyankVersion404 = NotFoundError;
659
791
  export const CollaboratorsListCollaborators200 = Schema.Struct({
660
792
  collaborators: Schema.Array(Schema.Struct({
661
- userId: UserId,
793
+ userId: UserId1,
662
794
  role: Schema.String,
663
- grantedBy: Schema.Union([UserId, Schema.Null]).annotate({ readOnly: true }),
795
+ grantedBy: Schema.Union([UserId1, Schema.Null]).annotate({ readOnly: true }),
664
796
  createdAt: Schema.String.annotate({ readOnly: true, format: "date-time" }),
665
797
  })),
666
798
  });
@@ -668,13 +800,11 @@ export const CollaboratorsListCollaborators400 = DecodeErrorResponse;
668
800
  export const CollaboratorsListCollaborators401 = UnauthorizedError;
669
801
  export const CollaboratorsListCollaborators403 = ForbiddenError;
670
802
  export const CollaboratorsListCollaborators404 = NotFoundError;
671
- export const CollaboratorsUpsertCollaboratorRequestJson = Schema.Struct({
672
- role: Schema.Literals(["admin", "write", "read"]),
673
- });
803
+ export const CollaboratorsUpsertCollaboratorRequestJson = PutCollaboratorBody;
674
804
  export const CollaboratorsUpsertCollaborator200 = Schema.Struct({
675
- userId: UserId,
805
+ userId: UserId1,
676
806
  role: Schema.String,
677
- grantedBy: Schema.Union([UserId, Schema.Null]).annotate({ readOnly: true }),
807
+ grantedBy: Schema.Union([UserId1, Schema.Null]).annotate({ readOnly: true }),
678
808
  createdAt: Schema.String.annotate({ readOnly: true, format: "date-time" }),
679
809
  });
680
810
  export const CollaboratorsUpsertCollaborator400 = Schema.Union([
@@ -723,6 +853,8 @@ export const HealthGetDeepHealth400 = DecodeErrorResponse;
723
853
  export const HealthGetObservabilityVerificationParams = Schema.Struct({
724
854
  "x-health-key": Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
725
855
  level: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
856
+ scenario: Schema.optionalKey(Schema.Union([Schema.Literals(["effect-handled-500", "surface-unhandled-500"]), Schema.Null])),
857
+ scenarioId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
726
858
  });
727
859
  export const HealthGetObservabilityVerification200 = Schema.Struct({
728
860
  status: Schema.Literals(["ok", "error"]),
@@ -749,6 +881,8 @@ export const HealthGetObservabilityVerification200 = Schema.Struct({
749
881
  Schema.Struct({
750
882
  status: Schema.Literals(["ok", "error"]),
751
883
  sentryEventId: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
884
+ reason: Schema.optionalKey(Schema.Union([Schema.Literal("sentry-issue-reporter-disabled"), Schema.Null])),
885
+ message: Schema.optionalKey(Schema.Union([Schema.String, Schema.Null])),
752
886
  }),
753
887
  Schema.Null,
754
888
  ])),
@@ -756,16 +890,24 @@ export const HealthGetObservabilityVerification200 = Schema.Struct({
756
890
  });
757
891
  export const HealthGetObservabilityVerification400 = DecodeErrorResponse;
758
892
  export const SearchSearchExtensionsParams = Schema.Struct({
759
- q: Schema.String.check(Schema.isMinLength(1)),
760
- });
761
- export const SearchSearchExtensions200 = Schema.Struct({
762
- ok: Schema.Literal(true),
763
- mock: Schema.Literal(true),
764
- method: Schema.Literal("GET"),
765
- route: Schema.Literal("/v1/search"),
766
- message: Schema.String,
767
- query: Schema.Struct({ q: Schema.String }),
893
+ q: Schema.String.annotate({
894
+ description: "Search query string. Use an empty string to list the public catalog.",
895
+ examples: ["git commit", ""],
896
+ }),
897
+ cursor: Schema.optionalKey(Schema.Union([
898
+ Schema.String.annotate({
899
+ description: "Opaque cursor from a previous response for pagination.",
900
+ }),
901
+ Schema.Null,
902
+ ])),
903
+ limit: Schema.optionalKey(Schema.Union([
904
+ Schema.String.annotate({
905
+ description: "Maximum number of results to return (1–100, default 20).",
906
+ }),
907
+ Schema.Null,
908
+ ])),
768
909
  });
910
+ export const SearchSearchExtensions200 = SearchResponse;
769
911
  export const SearchSearchExtensions400 = DecodeErrorResponse;
770
912
  export const make = (httpClient, options = {}) => {
771
913
  const unexpectedStatus = (response) => Effect.flatMap(Effect.orElseSucceed(response.json, () => "Unexpected status code"), (description) => Effect.fail(new HttpClientError.HttpClientError({
@@ -856,6 +998,12 @@ export const make = (httpClient, options = {}) => {
856
998
  "204": () => Effect.void,
857
999
  orElse: unexpectedStatus,
858
1000
  }))),
1001
+ OwnersGetOwner: (handle, options) => HttpClientRequest.get(`/v1/owners/${handle}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
1002
+ "2xx": decodeSuccess(OwnersGetOwner200),
1003
+ "400": decodeError("OwnersGetOwner400", OwnersGetOwner400),
1004
+ "404": decodeError("OwnersGetOwner404", OwnersGetOwner404),
1005
+ orElse: unexpectedStatus,
1006
+ }))),
859
1007
  ExtensionsListByOwner: (owner, options) => HttpClientRequest.get(`/v1/extensions/${owner}`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
860
1008
  "2xx": decodeSuccess(ExtensionsListByOwner200),
861
1009
  "400": decodeError("ExtensionsListByOwner400", ExtensionsListByOwner400),
@@ -907,7 +1055,6 @@ export const make = (httpClient, options = {}) => {
907
1055
  "422": decodeError("ExtensionsPublishVersion422", ExtensionsPublishVersion422),
908
1056
  "429": decodeError("ExtensionsPublishVersion429", ExtensionsPublishVersion429),
909
1057
  "500": decodeError("ExtensionsPublishVersion500", ExtensionsPublishVersion500),
910
- "501": decodeError("ExtensionsPublishVersion501", ExtensionsPublishVersion501),
911
1058
  "503": decodeError("ExtensionsPublishVersion503", ExtensionsPublishVersion503),
912
1059
  orElse: unexpectedStatus,
913
1060
  }))),
@@ -927,11 +1074,6 @@ export const make = (httpClient, options = {}) => {
927
1074
  orElse: unexpectedStatus,
928
1075
  }))),
929
1076
  ExtensionsDownloadArchiveStream: (owner, type, name, version) => HttpClientRequest.get(`/v1/extensions/${owner}/${type}/${name}/${version}/archive`).pipe(binaryRequest),
930
- ExtensionsGetOwnerProfile: (owner, options) => HttpClientRequest.get(`/v1/extensions/${owner}/profile`).pipe(withResponse(options?.config)(HttpClientResponse.matchStatus({
931
- "2xx": decodeSuccess(ExtensionsGetOwnerProfile200),
932
- "400": decodeError("ExtensionsGetOwnerProfile400", ExtensionsGetOwnerProfile400),
933
- orElse: unexpectedStatus,
934
- }))),
935
1077
  ExtensionsDeprecate: (owner, type, name, options) => HttpClientRequest.post(`/v1/extensions/${owner}/${type}/${name}/deprecate`).pipe(HttpClientRequest.bodyJsonUnsafe(options.payload), withResponse(options.config)(HttpClientResponse.matchStatus({
936
1078
  "2xx": decodeSuccess(ExtensionsDeprecate200),
937
1079
  "400": decodeError("ExtensionsDeprecate400", ExtensionsDeprecate400),
@@ -1001,14 +1143,22 @@ export const make = (httpClient, options = {}) => {
1001
1143
  "400": decodeError("HealthGetDeepHealth400", HealthGetDeepHealth400),
1002
1144
  orElse: unexpectedStatus,
1003
1145
  }))),
1004
- HealthGetObservabilityVerification: (options) => HttpClientRequest.get(`/v1/debug/observability`).pipe(HttpClientRequest.setUrlParams({ level: options?.params?.["level"] }), HttpClientRequest.setHeaders({
1146
+ HealthGetObservabilityVerification: (options) => HttpClientRequest.get(`/v1/debug/observability`).pipe(HttpClientRequest.setUrlParams({
1147
+ level: options?.params?.["level"],
1148
+ scenario: options?.params?.["scenario"],
1149
+ scenarioId: options?.params?.["scenarioId"],
1150
+ }), HttpClientRequest.setHeaders({
1005
1151
  "x-health-key": options?.params?.["x-health-key"] ?? undefined,
1006
1152
  }), withResponse(options?.config)(HttpClientResponse.matchStatus({
1007
1153
  "2xx": decodeSuccess(HealthGetObservabilityVerification200),
1008
1154
  "400": decodeError("HealthGetObservabilityVerification400", HealthGetObservabilityVerification400),
1009
1155
  orElse: unexpectedStatus,
1010
1156
  }))),
1011
- SearchSearchExtensions: (options) => HttpClientRequest.get(`/v1/search`).pipe(HttpClientRequest.setUrlParams({ q: options.params["q"] }), withResponse(options.config)(HttpClientResponse.matchStatus({
1157
+ SearchSearchExtensions: (options) => HttpClientRequest.get(`/v1/search`).pipe(HttpClientRequest.setUrlParams({
1158
+ q: options.params["q"],
1159
+ cursor: options.params["cursor"],
1160
+ limit: options.params["limit"],
1161
+ }), withResponse(options.config)(HttpClientResponse.matchStatus({
1012
1162
  "2xx": decodeSuccess(SearchSearchExtensions200),
1013
1163
  "400": decodeError("SearchSearchExtensions400", SearchSearchExtensions400),
1014
1164
  orElse: unexpectedStatus,