carrick 0.3.136 → 0.3.138
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/package.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/scripts/install-scanned-deps.sh +142 -2
- package/sidecar/dist/src/capture/api.d.ts +7 -0
- package/sidecar/dist/src/capture/check.d.ts +33 -0
- package/sidecar/dist/src/capture/check.js +102 -10
- package/sidecar/dist/src/index.js +1 -1
- package/sidecar/dist/src/library-claims.d.ts +25 -1
- package/sidecar/dist/src/library-claims.js +1348 -94
- package/sidecar/dist/src/result-candidates.d.ts +7 -0
- package/sidecar/dist/src/result-candidates.js +12 -5
- package/sidecar/dist/src/runtime-emitter.d.ts +39 -0
- package/sidecar/dist/src/runtime-emitter.js +65 -0
- package/sidecar/dist/src/server-labels.js +2 -2
- package/sidecar/dist/src/stated-params.d.ts +73 -3
- package/sidecar/dist/src/stated-params.js +292 -9
- package/sidecar/dist/src/type-inferrer.d.ts +17 -35
- package/sidecar/dist/src/type-inferrer.js +81 -82
- package/sidecar/dist/src/types.d.ts +125 -13
- package/sidecar/dist/src/validators.d.ts +1422 -162
- package/sidecar/dist/src/validators.js +39 -5
|
@@ -376,14 +376,38 @@ export const VerifyClientSemanticsRequestSchema = BaseRequestSchema.extend({
|
|
|
376
376
|
checks: z.array(SemanticsCheckSchema),
|
|
377
377
|
budget_ms: z.number().int().nonnegative().optional(),
|
|
378
378
|
});
|
|
379
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* Where one part of a library call sits (carrick#1616). Amendment 7 of
|
|
381
|
+
* carrick#2434 adds `at`, a member path walked from the value there (`[]`
|
|
382
|
+
* steps into an array element), and `each`, a rest slot every element of
|
|
383
|
+
* which is read.
|
|
384
|
+
*/
|
|
380
385
|
const ClaimSlotSchema = z
|
|
381
386
|
.object({
|
|
382
387
|
arg: z.number().int().nonnegative(),
|
|
383
388
|
key: z.string().min(1).optional(),
|
|
389
|
+
at: z.array(z.string().min(1)).optional(),
|
|
390
|
+
each: z.boolean().optional(),
|
|
391
|
+
})
|
|
392
|
+
.strict();
|
|
393
|
+
/** A slot that holds a name: also read as a GraphQL document, or as the name of a function or class (amendment 7). */
|
|
394
|
+
const NameSlotSchema = ClaimSlotSchema.extend({
|
|
395
|
+
document: z.literal('graphql').optional(),
|
|
396
|
+
ref: z.enum(['function', 'class']).optional(),
|
|
397
|
+
}).strict();
|
|
398
|
+
/** The shapes a name takes beside a slot (amendment 7): two or three slots joined, or a name the library fixes. */
|
|
399
|
+
const NamePartsSchema = z
|
|
400
|
+
.object({ parts: z.array(ClaimSlotSchema).min(2).max(3), join: z.string().optional() })
|
|
401
|
+
.strict();
|
|
402
|
+
const NameLiteralSchema = z.object({ literal: z.string().min(1) }).strict();
|
|
403
|
+
const BoundNameSchema = z
|
|
404
|
+
.object({
|
|
405
|
+
bound: z.enum(['maker', 'scope', 'key', 'path', 'export', 'subscribed']),
|
|
406
|
+
join: z.string().min(1).optional(),
|
|
407
|
+
param: z.number().int().nonnegative().optional(),
|
|
408
|
+
at: z.array(z.string().min(1)).optional(),
|
|
384
409
|
})
|
|
385
410
|
.strict();
|
|
386
|
-
const BoundNameSchema = z.object({ bound: z.enum(['maker', 'scope', 'key']) }).strict();
|
|
387
411
|
/** Procedure routers (#2474 R6a): where a router member takes its procedures, and how nested keys join. */
|
|
388
412
|
const CollectsSchema = z
|
|
389
413
|
.object({
|
|
@@ -409,6 +433,7 @@ const YieldsSchema = z
|
|
|
409
433
|
param: z.number().int().nonnegative(),
|
|
410
434
|
export: z.string().min(1),
|
|
411
435
|
side: z.string().min(1),
|
|
436
|
+
package: z.string().min(1).optional(),
|
|
412
437
|
})
|
|
413
438
|
.strict();
|
|
414
439
|
/** Route fields (#2474 R0): member paths read off a handler's request parameter. */
|
|
@@ -448,7 +473,7 @@ const LibraryClaimSchema = z.discriminatedUnion('kind', [
|
|
|
448
473
|
member: z.string().min(1).nullable(),
|
|
449
474
|
base: ClaimSlotSchema.optional(),
|
|
450
475
|
prefix: ClaimSlotSchema.optional(),
|
|
451
|
-
name:
|
|
476
|
+
name: NameSlotSchema.optional(),
|
|
452
477
|
handler: ClaimSlotSchema.optional(),
|
|
453
478
|
runs: ClaimSlotSchema.optional(),
|
|
454
479
|
key_labels: KeyLabelsSchema.optional(),
|
|
@@ -461,8 +486,9 @@ const LibraryClaimSchema = z.discriminatedUnion('kind', [
|
|
|
461
486
|
.object({
|
|
462
487
|
kind: z.literal('scope'),
|
|
463
488
|
member: z.string().min(1),
|
|
489
|
+
form: z.enum(['call', 'decorate']).optional(),
|
|
464
490
|
// Exactly one of `name` and `collects`: the verifier's verdict (#2474 R6a).
|
|
465
|
-
name:
|
|
491
|
+
name: NameSlotSchema.optional(),
|
|
466
492
|
path: MemberPathSchema.optional(),
|
|
467
493
|
on: ClaimOnSchema.optional(),
|
|
468
494
|
of: z.string().min(1).optional(),
|
|
@@ -483,7 +509,14 @@ const LibraryClaimSchema = z.discriminatedUnion('kind', [
|
|
|
483
509
|
path: MemberPathSchema.optional(),
|
|
484
510
|
on: ClaimOnSchema.optional(),
|
|
485
511
|
of: z.string().min(1).optional(),
|
|
486
|
-
|
|
512
|
+
form: z.enum(['call', 'new', 'set', 'override', 'decorate']).optional(),
|
|
513
|
+
protocol: z.enum(['http', 'graphql', 'rpc', 'socket', 'message']).optional(),
|
|
514
|
+
when: z
|
|
515
|
+
.object({ arg: z.number().int().nonnegative(), key: z.string().min(1).optional(), literal: z.string().min(1) })
|
|
516
|
+
.strict()
|
|
517
|
+
.optional(),
|
|
518
|
+
returns: z.object({ result: ResultShapeSchema.optional() }).strict().optional(),
|
|
519
|
+
name: z.union([BoundNameSchema, NamePartsSchema, NameLiteralSchema, NameSlotSchema]).optional(),
|
|
487
520
|
payload: ClaimSlotSchema.optional(),
|
|
488
521
|
handler: ClaimSlotSchema.optional(),
|
|
489
522
|
ack: ClaimSlotSchema.optional(),
|
|
@@ -589,6 +622,7 @@ export const ListLibrarySurfaceRequestSchema = BaseRequestSchema.extend({
|
|
|
589
622
|
max_entries: z.number().int().positive().optional(),
|
|
590
623
|
exports: z.record(z.string(), z.array(z.string().min(1))).optional(),
|
|
591
624
|
handlers: z.boolean().optional(),
|
|
625
|
+
types: z.boolean().optional(),
|
|
592
626
|
result_candidates: z.boolean().optional(),
|
|
593
627
|
max_handler_members: z.number().int().positive().optional(),
|
|
594
628
|
});
|