@cat-factory/contracts 0.354.0 → 0.355.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.
@@ -7,7 +7,7 @@ import * as v from 'valibot';
7
7
  * route behind it is exactly the "refusal advertising a capability we do not have" defect that set
8
8
  * builds. Add a member only together with its routes.
9
9
  */
10
- export declare const publicDecisionKindSchema: v.PicklistSchema<["requirements-review", "fork", "judge", "input-gate", "approval-gate", "agent-decision", "clarity-review", "brainstorm", "pr-review", "human-test", "visual-confirmation", "follow-ups", "interview"], undefined>;
10
+ export declare const publicDecisionKindSchema: v.PicklistSchema<["requirements-review", "fork", "judge", "input-gate", "approval-gate", "agent-decision", "clarity-review", "brainstorm", "pr-review", "bug-fishing", "human-test", "visual-confirmation", "follow-ups", "interview"], undefined>;
11
11
  export type PublicDecisionKind = v.InferOutput<typeof publicDecisionKindSchema>;
12
12
  /**
13
13
  * One reviewer finding as exposed externally — the question, how serious it is, and where it
@@ -725,6 +725,278 @@ export type PublicPrReviewDecision = v.InferOutput<typeof publicPrReviewDecision
725
725
  * `reportedSlices` and `lastActivityAt` on the decision are what it reads instead.
726
726
  */
727
727
  export declare const PUBLIC_PR_REVIEW_MAX_RESUME_ATTEMPTS = 3;
728
+ /**
729
+ * One angle of an expedition as exposed externally: what the pass was told to hunt, how far it
730
+ * got, and which slice of the codebase it covered.
731
+ *
732
+ * `title` / `goal` / `territoryLabel` are the values the expedition RECORDED when it planned the
733
+ * pass, never a lookup against today's catalog. An angle this build has since retired, or a
734
+ * territory a later survey of a moved tree no longer produces, therefore still renders as the
735
+ * thing that actually ran rather than as a blank or a guess at a current member.
736
+ */
737
+ export declare const publicBugFishingPhaseSchema: v.ObjectSchema<{
738
+ /** The angle's id. An OPEN string on the wire: a stored run can name one this build retired. */
739
+ readonly phaseId: v.StringSchema<undefined>;
740
+ /** The angle's label as it stood when this expedition planned it. */
741
+ readonly title: v.StringSchema<undefined>;
742
+ /** What this pass was told to hunt, as it stood when this expedition planned it. */
743
+ readonly goal: v.StringSchema<undefined>;
744
+ readonly status: v.PicklistSchema<["pending", "fishing", "completed", "failed"], undefined>;
745
+ /** The agent's account of what it covered; null until the pass settles. */
746
+ readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
747
+ /** Why the pass failed, on a `failed` phase. Null otherwise. */
748
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
749
+ /** The territory this pass fished, or null for a whole-codebase pass. */
750
+ readonly territoryId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
751
+ /** The territory's label as it stood when this pass ran. */
752
+ readonly territoryLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
753
+ /** Epoch ms the pass settled; null while pending or fishing. */
754
+ readonly settledAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
755
+ /**
756
+ * How many manifest files the pass reported reading, against how many the territory held.
757
+ * SELF-REPORTED by the agent, which the field names say: a low share is what tells a reader
758
+ * that "found nothing here" may mean "did not look". Null when the pass reported none, which is
759
+ * a different fact from a share of zero.
760
+ */
761
+ readonly filesRead: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
762
+ readonly manifestFiles: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
763
+ }, undefined>;
764
+ export type PublicBugFishingPhase = v.InferOutput<typeof publicBugFishingPhaseSchema>;
765
+ /** One cell of the planned (territory x angle) matrix the pass budget cut before it was fished. */
766
+ export declare const publicBugFishingUnfishedCellSchema: v.ObjectSchema<{
767
+ readonly territoryId: v.StringSchema<undefined>;
768
+ readonly territoryLabel: v.StringSchema<undefined>;
769
+ readonly phaseId: v.StringSchema<undefined>;
770
+ readonly phaseTitle: v.StringSchema<undefined>;
771
+ }, undefined>;
772
+ export type PublicBugFishingUnfishedCell = v.InferOutput<typeof publicBugFishingUnfishedCellSchema>;
773
+ /**
774
+ * What the expedition decided to fish, and what it decided not to.
775
+ *
776
+ * `unfished` is the reason this is published rather than left as an implementation detail: a cap
777
+ * that says nothing about its tail teaches a reader that the tail was clean. An integration
778
+ * filing what an expedition caught has to be able to say which ground nobody covered.
779
+ */
780
+ export declare const publicBugFishingPlanSchema: v.ObjectSchema<{
781
+ /** The most container dispatches this expedition may make. */
782
+ readonly passBudget: v.NumberSchema<undefined>;
783
+ /** How many cells the full matrix held before the budget trimmed it. */
784
+ readonly plannedCells: v.NumberSchema<undefined>;
785
+ /** The cells the budget cut. Empty when the whole matrix fitted. */
786
+ readonly unfished: v.ArraySchema<v.ObjectSchema<{
787
+ readonly territoryId: v.StringSchema<undefined>;
788
+ readonly territoryLabel: v.StringSchema<undefined>;
789
+ readonly phaseId: v.StringSchema<undefined>;
790
+ readonly phaseTitle: v.StringSchema<undefined>;
791
+ }, undefined>, undefined>;
792
+ /**
793
+ * True when the tree the survey partitioned was TRUNCATED by the provider. The coverage numbers
794
+ * are then a share of what was read rather than of the repository, which are opposite readings.
795
+ */
796
+ readonly treeTruncated: v.BooleanSchema<undefined>;
797
+ /**
798
+ * Why the codebase survey could not run at all (no repository bound to the run, or a client that
799
+ * cannot enumerate a tree). Non-null means the single territory the expedition fished is a
800
+ * FALLBACK rather than a small repository, and the two look identical without it.
801
+ */
802
+ readonly surveyUnavailableReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
803
+ }, undefined>;
804
+ export type PublicBugFishingPlan = v.InferOutput<typeof publicBugFishingPlanSchema>;
805
+ /**
806
+ * The bug-fix task a marked finding spawned.
807
+ *
808
+ * Read `status`, never the mere presence of this record: a `pending` row is the CLAIM taken before
809
+ * the task exists (which is what stops two markings spawning two tasks for one finding), and a
810
+ * `failed` row means nothing was created and the finding is markable again.
811
+ */
812
+ export declare const publicBugFishingSpawnSchema: v.ObjectSchema<{
813
+ readonly status: v.PicklistSchema<["pending", "spawned", "failed"], undefined>;
814
+ /** The spawned task's id, addressable through `GET /api/v1/tasks/{taskId}`. */
815
+ readonly taskId: v.StringSchema<undefined>;
816
+ /** The run started on that task; null while the claim is pending. */
817
+ readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
818
+ /** The pipeline the spawned task runs (the expedition's default, or the marking's override). */
819
+ readonly pipelineId: v.StringSchema<undefined>;
820
+ /** Epoch ms the claim was taken. */
821
+ readonly requestedAt: v.NumberSchema<undefined>;
822
+ /** Why the spawn failed, on a `failed` record. Null otherwise. */
823
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
824
+ }, undefined>;
825
+ export type PublicBugFishingSpawn = v.InferOutput<typeof publicBugFishingSpawnSchema>;
826
+ /**
827
+ * One finding an expedition caught. Every string in it is MODEL-AUTHORED: treat it as data, never
828
+ * as markup.
829
+ *
830
+ * `evidence` is carried apart from `detail` for the reason the internal record keeps them apart:
831
+ * an expedition that cannot point at the code it is describing is speculating, and merging the two
832
+ * would leave a triaging human to infer that from the prose.
833
+ */
834
+ export declare const publicBugFishingFindingSchema: v.ObjectSchema<{
835
+ readonly findingId: v.StringSchema<undefined>;
836
+ /** The angle that surfaced it. */
837
+ readonly phaseId: v.StringSchema<undefined>;
838
+ /** The territory that angle was fishing, or null for a whole-codebase pass. */
839
+ readonly territoryId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
840
+ /** Repo-relative path; EMPTY when the finding is not anchored to one file. */
841
+ readonly path: v.StringSchema<undefined>;
842
+ readonly line: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
843
+ readonly severity: v.PicklistSchema<["critical", "high", "medium", "low"], undefined>;
844
+ readonly kind: v.PicklistSchema<["bug", "logic-gap", "edge-case", "footgun", "requirement-gap", "other"], undefined>;
845
+ /** The agent's own judgement of how sure it is. Never platform-derived. */
846
+ readonly confidence: v.PicklistSchema<["high", "medium", "low"], undefined>;
847
+ readonly title: v.StringSchema<undefined>;
848
+ readonly detail: v.StringSchema<undefined>;
849
+ /** The concrete inputs / interleaving / state that triggers the defect, when it named one. */
850
+ readonly failureScenario: v.NullableSchema<v.StringSchema<undefined>, undefined>;
851
+ /** What the agent actually read that supports the claim. */
852
+ readonly evidence: v.NullableSchema<v.StringSchema<undefined>, undefined>;
853
+ readonly suggestedFix: v.NullableSchema<v.StringSchema<undefined>, undefined>;
854
+ /** The bug-fix task marking this finding spawned; null when nobody has marked it. */
855
+ readonly spawn: v.NullableSchema<v.ObjectSchema<{
856
+ readonly status: v.PicklistSchema<["pending", "spawned", "failed"], undefined>;
857
+ /** The spawned task's id, addressable through `GET /api/v1/tasks/{taskId}`. */
858
+ readonly taskId: v.StringSchema<undefined>;
859
+ /** The run started on that task; null while the claim is pending. */
860
+ readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
861
+ /** The pipeline the spawned task runs (the expedition's default, or the marking's override). */
862
+ readonly pipelineId: v.StringSchema<undefined>;
863
+ /** Epoch ms the claim was taken. */
864
+ readonly requestedAt: v.NumberSchema<undefined>;
865
+ /** Why the spawn failed, on a `failed` record. Null otherwise. */
866
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
867
+ }, undefined>, undefined>;
868
+ /** True when a human waved it off. It stays on the record and is not markable. */
869
+ readonly dismissed: v.BooleanSchema<undefined>;
870
+ }, undefined>;
871
+ export type PublicBugFishingFinding = v.InferOutput<typeof publicBugFishingFindingSchema>;
872
+ /**
873
+ * A BUG-FISHING EXPEDITION: the read-only `bug-fisher` agent reads a service's codebase once per
874
+ * ANGLE per TERRITORY, and the run waits for a person to mark which of the things it caught are
875
+ * worth acting on. Each mark spawns its own bug-fix task.
876
+ *
877
+ * Listed while the expedition is still `fishing` as well as once it parks, and that is the shape
878
+ * of the flow rather than a convenience: a completed angle's findings are actionable the moment
879
+ * they land, so marking is accepted mid-hunt and a caller waiting for `awaiting_triage` before it
880
+ * reads anything would sit out the very overlap the separate passes exist to create.
881
+ *
882
+ * Reachable only through `POST /api/v1/tasks/{taskId}/start`, since `bug-fisher` is
883
+ * container-backed and the jobs surface is inline-only.
884
+ */
885
+ export declare const publicBugFishingDecisionSchema: v.ObjectSchema<{
886
+ readonly kind: v.LiteralSchema<"bug-fishing", undefined>;
887
+ /** `fishing` while angles are still in flight, `awaiting_triage` once every one has settled. */
888
+ readonly status: v.PicklistSchema<["fishing", "awaiting_triage", "done"], undefined>;
889
+ /** The step this expedition rides, lined up against `publicRun.steps`. */
890
+ readonly stepKind: v.StringSchema<undefined>;
891
+ readonly stepIndex: v.NumberSchema<undefined>;
892
+ /** The planned angles, in the order they are fished. */
893
+ readonly phases: v.ArraySchema<v.ObjectSchema<{
894
+ /** The angle's id. An OPEN string on the wire: a stored run can name one this build retired. */
895
+ readonly phaseId: v.StringSchema<undefined>;
896
+ /** The angle's label as it stood when this expedition planned it. */
897
+ readonly title: v.StringSchema<undefined>;
898
+ /** What this pass was told to hunt, as it stood when this expedition planned it. */
899
+ readonly goal: v.StringSchema<undefined>;
900
+ readonly status: v.PicklistSchema<["pending", "fishing", "completed", "failed"], undefined>;
901
+ /** The agent's account of what it covered; null until the pass settles. */
902
+ readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
903
+ /** Why the pass failed, on a `failed` phase. Null otherwise. */
904
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
905
+ /** The territory this pass fished, or null for a whole-codebase pass. */
906
+ readonly territoryId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
907
+ /** The territory's label as it stood when this pass ran. */
908
+ readonly territoryLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
909
+ /** Epoch ms the pass settled; null while pending or fishing. */
910
+ readonly settledAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
911
+ /**
912
+ * How many manifest files the pass reported reading, against how many the territory held.
913
+ * SELF-REPORTED by the agent, which the field names say: a low share is what tells a reader
914
+ * that "found nothing here" may mean "did not look". Null when the pass reported none, which is
915
+ * a different fact from a share of zero.
916
+ */
917
+ readonly filesRead: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
918
+ readonly manifestFiles: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
919
+ }, undefined>, undefined>;
920
+ /**
921
+ * Index into `phases` of the pass being fished. Equal to `phases.length` once every angle has
922
+ * settled, which is the same fact `status: "awaiting_triage"` states.
923
+ */
924
+ readonly currentPhaseIndex: v.NumberSchema<undefined>;
925
+ /** Every finding caught so far, oldest angle first and severity-ordered within an angle. */
926
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
927
+ readonly findingId: v.StringSchema<undefined>;
928
+ /** The angle that surfaced it. */
929
+ readonly phaseId: v.StringSchema<undefined>;
930
+ /** The territory that angle was fishing, or null for a whole-codebase pass. */
931
+ readonly territoryId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
932
+ /** Repo-relative path; EMPTY when the finding is not anchored to one file. */
933
+ readonly path: v.StringSchema<undefined>;
934
+ readonly line: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
935
+ readonly severity: v.PicklistSchema<["critical", "high", "medium", "low"], undefined>;
936
+ readonly kind: v.PicklistSchema<["bug", "logic-gap", "edge-case", "footgun", "requirement-gap", "other"], undefined>;
937
+ /** The agent's own judgement of how sure it is. Never platform-derived. */
938
+ readonly confidence: v.PicklistSchema<["high", "medium", "low"], undefined>;
939
+ readonly title: v.StringSchema<undefined>;
940
+ readonly detail: v.StringSchema<undefined>;
941
+ /** The concrete inputs / interleaving / state that triggers the defect, when it named one. */
942
+ readonly failureScenario: v.NullableSchema<v.StringSchema<undefined>, undefined>;
943
+ /** What the agent actually read that supports the claim. */
944
+ readonly evidence: v.NullableSchema<v.StringSchema<undefined>, undefined>;
945
+ readonly suggestedFix: v.NullableSchema<v.StringSchema<undefined>, undefined>;
946
+ /** The bug-fix task marking this finding spawned; null when nobody has marked it. */
947
+ readonly spawn: v.NullableSchema<v.ObjectSchema<{
948
+ readonly status: v.PicklistSchema<["pending", "spawned", "failed"], undefined>;
949
+ /** The spawned task's id, addressable through `GET /api/v1/tasks/{taskId}`. */
950
+ readonly taskId: v.StringSchema<undefined>;
951
+ /** The run started on that task; null while the claim is pending. */
952
+ readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
953
+ /** The pipeline the spawned task runs (the expedition's default, or the marking's override). */
954
+ readonly pipelineId: v.StringSchema<undefined>;
955
+ /** Epoch ms the claim was taken. */
956
+ readonly requestedAt: v.NumberSchema<undefined>;
957
+ /** Why the spawn failed, on a `failed` record. Null otherwise. */
958
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
959
+ }, undefined>, undefined>;
960
+ /** True when a human waved it off. It stays on the record and is not markable. */
961
+ readonly dismissed: v.BooleanSchema<undefined>;
962
+ }, undefined>, undefined>;
963
+ /**
964
+ * What the expedition planned and what the budget cut; null on an expedition that recorded no
965
+ * plan. See {@link publicBugFishingPlanSchema} for why the cut cells are published.
966
+ */
967
+ readonly plan: v.NullableSchema<v.ObjectSchema<{
968
+ /** The most container dispatches this expedition may make. */
969
+ readonly passBudget: v.NumberSchema<undefined>;
970
+ /** How many cells the full matrix held before the budget trimmed it. */
971
+ readonly plannedCells: v.NumberSchema<undefined>;
972
+ /** The cells the budget cut. Empty when the whole matrix fitted. */
973
+ readonly unfished: v.ArraySchema<v.ObjectSchema<{
974
+ readonly territoryId: v.StringSchema<undefined>;
975
+ readonly territoryLabel: v.StringSchema<undefined>;
976
+ readonly phaseId: v.StringSchema<undefined>;
977
+ readonly phaseTitle: v.StringSchema<undefined>;
978
+ }, undefined>, undefined>;
979
+ /**
980
+ * True when the tree the survey partitioned was TRUNCATED by the provider. The coverage numbers
981
+ * are then a share of what was read rather than of the repository, which are opposite readings.
982
+ */
983
+ readonly treeTruncated: v.BooleanSchema<undefined>;
984
+ /**
985
+ * Why the codebase survey could not run at all (no repository bound to the run, or a client that
986
+ * cannot enumerate a tree). Non-null means the single territory the expedition fished is a
987
+ * FALLBACK rather than a small repository, and the two look identical without it.
988
+ */
989
+ readonly surveyUnavailableReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
990
+ }, undefined>, undefined>;
991
+ /**
992
+ * The pipeline a marked finding's spawned task runs when the marking names none. Null when the
993
+ * expedition resolved none, in which case a marking must name one.
994
+ */
995
+ readonly defaultFixPipelineId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
996
+ /** Identifier of the model that fished, for transparency. Null when the run recorded none. */
997
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
998
+ }, undefined>;
999
+ export type PublicBugFishingDecision = v.InferOutput<typeof publicBugFishingDecisionSchema>;
728
1000
  /** The ephemeral environment a `human-test` gate parked against, as exposed externally. */
729
1001
  export declare const publicHumanTestEnvironmentSchema: v.ObjectSchema<{
730
1002
  /** The public URL to test against; null while still provisioning. */
@@ -1353,6 +1625,119 @@ export declare const publicDecisionSchema: v.VariantSchema<"kind", [v.ObjectSche
1353
1625
  * poller resuming on a bare timer, which kills a container that may be seconds from returning.
1354
1626
  */
1355
1627
  readonly lastActivityAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1628
+ }, undefined>, v.ObjectSchema<{
1629
+ readonly kind: v.LiteralSchema<"bug-fishing", undefined>;
1630
+ /** `fishing` while angles are still in flight, `awaiting_triage` once every one has settled. */
1631
+ readonly status: v.PicklistSchema<["fishing", "awaiting_triage", "done"], undefined>;
1632
+ /** The step this expedition rides, lined up against `publicRun.steps`. */
1633
+ readonly stepKind: v.StringSchema<undefined>;
1634
+ readonly stepIndex: v.NumberSchema<undefined>;
1635
+ /** The planned angles, in the order they are fished. */
1636
+ readonly phases: v.ArraySchema<v.ObjectSchema<{
1637
+ /** The angle's id. An OPEN string on the wire: a stored run can name one this build retired. */
1638
+ readonly phaseId: v.StringSchema<undefined>;
1639
+ /** The angle's label as it stood when this expedition planned it. */
1640
+ readonly title: v.StringSchema<undefined>;
1641
+ /** What this pass was told to hunt, as it stood when this expedition planned it. */
1642
+ readonly goal: v.StringSchema<undefined>;
1643
+ readonly status: v.PicklistSchema<["pending", "fishing", "completed", "failed"], undefined>;
1644
+ /** The agent's account of what it covered; null until the pass settles. */
1645
+ readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1646
+ /** Why the pass failed, on a `failed` phase. Null otherwise. */
1647
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1648
+ /** The territory this pass fished, or null for a whole-codebase pass. */
1649
+ readonly territoryId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1650
+ /** The territory's label as it stood when this pass ran. */
1651
+ readonly territoryLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1652
+ /** Epoch ms the pass settled; null while pending or fishing. */
1653
+ readonly settledAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1654
+ /**
1655
+ * How many manifest files the pass reported reading, against how many the territory held.
1656
+ * SELF-REPORTED by the agent, which the field names say: a low share is what tells a reader
1657
+ * that "found nothing here" may mean "did not look". Null when the pass reported none, which is
1658
+ * a different fact from a share of zero.
1659
+ */
1660
+ readonly filesRead: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1661
+ readonly manifestFiles: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1662
+ }, undefined>, undefined>;
1663
+ /**
1664
+ * Index into `phases` of the pass being fished. Equal to `phases.length` once every angle has
1665
+ * settled, which is the same fact `status: "awaiting_triage"` states.
1666
+ */
1667
+ readonly currentPhaseIndex: v.NumberSchema<undefined>;
1668
+ /** Every finding caught so far, oldest angle first and severity-ordered within an angle. */
1669
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
1670
+ readonly findingId: v.StringSchema<undefined>;
1671
+ /** The angle that surfaced it. */
1672
+ readonly phaseId: v.StringSchema<undefined>;
1673
+ /** The territory that angle was fishing, or null for a whole-codebase pass. */
1674
+ readonly territoryId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1675
+ /** Repo-relative path; EMPTY when the finding is not anchored to one file. */
1676
+ readonly path: v.StringSchema<undefined>;
1677
+ readonly line: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
1678
+ readonly severity: v.PicklistSchema<["critical", "high", "medium", "low"], undefined>;
1679
+ readonly kind: v.PicklistSchema<["bug", "logic-gap", "edge-case", "footgun", "requirement-gap", "other"], undefined>;
1680
+ /** The agent's own judgement of how sure it is. Never platform-derived. */
1681
+ readonly confidence: v.PicklistSchema<["high", "medium", "low"], undefined>;
1682
+ readonly title: v.StringSchema<undefined>;
1683
+ readonly detail: v.StringSchema<undefined>;
1684
+ /** The concrete inputs / interleaving / state that triggers the defect, when it named one. */
1685
+ readonly failureScenario: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1686
+ /** What the agent actually read that supports the claim. */
1687
+ readonly evidence: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1688
+ readonly suggestedFix: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1689
+ /** The bug-fix task marking this finding spawned; null when nobody has marked it. */
1690
+ readonly spawn: v.NullableSchema<v.ObjectSchema<{
1691
+ readonly status: v.PicklistSchema<["pending", "spawned", "failed"], undefined>;
1692
+ /** The spawned task's id, addressable through `GET /api/v1/tasks/{taskId}`. */
1693
+ readonly taskId: v.StringSchema<undefined>;
1694
+ /** The run started on that task; null while the claim is pending. */
1695
+ readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1696
+ /** The pipeline the spawned task runs (the expedition's default, or the marking's override). */
1697
+ readonly pipelineId: v.StringSchema<undefined>;
1698
+ /** Epoch ms the claim was taken. */
1699
+ readonly requestedAt: v.NumberSchema<undefined>;
1700
+ /** Why the spawn failed, on a `failed` record. Null otherwise. */
1701
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1702
+ }, undefined>, undefined>;
1703
+ /** True when a human waved it off. It stays on the record and is not markable. */
1704
+ readonly dismissed: v.BooleanSchema<undefined>;
1705
+ }, undefined>, undefined>;
1706
+ /**
1707
+ * What the expedition planned and what the budget cut; null on an expedition that recorded no
1708
+ * plan. See {@link publicBugFishingPlanSchema} for why the cut cells are published.
1709
+ */
1710
+ readonly plan: v.NullableSchema<v.ObjectSchema<{
1711
+ /** The most container dispatches this expedition may make. */
1712
+ readonly passBudget: v.NumberSchema<undefined>;
1713
+ /** How many cells the full matrix held before the budget trimmed it. */
1714
+ readonly plannedCells: v.NumberSchema<undefined>;
1715
+ /** The cells the budget cut. Empty when the whole matrix fitted. */
1716
+ readonly unfished: v.ArraySchema<v.ObjectSchema<{
1717
+ readonly territoryId: v.StringSchema<undefined>;
1718
+ readonly territoryLabel: v.StringSchema<undefined>;
1719
+ readonly phaseId: v.StringSchema<undefined>;
1720
+ readonly phaseTitle: v.StringSchema<undefined>;
1721
+ }, undefined>, undefined>;
1722
+ /**
1723
+ * True when the tree the survey partitioned was TRUNCATED by the provider. The coverage numbers
1724
+ * are then a share of what was read rather than of the repository, which are opposite readings.
1725
+ */
1726
+ readonly treeTruncated: v.BooleanSchema<undefined>;
1727
+ /**
1728
+ * Why the codebase survey could not run at all (no repository bound to the run, or a client that
1729
+ * cannot enumerate a tree). Non-null means the single territory the expedition fished is a
1730
+ * FALLBACK rather than a small repository, and the two look identical without it.
1731
+ */
1732
+ readonly surveyUnavailableReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1733
+ }, undefined>, undefined>;
1734
+ /**
1735
+ * The pipeline a marked finding's spawned task runs when the marking names none. Null when the
1736
+ * expedition resolved none, in which case a marking must name one.
1737
+ */
1738
+ readonly defaultFixPipelineId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1739
+ /** Identifier of the model that fished, for transparency. Null when the run recorded none. */
1740
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1356
1741
  }, undefined>, v.ObjectSchema<{
1357
1742
  readonly kind: v.LiteralSchema<"human-test", undefined>;
1358
1743
  /** Only `awaiting_human` accepts an answer; the others report work in flight. */
@@ -1462,14 +1847,15 @@ export type PublicDecision = v.InferOutput<typeof publicDecisionSchema>;
1462
1847
  * - `unwired_interview_gate` — an interviewer this deployment REGISTERED as an agent kind but
1463
1848
  * never wired a controller for. The run is genuinely parked on its questions and no surface,
1464
1849
  * here or in the app, can read them; the fix belongs to the operator, not the caller.
1465
- * - `curation_gate`: a step that CURATES (a `curation-gate` kind: the bug-fishing expedition, a
1466
- * deployment's own) parked so a person can mark which of the things it found are worth acting
1467
- * on, and this API has no route that marks one. The PR deep review carries the same trait and
1468
- * is NOT reported here, because its curation IS answerable (`kind: 'pr-review'`), which is the
1469
- * whole distinction: what a caller must be able to do differs per curating kind, so one shared
1470
- * label would promise an answer path for whichever one it did not mean. The step's approval
1471
- * gate can still be resolved to END the run, and that is worth knowing rather than a
1472
- * contradiction: ending an expedition discards what it caught, so it is an exit, not an answer.
1850
+ * - `curation_gate`: a step that CURATES (a `curation-gate` kind a DEPLOYMENT registered) parked
1851
+ * so a person can mark which of the things it found are worth acting on, and this API has no
1852
+ * route that marks one. Both SHIPPED curating kinds are answerable here and so are never
1853
+ * reported: the PR deep review as `kind: 'pr-review'`, the bug-fishing expedition as
1854
+ * `kind: 'bug-fishing'`. That is the whole distinction rather than a detail: what a caller must
1855
+ * be able to do differs per curating kind, so one shared label would promise an answer path for
1856
+ * whichever one it did not mean. The step's approval gate can still be resolved to END such a
1857
+ * run, and that is worth knowing rather than a contradiction: ending a curation discards what it
1858
+ * caught, so it is an exit, not an answer.
1473
1859
  *
1474
1860
  * Every member is a wait that is BOTH live and beyond this surface, and both halves are load-
1475
1861
  * bearing. A run that has finished (`done` / `failed`, the stop included) lists nothing at all: its
@@ -1902,6 +2288,119 @@ export declare const publicDecisionListSchema: v.ObjectSchema<{
1902
2288
  * poller resuming on a bare timer, which kills a container that may be seconds from returning.
1903
2289
  */
1904
2290
  readonly lastActivityAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
2291
+ }, undefined>, v.ObjectSchema<{
2292
+ readonly kind: v.LiteralSchema<"bug-fishing", undefined>;
2293
+ /** `fishing` while angles are still in flight, `awaiting_triage` once every one has settled. */
2294
+ readonly status: v.PicklistSchema<["fishing", "awaiting_triage", "done"], undefined>;
2295
+ /** The step this expedition rides, lined up against `publicRun.steps`. */
2296
+ readonly stepKind: v.StringSchema<undefined>;
2297
+ readonly stepIndex: v.NumberSchema<undefined>;
2298
+ /** The planned angles, in the order they are fished. */
2299
+ readonly phases: v.ArraySchema<v.ObjectSchema<{
2300
+ /** The angle's id. An OPEN string on the wire: a stored run can name one this build retired. */
2301
+ readonly phaseId: v.StringSchema<undefined>;
2302
+ /** The angle's label as it stood when this expedition planned it. */
2303
+ readonly title: v.StringSchema<undefined>;
2304
+ /** What this pass was told to hunt, as it stood when this expedition planned it. */
2305
+ readonly goal: v.StringSchema<undefined>;
2306
+ readonly status: v.PicklistSchema<["pending", "fishing", "completed", "failed"], undefined>;
2307
+ /** The agent's account of what it covered; null until the pass settles. */
2308
+ readonly summary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2309
+ /** Why the pass failed, on a `failed` phase. Null otherwise. */
2310
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2311
+ /** The territory this pass fished, or null for a whole-codebase pass. */
2312
+ readonly territoryId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2313
+ /** The territory's label as it stood when this pass ran. */
2314
+ readonly territoryLabel: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2315
+ /** Epoch ms the pass settled; null while pending or fishing. */
2316
+ readonly settledAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
2317
+ /**
2318
+ * How many manifest files the pass reported reading, against how many the territory held.
2319
+ * SELF-REPORTED by the agent, which the field names say: a low share is what tells a reader
2320
+ * that "found nothing here" may mean "did not look". Null when the pass reported none, which is
2321
+ * a different fact from a share of zero.
2322
+ */
2323
+ readonly filesRead: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
2324
+ readonly manifestFiles: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
2325
+ }, undefined>, undefined>;
2326
+ /**
2327
+ * Index into `phases` of the pass being fished. Equal to `phases.length` once every angle has
2328
+ * settled, which is the same fact `status: "awaiting_triage"` states.
2329
+ */
2330
+ readonly currentPhaseIndex: v.NumberSchema<undefined>;
2331
+ /** Every finding caught so far, oldest angle first and severity-ordered within an angle. */
2332
+ readonly findings: v.ArraySchema<v.ObjectSchema<{
2333
+ readonly findingId: v.StringSchema<undefined>;
2334
+ /** The angle that surfaced it. */
2335
+ readonly phaseId: v.StringSchema<undefined>;
2336
+ /** The territory that angle was fishing, or null for a whole-codebase pass. */
2337
+ readonly territoryId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2338
+ /** Repo-relative path; EMPTY when the finding is not anchored to one file. */
2339
+ readonly path: v.StringSchema<undefined>;
2340
+ readonly line: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
2341
+ readonly severity: v.PicklistSchema<["critical", "high", "medium", "low"], undefined>;
2342
+ readonly kind: v.PicklistSchema<["bug", "logic-gap", "edge-case", "footgun", "requirement-gap", "other"], undefined>;
2343
+ /** The agent's own judgement of how sure it is. Never platform-derived. */
2344
+ readonly confidence: v.PicklistSchema<["high", "medium", "low"], undefined>;
2345
+ readonly title: v.StringSchema<undefined>;
2346
+ readonly detail: v.StringSchema<undefined>;
2347
+ /** The concrete inputs / interleaving / state that triggers the defect, when it named one. */
2348
+ readonly failureScenario: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2349
+ /** What the agent actually read that supports the claim. */
2350
+ readonly evidence: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2351
+ readonly suggestedFix: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2352
+ /** The bug-fix task marking this finding spawned; null when nobody has marked it. */
2353
+ readonly spawn: v.NullableSchema<v.ObjectSchema<{
2354
+ readonly status: v.PicklistSchema<["pending", "spawned", "failed"], undefined>;
2355
+ /** The spawned task's id, addressable through `GET /api/v1/tasks/{taskId}`. */
2356
+ readonly taskId: v.StringSchema<undefined>;
2357
+ /** The run started on that task; null while the claim is pending. */
2358
+ readonly executionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2359
+ /** The pipeline the spawned task runs (the expedition's default, or the marking's override). */
2360
+ readonly pipelineId: v.StringSchema<undefined>;
2361
+ /** Epoch ms the claim was taken. */
2362
+ readonly requestedAt: v.NumberSchema<undefined>;
2363
+ /** Why the spawn failed, on a `failed` record. Null otherwise. */
2364
+ readonly failureReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2365
+ }, undefined>, undefined>;
2366
+ /** True when a human waved it off. It stays on the record and is not markable. */
2367
+ readonly dismissed: v.BooleanSchema<undefined>;
2368
+ }, undefined>, undefined>;
2369
+ /**
2370
+ * What the expedition planned and what the budget cut; null on an expedition that recorded no
2371
+ * plan. See {@link publicBugFishingPlanSchema} for why the cut cells are published.
2372
+ */
2373
+ readonly plan: v.NullableSchema<v.ObjectSchema<{
2374
+ /** The most container dispatches this expedition may make. */
2375
+ readonly passBudget: v.NumberSchema<undefined>;
2376
+ /** How many cells the full matrix held before the budget trimmed it. */
2377
+ readonly plannedCells: v.NumberSchema<undefined>;
2378
+ /** The cells the budget cut. Empty when the whole matrix fitted. */
2379
+ readonly unfished: v.ArraySchema<v.ObjectSchema<{
2380
+ readonly territoryId: v.StringSchema<undefined>;
2381
+ readonly territoryLabel: v.StringSchema<undefined>;
2382
+ readonly phaseId: v.StringSchema<undefined>;
2383
+ readonly phaseTitle: v.StringSchema<undefined>;
2384
+ }, undefined>, undefined>;
2385
+ /**
2386
+ * True when the tree the survey partitioned was TRUNCATED by the provider. The coverage numbers
2387
+ * are then a share of what was read rather than of the repository, which are opposite readings.
2388
+ */
2389
+ readonly treeTruncated: v.BooleanSchema<undefined>;
2390
+ /**
2391
+ * Why the codebase survey could not run at all (no repository bound to the run, or a client that
2392
+ * cannot enumerate a tree). Non-null means the single territory the expedition fished is a
2393
+ * FALLBACK rather than a small repository, and the two look identical without it.
2394
+ */
2395
+ readonly surveyUnavailableReason: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2396
+ }, undefined>, undefined>;
2397
+ /**
2398
+ * The pipeline a marked finding's spawned task runs when the marking names none. Null when the
2399
+ * expedition resolved none, in which case a marking must name one.
2400
+ */
2401
+ readonly defaultFixPipelineId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
2402
+ /** Identifier of the model that fished, for transparency. Null when the run recorded none. */
2403
+ readonly model: v.NullableSchema<v.StringSchema<undefined>, undefined>;
1905
2404
  }, undefined>, v.ObjectSchema<{
1906
2405
  readonly kind: v.LiteralSchema<"human-test", undefined>;
1907
2406
  /** Only `awaiting_human` accepts an answer; the others report work in flight. */
@@ -2023,6 +2522,23 @@ export declare const publicDecisionListSchema: v.ObjectSchema<{
2023
2522
  /** Where the answer actually lives, in prose, for a human reading a log or an alert. */
2024
2523
  readonly detail: v.StringSchema<undefined>;
2025
2524
  }, undefined>, undefined>;
2525
+ /**
2526
+ * Whether model-authored TEXT in this payload was clipped to a preview.
2527
+ *
2528
+ * Always `false` from `GET /api/v1/runs/{runId}/decisions`, which serves every field whole. The
2529
+ * SSE decision channel re-sends the whole list on every change, and what the list carries is
2530
+ * model-authored prose in quantity (a deep review parks with a finding per issue, each with its
2531
+ * own detail, evidence and suggested fix), so an unreduced frame repeats all of it for as long
2532
+ * as the run keeps moving. The stream clips the long strings and says so here; the point read is
2533
+ * where a caller goes for the whole thing.
2534
+ *
2535
+ * A flag rather than a per-field marker, because the reduction is kind-AGNOSTIC (it clips by
2536
+ * length, wherever the text sits) and so covers a decision kind that grows a field with no edit.
2537
+ * What it must never mean is that a DECISION was left out: the list itself is always complete,
2538
+ * since an empty `decisions` that means "narrowed" and one that means "nothing is being asked"
2539
+ * are opposite facts.
2540
+ */
2541
+ readonly truncated: v.BooleanSchema<undefined>;
2026
2542
  }, undefined>;
2027
2543
  export type PublicDecisionList = v.InferOutput<typeof publicDecisionListSchema>;
2028
2544
  /** Answer one reviewer finding. Mirrors the SPA's `replyReviewItemSchema` bounds. */
@@ -2179,6 +2695,24 @@ export declare const publicChallengePrReviewFindingSchema: v.ObjectSchema<{
2179
2695
  readonly question: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 4000, undefined>]>, undefined>;
2180
2696
  }, undefined>;
2181
2697
  export type PublicChallengePrReviewFindingInput = v.InferOutput<typeof publicChallengePrReviewFindingSchema>;
2698
+ /**
2699
+ * Mark bug-fishing findings to be addressed: each one spawns its OWN bug-fix task, linked back to
2700
+ * the expedition.
2701
+ *
2702
+ * Accepted while the expedition is still fishing later angles as well as once it has parked, which
2703
+ * is the flow's whole point: a completed angle's findings are actionable the moment they land.
2704
+ *
2705
+ * `pipelineId` overrides, FOR THIS REQUEST ONLY, the pipeline the spawned tasks run. Omitted, the
2706
+ * expedition's own resolved default applies (the decision publishes it as `defaultFixPipelineId`,
2707
+ * so a caller can see what it is about to get rather than infer it).
2708
+ */
2709
+ export declare const publicAddressBugFishingFindingsSchema: v.ObjectSchema<{
2710
+ /** The findings to act on. At least one; an unknown or already-spawned id is refused. */
2711
+ readonly findingIds: v.SchemaWithPipe<readonly [v.ArraySchema<v.StringSchema<undefined>, undefined>, v.MinLengthAction<string[], 1, undefined>]>;
2712
+ /** Pipeline the spawned tasks run; omitted ⇒ the expedition's default. */
2713
+ readonly pipelineId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2714
+ }, undefined>;
2715
+ export type PublicAddressBugFishingFindingsInput = v.InferOutput<typeof publicAddressBugFishingFindingsSchema>;
2182
2716
  /**
2183
2717
  * Submit findings against a human-verdict gate (human-test or visual-confirmation) and request a
2184
2718
  * fix. The findings ARE the prompt the fixer works from, so unlike the SPA's textarea there is no