@typeship-ax/mcp 0.8.0 → 0.10.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/AGENTS.md +31 -0
- package/README.md +66 -9
- package/api.json +3153 -761
- package/api.md +9796 -382
- package/dist/api-identity.d.ts +40 -0
- package/dist/api-identity.d.ts.map +1 -0
- package/dist/api-identity.js +128 -0
- package/dist/auth-profiles.d.ts +30 -0
- package/dist/auth-profiles.d.ts.map +1 -0
- package/dist/auth-profiles.js +138 -0
- package/dist/core/http.d.ts +17 -2
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +78 -17
- package/dist/credential-storage.d.ts +24 -0
- package/dist/credential-storage.d.ts.map +1 -0
- package/dist/credential-storage.js +207 -0
- package/dist/docs.d.ts +25 -0
- package/dist/docs.d.ts.map +1 -1
- package/dist/docs.js +144 -0
- package/dist/errors.d.ts +18 -10
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +24 -14
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -4
- package/dist/mcp-authorization.d.ts +52 -0
- package/dist/mcp-authorization.d.ts.map +1 -0
- package/dist/mcp-authorization.js +232 -0
- package/dist/mcp-protocol.d.ts +51 -2
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +249 -37
- package/dist/mcp.d.ts +21 -3
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +185 -68
- package/dist/named-credentials.d.ts +21 -0
- package/dist/named-credentials.d.ts.map +1 -0
- package/dist/named-credentials.js +86 -0
- package/dist/oauth-request.d.ts +21 -0
- package/dist/oauth-request.d.ts.map +1 -0
- package/dist/oauth-request.js +119 -0
- package/dist/oauth-session.d.ts +106 -0
- package/dist/oauth-session.d.ts.map +1 -0
- package/dist/oauth-session.js +244 -0
- package/dist/ops.d.ts +14 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +34 -30
- package/dist/resources/account.d.ts +2 -2
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +1 -0
- package/dist/resources/api-keys.d.ts +3 -3
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +2 -0
- package/dist/resources/definition-revisions.d.ts +5 -5
- package/dist/resources/definition-revisions.d.ts.map +1 -1
- package/dist/resources/definition-revisions.js +4 -0
- package/dist/resources/definitions.d.ts +15 -4
- package/dist/resources/definitions.d.ts.map +1 -1
- package/dist/resources/definitions.js +11 -2
- package/dist/resources/generate.d.ts +14 -3
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +10 -2
- package/dist/resources/generations.d.ts +3 -3
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +2 -0
- package/dist/resources/projects.d.ts +56 -20
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +40 -4
- package/dist/resources/targets.d.ts +84 -10
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +127 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +55 -26
- package/dist/types.d.ts +602 -123
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +24 -0
- package/dist/worker.js +4 -4
- package/package.json +11 -1
- package/server.json +42 -0
- package/src/api-identity.ts +98 -0
- package/src/auth-profiles.ts +114 -0
- package/src/core/http.ts +88 -19
- package/src/credential-storage.ts +183 -0
- package/src/docs.ts +138 -0
- package/src/errors.ts +26 -15
- package/src/index.ts +29 -4
- package/src/mcp-authorization.ts +211 -0
- package/src/mcp-protocol.ts +287 -38
- package/src/mcp.ts +186 -72
- package/src/named-credentials.ts +74 -0
- package/src/oauth-request.ts +90 -0
- package/src/oauth-session.ts +258 -0
- package/src/ops.ts +48 -31
- package/src/resources/account.ts +3 -0
- package/src/resources/api-keys.ts +5 -0
- package/src/resources/definition-revisions.ts +9 -0
- package/src/resources/definitions.ts +25 -0
- package/src/resources/generate.ts +23 -0
- package/src/resources/generations.ts +5 -0
- package/src/resources/projects.ts +95 -7
- package/src/resources/targets.ts +241 -0
- package/src/schemas.ts +55 -26
- package/src/types.ts +640 -123
- package/src/worker.ts +4 -4
package/src/types.ts
CHANGED
|
@@ -34,6 +34,8 @@ export type DeliveryId = string;
|
|
|
34
34
|
|
|
35
35
|
export type TargetReleaseId = string;
|
|
36
36
|
|
|
37
|
+
export type PublicationId = string;
|
|
38
|
+
|
|
37
39
|
/**
|
|
38
40
|
* Generator implementation selected by a Target. This is configuration, not identity; several
|
|
39
41
|
* Targets may use the same generator.
|
|
@@ -592,6 +594,15 @@ export interface Diagnostic {
|
|
|
592
594
|
impact: string;
|
|
593
595
|
/** Public surfaces affected by the root cause. */
|
|
594
596
|
surfaces: Array<"api" | "sdk" | "cli" | "mcp">;
|
|
597
|
+
/**
|
|
598
|
+
* Whether the finding is provable from the Definition, a conservative review suggestion, or a
|
|
599
|
+
* documented Typeship implementation limitation.
|
|
600
|
+
*/
|
|
601
|
+
evidence_basis: "contract" | "heuristic" | "implementation";
|
|
602
|
+
/** Whether remediation requires intent that the Definition cannot prove. */
|
|
603
|
+
owner_decision_required: boolean;
|
|
604
|
+
/** Concrete generated SDK, CLI, or MCP naming effect when Typeship can state it. */
|
|
605
|
+
surface_impact?: string;
|
|
595
606
|
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
596
607
|
locations: DiagnosticLocation[];
|
|
597
608
|
fix?: DiagnosticFix;
|
|
@@ -618,6 +629,15 @@ export interface DiagnosticRead {
|
|
|
618
629
|
impact: string;
|
|
619
630
|
/** Public surfaces affected by the root cause. */
|
|
620
631
|
surfaces: Array<("api" | "sdk" | "cli" | "mcp") | (string & {})>;
|
|
632
|
+
/**
|
|
633
|
+
* Whether the finding is provable from the Definition, a conservative review suggestion, or a
|
|
634
|
+
* documented Typeship implementation limitation.
|
|
635
|
+
*/
|
|
636
|
+
evidence_basis: ("contract" | "heuristic" | "implementation") | (string & {});
|
|
637
|
+
/** Whether remediation requires intent that the Definition cannot prove. */
|
|
638
|
+
owner_decision_required: boolean;
|
|
639
|
+
/** Concrete generated SDK, CLI, or MCP naming effect when Typeship can state it. */
|
|
640
|
+
surface_impact?: string;
|
|
621
641
|
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
622
642
|
locations: DiagnosticLocation[];
|
|
623
643
|
fix?: DiagnosticFixRead;
|
|
@@ -702,6 +722,24 @@ export interface DiagnosticEvaluationRead {
|
|
|
702
722
|
suppressed_occurrences: number;
|
|
703
723
|
}
|
|
704
724
|
|
|
725
|
+
/** Current-revision suppression usage for one stable Diagnostic rule. */
|
|
726
|
+
export interface DiagnosticSuppressionSignal {
|
|
727
|
+
rule_id: string;
|
|
728
|
+
/** Current occurrences of this rule that are not suppressed. */
|
|
729
|
+
active_occurrences: number;
|
|
730
|
+
suppressed_occurrences: number;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Current-revision signals for tuning Diagnostics policy. These counts do not claim that a
|
|
735
|
+
* suppression is a false positive or that runtime behavior has been verified.
|
|
736
|
+
*/
|
|
737
|
+
export interface DiagnosticQualitySignals {
|
|
738
|
+
suppressed_by_rule: DiagnosticSuppressionSignal[];
|
|
739
|
+
/** Reviewed exceptions whose rule or exact path no longer matches this revision. */
|
|
740
|
+
stale_suppressions: DiagnosticSuppression[];
|
|
741
|
+
}
|
|
742
|
+
|
|
705
743
|
/** Compact rule and location reference; full guidance appears once in diagnostics. */
|
|
706
744
|
export interface DiagnosticReference {
|
|
707
745
|
rule_id: string;
|
|
@@ -752,6 +790,7 @@ export interface DiagnosticReport {
|
|
|
752
790
|
diagnostics: Diagnostic[];
|
|
753
791
|
policy: DiagnosticPolicy;
|
|
754
792
|
evaluation: DiagnosticEvaluation;
|
|
793
|
+
quality_signals: DiagnosticQualitySignals;
|
|
755
794
|
delta: DiagnosticDelta;
|
|
756
795
|
request_id: RequestId;
|
|
757
796
|
}
|
|
@@ -774,6 +813,7 @@ export interface DiagnosticReportRead {
|
|
|
774
813
|
diagnostics: DiagnosticRead[];
|
|
775
814
|
policy: DiagnosticPolicyRead;
|
|
776
815
|
evaluation: DiagnosticEvaluationRead;
|
|
816
|
+
quality_signals: DiagnosticQualitySignals;
|
|
777
817
|
delta: DiagnosticDeltaRead;
|
|
778
818
|
request_id: RequestId;
|
|
779
819
|
}
|
|
@@ -816,6 +856,11 @@ export interface RepositoryDeliveryInput {
|
|
|
816
856
|
package_name?: string | null;
|
|
817
857
|
/** Explicit Go module path where applicable. */
|
|
818
858
|
module_path?: string | null;
|
|
859
|
+
/**
|
|
860
|
+
* Commit repository-owned registry automation and report publication after the Draft merges.
|
|
861
|
+
* Default: false
|
|
862
|
+
*/
|
|
863
|
+
publish_on_merge?: boolean;
|
|
819
864
|
}
|
|
820
865
|
|
|
821
866
|
/** Response shape for RepositoryDeliveryInput. */
|
|
@@ -827,6 +872,11 @@ export interface RepositoryDeliveryInputRead {
|
|
|
827
872
|
package_name?: string | null;
|
|
828
873
|
/** Explicit Go module path where applicable. */
|
|
829
874
|
module_path?: string | null;
|
|
875
|
+
/**
|
|
876
|
+
* Commit repository-owned registry automation and report publication after the Draft merges.
|
|
877
|
+
* Default: false
|
|
878
|
+
*/
|
|
879
|
+
publish_on_merge?: boolean;
|
|
830
880
|
}
|
|
831
881
|
|
|
832
882
|
export interface HostedMcpDeliveryInput {
|
|
@@ -855,6 +905,7 @@ export interface RepositoryDelivery {
|
|
|
855
905
|
directory: string | null;
|
|
856
906
|
package_name: string | null;
|
|
857
907
|
module_path: string | null;
|
|
908
|
+
publish_on_merge: boolean;
|
|
858
909
|
/** Format: date-time */
|
|
859
910
|
created_at: string;
|
|
860
911
|
/** Format: date-time */
|
|
@@ -872,6 +923,7 @@ export interface RepositoryDeliveryRead {
|
|
|
872
923
|
directory: string | null;
|
|
873
924
|
package_name: string | null;
|
|
874
925
|
module_path: string | null;
|
|
926
|
+
publish_on_merge: boolean;
|
|
875
927
|
/** Format: date-time */
|
|
876
928
|
created_at: string;
|
|
877
929
|
/** Format: date-time */
|
|
@@ -930,7 +982,7 @@ export interface TargetFields {
|
|
|
930
982
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
931
983
|
* belong to the Definition.
|
|
932
984
|
*/
|
|
933
|
-
config?:
|
|
985
|
+
config?: TargetConfig | null;
|
|
934
986
|
deliveries?: DeliveryInput[];
|
|
935
987
|
}
|
|
936
988
|
|
|
@@ -951,7 +1003,7 @@ export interface TargetFieldsRead {
|
|
|
951
1003
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
952
1004
|
* belong to the Definition.
|
|
953
1005
|
*/
|
|
954
|
-
config?:
|
|
1006
|
+
config?: TargetConfigRead | null;
|
|
955
1007
|
deliveries?: DeliveryInputRead[];
|
|
956
1008
|
}
|
|
957
1009
|
|
|
@@ -969,7 +1021,7 @@ export interface InitialTargetFields {
|
|
|
969
1021
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
970
1022
|
* belong to the Definition.
|
|
971
1023
|
*/
|
|
972
|
-
config?:
|
|
1024
|
+
config?: TargetConfig | null;
|
|
973
1025
|
deliveries?: DeliveryInput[];
|
|
974
1026
|
}
|
|
975
1027
|
|
|
@@ -988,7 +1040,7 @@ export interface InitialTargetFieldsRead {
|
|
|
988
1040
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
989
1041
|
* belong to the Definition.
|
|
990
1042
|
*/
|
|
991
|
-
config?:
|
|
1043
|
+
config?: TargetConfigRead | null;
|
|
992
1044
|
deliveries?: DeliveryInputRead[];
|
|
993
1045
|
}
|
|
994
1046
|
|
|
@@ -1002,7 +1054,7 @@ export interface TargetUpdateRequest {
|
|
|
1002
1054
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1003
1055
|
* belong to the Definition.
|
|
1004
1056
|
*/
|
|
1005
|
-
config?:
|
|
1057
|
+
config?: TargetConfig | null;
|
|
1006
1058
|
deliveries?: DeliveryInput[];
|
|
1007
1059
|
}
|
|
1008
1060
|
|
|
@@ -1017,7 +1069,7 @@ export interface TargetUpdateRequestRead {
|
|
|
1017
1069
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1018
1070
|
* belong to the Definition.
|
|
1019
1071
|
*/
|
|
1020
|
-
config?:
|
|
1072
|
+
config?: TargetConfigRead | null;
|
|
1021
1073
|
deliveries?: DeliveryInputRead[];
|
|
1022
1074
|
}
|
|
1023
1075
|
|
|
@@ -1035,13 +1087,23 @@ export interface Target {
|
|
|
1035
1087
|
mode: "reviewed_semver";
|
|
1036
1088
|
pre1_breaking: "minor";
|
|
1037
1089
|
};
|
|
1038
|
-
|
|
1090
|
+
/**
|
|
1091
|
+
* Deprecated projection of the newest immutable Target Release; null until a release becomes
|
|
1092
|
+
* Current.
|
|
1093
|
+
* @deprecated
|
|
1094
|
+
*/
|
|
1095
|
+
current_version: string | null;
|
|
1039
1096
|
proposed_version: string | null;
|
|
1097
|
+
proposed_version_source: "console" | "api" | "github" | null;
|
|
1098
|
+
proposed_version_actor: string | null;
|
|
1099
|
+
/** Optimistic concurrency revision for Draft selections. */
|
|
1100
|
+
release_revision: number;
|
|
1040
1101
|
/**
|
|
1041
1102
|
* Target-specific overrides merged over Project.config. GraphQL settings are Definition-owned and
|
|
1042
1103
|
* never appear here.
|
|
1043
1104
|
*/
|
|
1044
|
-
config:
|
|
1105
|
+
config: TargetConfig | null;
|
|
1106
|
+
/** At most one repository and one hosted MCP Delivery. */
|
|
1045
1107
|
deliveries: Delivery[];
|
|
1046
1108
|
/** Format: date-time */
|
|
1047
1109
|
created_at: string;
|
|
@@ -1065,13 +1127,23 @@ export interface TargetRead {
|
|
|
1065
1127
|
mode: "reviewed_semver" | (string & {});
|
|
1066
1128
|
pre1_breaking: "minor" | (string & {});
|
|
1067
1129
|
};
|
|
1068
|
-
|
|
1130
|
+
/**
|
|
1131
|
+
* Deprecated projection of the newest immutable Target Release; null until a release becomes
|
|
1132
|
+
* Current.
|
|
1133
|
+
* @deprecated
|
|
1134
|
+
*/
|
|
1135
|
+
current_version: string | null;
|
|
1069
1136
|
proposed_version: string | null;
|
|
1137
|
+
proposed_version_source: ("console" | "api" | "github" | null) | (string & {}) | null;
|
|
1138
|
+
proposed_version_actor: string | null;
|
|
1139
|
+
/** Optimistic concurrency revision for Draft selections. */
|
|
1140
|
+
release_revision: number;
|
|
1070
1141
|
/**
|
|
1071
1142
|
* Target-specific overrides merged over Project.config. GraphQL settings are Definition-owned and
|
|
1072
1143
|
* never appear here.
|
|
1073
1144
|
*/
|
|
1074
|
-
config:
|
|
1145
|
+
config: TargetConfigRead | null;
|
|
1146
|
+
/** At most one repository and one hosted MCP Delivery. */
|
|
1075
1147
|
deliveries: DeliveryRead[];
|
|
1076
1148
|
/** Format: date-time */
|
|
1077
1149
|
created_at: string;
|
|
@@ -1106,7 +1178,9 @@ export interface TargetRelease {
|
|
|
1106
1178
|
id: TargetReleaseId;
|
|
1107
1179
|
object: "target_release";
|
|
1108
1180
|
target_id: TargetId;
|
|
1109
|
-
|
|
1181
|
+
/** Null only for a verified release imported during package adoption. */
|
|
1182
|
+
generation_id: GenerationId | null;
|
|
1183
|
+
origin: "typeship" | "imported";
|
|
1110
1184
|
/** Immutable package version released from this Target. */
|
|
1111
1185
|
version: string;
|
|
1112
1186
|
channel: "stable" | "prerelease";
|
|
@@ -1116,6 +1190,16 @@ export interface TargetRelease {
|
|
|
1116
1190
|
definition_revision_id: DefinitionRevisionId | null;
|
|
1117
1191
|
/** Immutable provider-native revision that was merged or published. */
|
|
1118
1192
|
delivery_revision: string;
|
|
1193
|
+
import_provenance: {
|
|
1194
|
+
tag: string | null;
|
|
1195
|
+
/** Format: uri */
|
|
1196
|
+
registry_url: string | null;
|
|
1197
|
+
artifact_digest: string | null;
|
|
1198
|
+
/** Format: date-time */
|
|
1199
|
+
imported_at: string | null;
|
|
1200
|
+
}
|
|
1201
|
+
| null;
|
|
1202
|
+
publications: Publication[];
|
|
1119
1203
|
/** Format: date-time */
|
|
1120
1204
|
created_at: string;
|
|
1121
1205
|
request_id?: RequestId;
|
|
@@ -1126,7 +1210,9 @@ export interface TargetReleaseRead {
|
|
|
1126
1210
|
id: TargetReleaseId;
|
|
1127
1211
|
object: "target_release" | (string & {});
|
|
1128
1212
|
target_id: TargetId;
|
|
1129
|
-
|
|
1213
|
+
/** Null only for a verified release imported during package adoption. */
|
|
1214
|
+
generation_id: GenerationId | null;
|
|
1215
|
+
origin: ("typeship" | "imported") | (string & {});
|
|
1130
1216
|
/** Immutable package version released from this Target. */
|
|
1131
1217
|
version: string;
|
|
1132
1218
|
channel: ("stable" | "prerelease") | (string & {});
|
|
@@ -1136,6 +1222,16 @@ export interface TargetReleaseRead {
|
|
|
1136
1222
|
definition_revision_id: DefinitionRevisionId | null;
|
|
1137
1223
|
/** Immutable provider-native revision that was merged or published. */
|
|
1138
1224
|
delivery_revision: string;
|
|
1225
|
+
import_provenance: {
|
|
1226
|
+
tag: string | null;
|
|
1227
|
+
/** Format: uri */
|
|
1228
|
+
registry_url: string | null;
|
|
1229
|
+
artifact_digest: string | null;
|
|
1230
|
+
/** Format: date-time */
|
|
1231
|
+
imported_at: string | null;
|
|
1232
|
+
}
|
|
1233
|
+
| null;
|
|
1234
|
+
publications: PublicationRead[];
|
|
1139
1235
|
/** Format: date-time */
|
|
1140
1236
|
created_at: string;
|
|
1141
1237
|
request_id?: RequestId;
|
|
@@ -1163,6 +1259,131 @@ export interface TargetReleaseListRead {
|
|
|
1163
1259
|
request_id: RequestId;
|
|
1164
1260
|
}
|
|
1165
1261
|
|
|
1262
|
+
export interface Publication {
|
|
1263
|
+
id: PublicationId;
|
|
1264
|
+
object: "publication";
|
|
1265
|
+
target_release_id: TargetReleaseId;
|
|
1266
|
+
destination: "github" | "npm" | "pypi" | "go" | "mcp";
|
|
1267
|
+
state: "pending" | "publishing" | "published" | "failed";
|
|
1268
|
+
attempt: number;
|
|
1269
|
+
/** Format: uri */
|
|
1270
|
+
run_url: string | null;
|
|
1271
|
+
/** Format: uri */
|
|
1272
|
+
registry_url: string | null;
|
|
1273
|
+
artifact_digest: string | null;
|
|
1274
|
+
error: string | null;
|
|
1275
|
+
/** Format: date-time */
|
|
1276
|
+
started_at: string | null;
|
|
1277
|
+
/** Format: date-time */
|
|
1278
|
+
finished_at: string | null;
|
|
1279
|
+
/** Format: date-time */
|
|
1280
|
+
updated_at: string;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
/** Response shape for Publication. */
|
|
1284
|
+
export interface PublicationRead {
|
|
1285
|
+
id: PublicationId;
|
|
1286
|
+
object: "publication" | (string & {});
|
|
1287
|
+
target_release_id: TargetReleaseId;
|
|
1288
|
+
destination: ("github" | "npm" | "pypi" | "go" | "mcp") | (string & {});
|
|
1289
|
+
state: ("pending" | "publishing" | "published" | "failed") | (string & {});
|
|
1290
|
+
attempt: number;
|
|
1291
|
+
/** Format: uri */
|
|
1292
|
+
run_url: string | null;
|
|
1293
|
+
/** Format: uri */
|
|
1294
|
+
registry_url: string | null;
|
|
1295
|
+
artifact_digest: string | null;
|
|
1296
|
+
error: string | null;
|
|
1297
|
+
/** Format: date-time */
|
|
1298
|
+
started_at: string | null;
|
|
1299
|
+
/** Format: date-time */
|
|
1300
|
+
finished_at: string | null;
|
|
1301
|
+
/** Format: date-time */
|
|
1302
|
+
updated_at: string;
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
export type TargetDraftSelection = {
|
|
1306
|
+
mode: "automatic";
|
|
1307
|
+
}
|
|
1308
|
+
| {
|
|
1309
|
+
mode: "exact";
|
|
1310
|
+
version: string;
|
|
1311
|
+
source: "console" | "api" | "github" | null;
|
|
1312
|
+
actor: string | null;
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
/** Response shape for TargetDraftSelection. */
|
|
1316
|
+
export type TargetDraftSelectionRead = {
|
|
1317
|
+
mode: "automatic" | (string & {});
|
|
1318
|
+
}
|
|
1319
|
+
| {
|
|
1320
|
+
mode: "exact" | (string & {});
|
|
1321
|
+
version: string;
|
|
1322
|
+
source: ("console" | "api" | "github" | null) | (string & {}) | null;
|
|
1323
|
+
actor: string | null;
|
|
1324
|
+
};
|
|
1325
|
+
|
|
1326
|
+
export interface TargetDraft {
|
|
1327
|
+
object: "target_draft";
|
|
1328
|
+
target_id: TargetId;
|
|
1329
|
+
revision: number;
|
|
1330
|
+
current_version: string | null;
|
|
1331
|
+
version: string | null;
|
|
1332
|
+
selection: TargetDraftSelection;
|
|
1333
|
+
readiness: Record<string, unknown> | null;
|
|
1334
|
+
changes: {
|
|
1335
|
+
/** Cumulative changelog against Current. */
|
|
1336
|
+
changelog?: string | null;
|
|
1337
|
+
breaking_count?: number | null;
|
|
1338
|
+
previous_version?: string | null;
|
|
1339
|
+
}
|
|
1340
|
+
| null;
|
|
1341
|
+
head_revision: string | null;
|
|
1342
|
+
/** Format: uri */
|
|
1343
|
+
pull_request_url: string | null;
|
|
1344
|
+
request_id?: RequestId;
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1347
|
+
/** Response shape for TargetDraft. */
|
|
1348
|
+
export interface TargetDraftRead {
|
|
1349
|
+
object: "target_draft" | (string & {});
|
|
1350
|
+
target_id: TargetId;
|
|
1351
|
+
revision: number;
|
|
1352
|
+
current_version: string | null;
|
|
1353
|
+
version: string | null;
|
|
1354
|
+
selection: TargetDraftSelectionRead;
|
|
1355
|
+
readiness: Record<string, unknown> | null;
|
|
1356
|
+
changes: {
|
|
1357
|
+
/** Cumulative changelog against Current. */
|
|
1358
|
+
changelog?: string | null;
|
|
1359
|
+
breaking_count?: number | null;
|
|
1360
|
+
previous_version?: string | null;
|
|
1361
|
+
}
|
|
1362
|
+
| null;
|
|
1363
|
+
head_revision: string | null;
|
|
1364
|
+
/** Format: uri */
|
|
1365
|
+
pull_request_url: string | null;
|
|
1366
|
+
request_id?: RequestId;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
export type TargetDraftResponse = TargetDraft & ResponseMetadata;
|
|
1370
|
+
|
|
1371
|
+
/** Response shape for TargetDraftResponse. */
|
|
1372
|
+
export type TargetDraftResponseRead = TargetDraftRead & ResponseMetadata;
|
|
1373
|
+
|
|
1374
|
+
export interface TargetDraftUpdate {
|
|
1375
|
+
/** Exact SemVer, or null to return to automatic selection. */
|
|
1376
|
+
version: string | null;
|
|
1377
|
+
expected_revision?: number;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
export interface TargetAdoption {
|
|
1381
|
+
/** Exact already-published package version to make Current. */
|
|
1382
|
+
version: string;
|
|
1383
|
+
/** Immutable repository tag containing the matching package source. */
|
|
1384
|
+
tag: string;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1166
1387
|
export interface RepositoryHealthIssue {
|
|
1167
1388
|
code: "connection_missing"
|
|
1168
1389
|
| "definition_unreadable"
|
|
@@ -1350,18 +1571,15 @@ export interface DefinitionUpdateRequestRead {
|
|
|
1350
1571
|
diagnostic_policy?: DiagnosticPolicyRead;
|
|
1351
1572
|
}
|
|
1352
1573
|
|
|
1574
|
+
/**
|
|
1575
|
+
* Project-owned identity, Definition reference, generation controls, and shared configuration.
|
|
1576
|
+
* Targets and Deliveries are available only through their canonical Target endpoints.
|
|
1577
|
+
*/
|
|
1353
1578
|
export interface Project {
|
|
1354
1579
|
id: ProjectId;
|
|
1355
1580
|
object: "project";
|
|
1356
1581
|
name: string;
|
|
1357
1582
|
definition_id: DefinitionId;
|
|
1358
|
-
/** All configured Targets, including disabled Targets and their saved Deliveries. */
|
|
1359
|
-
targets: Target[];
|
|
1360
|
-
/**
|
|
1361
|
-
* Flattened convenience view derived from the same Target bundles. Every Delivery retains
|
|
1362
|
-
* target_id so ownership is explicit.
|
|
1363
|
-
*/
|
|
1364
|
-
deliveries: Delivery[];
|
|
1365
1583
|
/**
|
|
1366
1584
|
* Regenerate when the Definition changes: on every push to the default branch for a repository
|
|
1367
1585
|
* source, every 30 minutes for a URL source. Off by default: the first generation is always one
|
|
@@ -1393,13 +1611,6 @@ export interface Project {
|
|
|
1393
1611
|
export interface ProjectWrite {
|
|
1394
1612
|
name: string;
|
|
1395
1613
|
definition_id: DefinitionId;
|
|
1396
|
-
/** All configured Targets, including disabled Targets and their saved Deliveries. */
|
|
1397
|
-
targets: Target[];
|
|
1398
|
-
/**
|
|
1399
|
-
* Flattened convenience view derived from the same Target bundles. Every Delivery retains
|
|
1400
|
-
* target_id so ownership is explicit.
|
|
1401
|
-
*/
|
|
1402
|
-
deliveries: Delivery[];
|
|
1403
1614
|
/**
|
|
1404
1615
|
* Regenerate when the Definition changes: on every push to the default branch for a repository
|
|
1405
1616
|
* source, every 30 minutes for a URL source. Off by default: the first generation is always one
|
|
@@ -1426,13 +1637,6 @@ export interface ProjectRead {
|
|
|
1426
1637
|
object: "project" | (string & {});
|
|
1427
1638
|
name: string;
|
|
1428
1639
|
definition_id: DefinitionId;
|
|
1429
|
-
/** All configured Targets, including disabled Targets and their saved Deliveries. */
|
|
1430
|
-
targets: TargetRead[];
|
|
1431
|
-
/**
|
|
1432
|
-
* Flattened convenience view derived from the same Target bundles. Every Delivery retains
|
|
1433
|
-
* target_id so ownership is explicit.
|
|
1434
|
-
*/
|
|
1435
|
-
deliveries: DeliveryRead[];
|
|
1436
1640
|
/**
|
|
1437
1641
|
* Regenerate when the Definition changes: on every push to the default branch for a repository
|
|
1438
1642
|
* source, every 30 minutes for a URL source. Off by default: the first generation is always one
|
|
@@ -1461,8 +1665,8 @@ export interface ProjectRead {
|
|
|
1461
1665
|
}
|
|
1462
1666
|
|
|
1463
1667
|
/**
|
|
1464
|
-
* Lean Project identity returned by collection endpoints. Retrieve the Project
|
|
1465
|
-
* for the complete
|
|
1668
|
+
* Lean Project identity returned by collection endpoints. Retrieve the Project for shared
|
|
1669
|
+
* configuration and list its Targets for the complete canonical child collection.
|
|
1466
1670
|
*/
|
|
1467
1671
|
export interface ProjectSummary {
|
|
1468
1672
|
id: ProjectId;
|
|
@@ -1580,30 +1784,151 @@ export interface AccountRead {
|
|
|
1580
1784
|
request_id: RequestId;
|
|
1581
1785
|
}
|
|
1582
1786
|
|
|
1583
|
-
/**
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1787
|
+
/**
|
|
1788
|
+
* Authorization-server metadata used by generated OAuth flows. Secrets and runtime credentials are
|
|
1789
|
+
* never accepted here.
|
|
1790
|
+
*/
|
|
1791
|
+
export interface OAuthServer {
|
|
1792
|
+
/**
|
|
1793
|
+
* Exact authorization-server issuer, including any tenant path.
|
|
1794
|
+
* Format: uri
|
|
1795
|
+
*/
|
|
1796
|
+
issuer?: string | null;
|
|
1797
|
+
/**
|
|
1798
|
+
* Exact metadata URL when it cannot be derived from the issuer.
|
|
1799
|
+
* Format: uri
|
|
1800
|
+
*/
|
|
1801
|
+
discovery_url?: string | null;
|
|
1802
|
+
/**
|
|
1803
|
+
* Authorization endpoint override.
|
|
1804
|
+
* Format: uri
|
|
1805
|
+
*/
|
|
1806
|
+
authorization_url?: string | null;
|
|
1587
1807
|
/**
|
|
1588
|
-
*
|
|
1589
|
-
*
|
|
1808
|
+
* Token endpoint override.
|
|
1809
|
+
* Format: uri
|
|
1590
1810
|
*/
|
|
1591
|
-
|
|
1811
|
+
token_url?: string | null;
|
|
1592
1812
|
/**
|
|
1593
|
-
*
|
|
1594
|
-
*
|
|
1813
|
+
* Device-authorization endpoint override.
|
|
1814
|
+
* Format: uri
|
|
1595
1815
|
*/
|
|
1596
|
-
|
|
1816
|
+
device_authorization_url?: string | null;
|
|
1817
|
+
/** Default scopes requested during login. */
|
|
1818
|
+
scopes?: string[] | null;
|
|
1819
|
+
/** Default audience included in authorization and token requests. */
|
|
1820
|
+
audience?: string | null;
|
|
1597
1821
|
/**
|
|
1598
|
-
*
|
|
1599
|
-
*
|
|
1822
|
+
* Protected API resource included in authorization and token requests.
|
|
1823
|
+
* Format: uri
|
|
1824
|
+
*/
|
|
1825
|
+
resource?: string | null;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/**
|
|
1829
|
+
* OAuth application available to generated products. Public clients support interactive login;
|
|
1830
|
+
* confidential clients support runtime-supplied machine credentials. Client secrets are never
|
|
1831
|
+
* stored.
|
|
1832
|
+
*/
|
|
1833
|
+
export interface OAuthApplication {
|
|
1834
|
+
/** OAuth client identifier. */
|
|
1835
|
+
client_id: string;
|
|
1836
|
+
/** Interactive login method. Browser login uses Authorization Code with PKCE. */
|
|
1837
|
+
login_method?: "browser" | "device" | null;
|
|
1838
|
+
/** How a runtime-supplied client secret is sent for machine grants. */
|
|
1839
|
+
client_auth_method?: "post" | "basic" | null;
|
|
1840
|
+
/**
|
|
1841
|
+
* Loopback callback URL for browser login.
|
|
1842
|
+
* Format: uri
|
|
1600
1843
|
*/
|
|
1601
|
-
|
|
1844
|
+
redirect_uri?: string | null;
|
|
1845
|
+
/** Provider parameter used to request an organization during browser login. */
|
|
1846
|
+
organization_parameter?: "organization" | "organization_id" | null;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
/** Response shape for OAuthApplication. */
|
|
1850
|
+
export interface OAuthApplicationRead {
|
|
1851
|
+
/** OAuth client identifier. */
|
|
1852
|
+
client_id: string;
|
|
1853
|
+
/** Interactive login method. Browser login uses Authorization Code with PKCE. */
|
|
1854
|
+
login_method?: ("browser" | "device" | null) | (string & {}) | null;
|
|
1855
|
+
/** How a runtime-supplied client secret is sent for machine grants. */
|
|
1856
|
+
client_auth_method?: ("post" | "basic" | null) | (string & {}) | null;
|
|
1602
1857
|
/**
|
|
1603
|
-
*
|
|
1604
|
-
*
|
|
1858
|
+
* Loopback callback URL for browser login.
|
|
1859
|
+
* Format: uri
|
|
1860
|
+
*/
|
|
1861
|
+
redirect_uri?: string | null;
|
|
1862
|
+
/** Provider parameter used to request an organization during browser login. */
|
|
1863
|
+
organization_parameter?: ("organization" | "organization_id" | null) | (string & {}) | null;
|
|
1864
|
+
}
|
|
1865
|
+
|
|
1866
|
+
/**
|
|
1867
|
+
* Authenticated identity read used to verify a login before it is saved. Operation is auto-detected
|
|
1868
|
+
* when omitted. Requests must include at least one of subject_field, account_field, or
|
|
1869
|
+
* organization_field.
|
|
1870
|
+
*/
|
|
1871
|
+
export interface IdentityVerification {
|
|
1872
|
+
/** resource.method of a safe identity read with no required arguments. */
|
|
1873
|
+
operation?: string;
|
|
1874
|
+
/** JSON Pointer to the stable caller ID in the identity response. */
|
|
1875
|
+
subject_field?: string;
|
|
1876
|
+
/** JSON Pointer to the customer account ID. */
|
|
1877
|
+
account_field?: string;
|
|
1878
|
+
/** JSON Pointer to the customer organization ID. */
|
|
1879
|
+
organization_field?: string;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
/** OAuth application and request-value overrides for one named API environment. */
|
|
1883
|
+
export interface AuthenticationEnvironment {
|
|
1884
|
+
oauth_application?: string | null;
|
|
1885
|
+
scopes?: string[] | null;
|
|
1886
|
+
audience?: string | null;
|
|
1887
|
+
/** Format: uri */
|
|
1888
|
+
resource?: string | null;
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
/**
|
|
1892
|
+
* Public authentication defaults for generated clients and tools. Stored Projects own the OAuth
|
|
1893
|
+
* server, application catalog, and identity policy; stateless generation accepts the same shape for
|
|
1894
|
+
* one run. Runtime credentials and client secrets are never accepted.
|
|
1895
|
+
*/
|
|
1896
|
+
export interface AuthenticationConfig {
|
|
1897
|
+
oauth_server?: OAuthServer | null;
|
|
1898
|
+
/** OAuth applications keyed by a stable name. */
|
|
1899
|
+
oauth_applications?: Record<string, OAuthApplication> | null;
|
|
1900
|
+
/** Default OAuth application used by generated products. */
|
|
1901
|
+
oauth_application?: string | null;
|
|
1902
|
+
identity_verification?: IdentityVerification | null;
|
|
1903
|
+
/**
|
|
1904
|
+
* Base URL of a custom browser-approval backend implementing the start, status, and revoke
|
|
1905
|
+
* contract. Used only when OAuth is not configured.
|
|
1906
|
+
* Format: uri
|
|
1605
1907
|
*/
|
|
1606
|
-
|
|
1908
|
+
approval_url?: string | null;
|
|
1909
|
+
/** Authentication selections keyed by generated API environment name. */
|
|
1910
|
+
environments?: Record<string, AuthenticationEnvironment> | null;
|
|
1911
|
+
}
|
|
1912
|
+
|
|
1913
|
+
export interface TargetAuthenticationEnvironment {
|
|
1914
|
+
oauth_application?: string | null;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
/**
|
|
1918
|
+
* Selects a Project OAuth application for one Target. OAuth server metadata, applications, and
|
|
1919
|
+
* identity policy remain Project-owned.
|
|
1920
|
+
*/
|
|
1921
|
+
export interface TargetAuthenticationConfig {
|
|
1922
|
+
/** Project OAuth application to use. Omit to inherit the Project default. */
|
|
1923
|
+
oauth_application?: string | null;
|
|
1924
|
+
/** Project OAuth application selections keyed by API environment. */
|
|
1925
|
+
environments?: Record<string, TargetAuthenticationEnvironment> | null;
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
/** How the generated CLI behaves. Part of Config. */
|
|
1929
|
+
export interface CliBehavior {
|
|
1930
|
+
/** Command users run, independent of how the CLI is distributed. */
|
|
1931
|
+
command_name?: string | null;
|
|
1607
1932
|
/**
|
|
1608
1933
|
* Opt in to a once-a-day registry check that prints an upgrade hint. Off by default; generated
|
|
1609
1934
|
* code phones nobody unless this is enabled.
|
|
@@ -1614,11 +1939,6 @@ export interface CliBehavior {
|
|
|
1614
1939
|
* title and environment details.
|
|
1615
1940
|
*/
|
|
1616
1941
|
support_url?: string | null;
|
|
1617
|
-
/**
|
|
1618
|
-
* Base URL of the browser-approval endpoint pair used by CLI login. The CLI keeps the verifier
|
|
1619
|
-
* and receives the credential directly; no key is pasted through a conversation.
|
|
1620
|
-
*/
|
|
1621
|
-
auth_url?: string | null;
|
|
1622
1942
|
/**
|
|
1623
1943
|
* Hosted MCP endpoint installed by the generated CLI instead of launching the package's local
|
|
1624
1944
|
* stdio server.
|
|
@@ -1628,10 +1948,34 @@ export interface CliBehavior {
|
|
|
1628
1948
|
skills_repo?: string | null;
|
|
1629
1949
|
}
|
|
1630
1950
|
|
|
1631
|
-
/** How
|
|
1951
|
+
/** How generated MCP servers and the Typeship-hosted endpoint behave. Part of Config. */
|
|
1632
1952
|
export interface McpBehavior {
|
|
1633
1953
|
/** Stable official MCP registry name, independent of the server runtime. */
|
|
1634
1954
|
registry_name?: string | null;
|
|
1955
|
+
/**
|
|
1956
|
+
* Authorization for callers connecting to a generated MCP server deployed over HTTP. The hosting
|
|
1957
|
+
* application resolves upstream API credentials separately at runtime. This setting does not
|
|
1958
|
+
* apply to the Typeship-hosted endpoint.
|
|
1959
|
+
*/
|
|
1960
|
+
access?: {
|
|
1961
|
+
/**
|
|
1962
|
+
* Exact issuer allowed to sign MCP connection tokens.
|
|
1963
|
+
* Format: uri
|
|
1964
|
+
*/
|
|
1965
|
+
issuer: string;
|
|
1966
|
+
/**
|
|
1967
|
+
* Canonical public URL of the self-hosted MCP endpoint that connection tokens must target.
|
|
1968
|
+
* Format: uri
|
|
1969
|
+
*/
|
|
1970
|
+
resource: string;
|
|
1971
|
+
/**
|
|
1972
|
+
* Public signing-key endpoint. Omit to discover it from the issuer.
|
|
1973
|
+
* Format: uri
|
|
1974
|
+
*/
|
|
1975
|
+
jwks_url?: string;
|
|
1976
|
+
/** Minimum scopes required to connect to the self-hosted MCP server. */
|
|
1977
|
+
scopes?: string[];
|
|
1978
|
+
};
|
|
1635
1979
|
/**
|
|
1636
1980
|
* MCP tool shape. meta collapses per-operation tools into search_docs, read_docs, and execute so
|
|
1637
1981
|
* large APIs don't flood an agent's context window. Auto considers the serialized tool schemas,
|
|
@@ -1651,12 +1995,50 @@ export interface McpBehavior {
|
|
|
1651
1995
|
* match no operation are reported as generation warnings.
|
|
1652
1996
|
*/
|
|
1653
1997
|
tool_descriptions?: Record<string, string>;
|
|
1998
|
+
/**
|
|
1999
|
+
* Exact name-or-ID resolver overrides keyed first by the target operationId or "METHOD /path",
|
|
2000
|
+
* then by its wire argument name. A resolver names one read collection operation plus 1-4 item
|
|
2001
|
+
* fields to match case-insensitively; false opts that argument out of strict inference.
|
|
2002
|
+
*/
|
|
2003
|
+
reference_resolvers?: Record<string, Record<string, false
|
|
2004
|
+
| {
|
|
2005
|
+
/** OperationId, "METHOD /path", MCP tool name, or dotted resource.method of the list operation. */
|
|
2006
|
+
via: string;
|
|
2007
|
+
/** Item fields compared exactly and case-insensitively, such as name, slug, key, or email. */
|
|
2008
|
+
match: string[];
|
|
2009
|
+
/** Item field substituted into the requested argument. Defaults to id. */
|
|
2010
|
+
id?: string;
|
|
2011
|
+
}>>;
|
|
1654
2012
|
}
|
|
1655
2013
|
|
|
1656
2014
|
/** Response shape for McpBehavior. */
|
|
1657
2015
|
export interface McpBehaviorRead {
|
|
1658
2016
|
/** Stable official MCP registry name, independent of the server runtime. */
|
|
1659
2017
|
registry_name?: string | null;
|
|
2018
|
+
/**
|
|
2019
|
+
* Authorization for callers connecting to a generated MCP server deployed over HTTP. The hosting
|
|
2020
|
+
* application resolves upstream API credentials separately at runtime. This setting does not
|
|
2021
|
+
* apply to the Typeship-hosted endpoint.
|
|
2022
|
+
*/
|
|
2023
|
+
access?: {
|
|
2024
|
+
/**
|
|
2025
|
+
* Exact issuer allowed to sign MCP connection tokens.
|
|
2026
|
+
* Format: uri
|
|
2027
|
+
*/
|
|
2028
|
+
issuer: string;
|
|
2029
|
+
/**
|
|
2030
|
+
* Canonical public URL of the self-hosted MCP endpoint that connection tokens must target.
|
|
2031
|
+
* Format: uri
|
|
2032
|
+
*/
|
|
2033
|
+
resource: string;
|
|
2034
|
+
/**
|
|
2035
|
+
* Public signing-key endpoint. Omit to discover it from the issuer.
|
|
2036
|
+
* Format: uri
|
|
2037
|
+
*/
|
|
2038
|
+
jwks_url?: string;
|
|
2039
|
+
/** Minimum scopes required to connect to the self-hosted MCP server. */
|
|
2040
|
+
scopes?: string[];
|
|
2041
|
+
};
|
|
1660
2042
|
/**
|
|
1661
2043
|
* MCP tool shape. meta collapses per-operation tools into search_docs, read_docs, and execute so
|
|
1662
2044
|
* large APIs don't flood an agent's context window. Auto considers the serialized tool schemas,
|
|
@@ -1676,6 +2058,30 @@ export interface McpBehaviorRead {
|
|
|
1676
2058
|
* match no operation are reported as generation warnings.
|
|
1677
2059
|
*/
|
|
1678
2060
|
tool_descriptions?: Record<string, string>;
|
|
2061
|
+
/**
|
|
2062
|
+
* Exact name-or-ID resolver overrides keyed first by the target operationId or "METHOD /path",
|
|
2063
|
+
* then by its wire argument name. A resolver names one read collection operation plus 1-4 item
|
|
2064
|
+
* fields to match case-insensitively; false opts that argument out of strict inference.
|
|
2065
|
+
*/
|
|
2066
|
+
reference_resolvers?: Record<string, Record<string, false | (string & {})
|
|
2067
|
+
| {
|
|
2068
|
+
/** OperationId, "METHOD /path", MCP tool name, or dotted resource.method of the list operation. */
|
|
2069
|
+
via: string;
|
|
2070
|
+
/** Item fields compared exactly and case-insensitively, such as name, slug, key, or email. */
|
|
2071
|
+
match: string[];
|
|
2072
|
+
/** Item field substituted into the requested argument. Defaults to id. */
|
|
2073
|
+
id?: string;
|
|
2074
|
+
}>>;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
/** Generated README behavior. Part of Config. */
|
|
2078
|
+
export interface ReadmeBehavior {
|
|
2079
|
+
/**
|
|
2080
|
+
* operationId or "METHOD /path" to feature as the README's first API call. It must be present in
|
|
2081
|
+
* the generated package and callable with no required input beyond path placeholders. Missing or
|
|
2082
|
+
* unsuitable choices produce a warning and use the automatic example.
|
|
2083
|
+
*/
|
|
2084
|
+
quickstart_operation?: string | null;
|
|
1679
2085
|
}
|
|
1680
2086
|
|
|
1681
2087
|
/**
|
|
@@ -1700,7 +2106,7 @@ export interface PackageBehavior {
|
|
|
1700
2106
|
|
|
1701
2107
|
/**
|
|
1702
2108
|
* Everything Typeship needs beyond the Definition, in one object: generation customization
|
|
1703
|
-
* (globals, retries, pagination) and how the generated tooling behaves (cli, mcp, package,
|
|
2109
|
+
* (globals, retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package,
|
|
1704
2110
|
* docs_url). Plain configuration. Typeship never requires vendor extensions inside the Definition
|
|
1705
2111
|
* itself. Stateless generation also accepts GraphQL settings here; stored projects keep those
|
|
1706
2112
|
* settings on their Definition.
|
|
@@ -1719,8 +2125,10 @@ export interface Config {
|
|
|
1719
2125
|
*/
|
|
1720
2126
|
pagination?: Record<string, PaginationRule | boolean>;
|
|
1721
2127
|
graphql?: GraphqlSettings;
|
|
2128
|
+
auth?: AuthenticationConfig;
|
|
1722
2129
|
cli?: CliBehavior;
|
|
1723
2130
|
mcp?: McpBehavior;
|
|
2131
|
+
readme?: ReadmeBehavior;
|
|
1724
2132
|
package?: PackageBehavior;
|
|
1725
2133
|
/**
|
|
1726
2134
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
@@ -1750,8 +2158,10 @@ export interface ConfigRead {
|
|
|
1750
2158
|
*/
|
|
1751
2159
|
pagination?: Record<string, PaginationRuleRead | boolean>;
|
|
1752
2160
|
graphql?: GraphqlSettingsRead;
|
|
2161
|
+
auth?: AuthenticationConfig;
|
|
1753
2162
|
cli?: CliBehavior;
|
|
1754
2163
|
mcp?: McpBehaviorRead;
|
|
2164
|
+
readme?: ReadmeBehavior;
|
|
1755
2165
|
package?: PackageBehavior;
|
|
1756
2166
|
/**
|
|
1757
2167
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
@@ -1769,8 +2179,8 @@ export interface ConfigRead {
|
|
|
1769
2179
|
/**
|
|
1770
2180
|
* Shared generated-client and tooling behavior for a stored Project. Every Target inherits these
|
|
1771
2181
|
* defaults. Target.config is merged over them for one Target; top-level values replace defaults
|
|
1772
|
-
* while cli, mcp, and package merge by field. GraphQL-only source settings live on
|
|
1773
|
-
* Definition and are rejected in both stored config scopes.
|
|
2182
|
+
* while cli, mcp, auth, readme, and package merge by field. GraphQL-only source settings live on
|
|
2183
|
+
* the Project's Definition and are rejected in both stored config scopes.
|
|
1774
2184
|
*/
|
|
1775
2185
|
export interface ProjectConfig {
|
|
1776
2186
|
/**
|
|
@@ -1785,8 +2195,10 @@ export interface ProjectConfig {
|
|
|
1785
2195
|
* reported as generation warnings.
|
|
1786
2196
|
*/
|
|
1787
2197
|
pagination?: Record<string, PaginationRule | boolean>;
|
|
2198
|
+
auth?: AuthenticationConfig;
|
|
1788
2199
|
cli?: CliBehavior;
|
|
1789
2200
|
mcp?: McpBehavior;
|
|
2201
|
+
readme?: ReadmeBehavior;
|
|
1790
2202
|
package?: PackageBehavior;
|
|
1791
2203
|
/**
|
|
1792
2204
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
@@ -1815,8 +2227,10 @@ export interface ProjectConfigRead {
|
|
|
1815
2227
|
* reported as generation warnings.
|
|
1816
2228
|
*/
|
|
1817
2229
|
pagination?: Record<string, PaginationRuleRead | boolean>;
|
|
2230
|
+
auth?: AuthenticationConfig;
|
|
1818
2231
|
cli?: CliBehavior;
|
|
1819
2232
|
mcp?: McpBehaviorRead;
|
|
2233
|
+
readme?: ReadmeBehavior;
|
|
1820
2234
|
package?: PackageBehavior;
|
|
1821
2235
|
/**
|
|
1822
2236
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
@@ -1831,6 +2245,42 @@ export interface ProjectConfigRead {
|
|
|
1831
2245
|
docs_index_url?: string | null;
|
|
1832
2246
|
}
|
|
1833
2247
|
|
|
2248
|
+
/**
|
|
2249
|
+
* Target-specific generation and delivery overrides. Authentication may only select a Project-owned
|
|
2250
|
+
* OAuth application. OAuth server metadata, applications, and identity policy remain Project-owned.
|
|
2251
|
+
* Self-hosted MCP access may be overridden for a Target-specific deployment.
|
|
2252
|
+
*/
|
|
2253
|
+
export interface TargetConfig {
|
|
2254
|
+
globals?: string[];
|
|
2255
|
+
retries?: RetryTuning;
|
|
2256
|
+
pagination?: Record<string, PaginationRule | boolean>;
|
|
2257
|
+
auth?: TargetAuthenticationConfig;
|
|
2258
|
+
cli?: CliBehavior;
|
|
2259
|
+
mcp?: McpBehavior;
|
|
2260
|
+
readme?: ReadmeBehavior;
|
|
2261
|
+
package?: PackageBehavior;
|
|
2262
|
+
/** Format: uri */
|
|
2263
|
+
docs_url?: string | null;
|
|
2264
|
+
/** Format: uri */
|
|
2265
|
+
docs_index_url?: string | null;
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
/** Response shape for TargetConfig. */
|
|
2269
|
+
export interface TargetConfigRead {
|
|
2270
|
+
globals?: string[];
|
|
2271
|
+
retries?: RetryTuning;
|
|
2272
|
+
pagination?: Record<string, PaginationRuleRead | boolean>;
|
|
2273
|
+
auth?: TargetAuthenticationConfig;
|
|
2274
|
+
cli?: CliBehavior;
|
|
2275
|
+
mcp?: McpBehaviorRead;
|
|
2276
|
+
readme?: ReadmeBehavior;
|
|
2277
|
+
package?: PackageBehavior;
|
|
2278
|
+
/** Format: uri */
|
|
2279
|
+
docs_url?: string | null;
|
|
2280
|
+
/** Format: uri */
|
|
2281
|
+
docs_index_url?: string | null;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
1834
2284
|
/** What a GraphQL schema cannot say about itself. Ignored for OpenAPI specs. */
|
|
1835
2285
|
export interface GraphqlSettings {
|
|
1836
2286
|
/**
|
|
@@ -1964,6 +2414,38 @@ export interface FileStub {
|
|
|
1964
2414
|
bytes: number;
|
|
1965
2415
|
}
|
|
1966
2416
|
|
|
2417
|
+
export const GenerationStatus = {
|
|
2418
|
+
SUCCEEDED: "succeeded",
|
|
2419
|
+
FAILED: "failed",
|
|
2420
|
+
} as const;
|
|
2421
|
+
export type GenerationStatus = (typeof GenerationStatus)[keyof typeof GenerationStatus];
|
|
2422
|
+
|
|
2423
|
+
export const GenerationTrigger = {
|
|
2424
|
+
MANUAL: "manual",
|
|
2425
|
+
WEBHOOK: "webhook",
|
|
2426
|
+
POLL: "poll",
|
|
2427
|
+
PREVIEW: "preview",
|
|
2428
|
+
} as const;
|
|
2429
|
+
export type GenerationTrigger = (typeof GenerationTrigger)[keyof typeof GenerationTrigger];
|
|
2430
|
+
|
|
2431
|
+
export interface GenerationProvenance {
|
|
2432
|
+
/** Pinned generator contract edition. */
|
|
2433
|
+
generator_edition: string;
|
|
2434
|
+
/** Exact engine build identifier used for replay and support. */
|
|
2435
|
+
engine_build: string;
|
|
2436
|
+
/**
|
|
2437
|
+
* Immutable effective Target configuration used by this run; source credentials are never
|
|
2438
|
+
* included.
|
|
2439
|
+
*/
|
|
2440
|
+
resolved_config: Record<string, unknown> | null;
|
|
2441
|
+
config_hash: string | null;
|
|
2442
|
+
/** Resolved generator and entitlement plan used to select the emitted public surface. */
|
|
2443
|
+
surface_plan: Record<string, unknown> | null;
|
|
2444
|
+
surface_plan_hash: string | null;
|
|
2445
|
+
entitlement_cap: number | null;
|
|
2446
|
+
package_version: string | null;
|
|
2447
|
+
}
|
|
2448
|
+
|
|
1967
2449
|
export interface Generation {
|
|
1968
2450
|
id: GenerationId;
|
|
1969
2451
|
object: "generation";
|
|
@@ -1975,29 +2457,13 @@ export interface Generation {
|
|
|
1975
2457
|
files_index?: FileStub[];
|
|
1976
2458
|
project_id: ProjectId;
|
|
1977
2459
|
definition_revision_id: DefinitionRevisionId | null;
|
|
1978
|
-
status:
|
|
1979
|
-
trigger:
|
|
2460
|
+
status: GenerationStatus;
|
|
2461
|
+
trigger: GenerationTrigger;
|
|
1980
2462
|
/** Persisted Target identity. Null only for stateless generation. */
|
|
1981
2463
|
target_id: TargetId | null;
|
|
1982
2464
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
1983
2465
|
generator: GeneratorKind;
|
|
1984
|
-
provenance:
|
|
1985
|
-
/** Pinned generator contract edition. */
|
|
1986
|
-
generator_edition: string;
|
|
1987
|
-
/** Exact engine build identifier used for replay and support. */
|
|
1988
|
-
engine_build: string;
|
|
1989
|
-
/**
|
|
1990
|
-
* Immutable effective Target configuration used by this run; source credentials are never
|
|
1991
|
-
* included.
|
|
1992
|
-
*/
|
|
1993
|
-
resolved_config: Record<string, unknown> | null;
|
|
1994
|
-
config_hash: string | null;
|
|
1995
|
-
/** Resolved generator and entitlement plan used to select the emitted public surface. */
|
|
1996
|
-
surface_plan: Record<string, unknown> | null;
|
|
1997
|
-
surface_plan_hash: string | null;
|
|
1998
|
-
entitlement_cap: number | null;
|
|
1999
|
-
package_version: string | null;
|
|
2000
|
-
};
|
|
2466
|
+
provenance: GenerationProvenance;
|
|
2001
2467
|
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2002
2468
|
meta: GenerationMeta | null;
|
|
2003
2469
|
warnings: string[];
|
|
@@ -2020,29 +2486,13 @@ export interface GenerationWrite {
|
|
|
2020
2486
|
files_index?: FileStub[];
|
|
2021
2487
|
project_id: ProjectId;
|
|
2022
2488
|
definition_revision_id: DefinitionRevisionId | null;
|
|
2023
|
-
status:
|
|
2024
|
-
trigger:
|
|
2489
|
+
status: GenerationStatus;
|
|
2490
|
+
trigger: GenerationTrigger;
|
|
2025
2491
|
/** Persisted Target identity. Null only for stateless generation. */
|
|
2026
2492
|
target_id: TargetId | null;
|
|
2027
2493
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2028
2494
|
generator: GeneratorKind;
|
|
2029
|
-
provenance:
|
|
2030
|
-
/** Pinned generator contract edition. */
|
|
2031
|
-
generator_edition: string;
|
|
2032
|
-
/** Exact engine build identifier used for replay and support. */
|
|
2033
|
-
engine_build: string;
|
|
2034
|
-
/**
|
|
2035
|
-
* Immutable effective Target configuration used by this run; source credentials are never
|
|
2036
|
-
* included.
|
|
2037
|
-
*/
|
|
2038
|
-
resolved_config: Record<string, unknown> | null;
|
|
2039
|
-
config_hash: string | null;
|
|
2040
|
-
/** Resolved generator and entitlement plan used to select the emitted public surface. */
|
|
2041
|
-
surface_plan: Record<string, unknown> | null;
|
|
2042
|
-
surface_plan_hash: string | null;
|
|
2043
|
-
entitlement_cap: number | null;
|
|
2044
|
-
package_version: string | null;
|
|
2045
|
-
};
|
|
2495
|
+
provenance: GenerationProvenance;
|
|
2046
2496
|
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2047
2497
|
meta: GenerationMeta | null;
|
|
2048
2498
|
warnings: string[];
|
|
@@ -2066,29 +2516,13 @@ export interface GenerationRead {
|
|
|
2066
2516
|
files_index?: FileStub[];
|
|
2067
2517
|
project_id: ProjectId;
|
|
2068
2518
|
definition_revision_id: DefinitionRevisionId | null;
|
|
2069
|
-
status:
|
|
2070
|
-
trigger:
|
|
2519
|
+
status: GenerationStatus | (string & {});
|
|
2520
|
+
trigger: GenerationTrigger | (string & {});
|
|
2071
2521
|
/** Persisted Target identity. Null only for stateless generation. */
|
|
2072
2522
|
target_id: TargetId | null;
|
|
2073
2523
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2074
2524
|
generator: GeneratorKind | (string & {});
|
|
2075
|
-
provenance:
|
|
2076
|
-
/** Pinned generator contract edition. */
|
|
2077
|
-
generator_edition: string;
|
|
2078
|
-
/** Exact engine build identifier used for replay and support. */
|
|
2079
|
-
engine_build: string;
|
|
2080
|
-
/**
|
|
2081
|
-
* Immutable effective Target configuration used by this run; source credentials are never
|
|
2082
|
-
* included.
|
|
2083
|
-
*/
|
|
2084
|
-
resolved_config: Record<string, unknown> | null;
|
|
2085
|
-
config_hash: string | null;
|
|
2086
|
-
/** Resolved generator and entitlement plan used to select the emitted public surface. */
|
|
2087
|
-
surface_plan: Record<string, unknown> | null;
|
|
2088
|
-
surface_plan_hash: string | null;
|
|
2089
|
-
entitlement_cap: number | null;
|
|
2090
|
-
package_version: string | null;
|
|
2091
|
-
};
|
|
2525
|
+
provenance: GenerationProvenance;
|
|
2092
2526
|
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2093
2527
|
meta: GenerationMetaRead | null;
|
|
2094
2528
|
warnings: string[];
|
|
@@ -2100,6 +2534,71 @@ export interface GenerationRead {
|
|
|
2100
2534
|
request_id?: RequestId;
|
|
2101
2535
|
}
|
|
2102
2536
|
|
|
2537
|
+
/**
|
|
2538
|
+
* Generation metadata returned by collection endpoints. Generated file contents and file indexes
|
|
2539
|
+
* are available only from retrieve and create operations.
|
|
2540
|
+
*/
|
|
2541
|
+
export interface GenerationSummary {
|
|
2542
|
+
id: GenerationId;
|
|
2543
|
+
object: "generation";
|
|
2544
|
+
project_id: ProjectId;
|
|
2545
|
+
definition_revision_id: DefinitionRevisionId | null;
|
|
2546
|
+
status: GenerationStatus;
|
|
2547
|
+
trigger: GenerationTrigger;
|
|
2548
|
+
/** Persisted Target identity. Null only for stateless generation. */
|
|
2549
|
+
target_id: TargetId | null;
|
|
2550
|
+
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2551
|
+
generator: GeneratorKind;
|
|
2552
|
+
provenance: GenerationProvenance;
|
|
2553
|
+
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2554
|
+
meta: GenerationMeta | null;
|
|
2555
|
+
warnings: string[];
|
|
2556
|
+
error: string | null;
|
|
2557
|
+
/** Format: date-time */
|
|
2558
|
+
created_at: string;
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
/** Request shape for GenerationSummary. */
|
|
2562
|
+
export interface GenerationSummaryWrite {
|
|
2563
|
+
id: GenerationId;
|
|
2564
|
+
project_id: ProjectId;
|
|
2565
|
+
definition_revision_id: DefinitionRevisionId | null;
|
|
2566
|
+
status: GenerationStatus;
|
|
2567
|
+
trigger: GenerationTrigger;
|
|
2568
|
+
/** Persisted Target identity. Null only for stateless generation. */
|
|
2569
|
+
target_id: TargetId | null;
|
|
2570
|
+
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2571
|
+
generator: GeneratorKind;
|
|
2572
|
+
provenance: GenerationProvenance;
|
|
2573
|
+
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2574
|
+
meta: GenerationMeta | null;
|
|
2575
|
+
warnings: string[];
|
|
2576
|
+
error: string | null;
|
|
2577
|
+
/** Format: date-time */
|
|
2578
|
+
created_at: string;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
/** Response shape for GenerationSummary. */
|
|
2582
|
+
export interface GenerationSummaryRead {
|
|
2583
|
+
id: GenerationId;
|
|
2584
|
+
object: "generation" | (string & {});
|
|
2585
|
+
project_id: ProjectId;
|
|
2586
|
+
definition_revision_id: DefinitionRevisionId | null;
|
|
2587
|
+
status: GenerationStatus | (string & {});
|
|
2588
|
+
trigger: GenerationTrigger | (string & {});
|
|
2589
|
+
/** Persisted Target identity. Null only for stateless generation. */
|
|
2590
|
+
target_id: TargetId | null;
|
|
2591
|
+
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2592
|
+
generator: GeneratorKind | (string & {});
|
|
2593
|
+
provenance: GenerationProvenance;
|
|
2594
|
+
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2595
|
+
meta: GenerationMetaRead | null;
|
|
2596
|
+
warnings: string[];
|
|
2597
|
+
error: string | null;
|
|
2598
|
+
/** Format: date-time */
|
|
2599
|
+
created_at: string;
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2103
2602
|
export type GenerationResponse = Generation & ResponseMetadata;
|
|
2104
2603
|
|
|
2105
2604
|
/** Request shape for GenerationResponse. */
|
|
@@ -2124,20 +2623,24 @@ export interface GenerationFailureRead {
|
|
|
2124
2623
|
error: string;
|
|
2125
2624
|
}
|
|
2126
2625
|
|
|
2626
|
+
/**
|
|
2627
|
+
* Metadata for each Target generation attempted by a Project run. Retrieve one Generation
|
|
2628
|
+
* separately for generated files.
|
|
2629
|
+
*/
|
|
2127
2630
|
export interface GenerationBatch {
|
|
2128
|
-
data: Array<
|
|
2631
|
+
data: Array<GenerationSummary | GenerationFailure>;
|
|
2129
2632
|
request_id: RequestId;
|
|
2130
2633
|
}
|
|
2131
2634
|
|
|
2132
2635
|
/** Request shape for GenerationBatch. */
|
|
2133
2636
|
export interface GenerationBatchWrite {
|
|
2134
|
-
data: Array<
|
|
2637
|
+
data: Array<GenerationSummaryWrite | GenerationFailure>;
|
|
2135
2638
|
request_id: RequestId;
|
|
2136
2639
|
}
|
|
2137
2640
|
|
|
2138
2641
|
/** Response shape for GenerationBatch. */
|
|
2139
2642
|
export interface GenerationBatchRead {
|
|
2140
|
-
data: Array<
|
|
2643
|
+
data: Array<GenerationSummaryRead | GenerationFailureRead>;
|
|
2141
2644
|
request_id: RequestId;
|
|
2142
2645
|
}
|
|
2143
2646
|
|
|
@@ -2306,7 +2809,7 @@ export interface ProjectListRead {
|
|
|
2306
2809
|
|
|
2307
2810
|
export interface GenerationList {
|
|
2308
2811
|
object: ListObject;
|
|
2309
|
-
data:
|
|
2812
|
+
data: GenerationSummary[];
|
|
2310
2813
|
/** Whether another page is available after this one. */
|
|
2311
2814
|
has_more: boolean;
|
|
2312
2815
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
@@ -2317,7 +2820,7 @@ export interface GenerationList {
|
|
|
2317
2820
|
/** Request shape for GenerationList. */
|
|
2318
2821
|
export interface GenerationListWrite {
|
|
2319
2822
|
object: ListObject;
|
|
2320
|
-
data:
|
|
2823
|
+
data: GenerationSummaryWrite[];
|
|
2321
2824
|
/** Whether another page is available after this one. */
|
|
2322
2825
|
has_more: boolean;
|
|
2323
2826
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
@@ -2328,7 +2831,7 @@ export interface GenerationListWrite {
|
|
|
2328
2831
|
/** Response shape for GenerationList. */
|
|
2329
2832
|
export interface GenerationListRead {
|
|
2330
2833
|
object: ListObject;
|
|
2331
|
-
data:
|
|
2834
|
+
data: GenerationSummaryRead[];
|
|
2332
2835
|
/** Whether another page is available after this one. */
|
|
2333
2836
|
has_more: boolean;
|
|
2334
2837
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
@@ -2433,6 +2936,20 @@ export const ErrorCode = {
|
|
|
2433
2936
|
FETCH_ERROR: "fetch_error",
|
|
2434
2937
|
REPOSITORY_PROVIDER_UNSUPPORTED: "repository_provider_unsupported",
|
|
2435
2938
|
EDITION_UNAVAILABLE: "edition_unavailable",
|
|
2939
|
+
TARGET_BUSY: "target_busy",
|
|
2940
|
+
INVALID_VERSION: "invalid_version",
|
|
2941
|
+
STALE_RELEASE_REVISION: "stale_release_revision",
|
|
2942
|
+
VERSION_OCCUPIED: "version_occupied",
|
|
2943
|
+
VERSION_TOO_LOW: "version_too_low",
|
|
2944
|
+
RELEASE_ANALYSIS_STALE: "release_analysis_stale",
|
|
2945
|
+
TARGET_ALREADY_RELEASED: "target_already_released",
|
|
2946
|
+
ADOPTION_UNVERIFIED: "adoption_unverified",
|
|
2947
|
+
PUBLICATION_DISABLED: "publication_disabled",
|
|
2948
|
+
PUBLICATION_NOT_RETRYABLE: "publication_not_retryable",
|
|
2949
|
+
PUBLICATION_RECOVERY_UNAVAILABLE: "publication_recovery_unavailable",
|
|
2950
|
+
PUBLICATION_DISPATCH_FAILED: "publication_dispatch_failed",
|
|
2951
|
+
REPOSITORY_DISCONNECTED: "repository_disconnected",
|
|
2952
|
+
REGENERATION_FAILED: "regeneration_failed",
|
|
2436
2953
|
DELIVERY_CONFLICT: "delivery_conflict",
|
|
2437
2954
|
RESOURCE_HAS_DEPENDENCIES: "resource_has_dependencies",
|
|
2438
2955
|
PLAN_LIMIT_REACHED: "plan_limit_reached",
|