carrick 0.3.97 → 0.3.98
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/bin/carrick.mjs +19 -14
- package/dist/auth/run.d.ts +1 -1
- package/dist/auth/run.js +1 -1
- package/dist/contract.d.ts +15 -0
- package/dist/contract.js.map +1 -1
- package/dist/global-install.js +6 -5
- package/dist/global-install.js.map +1 -1
- package/dist/hook/reuse.d.ts +8 -3
- package/dist/hook/reuse.js +15 -3
- package/dist/hook/reuse.js.map +1 -1
- package/dist/init/connect.js +1 -1
- package/dist/init/connect.js.map +1 -1
- package/dist/init/doctor.js +5 -2
- package/dist/init/doctor.js.map +1 -1
- package/dist/init/hosted.d.ts +18 -1
- package/dist/init/hosted.js +84 -16
- package/dist/init/hosted.js.map +1 -1
- package/dist/init/install-id.d.ts +2 -2
- package/dist/init/install-id.js +3 -3
- package/dist/init/install-id.js.map +1 -1
- package/dist/init/mcp.d.ts +2 -2
- package/dist/init/mcp.js +2 -2
- package/dist/init/mcp.js.map +1 -1
- package/dist/init/outdated.d.ts +1 -1
- package/dist/init/outdated.js +1 -1
- package/dist/init/outdated.js.map +1 -1
- package/dist/init/output.d.ts +18 -1
- package/dist/init/output.js +40 -1
- package/dist/init/output.js.map +1 -1
- package/dist/init/remove.d.ts +71 -2
- package/dist/init/remove.js +474 -145
- package/dist/init/remove.js.map +1 -1
- package/dist/init/repo-copies.d.ts +16 -4
- package/dist/init/repo-copies.js +20 -6
- package/dist/init/repo-copies.js.map +1 -1
- package/dist/init/run.d.ts +12 -16
- package/dist/init/run.js +25 -42
- package/dist/init/run.js.map +1 -1
- package/dist/update.js +1 -0
- package/dist/update.js.map +1 -1
- package/package.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/sidecar/dist/src/client-semantics.d.ts +36 -0
- package/sidecar/dist/src/client-semantics.js +1008 -0
- package/sidecar/dist/src/index.js +35 -0
- package/sidecar/dist/src/types.d.ts +83 -2
- package/sidecar/dist/src/validators.d.ts +463 -0
- package/sidecar/dist/src/validators.js +50 -0
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* - stderr is for logging
|
|
12
12
|
* - Process stays alive between requests (warm standby)
|
|
13
13
|
*/
|
|
14
|
+
import * as path from 'node:path';
|
|
14
15
|
import * as readline from 'node:readline';
|
|
15
16
|
import { parseRequest } from './validators.js';
|
|
16
17
|
import { ProjectLoader } from './project-loader.js';
|
|
@@ -20,6 +21,7 @@ import { MonorepoBuilder } from './monorepo-builder.js';
|
|
|
20
21
|
import { DefinitionResolver } from './definition-resolver.js';
|
|
21
22
|
import { captureStub, findDisqualifyingTopTypes, jsonWireDeclarations, runCheck, } from './capture/index.js';
|
|
22
23
|
import { Retyper } from './retype.js';
|
|
24
|
+
import { ClientSemanticsVerifier } from './client-semantics.js';
|
|
23
25
|
// ===========================================================================
|
|
24
26
|
// Module-level state
|
|
25
27
|
// ===========================================================================
|
|
@@ -66,6 +68,7 @@ function projectComponents() {
|
|
|
66
68
|
// (`npm/carrick/package.json`) resolves `typescript ^5.8.0` unpinned,
|
|
67
69
|
// so an install can pair ts-morph's copy with a newer 5.x.
|
|
68
70
|
retyper: new Retyper(project, typeInferrer, jsonWireDeclarations, findDisqualifyingTopTypes),
|
|
71
|
+
semanticsVerifier: new ClientSemanticsVerifier(project),
|
|
69
72
|
};
|
|
70
73
|
}
|
|
71
74
|
return components;
|
|
@@ -313,6 +316,36 @@ function handleRetypeCheck(request) {
|
|
|
313
316
|
return { request_id: request.request_id, status: 'error', errors: [error] };
|
|
314
317
|
}
|
|
315
318
|
}
|
|
319
|
+
/**
|
|
320
|
+
* How long one verify_client_semantics request may spend before the checks it
|
|
321
|
+
* has not reached come back `unchecked` with reason `budget`. The first request
|
|
322
|
+
* on a service may pay the program build, which counts against it; the checks
|
|
323
|
+
* themselves are cheap. Well inside the scanner's 900s read deadline.
|
|
324
|
+
*/
|
|
325
|
+
const SEMANTICS_BUDGET_MS = 600_000;
|
|
326
|
+
/**
|
|
327
|
+
* Handle the 'verify_client_semantics' action - check library-semantics
|
|
328
|
+
* claims against each package's type declarations (carrick#1564)
|
|
329
|
+
*/
|
|
330
|
+
function handleVerifyClientSemantics(request) {
|
|
331
|
+
try {
|
|
332
|
+
const { semanticsVerifier } = projectComponents();
|
|
333
|
+
const fromDir = path.resolve(projectLoader.getRepoRoot(), request.from_dir);
|
|
334
|
+
log(`Verifying ${request.checks.length} client-semantics claim(s) from ${fromDir}`);
|
|
335
|
+
const { semantics, modules } = semanticsVerifier.run(fromDir, request.checks, request.budget_ms ?? SEMANTICS_BUDGET_MS);
|
|
336
|
+
return {
|
|
337
|
+
request_id: request.request_id,
|
|
338
|
+
status: 'success',
|
|
339
|
+
semantics,
|
|
340
|
+
semantics_modules: modules,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
catch (err) {
|
|
344
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
345
|
+
logError(`Client-semantics check failed: ${error}`);
|
|
346
|
+
return { request_id: request.request_id, status: 'error', errors: [error] };
|
|
347
|
+
}
|
|
348
|
+
}
|
|
316
349
|
/**
|
|
317
350
|
* Handle the 'build_workspace' action - build synthetic monorepo workspace
|
|
318
351
|
*/
|
|
@@ -463,6 +496,8 @@ function handleRequest(request) {
|
|
|
463
496
|
return handleResolveDefinitions(request);
|
|
464
497
|
case 'retype_check':
|
|
465
498
|
return handleRetypeCheck(request);
|
|
499
|
+
case 'verify_client_semantics':
|
|
500
|
+
return handleVerifyClientSemantics(request);
|
|
466
501
|
case 'health':
|
|
467
502
|
return handleHealth(request);
|
|
468
503
|
case 'shutdown':
|
|
@@ -320,10 +320,64 @@ export interface RetypeCheckRequest extends BaseRequest {
|
|
|
320
320
|
/** Time the request may spend; items it does not reach abstain. */
|
|
321
321
|
budget_ms?: number;
|
|
322
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* One library-semantics claim to check against the package's own type
|
|
325
|
+
* declarations, on one receiver (carrick#1564). The unit of verification is
|
|
326
|
+
* the pair `(claim_id, receiver)`.
|
|
327
|
+
*/
|
|
328
|
+
export interface SemanticsCheck {
|
|
329
|
+
claim_id: string;
|
|
330
|
+
/** Module specifier, resolved from the request's `from_dir`. */
|
|
331
|
+
package: string;
|
|
332
|
+
/** `"default"` or a named export. */
|
|
333
|
+
export: string;
|
|
334
|
+
/** `"export"` or `"instance:<factory member>"`. */
|
|
335
|
+
receiver: string;
|
|
336
|
+
claim: {
|
|
337
|
+
kind: 'factory';
|
|
338
|
+
member: string;
|
|
339
|
+
base_url_key: string;
|
|
340
|
+
} | {
|
|
341
|
+
kind: 'verb';
|
|
342
|
+
member: string;
|
|
343
|
+
method: string;
|
|
344
|
+
} | {
|
|
345
|
+
kind: 'verb_body';
|
|
346
|
+
member: string;
|
|
347
|
+
args: 'path_body' | 'path_options';
|
|
348
|
+
body_key?: string;
|
|
349
|
+
} | {
|
|
350
|
+
kind: 'request';
|
|
351
|
+
member: string | null;
|
|
352
|
+
args: 'config' | 'path_options';
|
|
353
|
+
url_key?: string;
|
|
354
|
+
method_key: string;
|
|
355
|
+
} | {
|
|
356
|
+
kind: 'request_body';
|
|
357
|
+
member: string | null;
|
|
358
|
+
args: 'config' | 'path_options';
|
|
359
|
+
url_key?: string;
|
|
360
|
+
method_key: string;
|
|
361
|
+
body_key: string;
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Check library-semantics claims against each package's type declarations.
|
|
366
|
+
* Needs `init`: module resolution runs under the service's compiler options,
|
|
367
|
+
* in the service's program.
|
|
368
|
+
*/
|
|
369
|
+
export interface VerifyClientSemanticsRequest extends BaseRequest {
|
|
370
|
+
action: 'verify_client_semantics';
|
|
371
|
+
/** Absolute service root; module resolution starts here. */
|
|
372
|
+
from_dir: string;
|
|
373
|
+
checks: SemanticsCheck[];
|
|
374
|
+
/** Checks not reached in time come back `unchecked` with reason `budget`. */
|
|
375
|
+
budget_ms?: number;
|
|
376
|
+
}
|
|
323
377
|
/**
|
|
324
378
|
* Union type for all possible sidecar requests
|
|
325
379
|
*/
|
|
326
|
-
export type SidecarRequest = RetypeCheckRequest | InitRequest | BundleRequest | EmitSurfaceRequest | CaptureV2Request | CheckV2Request | InferRequest | BuildWorkspaceRequest | CheckCompatibilityRequest | ResolveDefinitionsRequest | HealthRequest | ShutdownRequest;
|
|
380
|
+
export type SidecarRequest = RetypeCheckRequest | VerifyClientSemanticsRequest | InitRequest | BundleRequest | EmitSurfaceRequest | CaptureV2Request | CheckV2Request | InferRequest | BuildWorkspaceRequest | CheckCompatibilityRequest | ResolveDefinitionsRequest | HealthRequest | ShutdownRequest;
|
|
327
381
|
/**
|
|
328
382
|
* Request for a specific symbol to be bundled
|
|
329
383
|
*/
|
|
@@ -532,10 +586,37 @@ export interface RetypeCheckResponse extends BaseResponse {
|
|
|
532
586
|
outcomes?: RetypeOutcome[];
|
|
533
587
|
errors?: string[];
|
|
534
588
|
}
|
|
589
|
+
/**
|
|
590
|
+
* The verdict on one `(claim_id, receiver)` pair.
|
|
591
|
+
*
|
|
592
|
+
* - `verified`: the declarations satisfy the claim.
|
|
593
|
+
* - `failed`: the declarations resolved and contradict it.
|
|
594
|
+
* - `unchecked`: the declarations could not be read.
|
|
595
|
+
*/
|
|
596
|
+
export interface SemanticsResult {
|
|
597
|
+
claim_id: string;
|
|
598
|
+
receiver: string;
|
|
599
|
+
verdict: 'verified' | 'failed' | 'unchecked';
|
|
600
|
+
/** Absent exactly when verified. */
|
|
601
|
+
reason?: string;
|
|
602
|
+
}
|
|
603
|
+
/** How one package of the request resolved, for logs. */
|
|
604
|
+
export interface SemanticsModule {
|
|
605
|
+
package: string;
|
|
606
|
+
resolved_file?: string;
|
|
607
|
+
installed_version?: string;
|
|
608
|
+
reason?: string;
|
|
609
|
+
}
|
|
610
|
+
export interface VerifyClientSemanticsResponse extends BaseResponse {
|
|
611
|
+
/** Exactly one per check, in request order. */
|
|
612
|
+
semantics?: SemanticsResult[];
|
|
613
|
+
semantics_modules?: SemanticsModule[];
|
|
614
|
+
errors?: string[];
|
|
615
|
+
}
|
|
535
616
|
/**
|
|
536
617
|
* Union type for all possible sidecar responses
|
|
537
618
|
*/
|
|
538
|
-
export type SidecarResponse = RetypeCheckResponse | InitResponse | BundleResponse | EmitSurfaceResponse | CaptureV2Response | CheckV2Response | InferResponse | BuildWorkspaceResponse | CheckCompatibilityResponse | ResolveDefinitionsResponse | HealthResponse | ShutdownResponse | ErrorResponse;
|
|
619
|
+
export type SidecarResponse = RetypeCheckResponse | VerifyClientSemanticsResponse | InitResponse | BundleResponse | EmitSurfaceResponse | CaptureV2Response | CheckV2Response | InferResponse | BuildWorkspaceResponse | CheckCompatibilityResponse | ResolveDefinitionsResponse | HealthResponse | ShutdownResponse | ErrorResponse;
|
|
539
620
|
/**
|
|
540
621
|
* An entry in the type manifest
|
|
541
622
|
*/
|
|
@@ -1201,6 +1201,238 @@ export declare const RetypeCheckRequestSchema: z.ZodObject<{
|
|
|
1201
1201
|
}[];
|
|
1202
1202
|
budget_ms?: number | undefined;
|
|
1203
1203
|
}>;
|
|
1204
|
+
export declare const VerifyClientSemanticsRequestSchema: z.ZodObject<{
|
|
1205
|
+
request_id: z.ZodString;
|
|
1206
|
+
} & {
|
|
1207
|
+
action: z.ZodLiteral<"verify_client_semantics">;
|
|
1208
|
+
from_dir: z.ZodString;
|
|
1209
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
1210
|
+
claim_id: z.ZodString;
|
|
1211
|
+
package: z.ZodString;
|
|
1212
|
+
export: z.ZodString;
|
|
1213
|
+
receiver: z.ZodString;
|
|
1214
|
+
claim: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1215
|
+
kind: z.ZodLiteral<"factory">;
|
|
1216
|
+
member: z.ZodString;
|
|
1217
|
+
base_url_key: z.ZodString;
|
|
1218
|
+
}, "strip", z.ZodTypeAny, {
|
|
1219
|
+
kind: "factory";
|
|
1220
|
+
member: string;
|
|
1221
|
+
base_url_key: string;
|
|
1222
|
+
}, {
|
|
1223
|
+
kind: "factory";
|
|
1224
|
+
member: string;
|
|
1225
|
+
base_url_key: string;
|
|
1226
|
+
}>, z.ZodObject<{
|
|
1227
|
+
kind: z.ZodLiteral<"verb">;
|
|
1228
|
+
member: z.ZodString;
|
|
1229
|
+
method: z.ZodString;
|
|
1230
|
+
}, "strip", z.ZodTypeAny, {
|
|
1231
|
+
kind: "verb";
|
|
1232
|
+
member: string;
|
|
1233
|
+
method: string;
|
|
1234
|
+
}, {
|
|
1235
|
+
kind: "verb";
|
|
1236
|
+
member: string;
|
|
1237
|
+
method: string;
|
|
1238
|
+
}>, z.ZodObject<{
|
|
1239
|
+
kind: z.ZodLiteral<"verb_body">;
|
|
1240
|
+
member: z.ZodString;
|
|
1241
|
+
args: z.ZodEnum<["path_body", "path_options"]>;
|
|
1242
|
+
body_key: z.ZodOptional<z.ZodString>;
|
|
1243
|
+
}, "strip", z.ZodTypeAny, {
|
|
1244
|
+
kind: "verb_body";
|
|
1245
|
+
member: string;
|
|
1246
|
+
args: "path_body" | "path_options";
|
|
1247
|
+
body_key?: string | undefined;
|
|
1248
|
+
}, {
|
|
1249
|
+
kind: "verb_body";
|
|
1250
|
+
member: string;
|
|
1251
|
+
args: "path_body" | "path_options";
|
|
1252
|
+
body_key?: string | undefined;
|
|
1253
|
+
}>, z.ZodObject<{
|
|
1254
|
+
kind: z.ZodLiteral<"request">;
|
|
1255
|
+
member: z.ZodNullable<z.ZodString>;
|
|
1256
|
+
args: z.ZodEnum<["config", "path_options"]>;
|
|
1257
|
+
url_key: z.ZodOptional<z.ZodString>;
|
|
1258
|
+
method_key: z.ZodString;
|
|
1259
|
+
}, "strip", z.ZodTypeAny, {
|
|
1260
|
+
kind: "request";
|
|
1261
|
+
member: string | null;
|
|
1262
|
+
args: "path_options" | "config";
|
|
1263
|
+
method_key: string;
|
|
1264
|
+
url_key?: string | undefined;
|
|
1265
|
+
}, {
|
|
1266
|
+
kind: "request";
|
|
1267
|
+
member: string | null;
|
|
1268
|
+
args: "path_options" | "config";
|
|
1269
|
+
method_key: string;
|
|
1270
|
+
url_key?: string | undefined;
|
|
1271
|
+
}>, z.ZodObject<{
|
|
1272
|
+
kind: z.ZodLiteral<"request_body">;
|
|
1273
|
+
member: z.ZodNullable<z.ZodString>;
|
|
1274
|
+
args: z.ZodEnum<["config", "path_options"]>;
|
|
1275
|
+
url_key: z.ZodOptional<z.ZodString>;
|
|
1276
|
+
method_key: z.ZodString;
|
|
1277
|
+
body_key: z.ZodString;
|
|
1278
|
+
}, "strip", z.ZodTypeAny, {
|
|
1279
|
+
kind: "request_body";
|
|
1280
|
+
member: string | null;
|
|
1281
|
+
args: "path_options" | "config";
|
|
1282
|
+
body_key: string;
|
|
1283
|
+
method_key: string;
|
|
1284
|
+
url_key?: string | undefined;
|
|
1285
|
+
}, {
|
|
1286
|
+
kind: "request_body";
|
|
1287
|
+
member: string | null;
|
|
1288
|
+
args: "path_options" | "config";
|
|
1289
|
+
body_key: string;
|
|
1290
|
+
method_key: string;
|
|
1291
|
+
url_key?: string | undefined;
|
|
1292
|
+
}>]>;
|
|
1293
|
+
}, "strip", z.ZodTypeAny, {
|
|
1294
|
+
export: string;
|
|
1295
|
+
claim: {
|
|
1296
|
+
kind: "factory";
|
|
1297
|
+
member: string;
|
|
1298
|
+
base_url_key: string;
|
|
1299
|
+
} | {
|
|
1300
|
+
kind: "verb";
|
|
1301
|
+
member: string;
|
|
1302
|
+
method: string;
|
|
1303
|
+
} | {
|
|
1304
|
+
kind: "verb_body";
|
|
1305
|
+
member: string;
|
|
1306
|
+
args: "path_body" | "path_options";
|
|
1307
|
+
body_key?: string | undefined;
|
|
1308
|
+
} | {
|
|
1309
|
+
kind: "request";
|
|
1310
|
+
member: string | null;
|
|
1311
|
+
args: "path_options" | "config";
|
|
1312
|
+
method_key: string;
|
|
1313
|
+
url_key?: string | undefined;
|
|
1314
|
+
} | {
|
|
1315
|
+
kind: "request_body";
|
|
1316
|
+
member: string | null;
|
|
1317
|
+
args: "path_options" | "config";
|
|
1318
|
+
body_key: string;
|
|
1319
|
+
method_key: string;
|
|
1320
|
+
url_key?: string | undefined;
|
|
1321
|
+
};
|
|
1322
|
+
claim_id: string;
|
|
1323
|
+
package: string;
|
|
1324
|
+
receiver: string;
|
|
1325
|
+
}, {
|
|
1326
|
+
export: string;
|
|
1327
|
+
claim: {
|
|
1328
|
+
kind: "factory";
|
|
1329
|
+
member: string;
|
|
1330
|
+
base_url_key: string;
|
|
1331
|
+
} | {
|
|
1332
|
+
kind: "verb";
|
|
1333
|
+
member: string;
|
|
1334
|
+
method: string;
|
|
1335
|
+
} | {
|
|
1336
|
+
kind: "verb_body";
|
|
1337
|
+
member: string;
|
|
1338
|
+
args: "path_body" | "path_options";
|
|
1339
|
+
body_key?: string | undefined;
|
|
1340
|
+
} | {
|
|
1341
|
+
kind: "request";
|
|
1342
|
+
member: string | null;
|
|
1343
|
+
args: "path_options" | "config";
|
|
1344
|
+
method_key: string;
|
|
1345
|
+
url_key?: string | undefined;
|
|
1346
|
+
} | {
|
|
1347
|
+
kind: "request_body";
|
|
1348
|
+
member: string | null;
|
|
1349
|
+
args: "path_options" | "config";
|
|
1350
|
+
body_key: string;
|
|
1351
|
+
method_key: string;
|
|
1352
|
+
url_key?: string | undefined;
|
|
1353
|
+
};
|
|
1354
|
+
claim_id: string;
|
|
1355
|
+
package: string;
|
|
1356
|
+
receiver: string;
|
|
1357
|
+
}>, "many">;
|
|
1358
|
+
budget_ms: z.ZodOptional<z.ZodNumber>;
|
|
1359
|
+
}, "strip", z.ZodTypeAny, {
|
|
1360
|
+
request_id: string;
|
|
1361
|
+
action: "verify_client_semantics";
|
|
1362
|
+
checks: {
|
|
1363
|
+
export: string;
|
|
1364
|
+
claim: {
|
|
1365
|
+
kind: "factory";
|
|
1366
|
+
member: string;
|
|
1367
|
+
base_url_key: string;
|
|
1368
|
+
} | {
|
|
1369
|
+
kind: "verb";
|
|
1370
|
+
member: string;
|
|
1371
|
+
method: string;
|
|
1372
|
+
} | {
|
|
1373
|
+
kind: "verb_body";
|
|
1374
|
+
member: string;
|
|
1375
|
+
args: "path_body" | "path_options";
|
|
1376
|
+
body_key?: string | undefined;
|
|
1377
|
+
} | {
|
|
1378
|
+
kind: "request";
|
|
1379
|
+
member: string | null;
|
|
1380
|
+
args: "path_options" | "config";
|
|
1381
|
+
method_key: string;
|
|
1382
|
+
url_key?: string | undefined;
|
|
1383
|
+
} | {
|
|
1384
|
+
kind: "request_body";
|
|
1385
|
+
member: string | null;
|
|
1386
|
+
args: "path_options" | "config";
|
|
1387
|
+
body_key: string;
|
|
1388
|
+
method_key: string;
|
|
1389
|
+
url_key?: string | undefined;
|
|
1390
|
+
};
|
|
1391
|
+
claim_id: string;
|
|
1392
|
+
package: string;
|
|
1393
|
+
receiver: string;
|
|
1394
|
+
}[];
|
|
1395
|
+
from_dir: string;
|
|
1396
|
+
budget_ms?: number | undefined;
|
|
1397
|
+
}, {
|
|
1398
|
+
request_id: string;
|
|
1399
|
+
action: "verify_client_semantics";
|
|
1400
|
+
checks: {
|
|
1401
|
+
export: string;
|
|
1402
|
+
claim: {
|
|
1403
|
+
kind: "factory";
|
|
1404
|
+
member: string;
|
|
1405
|
+
base_url_key: string;
|
|
1406
|
+
} | {
|
|
1407
|
+
kind: "verb";
|
|
1408
|
+
member: string;
|
|
1409
|
+
method: string;
|
|
1410
|
+
} | {
|
|
1411
|
+
kind: "verb_body";
|
|
1412
|
+
member: string;
|
|
1413
|
+
args: "path_body" | "path_options";
|
|
1414
|
+
body_key?: string | undefined;
|
|
1415
|
+
} | {
|
|
1416
|
+
kind: "request";
|
|
1417
|
+
member: string | null;
|
|
1418
|
+
args: "path_options" | "config";
|
|
1419
|
+
method_key: string;
|
|
1420
|
+
url_key?: string | undefined;
|
|
1421
|
+
} | {
|
|
1422
|
+
kind: "request_body";
|
|
1423
|
+
member: string | null;
|
|
1424
|
+
args: "path_options" | "config";
|
|
1425
|
+
body_key: string;
|
|
1426
|
+
method_key: string;
|
|
1427
|
+
url_key?: string | undefined;
|
|
1428
|
+
};
|
|
1429
|
+
claim_id: string;
|
|
1430
|
+
package: string;
|
|
1431
|
+
receiver: string;
|
|
1432
|
+
}[];
|
|
1433
|
+
from_dir: string;
|
|
1434
|
+
budget_ms?: number | undefined;
|
|
1435
|
+
}>;
|
|
1204
1436
|
/**
|
|
1205
1437
|
* The main sidecar request schema - a discriminated union on the 'action' field
|
|
1206
1438
|
*/
|
|
@@ -2312,6 +2544,237 @@ export declare const SidecarRequestSchema: z.ZodDiscriminatedUnion<"action", [z.
|
|
|
2312
2544
|
budget_ms?: number | undefined;
|
|
2313
2545
|
}>, z.ZodObject<{
|
|
2314
2546
|
request_id: z.ZodString;
|
|
2547
|
+
} & {
|
|
2548
|
+
action: z.ZodLiteral<"verify_client_semantics">;
|
|
2549
|
+
from_dir: z.ZodString;
|
|
2550
|
+
checks: z.ZodArray<z.ZodObject<{
|
|
2551
|
+
claim_id: z.ZodString;
|
|
2552
|
+
package: z.ZodString;
|
|
2553
|
+
export: z.ZodString;
|
|
2554
|
+
receiver: z.ZodString;
|
|
2555
|
+
claim: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
2556
|
+
kind: z.ZodLiteral<"factory">;
|
|
2557
|
+
member: z.ZodString;
|
|
2558
|
+
base_url_key: z.ZodString;
|
|
2559
|
+
}, "strip", z.ZodTypeAny, {
|
|
2560
|
+
kind: "factory";
|
|
2561
|
+
member: string;
|
|
2562
|
+
base_url_key: string;
|
|
2563
|
+
}, {
|
|
2564
|
+
kind: "factory";
|
|
2565
|
+
member: string;
|
|
2566
|
+
base_url_key: string;
|
|
2567
|
+
}>, z.ZodObject<{
|
|
2568
|
+
kind: z.ZodLiteral<"verb">;
|
|
2569
|
+
member: z.ZodString;
|
|
2570
|
+
method: z.ZodString;
|
|
2571
|
+
}, "strip", z.ZodTypeAny, {
|
|
2572
|
+
kind: "verb";
|
|
2573
|
+
member: string;
|
|
2574
|
+
method: string;
|
|
2575
|
+
}, {
|
|
2576
|
+
kind: "verb";
|
|
2577
|
+
member: string;
|
|
2578
|
+
method: string;
|
|
2579
|
+
}>, z.ZodObject<{
|
|
2580
|
+
kind: z.ZodLiteral<"verb_body">;
|
|
2581
|
+
member: z.ZodString;
|
|
2582
|
+
args: z.ZodEnum<["path_body", "path_options"]>;
|
|
2583
|
+
body_key: z.ZodOptional<z.ZodString>;
|
|
2584
|
+
}, "strip", z.ZodTypeAny, {
|
|
2585
|
+
kind: "verb_body";
|
|
2586
|
+
member: string;
|
|
2587
|
+
args: "path_body" | "path_options";
|
|
2588
|
+
body_key?: string | undefined;
|
|
2589
|
+
}, {
|
|
2590
|
+
kind: "verb_body";
|
|
2591
|
+
member: string;
|
|
2592
|
+
args: "path_body" | "path_options";
|
|
2593
|
+
body_key?: string | undefined;
|
|
2594
|
+
}>, z.ZodObject<{
|
|
2595
|
+
kind: z.ZodLiteral<"request">;
|
|
2596
|
+
member: z.ZodNullable<z.ZodString>;
|
|
2597
|
+
args: z.ZodEnum<["config", "path_options"]>;
|
|
2598
|
+
url_key: z.ZodOptional<z.ZodString>;
|
|
2599
|
+
method_key: z.ZodString;
|
|
2600
|
+
}, "strip", z.ZodTypeAny, {
|
|
2601
|
+
kind: "request";
|
|
2602
|
+
member: string | null;
|
|
2603
|
+
args: "path_options" | "config";
|
|
2604
|
+
method_key: string;
|
|
2605
|
+
url_key?: string | undefined;
|
|
2606
|
+
}, {
|
|
2607
|
+
kind: "request";
|
|
2608
|
+
member: string | null;
|
|
2609
|
+
args: "path_options" | "config";
|
|
2610
|
+
method_key: string;
|
|
2611
|
+
url_key?: string | undefined;
|
|
2612
|
+
}>, z.ZodObject<{
|
|
2613
|
+
kind: z.ZodLiteral<"request_body">;
|
|
2614
|
+
member: z.ZodNullable<z.ZodString>;
|
|
2615
|
+
args: z.ZodEnum<["config", "path_options"]>;
|
|
2616
|
+
url_key: z.ZodOptional<z.ZodString>;
|
|
2617
|
+
method_key: z.ZodString;
|
|
2618
|
+
body_key: z.ZodString;
|
|
2619
|
+
}, "strip", z.ZodTypeAny, {
|
|
2620
|
+
kind: "request_body";
|
|
2621
|
+
member: string | null;
|
|
2622
|
+
args: "path_options" | "config";
|
|
2623
|
+
body_key: string;
|
|
2624
|
+
method_key: string;
|
|
2625
|
+
url_key?: string | undefined;
|
|
2626
|
+
}, {
|
|
2627
|
+
kind: "request_body";
|
|
2628
|
+
member: string | null;
|
|
2629
|
+
args: "path_options" | "config";
|
|
2630
|
+
body_key: string;
|
|
2631
|
+
method_key: string;
|
|
2632
|
+
url_key?: string | undefined;
|
|
2633
|
+
}>]>;
|
|
2634
|
+
}, "strip", z.ZodTypeAny, {
|
|
2635
|
+
export: string;
|
|
2636
|
+
claim: {
|
|
2637
|
+
kind: "factory";
|
|
2638
|
+
member: string;
|
|
2639
|
+
base_url_key: string;
|
|
2640
|
+
} | {
|
|
2641
|
+
kind: "verb";
|
|
2642
|
+
member: string;
|
|
2643
|
+
method: string;
|
|
2644
|
+
} | {
|
|
2645
|
+
kind: "verb_body";
|
|
2646
|
+
member: string;
|
|
2647
|
+
args: "path_body" | "path_options";
|
|
2648
|
+
body_key?: string | undefined;
|
|
2649
|
+
} | {
|
|
2650
|
+
kind: "request";
|
|
2651
|
+
member: string | null;
|
|
2652
|
+
args: "path_options" | "config";
|
|
2653
|
+
method_key: string;
|
|
2654
|
+
url_key?: string | undefined;
|
|
2655
|
+
} | {
|
|
2656
|
+
kind: "request_body";
|
|
2657
|
+
member: string | null;
|
|
2658
|
+
args: "path_options" | "config";
|
|
2659
|
+
body_key: string;
|
|
2660
|
+
method_key: string;
|
|
2661
|
+
url_key?: string | undefined;
|
|
2662
|
+
};
|
|
2663
|
+
claim_id: string;
|
|
2664
|
+
package: string;
|
|
2665
|
+
receiver: string;
|
|
2666
|
+
}, {
|
|
2667
|
+
export: string;
|
|
2668
|
+
claim: {
|
|
2669
|
+
kind: "factory";
|
|
2670
|
+
member: string;
|
|
2671
|
+
base_url_key: string;
|
|
2672
|
+
} | {
|
|
2673
|
+
kind: "verb";
|
|
2674
|
+
member: string;
|
|
2675
|
+
method: string;
|
|
2676
|
+
} | {
|
|
2677
|
+
kind: "verb_body";
|
|
2678
|
+
member: string;
|
|
2679
|
+
args: "path_body" | "path_options";
|
|
2680
|
+
body_key?: string | undefined;
|
|
2681
|
+
} | {
|
|
2682
|
+
kind: "request";
|
|
2683
|
+
member: string | null;
|
|
2684
|
+
args: "path_options" | "config";
|
|
2685
|
+
method_key: string;
|
|
2686
|
+
url_key?: string | undefined;
|
|
2687
|
+
} | {
|
|
2688
|
+
kind: "request_body";
|
|
2689
|
+
member: string | null;
|
|
2690
|
+
args: "path_options" | "config";
|
|
2691
|
+
body_key: string;
|
|
2692
|
+
method_key: string;
|
|
2693
|
+
url_key?: string | undefined;
|
|
2694
|
+
};
|
|
2695
|
+
claim_id: string;
|
|
2696
|
+
package: string;
|
|
2697
|
+
receiver: string;
|
|
2698
|
+
}>, "many">;
|
|
2699
|
+
budget_ms: z.ZodOptional<z.ZodNumber>;
|
|
2700
|
+
}, "strip", z.ZodTypeAny, {
|
|
2701
|
+
request_id: string;
|
|
2702
|
+
action: "verify_client_semantics";
|
|
2703
|
+
checks: {
|
|
2704
|
+
export: string;
|
|
2705
|
+
claim: {
|
|
2706
|
+
kind: "factory";
|
|
2707
|
+
member: string;
|
|
2708
|
+
base_url_key: string;
|
|
2709
|
+
} | {
|
|
2710
|
+
kind: "verb";
|
|
2711
|
+
member: string;
|
|
2712
|
+
method: string;
|
|
2713
|
+
} | {
|
|
2714
|
+
kind: "verb_body";
|
|
2715
|
+
member: string;
|
|
2716
|
+
args: "path_body" | "path_options";
|
|
2717
|
+
body_key?: string | undefined;
|
|
2718
|
+
} | {
|
|
2719
|
+
kind: "request";
|
|
2720
|
+
member: string | null;
|
|
2721
|
+
args: "path_options" | "config";
|
|
2722
|
+
method_key: string;
|
|
2723
|
+
url_key?: string | undefined;
|
|
2724
|
+
} | {
|
|
2725
|
+
kind: "request_body";
|
|
2726
|
+
member: string | null;
|
|
2727
|
+
args: "path_options" | "config";
|
|
2728
|
+
body_key: string;
|
|
2729
|
+
method_key: string;
|
|
2730
|
+
url_key?: string | undefined;
|
|
2731
|
+
};
|
|
2732
|
+
claim_id: string;
|
|
2733
|
+
package: string;
|
|
2734
|
+
receiver: string;
|
|
2735
|
+
}[];
|
|
2736
|
+
from_dir: string;
|
|
2737
|
+
budget_ms?: number | undefined;
|
|
2738
|
+
}, {
|
|
2739
|
+
request_id: string;
|
|
2740
|
+
action: "verify_client_semantics";
|
|
2741
|
+
checks: {
|
|
2742
|
+
export: string;
|
|
2743
|
+
claim: {
|
|
2744
|
+
kind: "factory";
|
|
2745
|
+
member: string;
|
|
2746
|
+
base_url_key: string;
|
|
2747
|
+
} | {
|
|
2748
|
+
kind: "verb";
|
|
2749
|
+
member: string;
|
|
2750
|
+
method: string;
|
|
2751
|
+
} | {
|
|
2752
|
+
kind: "verb_body";
|
|
2753
|
+
member: string;
|
|
2754
|
+
args: "path_body" | "path_options";
|
|
2755
|
+
body_key?: string | undefined;
|
|
2756
|
+
} | {
|
|
2757
|
+
kind: "request";
|
|
2758
|
+
member: string | null;
|
|
2759
|
+
args: "path_options" | "config";
|
|
2760
|
+
method_key: string;
|
|
2761
|
+
url_key?: string | undefined;
|
|
2762
|
+
} | {
|
|
2763
|
+
kind: "request_body";
|
|
2764
|
+
member: string | null;
|
|
2765
|
+
args: "path_options" | "config";
|
|
2766
|
+
body_key: string;
|
|
2767
|
+
method_key: string;
|
|
2768
|
+
url_key?: string | undefined;
|
|
2769
|
+
};
|
|
2770
|
+
claim_id: string;
|
|
2771
|
+
package: string;
|
|
2772
|
+
receiver: string;
|
|
2773
|
+
}[];
|
|
2774
|
+
from_dir: string;
|
|
2775
|
+
budget_ms?: number | undefined;
|
|
2776
|
+
}>, z.ZodObject<{
|
|
2777
|
+
request_id: z.ZodString;
|
|
2315
2778
|
} & {
|
|
2316
2779
|
action: z.ZodLiteral<"health">;
|
|
2317
2780
|
}, "strip", z.ZodTypeAny, {
|