@typeship-ax/mcp 0.6.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/LICENSE +9 -0
- package/README.md +43 -0
- package/api.json +5163 -0
- package/api.md +512 -0
- package/dist/core/http.d.ts +303 -0
- package/dist/core/http.d.ts.map +1 -0
- package/dist/core/http.js +770 -0
- package/dist/core/pagination.d.ts +51 -0
- package/dist/core/pagination.d.ts.map +1 -0
- package/dist/core/pagination.js +154 -0
- package/dist/dates.d.ts +33 -0
- package/dist/dates.d.ts.map +1 -0
- package/dist/dates.js +136 -0
- package/dist/errors.d.ts +81 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +103 -0
- package/dist/index.d.ts +92 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +86 -0
- package/dist/mcp-protocol.d.ts +453 -0
- package/dist/mcp-protocol.d.ts.map +1 -0
- package/dist/mcp-protocol.js +1262 -0
- package/dist/mcp.d.ts +5 -0
- package/dist/mcp.d.ts.map +1 -0
- package/dist/mcp.js +449 -0
- package/dist/ops.d.ts +115 -0
- package/dist/ops.d.ts.map +1 -0
- package/dist/ops.js +79 -0
- package/dist/resources/account.d.ts +18 -0
- package/dist/resources/account.d.ts.map +1 -0
- package/dist/resources/account.js +26 -0
- package/dist/resources/api-keys.d.ts +37 -0
- package/dist/resources/api-keys.d.ts.map +1 -0
- package/dist/resources/api-keys.js +67 -0
- package/dist/resources/generate.d.ts +25 -0
- package/dist/resources/generate.d.ts.map +1 -0
- package/dist/resources/generate.js +41 -0
- package/dist/resources/generations.d.ts +31 -0
- package/dist/resources/generations.d.ts.map +1 -0
- package/dist/resources/generations.js +56 -0
- package/dist/resources/projects.d.ts +110 -0
- package/dist/resources/projects.d.ts.map +1 -0
- package/dist/resources/projects.js +220 -0
- package/dist/resources/spec-revisions.d.ts +47 -0
- package/dist/resources/spec-revisions.d.ts.map +1 -0
- package/dist/resources/spec-revisions.js +90 -0
- package/dist/schemas.d.ts +6 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +88 -0
- package/dist/types.d.ts +759 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +37 -0
- package/dist/worker.d.ts +5 -0
- package/dist/worker.d.ts.map +1 -0
- package/dist/worker.js +12 -0
- package/package.json +45 -0
- package/src/core/http.ts +1008 -0
- package/src/core/pagination.ts +195 -0
- package/src/dates.ts +126 -0
- package/src/errors.ts +117 -0
- package/src/index.ts +153 -0
- package/src/mcp-protocol.ts +1451 -0
- package/src/mcp.ts +448 -0
- package/src/ops.ts +174 -0
- package/src/resources/account.ts +43 -0
- package/src/resources/api-keys.ts +105 -0
- package/src/resources/generate.ts +69 -0
- package/src/resources/generations.ts +100 -0
- package/src/resources/projects.ts +391 -0
- package/src/resources/spec-revisions.ts +150 -0
- package/src/schemas.ts +90 -0
- package/src/types.ts +825 -0
- package/src/worker.ts +13 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// typeship — specRevisions resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
|
|
4
|
+
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
|
+
import { paginate, PagePromise } from "../core/pagination.js";
|
|
6
|
+
import {
|
|
7
|
+
TransportError,
|
|
8
|
+
UnexpectedApiError,
|
|
9
|
+
ValidationError,
|
|
10
|
+
BadRequestError,
|
|
11
|
+
ForbiddenError,
|
|
12
|
+
NotFoundError,
|
|
13
|
+
RateLimitedError,
|
|
14
|
+
UnauthorizedError,
|
|
15
|
+
} from "../errors.js";
|
|
16
|
+
import type { ProjectId, SpecRevision, SpecRevisionId, SpecRevisionList } from "../types.js";
|
|
17
|
+
|
|
18
|
+
export class SpecRevisionsResource {
|
|
19
|
+
constructor(private readonly _core: HttpCore) {}
|
|
20
|
+
/**
|
|
21
|
+
* List specification revisions
|
|
22
|
+
*
|
|
23
|
+
* Immutable snapshots of the exact source text this project consumed, newest first. Raw content
|
|
24
|
+
* is available from each revision's content endpoint and is never embedded in a list response.
|
|
25
|
+
*
|
|
26
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
27
|
+
* `GET /projects/{project_id}/spec_revisions`
|
|
28
|
+
*/
|
|
29
|
+
list(
|
|
30
|
+
projectId: ProjectId,
|
|
31
|
+
params?: SpecRevisionsListParams,
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): PagePromise<SpecRevision, SpecRevisionsListError> {
|
|
34
|
+
return paginate<SpecRevision, SpecRevisionsListError>(this._core, {
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: `/projects/${encodeURIComponent(String(projectId))}/spec_revisions`,
|
|
37
|
+
query: {
|
|
38
|
+
limit: params?.limit,
|
|
39
|
+
cursor: params?.cursor,
|
|
40
|
+
},
|
|
41
|
+
errors: {
|
|
42
|
+
"400": BadRequestError,
|
|
43
|
+
"401": UnauthorizedError,
|
|
44
|
+
"403": ForbiddenError,
|
|
45
|
+
"404": NotFoundError,
|
|
46
|
+
"429": RateLimitedError,
|
|
47
|
+
},
|
|
48
|
+
idempotent: true,
|
|
49
|
+
schemaKey: "specRevisions.list",
|
|
50
|
+
options,
|
|
51
|
+
}, {
|
|
52
|
+
style: "cursor",
|
|
53
|
+
itemsField: "data",
|
|
54
|
+
cursorParam: "cursor",
|
|
55
|
+
nextCursorField: "next_cursor",
|
|
56
|
+
hasMoreField: "has_more",
|
|
57
|
+
limitParam: "limit",
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Retrieve a specification revision
|
|
63
|
+
*
|
|
64
|
+
* Metadata for one immutable source snapshot. Fetch raw source text from the content endpoint so
|
|
65
|
+
* metadata responses stay small and predictable.
|
|
66
|
+
* `GET /spec_revisions/{spec_revision_id}`
|
|
67
|
+
*/
|
|
68
|
+
async retrieve(
|
|
69
|
+
specRevisionId: SpecRevisionId,
|
|
70
|
+
options?: RequestOptions,
|
|
71
|
+
): Promise<ApiResult<SpecRevision, SpecRevisionsRetrieveError>> {
|
|
72
|
+
return this._core.request<SpecRevision, SpecRevisionsRetrieveError>({
|
|
73
|
+
method: "GET",
|
|
74
|
+
path: `/spec_revisions/${encodeURIComponent(String(specRevisionId))}`,
|
|
75
|
+
errors: {
|
|
76
|
+
"401": UnauthorizedError,
|
|
77
|
+
"403": ForbiddenError,
|
|
78
|
+
"404": NotFoundError,
|
|
79
|
+
"429": RateLimitedError,
|
|
80
|
+
},
|
|
81
|
+
idempotent: true,
|
|
82
|
+
schemaKey: "specRevisions.retrieve",
|
|
83
|
+
options,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Retrieve a specification revision's raw text
|
|
89
|
+
*
|
|
90
|
+
* Returns the exact source text identified by the revision's SHA-256 digest, suitable for saving
|
|
91
|
+
* or piping directly into a diff.
|
|
92
|
+
* `GET /spec_revisions/{spec_revision_id}/content`
|
|
93
|
+
*/
|
|
94
|
+
async retrieveContent(
|
|
95
|
+
specRevisionId: SpecRevisionId,
|
|
96
|
+
options?: RequestOptions,
|
|
97
|
+
): Promise<ApiResult<string, SpecRevisionsRetrieveContentError>> {
|
|
98
|
+
return this._core.request<string, SpecRevisionsRetrieveContentError>({
|
|
99
|
+
method: "GET",
|
|
100
|
+
path: `/spec_revisions/${encodeURIComponent(String(specRevisionId))}/content`,
|
|
101
|
+
errors: {
|
|
102
|
+
"401": UnauthorizedError,
|
|
103
|
+
"403": ForbiddenError,
|
|
104
|
+
"404": NotFoundError,
|
|
105
|
+
"429": RateLimitedError,
|
|
106
|
+
},
|
|
107
|
+
idempotent: true,
|
|
108
|
+
schemaKey: "specRevisions.retrieveContent",
|
|
109
|
+
options,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface SpecRevisionsListParams {
|
|
115
|
+
/** Maximum number of resources to return. */
|
|
116
|
+
limit?: number;
|
|
117
|
+
/** Opaque cursor from the preceding page's next_cursor. */
|
|
118
|
+
cursor?: string;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Every error `list` can produce, as a discriminated union. */
|
|
122
|
+
export type SpecRevisionsListError =
|
|
123
|
+
| BadRequestError
|
|
124
|
+
| UnauthorizedError
|
|
125
|
+
| ForbiddenError
|
|
126
|
+
| NotFoundError
|
|
127
|
+
| RateLimitedError
|
|
128
|
+
| UnexpectedApiError
|
|
129
|
+
| TransportError
|
|
130
|
+
| ValidationError;
|
|
131
|
+
|
|
132
|
+
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
133
|
+
export type SpecRevisionsRetrieveError =
|
|
134
|
+
| UnauthorizedError
|
|
135
|
+
| ForbiddenError
|
|
136
|
+
| NotFoundError
|
|
137
|
+
| RateLimitedError
|
|
138
|
+
| UnexpectedApiError
|
|
139
|
+
| TransportError
|
|
140
|
+
| ValidationError;
|
|
141
|
+
|
|
142
|
+
/** Every error `retrieveContent` can produce, as a discriminated union. */
|
|
143
|
+
export type SpecRevisionsRetrieveContentError =
|
|
144
|
+
| UnauthorizedError
|
|
145
|
+
| ForbiddenError
|
|
146
|
+
| NotFoundError
|
|
147
|
+
| RateLimitedError
|
|
148
|
+
| UnexpectedApiError
|
|
149
|
+
| TransportError
|
|
150
|
+
| ValidationError;
|
package/src/schemas.ts
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// typeship — schema tables for optional runtime validation.
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
|
+
// Consumed by core/http.ts when the client's validate option is enabled;
|
|
4
|
+
// carries no code, only data derived from the spec. Named components are
|
|
5
|
+
// deduplicated into DEFS and referenced by "req:Name" / "res:Name" keys.
|
|
6
|
+
|
|
7
|
+
export const SCHEMAS: Record<string, { req?: unknown; res?: unknown }> = {
|
|
8
|
+
"generate.run": {"req":{"$ref":"req:GenerateRequest"},"res":{"$ref":"res:GenerationResult"}},
|
|
9
|
+
"projects.list": {"res":{"$ref":"res:ProjectList"}},
|
|
10
|
+
"projects.create": {"req":{"$ref":"req:CreateProjectRequest"},"res":{"$ref":"res:Project"}},
|
|
11
|
+
"projects.retrieve": {"res":{"$ref":"res:Project"}},
|
|
12
|
+
"projects.delete": {"res":{"$ref":"res:DeletedProject"}},
|
|
13
|
+
"projects.update": {"req":{"$ref":"req:UpdateProjectRequest"},"res":{"$ref":"res:Project"}},
|
|
14
|
+
"projects.retrieveGithubHealth": {"res":{"$ref":"res:GithubIntegrationHealth"}},
|
|
15
|
+
"projects.listGenerations": {"res":{"$ref":"res:GenerationList"}},
|
|
16
|
+
"projects.generate": {"res":{"$ref":"res:GenerationBatch"}},
|
|
17
|
+
"generations.retrieve": {"res":{"$ref":"res:Generation"}},
|
|
18
|
+
"generations.retrieveFile": {"res":{"type":"string"}},
|
|
19
|
+
"specRevisions.list": {"res":{"$ref":"res:SpecRevisionList"}},
|
|
20
|
+
"specRevisions.retrieve": {"res":{"$ref":"res:SpecRevision"}},
|
|
21
|
+
"specRevisions.retrieveContent": {"res":{"type":"string"}},
|
|
22
|
+
"account.retrieve": {"res":{"$ref":"res:Account"}},
|
|
23
|
+
"apiKeys.list": {"res":{"$ref":"res:ApiKeyList"}},
|
|
24
|
+
"apiKeys.revoke": {"res":{"$ref":"res:ApiKey"}},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const DEFS: Record<string, unknown> = {
|
|
28
|
+
"req:GenerateRequest": {"type":"object","additionalProperties":false,"properties":{"spec":{"$ref":"req:SpecInput"},"outputs":{"type":"array","minItems":1,"maxItems":1,"items":{"$ref":"req:OutputId"}},"package_name":{"type":"string"},"config":{"$ref":"req:Config"}},"required":["spec","outputs"]},
|
|
29
|
+
"req:SpecInput": {"anyOf":[{"$ref":"req:UrlSpecInput"},{"$ref":"req:InlineSpecInput"}]},
|
|
30
|
+
"req:UrlSpecInput": {"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","pattern":"^https?://"},"headers":{"type":"object"}},"required":["url"]},
|
|
31
|
+
"req:InlineSpecInput": {"type":"object","additionalProperties":false,"properties":{"inline":{"type":"string"}},"required":["inline"]},
|
|
32
|
+
"req:OutputId": {"type":"string","enum":["typescript-sdk","python-sdk","go-sdk","cli","mcp"]},
|
|
33
|
+
"req:Config": {"type":"object","additionalProperties":false,"properties":{"globals":{"type":"array","maxItems":20,"items":{"type":"string"}},"retries":{"$ref":"req:RetryTuning"},"pagination":{"type":"object"},"graphql":{"$ref":"req:GraphqlSettings"},"cli":{"$ref":"req:CliBehavior"},"mcp":{"$ref":"req:McpBehavior"},"package":{"$ref":"req:PackageBehavior"},"docs_url":{"type":["string","null"]}}},
|
|
34
|
+
"req:RetryTuning": {"type":"object","additionalProperties":false,"properties":{"max_retries":{"type":"integer","minimum":0,"maximum":10},"statuses":{"type":"array","maxItems":20,"items":{"type":"integer"}},"initial_delay_ms":{"type":"integer","minimum":1},"max_delay_ms":{"type":"integer","minimum":1},"retry_non_idempotent":{"type":"boolean"},"disabled":{"type":"boolean"},"operations":{"type":"object"}}},
|
|
35
|
+
"req:GraphqlSettings": {"type":"object","additionalProperties":false,"properties":{"endpoint":{"type":"string"},"environments":{"type":"array","maxItems":10,"items":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"]}},"auth":{"type":"string","enum":["bearer","basic","api_key","none"]},"api_key_header":{"type":"string"},"title":{"type":"string","maxLength":80},"scalars":{"type":"object"}}},
|
|
36
|
+
"req:CliBehavior": {"type":"object","additionalProperties":false,"properties":{"whoami_operation":{"type":["string","null"]},"oauth_client_id":{"type":["string","null"]},"oauth_scopes":{"type":"array","maxItems":20,"items":{"type":"string"}},"oauth_audience":{"type":["string","null"]},"update_notice":{"type":"boolean"},"support_url":{"type":["string","null"]},"auth_url":{"type":["string","null"]},"mcp_url":{"type":["string","null"]},"skills_repo":{"type":["string","null"]}}},
|
|
37
|
+
"req:McpBehavior": {"type":"object","additionalProperties":false,"properties":{"tool_mode":{"type":"string","enum":["auto","operations","meta"]},"instructions":{"type":["string","null"],"maxLength":2000},"tool_descriptions":{"type":"object"}}},
|
|
38
|
+
"req:PackageBehavior": {"type":"object","additionalProperties":false,"properties":{"version":{"type":["string","null"]},"homepage":{"type":["string","null"]},"license":{"type":["string","null"],"maxLength":200},"license_text":{"type":["string","null"],"maxLength":100000},"copyright":{"type":["string","null"],"maxLength":200},"bin_name":{"type":["string","null"]},"go_package_name":{"type":["string","null"]},"mcp_name":{"type":["string","null"]}}},
|
|
39
|
+
"res:GenerationResult": {"type":"object","properties":{"files":{"type":"array","items":{"$ref":"res:GeneratedFile"}},"warnings":{"type":"array","items":{"type":"string"}},"meta":{"$ref":"res:GenerationMeta"},"limits":{"$ref":"res:GenerationLimits"},"claim":{"anyOf":[{"type":"null"},{"type":"object","properties":{"url":{"type":"string"},"expires_at":{"type":"string"}},"required":["url","expires_at"]}]}},"required":["files","warnings","meta"]},
|
|
40
|
+
"res:GeneratedFile": {"type":"object","properties":{"path":{"type":"string"},"content":{"type":"string"}},"required":["path","content"]},
|
|
41
|
+
"res:GenerationMeta": {"type":"object","properties":{"title":{"type":"string"},"version":{"type":"string"},"spec_format":{"type":"string","enum":["openapi","graphql"]},"oas_version":{"type":"string"},"converted":{"type":"boolean"},"package_name":{"type":"string"},"client_name":{"type":"string"},"outputs":{"type":"array","items":{"$ref":"res:OutputId"}},"resource_count":{"type":"integer"},"operation_count":{"type":"integer"},"schema_count":{"type":"integer"},"paginated_operation_count":{"type":"integer"},"omitted_operation_count":{"type":"integer"},"pr_url":{"type":["string","null"]},"pr_number":{"type":["integer","null"]},"pr_status":{"type":"string","enum":["opened","no_changes","blocked"]},"pr_error":{"type":"string"},"changelog":{"type":"string"},"breaking_count":{"type":"integer"},"baseline":{"type":"string","enum":["destination","last-generation","none"]},"package_compatibility":{"type":"string","enum":["success","failure"]},"package_compatibility_note":{"type":"string"},"previous_version":{"type":"string"},"file_count":{"type":"integer"},"total_lines":{"type":"integer"}},"required":["title","version","oas_version","package_name","client_name","outputs"]},
|
|
42
|
+
"res:OutputId": {"type":"string","enum":["typescript-sdk","python-sdk","go-sdk","cli","mcp"]},
|
|
43
|
+
"res:GenerationLimits": {"type":"object","properties":{"max_operations":{"type":"integer"},"omitted_operations":{"type":"integer"},"reason":{"type":"string","enum":["anonymous","free_plan"]},"signup_url":{"type":"string"},"upgrade_url":{"type":"string"}},"required":["max_operations","omitted_operations","reason","upgrade_url"]},
|
|
44
|
+
"res:ProjectList": {"type":"object","additionalProperties":false,"properties":{"object":{"$ref":"res:ListObject"},"data":{"type":"array","items":{"$ref":"res:Project"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"]},
|
|
45
|
+
"res:ListObject": {"type":"string","const":"list"},
|
|
46
|
+
"res:Project": {"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"res:ProjectId"},"object":{"type":"string","const":"project"},"name":{"type":"string","maxLength":80},"source":{"$ref":"res:ProjectSource"},"packages":{"$ref":"res:ProjectPackages"},"auto_regen":{"type":"boolean"},"spec_patches":{"type":"array","items":{"$ref":"res:SpecPatch"}},"config":{"anyOf":[{"$ref":"res:Config"},{"type":"null"}]},"mcp_enabled":{"type":"boolean"},"mcp_url":{"type":["string","null"]},"relay_enabled":{"type":"boolean"},"outputs":{"type":"array","minItems":1,"items":{"$ref":"res:OutputId"}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","object","name","source","packages","auto_regen","spec_patches","config","mcp_enabled","mcp_url","relay_enabled","outputs","created_at","updated_at"]},
|
|
47
|
+
"res:ProjectId": {"type":"string","pattern":"^prj_[a-z0-9]{16}$"},
|
|
48
|
+
"res:ProjectSource": {"anyOf":[{"$ref":"res:UrlProjectSource"},{"$ref":"res:GithubProjectSource"}]},
|
|
49
|
+
"res:UrlProjectSource": {"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","maxLength":2048,"pattern":"^https?://"},"headers_configured":{"type":"boolean"}},"required":["kind","url","headers_configured"]},
|
|
50
|
+
"res:GithubProjectSource": {"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","const":"github"},"repository":{"type":"string","maxLength":202,"pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"},"path":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^(?!/)(?!.*\\.\\.).+$"}},"required":["kind","repository","path"]},
|
|
51
|
+
"res:ProjectPackages": {"type":"object","additionalProperties":false,"properties":{"typescript-sdk":{"$ref":"res:ProjectPackageDelivery"},"python-sdk":{"$ref":"res:ProjectPackageDelivery"},"go-sdk":{"$ref":"res:ProjectPackageDelivery"},"cli":{"$ref":"res:ProjectPackageDelivery"},"mcp":{"$ref":"res:ProjectPackageDelivery"}},"required":["typescript-sdk","python-sdk","go-sdk","cli","mcp"]},
|
|
52
|
+
"res:ProjectPackageDelivery": {"type":"object","additionalProperties":false,"properties":{"name":{"type":["string","null"]},"version":{"type":["string","null"]},"destination":{"anyOf":[{"$ref":"res:ProjectDestination"},{"type":"null"}]}},"required":["name","version","destination"]},
|
|
53
|
+
"res:ProjectDestination": {"type":"object","additionalProperties":false,"properties":{"repo":{"type":["string","null"]},"directory":{"type":["string","null"]}},"required":["repo","directory"]},
|
|
54
|
+
"res:SpecPatch": {"type":"object","additionalProperties":false,"properties":{"op":{"type":"string","enum":["set","append","remove","rename"]},"path":{"type":"string"},"value":{},"to":{"type":["string","null"]},"reason":{"type":["string","null"]}},"required":["op","path"]},
|
|
55
|
+
"res:Config": {"type":"object","additionalProperties":false,"properties":{"globals":{"type":"array","maxItems":20,"items":{"type":"string"}},"retries":{"$ref":"res:RetryTuning"},"pagination":{"type":"object"},"graphql":{"$ref":"res:GraphqlSettings"},"cli":{"$ref":"res:CliBehavior"},"mcp":{"$ref":"res:McpBehavior"},"package":{"$ref":"res:PackageBehavior"},"docs_url":{"type":["string","null"]}}},
|
|
56
|
+
"res:RetryTuning": {"type":"object","additionalProperties":false,"properties":{"max_retries":{"type":"integer","minimum":0,"maximum":10},"statuses":{"type":"array","maxItems":20,"items":{"type":"integer"}},"initial_delay_ms":{"type":"integer","minimum":1},"max_delay_ms":{"type":"integer","minimum":1},"retry_non_idempotent":{"type":"boolean"},"disabled":{"type":"boolean"},"operations":{"type":"object"}}},
|
|
57
|
+
"res:GraphqlSettings": {"type":"object","additionalProperties":false,"properties":{"endpoint":{"type":"string"},"environments":{"type":"array","maxItems":10,"items":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string"},"url":{"type":"string"}},"required":["name","url"]}},"auth":{"type":"string","enum":["bearer","basic","api_key","none"]},"api_key_header":{"type":"string"},"title":{"type":"string","maxLength":80},"scalars":{"type":"object"}}},
|
|
58
|
+
"res:CliBehavior": {"type":"object","additionalProperties":false,"properties":{"whoami_operation":{"type":["string","null"]},"oauth_client_id":{"type":["string","null"]},"oauth_scopes":{"type":"array","maxItems":20,"items":{"type":"string"}},"oauth_audience":{"type":["string","null"]},"update_notice":{"type":"boolean"},"support_url":{"type":["string","null"]},"auth_url":{"type":["string","null"]},"mcp_url":{"type":["string","null"]},"skills_repo":{"type":["string","null"]}}},
|
|
59
|
+
"res:McpBehavior": {"type":"object","additionalProperties":false,"properties":{"tool_mode":{"type":"string","enum":["auto","operations","meta"]},"instructions":{"type":["string","null"],"maxLength":2000},"tool_descriptions":{"type":"object"}}},
|
|
60
|
+
"res:PackageBehavior": {"type":"object","additionalProperties":false,"properties":{"version":{"type":["string","null"]},"homepage":{"type":["string","null"]},"license":{"type":["string","null"],"maxLength":200},"license_text":{"type":["string","null"],"maxLength":100000},"copyright":{"type":["string","null"],"maxLength":200},"bin_name":{"type":["string","null"]},"go_package_name":{"type":["string","null"]},"mcp_name":{"type":["string","null"]}}},
|
|
61
|
+
"req:CreateProjectRequest": {"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"source":{"$ref":"req:ProjectSourceInput"},"outputs":{"type":"array","minItems":1,"items":{"$ref":"req:OutputId"}},"packages":{"$ref":"req:Packages"},"auto_regen":{"type":"boolean"},"spec_patches":{"type":"array","maxItems":50,"items":{"$ref":"req:SpecPatch"}},"mcp_enabled":{"type":"boolean"},"relay_enabled":{"type":"boolean"},"config":{"anyOf":[{"$ref":"req:Config"},{"type":"null"}]}},"required":["name","source","outputs"]},
|
|
62
|
+
"req:ProjectSourceInput": {"anyOf":[{"$ref":"req:UrlProjectSourceInput"},{"$ref":"req:GithubProjectSourceInput"}]},
|
|
63
|
+
"req:UrlProjectSourceInput": {"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string","maxLength":2048,"pattern":"^https?://"},"headers":{"anyOf":[{"type":"object"},{"type":"null"}]}},"required":["kind","url"]},
|
|
64
|
+
"req:GithubProjectSourceInput": {"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","const":"github"},"repository":{"type":"string","maxLength":202,"pattern":"^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$"},"path":{"type":"string","minLength":1,"maxLength":4096,"pattern":"^(?!/)(?!.*\\.\\.).+$"}},"required":["kind","repository","path"]},
|
|
65
|
+
"req:Packages": {"type":"object","additionalProperties":false,"properties":{"typescript-sdk":{"$ref":"req:PackageDelivery"},"python-sdk":{"$ref":"req:PackageDelivery"},"go-sdk":{"$ref":"req:PackageDelivery"},"cli":{"$ref":"req:PackageDelivery"},"mcp":{"$ref":"req:PackageDelivery"}}},
|
|
66
|
+
"req:PackageDelivery": {"type":"object","additionalProperties":false,"properties":{"name":{"type":["string","null"]},"version":{"type":["string","null"],"pattern":"^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?(?:\\+[0-9A-Za-z.-]+)?$"},"destination":{"anyOf":[{"$ref":"req:Destination"},{"type":"null"}]}}},
|
|
67
|
+
"req:Destination": {"type":"object","additionalProperties":false,"properties":{"repo":{"type":["string","null"]},"directory":{"type":["string","null"]}}},
|
|
68
|
+
"req:SpecPatch": {"type":"object","additionalProperties":false,"properties":{"op":{"type":"string","enum":["set","append","remove","rename"]},"path":{"type":"string"},"value":{},"to":{"type":["string","null"]},"reason":{"type":["string","null"]}},"required":["op","path"]},
|
|
69
|
+
"res:DeletedProject": {"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"res:ProjectId"},"object":{"type":"string","const":"project"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"]},
|
|
70
|
+
"req:UpdateProjectRequest": {"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"source":{"$ref":"req:ProjectSourceInput"},"outputs":{"type":"array","minItems":1,"items":{"$ref":"req:OutputId"}},"packages":{"$ref":"req:Packages"},"auto_regen":{"type":"boolean"},"spec_patches":{"type":"array","maxItems":50,"items":{"$ref":"req:SpecPatch"}},"mcp_enabled":{"type":"boolean"},"relay_enabled":{"type":"boolean"},"config":{"anyOf":[{"$ref":"req:Config"},{"type":"null"}]}}},
|
|
71
|
+
"res:GithubIntegrationHealth": {"type":"object","additionalProperties":false,"properties":{"object":{"type":"string","const":"github_integration_health"},"project_id":{"$ref":"res:ProjectId"},"status":{"type":"string","enum":["ready","action_required"]},"repositories":{"type":"array","items":{"$ref":"res:GithubRepositoryHealth"}},"required_statuses":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"array","items":{"type":"string"}},"destination":{"type":"array","items":{"type":"string"}}},"required":["source","destination"]},"last_delivery":{"anyOf":[{"$ref":"res:GithubDeliveryHealth"},{"type":"null"}]}},"required":["object","project_id","status","repositories","required_statuses","last_delivery"]},
|
|
72
|
+
"res:GithubRepositoryHealth": {"type":"object","additionalProperties":false,"properties":{"repository":{"type":"string"},"roles":{"type":"array","items":{"type":"string","enum":["source","destination"]}},"status":{"type":"string","enum":["ready","action_required"]},"default_branch":{"type":"string"},"can_read":{"type":"boolean"},"can_write":{"type":"boolean"},"breaking_label":{"type":["boolean","null"]},"spec":{"type":"string","enum":["readable","missing"]},"issues":{"type":"array","items":{"$ref":"res:GithubHealthIssue"}}},"required":["repository","roles","status","issues"]},
|
|
73
|
+
"res:GithubHealthIssue": {"type":"object","additionalProperties":false,"properties":{"code":{"type":"string","enum":["installation_missing","spec_unreadable","contents_write_missing","breaking_label_missing","github_unavailable"]},"message":{"type":"string"}},"required":["code","message"]},
|
|
74
|
+
"res:GithubDeliveryHealth": {"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"event":{"type":"string"},"status":{"type":"string","enum":["queued","processing","succeeded","failed","superseded"]},"error":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","event","status","error","created_at"]},
|
|
75
|
+
"res:GenerationList": {"type":"object","additionalProperties":false,"properties":{"object":{"$ref":"res:ListObject"},"data":{"type":"array","items":{"$ref":"res:Generation"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"]},
|
|
76
|
+
"res:Generation": {"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"res:GenerationId"},"object":{"type":"string","const":"generation"},"files_omitted":{"type":"boolean"},"files_index":{"type":"array","items":{"$ref":"res:FileStub"}},"project_id":{"$ref":"res:ProjectId"},"status":{"type":"string","enum":["succeeded","failed"]},"trigger":{"type":"string","enum":["manual","webhook","poll","preview"]},"output":{"$ref":"res:OutputId"},"meta":{"anyOf":[{"$ref":"res:GenerationMeta"},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}},"files":{"type":"array","items":{"$ref":"res:GeneratedFile"}},"error":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","object","project_id","status","trigger","output","meta","warnings","error","created_at"]},
|
|
77
|
+
"res:GenerationId": {"type":"string","pattern":"^gen_[a-z0-9]{16}$"},
|
|
78
|
+
"res:FileStub": {"type":"object","properties":{"path":{"type":"string"},"bytes":{"type":"integer"}},"required":["path","bytes"]},
|
|
79
|
+
"res:GenerationBatch": {"type":"object","additionalProperties":false,"properties":{"data":{"type":"array","items":{"anyOf":[{"$ref":"res:Generation"},{"$ref":"res:GenerationFailure"}]}}},"required":["data"]},
|
|
80
|
+
"res:GenerationFailure": {"type":"object","additionalProperties":false,"properties":{"output":{"$ref":"res:OutputId"},"status":{"type":"string","const":"failed"},"error":{"type":"string"}},"required":["output","status","error"]},
|
|
81
|
+
"res:SpecRevisionList": {"type":"object","additionalProperties":false,"properties":{"object":{"$ref":"res:ListObject"},"data":{"type":"array","items":{"$ref":"res:SpecRevision"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"]},
|
|
82
|
+
"res:SpecRevision": {"type":"object","additionalProperties":false,"properties":{"id":{"$ref":"res:SpecRevisionId"},"object":{"type":"string","const":"spec_revision"},"project_id":{"$ref":"res:ProjectId"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"size_bytes":{"type":"integer","minimum":0},"source":{"anyOf":[{"$ref":"res:SpecRevisionSource"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","object","project_id","sha256","size_bytes","source","created_at"]},
|
|
83
|
+
"res:SpecRevisionId": {"type":"string","pattern":"^spec_[a-z0-9]{16}$"},
|
|
84
|
+
"res:SpecRevisionSource": {"anyOf":[{"$ref":"res:UrlSpecRevisionSource"},{"$ref":"res:GithubSpecRevisionSource"}]},
|
|
85
|
+
"res:UrlSpecRevisionSource": {"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","const":"url"},"url":{"type":"string"}},"required":["kind","url"]},
|
|
86
|
+
"res:GithubSpecRevisionSource": {"type":"object","additionalProperties":false,"properties":{"kind":{"type":"string","const":"github"},"repository":{"type":"string"},"path":{"type":"string"},"ref":{"type":["string","null"]},"commit_sha":{"type":["string","null"]}},"required":["kind","repository","path"]},
|
|
87
|
+
"res:Account": {"type":"object","additionalProperties":false,"properties":{"id":{"type":"string","pattern":"^org_[A-Za-z0-9]+$"},"object":{"type":"string","const":"account"},"name":{"type":"string"},"plan":{"type":"string","enum":["free","pro","enterprise"]},"created_at":{"type":"string"}},"required":["id","object","name","plan","created_at"]},
|
|
88
|
+
"res:ApiKeyList": {"type":"object","additionalProperties":false,"properties":{"object":{"$ref":"res:ListObject"},"data":{"type":"array","items":{"$ref":"res:ApiKey"}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"]},
|
|
89
|
+
"res:ApiKey": {"type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"object":{"type":"string","const":"api_key"},"name":{"type":"string"},"last4":{"type":"string"},"revoked":{"type":"boolean"},"last_used_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","object","name","last4","revoked","last_used_at","created_at"]},
|
|
90
|
+
};
|