@c4a/context 0.7.4 → 0.7.5

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.
@@ -1,10 +1,11 @@
1
1
  import { z } from "zod";
2
- export declare const indexerAgentStepInputSchema: z.ZodObject<{
3
- protocol: z.ZodLiteral<"context.indexer.agent-step-input/v1">;
4
- run_request: z.ZodObject<{
5
- protocol: z.ZodLiteral<"context.indexer.run-request/v2">;
6
- operation: z.ZodLiteral<"main-index">;
7
- workset: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
2
+ import { type IndexerPostAuthorFragmentRequest } from "./indexerPostAuthorComposition.js";
3
+ declare const indexerMainAgentStepInputSchema: z.ZodObject<{
4
+ protocol: z.ZodLiteral<"context.indexer.agent-step-input/v2">;
5
+ stage: z.ZodEnum<["partition", "author"]>;
6
+ transport: z.ZodObject<{
7
+ protocol: z.ZodLiteral<"context.indexer.main-transport-batch/v2">;
8
+ worksets: z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
8
9
  stage: z.ZodLiteral<"partition">;
9
10
  partition_subject_key: z.ZodObject<{
10
11
  protocol: z.ZodLiteral<"context.subject-key/v1">;
@@ -645,1382 +646,1144 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
645
646
  subject_key_schema_digest: string;
646
647
  query_digest: string;
647
648
  } | undefined;
648
- }>]>;
649
- composition_input: z.ZodObject<{
650
- protocol: z.ZodLiteral<"context.indexer.layer-composition-input/v1">;
649
+ }>]>, "many">;
650
+ }, "strict", z.ZodTypeAny, {
651
+ protocol: "context.indexer.main-transport-batch/v2";
652
+ worksets: ({
653
+ source_ref: string;
654
+ protocol: "context.indexer.main-workset/v2";
655
+ requirement_ref: string;
656
+ workset_digest: string;
657
+ module_ref: string | null;
658
+ operation: "main-index";
659
+ indexer_id: string;
660
+ profile_contract_digest: string;
661
+ reader_question_refs: string[];
662
+ subject_key_schema_digest: string;
663
+ stage: "partition";
664
+ partition_subject_key: {
665
+ kind: string;
666
+ namespace: string;
667
+ protocol: "context.subject-key/v1";
668
+ local_key: string;
669
+ };
670
+ strategy_set_digest: string;
671
+ partition_input_digests: string[];
672
+ partition_inventory_digest: string;
673
+ allowed_question_target_refs: string[];
674
+ owner_cell_refs: string[];
675
+ primary_registry_projection_digest: string;
676
+ requirement_set_digest: string;
677
+ primary_execution_fingerprint: string;
678
+ source_scope_digest: string;
679
+ source_binding_digest: string;
680
+ primary_resource_binding_digest: string;
681
+ question_target_inventory_digest: string;
682
+ repair_intent?: {
683
+ target_ref: string;
684
+ instruction: string;
685
+ intent_digest: string;
686
+ } | undefined;
687
+ } | {
688
+ source_ref: string;
689
+ protocol: "context.indexer.main-workset/v2";
690
+ requirement_ref: string;
691
+ workset_digest: string;
692
+ module_ref: string | null;
693
+ operation: "main-index";
694
+ indexer_id: string;
695
+ profile_contract_digest: string;
696
+ logical_unit_ref: string;
697
+ subject_key_schema_digest: string;
698
+ stage: "author";
699
+ owner_cell_refs: string[];
700
+ primary_registry_projection_digest: string;
701
+ requirement_set_digest: string;
702
+ primary_execution_fingerprint: string;
703
+ source_scope_digest: string;
704
+ source_binding_digest: string;
705
+ primary_resource_binding_digest: string;
706
+ question_target_inventory_digest: string;
707
+ partition_plan_binding_digest: string;
708
+ group_key: string;
709
+ member_ids_digest: string;
710
+ member_inventory_digest: string;
711
+ group_projection_digest: string;
712
+ group_dependency_view_digest: string;
713
+ allowed_artifact_policy_variants: string[];
714
+ artifact_policy_eligibility_digest: string;
715
+ repair_intent?: {
716
+ target_ref: string;
717
+ instruction: string;
718
+ intent_digest: string;
719
+ } | undefined;
720
+ target_resolution_view?: {
721
+ entries: ({
722
+ subject_key: {
723
+ kind: string;
724
+ namespace: string;
725
+ protocol: "context.subject-key/v1";
726
+ local_key: string;
727
+ };
728
+ state: "resolved";
729
+ query_ref: string;
730
+ node_ref: string;
731
+ } | {
732
+ state: "absent";
733
+ query_ref: string;
734
+ } | {
735
+ state: "ambiguous";
736
+ query_ref: string;
737
+ conflicting_node_refs: string[];
738
+ })[];
739
+ protocol: "context.indexer.target-resolution-view/v1";
740
+ requirement_ref: string;
741
+ view_digest: string;
742
+ subject_key_schema_digest: string;
743
+ query_digest: string;
744
+ } | undefined;
745
+ })[];
746
+ }, {
747
+ protocol: "context.indexer.main-transport-batch/v2";
748
+ worksets: ({
749
+ source_ref: string;
750
+ protocol: "context.indexer.main-workset/v2";
751
+ requirement_ref: string;
752
+ workset_digest: string;
753
+ module_ref: string | null;
754
+ operation: "main-index";
755
+ indexer_id: string;
756
+ profile_contract_digest: string;
757
+ reader_question_refs: string[];
758
+ subject_key_schema_digest: string;
759
+ stage: "partition";
760
+ partition_subject_key: {
761
+ kind: string;
762
+ namespace: string;
763
+ protocol: "context.subject-key/v1";
764
+ local_key: string;
765
+ };
766
+ strategy_set_digest: string;
767
+ partition_input_digests: string[];
768
+ partition_inventory_digest: string;
769
+ allowed_question_target_refs: string[];
770
+ owner_cell_refs: string[];
771
+ primary_registry_projection_digest: string;
772
+ requirement_set_digest: string;
773
+ primary_execution_fingerprint: string;
774
+ source_scope_digest: string;
775
+ source_binding_digest: string;
776
+ primary_resource_binding_digest: string;
777
+ question_target_inventory_digest: string;
778
+ repair_intent?: {
779
+ target_ref: string;
780
+ instruction: string;
781
+ intent_digest: string;
782
+ } | undefined;
783
+ } | {
784
+ source_ref: string;
785
+ protocol: "context.indexer.main-workset/v2";
786
+ requirement_ref: string;
787
+ workset_digest: string;
788
+ module_ref: string | null;
789
+ operation: "main-index";
790
+ indexer_id: string;
791
+ profile_contract_digest: string;
792
+ logical_unit_ref: string;
793
+ subject_key_schema_digest: string;
794
+ stage: "author";
795
+ owner_cell_refs: string[];
796
+ primary_registry_projection_digest: string;
797
+ requirement_set_digest: string;
798
+ primary_execution_fingerprint: string;
799
+ source_scope_digest: string;
800
+ source_binding_digest: string;
801
+ primary_resource_binding_digest: string;
802
+ question_target_inventory_digest: string;
803
+ partition_plan_binding_digest: string;
804
+ group_key: string;
805
+ member_ids_digest: string;
806
+ member_inventory_digest: string;
807
+ group_projection_digest: string;
808
+ group_dependency_view_digest: string;
809
+ allowed_artifact_policy_variants: string[];
810
+ artifact_policy_eligibility_digest: string;
811
+ repair_intent?: {
812
+ target_ref: string;
813
+ instruction: string;
814
+ intent_digest: string;
815
+ } | undefined;
816
+ target_resolution_view?: {
817
+ entries: ({
818
+ subject_key: {
819
+ kind: string;
820
+ namespace: string;
821
+ protocol: "context.subject-key/v1";
822
+ local_key: string;
823
+ };
824
+ state: "resolved";
825
+ query_ref: string;
826
+ node_ref: string;
827
+ } | {
828
+ state: "absent";
829
+ query_ref: string;
830
+ } | {
831
+ state: "ambiguous";
832
+ query_ref: string;
833
+ conflicting_node_refs: string[];
834
+ })[];
835
+ protocol: "context.indexer.target-resolution-view/v1";
836
+ requirement_ref: string;
837
+ view_digest: string;
838
+ subject_key_schema_digest: string;
839
+ query_digest: string;
840
+ } | undefined;
841
+ })[];
842
+ }>;
843
+ instruction_request_digest: z.ZodString;
844
+ tasks: z.ZodArray<z.ZodObject<{
845
+ task_key: z.ZodString;
846
+ workset_digest: z.ZodString;
847
+ execution_request_digest: z.ZodString;
848
+ consumed_input_view_digest: z.ZodString;
849
+ workset_view_resource_id: z.ZodString;
850
+ workset_view_request_digest: z.ZodString;
851
+ }, "strict", z.ZodTypeAny, {
852
+ workset_digest: string;
853
+ execution_request_digest: string;
854
+ consumed_input_view_digest: string;
855
+ task_key: string;
856
+ workset_view_resource_id: string;
857
+ workset_view_request_digest: string;
858
+ }, {
859
+ workset_digest: string;
860
+ execution_request_digest: string;
861
+ consumed_input_view_digest: string;
862
+ task_key: string;
863
+ workset_view_resource_id: string;
864
+ workset_view_request_digest: string;
865
+ }>, "many">;
866
+ input_digest: z.ZodString;
867
+ }, "strict", z.ZodTypeAny, {
868
+ protocol: "context.indexer.agent-step-input/v2";
869
+ input_digest: string;
870
+ transport: {
871
+ protocol: "context.indexer.main-transport-batch/v2";
872
+ worksets: ({
873
+ source_ref: string;
874
+ protocol: "context.indexer.main-workset/v2";
875
+ requirement_ref: string;
876
+ workset_digest: string;
877
+ module_ref: string | null;
878
+ operation: "main-index";
879
+ indexer_id: string;
880
+ profile_contract_digest: string;
881
+ reader_question_refs: string[];
882
+ subject_key_schema_digest: string;
883
+ stage: "partition";
884
+ partition_subject_key: {
885
+ kind: string;
886
+ namespace: string;
887
+ protocol: "context.subject-key/v1";
888
+ local_key: string;
889
+ };
890
+ strategy_set_digest: string;
891
+ partition_input_digests: string[];
892
+ partition_inventory_digest: string;
893
+ allowed_question_target_refs: string[];
894
+ owner_cell_refs: string[];
895
+ primary_registry_projection_digest: string;
896
+ requirement_set_digest: string;
897
+ primary_execution_fingerprint: string;
898
+ source_scope_digest: string;
899
+ source_binding_digest: string;
900
+ primary_resource_binding_digest: string;
901
+ question_target_inventory_digest: string;
902
+ repair_intent?: {
903
+ target_ref: string;
904
+ instruction: string;
905
+ intent_digest: string;
906
+ } | undefined;
907
+ } | {
908
+ source_ref: string;
909
+ protocol: "context.indexer.main-workset/v2";
910
+ requirement_ref: string;
911
+ workset_digest: string;
912
+ module_ref: string | null;
913
+ operation: "main-index";
914
+ indexer_id: string;
915
+ profile_contract_digest: string;
916
+ logical_unit_ref: string;
917
+ subject_key_schema_digest: string;
918
+ stage: "author";
919
+ owner_cell_refs: string[];
920
+ primary_registry_projection_digest: string;
921
+ requirement_set_digest: string;
922
+ primary_execution_fingerprint: string;
923
+ source_scope_digest: string;
924
+ source_binding_digest: string;
925
+ primary_resource_binding_digest: string;
926
+ question_target_inventory_digest: string;
927
+ partition_plan_binding_digest: string;
928
+ group_key: string;
929
+ member_ids_digest: string;
930
+ member_inventory_digest: string;
931
+ group_projection_digest: string;
932
+ group_dependency_view_digest: string;
933
+ allowed_artifact_policy_variants: string[];
934
+ artifact_policy_eligibility_digest: string;
935
+ repair_intent?: {
936
+ target_ref: string;
937
+ instruction: string;
938
+ intent_digest: string;
939
+ } | undefined;
940
+ target_resolution_view?: {
941
+ entries: ({
942
+ subject_key: {
943
+ kind: string;
944
+ namespace: string;
945
+ protocol: "context.subject-key/v1";
946
+ local_key: string;
947
+ };
948
+ state: "resolved";
949
+ query_ref: string;
950
+ node_ref: string;
951
+ } | {
952
+ state: "absent";
953
+ query_ref: string;
954
+ } | {
955
+ state: "ambiguous";
956
+ query_ref: string;
957
+ conflicting_node_refs: string[];
958
+ })[];
959
+ protocol: "context.indexer.target-resolution-view/v1";
960
+ requirement_ref: string;
961
+ view_digest: string;
962
+ subject_key_schema_digest: string;
963
+ query_digest: string;
964
+ } | undefined;
965
+ })[];
966
+ };
967
+ stage: "partition" | "author";
968
+ instruction_request_digest: string;
969
+ tasks: {
970
+ workset_digest: string;
971
+ execution_request_digest: string;
972
+ consumed_input_view_digest: string;
973
+ task_key: string;
974
+ workset_view_resource_id: string;
975
+ workset_view_request_digest: string;
976
+ }[];
977
+ }, {
978
+ protocol: "context.indexer.agent-step-input/v2";
979
+ input_digest: string;
980
+ transport: {
981
+ protocol: "context.indexer.main-transport-batch/v2";
982
+ worksets: ({
983
+ source_ref: string;
984
+ protocol: "context.indexer.main-workset/v2";
985
+ requirement_ref: string;
986
+ workset_digest: string;
987
+ module_ref: string | null;
988
+ operation: "main-index";
989
+ indexer_id: string;
990
+ profile_contract_digest: string;
991
+ reader_question_refs: string[];
992
+ subject_key_schema_digest: string;
993
+ stage: "partition";
994
+ partition_subject_key: {
995
+ kind: string;
996
+ namespace: string;
997
+ protocol: "context.subject-key/v1";
998
+ local_key: string;
999
+ };
1000
+ strategy_set_digest: string;
1001
+ partition_input_digests: string[];
1002
+ partition_inventory_digest: string;
1003
+ allowed_question_target_refs: string[];
1004
+ owner_cell_refs: string[];
1005
+ primary_registry_projection_digest: string;
1006
+ requirement_set_digest: string;
1007
+ primary_execution_fingerprint: string;
1008
+ source_scope_digest: string;
1009
+ source_binding_digest: string;
1010
+ primary_resource_binding_digest: string;
1011
+ question_target_inventory_digest: string;
1012
+ repair_intent?: {
1013
+ target_ref: string;
1014
+ instruction: string;
1015
+ intent_digest: string;
1016
+ } | undefined;
1017
+ } | {
1018
+ source_ref: string;
1019
+ protocol: "context.indexer.main-workset/v2";
1020
+ requirement_ref: string;
1021
+ workset_digest: string;
1022
+ module_ref: string | null;
1023
+ operation: "main-index";
1024
+ indexer_id: string;
1025
+ profile_contract_digest: string;
1026
+ logical_unit_ref: string;
1027
+ subject_key_schema_digest: string;
1028
+ stage: "author";
1029
+ owner_cell_refs: string[];
1030
+ primary_registry_projection_digest: string;
1031
+ requirement_set_digest: string;
1032
+ primary_execution_fingerprint: string;
1033
+ source_scope_digest: string;
1034
+ source_binding_digest: string;
1035
+ primary_resource_binding_digest: string;
1036
+ question_target_inventory_digest: string;
1037
+ partition_plan_binding_digest: string;
1038
+ group_key: string;
1039
+ member_ids_digest: string;
1040
+ member_inventory_digest: string;
1041
+ group_projection_digest: string;
1042
+ group_dependency_view_digest: string;
1043
+ allowed_artifact_policy_variants: string[];
1044
+ artifact_policy_eligibility_digest: string;
1045
+ repair_intent?: {
1046
+ target_ref: string;
1047
+ instruction: string;
1048
+ intent_digest: string;
1049
+ } | undefined;
1050
+ target_resolution_view?: {
1051
+ entries: ({
1052
+ subject_key: {
1053
+ kind: string;
1054
+ namespace: string;
1055
+ protocol: "context.subject-key/v1";
1056
+ local_key: string;
1057
+ };
1058
+ state: "resolved";
1059
+ query_ref: string;
1060
+ node_ref: string;
1061
+ } | {
1062
+ state: "absent";
1063
+ query_ref: string;
1064
+ } | {
1065
+ state: "ambiguous";
1066
+ query_ref: string;
1067
+ conflicting_node_refs: string[];
1068
+ })[];
1069
+ protocol: "context.indexer.target-resolution-view/v1";
1070
+ requirement_ref: string;
1071
+ view_digest: string;
1072
+ subject_key_schema_digest: string;
1073
+ query_digest: string;
1074
+ } | undefined;
1075
+ })[];
1076
+ };
1077
+ stage: "partition" | "author";
1078
+ instruction_request_digest: string;
1079
+ tasks: {
1080
+ workset_digest: string;
1081
+ execution_request_digest: string;
1082
+ consumed_input_view_digest: string;
1083
+ task_key: string;
1084
+ workset_view_resource_id: string;
1085
+ workset_view_request_digest: string;
1086
+ }[];
1087
+ }>;
1088
+ declare const indexerPostAuthorAgentStepInputSchema: z.ZodObject<{
1089
+ protocol: z.ZodLiteral<"context.indexer.agent-step-input/v2">;
1090
+ stage: z.ZodLiteral<"post-author">;
1091
+ instruction_request_digest: z.ZodString;
1092
+ tasks: z.ZodArray<z.ZodObject<{
1093
+ task_key: z.ZodString;
1094
+ workset_digest: z.ZodString;
1095
+ request_digest: z.ZodString;
1096
+ primary_result_view_digest: z.ZodString;
1097
+ workset_view_resource_id: z.ZodString;
1098
+ }, "strict", z.ZodTypeAny, {
1099
+ workset_digest: string;
1100
+ request_digest: string;
1101
+ primary_result_view_digest: string;
1102
+ task_key: string;
1103
+ workset_view_resource_id: string;
1104
+ }, {
1105
+ workset_digest: string;
1106
+ request_digest: string;
1107
+ primary_result_view_digest: string;
1108
+ task_key: string;
1109
+ workset_view_resource_id: string;
1110
+ }>, "many">;
1111
+ input_digest: z.ZodString;
1112
+ }, "strict", z.ZodTypeAny, {
1113
+ protocol: "context.indexer.agent-step-input/v2";
1114
+ input_digest: string;
1115
+ stage: "post-author";
1116
+ instruction_request_digest: string;
1117
+ tasks: {
1118
+ workset_digest: string;
1119
+ request_digest: string;
1120
+ primary_result_view_digest: string;
1121
+ task_key: string;
1122
+ workset_view_resource_id: string;
1123
+ }[];
1124
+ }, {
1125
+ protocol: "context.indexer.agent-step-input/v2";
1126
+ input_digest: string;
1127
+ stage: "post-author";
1128
+ instruction_request_digest: string;
1129
+ tasks: {
1130
+ workset_digest: string;
1131
+ request_digest: string;
1132
+ primary_result_view_digest: string;
1133
+ task_key: string;
1134
+ workset_view_resource_id: string;
1135
+ }[];
1136
+ }>;
1137
+ export declare const indexerAgentStepInputSchema: z.ZodDiscriminatedUnion<"stage", [z.ZodObject<{
1138
+ protocol: z.ZodLiteral<"context.indexer.agent-step-input/v2">;
1139
+ stage: z.ZodEnum<["partition", "author"]>;
1140
+ transport: z.ZodObject<{
1141
+ protocol: z.ZodLiteral<"context.indexer.main-transport-batch/v2">;
1142
+ worksets: z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
1143
+ stage: z.ZodLiteral<"partition">;
1144
+ partition_subject_key: z.ZodObject<{
1145
+ protocol: z.ZodLiteral<"context.subject-key/v1">;
1146
+ namespace: z.ZodEffects<z.ZodString, string, string>;
1147
+ kind: z.ZodEffects<z.ZodString, string, string>;
1148
+ local_key: z.ZodEffects<z.ZodString, string, string>;
1149
+ }, "strict", z.ZodTypeAny, {
1150
+ kind: string;
1151
+ namespace: string;
1152
+ protocol: "context.subject-key/v1";
1153
+ local_key: string;
1154
+ }, {
1155
+ kind: string;
1156
+ namespace: string;
1157
+ protocol: "context.subject-key/v1";
1158
+ local_key: string;
1159
+ }>;
1160
+ strategy_set_digest: z.ZodString;
1161
+ reader_question_refs: z.ZodArray<z.ZodString, "many">;
1162
+ partition_input_digests: z.ZodArray<z.ZodString, "many">;
1163
+ partition_inventory_digest: z.ZodString;
1164
+ allowed_question_target_refs: z.ZodArray<z.ZodString, "many">;
1165
+ protocol: z.ZodLiteral<"context.indexer.main-workset/v2">;
651
1166
  workset_digest: z.ZodString;
652
- final_authority_layer_ref: z.ZodEffects<z.ZodString, string, string>;
653
- accepted_fragments: z.ZodArray<z.ZodObject<{
654
- fragment_digest: z.ZodString;
655
- layer_ref: z.ZodEffects<z.ZodString, string, string>;
656
- layer_integrity: z.ZodString;
657
- composer_ref: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
658
- phase: z.ZodEnum<["pre-authority", "post-author"]>;
659
- kind: z.ZodEnum<["fact-enrichment", "template-variables", "derived-artifact-proposal"]>;
660
- target_refs: z.ZodArray<z.ZodString, "many">;
661
- payload: z.ZodUnion<[z.ZodObject<{
662
- protocol: z.ZodLiteral<"context.indexer.fragment.fact-enrichment/v1">;
663
- facts: z.ZodArray<z.ZodObject<{
664
- target_ref: z.ZodString;
665
- fact_id: z.ZodEffects<z.ZodString, string, string>;
666
- value: z.ZodType<import("./indexerRegistry.js").IndexerJson, z.ZodTypeDef, import("./indexerRegistry.js").IndexerJson>;
667
- evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
668
- ref: z.ZodString;
669
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
670
- source_digest: z.ZodString;
671
- }, "strict", z.ZodTypeAny, {
672
- ref: string;
673
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
674
- source_digest: string;
675
- }, {
676
- ref: string;
677
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
678
- source_digest: string;
679
- }>, "many">, {
680
- ref: string;
681
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
682
- source_digest: string;
683
- }[], {
684
- ref: string;
685
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
686
- source_digest: string;
687
- }[]>;
1167
+ operation: z.ZodLiteral<"main-index">;
1168
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
1169
+ requirement_ref: z.ZodString;
1170
+ owner_cell_refs: z.ZodArray<z.ZodString, "many">;
1171
+ source_ref: z.ZodString;
1172
+ module_ref: z.ZodNullable<z.ZodString>;
1173
+ primary_registry_projection_digest: z.ZodString;
1174
+ requirement_set_digest: z.ZodString;
1175
+ primary_execution_fingerprint: z.ZodString;
1176
+ profile_contract_digest: z.ZodString;
1177
+ subject_key_schema_digest: z.ZodString;
1178
+ source_scope_digest: z.ZodString;
1179
+ source_binding_digest: z.ZodString;
1180
+ primary_resource_binding_digest: z.ZodString;
1181
+ question_target_inventory_digest: z.ZodString;
1182
+ repair_intent: z.ZodOptional<z.ZodObject<{
1183
+ target_ref: z.ZodString;
1184
+ instruction: z.ZodString;
1185
+ } & {
1186
+ intent_digest: z.ZodString;
1187
+ }, "strict", z.ZodTypeAny, {
1188
+ target_ref: string;
1189
+ instruction: string;
1190
+ intent_digest: string;
1191
+ }, {
1192
+ target_ref: string;
1193
+ instruction: string;
1194
+ intent_digest: string;
1195
+ }>>;
1196
+ }, "strict", z.ZodTypeAny, {
1197
+ source_ref: string;
1198
+ protocol: "context.indexer.main-workset/v2";
1199
+ requirement_ref: string;
1200
+ workset_digest: string;
1201
+ module_ref: string | null;
1202
+ operation: "main-index";
1203
+ indexer_id: string;
1204
+ profile_contract_digest: string;
1205
+ reader_question_refs: string[];
1206
+ subject_key_schema_digest: string;
1207
+ stage: "partition";
1208
+ partition_subject_key: {
1209
+ kind: string;
1210
+ namespace: string;
1211
+ protocol: "context.subject-key/v1";
1212
+ local_key: string;
1213
+ };
1214
+ strategy_set_digest: string;
1215
+ partition_input_digests: string[];
1216
+ partition_inventory_digest: string;
1217
+ allowed_question_target_refs: string[];
1218
+ owner_cell_refs: string[];
1219
+ primary_registry_projection_digest: string;
1220
+ requirement_set_digest: string;
1221
+ primary_execution_fingerprint: string;
1222
+ source_scope_digest: string;
1223
+ source_binding_digest: string;
1224
+ primary_resource_binding_digest: string;
1225
+ question_target_inventory_digest: string;
1226
+ repair_intent?: {
1227
+ target_ref: string;
1228
+ instruction: string;
1229
+ intent_digest: string;
1230
+ } | undefined;
1231
+ }, {
1232
+ source_ref: string;
1233
+ protocol: "context.indexer.main-workset/v2";
1234
+ requirement_ref: string;
1235
+ workset_digest: string;
1236
+ module_ref: string | null;
1237
+ operation: "main-index";
1238
+ indexer_id: string;
1239
+ profile_contract_digest: string;
1240
+ reader_question_refs: string[];
1241
+ subject_key_schema_digest: string;
1242
+ stage: "partition";
1243
+ partition_subject_key: {
1244
+ kind: string;
1245
+ namespace: string;
1246
+ protocol: "context.subject-key/v1";
1247
+ local_key: string;
1248
+ };
1249
+ strategy_set_digest: string;
1250
+ partition_input_digests: string[];
1251
+ partition_inventory_digest: string;
1252
+ allowed_question_target_refs: string[];
1253
+ owner_cell_refs: string[];
1254
+ primary_registry_projection_digest: string;
1255
+ requirement_set_digest: string;
1256
+ primary_execution_fingerprint: string;
1257
+ source_scope_digest: string;
1258
+ source_binding_digest: string;
1259
+ primary_resource_binding_digest: string;
1260
+ question_target_inventory_digest: string;
1261
+ repair_intent?: {
1262
+ target_ref: string;
1263
+ instruction: string;
1264
+ intent_digest: string;
1265
+ } | undefined;
1266
+ }>, {
1267
+ source_ref: string;
1268
+ protocol: "context.indexer.main-workset/v2";
1269
+ requirement_ref: string;
1270
+ workset_digest: string;
1271
+ module_ref: string | null;
1272
+ operation: "main-index";
1273
+ indexer_id: string;
1274
+ profile_contract_digest: string;
1275
+ reader_question_refs: string[];
1276
+ subject_key_schema_digest: string;
1277
+ stage: "partition";
1278
+ partition_subject_key: {
1279
+ kind: string;
1280
+ namespace: string;
1281
+ protocol: "context.subject-key/v1";
1282
+ local_key: string;
1283
+ };
1284
+ strategy_set_digest: string;
1285
+ partition_input_digests: string[];
1286
+ partition_inventory_digest: string;
1287
+ allowed_question_target_refs: string[];
1288
+ owner_cell_refs: string[];
1289
+ primary_registry_projection_digest: string;
1290
+ requirement_set_digest: string;
1291
+ primary_execution_fingerprint: string;
1292
+ source_scope_digest: string;
1293
+ source_binding_digest: string;
1294
+ primary_resource_binding_digest: string;
1295
+ question_target_inventory_digest: string;
1296
+ repair_intent?: {
1297
+ target_ref: string;
1298
+ instruction: string;
1299
+ intent_digest: string;
1300
+ } | undefined;
1301
+ }, {
1302
+ source_ref: string;
1303
+ protocol: "context.indexer.main-workset/v2";
1304
+ requirement_ref: string;
1305
+ workset_digest: string;
1306
+ module_ref: string | null;
1307
+ operation: "main-index";
1308
+ indexer_id: string;
1309
+ profile_contract_digest: string;
1310
+ reader_question_refs: string[];
1311
+ subject_key_schema_digest: string;
1312
+ stage: "partition";
1313
+ partition_subject_key: {
1314
+ kind: string;
1315
+ namespace: string;
1316
+ protocol: "context.subject-key/v1";
1317
+ local_key: string;
1318
+ };
1319
+ strategy_set_digest: string;
1320
+ partition_input_digests: string[];
1321
+ partition_inventory_digest: string;
1322
+ allowed_question_target_refs: string[];
1323
+ owner_cell_refs: string[];
1324
+ primary_registry_projection_digest: string;
1325
+ requirement_set_digest: string;
1326
+ primary_execution_fingerprint: string;
1327
+ source_scope_digest: string;
1328
+ source_binding_digest: string;
1329
+ primary_resource_binding_digest: string;
1330
+ question_target_inventory_digest: string;
1331
+ repair_intent?: {
1332
+ target_ref: string;
1333
+ instruction: string;
1334
+ intent_digest: string;
1335
+ } | undefined;
1336
+ }>, z.ZodEffects<z.ZodObject<{
1337
+ stage: z.ZodLiteral<"author">;
1338
+ partition_plan_binding_digest: z.ZodString;
1339
+ group_key: z.ZodString;
1340
+ logical_unit_ref: z.ZodString;
1341
+ member_ids_digest: z.ZodString;
1342
+ member_inventory_digest: z.ZodString;
1343
+ group_projection_digest: z.ZodString;
1344
+ group_dependency_view_digest: z.ZodString;
1345
+ target_resolution_view: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1346
+ protocol: z.ZodLiteral<"context.indexer.target-resolution-view/v1">;
1347
+ view_digest: z.ZodString;
1348
+ requirement_ref: z.ZodString;
1349
+ subject_key_schema_digest: z.ZodString;
1350
+ query_digest: z.ZodString;
1351
+ entries: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1352
+ query_ref: z.ZodString;
1353
+ state: z.ZodLiteral<"resolved">;
1354
+ subject_key: z.ZodObject<{
1355
+ protocol: z.ZodLiteral<"context.subject-key/v1">;
1356
+ namespace: z.ZodEffects<z.ZodString, string, string>;
1357
+ kind: z.ZodEffects<z.ZodString, string, string>;
1358
+ local_key: z.ZodEffects<z.ZodString, string, string>;
688
1359
  }, "strict", z.ZodTypeAny, {
689
- value: import("./indexerRegistry.js").IndexerJson;
690
- evidence_refs: {
691
- ref: string;
692
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
693
- source_digest: string;
694
- }[];
695
- target_ref: string;
696
- fact_id: string;
1360
+ kind: string;
1361
+ namespace: string;
1362
+ protocol: "context.subject-key/v1";
1363
+ local_key: string;
697
1364
  }, {
698
- value: import("./indexerRegistry.js").IndexerJson;
699
- evidence_refs: {
700
- ref: string;
701
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
702
- source_digest: string;
703
- }[];
704
- target_ref: string;
705
- fact_id: string;
706
- }>, "many">;
1365
+ kind: string;
1366
+ namespace: string;
1367
+ protocol: "context.subject-key/v1";
1368
+ local_key: string;
1369
+ }>;
1370
+ node_ref: z.ZodString;
707
1371
  }, "strict", z.ZodTypeAny, {
708
- protocol: "context.indexer.fragment.fact-enrichment/v1";
709
- facts: {
710
- value: import("./indexerRegistry.js").IndexerJson;
711
- evidence_refs: {
712
- ref: string;
713
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
714
- source_digest: string;
715
- }[];
716
- target_ref: string;
717
- fact_id: string;
718
- }[];
1372
+ subject_key: {
1373
+ kind: string;
1374
+ namespace: string;
1375
+ protocol: "context.subject-key/v1";
1376
+ local_key: string;
1377
+ };
1378
+ state: "resolved";
1379
+ query_ref: string;
1380
+ node_ref: string;
719
1381
  }, {
720
- protocol: "context.indexer.fragment.fact-enrichment/v1";
721
- facts: {
722
- value: import("./indexerRegistry.js").IndexerJson;
723
- evidence_refs: {
724
- ref: string;
725
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
726
- source_digest: string;
727
- }[];
728
- target_ref: string;
729
- fact_id: string;
730
- }[];
1382
+ subject_key: {
1383
+ kind: string;
1384
+ namespace: string;
1385
+ protocol: "context.subject-key/v1";
1386
+ local_key: string;
1387
+ };
1388
+ state: "resolved";
1389
+ query_ref: string;
1390
+ node_ref: string;
731
1391
  }>, z.ZodObject<{
732
- protocol: z.ZodLiteral<"context.indexer.fragment.template-variables/v1">;
733
- variables: z.ZodArray<z.ZodObject<{
734
- target_ref: z.ZodString;
735
- template_id: z.ZodEffects<z.ZodString, string, string>;
736
- variable_id: z.ZodEffects<z.ZodString, string, string>;
737
- value: z.ZodType<import("./indexerRegistry.js").IndexerJson, z.ZodTypeDef, import("./indexerRegistry.js").IndexerJson>;
738
- evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
739
- ref: z.ZodString;
740
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
741
- source_digest: z.ZodString;
742
- }, "strict", z.ZodTypeAny, {
743
- ref: string;
744
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
745
- source_digest: string;
746
- }, {
747
- ref: string;
748
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
749
- source_digest: string;
750
- }>, "many">, {
751
- ref: string;
752
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
753
- source_digest: string;
754
- }[], {
755
- ref: string;
756
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
757
- source_digest: string;
758
- }[]>;
759
- }, "strict", z.ZodTypeAny, {
760
- value: import("./indexerRegistry.js").IndexerJson;
761
- evidence_refs: {
762
- ref: string;
763
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
764
- source_digest: string;
765
- }[];
766
- template_id: string;
767
- target_ref: string;
768
- variable_id: string;
769
- }, {
770
- value: import("./indexerRegistry.js").IndexerJson;
771
- evidence_refs: {
772
- ref: string;
773
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
774
- source_digest: string;
775
- }[];
776
- template_id: string;
777
- target_ref: string;
778
- variable_id: string;
779
- }>, "many">;
1392
+ query_ref: z.ZodString;
1393
+ state: z.ZodLiteral<"absent">;
780
1394
  }, "strict", z.ZodTypeAny, {
781
- protocol: "context.indexer.fragment.template-variables/v1";
782
- variables: {
783
- value: import("./indexerRegistry.js").IndexerJson;
784
- evidence_refs: {
785
- ref: string;
786
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
787
- source_digest: string;
788
- }[];
789
- template_id: string;
790
- target_ref: string;
791
- variable_id: string;
792
- }[];
1395
+ state: "absent";
1396
+ query_ref: string;
793
1397
  }, {
794
- protocol: "context.indexer.fragment.template-variables/v1";
795
- variables: {
796
- value: import("./indexerRegistry.js").IndexerJson;
797
- evidence_refs: {
798
- ref: string;
799
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
800
- source_digest: string;
801
- }[];
802
- template_id: string;
803
- target_ref: string;
804
- variable_id: string;
805
- }[];
806
- }>, z.ZodObject<{
807
- protocol: z.ZodLiteral<"context.indexer.fragment.derived-artifact-proposal/v1">;
808
- proposals: z.ZodArray<z.ZodObject<{
809
- composer_ref: z.ZodEffects<z.ZodString, string, string>;
810
- target_node_ref: z.ZodString;
811
- artifact: z.ZodDiscriminatedUnion<"representation", [z.ZodObject<{
812
- representation: z.ZodLiteral<"template">;
813
- template_id: z.ZodEffects<z.ZodString, string, string>;
814
- variables: z.ZodRecord<z.ZodString, z.ZodObject<{
815
- value: z.ZodType<import("./indexerRegistry.js").IndexerJson, z.ZodTypeDef, import("./indexerRegistry.js").IndexerJson>;
816
- fact_refs: z.ZodArray<z.ZodString, "many">;
817
- evidence_refs: z.ZodArray<z.ZodString, "many">;
818
- }, "strict", z.ZodTypeAny, {
819
- value: import("./indexerRegistry.js").IndexerJson;
820
- evidence_refs: string[];
821
- fact_refs: string[];
822
- }, {
823
- value: import("./indexerRegistry.js").IndexerJson;
824
- evidence_refs: string[];
825
- fact_refs: string[];
826
- }>>;
827
- section_projections: z.ZodArray<z.ZodObject<{
828
- section_key: z.ZodEffects<z.ZodString, string, string>;
829
- owner_indexer_id: z.ZodEffects<z.ZodString, string, string>;
830
- document_kind: z.ZodEffects<z.ZodString, string, string>;
831
- reader_goal: z.ZodEffects<z.ZodString, string, string>;
832
- artifact_kind: z.ZodEffects<z.ZodString, string, string>;
833
- }, "strict", z.ZodTypeAny, {
834
- section_key: string;
835
- owner_indexer_id: string;
836
- document_kind: string;
837
- reader_goal: string;
838
- artifact_kind: string;
839
- }, {
840
- section_key: string;
841
- owner_indexer_id: string;
842
- document_kind: string;
843
- reader_goal: string;
844
- artifact_kind: string;
845
- }>, "many">;
846
- artifact_id: z.ZodEffects<z.ZodString, string, string>;
847
- artifact_kind: z.ZodEffects<z.ZodString, string, string>;
848
- artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
849
- }, "strict", z.ZodTypeAny, {
850
- artifact_kind: string;
851
- representation: "template";
852
- template_id: string;
853
- variables: Record<string, {
854
- value: import("./indexerRegistry.js").IndexerJson;
855
- evidence_refs: string[];
856
- fact_refs: string[];
857
- }>;
858
- section_projections: {
859
- section_key: string;
860
- owner_indexer_id: string;
861
- document_kind: string;
862
- reader_goal: string;
863
- artifact_kind: string;
864
- }[];
865
- artifact_id: string;
866
- artifact_policy_variant: string;
867
- }, {
868
- artifact_kind: string;
869
- representation: "template";
870
- template_id: string;
871
- variables: Record<string, {
872
- value: import("./indexerRegistry.js").IndexerJson;
873
- evidence_refs: string[];
874
- fact_refs: string[];
875
- }>;
876
- section_projections: {
877
- section_key: string;
878
- owner_indexer_id: string;
879
- document_kind: string;
880
- reader_goal: string;
881
- artifact_kind: string;
882
- }[];
883
- artifact_id: string;
884
- artifact_policy_variant: string;
885
- }>, z.ZodObject<{
886
- representation: z.ZodLiteral<"sections">;
887
- sections: z.ZodArray<z.ZodObject<{
888
- section_key: z.ZodEffects<z.ZodString, string, string>;
889
- owner_indexer_id: z.ZodEffects<z.ZodString, string, string>;
890
- document_kind: z.ZodEffects<z.ZodString, string, string>;
891
- reader_goal: z.ZodEffects<z.ZodString, string, string>;
892
- artifact_kind: z.ZodEffects<z.ZodString, string, string>;
893
- } & {
894
- blocks: z.ZodArray<z.ZodDiscriminatedUnion<"layer", [z.ZodObject<{
895
- block_id: z.ZodEffects<z.ZodString, string, string>;
896
- layer: z.ZodLiteral<"deterministic-block">;
897
- renderer: z.ZodEnum<["bullet-list", "key-value-table", "json-code-block"]>;
898
- fact_refs: z.ZodArray<z.ZodString, "many">;
899
- }, "strict", z.ZodTypeAny, {
900
- block_id: string;
901
- layer: "deterministic-block";
902
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
903
- fact_refs: string[];
904
- }, {
905
- block_id: string;
906
- layer: "deterministic-block";
907
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
908
- fact_refs: string[];
909
- }>, z.ZodObject<{
910
- block_id: z.ZodEffects<z.ZodString, string, string>;
911
- layer: z.ZodLiteral<"semantic-prose">;
912
- markdown: z.ZodString;
913
- evidence_refs: z.ZodArray<z.ZodString, "many">;
914
- }, "strict", z.ZodTypeAny, {
915
- evidence_refs: string[];
916
- block_id: string;
917
- layer: "semantic-prose";
918
- markdown: string;
919
- }, {
920
- evidence_refs: string[];
921
- block_id: string;
922
- layer: "semantic-prose";
923
- markdown: string;
924
- }>]>, "many">;
925
- }, "strict", z.ZodTypeAny, {
926
- section_key: string;
927
- owner_indexer_id: string;
928
- document_kind: string;
929
- reader_goal: string;
930
- artifact_kind: string;
931
- blocks: ({
932
- block_id: string;
933
- layer: "deterministic-block";
934
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
935
- fact_refs: string[];
936
- } | {
937
- evidence_refs: string[];
938
- block_id: string;
939
- layer: "semantic-prose";
940
- markdown: string;
941
- })[];
942
- }, {
943
- section_key: string;
944
- owner_indexer_id: string;
945
- document_kind: string;
946
- reader_goal: string;
947
- artifact_kind: string;
948
- blocks: ({
949
- block_id: string;
950
- layer: "deterministic-block";
951
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
952
- fact_refs: string[];
953
- } | {
954
- evidence_refs: string[];
955
- block_id: string;
956
- layer: "semantic-prose";
957
- markdown: string;
958
- })[];
959
- }>, "many">;
960
- artifact_id: z.ZodEffects<z.ZodString, string, string>;
961
- artifact_kind: z.ZodEffects<z.ZodString, string, string>;
962
- artifact_policy_variant: z.ZodEffects<z.ZodString, string, string>;
963
- }, "strict", z.ZodTypeAny, {
964
- artifact_kind: string;
965
- representation: "sections";
966
- artifact_id: string;
967
- artifact_policy_variant: string;
968
- sections: {
969
- section_key: string;
970
- owner_indexer_id: string;
971
- document_kind: string;
972
- reader_goal: string;
973
- artifact_kind: string;
974
- blocks: ({
975
- block_id: string;
976
- layer: "deterministic-block";
977
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
978
- fact_refs: string[];
979
- } | {
980
- evidence_refs: string[];
981
- block_id: string;
982
- layer: "semantic-prose";
983
- markdown: string;
984
- })[];
985
- }[];
986
- }, {
987
- artifact_kind: string;
988
- representation: "sections";
989
- artifact_id: string;
990
- artifact_policy_variant: string;
991
- sections: {
992
- section_key: string;
993
- owner_indexer_id: string;
994
- document_kind: string;
995
- reader_goal: string;
996
- artifact_kind: string;
997
- blocks: ({
998
- block_id: string;
999
- layer: "deterministic-block";
1000
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1001
- fact_refs: string[];
1002
- } | {
1003
- evidence_refs: string[];
1004
- block_id: string;
1005
- layer: "semantic-prose";
1006
- markdown: string;
1007
- })[];
1008
- }[];
1009
- }>]>;
1010
- evidence_refs: z.ZodEffects<z.ZodArray<z.ZodObject<{
1011
- ref: z.ZodString;
1012
- kind: z.ZodEnum<["code", "contract", "configuration", "documentation", "runbook", "decision-record", "test-result", "runtime-observation", "tool-snapshot"]>;
1013
- source_digest: z.ZodString;
1014
- }, "strict", z.ZodTypeAny, {
1015
- ref: string;
1016
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1017
- source_digest: string;
1018
- }, {
1019
- ref: string;
1020
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1021
- source_digest: string;
1022
- }>, "many">, {
1023
- ref: string;
1024
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1025
- source_digest: string;
1026
- }[], {
1027
- ref: string;
1028
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1029
- source_digest: string;
1030
- }[]>;
1031
- }, "strict", z.ZodTypeAny, {
1032
- evidence_refs: {
1033
- ref: string;
1034
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1035
- source_digest: string;
1036
- }[];
1037
- composer_ref: string;
1038
- target_node_ref: string;
1039
- artifact: {
1040
- artifact_kind: string;
1041
- representation: "template";
1042
- template_id: string;
1043
- variables: Record<string, {
1044
- value: import("./indexerRegistry.js").IndexerJson;
1045
- evidence_refs: string[];
1046
- fact_refs: string[];
1047
- }>;
1048
- section_projections: {
1049
- section_key: string;
1050
- owner_indexer_id: string;
1051
- document_kind: string;
1052
- reader_goal: string;
1053
- artifact_kind: string;
1054
- }[];
1055
- artifact_id: string;
1056
- artifact_policy_variant: string;
1057
- } | {
1058
- artifact_kind: string;
1059
- representation: "sections";
1060
- artifact_id: string;
1061
- artifact_policy_variant: string;
1062
- sections: {
1063
- section_key: string;
1064
- owner_indexer_id: string;
1065
- document_kind: string;
1066
- reader_goal: string;
1067
- artifact_kind: string;
1068
- blocks: ({
1069
- block_id: string;
1070
- layer: "deterministic-block";
1071
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1072
- fact_refs: string[];
1073
- } | {
1074
- evidence_refs: string[];
1075
- block_id: string;
1076
- layer: "semantic-prose";
1077
- markdown: string;
1078
- })[];
1079
- }[];
1080
- };
1081
- }, {
1082
- evidence_refs: {
1083
- ref: string;
1084
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1085
- source_digest: string;
1086
- }[];
1087
- composer_ref: string;
1088
- target_node_ref: string;
1089
- artifact: {
1090
- artifact_kind: string;
1091
- representation: "template";
1092
- template_id: string;
1093
- variables: Record<string, {
1094
- value: import("./indexerRegistry.js").IndexerJson;
1095
- evidence_refs: string[];
1096
- fact_refs: string[];
1097
- }>;
1098
- section_projections: {
1099
- section_key: string;
1100
- owner_indexer_id: string;
1101
- document_kind: string;
1102
- reader_goal: string;
1103
- artifact_kind: string;
1104
- }[];
1105
- artifact_id: string;
1106
- artifact_policy_variant: string;
1107
- } | {
1108
- artifact_kind: string;
1109
- representation: "sections";
1110
- artifact_id: string;
1111
- artifact_policy_variant: string;
1112
- sections: {
1113
- section_key: string;
1114
- owner_indexer_id: string;
1115
- document_kind: string;
1116
- reader_goal: string;
1117
- artifact_kind: string;
1118
- blocks: ({
1119
- block_id: string;
1120
- layer: "deterministic-block";
1121
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1122
- fact_refs: string[];
1123
- } | {
1124
- evidence_refs: string[];
1125
- block_id: string;
1126
- layer: "semantic-prose";
1127
- markdown: string;
1128
- })[];
1129
- }[];
1130
- };
1131
- }>, "many">;
1398
+ state: "absent";
1399
+ query_ref: string;
1400
+ }>, z.ZodEffects<z.ZodObject<{
1401
+ query_ref: z.ZodString;
1402
+ state: z.ZodLiteral<"ambiguous">;
1403
+ conflicting_node_refs: z.ZodArray<z.ZodString, "many">;
1132
1404
  }, "strict", z.ZodTypeAny, {
1133
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1134
- proposals: {
1135
- evidence_refs: {
1136
- ref: string;
1137
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1138
- source_digest: string;
1139
- }[];
1140
- composer_ref: string;
1141
- target_node_ref: string;
1142
- artifact: {
1143
- artifact_kind: string;
1144
- representation: "template";
1145
- template_id: string;
1146
- variables: Record<string, {
1147
- value: import("./indexerRegistry.js").IndexerJson;
1148
- evidence_refs: string[];
1149
- fact_refs: string[];
1150
- }>;
1151
- section_projections: {
1152
- section_key: string;
1153
- owner_indexer_id: string;
1154
- document_kind: string;
1155
- reader_goal: string;
1156
- artifact_kind: string;
1157
- }[];
1158
- artifact_id: string;
1159
- artifact_policy_variant: string;
1160
- } | {
1161
- artifact_kind: string;
1162
- representation: "sections";
1163
- artifact_id: string;
1164
- artifact_policy_variant: string;
1165
- sections: {
1166
- section_key: string;
1167
- owner_indexer_id: string;
1168
- document_kind: string;
1169
- reader_goal: string;
1170
- artifact_kind: string;
1171
- blocks: ({
1172
- block_id: string;
1173
- layer: "deterministic-block";
1174
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1175
- fact_refs: string[];
1176
- } | {
1177
- evidence_refs: string[];
1178
- block_id: string;
1179
- layer: "semantic-prose";
1180
- markdown: string;
1181
- })[];
1182
- }[];
1183
- };
1184
- }[];
1405
+ state: "ambiguous";
1406
+ query_ref: string;
1407
+ conflicting_node_refs: string[];
1185
1408
  }, {
1186
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1187
- proposals: {
1188
- evidence_refs: {
1189
- ref: string;
1190
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1191
- source_digest: string;
1192
- }[];
1193
- composer_ref: string;
1194
- target_node_ref: string;
1195
- artifact: {
1196
- artifact_kind: string;
1197
- representation: "template";
1198
- template_id: string;
1199
- variables: Record<string, {
1200
- value: import("./indexerRegistry.js").IndexerJson;
1201
- evidence_refs: string[];
1202
- fact_refs: string[];
1203
- }>;
1204
- section_projections: {
1205
- section_key: string;
1206
- owner_indexer_id: string;
1207
- document_kind: string;
1208
- reader_goal: string;
1209
- artifact_kind: string;
1210
- }[];
1211
- artifact_id: string;
1212
- artifact_policy_variant: string;
1213
- } | {
1214
- artifact_kind: string;
1215
- representation: "sections";
1216
- artifact_id: string;
1217
- artifact_policy_variant: string;
1218
- sections: {
1219
- section_key: string;
1220
- owner_indexer_id: string;
1221
- document_kind: string;
1222
- reader_goal: string;
1223
- artifact_kind: string;
1224
- blocks: ({
1225
- block_id: string;
1226
- layer: "deterministic-block";
1227
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1228
- fact_refs: string[];
1229
- } | {
1230
- evidence_refs: string[];
1231
- block_id: string;
1232
- layer: "semantic-prose";
1233
- markdown: string;
1234
- })[];
1235
- }[];
1236
- };
1237
- }[];
1238
- }>]>;
1239
- payload_digest: z.ZodString;
1240
- materialization_receipt: z.ZodObject<{
1241
- protocol: z.ZodLiteral<"context.indexer.layer-fragment-materialization-receipt/v1">;
1242
- fragment_digest: z.ZodString;
1243
- payload_digest: z.ZodString;
1244
- layer_ref: z.ZodEffects<z.ZodString, string, string>;
1245
- layer_integrity: z.ZodString;
1246
- composer_ref: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1247
- validator_contract_digest: z.ZodString;
1248
- }, "strict", z.ZodTypeAny, {
1249
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1250
- layer_ref: string;
1251
- layer_integrity: string;
1252
- fragment_digest: string;
1253
- payload_digest: string;
1254
- validator_contract_digest: string;
1255
- composer_ref?: string | undefined;
1409
+ state: "ambiguous";
1410
+ query_ref: string;
1411
+ conflicting_node_refs: string[];
1412
+ }>, {
1413
+ state: "ambiguous";
1414
+ query_ref: string;
1415
+ conflicting_node_refs: string[];
1256
1416
  }, {
1257
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1258
- layer_ref: string;
1259
- layer_integrity: string;
1260
- fragment_digest: string;
1261
- payload_digest: string;
1262
- validator_contract_digest: string;
1263
- composer_ref?: string | undefined;
1264
- }>;
1417
+ state: "ambiguous";
1418
+ query_ref: string;
1419
+ conflicting_node_refs: string[];
1420
+ }>]>, "many">;
1421
+ }, "strict", z.ZodTypeAny, {
1422
+ entries: ({
1423
+ subject_key: {
1424
+ kind: string;
1425
+ namespace: string;
1426
+ protocol: "context.subject-key/v1";
1427
+ local_key: string;
1428
+ };
1429
+ state: "resolved";
1430
+ query_ref: string;
1431
+ node_ref: string;
1432
+ } | {
1433
+ state: "absent";
1434
+ query_ref: string;
1435
+ } | {
1436
+ state: "ambiguous";
1437
+ query_ref: string;
1438
+ conflicting_node_refs: string[];
1439
+ })[];
1440
+ protocol: "context.indexer.target-resolution-view/v1";
1441
+ requirement_ref: string;
1442
+ view_digest: string;
1443
+ subject_key_schema_digest: string;
1444
+ query_digest: string;
1445
+ }, {
1446
+ entries: ({
1447
+ subject_key: {
1448
+ kind: string;
1449
+ namespace: string;
1450
+ protocol: "context.subject-key/v1";
1451
+ local_key: string;
1452
+ };
1453
+ state: "resolved";
1454
+ query_ref: string;
1455
+ node_ref: string;
1456
+ } | {
1457
+ state: "absent";
1458
+ query_ref: string;
1459
+ } | {
1460
+ state: "ambiguous";
1461
+ query_ref: string;
1462
+ conflicting_node_refs: string[];
1463
+ })[];
1464
+ protocol: "context.indexer.target-resolution-view/v1";
1465
+ requirement_ref: string;
1466
+ view_digest: string;
1467
+ subject_key_schema_digest: string;
1468
+ query_digest: string;
1469
+ }>, {
1470
+ entries: ({
1471
+ subject_key: {
1472
+ kind: string;
1473
+ namespace: string;
1474
+ protocol: "context.subject-key/v1";
1475
+ local_key: string;
1476
+ };
1477
+ state: "resolved";
1478
+ query_ref: string;
1479
+ node_ref: string;
1480
+ } | {
1481
+ state: "absent";
1482
+ query_ref: string;
1483
+ } | {
1484
+ state: "ambiguous";
1485
+ query_ref: string;
1486
+ conflicting_node_refs: string[];
1487
+ })[];
1488
+ protocol: "context.indexer.target-resolution-view/v1";
1489
+ requirement_ref: string;
1490
+ view_digest: string;
1491
+ subject_key_schema_digest: string;
1492
+ query_digest: string;
1493
+ }, {
1494
+ entries: ({
1495
+ subject_key: {
1496
+ kind: string;
1497
+ namespace: string;
1498
+ protocol: "context.subject-key/v1";
1499
+ local_key: string;
1500
+ };
1501
+ state: "resolved";
1502
+ query_ref: string;
1503
+ node_ref: string;
1504
+ } | {
1505
+ state: "absent";
1506
+ query_ref: string;
1507
+ } | {
1508
+ state: "ambiguous";
1509
+ query_ref: string;
1510
+ conflicting_node_refs: string[];
1511
+ })[];
1512
+ protocol: "context.indexer.target-resolution-view/v1";
1513
+ requirement_ref: string;
1514
+ view_digest: string;
1515
+ subject_key_schema_digest: string;
1516
+ query_digest: string;
1517
+ }>>;
1518
+ allowed_artifact_policy_variants: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1519
+ artifact_policy_eligibility_digest: z.ZodString;
1520
+ protocol: z.ZodLiteral<"context.indexer.main-workset/v2">;
1521
+ workset_digest: z.ZodString;
1522
+ operation: z.ZodLiteral<"main-index">;
1523
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
1524
+ requirement_ref: z.ZodString;
1525
+ owner_cell_refs: z.ZodArray<z.ZodString, "many">;
1526
+ source_ref: z.ZodString;
1527
+ module_ref: z.ZodNullable<z.ZodString>;
1528
+ primary_registry_projection_digest: z.ZodString;
1529
+ requirement_set_digest: z.ZodString;
1530
+ primary_execution_fingerprint: z.ZodString;
1531
+ profile_contract_digest: z.ZodString;
1532
+ subject_key_schema_digest: z.ZodString;
1533
+ source_scope_digest: z.ZodString;
1534
+ source_binding_digest: z.ZodString;
1535
+ primary_resource_binding_digest: z.ZodString;
1536
+ question_target_inventory_digest: z.ZodString;
1537
+ repair_intent: z.ZodOptional<z.ZodObject<{
1538
+ target_ref: z.ZodString;
1539
+ instruction: z.ZodString;
1540
+ } & {
1541
+ intent_digest: z.ZodString;
1265
1542
  }, "strict", z.ZodTypeAny, {
1266
- kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1267
- payload: {
1268
- protocol: "context.indexer.fragment.fact-enrichment/v1";
1269
- facts: {
1270
- value: import("./indexerRegistry.js").IndexerJson;
1271
- evidence_refs: {
1272
- ref: string;
1273
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1274
- source_digest: string;
1275
- }[];
1276
- target_ref: string;
1277
- fact_id: string;
1278
- }[];
1543
+ target_ref: string;
1544
+ instruction: string;
1545
+ intent_digest: string;
1546
+ }, {
1547
+ target_ref: string;
1548
+ instruction: string;
1549
+ intent_digest: string;
1550
+ }>>;
1551
+ }, "strict", z.ZodTypeAny, {
1552
+ source_ref: string;
1553
+ protocol: "context.indexer.main-workset/v2";
1554
+ requirement_ref: string;
1555
+ workset_digest: string;
1556
+ module_ref: string | null;
1557
+ operation: "main-index";
1558
+ indexer_id: string;
1559
+ profile_contract_digest: string;
1560
+ logical_unit_ref: string;
1561
+ subject_key_schema_digest: string;
1562
+ stage: "author";
1563
+ owner_cell_refs: string[];
1564
+ primary_registry_projection_digest: string;
1565
+ requirement_set_digest: string;
1566
+ primary_execution_fingerprint: string;
1567
+ source_scope_digest: string;
1568
+ source_binding_digest: string;
1569
+ primary_resource_binding_digest: string;
1570
+ question_target_inventory_digest: string;
1571
+ partition_plan_binding_digest: string;
1572
+ group_key: string;
1573
+ member_ids_digest: string;
1574
+ member_inventory_digest: string;
1575
+ group_projection_digest: string;
1576
+ group_dependency_view_digest: string;
1577
+ allowed_artifact_policy_variants: string[];
1578
+ artifact_policy_eligibility_digest: string;
1579
+ repair_intent?: {
1580
+ target_ref: string;
1581
+ instruction: string;
1582
+ intent_digest: string;
1583
+ } | undefined;
1584
+ target_resolution_view?: {
1585
+ entries: ({
1586
+ subject_key: {
1587
+ kind: string;
1588
+ namespace: string;
1589
+ protocol: "context.subject-key/v1";
1590
+ local_key: string;
1591
+ };
1592
+ state: "resolved";
1593
+ query_ref: string;
1594
+ node_ref: string;
1279
1595
  } | {
1280
- protocol: "context.indexer.fragment.template-variables/v1";
1281
- variables: {
1282
- value: import("./indexerRegistry.js").IndexerJson;
1283
- evidence_refs: {
1284
- ref: string;
1285
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1286
- source_digest: string;
1287
- }[];
1288
- template_id: string;
1289
- target_ref: string;
1290
- variable_id: string;
1291
- }[];
1596
+ state: "absent";
1597
+ query_ref: string;
1292
1598
  } | {
1293
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1294
- proposals: {
1295
- evidence_refs: {
1296
- ref: string;
1297
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1298
- source_digest: string;
1299
- }[];
1300
- composer_ref: string;
1301
- target_node_ref: string;
1302
- artifact: {
1303
- artifact_kind: string;
1304
- representation: "template";
1305
- template_id: string;
1306
- variables: Record<string, {
1307
- value: import("./indexerRegistry.js").IndexerJson;
1308
- evidence_refs: string[];
1309
- fact_refs: string[];
1310
- }>;
1311
- section_projections: {
1312
- section_key: string;
1313
- owner_indexer_id: string;
1314
- document_kind: string;
1315
- reader_goal: string;
1316
- artifact_kind: string;
1317
- }[];
1318
- artifact_id: string;
1319
- artifact_policy_variant: string;
1320
- } | {
1321
- artifact_kind: string;
1322
- representation: "sections";
1323
- artifact_id: string;
1324
- artifact_policy_variant: string;
1325
- sections: {
1326
- section_key: string;
1327
- owner_indexer_id: string;
1328
- document_kind: string;
1329
- reader_goal: string;
1330
- artifact_kind: string;
1331
- blocks: ({
1332
- block_id: string;
1333
- layer: "deterministic-block";
1334
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1335
- fact_refs: string[];
1336
- } | {
1337
- evidence_refs: string[];
1338
- block_id: string;
1339
- layer: "semantic-prose";
1340
- markdown: string;
1341
- })[];
1342
- }[];
1343
- };
1344
- }[];
1345
- };
1346
- layer_ref: string;
1347
- layer_integrity: string;
1348
- phase: "pre-authority" | "post-author";
1349
- target_refs: string[];
1350
- fragment_digest: string;
1351
- payload_digest: string;
1352
- materialization_receipt: {
1353
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1354
- layer_ref: string;
1355
- layer_integrity: string;
1356
- fragment_digest: string;
1357
- payload_digest: string;
1358
- validator_contract_digest: string;
1359
- composer_ref?: string | undefined;
1360
- };
1361
- composer_ref?: string | undefined;
1362
- }, {
1363
- kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1364
- payload: {
1365
- protocol: "context.indexer.fragment.fact-enrichment/v1";
1366
- facts: {
1367
- value: import("./indexerRegistry.js").IndexerJson;
1368
- evidence_refs: {
1369
- ref: string;
1370
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1371
- source_digest: string;
1372
- }[];
1373
- target_ref: string;
1374
- fact_id: string;
1375
- }[];
1599
+ state: "ambiguous";
1600
+ query_ref: string;
1601
+ conflicting_node_refs: string[];
1602
+ })[];
1603
+ protocol: "context.indexer.target-resolution-view/v1";
1604
+ requirement_ref: string;
1605
+ view_digest: string;
1606
+ subject_key_schema_digest: string;
1607
+ query_digest: string;
1608
+ } | undefined;
1609
+ }, {
1610
+ source_ref: string;
1611
+ protocol: "context.indexer.main-workset/v2";
1612
+ requirement_ref: string;
1613
+ workset_digest: string;
1614
+ module_ref: string | null;
1615
+ operation: "main-index";
1616
+ indexer_id: string;
1617
+ profile_contract_digest: string;
1618
+ logical_unit_ref: string;
1619
+ subject_key_schema_digest: string;
1620
+ stage: "author";
1621
+ owner_cell_refs: string[];
1622
+ primary_registry_projection_digest: string;
1623
+ requirement_set_digest: string;
1624
+ primary_execution_fingerprint: string;
1625
+ source_scope_digest: string;
1626
+ source_binding_digest: string;
1627
+ primary_resource_binding_digest: string;
1628
+ question_target_inventory_digest: string;
1629
+ partition_plan_binding_digest: string;
1630
+ group_key: string;
1631
+ member_ids_digest: string;
1632
+ member_inventory_digest: string;
1633
+ group_projection_digest: string;
1634
+ group_dependency_view_digest: string;
1635
+ allowed_artifact_policy_variants: string[];
1636
+ artifact_policy_eligibility_digest: string;
1637
+ repair_intent?: {
1638
+ target_ref: string;
1639
+ instruction: string;
1640
+ intent_digest: string;
1641
+ } | undefined;
1642
+ target_resolution_view?: {
1643
+ entries: ({
1644
+ subject_key: {
1645
+ kind: string;
1646
+ namespace: string;
1647
+ protocol: "context.subject-key/v1";
1648
+ local_key: string;
1649
+ };
1650
+ state: "resolved";
1651
+ query_ref: string;
1652
+ node_ref: string;
1376
1653
  } | {
1377
- protocol: "context.indexer.fragment.template-variables/v1";
1378
- variables: {
1379
- value: import("./indexerRegistry.js").IndexerJson;
1380
- evidence_refs: {
1381
- ref: string;
1382
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1383
- source_digest: string;
1384
- }[];
1385
- template_id: string;
1386
- target_ref: string;
1387
- variable_id: string;
1388
- }[];
1654
+ state: "absent";
1655
+ query_ref: string;
1389
1656
  } | {
1390
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1391
- proposals: {
1392
- evidence_refs: {
1393
- ref: string;
1394
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1395
- source_digest: string;
1396
- }[];
1397
- composer_ref: string;
1398
- target_node_ref: string;
1399
- artifact: {
1400
- artifact_kind: string;
1401
- representation: "template";
1402
- template_id: string;
1403
- variables: Record<string, {
1404
- value: import("./indexerRegistry.js").IndexerJson;
1405
- evidence_refs: string[];
1406
- fact_refs: string[];
1407
- }>;
1408
- section_projections: {
1409
- section_key: string;
1410
- owner_indexer_id: string;
1411
- document_kind: string;
1412
- reader_goal: string;
1413
- artifact_kind: string;
1414
- }[];
1415
- artifact_id: string;
1416
- artifact_policy_variant: string;
1417
- } | {
1418
- artifact_kind: string;
1419
- representation: "sections";
1420
- artifact_id: string;
1421
- artifact_policy_variant: string;
1422
- sections: {
1423
- section_key: string;
1424
- owner_indexer_id: string;
1425
- document_kind: string;
1426
- reader_goal: string;
1427
- artifact_kind: string;
1428
- blocks: ({
1429
- block_id: string;
1430
- layer: "deterministic-block";
1431
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1432
- fact_refs: string[];
1433
- } | {
1434
- evidence_refs: string[];
1435
- block_id: string;
1436
- layer: "semantic-prose";
1437
- markdown: string;
1438
- })[];
1439
- }[];
1440
- };
1441
- }[];
1442
- };
1443
- layer_ref: string;
1444
- layer_integrity: string;
1445
- phase: "pre-authority" | "post-author";
1446
- target_refs: string[];
1447
- fragment_digest: string;
1448
- payload_digest: string;
1449
- materialization_receipt: {
1450
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1451
- layer_ref: string;
1452
- layer_integrity: string;
1453
- fragment_digest: string;
1454
- payload_digest: string;
1455
- validator_contract_digest: string;
1456
- composer_ref?: string | undefined;
1457
- };
1458
- composer_ref?: string | undefined;
1459
- }>, "many">;
1460
- rejected_fragment_diagnostics: z.ZodArray<z.ZodObject<{
1461
- code: z.ZodEffects<z.ZodString, string, string>;
1462
- message: z.ZodString;
1463
- fragment_digest: z.ZodOptional<z.ZodString>;
1464
- }, "strict", z.ZodTypeAny, {
1465
- code: string;
1466
- message: string;
1467
- fragment_digest?: string | undefined;
1468
- }, {
1469
- code: string;
1470
- message: string;
1471
- fragment_digest?: string | undefined;
1472
- }>, "many">;
1473
- view_digest: z.ZodString;
1474
- }, "strict", z.ZodTypeAny, {
1475
- protocol: "context.indexer.layer-composition-input/v1";
1657
+ state: "ambiguous";
1658
+ query_ref: string;
1659
+ conflicting_node_refs: string[];
1660
+ })[];
1661
+ protocol: "context.indexer.target-resolution-view/v1";
1662
+ requirement_ref: string;
1663
+ view_digest: string;
1664
+ subject_key_schema_digest: string;
1665
+ query_digest: string;
1666
+ } | undefined;
1667
+ }>, {
1668
+ source_ref: string;
1669
+ protocol: "context.indexer.main-workset/v2";
1670
+ requirement_ref: string;
1476
1671
  workset_digest: string;
1477
- final_authority_layer_ref: string;
1478
- accepted_fragments: {
1479
- kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1480
- payload: {
1481
- protocol: "context.indexer.fragment.fact-enrichment/v1";
1482
- facts: {
1483
- value: import("./indexerRegistry.js").IndexerJson;
1484
- evidence_refs: {
1485
- ref: string;
1486
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1487
- source_digest: string;
1488
- }[];
1489
- target_ref: string;
1490
- fact_id: string;
1491
- }[];
1672
+ module_ref: string | null;
1673
+ operation: "main-index";
1674
+ indexer_id: string;
1675
+ profile_contract_digest: string;
1676
+ logical_unit_ref: string;
1677
+ subject_key_schema_digest: string;
1678
+ stage: "author";
1679
+ owner_cell_refs: string[];
1680
+ primary_registry_projection_digest: string;
1681
+ requirement_set_digest: string;
1682
+ primary_execution_fingerprint: string;
1683
+ source_scope_digest: string;
1684
+ source_binding_digest: string;
1685
+ primary_resource_binding_digest: string;
1686
+ question_target_inventory_digest: string;
1687
+ partition_plan_binding_digest: string;
1688
+ group_key: string;
1689
+ member_ids_digest: string;
1690
+ member_inventory_digest: string;
1691
+ group_projection_digest: string;
1692
+ group_dependency_view_digest: string;
1693
+ allowed_artifact_policy_variants: string[];
1694
+ artifact_policy_eligibility_digest: string;
1695
+ repair_intent?: {
1696
+ target_ref: string;
1697
+ instruction: string;
1698
+ intent_digest: string;
1699
+ } | undefined;
1700
+ target_resolution_view?: {
1701
+ entries: ({
1702
+ subject_key: {
1703
+ kind: string;
1704
+ namespace: string;
1705
+ protocol: "context.subject-key/v1";
1706
+ local_key: string;
1707
+ };
1708
+ state: "resolved";
1709
+ query_ref: string;
1710
+ node_ref: string;
1492
1711
  } | {
1493
- protocol: "context.indexer.fragment.template-variables/v1";
1494
- variables: {
1495
- value: import("./indexerRegistry.js").IndexerJson;
1496
- evidence_refs: {
1497
- ref: string;
1498
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1499
- source_digest: string;
1500
- }[];
1501
- template_id: string;
1502
- target_ref: string;
1503
- variable_id: string;
1504
- }[];
1712
+ state: "absent";
1713
+ query_ref: string;
1505
1714
  } | {
1506
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1507
- proposals: {
1508
- evidence_refs: {
1509
- ref: string;
1510
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1511
- source_digest: string;
1512
- }[];
1513
- composer_ref: string;
1514
- target_node_ref: string;
1515
- artifact: {
1516
- artifact_kind: string;
1517
- representation: "template";
1518
- template_id: string;
1519
- variables: Record<string, {
1520
- value: import("./indexerRegistry.js").IndexerJson;
1521
- evidence_refs: string[];
1522
- fact_refs: string[];
1523
- }>;
1524
- section_projections: {
1525
- section_key: string;
1526
- owner_indexer_id: string;
1527
- document_kind: string;
1528
- reader_goal: string;
1529
- artifact_kind: string;
1530
- }[];
1531
- artifact_id: string;
1532
- artifact_policy_variant: string;
1533
- } | {
1534
- artifact_kind: string;
1535
- representation: "sections";
1536
- artifact_id: string;
1537
- artifact_policy_variant: string;
1538
- sections: {
1539
- section_key: string;
1540
- owner_indexer_id: string;
1541
- document_kind: string;
1542
- reader_goal: string;
1543
- artifact_kind: string;
1544
- blocks: ({
1545
- block_id: string;
1546
- layer: "deterministic-block";
1547
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1548
- fact_refs: string[];
1549
- } | {
1550
- evidence_refs: string[];
1551
- block_id: string;
1552
- layer: "semantic-prose";
1553
- markdown: string;
1554
- })[];
1555
- }[];
1556
- };
1557
- }[];
1558
- };
1559
- layer_ref: string;
1560
- layer_integrity: string;
1561
- phase: "pre-authority" | "post-author";
1562
- target_refs: string[];
1563
- fragment_digest: string;
1564
- payload_digest: string;
1565
- materialization_receipt: {
1566
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1567
- layer_ref: string;
1568
- layer_integrity: string;
1569
- fragment_digest: string;
1570
- payload_digest: string;
1571
- validator_contract_digest: string;
1572
- composer_ref?: string | undefined;
1573
- };
1574
- composer_ref?: string | undefined;
1575
- }[];
1576
- rejected_fragment_diagnostics: {
1577
- code: string;
1578
- message: string;
1579
- fragment_digest?: string | undefined;
1580
- }[];
1581
- view_digest: string;
1715
+ state: "ambiguous";
1716
+ query_ref: string;
1717
+ conflicting_node_refs: string[];
1718
+ })[];
1719
+ protocol: "context.indexer.target-resolution-view/v1";
1720
+ requirement_ref: string;
1721
+ view_digest: string;
1722
+ subject_key_schema_digest: string;
1723
+ query_digest: string;
1724
+ } | undefined;
1582
1725
  }, {
1583
- protocol: "context.indexer.layer-composition-input/v1";
1726
+ source_ref: string;
1727
+ protocol: "context.indexer.main-workset/v2";
1728
+ requirement_ref: string;
1584
1729
  workset_digest: string;
1585
- final_authority_layer_ref: string;
1586
- accepted_fragments: {
1587
- kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
1588
- payload: {
1589
- protocol: "context.indexer.fragment.fact-enrichment/v1";
1590
- facts: {
1591
- value: import("./indexerRegistry.js").IndexerJson;
1592
- evidence_refs: {
1593
- ref: string;
1594
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1595
- source_digest: string;
1596
- }[];
1597
- target_ref: string;
1598
- fact_id: string;
1599
- }[];
1730
+ module_ref: string | null;
1731
+ operation: "main-index";
1732
+ indexer_id: string;
1733
+ profile_contract_digest: string;
1734
+ logical_unit_ref: string;
1735
+ subject_key_schema_digest: string;
1736
+ stage: "author";
1737
+ owner_cell_refs: string[];
1738
+ primary_registry_projection_digest: string;
1739
+ requirement_set_digest: string;
1740
+ primary_execution_fingerprint: string;
1741
+ source_scope_digest: string;
1742
+ source_binding_digest: string;
1743
+ primary_resource_binding_digest: string;
1744
+ question_target_inventory_digest: string;
1745
+ partition_plan_binding_digest: string;
1746
+ group_key: string;
1747
+ member_ids_digest: string;
1748
+ member_inventory_digest: string;
1749
+ group_projection_digest: string;
1750
+ group_dependency_view_digest: string;
1751
+ allowed_artifact_policy_variants: string[];
1752
+ artifact_policy_eligibility_digest: string;
1753
+ repair_intent?: {
1754
+ target_ref: string;
1755
+ instruction: string;
1756
+ intent_digest: string;
1757
+ } | undefined;
1758
+ target_resolution_view?: {
1759
+ entries: ({
1760
+ subject_key: {
1761
+ kind: string;
1762
+ namespace: string;
1763
+ protocol: "context.subject-key/v1";
1764
+ local_key: string;
1765
+ };
1766
+ state: "resolved";
1767
+ query_ref: string;
1768
+ node_ref: string;
1600
1769
  } | {
1601
- protocol: "context.indexer.fragment.template-variables/v1";
1602
- variables: {
1603
- value: import("./indexerRegistry.js").IndexerJson;
1604
- evidence_refs: {
1605
- ref: string;
1606
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1607
- source_digest: string;
1608
- }[];
1609
- template_id: string;
1610
- target_ref: string;
1611
- variable_id: string;
1612
- }[];
1770
+ state: "absent";
1771
+ query_ref: string;
1613
1772
  } | {
1614
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
1615
- proposals: {
1616
- evidence_refs: {
1617
- ref: string;
1618
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
1619
- source_digest: string;
1620
- }[];
1621
- composer_ref: string;
1622
- target_node_ref: string;
1623
- artifact: {
1624
- artifact_kind: string;
1625
- representation: "template";
1626
- template_id: string;
1627
- variables: Record<string, {
1628
- value: import("./indexerRegistry.js").IndexerJson;
1629
- evidence_refs: string[];
1630
- fact_refs: string[];
1631
- }>;
1632
- section_projections: {
1633
- section_key: string;
1634
- owner_indexer_id: string;
1635
- document_kind: string;
1636
- reader_goal: string;
1637
- artifact_kind: string;
1638
- }[];
1639
- artifact_id: string;
1640
- artifact_policy_variant: string;
1641
- } | {
1642
- artifact_kind: string;
1643
- representation: "sections";
1644
- artifact_id: string;
1645
- artifact_policy_variant: string;
1646
- sections: {
1647
- section_key: string;
1648
- owner_indexer_id: string;
1649
- document_kind: string;
1650
- reader_goal: string;
1651
- artifact_kind: string;
1652
- blocks: ({
1653
- block_id: string;
1654
- layer: "deterministic-block";
1655
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
1656
- fact_refs: string[];
1657
- } | {
1658
- evidence_refs: string[];
1659
- block_id: string;
1660
- layer: "semantic-prose";
1661
- markdown: string;
1662
- })[];
1663
- }[];
1664
- };
1665
- }[];
1666
- };
1667
- layer_ref: string;
1668
- layer_integrity: string;
1669
- phase: "pre-authority" | "post-author";
1670
- target_refs: string[];
1671
- fragment_digest: string;
1672
- payload_digest: string;
1673
- materialization_receipt: {
1674
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
1675
- layer_ref: string;
1676
- layer_integrity: string;
1677
- fragment_digest: string;
1678
- payload_digest: string;
1679
- validator_contract_digest: string;
1680
- composer_ref?: string | undefined;
1681
- };
1682
- composer_ref?: string | undefined;
1683
- }[];
1684
- rejected_fragment_diagnostics: {
1685
- code: string;
1686
- message: string;
1687
- fragment_digest?: string | undefined;
1688
- }[];
1689
- view_digest: string;
1690
- }>;
1691
- final_authority: z.ZodObject<{
1692
- layer_ref: z.ZodEffects<z.ZodString, string, string>;
1693
- integrity: z.ZodString;
1694
- bundle_digest: z.ZodString;
1695
- config_fingerprint: z.ZodString;
1696
- customization_fingerprint: z.ZodNullable<z.ZodString>;
1697
- }, "strict", z.ZodTypeAny, {
1698
- integrity: string;
1699
- layer_ref: string;
1700
- bundle_digest: string;
1701
- config_fingerprint: string;
1702
- customization_fingerprint: string | null;
1703
- }, {
1704
- integrity: string;
1705
- layer_ref: string;
1706
- bundle_digest: string;
1707
- config_fingerprint: string;
1708
- customization_fingerprint: string | null;
1709
- }>;
1710
- run_environment: z.ZodObject<{
1711
- protocol: z.ZodLiteral<"context.indexer.run-environment/v2">;
1712
- source_snapshot_digest: z.ZodString;
1713
- source_dependency_fingerprint: z.ZodString;
1714
- source_role: z.ZodEffects<z.ZodString, string, string>;
1715
- source_precedence_digest: z.ZodString;
1716
- metric_set_digest: z.ZodString;
1717
- dependency_view_digest: z.ZodNullable<z.ZodString>;
1718
- primary_execution_projection: z.ZodEffects<z.ZodObject<{
1719
- protocol: z.ZodLiteral<"context.indexer.primary-execution-projection/v1">;
1720
- indexer_id: z.ZodEffects<z.ZodString, string, string>;
1721
- primary_registry_projection_digest: z.ZodString;
1722
- program_digest: z.ZodNullable<z.ZodString>;
1723
- instructions_digest: z.ZodString;
1724
- template_set_digest: z.ZodString;
1725
- config_digest: z.ZodString;
1726
- cli_contract_digest: z.ZodString;
1727
- profile_contract_digest: z.ZodString;
1728
- resources: z.ZodArray<z.ZodObject<{
1729
- layer_ref: z.ZodString;
1730
- phase: z.ZodEnum<["primary", "pre-authority"]>;
1731
- kind: z.ZodEffects<z.ZodString, string, string>;
1732
- ref: z.ZodString;
1733
- digest: z.ZodString;
1734
- }, "strict", z.ZodTypeAny, {
1735
- ref: string;
1736
- kind: string;
1737
- digest: string;
1738
- layer_ref: string;
1739
- phase: "primary" | "pre-authority";
1740
- }, {
1741
- ref: string;
1742
- kind: string;
1743
- digest: string;
1744
- layer_ref: string;
1745
- phase: "primary" | "pre-authority";
1746
- }>, "many">;
1747
- primary_resource_binding_digest: z.ZodString;
1748
- shared_artifact_fingerprint: z.ZodObject<{
1749
- protocol: z.ZodLiteral<"context.indexer.shared-artifact-fingerprint/v1">;
1750
- indexer_id: z.ZodEffects<z.ZodString, string, string>;
1751
- implementation_fingerprint: z.ZodString;
1752
- instructions_fingerprint: z.ZodString;
1753
- template_fingerprint: z.ZodString;
1754
- } & {
1755
- fingerprint_digest: z.ZodString;
1756
- }, "strict", z.ZodTypeAny, {
1757
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
1758
- indexer_id: string;
1759
- implementation_fingerprint: string;
1760
- instructions_fingerprint: string;
1761
- template_fingerprint: string;
1762
- fingerprint_digest: string;
1763
- }, {
1764
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
1765
- indexer_id: string;
1766
- implementation_fingerprint: string;
1767
- instructions_fingerprint: string;
1768
- template_fingerprint: string;
1769
- fingerprint_digest: string;
1770
- }>;
1771
- primary_execution_fingerprint: z.ZodString;
1772
- }, "strict", z.ZodTypeAny, {
1773
- protocol: "context.indexer.primary-execution-projection/v1";
1774
- indexer_id: string;
1775
- program_digest: string | null;
1776
- profile_contract_digest: string;
1777
- primary_registry_projection_digest: string;
1778
- primary_execution_fingerprint: string;
1779
- primary_resource_binding_digest: string;
1780
- instructions_digest: string;
1781
- template_set_digest: string;
1782
- config_digest: string;
1783
- cli_contract_digest: string;
1784
- resources: {
1785
- ref: string;
1786
- kind: string;
1787
- digest: string;
1788
- layer_ref: string;
1789
- phase: "primary" | "pre-authority";
1790
- }[];
1791
- shared_artifact_fingerprint: {
1792
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
1793
- indexer_id: string;
1794
- implementation_fingerprint: string;
1795
- instructions_fingerprint: string;
1796
- template_fingerprint: string;
1797
- fingerprint_digest: string;
1798
- };
1799
- }, {
1800
- protocol: "context.indexer.primary-execution-projection/v1";
1801
- indexer_id: string;
1802
- program_digest: string | null;
1803
- profile_contract_digest: string;
1804
- primary_registry_projection_digest: string;
1805
- primary_execution_fingerprint: string;
1806
- primary_resource_binding_digest: string;
1807
- instructions_digest: string;
1808
- template_set_digest: string;
1809
- config_digest: string;
1810
- cli_contract_digest: string;
1811
- resources: {
1812
- ref: string;
1813
- kind: string;
1814
- digest: string;
1815
- layer_ref: string;
1816
- phase: "primary" | "pre-authority";
1817
- }[];
1818
- shared_artifact_fingerprint: {
1819
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
1820
- indexer_id: string;
1821
- implementation_fingerprint: string;
1822
- instructions_fingerprint: string;
1823
- template_fingerprint: string;
1824
- fingerprint_digest: string;
1825
- };
1826
- }>, {
1827
- protocol: "context.indexer.primary-execution-projection/v1";
1828
- indexer_id: string;
1829
- program_digest: string | null;
1830
- profile_contract_digest: string;
1831
- primary_registry_projection_digest: string;
1832
- primary_execution_fingerprint: string;
1833
- primary_resource_binding_digest: string;
1834
- instructions_digest: string;
1835
- template_set_digest: string;
1836
- config_digest: string;
1837
- cli_contract_digest: string;
1838
- resources: {
1839
- ref: string;
1840
- kind: string;
1841
- digest: string;
1842
- layer_ref: string;
1843
- phase: "primary" | "pre-authority";
1844
- }[];
1845
- shared_artifact_fingerprint: {
1846
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
1847
- indexer_id: string;
1848
- implementation_fingerprint: string;
1849
- instructions_fingerprint: string;
1850
- template_fingerprint: string;
1851
- fingerprint_digest: string;
1852
- };
1853
- }, {
1854
- protocol: "context.indexer.primary-execution-projection/v1";
1855
- indexer_id: string;
1856
- program_digest: string | null;
1857
- profile_contract_digest: string;
1858
- primary_registry_projection_digest: string;
1859
- primary_execution_fingerprint: string;
1860
- primary_resource_binding_digest: string;
1861
- instructions_digest: string;
1862
- template_set_digest: string;
1863
- config_digest: string;
1864
- cli_contract_digest: string;
1865
- resources: {
1866
- ref: string;
1867
- kind: string;
1868
- digest: string;
1869
- layer_ref: string;
1870
- phase: "primary" | "pre-authority";
1871
- }[];
1872
- shared_artifact_fingerprint: {
1873
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
1874
- indexer_id: string;
1875
- implementation_fingerprint: string;
1876
- instructions_fingerprint: string;
1877
- template_fingerprint: string;
1878
- fingerprint_digest: string;
1879
- };
1880
- }>;
1881
- } & {
1882
- environment_digest: z.ZodString;
1883
- }, "strict", z.ZodTypeAny, {
1884
- protocol: "context.indexer.run-environment/v2";
1885
- source_role: string;
1886
- source_snapshot_digest: string;
1887
- source_dependency_fingerprint: string;
1888
- source_precedence_digest: string;
1889
- metric_set_digest: string;
1890
- dependency_view_digest: string | null;
1891
- primary_execution_projection: {
1892
- protocol: "context.indexer.primary-execution-projection/v1";
1893
- indexer_id: string;
1894
- program_digest: string | null;
1895
- profile_contract_digest: string;
1896
- primary_registry_projection_digest: string;
1897
- primary_execution_fingerprint: string;
1898
- primary_resource_binding_digest: string;
1899
- instructions_digest: string;
1900
- template_set_digest: string;
1901
- config_digest: string;
1902
- cli_contract_digest: string;
1903
- resources: {
1904
- ref: string;
1905
- kind: string;
1906
- digest: string;
1907
- layer_ref: string;
1908
- phase: "primary" | "pre-authority";
1909
- }[];
1910
- shared_artifact_fingerprint: {
1911
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
1912
- indexer_id: string;
1913
- implementation_fingerprint: string;
1914
- instructions_fingerprint: string;
1915
- template_fingerprint: string;
1916
- fingerprint_digest: string;
1917
- };
1918
- };
1919
- environment_digest: string;
1920
- }, {
1921
- protocol: "context.indexer.run-environment/v2";
1922
- source_role: string;
1923
- source_snapshot_digest: string;
1924
- source_dependency_fingerprint: string;
1925
- source_precedence_digest: string;
1926
- metric_set_digest: string;
1927
- dependency_view_digest: string | null;
1928
- primary_execution_projection: {
1929
- protocol: "context.indexer.primary-execution-projection/v1";
1930
- indexer_id: string;
1931
- program_digest: string | null;
1932
- profile_contract_digest: string;
1933
- primary_registry_projection_digest: string;
1934
- primary_execution_fingerprint: string;
1935
- primary_resource_binding_digest: string;
1936
- instructions_digest: string;
1937
- template_set_digest: string;
1938
- config_digest: string;
1939
- cli_contract_digest: string;
1940
- resources: {
1941
- ref: string;
1942
- kind: string;
1943
- digest: string;
1944
- layer_ref: string;
1945
- phase: "primary" | "pre-authority";
1946
- }[];
1947
- shared_artifact_fingerprint: {
1948
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
1949
- indexer_id: string;
1950
- implementation_fingerprint: string;
1951
- instructions_fingerprint: string;
1952
- template_fingerprint: string;
1953
- fingerprint_digest: string;
1954
- };
1955
- };
1956
- environment_digest: string;
1957
- }>;
1958
- partition_strategy_attempt: z.ZodNullable<z.ZodObject<{
1959
- strategy_order: z.ZodNumber;
1960
- strategy_ref: z.ZodUnion<[z.ZodObject<{
1961
- kind: z.ZodLiteral<"project-indexer">;
1962
- indexer_id: z.ZodEffects<z.ZodString, string, string>;
1963
- strategy_id: z.ZodEffects<z.ZodString, string, string>;
1964
- implementation_digest: z.ZodString;
1965
- }, "strict", z.ZodTypeAny, {
1966
- kind: "project-indexer";
1967
- implementation_digest: string;
1968
- indexer_id: string;
1969
- strategy_id: string;
1970
- }, {
1971
- kind: "project-indexer";
1972
- implementation_digest: string;
1973
- indexer_id: string;
1974
- strategy_id: string;
1975
- }>, z.ZodObject<{
1976
- kind: z.ZodLiteral<"cli-builtin">;
1977
- strategy_id: z.ZodEffects<z.ZodString, string, string>;
1978
- implementation_digest: z.ZodString;
1979
- }, "strict", z.ZodTypeAny, {
1980
- kind: "cli-builtin";
1981
- implementation_digest: string;
1982
- strategy_id: string;
1983
- }, {
1984
- kind: "cli-builtin";
1985
- implementation_digest: string;
1986
- strategy_id: string;
1987
- }>]>;
1988
- strategy_digest: z.ZodString;
1989
- previous_attempt_digest: z.ZodNullable<z.ZodString>;
1990
- }, "strict", z.ZodTypeAny, {
1991
- strategy_ref: {
1992
- kind: "project-indexer";
1993
- implementation_digest: string;
1994
- indexer_id: string;
1995
- strategy_id: string;
1996
- } | {
1997
- kind: "cli-builtin";
1998
- implementation_digest: string;
1999
- strategy_id: string;
2000
- };
2001
- strategy_digest: string;
2002
- strategy_order: number;
2003
- previous_attempt_digest: string | null;
2004
- }, {
2005
- strategy_ref: {
2006
- kind: "project-indexer";
2007
- implementation_digest: string;
2008
- indexer_id: string;
2009
- strategy_id: string;
2010
- } | {
2011
- kind: "cli-builtin";
2012
- implementation_digest: string;
2013
- strategy_id: string;
2014
- };
2015
- strategy_digest: string;
2016
- strategy_order: number;
2017
- previous_attempt_digest: string | null;
2018
- }>>;
2019
- execution_request_digest: z.ZodString;
1773
+ state: "ambiguous";
1774
+ query_ref: string;
1775
+ conflicting_node_refs: string[];
1776
+ })[];
1777
+ protocol: "context.indexer.target-resolution-view/v1";
1778
+ requirement_ref: string;
1779
+ view_digest: string;
1780
+ subject_key_schema_digest: string;
1781
+ query_digest: string;
1782
+ } | undefined;
1783
+ }>]>, "many">;
2020
1784
  }, "strict", z.ZodTypeAny, {
2021
- protocol: "context.indexer.run-request/v2";
2022
- operation: "main-index";
2023
- workset: {
1785
+ protocol: "context.indexer.main-transport-batch/v2";
1786
+ worksets: ({
2024
1787
  source_ref: string;
2025
1788
  protocol: "context.indexer.main-workset/v2";
2026
1789
  requirement_ref: string;
@@ -2113,181 +1876,10 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2113
1876
  subject_key_schema_digest: string;
2114
1877
  query_digest: string;
2115
1878
  } | undefined;
2116
- };
2117
- execution_request_digest: string;
2118
- composition_input: {
2119
- protocol: "context.indexer.layer-composition-input/v1";
2120
- workset_digest: string;
2121
- final_authority_layer_ref: string;
2122
- accepted_fragments: {
2123
- kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
2124
- payload: {
2125
- protocol: "context.indexer.fragment.fact-enrichment/v1";
2126
- facts: {
2127
- value: import("./indexerRegistry.js").IndexerJson;
2128
- evidence_refs: {
2129
- ref: string;
2130
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2131
- source_digest: string;
2132
- }[];
2133
- target_ref: string;
2134
- fact_id: string;
2135
- }[];
2136
- } | {
2137
- protocol: "context.indexer.fragment.template-variables/v1";
2138
- variables: {
2139
- value: import("./indexerRegistry.js").IndexerJson;
2140
- evidence_refs: {
2141
- ref: string;
2142
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2143
- source_digest: string;
2144
- }[];
2145
- template_id: string;
2146
- target_ref: string;
2147
- variable_id: string;
2148
- }[];
2149
- } | {
2150
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
2151
- proposals: {
2152
- evidence_refs: {
2153
- ref: string;
2154
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2155
- source_digest: string;
2156
- }[];
2157
- composer_ref: string;
2158
- target_node_ref: string;
2159
- artifact: {
2160
- artifact_kind: string;
2161
- representation: "template";
2162
- template_id: string;
2163
- variables: Record<string, {
2164
- value: import("./indexerRegistry.js").IndexerJson;
2165
- evidence_refs: string[];
2166
- fact_refs: string[];
2167
- }>;
2168
- section_projections: {
2169
- section_key: string;
2170
- owner_indexer_id: string;
2171
- document_kind: string;
2172
- reader_goal: string;
2173
- artifact_kind: string;
2174
- }[];
2175
- artifact_id: string;
2176
- artifact_policy_variant: string;
2177
- } | {
2178
- artifact_kind: string;
2179
- representation: "sections";
2180
- artifact_id: string;
2181
- artifact_policy_variant: string;
2182
- sections: {
2183
- section_key: string;
2184
- owner_indexer_id: string;
2185
- document_kind: string;
2186
- reader_goal: string;
2187
- artifact_kind: string;
2188
- blocks: ({
2189
- block_id: string;
2190
- layer: "deterministic-block";
2191
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
2192
- fact_refs: string[];
2193
- } | {
2194
- evidence_refs: string[];
2195
- block_id: string;
2196
- layer: "semantic-prose";
2197
- markdown: string;
2198
- })[];
2199
- }[];
2200
- };
2201
- }[];
2202
- };
2203
- layer_ref: string;
2204
- layer_integrity: string;
2205
- phase: "pre-authority" | "post-author";
2206
- target_refs: string[];
2207
- fragment_digest: string;
2208
- payload_digest: string;
2209
- materialization_receipt: {
2210
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
2211
- layer_ref: string;
2212
- layer_integrity: string;
2213
- fragment_digest: string;
2214
- payload_digest: string;
2215
- validator_contract_digest: string;
2216
- composer_ref?: string | undefined;
2217
- };
2218
- composer_ref?: string | undefined;
2219
- }[];
2220
- rejected_fragment_diagnostics: {
2221
- code: string;
2222
- message: string;
2223
- fragment_digest?: string | undefined;
2224
- }[];
2225
- view_digest: string;
2226
- };
2227
- final_authority: {
2228
- integrity: string;
2229
- layer_ref: string;
2230
- bundle_digest: string;
2231
- config_fingerprint: string;
2232
- customization_fingerprint: string | null;
2233
- };
2234
- run_environment: {
2235
- protocol: "context.indexer.run-environment/v2";
2236
- source_role: string;
2237
- source_snapshot_digest: string;
2238
- source_dependency_fingerprint: string;
2239
- source_precedence_digest: string;
2240
- metric_set_digest: string;
2241
- dependency_view_digest: string | null;
2242
- primary_execution_projection: {
2243
- protocol: "context.indexer.primary-execution-projection/v1";
2244
- indexer_id: string;
2245
- program_digest: string | null;
2246
- profile_contract_digest: string;
2247
- primary_registry_projection_digest: string;
2248
- primary_execution_fingerprint: string;
2249
- primary_resource_binding_digest: string;
2250
- instructions_digest: string;
2251
- template_set_digest: string;
2252
- config_digest: string;
2253
- cli_contract_digest: string;
2254
- resources: {
2255
- ref: string;
2256
- kind: string;
2257
- digest: string;
2258
- layer_ref: string;
2259
- phase: "primary" | "pre-authority";
2260
- }[];
2261
- shared_artifact_fingerprint: {
2262
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
2263
- indexer_id: string;
2264
- implementation_fingerprint: string;
2265
- instructions_fingerprint: string;
2266
- template_fingerprint: string;
2267
- fingerprint_digest: string;
2268
- };
2269
- };
2270
- environment_digest: string;
2271
- };
2272
- partition_strategy_attempt: {
2273
- strategy_ref: {
2274
- kind: "project-indexer";
2275
- implementation_digest: string;
2276
- indexer_id: string;
2277
- strategy_id: string;
2278
- } | {
2279
- kind: "cli-builtin";
2280
- implementation_digest: string;
2281
- strategy_id: string;
2282
- };
2283
- strategy_digest: string;
2284
- strategy_order: number;
2285
- previous_attempt_digest: string | null;
2286
- } | null;
1879
+ })[];
2287
1880
  }, {
2288
- protocol: "context.indexer.run-request/v2";
2289
- operation: "main-index";
2290
- workset: {
1881
+ protocol: "context.indexer.main-transport-batch/v2";
1882
+ worksets: ({
2291
1883
  source_ref: string;
2292
1884
  protocol: "context.indexer.main-workset/v2";
2293
1885
  requirement_ref: string;
@@ -2380,187 +1972,38 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2380
1972
  subject_key_schema_digest: string;
2381
1973
  query_digest: string;
2382
1974
  } | undefined;
2383
- };
2384
- execution_request_digest: string;
2385
- composition_input: {
2386
- protocol: "context.indexer.layer-composition-input/v1";
2387
- workset_digest: string;
2388
- final_authority_layer_ref: string;
2389
- accepted_fragments: {
2390
- kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
2391
- payload: {
2392
- protocol: "context.indexer.fragment.fact-enrichment/v1";
2393
- facts: {
2394
- value: import("./indexerRegistry.js").IndexerJson;
2395
- evidence_refs: {
2396
- ref: string;
2397
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2398
- source_digest: string;
2399
- }[];
2400
- target_ref: string;
2401
- fact_id: string;
2402
- }[];
2403
- } | {
2404
- protocol: "context.indexer.fragment.template-variables/v1";
2405
- variables: {
2406
- value: import("./indexerRegistry.js").IndexerJson;
2407
- evidence_refs: {
2408
- ref: string;
2409
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2410
- source_digest: string;
2411
- }[];
2412
- template_id: string;
2413
- target_ref: string;
2414
- variable_id: string;
2415
- }[];
2416
- } | {
2417
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
2418
- proposals: {
2419
- evidence_refs: {
2420
- ref: string;
2421
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2422
- source_digest: string;
2423
- }[];
2424
- composer_ref: string;
2425
- target_node_ref: string;
2426
- artifact: {
2427
- artifact_kind: string;
2428
- representation: "template";
2429
- template_id: string;
2430
- variables: Record<string, {
2431
- value: import("./indexerRegistry.js").IndexerJson;
2432
- evidence_refs: string[];
2433
- fact_refs: string[];
2434
- }>;
2435
- section_projections: {
2436
- section_key: string;
2437
- owner_indexer_id: string;
2438
- document_kind: string;
2439
- reader_goal: string;
2440
- artifact_kind: string;
2441
- }[];
2442
- artifact_id: string;
2443
- artifact_policy_variant: string;
2444
- } | {
2445
- artifact_kind: string;
2446
- representation: "sections";
2447
- artifact_id: string;
2448
- artifact_policy_variant: string;
2449
- sections: {
2450
- section_key: string;
2451
- owner_indexer_id: string;
2452
- document_kind: string;
2453
- reader_goal: string;
2454
- artifact_kind: string;
2455
- blocks: ({
2456
- block_id: string;
2457
- layer: "deterministic-block";
2458
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
2459
- fact_refs: string[];
2460
- } | {
2461
- evidence_refs: string[];
2462
- block_id: string;
2463
- layer: "semantic-prose";
2464
- markdown: string;
2465
- })[];
2466
- }[];
2467
- };
2468
- }[];
2469
- };
2470
- layer_ref: string;
2471
- layer_integrity: string;
2472
- phase: "pre-authority" | "post-author";
2473
- target_refs: string[];
2474
- fragment_digest: string;
2475
- payload_digest: string;
2476
- materialization_receipt: {
2477
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
2478
- layer_ref: string;
2479
- layer_integrity: string;
2480
- fragment_digest: string;
2481
- payload_digest: string;
2482
- validator_contract_digest: string;
2483
- composer_ref?: string | undefined;
2484
- };
2485
- composer_ref?: string | undefined;
2486
- }[];
2487
- rejected_fragment_diagnostics: {
2488
- code: string;
2489
- message: string;
2490
- fragment_digest?: string | undefined;
2491
- }[];
2492
- view_digest: string;
2493
- };
2494
- final_authority: {
2495
- integrity: string;
2496
- layer_ref: string;
2497
- bundle_digest: string;
2498
- config_fingerprint: string;
2499
- customization_fingerprint: string | null;
2500
- };
2501
- run_environment: {
2502
- protocol: "context.indexer.run-environment/v2";
2503
- source_role: string;
2504
- source_snapshot_digest: string;
2505
- source_dependency_fingerprint: string;
2506
- source_precedence_digest: string;
2507
- metric_set_digest: string;
2508
- dependency_view_digest: string | null;
2509
- primary_execution_projection: {
2510
- protocol: "context.indexer.primary-execution-projection/v1";
2511
- indexer_id: string;
2512
- program_digest: string | null;
2513
- profile_contract_digest: string;
2514
- primary_registry_projection_digest: string;
2515
- primary_execution_fingerprint: string;
2516
- primary_resource_binding_digest: string;
2517
- instructions_digest: string;
2518
- template_set_digest: string;
2519
- config_digest: string;
2520
- cli_contract_digest: string;
2521
- resources: {
2522
- ref: string;
2523
- kind: string;
2524
- digest: string;
2525
- layer_ref: string;
2526
- phase: "primary" | "pre-authority";
2527
- }[];
2528
- shared_artifact_fingerprint: {
2529
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
2530
- indexer_id: string;
2531
- implementation_fingerprint: string;
2532
- instructions_fingerprint: string;
2533
- template_fingerprint: string;
2534
- fingerprint_digest: string;
2535
- };
2536
- };
2537
- environment_digest: string;
2538
- };
2539
- partition_strategy_attempt: {
2540
- strategy_ref: {
2541
- kind: "project-indexer";
2542
- implementation_digest: string;
2543
- indexer_id: string;
2544
- strategy_id: string;
2545
- } | {
2546
- kind: "cli-builtin";
2547
- implementation_digest: string;
2548
- strategy_id: string;
2549
- };
2550
- strategy_digest: string;
2551
- strategy_order: number;
2552
- previous_attempt_digest: string | null;
2553
- } | null;
1975
+ })[];
2554
1976
  }>;
2555
1977
  instruction_request_digest: z.ZodString;
1978
+ tasks: z.ZodArray<z.ZodObject<{
1979
+ task_key: z.ZodString;
1980
+ workset_digest: z.ZodString;
1981
+ execution_request_digest: z.ZodString;
1982
+ consumed_input_view_digest: z.ZodString;
1983
+ workset_view_resource_id: z.ZodString;
1984
+ workset_view_request_digest: z.ZodString;
1985
+ }, "strict", z.ZodTypeAny, {
1986
+ workset_digest: string;
1987
+ execution_request_digest: string;
1988
+ consumed_input_view_digest: string;
1989
+ task_key: string;
1990
+ workset_view_resource_id: string;
1991
+ workset_view_request_digest: string;
1992
+ }, {
1993
+ workset_digest: string;
1994
+ execution_request_digest: string;
1995
+ consumed_input_view_digest: string;
1996
+ task_key: string;
1997
+ workset_view_resource_id: string;
1998
+ workset_view_request_digest: string;
1999
+ }>, "many">;
2556
2000
  input_digest: z.ZodString;
2557
2001
  }, "strict", z.ZodTypeAny, {
2558
- protocol: "context.indexer.agent-step-input/v1";
2002
+ protocol: "context.indexer.agent-step-input/v2";
2559
2003
  input_digest: string;
2560
- run_request: {
2561
- protocol: "context.indexer.run-request/v2";
2562
- operation: "main-index";
2563
- workset: {
2004
+ transport: {
2005
+ protocol: "context.indexer.main-transport-batch/v2";
2006
+ worksets: ({
2564
2007
  source_ref: string;
2565
2008
  protocol: "context.indexer.main-workset/v2";
2566
2009
  requirement_ref: string;
@@ -2653,186 +2096,24 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2653
2096
  subject_key_schema_digest: string;
2654
2097
  query_digest: string;
2655
2098
  } | undefined;
2656
- };
2657
- execution_request_digest: string;
2658
- composition_input: {
2659
- protocol: "context.indexer.layer-composition-input/v1";
2660
- workset_digest: string;
2661
- final_authority_layer_ref: string;
2662
- accepted_fragments: {
2663
- kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
2664
- payload: {
2665
- protocol: "context.indexer.fragment.fact-enrichment/v1";
2666
- facts: {
2667
- value: import("./indexerRegistry.js").IndexerJson;
2668
- evidence_refs: {
2669
- ref: string;
2670
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2671
- source_digest: string;
2672
- }[];
2673
- target_ref: string;
2674
- fact_id: string;
2675
- }[];
2676
- } | {
2677
- protocol: "context.indexer.fragment.template-variables/v1";
2678
- variables: {
2679
- value: import("./indexerRegistry.js").IndexerJson;
2680
- evidence_refs: {
2681
- ref: string;
2682
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2683
- source_digest: string;
2684
- }[];
2685
- template_id: string;
2686
- target_ref: string;
2687
- variable_id: string;
2688
- }[];
2689
- } | {
2690
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
2691
- proposals: {
2692
- evidence_refs: {
2693
- ref: string;
2694
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2695
- source_digest: string;
2696
- }[];
2697
- composer_ref: string;
2698
- target_node_ref: string;
2699
- artifact: {
2700
- artifact_kind: string;
2701
- representation: "template";
2702
- template_id: string;
2703
- variables: Record<string, {
2704
- value: import("./indexerRegistry.js").IndexerJson;
2705
- evidence_refs: string[];
2706
- fact_refs: string[];
2707
- }>;
2708
- section_projections: {
2709
- section_key: string;
2710
- owner_indexer_id: string;
2711
- document_kind: string;
2712
- reader_goal: string;
2713
- artifact_kind: string;
2714
- }[];
2715
- artifact_id: string;
2716
- artifact_policy_variant: string;
2717
- } | {
2718
- artifact_kind: string;
2719
- representation: "sections";
2720
- artifact_id: string;
2721
- artifact_policy_variant: string;
2722
- sections: {
2723
- section_key: string;
2724
- owner_indexer_id: string;
2725
- document_kind: string;
2726
- reader_goal: string;
2727
- artifact_kind: string;
2728
- blocks: ({
2729
- block_id: string;
2730
- layer: "deterministic-block";
2731
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
2732
- fact_refs: string[];
2733
- } | {
2734
- evidence_refs: string[];
2735
- block_id: string;
2736
- layer: "semantic-prose";
2737
- markdown: string;
2738
- })[];
2739
- }[];
2740
- };
2741
- }[];
2742
- };
2743
- layer_ref: string;
2744
- layer_integrity: string;
2745
- phase: "pre-authority" | "post-author";
2746
- target_refs: string[];
2747
- fragment_digest: string;
2748
- payload_digest: string;
2749
- materialization_receipt: {
2750
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
2751
- layer_ref: string;
2752
- layer_integrity: string;
2753
- fragment_digest: string;
2754
- payload_digest: string;
2755
- validator_contract_digest: string;
2756
- composer_ref?: string | undefined;
2757
- };
2758
- composer_ref?: string | undefined;
2759
- }[];
2760
- rejected_fragment_diagnostics: {
2761
- code: string;
2762
- message: string;
2763
- fragment_digest?: string | undefined;
2764
- }[];
2765
- view_digest: string;
2766
- };
2767
- final_authority: {
2768
- integrity: string;
2769
- layer_ref: string;
2770
- bundle_digest: string;
2771
- config_fingerprint: string;
2772
- customization_fingerprint: string | null;
2773
- };
2774
- run_environment: {
2775
- protocol: "context.indexer.run-environment/v2";
2776
- source_role: string;
2777
- source_snapshot_digest: string;
2778
- source_dependency_fingerprint: string;
2779
- source_precedence_digest: string;
2780
- metric_set_digest: string;
2781
- dependency_view_digest: string | null;
2782
- primary_execution_projection: {
2783
- protocol: "context.indexer.primary-execution-projection/v1";
2784
- indexer_id: string;
2785
- program_digest: string | null;
2786
- profile_contract_digest: string;
2787
- primary_registry_projection_digest: string;
2788
- primary_execution_fingerprint: string;
2789
- primary_resource_binding_digest: string;
2790
- instructions_digest: string;
2791
- template_set_digest: string;
2792
- config_digest: string;
2793
- cli_contract_digest: string;
2794
- resources: {
2795
- ref: string;
2796
- kind: string;
2797
- digest: string;
2798
- layer_ref: string;
2799
- phase: "primary" | "pre-authority";
2800
- }[];
2801
- shared_artifact_fingerprint: {
2802
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
2803
- indexer_id: string;
2804
- implementation_fingerprint: string;
2805
- instructions_fingerprint: string;
2806
- template_fingerprint: string;
2807
- fingerprint_digest: string;
2808
- };
2809
- };
2810
- environment_digest: string;
2811
- };
2812
- partition_strategy_attempt: {
2813
- strategy_ref: {
2814
- kind: "project-indexer";
2815
- implementation_digest: string;
2816
- indexer_id: string;
2817
- strategy_id: string;
2818
- } | {
2819
- kind: "cli-builtin";
2820
- implementation_digest: string;
2821
- strategy_id: string;
2822
- };
2823
- strategy_digest: string;
2824
- strategy_order: number;
2825
- previous_attempt_digest: string | null;
2826
- } | null;
2099
+ })[];
2827
2100
  };
2101
+ stage: "partition" | "author";
2828
2102
  instruction_request_digest: string;
2103
+ tasks: {
2104
+ workset_digest: string;
2105
+ execution_request_digest: string;
2106
+ consumed_input_view_digest: string;
2107
+ task_key: string;
2108
+ workset_view_resource_id: string;
2109
+ workset_view_request_digest: string;
2110
+ }[];
2829
2111
  }, {
2830
- protocol: "context.indexer.agent-step-input/v1";
2112
+ protocol: "context.indexer.agent-step-input/v2";
2831
2113
  input_digest: string;
2832
- run_request: {
2833
- protocol: "context.indexer.run-request/v2";
2834
- operation: "main-index";
2835
- workset: {
2114
+ transport: {
2115
+ protocol: "context.indexer.main-transport-batch/v2";
2116
+ worksets: ({
2836
2117
  source_ref: string;
2837
2118
  protocol: "context.indexer.main-workset/v2";
2838
2119
  requirement_ref: string;
@@ -2925,184 +2206,83 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2925
2206
  subject_key_schema_digest: string;
2926
2207
  query_digest: string;
2927
2208
  } | undefined;
2928
- };
2929
- execution_request_digest: string;
2930
- composition_input: {
2931
- protocol: "context.indexer.layer-composition-input/v1";
2932
- workset_digest: string;
2933
- final_authority_layer_ref: string;
2934
- accepted_fragments: {
2935
- kind: "fact-enrichment" | "template-variables" | "derived-artifact-proposal";
2936
- payload: {
2937
- protocol: "context.indexer.fragment.fact-enrichment/v1";
2938
- facts: {
2939
- value: import("./indexerRegistry.js").IndexerJson;
2940
- evidence_refs: {
2941
- ref: string;
2942
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2943
- source_digest: string;
2944
- }[];
2945
- target_ref: string;
2946
- fact_id: string;
2947
- }[];
2948
- } | {
2949
- protocol: "context.indexer.fragment.template-variables/v1";
2950
- variables: {
2951
- value: import("./indexerRegistry.js").IndexerJson;
2952
- evidence_refs: {
2953
- ref: string;
2954
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2955
- source_digest: string;
2956
- }[];
2957
- template_id: string;
2958
- target_ref: string;
2959
- variable_id: string;
2960
- }[];
2961
- } | {
2962
- protocol: "context.indexer.fragment.derived-artifact-proposal/v1";
2963
- proposals: {
2964
- evidence_refs: {
2965
- ref: string;
2966
- kind: "code" | "contract" | "configuration" | "documentation" | "runbook" | "decision-record" | "test-result" | "runtime-observation" | "tool-snapshot";
2967
- source_digest: string;
2968
- }[];
2969
- composer_ref: string;
2970
- target_node_ref: string;
2971
- artifact: {
2972
- artifact_kind: string;
2973
- representation: "template";
2974
- template_id: string;
2975
- variables: Record<string, {
2976
- value: import("./indexerRegistry.js").IndexerJson;
2977
- evidence_refs: string[];
2978
- fact_refs: string[];
2979
- }>;
2980
- section_projections: {
2981
- section_key: string;
2982
- owner_indexer_id: string;
2983
- document_kind: string;
2984
- reader_goal: string;
2985
- artifact_kind: string;
2986
- }[];
2987
- artifact_id: string;
2988
- artifact_policy_variant: string;
2989
- } | {
2990
- artifact_kind: string;
2991
- representation: "sections";
2992
- artifact_id: string;
2993
- artifact_policy_variant: string;
2994
- sections: {
2995
- section_key: string;
2996
- owner_indexer_id: string;
2997
- document_kind: string;
2998
- reader_goal: string;
2999
- artifact_kind: string;
3000
- blocks: ({
3001
- block_id: string;
3002
- layer: "deterministic-block";
3003
- renderer: "bullet-list" | "key-value-table" | "json-code-block";
3004
- fact_refs: string[];
3005
- } | {
3006
- evidence_refs: string[];
3007
- block_id: string;
3008
- layer: "semantic-prose";
3009
- markdown: string;
3010
- })[];
3011
- }[];
3012
- };
3013
- }[];
3014
- };
3015
- layer_ref: string;
3016
- layer_integrity: string;
3017
- phase: "pre-authority" | "post-author";
3018
- target_refs: string[];
3019
- fragment_digest: string;
3020
- payload_digest: string;
3021
- materialization_receipt: {
3022
- protocol: "context.indexer.layer-fragment-materialization-receipt/v1";
3023
- layer_ref: string;
3024
- layer_integrity: string;
3025
- fragment_digest: string;
3026
- payload_digest: string;
3027
- validator_contract_digest: string;
3028
- composer_ref?: string | undefined;
3029
- };
3030
- composer_ref?: string | undefined;
3031
- }[];
3032
- rejected_fragment_diagnostics: {
3033
- code: string;
3034
- message: string;
3035
- fragment_digest?: string | undefined;
3036
- }[];
3037
- view_digest: string;
3038
- };
3039
- final_authority: {
3040
- integrity: string;
3041
- layer_ref: string;
3042
- bundle_digest: string;
3043
- config_fingerprint: string;
3044
- customization_fingerprint: string | null;
3045
- };
3046
- run_environment: {
3047
- protocol: "context.indexer.run-environment/v2";
3048
- source_role: string;
3049
- source_snapshot_digest: string;
3050
- source_dependency_fingerprint: string;
3051
- source_precedence_digest: string;
3052
- metric_set_digest: string;
3053
- dependency_view_digest: string | null;
3054
- primary_execution_projection: {
3055
- protocol: "context.indexer.primary-execution-projection/v1";
3056
- indexer_id: string;
3057
- program_digest: string | null;
3058
- profile_contract_digest: string;
3059
- primary_registry_projection_digest: string;
3060
- primary_execution_fingerprint: string;
3061
- primary_resource_binding_digest: string;
3062
- instructions_digest: string;
3063
- template_set_digest: string;
3064
- config_digest: string;
3065
- cli_contract_digest: string;
3066
- resources: {
3067
- ref: string;
3068
- kind: string;
3069
- digest: string;
3070
- layer_ref: string;
3071
- phase: "primary" | "pre-authority";
3072
- }[];
3073
- shared_artifact_fingerprint: {
3074
- protocol: "context.indexer.shared-artifact-fingerprint/v1";
3075
- indexer_id: string;
3076
- implementation_fingerprint: string;
3077
- instructions_fingerprint: string;
3078
- template_fingerprint: string;
3079
- fingerprint_digest: string;
3080
- };
3081
- };
3082
- environment_digest: string;
3083
- };
3084
- partition_strategy_attempt: {
3085
- strategy_ref: {
3086
- kind: "project-indexer";
3087
- implementation_digest: string;
3088
- indexer_id: string;
3089
- strategy_id: string;
3090
- } | {
3091
- kind: "cli-builtin";
3092
- implementation_digest: string;
3093
- strategy_id: string;
3094
- };
3095
- strategy_digest: string;
3096
- strategy_order: number;
3097
- previous_attempt_digest: string | null;
3098
- } | null;
2209
+ })[];
3099
2210
  };
2211
+ stage: "partition" | "author";
3100
2212
  instruction_request_digest: string;
3101
- }>;
3102
- export type IndexerAgentStepInput = z.infer<typeof indexerAgentStepInputSchema>;
3103
- export declare function indexerAgentStepInputDigest(value: Omit<IndexerAgentStepInput, "input_digest">): string;
2213
+ tasks: {
2214
+ workset_digest: string;
2215
+ execution_request_digest: string;
2216
+ consumed_input_view_digest: string;
2217
+ task_key: string;
2218
+ workset_view_resource_id: string;
2219
+ workset_view_request_digest: string;
2220
+ }[];
2221
+ }>, z.ZodObject<{
2222
+ protocol: z.ZodLiteral<"context.indexer.agent-step-input/v2">;
2223
+ stage: z.ZodLiteral<"post-author">;
2224
+ instruction_request_digest: z.ZodString;
2225
+ tasks: z.ZodArray<z.ZodObject<{
2226
+ task_key: z.ZodString;
2227
+ workset_digest: z.ZodString;
2228
+ request_digest: z.ZodString;
2229
+ primary_result_view_digest: z.ZodString;
2230
+ workset_view_resource_id: z.ZodString;
2231
+ }, "strict", z.ZodTypeAny, {
2232
+ workset_digest: string;
2233
+ request_digest: string;
2234
+ primary_result_view_digest: string;
2235
+ task_key: string;
2236
+ workset_view_resource_id: string;
2237
+ }, {
2238
+ workset_digest: string;
2239
+ request_digest: string;
2240
+ primary_result_view_digest: string;
2241
+ task_key: string;
2242
+ workset_view_resource_id: string;
2243
+ }>, "many">;
2244
+ input_digest: z.ZodString;
2245
+ }, "strict", z.ZodTypeAny, {
2246
+ protocol: "context.indexer.agent-step-input/v2";
2247
+ input_digest: string;
2248
+ stage: "post-author";
2249
+ instruction_request_digest: string;
2250
+ tasks: {
2251
+ workset_digest: string;
2252
+ request_digest: string;
2253
+ primary_result_view_digest: string;
2254
+ task_key: string;
2255
+ workset_view_resource_id: string;
2256
+ }[];
2257
+ }, {
2258
+ protocol: "context.indexer.agent-step-input/v2";
2259
+ input_digest: string;
2260
+ stage: "post-author";
2261
+ instruction_request_digest: string;
2262
+ tasks: {
2263
+ workset_digest: string;
2264
+ request_digest: string;
2265
+ primary_result_view_digest: string;
2266
+ task_key: string;
2267
+ workset_view_resource_id: string;
2268
+ }[];
2269
+ }>]>;
2270
+ export type IndexerMainAgentStepInput = z.infer<typeof indexerMainAgentStepInputSchema>;
2271
+ export type IndexerPostAuthorAgentStepInput = z.infer<typeof indexerPostAuthorAgentStepInputSchema>;
2272
+ export type IndexerAgentStepInput = IndexerMainAgentStepInput | IndexerPostAuthorAgentStepInput;
2273
+ export declare function indexerAgentStepInputDigest(value: Omit<IndexerAgentStepInput, "input_digest"> | IndexerAgentStepInput): string;
3104
2274
  export declare function buildIndexerAgentStepInput(input: {
3105
- run_request: unknown;
2275
+ run_requests: readonly unknown[];
2276
+ instruction_request_digest: string;
2277
+ workset_view_requests: readonly {
2278
+ resource_id: string;
2279
+ workset_digest: string;
2280
+ request_digest: string;
2281
+ }[];
2282
+ }): IndexerMainAgentStepInput;
2283
+ export declare function buildIndexerPostAuthorAgentStepInput(input: {
2284
+ fragment_requests: readonly IndexerPostAuthorFragmentRequest[];
3106
2285
  instruction_request_digest: string;
3107
- }): IndexerAgentStepInput;
2286
+ }): IndexerPostAuthorAgentStepInput;
3108
2287
  export declare function validateIndexerAgentStepInput(value: unknown): IndexerAgentStepInput;
2288
+ export {};