carrick 0.3.157 → 0.3.159

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.
Files changed (144) hide show
  1. package/dist/cli.d.ts +7 -0
  2. package/dist/cli.js +4 -0
  3. package/dist/cli.js.map +1 -1
  4. package/dist/contract.d.ts +8 -1
  5. package/dist/contract.js.map +1 -1
  6. package/dist/engine-ask.d.ts +21 -0
  7. package/dist/engine-ask.js +50 -0
  8. package/dist/engine-ask.js.map +1 -0
  9. package/dist/facts/diff.d.ts +14 -1
  10. package/dist/facts/diff.js +21 -8
  11. package/dist/facts/diff.js.map +1 -1
  12. package/dist/facts/fetch.d.ts +7 -0
  13. package/dist/facts/fetch.js +22 -1
  14. package/dist/facts/fetch.js.map +1 -1
  15. package/dist/facts/lines.d.ts +24 -4
  16. package/dist/facts/lines.js +55 -19
  17. package/dist/facts/lines.js.map +1 -1
  18. package/dist/facts/peers.d.ts +13 -4
  19. package/dist/facts/peers.js +17 -15
  20. package/dist/facts/peers.js.map +1 -1
  21. package/dist/facts/rules/packages.js +3 -1
  22. package/dist/facts/rules/packages.js.map +1 -1
  23. package/dist/facts/rules/same-name.js +1 -1
  24. package/dist/facts/rules/same-name.js.map +1 -1
  25. package/dist/facts/store.d.ts +15 -0
  26. package/dist/facts/store.js +30 -0
  27. package/dist/facts/store.js.map +1 -1
  28. package/dist/held/backoff.d.ts +8 -0
  29. package/dist/held/backoff.js +43 -0
  30. package/dist/held/backoff.js.map +1 -0
  31. package/dist/held/build.d.ts +17 -0
  32. package/dist/held/build.js +62 -0
  33. package/dist/held/build.js.map +1 -0
  34. package/dist/held/client.d.ts +12 -3
  35. package/dist/held/client.js +123 -8
  36. package/dist/held/client.js.map +1 -1
  37. package/dist/held/daemon.d.ts +47 -2
  38. package/dist/held/daemon.js +115 -23
  39. package/dist/held/daemon.js.map +1 -1
  40. package/dist/held/early.d.ts +28 -0
  41. package/dist/held/early.js +115 -0
  42. package/dist/held/early.js.map +1 -0
  43. package/dist/held/paths.d.ts +6 -0
  44. package/dist/held/paths.js +17 -0
  45. package/dist/held/paths.js.map +1 -1
  46. package/dist/held/place.d.ts +78 -30
  47. package/dist/held/place.js +123 -83
  48. package/dist/held/place.js.map +1 -1
  49. package/dist/held/run.js +24 -6
  50. package/dist/held/run.js.map +1 -1
  51. package/dist/held/runtime.d.ts +22 -0
  52. package/dist/held/runtime.js +620 -0
  53. package/dist/held/runtime.js.map +1 -0
  54. package/dist/held/shadow.d.ts +44 -0
  55. package/dist/held/shadow.js +68 -0
  56. package/dist/held/shadow.js.map +1 -0
  57. package/dist/held/steps.d.ts +11 -0
  58. package/dist/held/steps.js +29 -0
  59. package/dist/held/steps.js.map +1 -0
  60. package/dist/hook/confirm.d.ts +79 -0
  61. package/dist/hook/confirm.js +220 -0
  62. package/dist/hook/confirm.js.map +1 -0
  63. package/dist/hook/edit-flow.d.ts +14 -3
  64. package/dist/hook/edit-flow.js +113 -33
  65. package/dist/hook/edit-flow.js.map +1 -1
  66. package/dist/hook/generation.d.ts +19 -0
  67. package/dist/hook/generation.js +75 -0
  68. package/dist/hook/generation.js.map +1 -0
  69. package/dist/hook/late.d.ts +50 -9
  70. package/dist/hook/late.js +104 -24
  71. package/dist/hook/late.js.map +1 -1
  72. package/dist/hook/post-bash.js +3 -3
  73. package/dist/hook/post-bash.js.map +1 -1
  74. package/dist/hook/post-edit.js +2 -2
  75. package/dist/hook/post-edit.js.map +1 -1
  76. package/dist/hook/post-read.js +25 -3
  77. package/dist/hook/post-read.js.map +1 -1
  78. package/dist/hook/post-search.js +1 -1
  79. package/dist/hook/post-search.js.map +1 -1
  80. package/dist/hook/probe.js +1 -0
  81. package/dist/hook/probe.js.map +1 -1
  82. package/dist/hook/read-answer.d.ts +5 -0
  83. package/dist/hook/read-answer.js +8 -4
  84. package/dist/hook/read-answer.js.map +1 -1
  85. package/dist/hook/rechecks.d.ts +58 -2
  86. package/dist/hook/rechecks.js +132 -9
  87. package/dist/hook/rechecks.js.map +1 -1
  88. package/dist/hook/session-start.d.ts +1 -1
  89. package/dist/hook/session-start.js +19 -5
  90. package/dist/hook/session-start.js.map +1 -1
  91. package/dist/hook/similar.d.ts +1 -1
  92. package/dist/hook/similar.js +21 -8
  93. package/dist/hook/similar.js.map +1 -1
  94. package/dist/hook/stop-wait.js +35 -16
  95. package/dist/hook/stop-wait.js.map +1 -1
  96. package/dist/hook/timings.d.ts +29 -1
  97. package/dist/hook/timings.js +7 -1
  98. package/dist/hook/timings.js.map +1 -1
  99. package/dist/hook/user-prompt.js +2 -2
  100. package/dist/hook/user-prompt.js.map +1 -1
  101. package/dist/hosted-snapshot.d.ts +27 -0
  102. package/dist/hosted-snapshot.js +32 -0
  103. package/dist/hosted-snapshot.js.map +1 -1
  104. package/dist/init/hosted.js +2 -9
  105. package/dist/init/hosted.js.map +1 -1
  106. package/dist/render.d.ts +15 -1
  107. package/dist/render.js +50 -4
  108. package/dist/render.js.map +1 -1
  109. package/dist/server.js +1 -1
  110. package/dist/server.js.map +1 -1
  111. package/package.json +6 -6
  112. package/plugin/.claude-plugin/plugin.json +1 -1
  113. package/sidecar/dist/src/capture/anchors.d.ts +8 -0
  114. package/sidecar/dist/src/capture/anchors.js +3 -2
  115. package/sidecar/dist/src/capture/api.d.ts +70 -3
  116. package/sidecar/dist/src/capture/check-classify.d.ts +7 -0
  117. package/sidecar/dist/src/capture/check-classify.js +24 -0
  118. package/sidecar/dist/src/capture/check-probe.d.ts +76 -7
  119. package/sidecar/dist/src/capture/check-probe.js +147 -19
  120. package/sidecar/dist/src/capture/check-workspace.d.ts +21 -0
  121. package/sidecar/dist/src/capture/check-workspace.js +13 -0
  122. package/sidecar/dist/src/capture/check.js +13 -1
  123. package/sidecar/dist/src/capture/graphql-leaves.d.ts +46 -0
  124. package/sidecar/dist/src/capture/graphql-leaves.js +142 -0
  125. package/sidecar/dist/src/capture/index.d.ts +5 -1
  126. package/sidecar/dist/src/capture/index.js +4 -1
  127. package/sidecar/dist/src/definition-resolver.d.ts +2 -1
  128. package/sidecar/dist/src/definition-resolver.js +15 -9
  129. package/sidecar/dist/src/engine-stamp.json +1 -1
  130. package/sidecar/dist/src/held-shadow.d.ts +17 -2
  131. package/sidecar/dist/src/held-shadow.js +11 -10
  132. package/sidecar/dist/src/index.js +18 -1
  133. package/sidecar/dist/src/library-claims.js +26 -3
  134. package/sidecar/dist/src/retype.d.ts +47 -0
  135. package/sidecar/dist/src/retype.js +274 -18
  136. package/sidecar/dist/src/site-find.d.ts +27 -0
  137. package/sidecar/dist/src/site-find.js +109 -0
  138. package/sidecar/dist/src/type-inferrer.d.ts +5 -0
  139. package/sidecar/dist/src/type-inferrer.js +8 -4
  140. package/sidecar/dist/src/type-structural-expander.d.ts +10 -0
  141. package/sidecar/dist/src/type-structural-expander.js +73 -4
  142. package/sidecar/dist/src/types.d.ts +50 -2
  143. package/sidecar/dist/src/validators.d.ts +424 -104
  144. package/sidecar/dist/src/validators.js +29 -0
@@ -303,6 +303,20 @@ export interface WriteShadowRequest extends BaseRequest {
303
303
  action: 'write_shadow';
304
304
  out_dir: string;
305
305
  }
306
+ /**
307
+ * Find again, in a file's new text, the node the old text's span `[start, end)`
308
+ * named, with the capture's own exact-text finder (see site-find.ts). `file`
309
+ * only names the file (its extension picks JavaScript or TypeScript syntax);
310
+ * both texts are the caller's, so nothing is read from disk.
311
+ */
312
+ export interface FindSiteRequest extends BaseRequest {
313
+ action: 'find_site';
314
+ file: string;
315
+ oldText: string;
316
+ newText: string;
317
+ start: number;
318
+ end: number;
319
+ }
306
320
  /**
307
321
  * The import graph without statement texts. Every name and path is an index
308
322
  * into `strings`. Per file: its path, whether it is a script, its declared
@@ -447,6 +461,8 @@ export interface ResolveDefinitionsRequest extends BaseRequest {
447
461
  stub_dir: string;
448
462
  /** Surface type aliases to resolve, each with the payload it types. */
449
463
  aliases: DefinitionAlias[];
464
+ /** The service's SDL output types (carrick#4403), when it serves a schema. */
465
+ graphql_types?: import('./capture/api.js').GraphqlTypes;
450
466
  }
451
467
  /**
452
468
  * One surface alias to resolve, and the payload it types: which protocol,
@@ -468,6 +484,13 @@ export interface DefinitionAlias {
468
484
  * (carrick#4275), so it prints as declared until that is a known fact.
469
485
  */
470
486
  procedure: boolean;
487
+ /**
488
+ * The root field a GraphQL producer response answers (carrick#4403), from
489
+ * its manifest entry. With the request's `graphql_types`, the stored text
490
+ * prints each built-in scalar leaf in the type that scalar sends
491
+ * (`wireFormFor`).
492
+ */
493
+ graphql_root?: import('./capture/api.js').GraphqlRoot;
471
494
  }
472
495
  /**
473
496
  * One consumer call to retype with the producer's response type (carrick#1491).
@@ -496,6 +519,12 @@ export interface RetypeItem extends RetypeLocatorItem {
496
519
  producer_unwidened_type?: string;
497
520
  /** Judge the form JSON puts on the wire (an `http` response). */
498
521
  wire: boolean;
522
+ /**
523
+ * The key path of the procedure the call names (`orders.list`): the call's
524
+ * own type is the router's, so the retype judges the consumer's code
525
+ * against it (carrick#937).
526
+ */
527
+ procedure_path?: string;
499
528
  }
500
529
  /**
501
530
  * Ask, without a producer type, which consumer calls the retype abstains for
@@ -958,7 +987,7 @@ export interface ListLibrarySurfaceRequest extends BaseRequest {
958
987
  /**
959
988
  * Union type for all possible sidecar requests
960
989
  */
961
- export type SidecarRequest = RetypeCheckRequest | RetypePrescreenRequest | VerifyClientSemanticsRequest | VerifyLibraryClaimsRequest | ListLibrarySurfaceRequest | InitRequest | BundleRequest | CaptureV2Request | CheckV2Request | InferRequest | ResolveDefinitionsRequest | HealthRequest | ShutdownRequest | ListProgramFilesRequest | WriteShadowRequest | ReachGraphRequest | ReachRequest | AddProgramFilesRequest | PositionRowsRequest | ImplementationsRequest;
990
+ export type SidecarRequest = RetypeCheckRequest | RetypePrescreenRequest | VerifyClientSemanticsRequest | VerifyLibraryClaimsRequest | ListLibrarySurfaceRequest | InitRequest | BundleRequest | CaptureV2Request | CheckV2Request | InferRequest | ResolveDefinitionsRequest | HealthRequest | ShutdownRequest | ListProgramFilesRequest | WriteShadowRequest | FindSiteRequest | ReachGraphRequest | ReachRequest | AddProgramFilesRequest | PositionRowsRequest | ImplementationsRequest;
962
991
  /**
963
992
  * Request for a specific symbol to be bundled
964
993
  */
@@ -1221,6 +1250,19 @@ export interface ListProgramFilesResponse extends BaseResponse {
1221
1250
  export interface WriteShadowResponse extends BaseResponse, Partial<ShadowResult> {
1222
1251
  errors?: string[];
1223
1252
  }
1253
+ /**
1254
+ * Response for find_site action: the node's new bounds (offsets into
1255
+ * `newText`, `start` excluding leading trivia), or the reason there are none.
1256
+ * `value_not_a_node`: no node of the new text fills the slot the old span sat in. `not_wrappable`:
1257
+ * the node is one a call cannot wrap in place (a spread, a shorthand
1258
+ * property's name).
1259
+ */
1260
+ export interface FindSiteResponse extends BaseResponse {
1261
+ start?: number;
1262
+ end?: number;
1263
+ reason?: 'value_not_a_node' | 'not_wrappable';
1264
+ errors?: string[];
1265
+ }
1224
1266
  /**
1225
1267
  * Response for reach_graph action
1226
1268
  */
@@ -1374,6 +1416,12 @@ export interface SurfaceSignature {
1374
1416
  * signature returns nothing.
1375
1417
  */
1376
1418
  result_candidates?: SurfaceResultCandidates;
1419
+ /**
1420
+ * On a `construct` entry only, and only when true: the class it constructs
1421
+ * is abstract, so `new` on it is a type error. Absent otherwise. Part of
1422
+ * the surface hash, so a package that declares one gets a new key.
1423
+ */
1424
+ abstract?: true;
1377
1425
  }
1378
1426
  /** What a signature's return offers as its result, by rule R (`result-candidates.ts`). */
1379
1427
  export interface SurfaceResultCandidates {
@@ -1577,7 +1625,7 @@ export interface ListLibrarySurfaceResponse extends BaseResponse {
1577
1625
  /**
1578
1626
  * Union type for all possible sidecar responses
1579
1627
  */
1580
- export type SidecarResponse = RetypeCheckResponse | RetypePrescreenResponse | VerifyClientSemanticsResponse | VerifyLibraryClaimsResponse | ListLibrarySurfaceResponse | InitResponse | BundleResponse | CaptureV2Response | CheckV2Response | InferResponse | ResolveDefinitionsResponse | HealthResponse | ShutdownResponse | ListProgramFilesResponse | WriteShadowResponse | ReachGraphResponse | ReachResponse | AddProgramFilesResponse | PositionRowsResponse | ImplementationsResponse | ErrorResponse;
1628
+ export type SidecarResponse = RetypeCheckResponse | RetypePrescreenResponse | VerifyClientSemanticsResponse | VerifyLibraryClaimsResponse | ListLibrarySurfaceResponse | InitResponse | BundleResponse | CaptureV2Response | CheckV2Response | InferResponse | ResolveDefinitionsResponse | HealthResponse | ShutdownResponse | ListProgramFilesResponse | WriteShadowResponse | FindSiteResponse | ReachGraphResponse | ReachResponse | AddProgramFilesResponse | PositionRowsResponse | ImplementationsResponse | ErrorResponse;
1581
1629
  /**
1582
1630
  * An entry in the type manifest
1583
1631
  */