@typeship-ax/mcp 0.9.1 → 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 +1 -1
- package/README.md +1 -1
- package/api.json +1510 -23
- package/api.md +1526 -22
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/mcp.js +1 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +12 -8
- package/dist/resources/targets.d.ts +65 -2
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +113 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +19 -6
- package/dist/types.d.ts +217 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +13 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/index.ts +3 -3
- package/src/mcp.ts +1 -1
- package/src/ops.ts +12 -8
- package/src/resources/targets.ts +209 -0
- package/src/schemas.ts +19 -6
- package/src/types.ts +236 -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 */
|
|
@@ -1035,8 +1087,17 @@ 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.
|
|
@@ -1066,8 +1127,17 @@ export interface TargetRead {
|
|
|
1066
1127
|
mode: "reviewed_semver" | (string & {});
|
|
1067
1128
|
pre1_breaking: "minor" | (string & {});
|
|
1068
1129
|
};
|
|
1069
|
-
|
|
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;
|
|
1070
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;
|
|
1071
1141
|
/**
|
|
1072
1142
|
* Target-specific overrides merged over Project.config. GraphQL settings are Definition-owned and
|
|
1073
1143
|
* never appear here.
|
|
@@ -1108,7 +1178,9 @@ export interface TargetRelease {
|
|
|
1108
1178
|
id: TargetReleaseId;
|
|
1109
1179
|
object: "target_release";
|
|
1110
1180
|
target_id: TargetId;
|
|
1111
|
-
|
|
1181
|
+
/** Null only for a verified release imported during package adoption. */
|
|
1182
|
+
generation_id: GenerationId | null;
|
|
1183
|
+
origin: "typeship" | "imported";
|
|
1112
1184
|
/** Immutable package version released from this Target. */
|
|
1113
1185
|
version: string;
|
|
1114
1186
|
channel: "stable" | "prerelease";
|
|
@@ -1118,6 +1190,16 @@ export interface TargetRelease {
|
|
|
1118
1190
|
definition_revision_id: DefinitionRevisionId | null;
|
|
1119
1191
|
/** Immutable provider-native revision that was merged or published. */
|
|
1120
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[];
|
|
1121
1203
|
/** Format: date-time */
|
|
1122
1204
|
created_at: string;
|
|
1123
1205
|
request_id?: RequestId;
|
|
@@ -1128,7 +1210,9 @@ export interface TargetReleaseRead {
|
|
|
1128
1210
|
id: TargetReleaseId;
|
|
1129
1211
|
object: "target_release" | (string & {});
|
|
1130
1212
|
target_id: TargetId;
|
|
1131
|
-
|
|
1213
|
+
/** Null only for a verified release imported during package adoption. */
|
|
1214
|
+
generation_id: GenerationId | null;
|
|
1215
|
+
origin: ("typeship" | "imported") | (string & {});
|
|
1132
1216
|
/** Immutable package version released from this Target. */
|
|
1133
1217
|
version: string;
|
|
1134
1218
|
channel: ("stable" | "prerelease") | (string & {});
|
|
@@ -1138,6 +1222,16 @@ export interface TargetReleaseRead {
|
|
|
1138
1222
|
definition_revision_id: DefinitionRevisionId | null;
|
|
1139
1223
|
/** Immutable provider-native revision that was merged or published. */
|
|
1140
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[];
|
|
1141
1235
|
/** Format: date-time */
|
|
1142
1236
|
created_at: string;
|
|
1143
1237
|
request_id?: RequestId;
|
|
@@ -1165,6 +1259,131 @@ export interface TargetReleaseListRead {
|
|
|
1165
1259
|
request_id: RequestId;
|
|
1166
1260
|
}
|
|
1167
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
|
+
|
|
1168
1387
|
export interface RepositoryHealthIssue {
|
|
1169
1388
|
code: "connection_missing"
|
|
1170
1389
|
| "definition_unreadable"
|
|
@@ -2718,6 +2937,19 @@ export const ErrorCode = {
|
|
|
2718
2937
|
REPOSITORY_PROVIDER_UNSUPPORTED: "repository_provider_unsupported",
|
|
2719
2938
|
EDITION_UNAVAILABLE: "edition_unavailable",
|
|
2720
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",
|
|
2721
2953
|
DELIVERY_CONFLICT: "delivery_conflict",
|
|
2722
2954
|
RESOURCE_HAS_DEPENDENCIES: "resource_has_dependencies",
|
|
2723
2955
|
PLAN_LIMIT_REACHED: "plan_limit_reached",
|