fallow 3.18.0 → 3.20.0

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.
@@ -24,7 +24,7 @@
24
24
 
25
25
 
26
26
  /**
27
- * Schemas for the JSON output of fallow commands. Object-shaped envelopes covered by the `FallowOutput` contract carry a top-level `kind` discriminator. Current kind values: `audit`, `explain`, `inspect_target`, `trace`, `review-envelope`, `review-reconcile`, `coverage-setup`, `coverage-analyze`, `list-boundaries`, `list-workspaces`, `health`, `dupes`, `dead-code-grouped`, `impact`, `impact-cross-repo`, `security`, `security-survivors`, `security-blind-spots`, `dead-code`, `combined`, `feature-flags`, `audit-brief`, `decision-surface`, `review-walkthrough-guide`, `review-walkthrough-validation`, `suppression-inventory`, `type-aware-status`. Consumers should branch on `kind` instead of probing for unique field presence. `CodeClimateOutput` is a bare JSON array (per the Code Climate / GitLab Code Quality spec) and stays a sibling root branch discriminated by checking whether the document root is an array. `ErrorOutput` is the `--format json` failure document, emitted on stdout with a non-zero exit; it carries no `kind` and is discriminated by the `error: true` field.
27
+ * Schemas for the JSON output of fallow commands. Object-shaped envelopes covered by the `FallowOutput` contract carry a top-level `kind` discriminator. Current kind values: `audit`, `explain`, `inspect_target`, `trace`, `review-envelope`, `review-reconcile`, `coverage-setup`, `coverage-analyze`, `list-boundaries`, `list-workspaces`, `health`, `dupes`, `dead-code-grouped`, `impact`, `impact-cross-repo`, `security`, `security-survivors`, `security-blind-spots`, `dead-code`, `combined`, `feature-flags`, `audit-brief`, `decision-surface`, `review-walkthrough-guide`, `review-walkthrough-validation`, `suppression-inventory`, `type-aware-status`, `similar-code`, `similar-code-inspect`, `similar-code-review`. Consumers should branch on `kind` instead of probing for unique field presence. `CodeClimateOutput` is a bare JSON array (per the Code Climate / GitLab Code Quality spec) and stays a sibling root branch discriminated by checking whether the document root is an array. `ErrorOutput` is the `--format json` failure document, emitted on stdout with a non-zero exit; it carries no `kind` and is discriminated by the `error: true` field.
28
28
  */
29
29
  export type FallowJsonOutput = (FallowOutput | CodeClimateOutput | ErrorOutput)
30
30
  /**
@@ -98,6 +98,12 @@ kind: "review-walkthrough-validation"
98
98
  kind: "suppression-inventory"
99
99
  }) | (TypeAwareStatusOutput & {
100
100
  kind: "type-aware-status"
101
+ }) | (SimilarCodeOutput & {
102
+ kind: "similar-code"
103
+ }) | (SimilarCodeInspectOutput & {
104
+ kind: "similar-code-inspect"
105
+ }) | (SimilarCodeReviewOutput & {
106
+ kind: "similar-code-review"
101
107
  }))
102
108
  /**
103
109
  * Schema projection for the audit envelope's exact version.
@@ -703,10 +709,11 @@ export type UnusedAtRuleKind = ("property-registration" | "layer")
703
709
  /**
704
710
  * The surface through which a design token is consumed. The `theme-var` /
705
711
  * `css-var` / `utility` / `apply` kinds are Tailwind v4 `@theme` consumption; the
706
- * `js-member` / `js-call` kinds are CSS-in-JS consumption (member access on an
707
- * imported StyleX/vanilla-extract token binding, or a PandaCSS `token('...')`
708
- * call). The kind is the disjoint origin signal that distinguishes a Tailwind
709
- * token entry from a CSS-in-JS token entry in the shared `token_consumers` list.
712
+ * `js-member` / `js-call` kinds are CSS-in-JS consumption (member access through a
713
+ * same-file or imported StyleX/vanilla-extract token binding, a StyleX
714
+ * theme-group call, or a PandaCSS token-path call). The kind is the disjoint origin signal that
715
+ * distinguishes a Tailwind token entry from a CSS-in-JS token entry in the
716
+ * shared `token_consumers` list.
710
717
  */
711
718
  export type ConsumerKind = ("theme-var" | "css-var" | "utility" | "apply" | "js-member" | "js-call")
712
719
  /**
@@ -981,7 +988,7 @@ export type FeatureFlagActionType = ("investigate-flag" | "suppress-line")
981
988
  * Independently-versioned wire-version newtype for the brief envelope.
982
989
  * Serializes as the integer `REVIEW_BRIEF_SCHEMA_VERSION`.
983
990
  */
984
- export type ReviewBriefSchemaVersion = 7
991
+ export type ReviewBriefSchemaVersion = 8
985
992
  /**
986
993
  * The exactly-three shippable decision categories (the SOLID-3). No cut category
987
994
  * (abstraction / deletion / convention / irreversibility) is representable: this
@@ -1026,6 +1033,13 @@ export type DecisionSurfaceSchemaVersion = number
1026
1033
  * The discriminated action kinds a decision can carry.
1027
1034
  */
1028
1035
  export type DecisionActionType = ("ask-expert" | "suppress")
1036
+ /**
1037
+ * Whether a changed source unit has a test file importing it, and whether that
1038
+ * test moved with the change. A direct-importer fact from the graph, not a
1039
+ * coverage claim: `untouched` says a test exists and was not edited, which is
1040
+ * the verification question the reviewer asks the author, never an answer.
1041
+ */
1042
+ export type TestAdjacency = ("none" | "untouched" | "changed")
1029
1043
  /**
1030
1044
  * The `fallow suppressions --format json` schema version. Independently
1031
1045
  * versioned from the main contract, mirroring `SecuritySchemaVersion`.
@@ -1043,6 +1057,74 @@ export type SuppressionInventoryOrigin = "comment"
1043
1057
  * Schema projection for the type-aware status envelope's exact version.
1044
1058
  */
1045
1059
  export type TypeAwareStatusSchemaVersion = 8
1060
+ /**
1061
+ * Version singleton for raw similar-code output.
1062
+ */
1063
+ export type SimilarCodeSchemaVersion = "1"
1064
+ /**
1065
+ * Provider families admitted by the version 1 public contract.
1066
+ */
1067
+ export type SimilarCodeProvider = "official-local-companion"
1068
+ /**
1069
+ * Stable, coarse interpretation of a candidate score.
1070
+ */
1071
+ export type SimilarCodeSimilarityBand = ("moderate" | "high" | "very-high")
1072
+ /**
1073
+ * Verification state of a raw semantic candidate.
1074
+ */
1075
+ export type SimilarCodeVerificationStatus = "unverified"
1076
+ /**
1077
+ * Explicit availability state for one optional enrichment source.
1078
+ */
1079
+ export type SimilarCodeEnrichmentState = ("available" | "unavailable" | "not-requested")
1080
+ /**
1081
+ * Read-only actions supported by the candidate workflow.
1082
+ */
1083
+ export type SimilarCodeActionType = ("inspect" | "review")
1084
+ /**
1085
+ * Overall trustworthiness of an emitted result set.
1086
+ */
1087
+ export type SimilarCodeCompletionStatus = ("complete" | "partial")
1088
+ /**
1089
+ * Bounded phase names in the similar-code pipeline.
1090
+ */
1091
+ export type SimilarCodePhase = ("discovery" | "extraction" | "cache" | "embedding" | "validation" | "comparison" | "enrichment")
1092
+ /**
1093
+ * Completion state for one generation phase.
1094
+ */
1095
+ export type SimilarCodePhaseStatus = ("complete" | "partial" | "skipped" | "timed-out")
1096
+ /**
1097
+ * Stable reasons why admitted work was skipped or truncated.
1098
+ */
1099
+ export type SimilarCodeSkipReason = ("below-minimum-lines" | "unsupported-function" | "generated-source" | "function-too-large" | "input-limit" | "source-bytes-limit" | "vector-memory-limit" | "comparison-limit" | "candidate-limit" | "neighbor-limit" | "timeout" | "provider-failure" | "token-truncation" | "enrichment-unavailable")
1100
+ /**
1101
+ * Vector cache outcome for a run.
1102
+ */
1103
+ export type SimilarCodeCacheStatus = ("disabled" | "hit" | "miss" | "mixed")
1104
+ /**
1105
+ * Non-severity diagnostic domain for similar-code generation.
1106
+ */
1107
+ export type SimilarCodeDiagnosticDomain = ("workspace" | "extraction" | "provider" | "cache" | "enrichment" | "review")
1108
+ /**
1109
+ * Version singleton for a similar-code inspect packet.
1110
+ */
1111
+ export type SimilarCodeInspectSchemaVersion = "1"
1112
+ /**
1113
+ * Conservative syntactic side-effect hint for an inspected function.
1114
+ */
1115
+ export type SimilarCodeSideEffectHint = ("pure-looking" | "may-have-side-effects" | "unknown")
1116
+ /**
1117
+ * Version singleton for reviewed similar-code output.
1118
+ */
1119
+ export type SimilarCodeReviewSchemaVersion = "1"
1120
+ /**
1121
+ * Domain outcome assigned by review, never by candidate generation.
1122
+ */
1123
+ export type SimilarCodeDomainOutcome = ("same-responsibility" | "related-but-distinct" | "intentional-duplication" | "unrelated" | "needs-human-review")
1124
+ /**
1125
+ * How review matched an external verdict to the current candidate.
1126
+ */
1127
+ export type SimilarCodeVerdictMatch = ("candidate-id" | "review-key" | "unverified" | "ambiguous-review-key")
1046
1128
  /**
1047
1129
  * Discriminator value for [`CodeClimateIssue::kind`].
1048
1130
  */
@@ -7759,15 +7841,17 @@ near_duplicate_theme_tokens?: NearDuplicateThemeToken[]
7759
7841
  */
7760
7842
  near_duplicate_css_in_js_tokens?: NearDuplicateThemeToken[]
7761
7843
  /**
7762
- * A location-aware reverse index of Tailwind v4 `@theme` token consumers:
7763
- * per token, where it is consumed (`var()` reads, `@apply` bodies, generated
7764
- * utility classes) and through which surface, plus the full `consumer_count`
7765
- * (a static lower bound) and the defining site. Built from the same gated
7766
- * candidate set as `unused_theme_tokens` (v4 + non-plugin + non-published +
7767
- * whole-scope), so a token with `consumer_count: 0` is the same "nothing
7768
- * consumes this" signal. Sorted by token; empty when the project is not
7769
- * Tailwind v4 or a plugin / published-library / partial-scope run gated the
7770
- * scan out.
7844
+ * A location-aware reverse index of design-token consumers. Tailwind v4
7845
+ * entries cover `@theme` tokens consumed through `var()` reads, `@apply`
7846
+ * bodies, or generated utilities. CSS-in-JS entries cover supported StyleX,
7847
+ * vanilla-extract, PandaCSS, styled-components, and Emotion definitions and
7848
+ * their member or call consumers. Every entry includes the defining site,
7849
+ * located consumer samples, and the full `consumer_count` as a static lower
7850
+ * bound. Tailwind entries use the same gated candidate set as
7851
+ * `unused_theme_tokens`; CSS-in-JS entries require supported direct imports.
7852
+ * Partial-scope runs omit the index. Sorted by token and empty when no
7853
+ * eligible token definitions are found. A zero count is evidence for
7854
+ * investigation, not deletion proof.
7771
7855
  */
7772
7856
  token_consumers?: TokenConsumers[]
7773
7857
  /**
@@ -8602,13 +8686,14 @@ actions: CssCandidateAction[]
8602
8686
  * `apply`), built from the same gated candidate set as `unused_theme_tokens`
8603
8687
  * (v4 + non-plugin + non-published + whole-scope), so a `consumer_count: 0`
8604
8688
  * corroborates the `unused_theme_tokens` "nothing consumes this" finding.
8605
- * - CSS-in-JS tokens (kind `js-member` / `js-call`) from StyleX `defineVars`,
8606
- * vanilla-extract `createTheme` family definitions, and PandaCSS `defineTokens`,
8607
- * consumed via cross-module member access or PandaCSS `token('...')` calls. NOTE:
8689
+ * - CSS-in-JS tokens (kind `js-member` / `js-call`) from StyleX `defineVars` /
8690
+ * `unstable_defineVarsNested`, vanilla-extract `createTheme` family definitions,
8691
+ * and PandaCSS `defineTokens`, consumed via same-file or cross-module member
8692
+ * access, StyleX theme-group calls, or PandaCSS `token('...')` calls. NOTE:
8608
8693
  * CSS-in-JS has NO corroborating dead-token finding (there is no
8609
8694
  * `unused_theme_tokens` analogue), so a CSS-in-JS `consumer_count: 0` is a weaker
8610
- * signal than the Tailwind case (and the cross-file scan is relative-import or
8611
- * generated-token-helper only, so alias / bare-package imports are not counted).
8695
+ * signal than the Tailwind case (and unresolved dynamic imports or computed
8696
+ * accesses are not counted).
8612
8697
  *
8613
8698
  * This is DESCRIPTIVE context (a blast-radius lookup), not a finding, so it
8614
8699
  * deliberately carries no `actions` array (unlike the cleanup-candidate types in
@@ -8620,14 +8705,14 @@ export interface TokenConsumers {
8620
8705
  /**
8621
8706
  * The token identity. For a Tailwind `@theme` token this is the full custom
8622
8707
  * property as authored, INCLUDING the `--` prefix (`--color-brand`). For a
8623
- * CSS-in-JS token (kind `js-member`) this is the binding-qualified dotted
8708
+ * CSS-in-JS token (kind `js-member` / `js-call`) this is the binding-qualified dotted
8624
8709
  * access path, NO `--` prefix (`vars.color.primary`), matching how consumers
8625
8710
  * read it. The presence of the `--` prefix distinguishes the two origins.
8626
8711
  */
8627
8712
  token: string
8628
8713
  /**
8629
8714
  * For a Tailwind token, the v4 theme namespace (`color`, `radius`,
8630
- * `font-weight`, ...). For a CSS-in-JS token (kind `js-member`), the defining
8715
+ * `font-weight`, ...). For a CSS-in-JS token (kind `js-member` / `js-call`), the defining
8631
8716
  * export BINDING the token set is accessed through (`vars`), which identifies
8632
8717
  * the token set, NOT a semantic group. (The field is thus overloaded by
8633
8718
  * origin; branch on `consumers[].kind` or the `token` shape.)
@@ -8646,9 +8731,10 @@ definition_path: string
8646
8731
  definition_line: number
8647
8732
  /**
8648
8733
  * The FULL number of consumer locations found, a STATIC LOWER BOUND: a
8649
- * computed class name (`bg-${color}`) or a value read outside CSS/markup the
8650
- * scan never sees is not counted. This is the aggregate over every consumer,
8651
- * computed BEFORE [`consumers`](Self::consumers) is capped to a sample.
8734
+ * computed class name (`bg-${color}`), unresolved import, dynamic token
8735
+ * structure, or computed CSS-in-JS access is not counted. This is the
8736
+ * aggregate over every consumer, computed BEFORE
8737
+ * [`consumers`](Self::consumers) is capped to a sample.
8652
8738
  */
8653
8739
  consumer_count: number
8654
8740
  /**
@@ -8660,8 +8746,8 @@ consumer_count: number
8660
8746
  consumers: TokenConsumerLocation[]
8661
8747
  }
8662
8748
  /**
8663
- * Where one Tailwind v4 `@theme` token is consumed, and through which surface.
8664
- * One entry in a [`TokenConsumers::consumers`] sample.
8749
+ * Where one Tailwind or CSS-in-JS design token is consumed, and through which
8750
+ * surface. One entry in a [`TokenConsumers::consumers`] sample.
8665
8751
  */
8666
8752
  export interface TokenConsumerLocation {
8667
8753
  /**
@@ -12439,6 +12525,16 @@ units: ReviewUnitFact[]
12439
12525
  * the `units` module directories.
12440
12526
  */
12441
12527
  order: string[]
12528
+ /**
12529
+ * Connected components of the inter-unit dependency graph: groups of
12530
+ * module directories that share no import edge with any unit outside the
12531
+ * group. Present only when there are two or more; a single slice is just
12532
+ * `order`. A slice proves the absence of import edges to the rest of the
12533
+ * change, nothing more: whether it can land on its own is still a
12534
+ * judgment (generated files and lockstep contracts share no edge and
12535
+ * still belong together). An orientation fact, never a demand to split.
12536
+ */
12537
+ independent_slices?: string[][]
12442
12538
  }
12443
12539
  /**
12444
12540
  * One review unit: a coherent by-module cluster of the changed set.
@@ -12604,6 +12700,19 @@ cycle_introduced: string[]
12604
12700
  * reachable through an `exports` path is present (exactly one).
12605
12701
  */
12606
12702
  public_api_added: string[]
12703
+ /**
12704
+ * Third-party dependencies a changed `package.json` declares that the base
12705
+ * manifest did not, as `<manifest>::<name>` keys. Every dependency section
12706
+ * participates. Always present, empty when no manifest changed.
12707
+ */
12708
+ dependency_added: string[]
12709
+ /**
12710
+ * Declared dependencies whose range moved across a major version (or a
12711
+ * `0.x` minor) vs base, as `<manifest>::<name>@<from>-><to>` keys. Minor
12712
+ * and patch moves are not candidates; a non-numeric range is skipped.
12713
+ * Always present, empty when nothing crossed a major version.
12714
+ */
12715
+ dependency_major_bumped: string[]
12607
12716
  }
12608
12717
  /**
12609
12718
  * One weakening signal: a category, the file it was detected in, and a short
@@ -12884,6 +12993,11 @@ out_of_diff: string[]
12884
12993
  * Routed expert(s), when ownership signals are available.
12885
12994
  */
12886
12995
  expert: string[]
12996
+ /**
12997
+ * Direct test adjacency of this unit. Absent when the graph was not
12998
+ * retained or the unit is itself a test file.
12999
+ */
13000
+ test_adjacency?: (TestAdjacency | null)
12887
13001
  }
12888
13002
  /**
12889
13003
  * One stable per-hunk CHANGE ANCHOR: a changed region the agent may cite as a
@@ -12926,8 +13040,10 @@ previous_change_anchor?: (string | null)
12926
13040
  */
12927
13041
  export interface AgentSchema {
12928
13042
  /**
12929
- * How the agent must structure each judgment: cite an emitted `signal_id`,
12930
- * add free-text `framing` (non-deterministic, fenced), an optional `concern`.
13043
+ * How the agent must structure each judgment: cite an emitted `signal_id`
13044
+ * or `change_anchor`, add free-text `framing` (non-deterministic, fenced),
13045
+ * an optional `concern`, and an optional `action` from the closed
13046
+ * vocabulary.
12931
13047
  */
12932
13048
  judgment_shape: string
12933
13049
  /**
@@ -12939,6 +13055,16 @@ echo_field: string
12939
13055
  * The anchoring rule name.
12940
13056
  */
12941
13057
  anchoring_rule: string
13058
+ /**
13059
+ * The closed `action` vocabulary ([`JUDGMENT_ACTIONS`]): a judgment with
13060
+ * any other value is rejected on reentry.
13061
+ */
13062
+ action_vocabulary: string[]
13063
+ /**
13064
+ * The recommended `concern` vocabulary ([`JUDGMENT_CONCERNS`]), documented
13065
+ * for grouping; free text is still accepted.
13066
+ */
13067
+ concern_vocabulary: string[]
12942
13068
  }
12943
13069
  /**
12944
13070
  * The `fallow review --walkthrough-file` validation envelope: the result of
@@ -13016,6 +13142,13 @@ agent_framing: string
13016
13142
  * The agent's optional concern category.
13017
13143
  */
13018
13144
  concern?: (string | null)
13145
+ /**
13146
+ * The author-action label the judgment carries (`block`, `address`,
13147
+ * `consider`, or `fyi`), validated against [`JUDGMENT_ACTIONS`]. It tells
13148
+ * the receiving author what is required and what is optional; it is the
13149
+ * reviewer's instruction, fenced with the framing, never a gate.
13150
+ */
13151
+ action?: (string | null)
13019
13152
  /**
13020
13153
  * Hard fence: always `false`. The framing is agent prose, never a
13021
13154
  * deterministic fallow result, so it never gates or auto-posts.
@@ -13039,9 +13172,15 @@ change_anchor: string
13039
13172
  /**
13040
13173
  * The rejection reason: `unanchored-signal-id` (cited a signal fallow did
13041
13174
  * not emit), `unknown-change-anchor` (cited a region fallow did not emit),
13042
- * or `stale-snapshot` (the tree moved).
13175
+ * `stale-snapshot` (the tree moved), or `invalid-action` (an `action`
13176
+ * outside [`JUDGMENT_ACTIONS`]; the anchor itself resolved).
13043
13177
  */
13044
13178
  reason: string
13179
+ /**
13180
+ * The offending value for an `invalid-action` rejection, echoed so the
13181
+ * agent can correct it in one round trip. Absent for the other reasons.
13182
+ */
13183
+ invalid_value?: (string | null)
13045
13184
  }
13046
13185
  /**
13047
13186
  * The `fallow suppressions --format json` envelope. `FallowOutput`
@@ -13183,6 +13322,548 @@ backend_version?: (string | null)
13183
13322
  */
13184
13323
  remediation?: (string | null)
13185
13324
  }
13325
+ /**
13326
+ * Raw `fallow similar-code --format json` output.
13327
+ */
13328
+ export interface SimilarCodeOutput {
13329
+ schema_version: SimilarCodeSchemaVersion
13330
+ version: ToolVersion
13331
+ elapsed_ms: ElapsedMs
13332
+ generation: SimilarCodeGeneration
13333
+ /**
13334
+ * Deterministically ordered unverified candidates.
13335
+ */
13336
+ candidates: SimilarCodeCandidate[]
13337
+ completion: SimilarCodeCompletion
13338
+ /**
13339
+ * Non-severity diagnostics in deterministic order.
13340
+ */
13341
+ diagnostics: SimilarCodeDiagnostic[]
13342
+ }
13343
+ /**
13344
+ * Complete provenance needed to reproduce candidate generation.
13345
+ */
13346
+ export interface SimilarCodeGeneration {
13347
+ /**
13348
+ * Version of extraction and normalization semantics used for both IDs.
13349
+ */
13350
+ extraction_semantics_version: number
13351
+ /**
13352
+ * Version of the calculation that produces model embeddings.
13353
+ */
13354
+ embedding_semantics_version: number
13355
+ provider: SimilarCodeProviderProvenance
13356
+ model: SimilarCodeModelProvenance
13357
+ parameters: SimilarCodeGenerationParameters
13358
+ scope: SimilarCodeScopeProvenance
13359
+ /**
13360
+ * Minimum cosine similarity admitted into the candidate set.
13361
+ */
13362
+ threshold: number
13363
+ /**
13364
+ * Minimum source line count admitted into function extraction.
13365
+ */
13366
+ min_lines: number
13367
+ }
13368
+ /**
13369
+ * Immutable local provider provenance for one generation run.
13370
+ */
13371
+ export interface SimilarCodeProviderProvenance {
13372
+ provider: SimilarCodeProvider
13373
+ /**
13374
+ * Exact companion package version.
13375
+ */
13376
+ companion_version: string
13377
+ /**
13378
+ * Companion protocol version negotiated for this run.
13379
+ */
13380
+ protocol_version: number
13381
+ /**
13382
+ * Whether source content left the local machine. Version 1 requires false.
13383
+ */
13384
+ source_left_machine: boolean
13385
+ }
13386
+ /**
13387
+ * Immutable model artifact provenance.
13388
+ */
13389
+ export interface SimilarCodeModelProvenance {
13390
+ /**
13391
+ * Stable model identifier.
13392
+ */
13393
+ model_id: string
13394
+ /**
13395
+ * Immutable model revision.
13396
+ */
13397
+ revision: string
13398
+ /**
13399
+ * SHA-256 digest of the exact model artifact bytes.
13400
+ */
13401
+ artifact_sha256: string
13402
+ /**
13403
+ * SPDX license identifier or reviewed license label.
13404
+ */
13405
+ license: string
13406
+ /**
13407
+ * Embedding vector dimensions.
13408
+ */
13409
+ dimensions: number
13410
+ }
13411
+ /**
13412
+ * Parameters that materially affect generated embeddings and scores.
13413
+ */
13414
+ export interface SimilarCodeGenerationParameters {
13415
+ /**
13416
+ * Numeric representation used for model inference.
13417
+ */
13418
+ dtype: string
13419
+ /**
13420
+ * Pooling strategy applied to model output.
13421
+ */
13422
+ pooling: string
13423
+ /**
13424
+ * Whether vectors were normalized before comparison.
13425
+ */
13426
+ normalized: boolean
13427
+ /**
13428
+ * Maximum inference batch size used by the run.
13429
+ */
13430
+ batch_size: number
13431
+ /**
13432
+ * Maximum tokenizer length before deterministic truncation.
13433
+ */
13434
+ max_tokens: number
13435
+ /**
13436
+ * Digest over the complete effective generation parameter set.
13437
+ */
13438
+ parameter_sha256: string
13439
+ }
13440
+ /**
13441
+ * Effective endpoint scope used for corpus admission and pair retention.
13442
+ */
13443
+ export interface SimilarCodeScopeProvenance {
13444
+ /**
13445
+ * Whether file, changed-file, diff, or workspace scoping was active.
13446
+ */
13447
+ active: boolean
13448
+ /**
13449
+ * Sorted project-root-relative paths satisfying every active predicate.
13450
+ */
13451
+ paths: string[]
13452
+ }
13453
+ /**
13454
+ * One unverified semantic similar-code candidate.
13455
+ */
13456
+ export interface SimilarCodeCandidate {
13457
+ /**
13458
+ * Snapshot-stable opaque candidate identity.
13459
+ */
13460
+ candidate_id: string
13461
+ /**
13462
+ * Content-stable key used for safe line-movement rebinding.
13463
+ */
13464
+ review_key: string
13465
+ left: SimilarCodeLocation
13466
+ right: SimilarCodeLocation
13467
+ /**
13468
+ * Cosine similarity reported by the pinned provider and model.
13469
+ */
13470
+ similarity: number
13471
+ similarity_band: SimilarCodeSimilarityBand
13472
+ verification_status: SimilarCodeVerificationStatus
13473
+ enrichment: SimilarCodeEnrichmentAvailability
13474
+ /**
13475
+ * Read-only inspect and review affordances.
13476
+ */
13477
+ actions: SimilarCodeAction[]
13478
+ }
13479
+ /**
13480
+ * Exact named location of one candidate function.
13481
+ */
13482
+ export interface SimilarCodeLocation {
13483
+ /**
13484
+ * Project-root-relative, forward-slash path.
13485
+ */
13486
+ path: string
13487
+ /**
13488
+ * Extracted function or method name.
13489
+ */
13490
+ name: string
13491
+ /**
13492
+ * One-based inclusive start line.
13493
+ */
13494
+ start_line: number
13495
+ /**
13496
+ * One-based inclusive start column.
13497
+ */
13498
+ start_column: number
13499
+ /**
13500
+ * One-based inclusive end line.
13501
+ */
13502
+ end_line: number
13503
+ /**
13504
+ * One-based inclusive end column.
13505
+ */
13506
+ end_column: number
13507
+ /**
13508
+ * SHA-256 digest of the exact extracted function source.
13509
+ */
13510
+ source_sha256: string
13511
+ }
13512
+ /**
13513
+ * Availability of every supported source-grounded enrichment.
13514
+ */
13515
+ export interface SimilarCodeEnrichmentAvailability {
13516
+ graph_relationship: SimilarCodeEnrichmentState
13517
+ entry_point_reachability: SimilarCodeEnrichmentState
13518
+ callers: SimilarCodeEnrichmentState
13519
+ callees: SimilarCodeEnrichmentState
13520
+ ownership: SimilarCodeEnrichmentState
13521
+ churn: SimilarCodeEnrichmentState
13522
+ tests: SimilarCodeEnrichmentState
13523
+ deterministic_clone_coverage: SimilarCodeEnrichmentState
13524
+ runtime: SimilarCodeEnrichmentState
13525
+ }
13526
+ /**
13527
+ * Read-only follow-up exposed for a candidate.
13528
+ */
13529
+ export interface SimilarCodeAction {
13530
+ action: SimilarCodeActionType
13531
+ /**
13532
+ * Human-readable description of the read-only operation.
13533
+ */
13534
+ description: string
13535
+ /**
13536
+ * Explicit mutation guarantee. Version 1 requires this to be true.
13537
+ */
13538
+ read_only: boolean
13539
+ }
13540
+ /**
13541
+ * Typed completion, limit, skip, and cache accounting.
13542
+ */
13543
+ export interface SimilarCodeCompletion {
13544
+ status: SimilarCodeCompletionStatus
13545
+ /**
13546
+ * Per-phase completion in pipeline order.
13547
+ */
13548
+ phases: SimilarCodePhaseCompletion[]
13549
+ limits: SimilarCodeLimits
13550
+ /**
13551
+ * Aggregated skips in phase and reason order.
13552
+ */
13553
+ skips: SimilarCodeSkip[]
13554
+ cache: SimilarCodeCacheSummary
13555
+ /**
13556
+ * Aggregate model inference wall time reported by the local provider.
13557
+ */
13558
+ provider_inference_ms: number
13559
+ }
13560
+ /**
13561
+ * Accounting for one bounded generation phase.
13562
+ */
13563
+ export interface SimilarCodePhaseCompletion {
13564
+ phase: SimilarCodePhase
13565
+ status: SimilarCodePhaseStatus
13566
+ /**
13567
+ * Number of admitted inputs processed by this phase.
13568
+ */
13569
+ processed: number
13570
+ /**
13571
+ * Total admitted inputs known to this phase, when available.
13572
+ */
13573
+ total?: (number | null)
13574
+ /**
13575
+ * Stable explanation when the phase did not complete.
13576
+ */
13577
+ reason?: (string | null)
13578
+ }
13579
+ /**
13580
+ * Effective resource limits for a similar-code run.
13581
+ */
13582
+ export interface SimilarCodeLimits {
13583
+ /**
13584
+ * Maximum source files admitted.
13585
+ */
13586
+ max_files: number
13587
+ /**
13588
+ * Maximum extracted functions admitted.
13589
+ */
13590
+ max_functions: number
13591
+ /**
13592
+ * Maximum aggregate normalized source bytes admitted.
13593
+ */
13594
+ max_source_bytes: number
13595
+ /**
13596
+ * Maximum normalized bytes admitted for one function.
13597
+ */
13598
+ max_function_bytes: number
13599
+ /**
13600
+ * Maximum embedding batch size.
13601
+ */
13602
+ max_batch_size: number
13603
+ /**
13604
+ * Maximum vector bytes retained for comparison.
13605
+ */
13606
+ max_vector_bytes: number
13607
+ /**
13608
+ * Maximum pair comparisons performed.
13609
+ */
13610
+ max_comparisons: number
13611
+ /**
13612
+ * Maximum candidates returned.
13613
+ */
13614
+ max_candidates: number
13615
+ /**
13616
+ * Maximum returned neighbors per function.
13617
+ */
13618
+ max_neighbors_per_function: number
13619
+ /**
13620
+ * End-to-end timeout in milliseconds.
13621
+ */
13622
+ timeout_ms: number
13623
+ }
13624
+ /**
13625
+ * Count of skipped work for a stable reason.
13626
+ */
13627
+ export interface SimilarCodeSkip {
13628
+ phase: SimilarCodePhase
13629
+ reason: SimilarCodeSkipReason
13630
+ /**
13631
+ * Number of inputs skipped for this phase and reason.
13632
+ */
13633
+ count: number
13634
+ }
13635
+ /**
13636
+ * Privacy-safe cache accounting. Source fragments are never represented.
13637
+ */
13638
+ export interface SimilarCodeCacheSummary {
13639
+ status: SimilarCodeCacheStatus
13640
+ /**
13641
+ * Valid vector cache hits.
13642
+ */
13643
+ hits: number
13644
+ /**
13645
+ * Vector cache misses.
13646
+ */
13647
+ misses: number
13648
+ /**
13649
+ * Newly written vector cache entries.
13650
+ */
13651
+ writes: number
13652
+ /**
13653
+ * Corrupt or incompatible entries ignored safely.
13654
+ */
13655
+ invalid_entries: number
13656
+ }
13657
+ /**
13658
+ * Actionable diagnostic without a severity or gate implication.
13659
+ */
13660
+ export interface SimilarCodeDiagnostic {
13661
+ domain: SimilarCodeDiagnosticDomain
13662
+ /**
13663
+ * Stable machine-readable code.
13664
+ */
13665
+ code: string
13666
+ /**
13667
+ * Bounded human-readable explanation.
13668
+ */
13669
+ message: string
13670
+ /**
13671
+ * Optional project-root-relative path.
13672
+ */
13673
+ path?: (string | null)
13674
+ }
13675
+ /**
13676
+ * `fallow similar-code inspect --format json` output.
13677
+ */
13678
+ export interface SimilarCodeInspectOutput {
13679
+ schema_version: SimilarCodeInspectSchemaVersion
13680
+ version: ToolVersion
13681
+ elapsed_ms: ElapsedMs
13682
+ generation: SimilarCodeGeneration
13683
+ candidate: SimilarCodeCandidate
13684
+ packet: SimilarCodeInspectPacket
13685
+ completion: SimilarCodeCompletion
13686
+ /**
13687
+ * Non-severity diagnostics in deterministic order.
13688
+ */
13689
+ diagnostics: SimilarCodeDiagnostic[]
13690
+ }
13691
+ /**
13692
+ * Bounded source-grounded packet for one immutable candidate.
13693
+ */
13694
+ export interface SimilarCodeInspectPacket {
13695
+ /**
13696
+ * Candidate identity this packet describes.
13697
+ */
13698
+ candidate_id: string
13699
+ /**
13700
+ * Content-stable review key this packet describes.
13701
+ */
13702
+ review_key: string
13703
+ availability: SimilarCodeEnrichmentAvailability
13704
+ /**
13705
+ * Graph relationship label, when relationship evidence is available.
13706
+ */
13707
+ graph_relationship?: (string | null)
13708
+ left: SimilarCodeSideEvidence
13709
+ right: SimilarCodeSideEvidence
13710
+ }
13711
+ /**
13712
+ * Bounded evidence for one side of an inspect packet.
13713
+ */
13714
+ export interface SimilarCodeSideEvidence {
13715
+ /**
13716
+ * Bounded source window included only in inspect output, never raw output or cache.
13717
+ */
13718
+ source_window?: (string | null)
13719
+ /**
13720
+ * Declared parameter count when extraction supplied it.
13721
+ */
13722
+ parameter_count?: (number | null)
13723
+ /**
13724
+ * Whether the inspected function is declared async.
13725
+ */
13726
+ is_async?: (boolean | null)
13727
+ /**
13728
+ * Whether the inspected function is a generator.
13729
+ */
13730
+ is_generator?: (boolean | null)
13731
+ /**
13732
+ * Whether the inspected function contains an await expression.
13733
+ */
13734
+ has_await?: (boolean | null)
13735
+ /**
13736
+ * Whether the inspected function contains a throw expression.
13737
+ */
13738
+ has_throw?: (boolean | null)
13739
+ /**
13740
+ * Conservative syntactic side-effect classification.
13741
+ */
13742
+ side_effect_hint?: (SimilarCodeSideEffectHint | null)
13743
+ /**
13744
+ * Whether the function is reachable from a configured entry point.
13745
+ */
13746
+ entry_point_reachable?: (boolean | null)
13747
+ /**
13748
+ * Bounded, deterministically ordered direct callers.
13749
+ */
13750
+ callers: SimilarCodeNamedReference[]
13751
+ /**
13752
+ * Bounded, deterministically ordered direct callees.
13753
+ */
13754
+ callees: SimilarCodeNamedReference[]
13755
+ /**
13756
+ * Bounded, deterministically ordered ownership labels.
13757
+ */
13758
+ owners: string[]
13759
+ /**
13760
+ * Recent commit count in the configured churn window.
13761
+ */
13762
+ churn_commits?: (number | null)
13763
+ /**
13764
+ * Bounded, root-relative related test paths.
13765
+ */
13766
+ tests: string[]
13767
+ /**
13768
+ * Fraction covered by deterministic clone groups, from zero through one.
13769
+ */
13770
+ deterministic_clone_coverage?: (number | null)
13771
+ /**
13772
+ * Runtime observation count when compatible runtime evidence is present.
13773
+ */
13774
+ runtime_observations?: (number | null)
13775
+ }
13776
+ /**
13777
+ * One named graph reference used in an inspect packet.
13778
+ */
13779
+ export interface SimilarCodeNamedReference {
13780
+ /**
13781
+ * Project-root-relative, forward-slash path.
13782
+ */
13783
+ path: string
13784
+ /**
13785
+ * Referenced symbol name.
13786
+ */
13787
+ name: string
13788
+ /**
13789
+ * One-based source line.
13790
+ */
13791
+ line: number
13792
+ }
13793
+ /**
13794
+ * `fallow similar-code review --format json` output.
13795
+ */
13796
+ export interface SimilarCodeReviewOutput {
13797
+ schema_version: SimilarCodeReviewSchemaVersion
13798
+ version: ToolVersion
13799
+ elapsed_ms: ElapsedMs
13800
+ generation: SimilarCodeGeneration
13801
+ review: SimilarCodeReviewProvenance
13802
+ /**
13803
+ * Raw candidates joined with verdicts in candidate order.
13804
+ */
13805
+ candidates: SimilarCodeReviewedCandidate[]
13806
+ completion: SimilarCodeCompletion
13807
+ /**
13808
+ * Non-severity diagnostics in deterministic order.
13809
+ */
13810
+ diagnostics: SimilarCodeDiagnostic[]
13811
+ }
13812
+ /**
13813
+ * Digests that make the review join reproducible without exposing source.
13814
+ */
13815
+ export interface SimilarCodeReviewProvenance {
13816
+ /**
13817
+ * SHA-256 digest of the exact candidate JSON input bytes.
13818
+ */
13819
+ candidates_sha256: string
13820
+ /**
13821
+ * SHA-256 digest of the exact verdict JSON input bytes.
13822
+ */
13823
+ verdicts_sha256: string
13824
+ }
13825
+ /**
13826
+ * One candidate joined with its separate verdict, if safely matched.
13827
+ */
13828
+ export interface SimilarCodeReviewedCandidate {
13829
+ candidate: SimilarCodeCandidate
13830
+ /**
13831
+ * Safely matched external verdict, absent when still unverified.
13832
+ */
13833
+ verdict?: (SimilarCodeVerdict | null)
13834
+ verdict_match: SimilarCodeVerdictMatch
13835
+ outcome: SimilarCodeDomainOutcome
13836
+ }
13837
+ /**
13838
+ * Separate verdict input for one immutable candidate.
13839
+ */
13840
+ export interface SimilarCodeVerdict {
13841
+ /**
13842
+ * Snapshot identity from the raw candidate.
13843
+ */
13844
+ candidate_id: string
13845
+ /**
13846
+ * Content-stable identity from the raw candidate.
13847
+ */
13848
+ review_key: string
13849
+ /**
13850
+ * Whether the pair is useful enough to review. Null means undecided.
13851
+ */
13852
+ candidate_worthy?: (boolean | null)
13853
+ /**
13854
+ * Whether the two functions behave equivalently. Null means undecided.
13855
+ */
13856
+ behaviorally_equivalent?: (boolean | null)
13857
+ /**
13858
+ * Whether consolidation is safe. Null means undecided.
13859
+ */
13860
+ refactor_safe?: (boolean | null)
13861
+ outcome: SimilarCodeDomainOutcome
13862
+ /**
13863
+ * Bounded explanation grounded in the inspected sources.
13864
+ */
13865
+ rationale: string
13866
+ }
13186
13867
  /**
13187
13868
  * Single CodeClimate-compatible issue inside [`CodeClimateOutput`].
13188
13869
  */