carrick 0.3.156 → 0.3.158
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/dist/cli.d.ts +7 -0
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/contract.d.ts +8 -1
- package/dist/contract.js.map +1 -1
- package/dist/engine-ask.d.ts +21 -0
- package/dist/engine-ask.js +50 -0
- package/dist/engine-ask.js.map +1 -0
- package/dist/facts/diff.d.ts +14 -1
- package/dist/facts/diff.js +21 -8
- package/dist/facts/diff.js.map +1 -1
- package/dist/facts/enabled.d.ts +6 -0
- package/dist/facts/enabled.js +8 -0
- package/dist/facts/enabled.js.map +1 -1
- package/dist/facts/fetch.d.ts +7 -0
- package/dist/facts/fetch.js +24 -2
- package/dist/facts/fetch.js.map +1 -1
- package/dist/facts/lines.d.ts +22 -4
- package/dist/facts/lines.js +31 -9
- package/dist/facts/lines.js.map +1 -1
- package/dist/facts/peers.d.ts +13 -4
- package/dist/facts/peers.js +17 -15
- package/dist/facts/peers.js.map +1 -1
- package/dist/facts/rules/packages.js +3 -1
- package/dist/facts/rules/packages.js.map +1 -1
- package/dist/facts/rules/same-name.js +1 -1
- package/dist/facts/rules/same-name.js.map +1 -1
- package/dist/facts/store.d.ts +15 -0
- package/dist/facts/store.js +30 -0
- package/dist/facts/store.js.map +1 -1
- package/dist/held/backoff.d.ts +8 -0
- package/dist/held/backoff.js +43 -0
- package/dist/held/backoff.js.map +1 -0
- package/dist/held/build.d.ts +17 -0
- package/dist/held/build.js +62 -0
- package/dist/held/build.js.map +1 -0
- package/dist/held/client.d.ts +43 -0
- package/dist/held/client.js +200 -0
- package/dist/held/client.js.map +1 -0
- package/dist/held/daemon.d.ts +151 -0
- package/dist/held/daemon.js +399 -0
- package/dist/held/daemon.js.map +1 -0
- package/dist/held/early.d.ts +28 -0
- package/dist/held/early.js +115 -0
- package/dist/held/early.js.map +1 -0
- package/dist/held/engine.d.ts +50 -0
- package/dist/held/engine.js +166 -0
- package/dist/held/engine.js.map +1 -0
- package/dist/held/paths.d.ts +15 -0
- package/dist/held/paths.js +44 -0
- package/dist/held/paths.js.map +1 -0
- package/dist/held/place.d.ts +130 -0
- package/dist/held/place.js +236 -0
- package/dist/held/place.js.map +1 -0
- package/dist/held/registry.d.ts +22 -0
- package/dist/held/registry.js +72 -0
- package/dist/held/registry.js.map +1 -0
- package/dist/held/run.d.ts +2 -0
- package/dist/held/run.js +78 -0
- package/dist/held/run.js.map +1 -0
- package/dist/held/runtime.d.ts +22 -0
- package/dist/held/runtime.js +612 -0
- package/dist/held/runtime.js.map +1 -0
- package/dist/held/shadow.d.ts +33 -0
- package/dist/held/shadow.js +68 -0
- package/dist/held/shadow.js.map +1 -0
- package/dist/held/steps.d.ts +11 -0
- package/dist/held/steps.js +29 -0
- package/dist/held/steps.js.map +1 -0
- package/dist/hook/bash-targets.d.ts +7 -2
- package/dist/hook/bash-targets.js +82 -27
- package/dist/hook/bash-targets.js.map +1 -1
- package/dist/hook/confirm.d.ts +79 -0
- package/dist/hook/confirm.js +220 -0
- package/dist/hook/confirm.js.map +1 -0
- package/dist/hook/edit-flow.d.ts +14 -3
- package/dist/hook/edit-flow.js +113 -33
- package/dist/hook/edit-flow.js.map +1 -1
- package/dist/hook/generation.d.ts +19 -0
- package/dist/hook/generation.js +75 -0
- package/dist/hook/generation.js.map +1 -0
- package/dist/hook/late.d.ts +50 -9
- package/dist/hook/late.js +104 -24
- package/dist/hook/late.js.map +1 -1
- package/dist/hook/lock.d.ts +26 -0
- package/dist/hook/lock.js +122 -0
- package/dist/hook/lock.js.map +1 -0
- package/dist/hook/post-bash.js +17 -8
- package/dist/hook/post-bash.js.map +1 -1
- package/dist/hook/post-edit.js +2 -2
- package/dist/hook/post-edit.js.map +1 -1
- package/dist/hook/post-read.js +25 -3
- package/dist/hook/post-read.js.map +1 -1
- package/dist/hook/post-search.js +1 -1
- package/dist/hook/post-search.js.map +1 -1
- package/dist/hook/probe.js +1 -0
- package/dist/hook/probe.js.map +1 -1
- package/dist/hook/read-answer.d.ts +5 -0
- package/dist/hook/read-answer.js +8 -4
- package/dist/hook/read-answer.js.map +1 -1
- package/dist/hook/rechecks.d.ts +59 -2
- package/dist/hook/rechecks.js +129 -119
- package/dist/hook/rechecks.js.map +1 -1
- package/dist/hook/session-start.d.ts +1 -1
- package/dist/hook/session-start.js +19 -5
- package/dist/hook/session-start.js.map +1 -1
- package/dist/hook/similar.d.ts +1 -1
- package/dist/hook/similar.js +21 -8
- package/dist/hook/similar.js.map +1 -1
- package/dist/hook/stop-wait.js +35 -16
- package/dist/hook/stop-wait.js.map +1 -1
- package/dist/hook/timings.d.ts +30 -2
- package/dist/hook/timings.js +8 -2
- package/dist/hook/timings.js.map +1 -1
- package/dist/hook/user-prompt.js +2 -2
- package/dist/hook/user-prompt.js.map +1 -1
- package/dist/hosted-snapshot.d.ts +27 -0
- package/dist/hosted-snapshot.js +32 -0
- package/dist/hosted-snapshot.js.map +1 -1
- package/dist/init/hosted.js +2 -9
- package/dist/init/hosted.js.map +1 -1
- package/dist/lsp-frame.d.ts +20 -0
- package/dist/lsp-frame.js +47 -0
- package/dist/lsp-frame.js.map +1 -0
- package/dist/render.d.ts +15 -1
- package/dist/render.js +50 -4
- package/dist/render.js.map +1 -1
- package/dist/server.js +5 -29
- package/dist/server.js.map +1 -1
- package/package.json +6 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/sidecar/dist/src/capture/anchors.d.ts +8 -0
- package/sidecar/dist/src/capture/anchors.js +3 -2
- package/sidecar/dist/src/capture/api.d.ts +98 -1
- package/sidecar/dist/src/capture/check-classify.d.ts +7 -0
- package/sidecar/dist/src/capture/check-classify.js +24 -0
- package/sidecar/dist/src/capture/check-probe.d.ts +86 -11
- package/sidecar/dist/src/capture/check-probe.js +175 -22
- package/sidecar/dist/src/capture/check.js +13 -1
- package/sidecar/dist/src/capture/graphql-leaves.d.ts +46 -0
- package/sidecar/dist/src/capture/graphql-leaves.js +142 -0
- package/sidecar/dist/src/capture/index.d.ts +12 -3
- package/sidecar/dist/src/capture/index.js +11 -2
- package/sidecar/dist/src/capture/result-label.js +3 -1
- package/sidecar/dist/src/capture/type-reasons.json +78 -0
- package/sidecar/dist/src/definition-resolver.d.ts +6 -5
- package/sidecar/dist/src/definition-resolver.js +20 -15
- package/sidecar/dist/src/engine-stamp.json +1 -0
- package/sidecar/dist/src/held-shadow.d.ts +70 -0
- package/sidecar/dist/src/held-shadow.js +222 -0
- package/sidecar/dist/src/index.js +65 -2
- package/sidecar/dist/src/library-claims.d.ts +3 -1
- package/sidecar/dist/src/library-claims.js +105 -6
- package/sidecar/dist/src/retype.d.ts +47 -0
- package/sidecar/dist/src/retype.js +274 -18
- package/sidecar/dist/src/site-find.d.ts +27 -0
- package/sidecar/dist/src/site-find.js +109 -0
- package/sidecar/dist/src/type-home.d.ts +12 -0
- package/sidecar/dist/src/type-home.js +41 -1
- package/sidecar/dist/src/type-inferrer.d.ts +13 -3
- package/sidecar/dist/src/type-inferrer.js +44 -22
- package/sidecar/dist/src/type-structural-expander.d.ts +11 -11
- package/sidecar/dist/src/type-structural-expander.js +73 -4
- package/sidecar/dist/src/types.d.ts +91 -5
- package/sidecar/dist/src/validators.d.ts +621 -254
- package/sidecar/dist/src/validators.js +37 -0
|
@@ -244,9 +244,24 @@ export const CaptureV2RequestSchema = BaseRequestSchema.extend({
|
|
|
244
244
|
backfill_texts: z.record(z.string()).optional(),
|
|
245
245
|
backfill_out_dir: z.string().min(1).optional(),
|
|
246
246
|
});
|
|
247
|
+
const GraphqlLeafSchema = z.lazy(() => z.union([
|
|
248
|
+
z.object({ scalar: z.string().min(1) }).strict(),
|
|
249
|
+
z.object({ enum: z.string().min(1) }).strict(),
|
|
250
|
+
z.object({ list: GraphqlLeafSchema }).strict(),
|
|
251
|
+
z.object({ non_null: GraphqlLeafSchema }).strict(),
|
|
252
|
+
z.object({ type: z.string().min(1) }).strict(),
|
|
253
|
+
]));
|
|
254
|
+
/** carrick#4403: a service's SDL output types by name (`GraphqlTypes`). */
|
|
255
|
+
const GraphqlTypesSchema = z.record(z.union([
|
|
256
|
+
z.object({ fields: z.record(GraphqlLeafSchema) }).strict(),
|
|
257
|
+
z.object({ members: z.array(z.string().min(1)) }).strict(),
|
|
258
|
+
]));
|
|
259
|
+
/** carrick#4403: the root field a GraphQL producer response answers. */
|
|
260
|
+
const GraphqlRootSchema = z.object({ type: z.string().min(1), field: z.string().min(1) });
|
|
247
261
|
const CheckStubInputSchema = z.object({
|
|
248
262
|
service_name: z.string().min(1),
|
|
249
263
|
stub_dir: z.string().min(1),
|
|
264
|
+
graphql_types: GraphqlTypesSchema.optional(),
|
|
250
265
|
});
|
|
251
266
|
const CheckPairEndpointSchema = z.object({
|
|
252
267
|
service_name: z.string().min(1),
|
|
@@ -260,6 +275,8 @@ const CheckPairSpecSchema = z
|
|
|
260
275
|
producer: CheckPairEndpointSchema,
|
|
261
276
|
consumer: CheckPairEndpointSchema,
|
|
262
277
|
topic: z.string().min(1).optional(),
|
|
278
|
+
procedure: z.literal(true).optional(),
|
|
279
|
+
graphql_root: GraphqlRootSchema.optional(),
|
|
263
280
|
})
|
|
264
281
|
.superRefine((spec, ctx) => {
|
|
265
282
|
// carrick#1979: the topic is the pub/sub operation's own key. It is
|
|
@@ -303,6 +320,18 @@ export const ShutdownRequestSchema = BaseRequestSchema.extend({
|
|
|
303
320
|
export const ListProgramFilesRequestSchema = BaseRequestSchema.extend({
|
|
304
321
|
action: z.literal('list_program_files'),
|
|
305
322
|
});
|
|
323
|
+
export const WriteShadowRequestSchema = BaseRequestSchema.extend({
|
|
324
|
+
action: z.literal('write_shadow'),
|
|
325
|
+
out_dir: z.string().min(1),
|
|
326
|
+
});
|
|
327
|
+
export const FindSiteRequestSchema = BaseRequestSchema.extend({
|
|
328
|
+
action: z.literal('find_site'),
|
|
329
|
+
file: z.string().min(1),
|
|
330
|
+
oldText: z.string(),
|
|
331
|
+
newText: z.string(),
|
|
332
|
+
start: z.number().int().nonnegative(),
|
|
333
|
+
end: z.number().int().nonnegative(),
|
|
334
|
+
});
|
|
306
335
|
export const ReachGraphRequestSchema = BaseRequestSchema.extend({
|
|
307
336
|
action: z.literal('reach_graph'),
|
|
308
337
|
});
|
|
@@ -355,6 +384,7 @@ export const ImplementationsRequestSchema = BaseRequestSchema.extend({
|
|
|
355
384
|
export const ResolveDefinitionsRequestSchema = BaseRequestSchema.extend({
|
|
356
385
|
action: z.literal('resolve_definitions'),
|
|
357
386
|
stub_dir: z.string().min(1, 'Stub dir cannot be empty'),
|
|
387
|
+
graphql_types: GraphqlTypesSchema.optional(),
|
|
358
388
|
aliases: z
|
|
359
389
|
.array(z.object({
|
|
360
390
|
alias: z.string().min(1),
|
|
@@ -362,6 +392,7 @@ export const ResolveDefinitionsRequestSchema = BaseRequestSchema.extend({
|
|
|
362
392
|
type_kind: z.enum(['request', 'response']),
|
|
363
393
|
side: z.enum(['producer', 'consumer']),
|
|
364
394
|
procedure: z.boolean(),
|
|
395
|
+
graphql_root: GraphqlRootSchema.optional(),
|
|
365
396
|
}))
|
|
366
397
|
.min(1, 'At least one alias is required'),
|
|
367
398
|
});
|
|
@@ -382,6 +413,7 @@ const RetypeItemSchema = RetypeLocatorItemSchema.extend({
|
|
|
382
413
|
producer_type: z.string().min(1),
|
|
383
414
|
producer_unwidened_type: z.string().min(1).optional(),
|
|
384
415
|
wire: z.boolean(),
|
|
416
|
+
procedure_path: z.string().min(1).optional(),
|
|
385
417
|
});
|
|
386
418
|
export const RetypeCheckRequestSchema = BaseRequestSchema.extend({
|
|
387
419
|
action: z.literal('retype_check'),
|
|
@@ -550,6 +582,8 @@ const LibraryClaimSchema = z.discriminatedUnion('kind', [
|
|
|
550
582
|
kind: z.literal('make'),
|
|
551
583
|
form: z.enum(['call', 'new']),
|
|
552
584
|
member: z.string().min(1).nullable(),
|
|
585
|
+
// Amendment 12: the verifier judges it (`claim_invalid`), not this schema.
|
|
586
|
+
of: z.string().min(1).optional(),
|
|
553
587
|
base: ClaimSlotSchema.optional(),
|
|
554
588
|
prefix: ClaimSlotSchema.optional(),
|
|
555
589
|
protocol: z.enum(['http', 'graphql', 'rpc', 'socket', 'message']).optional(),
|
|
@@ -700,6 +734,7 @@ export const VerifyLibraryClaimsRequestSchema = BaseRequestSchema.extend({
|
|
|
700
734
|
checks: z.array(LibraryCheckSchema),
|
|
701
735
|
// The contract's sample sends `null` for "no budget of the request's own".
|
|
702
736
|
budget_ms: z.number().int().nonnegative().nullable().optional(),
|
|
737
|
+
tsconfig_path: z.string().min(1).optional(),
|
|
703
738
|
});
|
|
704
739
|
export const ListLibrarySurfaceRequestSchema = BaseRequestSchema.extend({
|
|
705
740
|
action: z.literal('list_library_surface'),
|
|
@@ -734,6 +769,8 @@ export const SidecarRequestSchema = z.discriminatedUnion('action', [
|
|
|
734
769
|
HealthRequestSchema,
|
|
735
770
|
ShutdownRequestSchema,
|
|
736
771
|
ListProgramFilesRequestSchema,
|
|
772
|
+
WriteShadowRequestSchema,
|
|
773
|
+
FindSiteRequestSchema,
|
|
737
774
|
ReachGraphRequestSchema,
|
|
738
775
|
ReachRequestSchema,
|
|
739
776
|
AddProgramFilesRequestSchema,
|