@c4a/context 0.7.4 → 0.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +17 -8
  2. package/README.zh-CN.md +15 -8
  3. package/docs/README.md +13 -1
  4. package/docs/README.zh-CN.md +13 -1
  5. package/docs/getting-started.md +95 -69
  6. package/docs/guides/agent-dialogue.md +19 -9
  7. package/docs/guides/agent-guide.md +52 -10
  8. package/docs/guides/code-indexer-skill-authoring.md +50 -5
  9. package/docs/guides/indexer-manifest-example.md +103 -0
  10. package/docs/guides/indexer-provider-and-customization.md +307 -31
  11. package/docs/guides/indexer-skill-creation.md +99 -0
  12. package/docs/guides/knowledge-updates.md +324 -0
  13. package/docs/guides/lark-resources.md +5 -1
  14. package/docs/guides/markdown-indexer-skill-authoring.md +25 -7
  15. package/docs/guides/note.md +37 -0
  16. package/docs/guides/package-outputs.md +22 -17
  17. package/docs/guides/sessions.md +50 -0
  18. package/docs/guides/workspace-commit.md +45 -0
  19. package/docs/guides/workspace-prepare.md +72 -0
  20. package/docs/guides/workspace-restore.md +59 -0
  21. package/docs/reference/code-extractors.md +23 -11
  22. package/docs/reference/indexer-provider-protocol.md +116 -22
  23. package/docs/reference/package-templates.md +10 -9
  24. package/docs/reference/project-api.md +47 -13
  25. package/docs/reference/template-variables.md +7 -7
  26. package/index.d.ts +11 -0
  27. package/index.js +1819 -584
  28. package/indexerAgentStepProtocol.d.ts +1284 -2060
  29. package/indexerApprovedKnowledge.d.ts +371 -0
  30. package/indexerArticlePlan.d.ts +83 -0
  31. package/indexerArtifact.d.ts +10 -7
  32. package/indexerArtifactDependencies.d.ts +7 -5
  33. package/indexerArtifactPolicy.d.ts +16 -16
  34. package/indexerArtifactResult.d.ts +76 -69
  35. package/indexerAuthoringFixture.d.ts +8 -8
  36. package/indexerAuthorizedWorksetView.d.ts +14 -14
  37. package/indexerBaseQuestionAmendment.d.ts +40 -0
  38. package/indexerCandidateCompile.d.ts +46 -36
  39. package/indexerCatalogFallback.d.ts +566 -48
  40. package/indexerCompositionFactDependencies.d.ts +16 -0
  41. package/indexerContentLayers.d.ts +6 -4
  42. package/indexerContractDeclaration.d.ts +3 -0
  43. package/indexerControlledProgram.d.ts +1039 -238
  44. package/indexerCustomizationDraft.d.ts +188 -0
  45. package/indexerDependencyView.d.ts +17 -17
  46. package/indexerEffectiveArtifact.d.ts +26 -15
  47. package/indexerExampleFactDependencies.d.ts +17 -0
  48. package/indexerExampleIdentityAudit.d.ts +2 -2
  49. package/indexerInventoryDisposition.d.ts +44 -44
  50. package/indexerKnowledgeDependency.d.ts +46 -0
  51. package/indexerLayerComposition.d.ts +92 -54
  52. package/indexerLayoutChange.d.ts +8 -8
  53. package/indexerLayoutProposalSet.d.ts +15 -10
  54. package/indexerLayoutResolver.d.ts +15 -6
  55. package/indexerLayoutTransition.d.ts +8 -8
  56. package/indexerLifecycle.d.ts +1 -1
  57. package/indexerMainRunLedger.d.ts +7 -0
  58. package/indexerMainRunProtocol.d.ts +872 -196
  59. package/indexerMainWorkset.d.ts +50 -0
  60. package/indexerNavigationArtifactPlan.d.ts +2 -2
  61. package/indexerOverlayQuestionAmendment.d.ts +56 -16
  62. package/indexerOverlayQuestionApplyProposal.d.ts +98 -26
  63. package/indexerPartitionPlan.d.ts +585 -40
  64. package/indexerPhysicalArtifactAudit.d.ts +2 -2
  65. package/indexerPhysicalArtifactManifest.d.ts +24 -24
  66. package/indexerPostAuthorRunLedger.d.ts +60 -34
  67. package/indexerPrimaryProjection.d.ts +2 -2
  68. package/indexerProfileContract.d.ts +28 -28
  69. package/indexerProgramRunProtocol.d.ts +868 -194
  70. package/indexerProjectProposal.d.ts +36 -8
  71. package/indexerProjectedArtifactFanOutAudit.d.ts +2 -2
  72. package/indexerProvider.d.ts +72 -28
  73. package/indexerProviderComposition.d.ts +4 -4
  74. package/indexerProviderRouting.d.ts +52 -0
  75. package/indexerProviderSelectionProposal.d.ts +48 -0
  76. package/indexerPublicContractFacts.d.ts +7 -0
  77. package/indexerPublicContractTable.d.ts +11 -0
  78. package/indexerReaderTargetInventory.d.ts +6 -6
  79. package/indexerReferenceOnlyAudit.d.ts +2 -2
  80. package/indexerRegistry.d.ts +52 -0
  81. package/indexerRequirementConfirmation.d.ts +48 -16
  82. package/indexerRequirementLifecycle.d.ts +154 -42
  83. package/indexerResultReconciliation.d.ts +12 -11
  84. package/indexerSemanticInput.d.ts +28014 -1847
  85. package/{indexerGeneratedAuthoringAudit.d.ts → indexerStructuredClaims.d.ts} +0 -84
  86. package/indexerStructuredDeclaration.d.ts +8 -8
  87. package/indexerTemplateRendering.d.ts +7 -7
  88. package/indexerToolSnapshot.d.ts +16 -16
  89. package/managedSources.d.ts +15 -0
  90. package/package.json +1 -1
  91. package/phases.d.ts +0 -3
  92. package/processedScopes.d.ts +75 -0
  93. package/readingStructure.d.ts +188 -0
  94. package/sessionMetadata.d.ts +49 -0
  95. package/sources.d.ts +9 -3
  96. package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +15 -10
  97. package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +8 -8
@@ -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">;
@@ -47,16 +48,19 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
47
48
  repair_intent: z.ZodOptional<z.ZodObject<{
48
49
  target_ref: z.ZodString;
49
50
  instruction: z.ZodString;
51
+ current_markdown: z.ZodOptional<z.ZodString>;
50
52
  } & {
51
53
  intent_digest: z.ZodString;
52
54
  }, "strict", z.ZodTypeAny, {
53
55
  target_ref: string;
54
56
  instruction: string;
55
57
  intent_digest: string;
58
+ current_markdown?: string | undefined;
56
59
  }, {
57
60
  target_ref: string;
58
61
  instruction: string;
59
62
  intent_digest: string;
63
+ current_markdown?: string | undefined;
60
64
  }>>;
61
65
  }, "strict", z.ZodTypeAny, {
62
66
  source_ref: string;
@@ -92,6 +96,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
92
96
  target_ref: string;
93
97
  instruction: string;
94
98
  intent_digest: string;
99
+ current_markdown?: string | undefined;
95
100
  } | undefined;
96
101
  }, {
97
102
  source_ref: string;
@@ -127,6 +132,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
127
132
  target_ref: string;
128
133
  instruction: string;
129
134
  intent_digest: string;
135
+ current_markdown?: string | undefined;
130
136
  } | undefined;
131
137
  }>, {
132
138
  source_ref: string;
@@ -162,6 +168,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
162
168
  target_ref: string;
163
169
  instruction: string;
164
170
  intent_digest: string;
171
+ current_markdown?: string | undefined;
165
172
  } | undefined;
166
173
  }, {
167
174
  source_ref: string;
@@ -197,6 +204,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
197
204
  target_ref: string;
198
205
  instruction: string;
199
206
  intent_digest: string;
207
+ current_markdown?: string | undefined;
200
208
  } | undefined;
201
209
  }>, z.ZodEffects<z.ZodObject<{
202
210
  stage: z.ZodLiteral<"author">;
@@ -402,16 +410,19 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
402
410
  repair_intent: z.ZodOptional<z.ZodObject<{
403
411
  target_ref: z.ZodString;
404
412
  instruction: z.ZodString;
413
+ current_markdown: z.ZodOptional<z.ZodString>;
405
414
  } & {
406
415
  intent_digest: z.ZodString;
407
416
  }, "strict", z.ZodTypeAny, {
408
417
  target_ref: string;
409
418
  instruction: string;
410
419
  intent_digest: string;
420
+ current_markdown?: string | undefined;
411
421
  }, {
412
422
  target_ref: string;
413
423
  instruction: string;
414
424
  intent_digest: string;
425
+ current_markdown?: string | undefined;
415
426
  }>>;
416
427
  }, "strict", z.ZodTypeAny, {
417
428
  source_ref: string;
@@ -445,6 +456,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
445
456
  target_ref: string;
446
457
  instruction: string;
447
458
  intent_digest: string;
459
+ current_markdown?: string | undefined;
448
460
  } | undefined;
449
461
  target_resolution_view?: {
450
462
  entries: ({
@@ -503,6 +515,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
503
515
  target_ref: string;
504
516
  instruction: string;
505
517
  intent_digest: string;
518
+ current_markdown?: string | undefined;
506
519
  } | undefined;
507
520
  target_resolution_view?: {
508
521
  entries: ({
@@ -561,6 +574,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
561
574
  target_ref: string;
562
575
  instruction: string;
563
576
  intent_digest: string;
577
+ current_markdown?: string | undefined;
564
578
  } | undefined;
565
579
  target_resolution_view?: {
566
580
  entries: ({
@@ -619,6 +633,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
619
633
  target_ref: string;
620
634
  instruction: string;
621
635
  intent_digest: string;
636
+ current_markdown?: string | undefined;
622
637
  } | undefined;
623
638
  target_resolution_view?: {
624
639
  entries: ({
@@ -645,1382 +660,1166 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
645
660
  subject_key_schema_digest: string;
646
661
  query_digest: string;
647
662
  } | undefined;
648
- }>]>;
649
- composition_input: z.ZodObject<{
650
- protocol: z.ZodLiteral<"context.indexer.layer-composition-input/v1">;
663
+ }>]>, "many">;
664
+ }, "strict", z.ZodTypeAny, {
665
+ protocol: "context.indexer.main-transport-batch/v2";
666
+ worksets: ({
667
+ source_ref: string;
668
+ protocol: "context.indexer.main-workset/v2";
669
+ requirement_ref: string;
670
+ workset_digest: string;
671
+ module_ref: string | null;
672
+ operation: "main-index";
673
+ indexer_id: string;
674
+ profile_contract_digest: string;
675
+ reader_question_refs: string[];
676
+ subject_key_schema_digest: string;
677
+ stage: "partition";
678
+ partition_subject_key: {
679
+ kind: string;
680
+ namespace: string;
681
+ protocol: "context.subject-key/v1";
682
+ local_key: string;
683
+ };
684
+ strategy_set_digest: string;
685
+ partition_input_digests: string[];
686
+ partition_inventory_digest: string;
687
+ allowed_question_target_refs: string[];
688
+ owner_cell_refs: string[];
689
+ primary_registry_projection_digest: string;
690
+ requirement_set_digest: string;
691
+ primary_execution_fingerprint: string;
692
+ source_scope_digest: string;
693
+ source_binding_digest: string;
694
+ primary_resource_binding_digest: string;
695
+ question_target_inventory_digest: string;
696
+ repair_intent?: {
697
+ target_ref: string;
698
+ instruction: string;
699
+ intent_digest: string;
700
+ current_markdown?: string | undefined;
701
+ } | undefined;
702
+ } | {
703
+ source_ref: string;
704
+ protocol: "context.indexer.main-workset/v2";
705
+ requirement_ref: string;
706
+ workset_digest: string;
707
+ module_ref: string | null;
708
+ operation: "main-index";
709
+ indexer_id: string;
710
+ profile_contract_digest: string;
711
+ logical_unit_ref: string;
712
+ subject_key_schema_digest: string;
713
+ stage: "author";
714
+ owner_cell_refs: string[];
715
+ primary_registry_projection_digest: string;
716
+ requirement_set_digest: string;
717
+ primary_execution_fingerprint: string;
718
+ source_scope_digest: string;
719
+ source_binding_digest: string;
720
+ primary_resource_binding_digest: string;
721
+ question_target_inventory_digest: string;
722
+ partition_plan_binding_digest: string;
723
+ group_key: string;
724
+ member_ids_digest: string;
725
+ member_inventory_digest: string;
726
+ group_projection_digest: string;
727
+ group_dependency_view_digest: string;
728
+ allowed_artifact_policy_variants: string[];
729
+ artifact_policy_eligibility_digest: string;
730
+ repair_intent?: {
731
+ target_ref: string;
732
+ instruction: string;
733
+ intent_digest: string;
734
+ current_markdown?: string | undefined;
735
+ } | undefined;
736
+ target_resolution_view?: {
737
+ entries: ({
738
+ subject_key: {
739
+ kind: string;
740
+ namespace: string;
741
+ protocol: "context.subject-key/v1";
742
+ local_key: string;
743
+ };
744
+ state: "resolved";
745
+ query_ref: string;
746
+ node_ref: string;
747
+ } | {
748
+ state: "absent";
749
+ query_ref: string;
750
+ } | {
751
+ state: "ambiguous";
752
+ query_ref: string;
753
+ conflicting_node_refs: string[];
754
+ })[];
755
+ protocol: "context.indexer.target-resolution-view/v1";
756
+ requirement_ref: string;
757
+ view_digest: string;
758
+ subject_key_schema_digest: string;
759
+ query_digest: string;
760
+ } | undefined;
761
+ })[];
762
+ }, {
763
+ protocol: "context.indexer.main-transport-batch/v2";
764
+ worksets: ({
765
+ source_ref: string;
766
+ protocol: "context.indexer.main-workset/v2";
767
+ requirement_ref: string;
768
+ workset_digest: string;
769
+ module_ref: string | null;
770
+ operation: "main-index";
771
+ indexer_id: string;
772
+ profile_contract_digest: string;
773
+ reader_question_refs: string[];
774
+ subject_key_schema_digest: string;
775
+ stage: "partition";
776
+ partition_subject_key: {
777
+ kind: string;
778
+ namespace: string;
779
+ protocol: "context.subject-key/v1";
780
+ local_key: string;
781
+ };
782
+ strategy_set_digest: string;
783
+ partition_input_digests: string[];
784
+ partition_inventory_digest: string;
785
+ allowed_question_target_refs: string[];
786
+ owner_cell_refs: string[];
787
+ primary_registry_projection_digest: string;
788
+ requirement_set_digest: string;
789
+ primary_execution_fingerprint: string;
790
+ source_scope_digest: string;
791
+ source_binding_digest: string;
792
+ primary_resource_binding_digest: string;
793
+ question_target_inventory_digest: string;
794
+ repair_intent?: {
795
+ target_ref: string;
796
+ instruction: string;
797
+ intent_digest: string;
798
+ current_markdown?: string | undefined;
799
+ } | undefined;
800
+ } | {
801
+ source_ref: string;
802
+ protocol: "context.indexer.main-workset/v2";
803
+ requirement_ref: string;
804
+ workset_digest: string;
805
+ module_ref: string | null;
806
+ operation: "main-index";
807
+ indexer_id: string;
808
+ profile_contract_digest: string;
809
+ logical_unit_ref: string;
810
+ subject_key_schema_digest: string;
811
+ stage: "author";
812
+ owner_cell_refs: string[];
813
+ primary_registry_projection_digest: string;
814
+ requirement_set_digest: string;
815
+ primary_execution_fingerprint: string;
816
+ source_scope_digest: string;
817
+ source_binding_digest: string;
818
+ primary_resource_binding_digest: string;
819
+ question_target_inventory_digest: string;
820
+ partition_plan_binding_digest: string;
821
+ group_key: string;
822
+ member_ids_digest: string;
823
+ member_inventory_digest: string;
824
+ group_projection_digest: string;
825
+ group_dependency_view_digest: string;
826
+ allowed_artifact_policy_variants: string[];
827
+ artifact_policy_eligibility_digest: string;
828
+ repair_intent?: {
829
+ target_ref: string;
830
+ instruction: string;
831
+ intent_digest: string;
832
+ current_markdown?: string | undefined;
833
+ } | undefined;
834
+ target_resolution_view?: {
835
+ entries: ({
836
+ subject_key: {
837
+ kind: string;
838
+ namespace: string;
839
+ protocol: "context.subject-key/v1";
840
+ local_key: string;
841
+ };
842
+ state: "resolved";
843
+ query_ref: string;
844
+ node_ref: string;
845
+ } | {
846
+ state: "absent";
847
+ query_ref: string;
848
+ } | {
849
+ state: "ambiguous";
850
+ query_ref: string;
851
+ conflicting_node_refs: string[];
852
+ })[];
853
+ protocol: "context.indexer.target-resolution-view/v1";
854
+ requirement_ref: string;
855
+ view_digest: string;
856
+ subject_key_schema_digest: string;
857
+ query_digest: string;
858
+ } | undefined;
859
+ })[];
860
+ }>;
861
+ instruction_request_digest: z.ZodString;
862
+ tasks: z.ZodArray<z.ZodObject<{
863
+ task_key: z.ZodString;
864
+ workset_digest: z.ZodString;
865
+ execution_request_digest: z.ZodString;
866
+ consumed_input_view_digest: z.ZodString;
867
+ workset_view_resource_id: z.ZodString;
868
+ workset_view_request_digest: z.ZodString;
869
+ }, "strict", z.ZodTypeAny, {
870
+ workset_digest: string;
871
+ execution_request_digest: string;
872
+ consumed_input_view_digest: string;
873
+ task_key: string;
874
+ workset_view_resource_id: string;
875
+ workset_view_request_digest: string;
876
+ }, {
877
+ workset_digest: string;
878
+ execution_request_digest: string;
879
+ consumed_input_view_digest: string;
880
+ task_key: string;
881
+ workset_view_resource_id: string;
882
+ workset_view_request_digest: string;
883
+ }>, "many">;
884
+ input_digest: z.ZodString;
885
+ }, "strict", z.ZodTypeAny, {
886
+ protocol: "context.indexer.agent-step-input/v2";
887
+ input_digest: string;
888
+ transport: {
889
+ protocol: "context.indexer.main-transport-batch/v2";
890
+ worksets: ({
891
+ source_ref: string;
892
+ protocol: "context.indexer.main-workset/v2";
893
+ requirement_ref: string;
894
+ workset_digest: string;
895
+ module_ref: string | null;
896
+ operation: "main-index";
897
+ indexer_id: string;
898
+ profile_contract_digest: string;
899
+ reader_question_refs: string[];
900
+ subject_key_schema_digest: string;
901
+ stage: "partition";
902
+ partition_subject_key: {
903
+ kind: string;
904
+ namespace: string;
905
+ protocol: "context.subject-key/v1";
906
+ local_key: string;
907
+ };
908
+ strategy_set_digest: string;
909
+ partition_input_digests: string[];
910
+ partition_inventory_digest: string;
911
+ allowed_question_target_refs: string[];
912
+ owner_cell_refs: string[];
913
+ primary_registry_projection_digest: string;
914
+ requirement_set_digest: string;
915
+ primary_execution_fingerprint: string;
916
+ source_scope_digest: string;
917
+ source_binding_digest: string;
918
+ primary_resource_binding_digest: string;
919
+ question_target_inventory_digest: string;
920
+ repair_intent?: {
921
+ target_ref: string;
922
+ instruction: string;
923
+ intent_digest: string;
924
+ current_markdown?: string | undefined;
925
+ } | undefined;
926
+ } | {
927
+ source_ref: string;
928
+ protocol: "context.indexer.main-workset/v2";
929
+ requirement_ref: string;
930
+ workset_digest: string;
931
+ module_ref: string | null;
932
+ operation: "main-index";
933
+ indexer_id: string;
934
+ profile_contract_digest: string;
935
+ logical_unit_ref: string;
936
+ subject_key_schema_digest: string;
937
+ stage: "author";
938
+ owner_cell_refs: string[];
939
+ primary_registry_projection_digest: string;
940
+ requirement_set_digest: string;
941
+ primary_execution_fingerprint: string;
942
+ source_scope_digest: string;
943
+ source_binding_digest: string;
944
+ primary_resource_binding_digest: string;
945
+ question_target_inventory_digest: string;
946
+ partition_plan_binding_digest: string;
947
+ group_key: string;
948
+ member_ids_digest: string;
949
+ member_inventory_digest: string;
950
+ group_projection_digest: string;
951
+ group_dependency_view_digest: string;
952
+ allowed_artifact_policy_variants: string[];
953
+ artifact_policy_eligibility_digest: string;
954
+ repair_intent?: {
955
+ target_ref: string;
956
+ instruction: string;
957
+ intent_digest: string;
958
+ current_markdown?: string | undefined;
959
+ } | undefined;
960
+ target_resolution_view?: {
961
+ entries: ({
962
+ subject_key: {
963
+ kind: string;
964
+ namespace: string;
965
+ protocol: "context.subject-key/v1";
966
+ local_key: string;
967
+ };
968
+ state: "resolved";
969
+ query_ref: string;
970
+ node_ref: string;
971
+ } | {
972
+ state: "absent";
973
+ query_ref: string;
974
+ } | {
975
+ state: "ambiguous";
976
+ query_ref: string;
977
+ conflicting_node_refs: string[];
978
+ })[];
979
+ protocol: "context.indexer.target-resolution-view/v1";
980
+ requirement_ref: string;
981
+ view_digest: string;
982
+ subject_key_schema_digest: string;
983
+ query_digest: string;
984
+ } | undefined;
985
+ })[];
986
+ };
987
+ stage: "partition" | "author";
988
+ instruction_request_digest: string;
989
+ tasks: {
990
+ workset_digest: string;
991
+ execution_request_digest: string;
992
+ consumed_input_view_digest: string;
993
+ task_key: string;
994
+ workset_view_resource_id: string;
995
+ workset_view_request_digest: string;
996
+ }[];
997
+ }, {
998
+ protocol: "context.indexer.agent-step-input/v2";
999
+ input_digest: string;
1000
+ transport: {
1001
+ protocol: "context.indexer.main-transport-batch/v2";
1002
+ worksets: ({
1003
+ source_ref: string;
1004
+ protocol: "context.indexer.main-workset/v2";
1005
+ requirement_ref: string;
1006
+ workset_digest: string;
1007
+ module_ref: string | null;
1008
+ operation: "main-index";
1009
+ indexer_id: string;
1010
+ profile_contract_digest: string;
1011
+ reader_question_refs: string[];
1012
+ subject_key_schema_digest: string;
1013
+ stage: "partition";
1014
+ partition_subject_key: {
1015
+ kind: string;
1016
+ namespace: string;
1017
+ protocol: "context.subject-key/v1";
1018
+ local_key: string;
1019
+ };
1020
+ strategy_set_digest: string;
1021
+ partition_input_digests: string[];
1022
+ partition_inventory_digest: string;
1023
+ allowed_question_target_refs: string[];
1024
+ owner_cell_refs: string[];
1025
+ primary_registry_projection_digest: string;
1026
+ requirement_set_digest: string;
1027
+ primary_execution_fingerprint: string;
1028
+ source_scope_digest: string;
1029
+ source_binding_digest: string;
1030
+ primary_resource_binding_digest: string;
1031
+ question_target_inventory_digest: string;
1032
+ repair_intent?: {
1033
+ target_ref: string;
1034
+ instruction: string;
1035
+ intent_digest: string;
1036
+ current_markdown?: string | undefined;
1037
+ } | undefined;
1038
+ } | {
1039
+ source_ref: string;
1040
+ protocol: "context.indexer.main-workset/v2";
1041
+ requirement_ref: string;
1042
+ workset_digest: string;
1043
+ module_ref: string | null;
1044
+ operation: "main-index";
1045
+ indexer_id: string;
1046
+ profile_contract_digest: string;
1047
+ logical_unit_ref: string;
1048
+ subject_key_schema_digest: string;
1049
+ stage: "author";
1050
+ owner_cell_refs: string[];
1051
+ primary_registry_projection_digest: string;
1052
+ requirement_set_digest: string;
1053
+ primary_execution_fingerprint: string;
1054
+ source_scope_digest: string;
1055
+ source_binding_digest: string;
1056
+ primary_resource_binding_digest: string;
1057
+ question_target_inventory_digest: string;
1058
+ partition_plan_binding_digest: string;
1059
+ group_key: string;
1060
+ member_ids_digest: string;
1061
+ member_inventory_digest: string;
1062
+ group_projection_digest: string;
1063
+ group_dependency_view_digest: string;
1064
+ allowed_artifact_policy_variants: string[];
1065
+ artifact_policy_eligibility_digest: string;
1066
+ repair_intent?: {
1067
+ target_ref: string;
1068
+ instruction: string;
1069
+ intent_digest: string;
1070
+ current_markdown?: string | undefined;
1071
+ } | undefined;
1072
+ target_resolution_view?: {
1073
+ entries: ({
1074
+ subject_key: {
1075
+ kind: string;
1076
+ namespace: string;
1077
+ protocol: "context.subject-key/v1";
1078
+ local_key: string;
1079
+ };
1080
+ state: "resolved";
1081
+ query_ref: string;
1082
+ node_ref: string;
1083
+ } | {
1084
+ state: "absent";
1085
+ query_ref: string;
1086
+ } | {
1087
+ state: "ambiguous";
1088
+ query_ref: string;
1089
+ conflicting_node_refs: string[];
1090
+ })[];
1091
+ protocol: "context.indexer.target-resolution-view/v1";
1092
+ requirement_ref: string;
1093
+ view_digest: string;
1094
+ subject_key_schema_digest: string;
1095
+ query_digest: string;
1096
+ } | undefined;
1097
+ })[];
1098
+ };
1099
+ stage: "partition" | "author";
1100
+ instruction_request_digest: string;
1101
+ tasks: {
1102
+ workset_digest: string;
1103
+ execution_request_digest: string;
1104
+ consumed_input_view_digest: string;
1105
+ task_key: string;
1106
+ workset_view_resource_id: string;
1107
+ workset_view_request_digest: string;
1108
+ }[];
1109
+ }>;
1110
+ declare const indexerPostAuthorAgentStepInputSchema: z.ZodObject<{
1111
+ protocol: z.ZodLiteral<"context.indexer.agent-step-input/v2">;
1112
+ stage: z.ZodLiteral<"post-author">;
1113
+ instruction_request_digest: z.ZodString;
1114
+ tasks: z.ZodArray<z.ZodObject<{
1115
+ task_key: z.ZodString;
1116
+ workset_digest: z.ZodString;
1117
+ request_digest: z.ZodString;
1118
+ primary_result_view_digest: z.ZodString;
1119
+ workset_view_resource_id: z.ZodString;
1120
+ }, "strict", z.ZodTypeAny, {
1121
+ workset_digest: string;
1122
+ request_digest: string;
1123
+ primary_result_view_digest: string;
1124
+ task_key: string;
1125
+ workset_view_resource_id: string;
1126
+ }, {
1127
+ workset_digest: string;
1128
+ request_digest: string;
1129
+ primary_result_view_digest: string;
1130
+ task_key: string;
1131
+ workset_view_resource_id: string;
1132
+ }>, "many">;
1133
+ input_digest: z.ZodString;
1134
+ }, "strict", z.ZodTypeAny, {
1135
+ protocol: "context.indexer.agent-step-input/v2";
1136
+ input_digest: string;
1137
+ stage: "post-author";
1138
+ instruction_request_digest: string;
1139
+ tasks: {
1140
+ workset_digest: string;
1141
+ request_digest: string;
1142
+ primary_result_view_digest: string;
1143
+ task_key: string;
1144
+ workset_view_resource_id: string;
1145
+ }[];
1146
+ }, {
1147
+ protocol: "context.indexer.agent-step-input/v2";
1148
+ input_digest: string;
1149
+ stage: "post-author";
1150
+ instruction_request_digest: string;
1151
+ tasks: {
1152
+ workset_digest: string;
1153
+ request_digest: string;
1154
+ primary_result_view_digest: string;
1155
+ task_key: string;
1156
+ workset_view_resource_id: string;
1157
+ }[];
1158
+ }>;
1159
+ export declare const indexerAgentStepInputSchema: z.ZodDiscriminatedUnion<"stage", [z.ZodObject<{
1160
+ protocol: z.ZodLiteral<"context.indexer.agent-step-input/v2">;
1161
+ stage: z.ZodEnum<["partition", "author"]>;
1162
+ transport: z.ZodObject<{
1163
+ protocol: z.ZodLiteral<"context.indexer.main-transport-batch/v2">;
1164
+ worksets: z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
1165
+ stage: z.ZodLiteral<"partition">;
1166
+ partition_subject_key: z.ZodObject<{
1167
+ protocol: z.ZodLiteral<"context.subject-key/v1">;
1168
+ namespace: z.ZodEffects<z.ZodString, string, string>;
1169
+ kind: z.ZodEffects<z.ZodString, string, string>;
1170
+ local_key: z.ZodEffects<z.ZodString, string, string>;
1171
+ }, "strict", z.ZodTypeAny, {
1172
+ kind: string;
1173
+ namespace: string;
1174
+ protocol: "context.subject-key/v1";
1175
+ local_key: string;
1176
+ }, {
1177
+ kind: string;
1178
+ namespace: string;
1179
+ protocol: "context.subject-key/v1";
1180
+ local_key: string;
1181
+ }>;
1182
+ strategy_set_digest: z.ZodString;
1183
+ reader_question_refs: z.ZodArray<z.ZodString, "many">;
1184
+ partition_input_digests: z.ZodArray<z.ZodString, "many">;
1185
+ partition_inventory_digest: z.ZodString;
1186
+ allowed_question_target_refs: z.ZodArray<z.ZodString, "many">;
1187
+ protocol: z.ZodLiteral<"context.indexer.main-workset/v2">;
651
1188
  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
- }[]>;
1189
+ operation: z.ZodLiteral<"main-index">;
1190
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
1191
+ requirement_ref: z.ZodString;
1192
+ owner_cell_refs: z.ZodArray<z.ZodString, "many">;
1193
+ source_ref: z.ZodString;
1194
+ module_ref: z.ZodNullable<z.ZodString>;
1195
+ primary_registry_projection_digest: z.ZodString;
1196
+ requirement_set_digest: z.ZodString;
1197
+ primary_execution_fingerprint: z.ZodString;
1198
+ profile_contract_digest: z.ZodString;
1199
+ subject_key_schema_digest: z.ZodString;
1200
+ source_scope_digest: z.ZodString;
1201
+ source_binding_digest: z.ZodString;
1202
+ primary_resource_binding_digest: z.ZodString;
1203
+ question_target_inventory_digest: z.ZodString;
1204
+ repair_intent: z.ZodOptional<z.ZodObject<{
1205
+ target_ref: z.ZodString;
1206
+ instruction: z.ZodString;
1207
+ current_markdown: z.ZodOptional<z.ZodString>;
1208
+ } & {
1209
+ intent_digest: z.ZodString;
1210
+ }, "strict", z.ZodTypeAny, {
1211
+ target_ref: string;
1212
+ instruction: string;
1213
+ intent_digest: string;
1214
+ current_markdown?: string | undefined;
1215
+ }, {
1216
+ target_ref: string;
1217
+ instruction: string;
1218
+ intent_digest: string;
1219
+ current_markdown?: string | undefined;
1220
+ }>>;
1221
+ }, "strict", z.ZodTypeAny, {
1222
+ source_ref: string;
1223
+ protocol: "context.indexer.main-workset/v2";
1224
+ requirement_ref: string;
1225
+ workset_digest: string;
1226
+ module_ref: string | null;
1227
+ operation: "main-index";
1228
+ indexer_id: string;
1229
+ profile_contract_digest: string;
1230
+ reader_question_refs: string[];
1231
+ subject_key_schema_digest: string;
1232
+ stage: "partition";
1233
+ partition_subject_key: {
1234
+ kind: string;
1235
+ namespace: string;
1236
+ protocol: "context.subject-key/v1";
1237
+ local_key: string;
1238
+ };
1239
+ strategy_set_digest: string;
1240
+ partition_input_digests: string[];
1241
+ partition_inventory_digest: string;
1242
+ allowed_question_target_refs: string[];
1243
+ owner_cell_refs: string[];
1244
+ primary_registry_projection_digest: string;
1245
+ requirement_set_digest: string;
1246
+ primary_execution_fingerprint: string;
1247
+ source_scope_digest: string;
1248
+ source_binding_digest: string;
1249
+ primary_resource_binding_digest: string;
1250
+ question_target_inventory_digest: string;
1251
+ repair_intent?: {
1252
+ target_ref: string;
1253
+ instruction: string;
1254
+ intent_digest: string;
1255
+ current_markdown?: string | undefined;
1256
+ } | undefined;
1257
+ }, {
1258
+ source_ref: string;
1259
+ protocol: "context.indexer.main-workset/v2";
1260
+ requirement_ref: string;
1261
+ workset_digest: string;
1262
+ module_ref: string | null;
1263
+ operation: "main-index";
1264
+ indexer_id: string;
1265
+ profile_contract_digest: string;
1266
+ reader_question_refs: string[];
1267
+ subject_key_schema_digest: string;
1268
+ stage: "partition";
1269
+ partition_subject_key: {
1270
+ kind: string;
1271
+ namespace: string;
1272
+ protocol: "context.subject-key/v1";
1273
+ local_key: string;
1274
+ };
1275
+ strategy_set_digest: string;
1276
+ partition_input_digests: string[];
1277
+ partition_inventory_digest: string;
1278
+ allowed_question_target_refs: string[];
1279
+ owner_cell_refs: string[];
1280
+ primary_registry_projection_digest: string;
1281
+ requirement_set_digest: string;
1282
+ primary_execution_fingerprint: string;
1283
+ source_scope_digest: string;
1284
+ source_binding_digest: string;
1285
+ primary_resource_binding_digest: string;
1286
+ question_target_inventory_digest: string;
1287
+ repair_intent?: {
1288
+ target_ref: string;
1289
+ instruction: string;
1290
+ intent_digest: string;
1291
+ current_markdown?: string | undefined;
1292
+ } | undefined;
1293
+ }>, {
1294
+ source_ref: string;
1295
+ protocol: "context.indexer.main-workset/v2";
1296
+ requirement_ref: string;
1297
+ workset_digest: string;
1298
+ module_ref: string | null;
1299
+ operation: "main-index";
1300
+ indexer_id: string;
1301
+ profile_contract_digest: string;
1302
+ reader_question_refs: string[];
1303
+ subject_key_schema_digest: string;
1304
+ stage: "partition";
1305
+ partition_subject_key: {
1306
+ kind: string;
1307
+ namespace: string;
1308
+ protocol: "context.subject-key/v1";
1309
+ local_key: string;
1310
+ };
1311
+ strategy_set_digest: string;
1312
+ partition_input_digests: string[];
1313
+ partition_inventory_digest: string;
1314
+ allowed_question_target_refs: string[];
1315
+ owner_cell_refs: string[];
1316
+ primary_registry_projection_digest: string;
1317
+ requirement_set_digest: string;
1318
+ primary_execution_fingerprint: string;
1319
+ source_scope_digest: string;
1320
+ source_binding_digest: string;
1321
+ primary_resource_binding_digest: string;
1322
+ question_target_inventory_digest: string;
1323
+ repair_intent?: {
1324
+ target_ref: string;
1325
+ instruction: string;
1326
+ intent_digest: string;
1327
+ current_markdown?: string | undefined;
1328
+ } | undefined;
1329
+ }, {
1330
+ source_ref: string;
1331
+ protocol: "context.indexer.main-workset/v2";
1332
+ requirement_ref: string;
1333
+ workset_digest: string;
1334
+ module_ref: string | null;
1335
+ operation: "main-index";
1336
+ indexer_id: string;
1337
+ profile_contract_digest: string;
1338
+ reader_question_refs: string[];
1339
+ subject_key_schema_digest: string;
1340
+ stage: "partition";
1341
+ partition_subject_key: {
1342
+ kind: string;
1343
+ namespace: string;
1344
+ protocol: "context.subject-key/v1";
1345
+ local_key: string;
1346
+ };
1347
+ strategy_set_digest: string;
1348
+ partition_input_digests: string[];
1349
+ partition_inventory_digest: string;
1350
+ allowed_question_target_refs: string[];
1351
+ owner_cell_refs: string[];
1352
+ primary_registry_projection_digest: string;
1353
+ requirement_set_digest: string;
1354
+ primary_execution_fingerprint: string;
1355
+ source_scope_digest: string;
1356
+ source_binding_digest: string;
1357
+ primary_resource_binding_digest: string;
1358
+ question_target_inventory_digest: string;
1359
+ repair_intent?: {
1360
+ target_ref: string;
1361
+ instruction: string;
1362
+ intent_digest: string;
1363
+ current_markdown?: string | undefined;
1364
+ } | undefined;
1365
+ }>, z.ZodEffects<z.ZodObject<{
1366
+ stage: z.ZodLiteral<"author">;
1367
+ partition_plan_binding_digest: z.ZodString;
1368
+ group_key: z.ZodString;
1369
+ logical_unit_ref: z.ZodString;
1370
+ member_ids_digest: z.ZodString;
1371
+ member_inventory_digest: z.ZodString;
1372
+ group_projection_digest: z.ZodString;
1373
+ group_dependency_view_digest: z.ZodString;
1374
+ target_resolution_view: z.ZodOptional<z.ZodEffects<z.ZodObject<{
1375
+ protocol: z.ZodLiteral<"context.indexer.target-resolution-view/v1">;
1376
+ view_digest: z.ZodString;
1377
+ requirement_ref: z.ZodString;
1378
+ subject_key_schema_digest: z.ZodString;
1379
+ query_digest: z.ZodString;
1380
+ entries: z.ZodArray<z.ZodUnion<[z.ZodObject<{
1381
+ query_ref: z.ZodString;
1382
+ state: z.ZodLiteral<"resolved">;
1383
+ subject_key: z.ZodObject<{
1384
+ protocol: z.ZodLiteral<"context.subject-key/v1">;
1385
+ namespace: z.ZodEffects<z.ZodString, string, string>;
1386
+ kind: z.ZodEffects<z.ZodString, string, string>;
1387
+ local_key: z.ZodEffects<z.ZodString, string, string>;
688
1388
  }, "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;
1389
+ kind: string;
1390
+ namespace: string;
1391
+ protocol: "context.subject-key/v1";
1392
+ local_key: string;
697
1393
  }, {
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">;
1394
+ kind: string;
1395
+ namespace: string;
1396
+ protocol: "context.subject-key/v1";
1397
+ local_key: string;
1398
+ }>;
1399
+ node_ref: z.ZodString;
707
1400
  }, "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
- }[];
1401
+ subject_key: {
1402
+ kind: string;
1403
+ namespace: string;
1404
+ protocol: "context.subject-key/v1";
1405
+ local_key: string;
1406
+ };
1407
+ state: "resolved";
1408
+ query_ref: string;
1409
+ node_ref: string;
719
1410
  }, {
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
- }[];
1411
+ subject_key: {
1412
+ kind: string;
1413
+ namespace: string;
1414
+ protocol: "context.subject-key/v1";
1415
+ local_key: string;
1416
+ };
1417
+ state: "resolved";
1418
+ query_ref: string;
1419
+ node_ref: string;
731
1420
  }>, 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">;
1421
+ query_ref: z.ZodString;
1422
+ state: z.ZodLiteral<"absent">;
780
1423
  }, "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
- }[];
1424
+ state: "absent";
1425
+ query_ref: string;
793
1426
  }, {
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">;
1427
+ state: "absent";
1428
+ query_ref: string;
1429
+ }>, z.ZodEffects<z.ZodObject<{
1430
+ query_ref: z.ZodString;
1431
+ state: z.ZodLiteral<"ambiguous">;
1432
+ conflicting_node_refs: z.ZodArray<z.ZodString, "many">;
1132
1433
  }, "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
- }[];
1434
+ state: "ambiguous";
1435
+ query_ref: string;
1436
+ conflicting_node_refs: string[];
1185
1437
  }, {
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;
1438
+ state: "ambiguous";
1439
+ query_ref: string;
1440
+ conflicting_node_refs: string[];
1441
+ }>, {
1442
+ state: "ambiguous";
1443
+ query_ref: string;
1444
+ conflicting_node_refs: string[];
1256
1445
  }, {
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
- }>;
1446
+ state: "ambiguous";
1447
+ query_ref: string;
1448
+ conflicting_node_refs: string[];
1449
+ }>]>, "many">;
1450
+ }, "strict", z.ZodTypeAny, {
1451
+ entries: ({
1452
+ subject_key: {
1453
+ kind: string;
1454
+ namespace: string;
1455
+ protocol: "context.subject-key/v1";
1456
+ local_key: string;
1457
+ };
1458
+ state: "resolved";
1459
+ query_ref: string;
1460
+ node_ref: string;
1461
+ } | {
1462
+ state: "absent";
1463
+ query_ref: string;
1464
+ } | {
1465
+ state: "ambiguous";
1466
+ query_ref: string;
1467
+ conflicting_node_refs: string[];
1468
+ })[];
1469
+ protocol: "context.indexer.target-resolution-view/v1";
1470
+ requirement_ref: string;
1471
+ view_digest: string;
1472
+ subject_key_schema_digest: string;
1473
+ query_digest: string;
1474
+ }, {
1475
+ entries: ({
1476
+ subject_key: {
1477
+ kind: string;
1478
+ namespace: string;
1479
+ protocol: "context.subject-key/v1";
1480
+ local_key: string;
1481
+ };
1482
+ state: "resolved";
1483
+ query_ref: string;
1484
+ node_ref: string;
1485
+ } | {
1486
+ state: "absent";
1487
+ query_ref: string;
1488
+ } | {
1489
+ state: "ambiguous";
1490
+ query_ref: string;
1491
+ conflicting_node_refs: string[];
1492
+ })[];
1493
+ protocol: "context.indexer.target-resolution-view/v1";
1494
+ requirement_ref: string;
1495
+ view_digest: string;
1496
+ subject_key_schema_digest: string;
1497
+ query_digest: string;
1498
+ }>, {
1499
+ entries: ({
1500
+ subject_key: {
1501
+ kind: string;
1502
+ namespace: string;
1503
+ protocol: "context.subject-key/v1";
1504
+ local_key: string;
1505
+ };
1506
+ state: "resolved";
1507
+ query_ref: string;
1508
+ node_ref: string;
1509
+ } | {
1510
+ state: "absent";
1511
+ query_ref: string;
1512
+ } | {
1513
+ state: "ambiguous";
1514
+ query_ref: string;
1515
+ conflicting_node_refs: string[];
1516
+ })[];
1517
+ protocol: "context.indexer.target-resolution-view/v1";
1518
+ requirement_ref: string;
1519
+ view_digest: string;
1520
+ subject_key_schema_digest: string;
1521
+ query_digest: string;
1522
+ }, {
1523
+ entries: ({
1524
+ subject_key: {
1525
+ kind: string;
1526
+ namespace: string;
1527
+ protocol: "context.subject-key/v1";
1528
+ local_key: string;
1529
+ };
1530
+ state: "resolved";
1531
+ query_ref: string;
1532
+ node_ref: string;
1533
+ } | {
1534
+ state: "absent";
1535
+ query_ref: string;
1536
+ } | {
1537
+ state: "ambiguous";
1538
+ query_ref: string;
1539
+ conflicting_node_refs: string[];
1540
+ })[];
1541
+ protocol: "context.indexer.target-resolution-view/v1";
1542
+ requirement_ref: string;
1543
+ view_digest: string;
1544
+ subject_key_schema_digest: string;
1545
+ query_digest: string;
1546
+ }>>;
1547
+ allowed_artifact_policy_variants: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
1548
+ artifact_policy_eligibility_digest: z.ZodString;
1549
+ protocol: z.ZodLiteral<"context.indexer.main-workset/v2">;
1550
+ workset_digest: z.ZodString;
1551
+ operation: z.ZodLiteral<"main-index">;
1552
+ indexer_id: z.ZodEffects<z.ZodString, string, string>;
1553
+ requirement_ref: z.ZodString;
1554
+ owner_cell_refs: z.ZodArray<z.ZodString, "many">;
1555
+ source_ref: z.ZodString;
1556
+ module_ref: z.ZodNullable<z.ZodString>;
1557
+ primary_registry_projection_digest: z.ZodString;
1558
+ requirement_set_digest: z.ZodString;
1559
+ primary_execution_fingerprint: z.ZodString;
1560
+ profile_contract_digest: z.ZodString;
1561
+ subject_key_schema_digest: z.ZodString;
1562
+ source_scope_digest: z.ZodString;
1563
+ source_binding_digest: z.ZodString;
1564
+ primary_resource_binding_digest: z.ZodString;
1565
+ question_target_inventory_digest: z.ZodString;
1566
+ repair_intent: z.ZodOptional<z.ZodObject<{
1567
+ target_ref: z.ZodString;
1568
+ instruction: z.ZodString;
1569
+ current_markdown: z.ZodOptional<z.ZodString>;
1570
+ } & {
1571
+ intent_digest: z.ZodString;
1265
1572
  }, "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
- }[];
1573
+ target_ref: string;
1574
+ instruction: string;
1575
+ intent_digest: string;
1576
+ current_markdown?: string | undefined;
1577
+ }, {
1578
+ target_ref: string;
1579
+ instruction: string;
1580
+ intent_digest: string;
1581
+ current_markdown?: string | undefined;
1582
+ }>>;
1583
+ }, "strict", z.ZodTypeAny, {
1584
+ source_ref: string;
1585
+ protocol: "context.indexer.main-workset/v2";
1586
+ requirement_ref: string;
1587
+ workset_digest: string;
1588
+ module_ref: string | null;
1589
+ operation: "main-index";
1590
+ indexer_id: string;
1591
+ profile_contract_digest: string;
1592
+ logical_unit_ref: string;
1593
+ subject_key_schema_digest: string;
1594
+ stage: "author";
1595
+ owner_cell_refs: string[];
1596
+ primary_registry_projection_digest: string;
1597
+ requirement_set_digest: string;
1598
+ primary_execution_fingerprint: string;
1599
+ source_scope_digest: string;
1600
+ source_binding_digest: string;
1601
+ primary_resource_binding_digest: string;
1602
+ question_target_inventory_digest: string;
1603
+ partition_plan_binding_digest: string;
1604
+ group_key: string;
1605
+ member_ids_digest: string;
1606
+ member_inventory_digest: string;
1607
+ group_projection_digest: string;
1608
+ group_dependency_view_digest: string;
1609
+ allowed_artifact_policy_variants: string[];
1610
+ artifact_policy_eligibility_digest: string;
1611
+ repair_intent?: {
1612
+ target_ref: string;
1613
+ instruction: string;
1614
+ intent_digest: string;
1615
+ current_markdown?: string | undefined;
1616
+ } | undefined;
1617
+ target_resolution_view?: {
1618
+ entries: ({
1619
+ subject_key: {
1620
+ kind: string;
1621
+ namespace: string;
1622
+ protocol: "context.subject-key/v1";
1623
+ local_key: string;
1624
+ };
1625
+ state: "resolved";
1626
+ query_ref: string;
1627
+ node_ref: string;
1279
1628
  } | {
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
- }[];
1629
+ state: "absent";
1630
+ query_ref: string;
1292
1631
  } | {
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
- }[];
1632
+ state: "ambiguous";
1633
+ query_ref: string;
1634
+ conflicting_node_refs: string[];
1635
+ })[];
1636
+ protocol: "context.indexer.target-resolution-view/v1";
1637
+ requirement_ref: string;
1638
+ view_digest: string;
1639
+ subject_key_schema_digest: string;
1640
+ query_digest: string;
1641
+ } | undefined;
1642
+ }, {
1643
+ source_ref: string;
1644
+ protocol: "context.indexer.main-workset/v2";
1645
+ requirement_ref: string;
1646
+ workset_digest: string;
1647
+ module_ref: string | null;
1648
+ operation: "main-index";
1649
+ indexer_id: string;
1650
+ profile_contract_digest: string;
1651
+ logical_unit_ref: string;
1652
+ subject_key_schema_digest: string;
1653
+ stage: "author";
1654
+ owner_cell_refs: string[];
1655
+ primary_registry_projection_digest: string;
1656
+ requirement_set_digest: string;
1657
+ primary_execution_fingerprint: string;
1658
+ source_scope_digest: string;
1659
+ source_binding_digest: string;
1660
+ primary_resource_binding_digest: string;
1661
+ question_target_inventory_digest: string;
1662
+ partition_plan_binding_digest: string;
1663
+ group_key: string;
1664
+ member_ids_digest: string;
1665
+ member_inventory_digest: string;
1666
+ group_projection_digest: string;
1667
+ group_dependency_view_digest: string;
1668
+ allowed_artifact_policy_variants: string[];
1669
+ artifact_policy_eligibility_digest: string;
1670
+ repair_intent?: {
1671
+ target_ref: string;
1672
+ instruction: string;
1673
+ intent_digest: string;
1674
+ current_markdown?: string | undefined;
1675
+ } | undefined;
1676
+ target_resolution_view?: {
1677
+ entries: ({
1678
+ subject_key: {
1679
+ kind: string;
1680
+ namespace: string;
1681
+ protocol: "context.subject-key/v1";
1682
+ local_key: string;
1683
+ };
1684
+ state: "resolved";
1685
+ query_ref: string;
1686
+ node_ref: string;
1376
1687
  } | {
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
- }[];
1688
+ state: "absent";
1689
+ query_ref: string;
1389
1690
  } | {
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";
1691
+ state: "ambiguous";
1692
+ query_ref: string;
1693
+ conflicting_node_refs: string[];
1694
+ })[];
1695
+ protocol: "context.indexer.target-resolution-view/v1";
1696
+ requirement_ref: string;
1697
+ view_digest: string;
1698
+ subject_key_schema_digest: string;
1699
+ query_digest: string;
1700
+ } | undefined;
1701
+ }>, {
1702
+ source_ref: string;
1703
+ protocol: "context.indexer.main-workset/v2";
1704
+ requirement_ref: string;
1476
1705
  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
- }[];
1706
+ module_ref: string | null;
1707
+ operation: "main-index";
1708
+ indexer_id: string;
1709
+ profile_contract_digest: string;
1710
+ logical_unit_ref: string;
1711
+ subject_key_schema_digest: string;
1712
+ stage: "author";
1713
+ owner_cell_refs: string[];
1714
+ primary_registry_projection_digest: string;
1715
+ requirement_set_digest: string;
1716
+ primary_execution_fingerprint: string;
1717
+ source_scope_digest: string;
1718
+ source_binding_digest: string;
1719
+ primary_resource_binding_digest: string;
1720
+ question_target_inventory_digest: string;
1721
+ partition_plan_binding_digest: string;
1722
+ group_key: string;
1723
+ member_ids_digest: string;
1724
+ member_inventory_digest: string;
1725
+ group_projection_digest: string;
1726
+ group_dependency_view_digest: string;
1727
+ allowed_artifact_policy_variants: string[];
1728
+ artifact_policy_eligibility_digest: string;
1729
+ repair_intent?: {
1730
+ target_ref: string;
1731
+ instruction: string;
1732
+ intent_digest: string;
1733
+ current_markdown?: string | undefined;
1734
+ } | undefined;
1735
+ target_resolution_view?: {
1736
+ entries: ({
1737
+ subject_key: {
1738
+ kind: string;
1739
+ namespace: string;
1740
+ protocol: "context.subject-key/v1";
1741
+ local_key: string;
1742
+ };
1743
+ state: "resolved";
1744
+ query_ref: string;
1745
+ node_ref: string;
1492
1746
  } | {
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
- }[];
1747
+ state: "absent";
1748
+ query_ref: string;
1505
1749
  } | {
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;
1750
+ state: "ambiguous";
1751
+ query_ref: string;
1752
+ conflicting_node_refs: string[];
1753
+ })[];
1754
+ protocol: "context.indexer.target-resolution-view/v1";
1755
+ requirement_ref: string;
1756
+ view_digest: string;
1757
+ subject_key_schema_digest: string;
1758
+ query_digest: string;
1759
+ } | undefined;
1582
1760
  }, {
1583
- protocol: "context.indexer.layer-composition-input/v1";
1761
+ source_ref: string;
1762
+ protocol: "context.indexer.main-workset/v2";
1763
+ requirement_ref: string;
1584
1764
  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
- }[];
1765
+ module_ref: string | null;
1766
+ operation: "main-index";
1767
+ indexer_id: string;
1768
+ profile_contract_digest: string;
1769
+ logical_unit_ref: string;
1770
+ subject_key_schema_digest: string;
1771
+ stage: "author";
1772
+ owner_cell_refs: string[];
1773
+ primary_registry_projection_digest: string;
1774
+ requirement_set_digest: string;
1775
+ primary_execution_fingerprint: string;
1776
+ source_scope_digest: string;
1777
+ source_binding_digest: string;
1778
+ primary_resource_binding_digest: string;
1779
+ question_target_inventory_digest: string;
1780
+ partition_plan_binding_digest: string;
1781
+ group_key: string;
1782
+ member_ids_digest: string;
1783
+ member_inventory_digest: string;
1784
+ group_projection_digest: string;
1785
+ group_dependency_view_digest: string;
1786
+ allowed_artifact_policy_variants: string[];
1787
+ artifact_policy_eligibility_digest: string;
1788
+ repair_intent?: {
1789
+ target_ref: string;
1790
+ instruction: string;
1791
+ intent_digest: string;
1792
+ current_markdown?: string | undefined;
1793
+ } | undefined;
1794
+ target_resolution_view?: {
1795
+ entries: ({
1796
+ subject_key: {
1797
+ kind: string;
1798
+ namespace: string;
1799
+ protocol: "context.subject-key/v1";
1800
+ local_key: string;
1801
+ };
1802
+ state: "resolved";
1803
+ query_ref: string;
1804
+ node_ref: string;
1600
1805
  } | {
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
- }[];
1806
+ state: "absent";
1807
+ query_ref: string;
1613
1808
  } | {
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;
1809
+ state: "ambiguous";
1810
+ query_ref: string;
1811
+ conflicting_node_refs: string[];
1812
+ })[];
1813
+ protocol: "context.indexer.target-resolution-view/v1";
1814
+ requirement_ref: string;
1815
+ view_digest: string;
1816
+ subject_key_schema_digest: string;
1817
+ query_digest: string;
1818
+ } | undefined;
1819
+ }>]>, "many">;
2020
1820
  }, "strict", z.ZodTypeAny, {
2021
- protocol: "context.indexer.run-request/v2";
2022
- operation: "main-index";
2023
- workset: {
1821
+ protocol: "context.indexer.main-transport-batch/v2";
1822
+ worksets: ({
2024
1823
  source_ref: string;
2025
1824
  protocol: "context.indexer.main-workset/v2";
2026
1825
  requirement_ref: string;
@@ -2054,6 +1853,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2054
1853
  target_ref: string;
2055
1854
  instruction: string;
2056
1855
  intent_digest: string;
1856
+ current_markdown?: string | undefined;
2057
1857
  } | undefined;
2058
1858
  } | {
2059
1859
  source_ref: string;
@@ -2087,6 +1887,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2087
1887
  target_ref: string;
2088
1888
  instruction: string;
2089
1889
  intent_digest: string;
1890
+ current_markdown?: string | undefined;
2090
1891
  } | undefined;
2091
1892
  target_resolution_view?: {
2092
1893
  entries: ({
@@ -2113,181 +1914,10 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2113
1914
  subject_key_schema_digest: string;
2114
1915
  query_digest: string;
2115
1916
  } | 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;
1917
+ })[];
2287
1918
  }, {
2288
- protocol: "context.indexer.run-request/v2";
2289
- operation: "main-index";
2290
- workset: {
1919
+ protocol: "context.indexer.main-transport-batch/v2";
1920
+ worksets: ({
2291
1921
  source_ref: string;
2292
1922
  protocol: "context.indexer.main-workset/v2";
2293
1923
  requirement_ref: string;
@@ -2321,6 +1951,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2321
1951
  target_ref: string;
2322
1952
  instruction: string;
2323
1953
  intent_digest: string;
1954
+ current_markdown?: string | undefined;
2324
1955
  } | undefined;
2325
1956
  } | {
2326
1957
  source_ref: string;
@@ -2354,6 +1985,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2354
1985
  target_ref: string;
2355
1986
  instruction: string;
2356
1987
  intent_digest: string;
1988
+ current_markdown?: string | undefined;
2357
1989
  } | undefined;
2358
1990
  target_resolution_view?: {
2359
1991
  entries: ({
@@ -2380,187 +2012,38 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2380
2012
  subject_key_schema_digest: string;
2381
2013
  query_digest: string;
2382
2014
  } | 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;
2015
+ })[];
2554
2016
  }>;
2555
2017
  instruction_request_digest: z.ZodString;
2018
+ tasks: z.ZodArray<z.ZodObject<{
2019
+ task_key: z.ZodString;
2020
+ workset_digest: z.ZodString;
2021
+ execution_request_digest: z.ZodString;
2022
+ consumed_input_view_digest: z.ZodString;
2023
+ workset_view_resource_id: z.ZodString;
2024
+ workset_view_request_digest: z.ZodString;
2025
+ }, "strict", z.ZodTypeAny, {
2026
+ workset_digest: string;
2027
+ execution_request_digest: string;
2028
+ consumed_input_view_digest: string;
2029
+ task_key: string;
2030
+ workset_view_resource_id: string;
2031
+ workset_view_request_digest: string;
2032
+ }, {
2033
+ workset_digest: string;
2034
+ execution_request_digest: string;
2035
+ consumed_input_view_digest: string;
2036
+ task_key: string;
2037
+ workset_view_resource_id: string;
2038
+ workset_view_request_digest: string;
2039
+ }>, "many">;
2556
2040
  input_digest: z.ZodString;
2557
2041
  }, "strict", z.ZodTypeAny, {
2558
- protocol: "context.indexer.agent-step-input/v1";
2042
+ protocol: "context.indexer.agent-step-input/v2";
2559
2043
  input_digest: string;
2560
- run_request: {
2561
- protocol: "context.indexer.run-request/v2";
2562
- operation: "main-index";
2563
- workset: {
2044
+ transport: {
2045
+ protocol: "context.indexer.main-transport-batch/v2";
2046
+ worksets: ({
2564
2047
  source_ref: string;
2565
2048
  protocol: "context.indexer.main-workset/v2";
2566
2049
  requirement_ref: string;
@@ -2594,6 +2077,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2594
2077
  target_ref: string;
2595
2078
  instruction: string;
2596
2079
  intent_digest: string;
2080
+ current_markdown?: string | undefined;
2597
2081
  } | undefined;
2598
2082
  } | {
2599
2083
  source_ref: string;
@@ -2627,6 +2111,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2627
2111
  target_ref: string;
2628
2112
  instruction: string;
2629
2113
  intent_digest: string;
2114
+ current_markdown?: string | undefined;
2630
2115
  } | undefined;
2631
2116
  target_resolution_view?: {
2632
2117
  entries: ({
@@ -2653,186 +2138,24 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2653
2138
  subject_key_schema_digest: string;
2654
2139
  query_digest: string;
2655
2140
  } | 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;
2141
+ })[];
2827
2142
  };
2143
+ stage: "partition" | "author";
2828
2144
  instruction_request_digest: string;
2145
+ tasks: {
2146
+ workset_digest: string;
2147
+ execution_request_digest: string;
2148
+ consumed_input_view_digest: string;
2149
+ task_key: string;
2150
+ workset_view_resource_id: string;
2151
+ workset_view_request_digest: string;
2152
+ }[];
2829
2153
  }, {
2830
- protocol: "context.indexer.agent-step-input/v1";
2154
+ protocol: "context.indexer.agent-step-input/v2";
2831
2155
  input_digest: string;
2832
- run_request: {
2833
- protocol: "context.indexer.run-request/v2";
2834
- operation: "main-index";
2835
- workset: {
2156
+ transport: {
2157
+ protocol: "context.indexer.main-transport-batch/v2";
2158
+ worksets: ({
2836
2159
  source_ref: string;
2837
2160
  protocol: "context.indexer.main-workset/v2";
2838
2161
  requirement_ref: string;
@@ -2866,6 +2189,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2866
2189
  target_ref: string;
2867
2190
  instruction: string;
2868
2191
  intent_digest: string;
2192
+ current_markdown?: string | undefined;
2869
2193
  } | undefined;
2870
2194
  } | {
2871
2195
  source_ref: string;
@@ -2899,6 +2223,7 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2899
2223
  target_ref: string;
2900
2224
  instruction: string;
2901
2225
  intent_digest: string;
2226
+ current_markdown?: string | undefined;
2902
2227
  } | undefined;
2903
2228
  target_resolution_view?: {
2904
2229
  entries: ({
@@ -2925,184 +2250,83 @@ export declare const indexerAgentStepInputSchema: z.ZodObject<{
2925
2250
  subject_key_schema_digest: string;
2926
2251
  query_digest: string;
2927
2252
  } | 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;
2253
+ })[];
3099
2254
  };
2255
+ stage: "partition" | "author";
3100
2256
  instruction_request_digest: string;
3101
- }>;
3102
- export type IndexerAgentStepInput = z.infer<typeof indexerAgentStepInputSchema>;
3103
- export declare function indexerAgentStepInputDigest(value: Omit<IndexerAgentStepInput, "input_digest">): string;
2257
+ tasks: {
2258
+ workset_digest: string;
2259
+ execution_request_digest: string;
2260
+ consumed_input_view_digest: string;
2261
+ task_key: string;
2262
+ workset_view_resource_id: string;
2263
+ workset_view_request_digest: string;
2264
+ }[];
2265
+ }>, z.ZodObject<{
2266
+ protocol: z.ZodLiteral<"context.indexer.agent-step-input/v2">;
2267
+ stage: z.ZodLiteral<"post-author">;
2268
+ instruction_request_digest: z.ZodString;
2269
+ tasks: z.ZodArray<z.ZodObject<{
2270
+ task_key: z.ZodString;
2271
+ workset_digest: z.ZodString;
2272
+ request_digest: z.ZodString;
2273
+ primary_result_view_digest: z.ZodString;
2274
+ workset_view_resource_id: z.ZodString;
2275
+ }, "strict", z.ZodTypeAny, {
2276
+ workset_digest: string;
2277
+ request_digest: string;
2278
+ primary_result_view_digest: string;
2279
+ task_key: string;
2280
+ workset_view_resource_id: string;
2281
+ }, {
2282
+ workset_digest: string;
2283
+ request_digest: string;
2284
+ primary_result_view_digest: string;
2285
+ task_key: string;
2286
+ workset_view_resource_id: string;
2287
+ }>, "many">;
2288
+ input_digest: z.ZodString;
2289
+ }, "strict", z.ZodTypeAny, {
2290
+ protocol: "context.indexer.agent-step-input/v2";
2291
+ input_digest: string;
2292
+ stage: "post-author";
2293
+ instruction_request_digest: string;
2294
+ tasks: {
2295
+ workset_digest: string;
2296
+ request_digest: string;
2297
+ primary_result_view_digest: string;
2298
+ task_key: string;
2299
+ workset_view_resource_id: string;
2300
+ }[];
2301
+ }, {
2302
+ protocol: "context.indexer.agent-step-input/v2";
2303
+ input_digest: string;
2304
+ stage: "post-author";
2305
+ instruction_request_digest: string;
2306
+ tasks: {
2307
+ workset_digest: string;
2308
+ request_digest: string;
2309
+ primary_result_view_digest: string;
2310
+ task_key: string;
2311
+ workset_view_resource_id: string;
2312
+ }[];
2313
+ }>]>;
2314
+ export type IndexerMainAgentStepInput = z.infer<typeof indexerMainAgentStepInputSchema>;
2315
+ export type IndexerPostAuthorAgentStepInput = z.infer<typeof indexerPostAuthorAgentStepInputSchema>;
2316
+ export type IndexerAgentStepInput = IndexerMainAgentStepInput | IndexerPostAuthorAgentStepInput;
2317
+ export declare function indexerAgentStepInputDigest(value: Omit<IndexerAgentStepInput, "input_digest"> | IndexerAgentStepInput): string;
3104
2318
  export declare function buildIndexerAgentStepInput(input: {
3105
- run_request: unknown;
2319
+ run_requests: readonly unknown[];
2320
+ instruction_request_digest: string;
2321
+ workset_view_requests: readonly {
2322
+ resource_id: string;
2323
+ workset_digest: string;
2324
+ request_digest: string;
2325
+ }[];
2326
+ }): IndexerMainAgentStepInput;
2327
+ export declare function buildIndexerPostAuthorAgentStepInput(input: {
2328
+ fragment_requests: readonly IndexerPostAuthorFragmentRequest[];
3106
2329
  instruction_request_digest: string;
3107
- }): IndexerAgentStepInput;
2330
+ }): IndexerPostAuthorAgentStepInput;
3108
2331
  export declare function validateIndexerAgentStepInput(value: unknown): IndexerAgentStepInput;
2332
+ export {};