semantifold 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/README.md +11 -5
- package/bin/semantifold.js +6 -0
- package/build/bin/semantifold.d.ts +3 -0
- package/build/bin/semantifold.d.ts.map +1 -0
- package/build/bin/semantifold.js +5 -0
- package/build/index.d.ts +9 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +10 -1
- package/build/src/artifact-path.d.ts +16 -0
- package/build/src/artifact-path.d.ts.map +1 -1
- package/build/src/artifact-path.js +29 -3
- package/build/src/backends/c-check.d.ts +7 -0
- package/build/src/backends/c-check.d.ts.map +1 -0
- package/build/src/backends/c-check.js +65 -0
- package/build/src/backends/check-plan.d.ts +96 -0
- package/build/src/backends/check-plan.d.ts.map +1 -0
- package/build/src/backends/check-plan.js +135 -0
- package/build/src/backends/cpp-check.d.ts +7 -0
- package/build/src/backends/cpp-check.d.ts.map +1 -0
- package/build/src/backends/cpp-check.js +59 -0
- package/build/src/backends/csharp-check.d.ts +7 -0
- package/build/src/backends/csharp-check.d.ts.map +1 -0
- package/build/src/backends/csharp-check.js +125 -0
- package/build/src/backends/csharp.d.ts +1 -0
- package/build/src/backends/csharp.d.ts.map +1 -1
- package/build/src/backends/csharp.js +5 -4
- package/build/src/backends/dart-check.d.ts +7 -0
- package/build/src/backends/dart-check.d.ts.map +1 -0
- package/build/src/backends/dart-check.js +103 -0
- package/build/src/backends/dart.d.ts +2 -0
- package/build/src/backends/dart.d.ts.map +1 -1
- package/build/src/backends/dart.js +5 -5
- package/build/src/backends/go-check.d.ts +7 -0
- package/build/src/backends/go-check.d.ts.map +1 -0
- package/build/src/backends/go-check.js +77 -0
- package/build/src/backends/go.d.ts +1 -0
- package/build/src/backends/go.d.ts.map +1 -1
- package/build/src/backends/go.js +3 -3
- package/build/src/backends/java-check.d.ts +21 -0
- package/build/src/backends/java-check.d.ts.map +1 -0
- package/build/src/backends/java-check.js +73 -0
- package/build/src/backends/javascript-check.d.ts +7 -0
- package/build/src/backends/javascript-check.d.ts.map +1 -0
- package/build/src/backends/javascript-check.js +29 -0
- package/build/src/backends/kotlin-check.d.ts +7 -0
- package/build/src/backends/kotlin-check.d.ts.map +1 -0
- package/build/src/backends/kotlin-check.js +31 -0
- package/build/src/backends/php-check.d.ts +7 -0
- package/build/src/backends/php-check.d.ts.map +1 -0
- package/build/src/backends/php-check.js +21 -0
- package/build/src/backends/program.d.ts +7 -0
- package/build/src/backends/program.d.ts.map +1 -1
- package/build/src/backends/program.js +16 -1
- package/build/src/backends/python-check.d.ts +7 -0
- package/build/src/backends/python-check.d.ts.map +1 -0
- package/build/src/backends/python-check.js +28 -0
- package/build/src/backends/ruby-check.d.ts +7 -0
- package/build/src/backends/ruby-check.d.ts.map +1 -0
- package/build/src/backends/ruby-check.js +21 -0
- package/build/src/backends/rust-check.d.ts +7 -0
- package/build/src/backends/rust-check.d.ts.map +1 -0
- package/build/src/backends/rust-check.js +65 -0
- package/build/src/backends/swift-check.d.ts +7 -0
- package/build/src/backends/swift-check.d.ts.map +1 -0
- package/build/src/backends/swift-check.js +77 -0
- package/build/src/backends/typescript-check.d.ts +7 -0
- package/build/src/backends/typescript-check.d.ts.map +1 -0
- package/build/src/backends/typescript-check.js +33 -0
- package/build/src/backends/zig-check.d.ts +7 -0
- package/build/src/backends/zig-check.d.ts.map +1 -0
- package/build/src/backends/zig-check.js +70 -0
- package/build/src/diagnostic.d.ts +13 -1
- package/build/src/diagnostic.d.ts.map +1 -1
- package/build/src/diagnostic.js +14 -2
- package/build/src/frontends/program.d.ts +6 -0
- package/build/src/frontends/program.d.ts.map +1 -1
- package/build/src/frontends/program.js +9 -1
- package/build/src/language-registry.d.ts +54 -0
- package/build/src/language-registry.d.ts.map +1 -1
- package/build/src/language-registry.js +107 -5
- package/build/src/project-build.d.ts +172 -0
- package/build/src/project-build.d.ts.map +1 -0
- package/build/src/project-build.js +320 -0
- package/build/src/project-cli.d.ts +40 -0
- package/build/src/project-cli.d.ts.map +1 -0
- package/build/src/project-cli.js +145 -0
- package/build/src/project-manifest.d.ts +148 -0
- package/build/src/project-manifest.d.ts.map +1 -0
- package/build/src/project-manifest.js +432 -0
- package/build/src/project-reporter.d.ts +81 -0
- package/build/src/project-reporter.d.ts.map +1 -0
- package/build/src/project-reporter.js +293 -0
- package/build/src/project-snapshot.d.ts +129 -0
- package/build/src/project-snapshot.d.ts.map +1 -0
- package/build/src/project-snapshot.js +362 -0
- package/build/src/project-watch-reporter.d.ts +125 -0
- package/build/src/project-watch-reporter.d.ts.map +1 -0
- package/build/src/project-watch-reporter.js +280 -0
- package/build/src/project-watch.d.ts +133 -0
- package/build/src/project-watch.d.ts.map +1 -0
- package/build/src/project-watch.js +839 -0
- package/build/src/publication.d.ts +218 -0
- package/build/src/publication.d.ts.map +1 -0
- package/build/src/publication.js +1832 -0
- package/build/src/semantic/types.d.ts +613 -0
- package/build/src/semantic/types.d.ts.map +1 -1
- package/build/src/semantic/types.js +163 -1
- package/build/src/subprocess.d.ts +8 -0
- package/build/src/subprocess.d.ts.map +1 -1
- package/build/src/subprocess.js +50 -9
- package/build/src/target-check.d.ts +52 -0
- package/build/src/target-check.d.ts.map +1 -0
- package/build/src/target-check.js +796 -0
- package/build/src/toolchains.d.ts.map +1 -1
- package/build/src/toolchains.js +3 -3
- package/docs/architecture.md +3 -1
- package/docs/c.md +4 -0
- package/docs/cpp.md +4 -0
- package/docs/dart.md +4 -0
- package/docs/generated-artifact-publication.md +98 -0
- package/docs/kotlin.md +2 -2
- package/docs/language-support.md +29 -3
- package/docs/project-build-cli.md +147 -0
- package/docs/project-watch.md +60 -0
- package/docs/rust.md +4 -0
- package/docs/swift.md +2 -0
- package/docs/testing.md +70 -3
- package/docs/watch-build-pipeline.md +42 -26
- package/docs/zig.md +2 -0
- package/examples/jsdoc-java-watch/expected-output.txt +3 -0
- package/examples/jsdoc-java-watch/semantifold.json +23 -0
- package/examples/jsdoc-java-watch/src/main.js +21 -0
- package/index.js +9 -0
- package/package.json +6 -1
- package/src/artifact-path.js +31 -2
- package/src/backends/c-check.js +80 -0
- package/src/backends/check-plan.js +147 -0
- package/src/backends/cpp-check.js +73 -0
- package/src/backends/csharp-check.js +139 -0
- package/src/backends/csharp.js +4 -3
- package/src/backends/dart-check.js +117 -0
- package/src/backends/dart.js +4 -4
- package/src/backends/go-check.js +89 -0
- package/src/backends/go.js +2 -2
- package/src/backends/java-check.js +77 -0
- package/src/backends/javascript-check.js +33 -0
- package/src/backends/kotlin-check.js +41 -0
- package/src/backends/php-check.js +23 -0
- package/src/backends/program.js +17 -0
- package/src/backends/python-check.js +30 -0
- package/src/backends/ruby-check.js +23 -0
- package/src/backends/rust-check.js +78 -0
- package/src/backends/swift-check.js +89 -0
- package/src/backends/typescript-check.js +37 -0
- package/src/backends/zig-check.js +81 -0
- package/src/diagnostic.js +9 -1
- package/src/frontends/program.js +9 -0
- package/src/language-registry.js +113 -4
- package/src/project-build.js +353 -0
- package/src/project-cli.js +155 -0
- package/src/project-manifest.js +479 -0
- package/src/project-reporter.js +320 -0
- package/src/project-snapshot.js +403 -0
- package/src/project-watch-reporter.js +303 -0
- package/src/project-watch.js +870 -0
- package/src/publication.js +2071 -0
- package/src/semantic/types.js +184 -0
- package/src/subprocess.js +49 -8
- package/src/target-check.js +844 -0
- package/src/toolchains.js +3 -2
- package/tsconfig.json +1 -1
|
@@ -447,6 +447,20 @@ export type LanguageAcceptanceCapabilities = {
|
|
|
447
447
|
*/
|
|
448
448
|
toolchains: readonly string[];
|
|
449
449
|
};
|
|
450
|
+
export type LanguageCheckCapabilities = {
|
|
451
|
+
/**
|
|
452
|
+
* - Whether the target owns a developer check plan.
|
|
453
|
+
*/
|
|
454
|
+
supported: boolean;
|
|
455
|
+
/**
|
|
456
|
+
* - Ordered non-executing developer-check stages.
|
|
457
|
+
*/
|
|
458
|
+
stages: readonly AcceptanceStage[];
|
|
459
|
+
/**
|
|
460
|
+
* - Exact canonical tools required to construct the plan.
|
|
461
|
+
*/
|
|
462
|
+
toolchains: readonly string[];
|
|
463
|
+
};
|
|
450
464
|
export type LanguageFeatureCapabilities = {
|
|
451
465
|
/**
|
|
452
466
|
* - Task 005 arbitrary required signatures, resolved direct calls, and void functions.
|
|
@@ -522,6 +536,10 @@ export type LanguageCapabilities = {
|
|
|
522
536
|
* - Stages and toolchains.
|
|
523
537
|
*/
|
|
524
538
|
acceptance: Readonly<LanguageAcceptanceCapabilities>;
|
|
539
|
+
/**
|
|
540
|
+
* - Non-executing developer-check capability.
|
|
541
|
+
*/
|
|
542
|
+
check: Readonly<LanguageCheckCapabilities>;
|
|
525
543
|
};
|
|
526
544
|
export type SourcePoint = {
|
|
527
545
|
/**
|
|
@@ -1002,6 +1020,239 @@ export type GeneratedArtifactSet = {
|
|
|
1002
1020
|
*/
|
|
1003
1021
|
metadata?: Readonly<Record<string, unknown>>;
|
|
1004
1022
|
};
|
|
1023
|
+
export type PublicationBuildArtifactInput = {
|
|
1024
|
+
/**
|
|
1025
|
+
* - Normalized path relative to the target build projection.
|
|
1026
|
+
*/
|
|
1027
|
+
path: string;
|
|
1028
|
+
/**
|
|
1029
|
+
* - Stable media type for the validator/compiler output.
|
|
1030
|
+
*/
|
|
1031
|
+
mediaType: string;
|
|
1032
|
+
/**
|
|
1033
|
+
* - Stable language-neutral role for the validator/compiler output.
|
|
1034
|
+
*/
|
|
1035
|
+
role: string;
|
|
1036
|
+
};
|
|
1037
|
+
export type PublicationValidatorContext = {
|
|
1038
|
+
/**
|
|
1039
|
+
* - Explicit target identity.
|
|
1040
|
+
*/
|
|
1041
|
+
targetId: string;
|
|
1042
|
+
/**
|
|
1043
|
+
* - Exact generation-scoped generated-source directory.
|
|
1044
|
+
*/
|
|
1045
|
+
sourcePath: string;
|
|
1046
|
+
/**
|
|
1047
|
+
* - Exact generation-scoped compiler-output directory.
|
|
1048
|
+
*/
|
|
1049
|
+
buildPath: string;
|
|
1050
|
+
};
|
|
1051
|
+
export type PublicationValidator = (context: Readonly<PublicationValidatorContext>) => Promise<PublicationBuildArtifactInput[] | void> | PublicationBuildArtifactInput[] | void;
|
|
1052
|
+
export type PublicationTargetRole = "text" | "binary" | "application";
|
|
1053
|
+
export type PublicationTargetInput = {
|
|
1054
|
+
/**
|
|
1055
|
+
* - Explicit project target identity.
|
|
1056
|
+
*/
|
|
1057
|
+
id: string;
|
|
1058
|
+
/**
|
|
1059
|
+
* - Complete already-validated generated artifacts.
|
|
1060
|
+
*/
|
|
1061
|
+
artifactSet: GeneratedArtifactSet;
|
|
1062
|
+
/**
|
|
1063
|
+
* - Explicit language-neutral target role.
|
|
1064
|
+
*/
|
|
1065
|
+
role: PublicationTargetRole;
|
|
1066
|
+
/**
|
|
1067
|
+
* - Generation-relative generated-source projection.
|
|
1068
|
+
*/
|
|
1069
|
+
sourceProjection: string;
|
|
1070
|
+
/**
|
|
1071
|
+
* - Generation-relative compiler-output projection.
|
|
1072
|
+
*/
|
|
1073
|
+
buildProjection: string;
|
|
1074
|
+
/**
|
|
1075
|
+
* - Ordered candidate validators.
|
|
1076
|
+
*/
|
|
1077
|
+
validators?: readonly PublicationValidator[];
|
|
1078
|
+
};
|
|
1079
|
+
export type PublicationRequest = {
|
|
1080
|
+
/**
|
|
1081
|
+
* - Explicit generation/cycle identity, fresh or an exact retained validator-free candidate.
|
|
1082
|
+
*/
|
|
1083
|
+
generationId: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* - Complete ordered project targets.
|
|
1086
|
+
*/
|
|
1087
|
+
targets: readonly PublicationTargetInput[];
|
|
1088
|
+
};
|
|
1089
|
+
export type PublicationOptions = {
|
|
1090
|
+
/**
|
|
1091
|
+
* - Cancellation authority through the active-pointer commit boundary.
|
|
1092
|
+
*/
|
|
1093
|
+
signal?: AbortSignal;
|
|
1094
|
+
};
|
|
1095
|
+
export type GenerationContentHash = {
|
|
1096
|
+
/**
|
|
1097
|
+
* - Hash algorithm.
|
|
1098
|
+
*/
|
|
1099
|
+
algorithm: "sha256";
|
|
1100
|
+
/**
|
|
1101
|
+
* - Lowercase hexadecimal digest.
|
|
1102
|
+
*/
|
|
1103
|
+
value: string;
|
|
1104
|
+
};
|
|
1105
|
+
export type GenerationArtifactManifest = {
|
|
1106
|
+
/**
|
|
1107
|
+
* - Artifact-set-relative path.
|
|
1108
|
+
*/
|
|
1109
|
+
path: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* - Original artifact content representation.
|
|
1112
|
+
*/
|
|
1113
|
+
contentKind: "text" | "binary";
|
|
1114
|
+
/**
|
|
1115
|
+
* - Declared artifact media type.
|
|
1116
|
+
*/
|
|
1117
|
+
mediaType: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* - Declared artifact role.
|
|
1120
|
+
*/
|
|
1121
|
+
role: GeneratedArtifactRole;
|
|
1122
|
+
/**
|
|
1123
|
+
* - Complete persisted rich, byte, or synthetic provenance.
|
|
1124
|
+
*/
|
|
1125
|
+
provenance: ArtifactProvenance;
|
|
1126
|
+
/**
|
|
1127
|
+
* - Exact staged byte length.
|
|
1128
|
+
*/
|
|
1129
|
+
byteLength: number;
|
|
1130
|
+
/**
|
|
1131
|
+
* - Exact staged byte hash.
|
|
1132
|
+
*/
|
|
1133
|
+
hash: GenerationContentHash;
|
|
1134
|
+
};
|
|
1135
|
+
export type GenerationBuildArtifactManifest = {
|
|
1136
|
+
/**
|
|
1137
|
+
* - Build-projection-relative path.
|
|
1138
|
+
*/
|
|
1139
|
+
path: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* - Declared validator/compiler output media type.
|
|
1142
|
+
*/
|
|
1143
|
+
mediaType: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* - Declared language-neutral validator/compiler output role.
|
|
1146
|
+
*/
|
|
1147
|
+
role: string;
|
|
1148
|
+
/**
|
|
1149
|
+
* - Exact staged byte length.
|
|
1150
|
+
*/
|
|
1151
|
+
byteLength: number;
|
|
1152
|
+
/**
|
|
1153
|
+
* - Exact staged byte hash.
|
|
1154
|
+
*/
|
|
1155
|
+
hash: GenerationContentHash;
|
|
1156
|
+
};
|
|
1157
|
+
export type GenerationTargetManifest = {
|
|
1158
|
+
/**
|
|
1159
|
+
* - Explicit project target identity.
|
|
1160
|
+
*/
|
|
1161
|
+
id: string;
|
|
1162
|
+
/**
|
|
1163
|
+
* - Explicit language-neutral target role.
|
|
1164
|
+
*/
|
|
1165
|
+
role: PublicationTargetRole;
|
|
1166
|
+
/**
|
|
1167
|
+
* - Artifact-set backend target identity.
|
|
1168
|
+
*/
|
|
1169
|
+
target: string;
|
|
1170
|
+
/**
|
|
1171
|
+
* - Disjoint generation-relative projections.
|
|
1172
|
+
*/
|
|
1173
|
+
projections: {
|
|
1174
|
+
source: string;
|
|
1175
|
+
build: string;
|
|
1176
|
+
};
|
|
1177
|
+
/**
|
|
1178
|
+
* - Ordered generated artifacts.
|
|
1179
|
+
*/
|
|
1180
|
+
artifacts: readonly GenerationArtifactManifest[];
|
|
1181
|
+
/**
|
|
1182
|
+
* - Ordered validator/compiler outputs.
|
|
1183
|
+
*/
|
|
1184
|
+
buildArtifacts: readonly GenerationBuildArtifactManifest[];
|
|
1185
|
+
/**
|
|
1186
|
+
* - Persisted target-specific artifact-set metadata.
|
|
1187
|
+
*/
|
|
1188
|
+
metadata?: Readonly<Record<string, unknown>>;
|
|
1189
|
+
};
|
|
1190
|
+
export type GenerationManifest = {
|
|
1191
|
+
/**
|
|
1192
|
+
* - Schema discriminator.
|
|
1193
|
+
*/
|
|
1194
|
+
schema: "SemantifoldGenerationManifest";
|
|
1195
|
+
/**
|
|
1196
|
+
* - Manifest schema version.
|
|
1197
|
+
*/
|
|
1198
|
+
version: 1;
|
|
1199
|
+
/**
|
|
1200
|
+
* - Explicit project identity.
|
|
1201
|
+
*/
|
|
1202
|
+
projectId: string;
|
|
1203
|
+
/**
|
|
1204
|
+
* - Explicit generation/cycle identity.
|
|
1205
|
+
*/
|
|
1206
|
+
generationId: string;
|
|
1207
|
+
/**
|
|
1208
|
+
* - Complete ordered target records.
|
|
1209
|
+
*/
|
|
1210
|
+
targets: readonly GenerationTargetManifest[];
|
|
1211
|
+
};
|
|
1212
|
+
export type PublishedTargetPaths = {
|
|
1213
|
+
/**
|
|
1214
|
+
* - Explicit project target identity.
|
|
1215
|
+
*/
|
|
1216
|
+
id: string;
|
|
1217
|
+
/**
|
|
1218
|
+
* - Explicit language-neutral target role.
|
|
1219
|
+
*/
|
|
1220
|
+
role: PublicationTargetRole;
|
|
1221
|
+
/**
|
|
1222
|
+
* - Exact immutable generated-source directory.
|
|
1223
|
+
*/
|
|
1224
|
+
sourcePath: string;
|
|
1225
|
+
/**
|
|
1226
|
+
* - Exact immutable compiler-output directory.
|
|
1227
|
+
*/
|
|
1228
|
+
buildPath: string;
|
|
1229
|
+
};
|
|
1230
|
+
export type PublishedGeneration = {
|
|
1231
|
+
/**
|
|
1232
|
+
* - Resolved generation identity.
|
|
1233
|
+
*/
|
|
1234
|
+
generationId: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* - Exact immutable generation directory.
|
|
1237
|
+
*/
|
|
1238
|
+
generationPath: string;
|
|
1239
|
+
/**
|
|
1240
|
+
* - Exact generation manifest path.
|
|
1241
|
+
*/
|
|
1242
|
+
manifestPath: string;
|
|
1243
|
+
/**
|
|
1244
|
+
* - Verified immutable generation manifest.
|
|
1245
|
+
*/
|
|
1246
|
+
manifest: GenerationManifest;
|
|
1247
|
+
/**
|
|
1248
|
+
* - Exact generation-scoped target paths.
|
|
1249
|
+
*/
|
|
1250
|
+
targets: readonly PublishedTargetPaths[];
|
|
1251
|
+
/**
|
|
1252
|
+
* - Whether post-commit journal cleanup remains for recovery.
|
|
1253
|
+
*/
|
|
1254
|
+
cleanupPending: boolean;
|
|
1255
|
+
};
|
|
1005
1256
|
export type DiscoveredToolchain = {
|
|
1006
1257
|
/**
|
|
1007
1258
|
* - Toolchain ID.
|
|
@@ -1032,6 +1283,206 @@ export type DiscoveredToolchain = {
|
|
|
1032
1283
|
*/
|
|
1033
1284
|
versionArguments: readonly string[];
|
|
1034
1285
|
};
|
|
1286
|
+
export type TargetCheckPathArgument = {
|
|
1287
|
+
/**
|
|
1288
|
+
* - Exact argv index containing the path.
|
|
1289
|
+
*/
|
|
1290
|
+
index: number;
|
|
1291
|
+
/**
|
|
1292
|
+
* - Candidate subtree that owns the path.
|
|
1293
|
+
*/
|
|
1294
|
+
ownership: "source" | "build";
|
|
1295
|
+
/**
|
|
1296
|
+
* - Exact non-path argv prefix preceding an owned absolute path.
|
|
1297
|
+
*/
|
|
1298
|
+
prefix?: string;
|
|
1299
|
+
};
|
|
1300
|
+
export type TargetCheckEnvironmentPath = {
|
|
1301
|
+
/**
|
|
1302
|
+
* - Exact environment variable containing an owned absolute path.
|
|
1303
|
+
*/
|
|
1304
|
+
name: string;
|
|
1305
|
+
/**
|
|
1306
|
+
* - Candidate subtree or discovered tool that owns the path.
|
|
1307
|
+
*/
|
|
1308
|
+
ownership: "source" | "build" | "tool";
|
|
1309
|
+
/**
|
|
1310
|
+
* - Exact tool executable bound by a tool-owned environment value.
|
|
1311
|
+
*/
|
|
1312
|
+
tool?: DiscoveredToolchain;
|
|
1313
|
+
};
|
|
1314
|
+
export type TargetCheckOutputOwnership = {
|
|
1315
|
+
/**
|
|
1316
|
+
* - Compiler outputs belong only to the candidate build subtree.
|
|
1317
|
+
*/
|
|
1318
|
+
ownership: "build";
|
|
1319
|
+
/**
|
|
1320
|
+
* - Exact generation-scoped build root.
|
|
1321
|
+
*/
|
|
1322
|
+
path: string;
|
|
1323
|
+
/**
|
|
1324
|
+
* - Media type assigned to every produced regular file.
|
|
1325
|
+
*/
|
|
1326
|
+
mediaType: string;
|
|
1327
|
+
/**
|
|
1328
|
+
* - Language-neutral compiler-output role.
|
|
1329
|
+
*/
|
|
1330
|
+
role: string;
|
|
1331
|
+
};
|
|
1332
|
+
export type TargetCheckStageRequest = {
|
|
1333
|
+
/**
|
|
1334
|
+
* - Declared non-executing acceptance stage.
|
|
1335
|
+
*/
|
|
1336
|
+
stage: AcceptanceStage;
|
|
1337
|
+
/**
|
|
1338
|
+
* - Exact immutable discovered tool record.
|
|
1339
|
+
*/
|
|
1340
|
+
tool: DiscoveredToolchain;
|
|
1341
|
+
/**
|
|
1342
|
+
* - Exact executable copied from the tool record.
|
|
1343
|
+
*/
|
|
1344
|
+
executable: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* - Exact shell-free argument vector.
|
|
1347
|
+
*/
|
|
1348
|
+
argv: readonly string[];
|
|
1349
|
+
/**
|
|
1350
|
+
* - Complete ownership declaration for argv paths.
|
|
1351
|
+
*/
|
|
1352
|
+
pathArguments: readonly TargetCheckPathArgument[];
|
|
1353
|
+
/**
|
|
1354
|
+
* - Exact candidate-scoped working directory.
|
|
1355
|
+
*/
|
|
1356
|
+
cwd: string;
|
|
1357
|
+
/**
|
|
1358
|
+
* - Exact deterministic environment.
|
|
1359
|
+
*/
|
|
1360
|
+
environment: Readonly<Record<string, string>>;
|
|
1361
|
+
/**
|
|
1362
|
+
* - Owned absolute environment paths.
|
|
1363
|
+
*/
|
|
1364
|
+
environmentPaths: readonly TargetCheckEnvironmentPath[];
|
|
1365
|
+
/**
|
|
1366
|
+
* - SHA-256 of declared restore inputs, or null for unconditional stages.
|
|
1367
|
+
*/
|
|
1368
|
+
inputHash: string | null;
|
|
1369
|
+
/**
|
|
1370
|
+
* - Complete staged artifact inputs read by the stage.
|
|
1371
|
+
*/
|
|
1372
|
+
inputs: readonly string[];
|
|
1373
|
+
/**
|
|
1374
|
+
* - Build output ownership, or null for non-producing checks.
|
|
1375
|
+
*/
|
|
1376
|
+
output: Readonly<TargetCheckOutputOwnership> | null;
|
|
1377
|
+
/**
|
|
1378
|
+
* - Candidate source/build cache or intermediate directories removed after checking.
|
|
1379
|
+
*/
|
|
1380
|
+
transientPaths: readonly string[];
|
|
1381
|
+
};
|
|
1382
|
+
export type TargetCheckPlan = {
|
|
1383
|
+
/**
|
|
1384
|
+
* - Plan schema discriminator.
|
|
1385
|
+
*/
|
|
1386
|
+
schema: "SemantifoldTargetCheckPlan";
|
|
1387
|
+
/**
|
|
1388
|
+
* - Plan schema version.
|
|
1389
|
+
*/
|
|
1390
|
+
version: 1;
|
|
1391
|
+
/**
|
|
1392
|
+
* - Non-executing developer-check mode.
|
|
1393
|
+
*/
|
|
1394
|
+
mode: "developer-check";
|
|
1395
|
+
/**
|
|
1396
|
+
* - Exact project identity.
|
|
1397
|
+
*/
|
|
1398
|
+
projectId: string;
|
|
1399
|
+
/**
|
|
1400
|
+
* - Exact project target identity.
|
|
1401
|
+
*/
|
|
1402
|
+
targetId: string;
|
|
1403
|
+
/**
|
|
1404
|
+
* - Registered backend target identity.
|
|
1405
|
+
*/
|
|
1406
|
+
target: string;
|
|
1407
|
+
/**
|
|
1408
|
+
* - Exact staged generated-source root.
|
|
1409
|
+
*/
|
|
1410
|
+
sourcePath: string;
|
|
1411
|
+
/**
|
|
1412
|
+
* - Exact staged compiler-output root.
|
|
1413
|
+
*/
|
|
1414
|
+
buildPath: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* - Exact staged artifact paths.
|
|
1417
|
+
*/
|
|
1418
|
+
artifactPaths: readonly string[];
|
|
1419
|
+
/**
|
|
1420
|
+
* - Ordered target-owned requests.
|
|
1421
|
+
*/
|
|
1422
|
+
stages: readonly TargetCheckStageRequest[];
|
|
1423
|
+
};
|
|
1424
|
+
export type TargetCheckStageResult = {
|
|
1425
|
+
/**
|
|
1426
|
+
* - Completed stage identity.
|
|
1427
|
+
*/
|
|
1428
|
+
stage: AcceptanceStage;
|
|
1429
|
+
/**
|
|
1430
|
+
* - Exact tool identity.
|
|
1431
|
+
*/
|
|
1432
|
+
tool: Readonly<{
|
|
1433
|
+
command: string;
|
|
1434
|
+
executable: string;
|
|
1435
|
+
id: string;
|
|
1436
|
+
source: "override" | "canonical";
|
|
1437
|
+
version: string;
|
|
1438
|
+
}>;
|
|
1439
|
+
/**
|
|
1440
|
+
* - Exact executed argument vector.
|
|
1441
|
+
*/
|
|
1442
|
+
argv: readonly string[];
|
|
1443
|
+
/**
|
|
1444
|
+
* - Successful process exit code.
|
|
1445
|
+
*/
|
|
1446
|
+
exitCode: number;
|
|
1447
|
+
/**
|
|
1448
|
+
* - Successful process signal state.
|
|
1449
|
+
*/
|
|
1450
|
+
signal: null;
|
|
1451
|
+
/**
|
|
1452
|
+
* - Bounded captured standard output.
|
|
1453
|
+
*/
|
|
1454
|
+
stdout: string;
|
|
1455
|
+
/**
|
|
1456
|
+
* - Bounded captured standard error.
|
|
1457
|
+
*/
|
|
1458
|
+
stderr: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* - Non-negative stage duration.
|
|
1461
|
+
*/
|
|
1462
|
+
durationMs: number;
|
|
1463
|
+
};
|
|
1464
|
+
export type TargetCheckResult = {
|
|
1465
|
+
/**
|
|
1466
|
+
* - Exact project identity.
|
|
1467
|
+
*/
|
|
1468
|
+
projectId: string;
|
|
1469
|
+
/**
|
|
1470
|
+
* - Exact project target identity.
|
|
1471
|
+
*/
|
|
1472
|
+
targetId: string;
|
|
1473
|
+
/**
|
|
1474
|
+
* - Registered backend target identity.
|
|
1475
|
+
*/
|
|
1476
|
+
target: string;
|
|
1477
|
+
/**
|
|
1478
|
+
* - Ordered successful stage evidence.
|
|
1479
|
+
*/
|
|
1480
|
+
stages: readonly TargetCheckStageResult[];
|
|
1481
|
+
/**
|
|
1482
|
+
* - Complete compiler-owned build files.
|
|
1483
|
+
*/
|
|
1484
|
+
outputs: readonly PublicationBuildArtifactInput[];
|
|
1485
|
+
};
|
|
1035
1486
|
export type AcceptanceStageResult = {
|
|
1036
1487
|
/**
|
|
1037
1488
|
* - Completed stage.
|
|
@@ -3493,6 +3944,12 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
3493
3944
|
* @property {readonly AcceptanceStage[]} stages - Applicable ordered acceptance stages.
|
|
3494
3945
|
* @property {readonly string[]} toolchains - Required canonical toolchain IDs.
|
|
3495
3946
|
*/
|
|
3947
|
+
/**
|
|
3948
|
+
* @typedef LanguageCheckCapabilities
|
|
3949
|
+
* @property {boolean} supported - Whether the target owns a developer check plan.
|
|
3950
|
+
* @property {readonly AcceptanceStage[]} stages - Ordered non-executing developer-check stages.
|
|
3951
|
+
* @property {readonly string[]} toolchains - Exact canonical tools required to construct the plan.
|
|
3952
|
+
*/
|
|
3496
3953
|
/**
|
|
3497
3954
|
* @typedef LanguageFeatureCapabilities
|
|
3498
3955
|
* @property {boolean} generalFunctionsAndCalls - Task 005 arbitrary required signatures, resolved direct calls, and void functions.
|
|
@@ -3516,6 +3973,7 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
3516
3973
|
* @property {Readonly<LanguageFeatureCapabilities>} features - Semantic feature capabilities.
|
|
3517
3974
|
* @property {Readonly<LanguageMappingCapabilities>} mapping - Mapping forms.
|
|
3518
3975
|
* @property {Readonly<LanguageAcceptanceCapabilities>} acceptance - Stages and toolchains.
|
|
3976
|
+
* @property {Readonly<LanguageCheckCapabilities>} check - Non-executing developer-check capability.
|
|
3519
3977
|
*/
|
|
3520
3978
|
/**
|
|
3521
3979
|
* @typedef SourcePoint
|
|
@@ -3695,6 +4153,95 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
3695
4153
|
* @property {readonly GeneratedSetArtifact[]} artifacts - Deterministic artifact order.
|
|
3696
4154
|
* @property {Readonly<Record<string, unknown>>} [metadata] - Detached target-specific JSON metadata.
|
|
3697
4155
|
*/
|
|
4156
|
+
/**
|
|
4157
|
+
* @typedef PublicationBuildArtifactInput
|
|
4158
|
+
* @property {string} path - Normalized path relative to the target build projection.
|
|
4159
|
+
* @property {string} mediaType - Stable media type for the validator/compiler output.
|
|
4160
|
+
* @property {string} role - Stable language-neutral role for the validator/compiler output.
|
|
4161
|
+
*/
|
|
4162
|
+
/**
|
|
4163
|
+
* @typedef PublicationValidatorContext
|
|
4164
|
+
* @property {string} targetId - Explicit target identity.
|
|
4165
|
+
* @property {string} sourcePath - Exact generation-scoped generated-source directory.
|
|
4166
|
+
* @property {string} buildPath - Exact generation-scoped compiler-output directory.
|
|
4167
|
+
*/
|
|
4168
|
+
/** @typedef {(context: Readonly<PublicationValidatorContext>) => Promise<PublicationBuildArtifactInput[] | void> | PublicationBuildArtifactInput[] | void} PublicationValidator */
|
|
4169
|
+
/** @typedef {"text" | "binary" | "application"} PublicationTargetRole */
|
|
4170
|
+
/**
|
|
4171
|
+
* @typedef PublicationTargetInput
|
|
4172
|
+
* @property {string} id - Explicit project target identity.
|
|
4173
|
+
* @property {GeneratedArtifactSet} artifactSet - Complete already-validated generated artifacts.
|
|
4174
|
+
* @property {PublicationTargetRole} role - Explicit language-neutral target role.
|
|
4175
|
+
* @property {string} sourceProjection - Generation-relative generated-source projection.
|
|
4176
|
+
* @property {string} buildProjection - Generation-relative compiler-output projection.
|
|
4177
|
+
* @property {readonly PublicationValidator[]} [validators] - Ordered candidate validators.
|
|
4178
|
+
*/
|
|
4179
|
+
/**
|
|
4180
|
+
* @typedef PublicationRequest
|
|
4181
|
+
* @property {string} generationId - Explicit generation/cycle identity, fresh or an exact retained validator-free candidate.
|
|
4182
|
+
* @property {readonly PublicationTargetInput[]} targets - Complete ordered project targets.
|
|
4183
|
+
*/
|
|
4184
|
+
/**
|
|
4185
|
+
* @typedef PublicationOptions
|
|
4186
|
+
* @property {AbortSignal} [signal] - Cancellation authority through the active-pointer commit boundary.
|
|
4187
|
+
*/
|
|
4188
|
+
/**
|
|
4189
|
+
* @typedef GenerationContentHash
|
|
4190
|
+
* @property {"sha256"} algorithm - Hash algorithm.
|
|
4191
|
+
* @property {string} value - Lowercase hexadecimal digest.
|
|
4192
|
+
*/
|
|
4193
|
+
/**
|
|
4194
|
+
* @typedef GenerationArtifactManifest
|
|
4195
|
+
* @property {string} path - Artifact-set-relative path.
|
|
4196
|
+
* @property {"text" | "binary"} contentKind - Original artifact content representation.
|
|
4197
|
+
* @property {string} mediaType - Declared artifact media type.
|
|
4198
|
+
* @property {GeneratedArtifactRole} role - Declared artifact role.
|
|
4199
|
+
* @property {ArtifactProvenance} provenance - Complete persisted rich, byte, or synthetic provenance.
|
|
4200
|
+
* @property {number} byteLength - Exact staged byte length.
|
|
4201
|
+
* @property {GenerationContentHash} hash - Exact staged byte hash.
|
|
4202
|
+
*/
|
|
4203
|
+
/**
|
|
4204
|
+
* @typedef GenerationBuildArtifactManifest
|
|
4205
|
+
* @property {string} path - Build-projection-relative path.
|
|
4206
|
+
* @property {string} mediaType - Declared validator/compiler output media type.
|
|
4207
|
+
* @property {string} role - Declared language-neutral validator/compiler output role.
|
|
4208
|
+
* @property {number} byteLength - Exact staged byte length.
|
|
4209
|
+
* @property {GenerationContentHash} hash - Exact staged byte hash.
|
|
4210
|
+
*/
|
|
4211
|
+
/**
|
|
4212
|
+
* @typedef GenerationTargetManifest
|
|
4213
|
+
* @property {string} id - Explicit project target identity.
|
|
4214
|
+
* @property {PublicationTargetRole} role - Explicit language-neutral target role.
|
|
4215
|
+
* @property {string} target - Artifact-set backend target identity.
|
|
4216
|
+
* @property {{source: string, build: string}} projections - Disjoint generation-relative projections.
|
|
4217
|
+
* @property {readonly GenerationArtifactManifest[]} artifacts - Ordered generated artifacts.
|
|
4218
|
+
* @property {readonly GenerationBuildArtifactManifest[]} buildArtifacts - Ordered validator/compiler outputs.
|
|
4219
|
+
* @property {Readonly<Record<string, unknown>>} [metadata] - Persisted target-specific artifact-set metadata.
|
|
4220
|
+
*/
|
|
4221
|
+
/**
|
|
4222
|
+
* @typedef GenerationManifest
|
|
4223
|
+
* @property {"SemantifoldGenerationManifest"} schema - Schema discriminator.
|
|
4224
|
+
* @property {1} version - Manifest schema version.
|
|
4225
|
+
* @property {string} projectId - Explicit project identity.
|
|
4226
|
+
* @property {string} generationId - Explicit generation/cycle identity.
|
|
4227
|
+
* @property {readonly GenerationTargetManifest[]} targets - Complete ordered target records.
|
|
4228
|
+
*/
|
|
4229
|
+
/**
|
|
4230
|
+
* @typedef PublishedTargetPaths
|
|
4231
|
+
* @property {string} id - Explicit project target identity.
|
|
4232
|
+
* @property {PublicationTargetRole} role - Explicit language-neutral target role.
|
|
4233
|
+
* @property {string} sourcePath - Exact immutable generated-source directory.
|
|
4234
|
+
* @property {string} buildPath - Exact immutable compiler-output directory.
|
|
4235
|
+
*/
|
|
4236
|
+
/**
|
|
4237
|
+
* @typedef PublishedGeneration
|
|
4238
|
+
* @property {string} generationId - Resolved generation identity.
|
|
4239
|
+
* @property {string} generationPath - Exact immutable generation directory.
|
|
4240
|
+
* @property {string} manifestPath - Exact generation manifest path.
|
|
4241
|
+
* @property {GenerationManifest} manifest - Verified immutable generation manifest.
|
|
4242
|
+
* @property {readonly PublishedTargetPaths[]} targets - Exact generation-scoped target paths.
|
|
4243
|
+
* @property {boolean} cleanupPending - Whether post-commit journal cleanup remains for recovery.
|
|
4244
|
+
*/
|
|
3698
4245
|
/**
|
|
3699
4246
|
* @typedef DiscoveredToolchain
|
|
3700
4247
|
* @property {string} id - Toolchain ID.
|
|
@@ -3705,6 +4252,72 @@ export type SemanticNodeWithoutLocations = SemanticNode;
|
|
|
3705
4252
|
* @property {string} versionOutput - Complete normalized stdout, or normalized stderr when stdout is empty.
|
|
3706
4253
|
* @property {readonly string[]} versionArguments - Exact version argument array.
|
|
3707
4254
|
*/
|
|
4255
|
+
/**
|
|
4256
|
+
* @typedef TargetCheckPathArgument
|
|
4257
|
+
* @property {number} index - Exact argv index containing the path.
|
|
4258
|
+
* @property {"source" | "build"} ownership - Candidate subtree that owns the path.
|
|
4259
|
+
* @property {string} [prefix] - Exact non-path argv prefix preceding an owned absolute path.
|
|
4260
|
+
*/
|
|
4261
|
+
/**
|
|
4262
|
+
* @typedef TargetCheckEnvironmentPath
|
|
4263
|
+
* @property {string} name - Exact environment variable containing an owned absolute path.
|
|
4264
|
+
* @property {"source" | "build" | "tool"} ownership - Candidate subtree or discovered tool that owns the path.
|
|
4265
|
+
* @property {DiscoveredToolchain} [tool] - Exact tool executable bound by a tool-owned environment value.
|
|
4266
|
+
*/
|
|
4267
|
+
/**
|
|
4268
|
+
* @typedef TargetCheckOutputOwnership
|
|
4269
|
+
* @property {"build"} ownership - Compiler outputs belong only to the candidate build subtree.
|
|
4270
|
+
* @property {string} path - Exact generation-scoped build root.
|
|
4271
|
+
* @property {string} mediaType - Media type assigned to every produced regular file.
|
|
4272
|
+
* @property {string} role - Language-neutral compiler-output role.
|
|
4273
|
+
*/
|
|
4274
|
+
/**
|
|
4275
|
+
* @typedef TargetCheckStageRequest
|
|
4276
|
+
* @property {AcceptanceStage} stage - Declared non-executing acceptance stage.
|
|
4277
|
+
* @property {DiscoveredToolchain} tool - Exact immutable discovered tool record.
|
|
4278
|
+
* @property {string} executable - Exact executable copied from the tool record.
|
|
4279
|
+
* @property {readonly string[]} argv - Exact shell-free argument vector.
|
|
4280
|
+
* @property {readonly TargetCheckPathArgument[]} pathArguments - Complete ownership declaration for argv paths.
|
|
4281
|
+
* @property {string} cwd - Exact candidate-scoped working directory.
|
|
4282
|
+
* @property {Readonly<Record<string, string>>} environment - Exact deterministic environment.
|
|
4283
|
+
* @property {readonly TargetCheckEnvironmentPath[]} environmentPaths - Owned absolute environment paths.
|
|
4284
|
+
* @property {string | null} inputHash - SHA-256 of declared restore inputs, or null for unconditional stages.
|
|
4285
|
+
* @property {readonly string[]} inputs - Complete staged artifact inputs read by the stage.
|
|
4286
|
+
* @property {Readonly<TargetCheckOutputOwnership> | null} output - Build output ownership, or null for non-producing checks.
|
|
4287
|
+
* @property {readonly string[]} transientPaths - Candidate source/build cache or intermediate directories removed after checking.
|
|
4288
|
+
*/
|
|
4289
|
+
/**
|
|
4290
|
+
* @typedef TargetCheckPlan
|
|
4291
|
+
* @property {"SemantifoldTargetCheckPlan"} schema - Plan schema discriminator.
|
|
4292
|
+
* @property {1} version - Plan schema version.
|
|
4293
|
+
* @property {"developer-check"} mode - Non-executing developer-check mode.
|
|
4294
|
+
* @property {string} projectId - Exact project identity.
|
|
4295
|
+
* @property {string} targetId - Exact project target identity.
|
|
4296
|
+
* @property {string} target - Registered backend target identity.
|
|
4297
|
+
* @property {string} sourcePath - Exact staged generated-source root.
|
|
4298
|
+
* @property {string} buildPath - Exact staged compiler-output root.
|
|
4299
|
+
* @property {readonly string[]} artifactPaths - Exact staged artifact paths.
|
|
4300
|
+
* @property {readonly TargetCheckStageRequest[]} stages - Ordered target-owned requests.
|
|
4301
|
+
*/
|
|
4302
|
+
/**
|
|
4303
|
+
* @typedef TargetCheckStageResult
|
|
4304
|
+
* @property {AcceptanceStage} stage - Completed stage identity.
|
|
4305
|
+
* @property {Readonly<{command: string, executable: string, id: string, source: "override" | "canonical", version: string}>} tool - Exact tool identity.
|
|
4306
|
+
* @property {readonly string[]} argv - Exact executed argument vector.
|
|
4307
|
+
* @property {number} exitCode - Successful process exit code.
|
|
4308
|
+
* @property {null} signal - Successful process signal state.
|
|
4309
|
+
* @property {string} stdout - Bounded captured standard output.
|
|
4310
|
+
* @property {string} stderr - Bounded captured standard error.
|
|
4311
|
+
* @property {number} durationMs - Non-negative stage duration.
|
|
4312
|
+
*/
|
|
4313
|
+
/**
|
|
4314
|
+
* @typedef TargetCheckResult
|
|
4315
|
+
* @property {string} projectId - Exact project identity.
|
|
4316
|
+
* @property {string} targetId - Exact project target identity.
|
|
4317
|
+
* @property {string} target - Registered backend target identity.
|
|
4318
|
+
* @property {readonly TargetCheckStageResult[]} stages - Ordered successful stage evidence.
|
|
4319
|
+
* @property {readonly PublicationBuildArtifactInput[]} outputs - Complete compiler-owned build files.
|
|
4320
|
+
*/
|
|
3708
4321
|
/**
|
|
3709
4322
|
* @typedef AcceptanceStageResult
|
|
3710
4323
|
* @property {AcceptanceStage} stage - Completed stage.
|