carrick 0.3.154 → 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 (150) 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 +10 -0
  6. package/dist/contract.js.map +1 -1
  7. package/dist/facts/diff.d.ts +27 -0
  8. package/dist/facts/diff.js +134 -0
  9. package/dist/facts/diff.js.map +1 -0
  10. package/dist/facts/enabled.d.ts +2 -0
  11. package/dist/facts/enabled.js +9 -0
  12. package/dist/facts/enabled.js.map +1 -0
  13. package/dist/facts/fetch.d.ts +48 -0
  14. package/dist/facts/fetch.js +235 -0
  15. package/dist/facts/fetch.js.map +1 -0
  16. package/dist/facts/files.d.ts +21 -0
  17. package/dist/facts/files.js +58 -0
  18. package/dist/facts/files.js.map +1 -0
  19. package/dist/facts/lines.d.ts +70 -0
  20. package/dist/facts/lines.js +335 -0
  21. package/dist/facts/lines.js.map +1 -0
  22. package/dist/facts/match.d.ts +91 -0
  23. package/dist/facts/match.js +1122 -0
  24. package/dist/facts/match.js.map +1 -0
  25. package/dist/facts/peers.d.ts +48 -0
  26. package/dist/facts/peers.js +143 -0
  27. package/dist/facts/peers.js.map +1 -0
  28. package/dist/facts/refresh-run.d.ts +2 -0
  29. package/dist/facts/refresh-run.js +18 -0
  30. package/dist/facts/refresh-run.js.map +1 -0
  31. package/dist/facts/rules/packages.d.ts +16 -0
  32. package/dist/facts/rules/packages.js +157 -0
  33. package/dist/facts/rules/packages.js.map +1 -0
  34. package/dist/facts/rules/same-name.d.ts +28 -0
  35. package/dist/facts/rules/same-name.js +131 -0
  36. package/dist/facts/rules/same-name.js.map +1 -0
  37. package/dist/facts/store.d.ts +119 -0
  38. package/dist/facts/store.js +341 -0
  39. package/dist/facts/store.js.map +1 -0
  40. package/dist/git-remote.d.ts +6 -0
  41. package/dist/git-remote.js +37 -0
  42. package/dist/git-remote.js.map +1 -0
  43. package/dist/hook/apply-patch.d.ts +23 -0
  44. package/dist/hook/apply-patch.js +92 -0
  45. package/dist/hook/apply-patch.js.map +1 -1
  46. package/dist/hook/bash-targets.d.ts +8 -0
  47. package/dist/hook/bash-targets.js +23 -11
  48. package/dist/hook/bash-targets.js.map +1 -1
  49. package/dist/hook/edit-flow.d.ts +29 -2
  50. package/dist/hook/edit-flow.js +80 -29
  51. package/dist/hook/edit-flow.js.map +1 -1
  52. package/dist/hook/late.d.ts +29 -0
  53. package/dist/hook/late.js +121 -26
  54. package/dist/hook/late.js.map +1 -1
  55. package/dist/hook/post-bash.js +45 -22
  56. package/dist/hook/post-bash.js.map +1 -1
  57. package/dist/hook/post-edit.d.ts +16 -1
  58. package/dist/hook/post-edit.js +177 -13
  59. package/dist/hook/post-edit.js.map +1 -1
  60. package/dist/hook/post-read.js +8 -12
  61. package/dist/hook/post-read.js.map +1 -1
  62. package/dist/hook/post-search.d.ts +2 -0
  63. package/dist/hook/post-search.js +25 -0
  64. package/dist/hook/post-search.js.map +1 -0
  65. package/dist/hook/probe.d.ts +18 -3
  66. package/dist/hook/probe.js +30 -6
  67. package/dist/hook/probe.js.map +1 -1
  68. package/dist/hook/rechecks.d.ts +66 -11
  69. package/dist/hook/rechecks.js +115 -29
  70. package/dist/hook/rechecks.js.map +1 -1
  71. package/dist/hook/refresh.d.ts +9 -0
  72. package/dist/hook/refresh.js +10 -0
  73. package/dist/hook/refresh.js.map +1 -1
  74. package/dist/hook/reuse.d.ts +16 -2
  75. package/dist/hook/reuse.js +49 -6
  76. package/dist/hook/reuse.js.map +1 -1
  77. package/dist/hook/session-key.d.ts +12 -0
  78. package/dist/hook/session-key.js +30 -0
  79. package/dist/hook/session-key.js.map +1 -0
  80. package/dist/hook/session-start.js +14 -7
  81. package/dist/hook/session-start.js.map +1 -1
  82. package/dist/hook/stop-wait.d.ts +2 -9
  83. package/dist/hook/stop-wait.js +96 -113
  84. package/dist/hook/stop-wait.js.map +1 -1
  85. package/dist/hook/stop.js +13 -8
  86. package/dist/hook/stop.js.map +1 -1
  87. package/dist/hook/subagent-stop.d.ts +2 -0
  88. package/dist/hook/subagent-stop.js +45 -0
  89. package/dist/hook/subagent-stop.js.map +1 -0
  90. package/dist/hook/timings.d.ts +72 -0
  91. package/dist/hook/timings.js +175 -0
  92. package/dist/hook/timings.js.map +1 -0
  93. package/dist/hook/user-prompt.js +17 -13
  94. package/dist/hook/user-prompt.js.map +1 -1
  95. package/dist/hook/worktree.d.ts +11 -0
  96. package/dist/hook/worktree.js +27 -1
  97. package/dist/hook/worktree.js.map +1 -1
  98. package/dist/init/repo-copies.d.ts +6 -0
  99. package/dist/init/repo-copies.js +7 -3
  100. package/dist/init/repo-copies.js.map +1 -1
  101. package/dist/init/repos.d.ts +2 -2
  102. package/dist/init/repos.js +1 -34
  103. package/dist/init/repos.js.map +1 -1
  104. package/dist/init/settings.js +25 -13
  105. package/dist/init/settings.js.map +1 -1
  106. package/dist/render.d.ts +8 -33
  107. package/dist/render.js +31 -122
  108. package/dist/render.js.map +1 -1
  109. package/package.json +6 -6
  110. package/plugin/.claude-plugin/plugin.json +1 -1
  111. package/plugin/hooks/hooks.json +44 -3
  112. package/sidecar/dist/src/capture/anchors.d.ts +12 -1
  113. package/sidecar/dist/src/capture/anchors.js +28 -47
  114. package/sidecar/dist/src/capture/api.d.ts +41 -1
  115. package/sidecar/dist/src/capture/augmentations.d.ts +2 -0
  116. package/sidecar/dist/src/capture/augmentations.js +1 -1
  117. package/sidecar/dist/src/capture/check-classify.d.ts +12 -1
  118. package/sidecar/dist/src/capture/check-classify.js +43 -0
  119. package/sidecar/dist/src/capture/check-deep.d.ts +44 -1
  120. package/sidecar/dist/src/capture/check-deep.js +161 -2
  121. package/sidecar/dist/src/capture/check.js +23 -2
  122. package/sidecar/dist/src/capture/checkout.d.ts +9 -3
  123. package/sidecar/dist/src/capture/checkout.js +12 -5
  124. package/sidecar/dist/src/capture/deep-walk.d.ts +25 -0
  125. package/sidecar/dist/src/capture/deep-walk.js +41 -0
  126. package/sidecar/dist/src/capture/deno-project.d.ts +22 -0
  127. package/sidecar/dist/src/capture/deno-project.js +48 -1
  128. package/sidecar/dist/src/capture/index.d.ts +2 -1
  129. package/sidecar/dist/src/capture/index.js +14 -4
  130. package/sidecar/dist/src/capture/machinery.d.ts +8 -53
  131. package/sidecar/dist/src/capture/machinery.js +10 -157
  132. package/sidecar/dist/src/capture/self-check.d.ts +7 -0
  133. package/sidecar/dist/src/capture/self-check.js +44 -1
  134. package/sidecar/dist/src/capture/site-node.d.ts +166 -0
  135. package/sidecar/dist/src/capture/site-node.js +570 -0
  136. package/sidecar/dist/src/capture/tool-env.d.ts +12 -0
  137. package/sidecar/dist/src/capture/tool-env.js +26 -0
  138. package/sidecar/dist/src/library-claims.js +211 -20
  139. package/sidecar/dist/src/node-index.d.ts +2 -0
  140. package/sidecar/dist/src/node-index.js +5 -1
  141. package/sidecar/dist/src/position-rows.d.ts +39 -4
  142. package/sidecar/dist/src/position-rows.js +233 -16
  143. package/sidecar/dist/src/project-loader.js +13 -5
  144. package/sidecar/dist/src/retype.d.ts +13 -0
  145. package/sidecar/dist/src/retype.js +126 -0
  146. package/sidecar/dist/src/type-inferrer.d.ts +33 -145
  147. package/sidecar/dist/src/type-inferrer.js +68 -524
  148. package/sidecar/dist/src/types.d.ts +55 -2
  149. package/sidecar/dist/src/validators.d.ts +800 -142
  150. package/sidecar/dist/src/validators.js +11 -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;
@@ -1235,6 +1282,12 @@ export interface SurfaceParam {
1235
1282
  accepts_string: boolean;
1236
1283
  /** A function type with a declared signature. */
1237
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;
1238
1291
  /** Declared keys, when it is an object type. */
1239
1292
  keys?: SurfaceKey[];
1240
1293
  /** String literals the slot spells (an overload's literal, a `keyof` map's keys). */