carrick 0.3.153 → 0.3.155

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 (159) hide show
  1. package/bin/carrick.mjs +26 -4
  2. package/dist/cli.d.ts +6 -0
  3. package/dist/cli.js +1 -0
  4. package/dist/cli.js.map +1 -1
  5. package/dist/contract.d.ts +37 -3
  6. package/dist/contract.js +8 -0
  7. package/dist/contract.js.map +1 -1
  8. package/dist/facts/diff.d.ts +27 -0
  9. package/dist/facts/diff.js +134 -0
  10. package/dist/facts/diff.js.map +1 -0
  11. package/dist/facts/enabled.d.ts +2 -0
  12. package/dist/facts/enabled.js +9 -0
  13. package/dist/facts/enabled.js.map +1 -0
  14. package/dist/facts/fetch.d.ts +48 -0
  15. package/dist/facts/fetch.js +235 -0
  16. package/dist/facts/fetch.js.map +1 -0
  17. package/dist/facts/files.d.ts +21 -0
  18. package/dist/facts/files.js +58 -0
  19. package/dist/facts/files.js.map +1 -0
  20. package/dist/facts/lines.d.ts +70 -0
  21. package/dist/facts/lines.js +335 -0
  22. package/dist/facts/lines.js.map +1 -0
  23. package/dist/facts/match.d.ts +91 -0
  24. package/dist/facts/match.js +1122 -0
  25. package/dist/facts/match.js.map +1 -0
  26. package/dist/facts/peers.d.ts +48 -0
  27. package/dist/facts/peers.js +143 -0
  28. package/dist/facts/peers.js.map +1 -0
  29. package/dist/facts/refresh-run.d.ts +2 -0
  30. package/dist/facts/refresh-run.js +18 -0
  31. package/dist/facts/refresh-run.js.map +1 -0
  32. package/dist/facts/rules/packages.d.ts +16 -0
  33. package/dist/facts/rules/packages.js +157 -0
  34. package/dist/facts/rules/packages.js.map +1 -0
  35. package/dist/facts/rules/same-name.d.ts +28 -0
  36. package/dist/facts/rules/same-name.js +131 -0
  37. package/dist/facts/rules/same-name.js.map +1 -0
  38. package/dist/facts/store.d.ts +119 -0
  39. package/dist/facts/store.js +341 -0
  40. package/dist/facts/store.js.map +1 -0
  41. package/dist/git-remote.d.ts +6 -0
  42. package/dist/git-remote.js +37 -0
  43. package/dist/git-remote.js.map +1 -0
  44. package/dist/hook/apply-patch.d.ts +23 -0
  45. package/dist/hook/apply-patch.js +92 -0
  46. package/dist/hook/apply-patch.js.map +1 -1
  47. package/dist/hook/bash-targets.d.ts +8 -0
  48. package/dist/hook/bash-targets.js +23 -11
  49. package/dist/hook/bash-targets.js.map +1 -1
  50. package/dist/hook/edit-flow.d.ts +29 -2
  51. package/dist/hook/edit-flow.js +80 -29
  52. package/dist/hook/edit-flow.js.map +1 -1
  53. package/dist/hook/late.d.ts +29 -0
  54. package/dist/hook/late.js +121 -26
  55. package/dist/hook/late.js.map +1 -1
  56. package/dist/hook/post-bash.js +45 -22
  57. package/dist/hook/post-bash.js.map +1 -1
  58. package/dist/hook/post-edit.d.ts +16 -1
  59. package/dist/hook/post-edit.js +177 -13
  60. package/dist/hook/post-edit.js.map +1 -1
  61. package/dist/hook/post-read.js +8 -12
  62. package/dist/hook/post-read.js.map +1 -1
  63. package/dist/hook/post-search.d.ts +2 -0
  64. package/dist/hook/post-search.js +25 -0
  65. package/dist/hook/post-search.js.map +1 -0
  66. package/dist/hook/probe.d.ts +18 -3
  67. package/dist/hook/probe.js +30 -6
  68. package/dist/hook/probe.js.map +1 -1
  69. package/dist/hook/rechecks.d.ts +66 -11
  70. package/dist/hook/rechecks.js +115 -29
  71. package/dist/hook/rechecks.js.map +1 -1
  72. package/dist/hook/refresh.d.ts +9 -0
  73. package/dist/hook/refresh.js +10 -0
  74. package/dist/hook/refresh.js.map +1 -1
  75. package/dist/hook/reuse.d.ts +16 -2
  76. package/dist/hook/reuse.js +49 -6
  77. package/dist/hook/reuse.js.map +1 -1
  78. package/dist/hook/session-key.d.ts +12 -0
  79. package/dist/hook/session-key.js +30 -0
  80. package/dist/hook/session-key.js.map +1 -0
  81. package/dist/hook/session-start.js +14 -7
  82. package/dist/hook/session-start.js.map +1 -1
  83. package/dist/hook/stop-wait.d.ts +2 -9
  84. package/dist/hook/stop-wait.js +96 -113
  85. package/dist/hook/stop-wait.js.map +1 -1
  86. package/dist/hook/stop.js +13 -8
  87. package/dist/hook/stop.js.map +1 -1
  88. package/dist/hook/subagent-stop.d.ts +2 -0
  89. package/dist/hook/subagent-stop.js +45 -0
  90. package/dist/hook/subagent-stop.js.map +1 -0
  91. package/dist/hook/timings.d.ts +72 -0
  92. package/dist/hook/timings.js +175 -0
  93. package/dist/hook/timings.js.map +1 -0
  94. package/dist/hook/user-prompt.js +17 -13
  95. package/dist/hook/user-prompt.js.map +1 -1
  96. package/dist/hook/worktree.d.ts +11 -0
  97. package/dist/hook/worktree.js +27 -1
  98. package/dist/hook/worktree.js.map +1 -1
  99. package/dist/init/repo-copies.d.ts +6 -0
  100. package/dist/init/repo-copies.js +7 -3
  101. package/dist/init/repo-copies.js.map +1 -1
  102. package/dist/init/repos.d.ts +2 -2
  103. package/dist/init/repos.js +1 -34
  104. package/dist/init/repos.js.map +1 -1
  105. package/dist/init/settings.js +25 -13
  106. package/dist/init/settings.js.map +1 -1
  107. package/dist/render.d.ts +8 -33
  108. package/dist/render.js +42 -120
  109. package/dist/render.js.map +1 -1
  110. package/package.json +6 -6
  111. package/plugin/.claude-plugin/plugin.json +1 -1
  112. package/plugin/hooks/hooks.json +44 -3
  113. package/scripts/install-scanned-deps.sh +25 -2
  114. package/sidecar/dist/src/capture/anchors.d.ts +12 -1
  115. package/sidecar/dist/src/capture/anchors.js +28 -47
  116. package/sidecar/dist/src/capture/api.d.ts +41 -1
  117. package/sidecar/dist/src/capture/augmentations.d.ts +2 -0
  118. package/sidecar/dist/src/capture/augmentations.js +1 -1
  119. package/sidecar/dist/src/capture/check-classify.d.ts +12 -1
  120. package/sidecar/dist/src/capture/check-classify.js +43 -0
  121. package/sidecar/dist/src/capture/check-deep.d.ts +44 -1
  122. package/sidecar/dist/src/capture/check-deep.js +161 -2
  123. package/sidecar/dist/src/capture/check.js +23 -2
  124. package/sidecar/dist/src/capture/checkout.d.ts +9 -3
  125. package/sidecar/dist/src/capture/checkout.js +12 -5
  126. package/sidecar/dist/src/capture/deep-walk.d.ts +25 -0
  127. package/sidecar/dist/src/capture/deep-walk.js +41 -0
  128. package/sidecar/dist/src/capture/deno-project.d.ts +22 -0
  129. package/sidecar/dist/src/capture/deno-project.js +48 -1
  130. package/sidecar/dist/src/capture/index.d.ts +3 -1
  131. package/sidecar/dist/src/capture/index.js +14 -4
  132. package/sidecar/dist/src/capture/machinery.d.ts +8 -53
  133. package/sidecar/dist/src/capture/machinery.js +10 -157
  134. package/sidecar/dist/src/capture/node-builder.d.ts +6 -0
  135. package/sidecar/dist/src/capture/self-check.d.ts +7 -0
  136. package/sidecar/dist/src/capture/self-check.js +44 -1
  137. package/sidecar/dist/src/capture/site-node.d.ts +166 -0
  138. package/sidecar/dist/src/capture/site-node.js +570 -0
  139. package/sidecar/dist/src/capture/tool-env.d.ts +12 -0
  140. package/sidecar/dist/src/capture/tool-env.js +26 -0
  141. package/sidecar/dist/src/default-library.d.ts +39 -0
  142. package/sidecar/dist/src/default-library.js +132 -0
  143. package/sidecar/dist/src/definition-resolver.js +2 -0
  144. package/sidecar/dist/src/index.js +1 -1
  145. package/sidecar/dist/src/library-claims.d.ts +2 -0
  146. package/sidecar/dist/src/library-claims.js +387 -37
  147. package/sidecar/dist/src/node-index.d.ts +2 -0
  148. package/sidecar/dist/src/node-index.js +5 -1
  149. package/sidecar/dist/src/position-rows.d.ts +78 -7
  150. package/sidecar/dist/src/position-rows.js +343 -18
  151. package/sidecar/dist/src/project-loader.d.ts +3 -3
  152. package/sidecar/dist/src/project-loader.js +18 -9
  153. package/sidecar/dist/src/retype.d.ts +13 -0
  154. package/sidecar/dist/src/retype.js +126 -0
  155. package/sidecar/dist/src/type-inferrer.d.ts +47 -145
  156. package/sidecar/dist/src/type-inferrer.js +102 -529
  157. package/sidecar/dist/src/types.d.ts +64 -2
  158. package/sidecar/dist/src/validators.d.ts +806 -142
  159. package/sidecar/dist/src/validators.js +12 -1
@@ -302,6 +302,29 @@ export interface ListProgramFilesRequest extends BaseRequest {
302
302
  * same for each loose statement, its exports, its export targets, its
303
303
  * bindings (local, imported name or -1, origin file and name pairs), its
304
304
  * whole-module locals, and its stems (target file or -1, locals, stems).
305
+ *
306
+ * Two repos read this format (carrick#3101): the PR scan, from its own build
307
+ * only, and carrick-cloud, from every build, to answer who uses a type
308
+ * (carrick-cloud#3414). So any change to a key, a value's shape or what a
309
+ * value means bumps `version`; a reader treats any other version as no graph.
310
+ * `test/type-users-graph.test.ts` pins version 1 against
311
+ * `test/fixtures/type-users/graph.expected.json`, which carrick-cloud vendors
312
+ * by sha256. What version 1 means, beyond the shape below:
313
+ * - Paths are relative to the scan root (`getScanRoot`), with `/` separators.
314
+ * - `d` is every top-level name, import bindings included: a name the file
315
+ * declares is in `d` and is not a binding. A default export adds `default`.
316
+ * - Each `r` row is a declared name, then every identifier its statements
317
+ * hold that is a binding or a name of `d`, the name itself first. Any
318
+ * identifier counts: an object key or a shadowing local spelled like a
319
+ * binding is kept, a string is not, and a type the compiler only infers is
320
+ * never there.
321
+ * - A binding's origins are resolved through re-exports to the declaring
322
+ * file. Name `*` is the whole module; a namespace import lists `*` and then
323
+ * each export. An `import('m').T` type binds a local that starts with NUL,
324
+ * imports no name, and is mentioned by the statement holding it.
325
+ * - An `export * from 'm'` is the `e` entry `*` followed by the quoted
326
+ * specifier; it adds no binding.
327
+ * - Order inside an array is the walk's and is not part of the format.
305
328
  */
306
329
  export interface SerialGraph {
307
330
  version: 1;
@@ -554,6 +577,19 @@ export interface ClaimSlot extends SlotPosition {
554
577
  at?: string[];
555
578
  /** A rest slot: every element is read (amendment 7). */
556
579
  each?: boolean;
580
+ /**
581
+ * On a scope's `mounts` only (K1a): the slot takes a handler (a
582
+ * middleware), judged by the handler rule rather than the instance rule.
583
+ * `false` is no flag.
584
+ */
585
+ handle?: boolean;
586
+ /**
587
+ * On a `handler` slot only (QW-1): the slot takes the function that runs,
588
+ * or the path of a file that exports it (a string or the platform `URL`).
589
+ * The file parts are dropped and the rest is judged by the handler rule.
590
+ * `false` is no flag.
591
+ */
592
+ or_file?: boolean;
557
593
  }
558
594
  /** A slot that holds a name: also read as a GraphQL document, or as the name of a function or class (amendment 7). */
559
595
  export interface NameSlot extends ClaimSlot {
@@ -652,7 +688,7 @@ export interface RequestAt {
652
688
  body?: string[];
653
689
  }
654
690
  /** The closed role list; the role alone picks the checks a claim needs. */
655
- export type LibraryRole = 'http_client' | 'graphql_client' | 'broker' | 'in_process_bus' | 'socket' | 'server_framework' | 'none';
691
+ export type LibraryRole = 'http_client' | 'graphql_client' | 'broker' | 'in_process_bus' | 'socket' | 'server_framework' | 'invoke_client' | 'none';
656
692
  /** What an `op` claim does on the wire. */
657
693
  export type LibraryOp = 'request' | 'send' | 'receive' | 'execute';
658
694
  /** Which receivers an op, scope or reserved name is claimed on. */
@@ -688,6 +724,8 @@ export type LibraryClaim = {
688
724
  base?: ClaimSlot;
689
725
  /** A prefix every name the instance sends gets. */
690
726
  prefix?: ClaimSlot;
727
+ /** Amendment 11: `graphql` says the maker serves GraphQL operations over HTTP (`runs` required, `server_framework` only). */
728
+ protocol?: ClaimProtocol;
691
729
  /** A definition's id or a queue's name: bound to every op that names `{ bound: 'maker' }`. */
692
730
  name?: NameSlot;
693
731
  handler?: ClaimSlot;
@@ -704,7 +742,10 @@ export type LibraryClaim = {
704
742
  member: string;
705
743
  /** Amendment 7: absent is `call`; `decorate` is a class decorator whose name prefixes its methods' ops. */
706
744
  form?: 'call' | 'decorate';
707
- /** Exactly one of `name`, `collects` and `merges` (#2474 R6a). */
745
+ /**
746
+ * Exactly one of `name`, `collects`, `merges` and `passes`, or none when
747
+ * the scope binds (`mounts`, or `runs` with `yields`) (#2474 R6a, K1a).
748
+ */
708
749
  name?: NameSlot;
709
750
  path?: string[];
710
751
  on?: ClaimOn;
@@ -730,6 +771,12 @@ export type LibraryClaim = {
730
771
  * serving all their procedures at the same level.
731
772
  */
732
773
  merges?: ClaimSlot;
774
+ /**
775
+ * A pass-through (K1a): the call's value is the receiver itself, served
776
+ * at the receiver's own address. Alone: no other field beside it. Its
777
+ * return opens no `>scope:` receiver. `false` is no flag.
778
+ */
779
+ passes?: boolean;
733
780
  } | {
734
781
  kind: 'op';
735
782
  op: LibraryOp;
@@ -858,6 +905,8 @@ export interface ListLibrarySurfaceRequest extends BaseRequest {
858
905
  types?: boolean;
859
906
  /** The most handler-parameter members the whole listing lists; default 500000 (carrick#3016). */
860
907
  max_handler_members?: number;
908
+ /** Estimated member makers of values typed by another package past which they list only `export`; default 160000 (carrick#3745). */
909
+ foreign_maker_budget?: number;
861
910
  /** List each signature's `result_candidates` (carrick#2817); default false (carrick#2966). */
862
911
  result_candidates?: boolean;
863
912
  }
@@ -1233,6 +1282,12 @@ export interface SurfaceParam {
1233
1282
  accepts_string: boolean;
1234
1283
  /** A function type with a declared signature. */
1235
1284
  function: boolean;
1285
+ /**
1286
+ * Not a function, but one once its file parts (a string, the platform
1287
+ * `URL`) are dropped (QW-1): a `handler` claim here carries `or_file`.
1288
+ * Present only when true.
1289
+ */
1290
+ function_or_file?: true;
1236
1291
  /** Declared keys, when it is an object type. */
1237
1292
  keys?: SurfaceKey[];
1238
1293
  /** String literals the slot spells (an overload's literal, a `keyof` map's keys). */
@@ -1429,6 +1484,13 @@ export interface LibrarySurface {
1429
1484
  * `truncated` does not count them, and it is outside `surface_sha256`.
1430
1485
  */
1431
1486
  properties_left_out?: number;
1487
+ /**
1488
+ * Member makers (`instance:<member>`, `instance:new:<member>`) left out on
1489
+ * values typed by another package, because the request's estimate passed
1490
+ * `foreign_maker_budget` (carrick#3745); absent when none. `truncated` does
1491
+ * not count them, and it is outside `surface_sha256`.
1492
+ */
1493
+ makers_left_out?: number;
1432
1494
  /**
1433
1495
  * With `types: true`: per export, per receiver the surface lists, the
1434
1496
  * `types` receiver ids its built type and base types are declared by