markform 0.1.17 → 0.1.19

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 (38) hide show
  1. package/README.md +27 -2
  2. package/dist/ai-sdk.d.mts +1 -2
  3. package/dist/ai-sdk.mjs +2 -2
  4. package/dist/ai-sdk.mjs.map +1 -1
  5. package/dist/{apply-DgDJBscb.mjs → apply-Dalpt-D6.mjs} +422 -31
  6. package/dist/apply-Dalpt-D6.mjs.map +1 -0
  7. package/dist/bin.mjs +20 -2
  8. package/dist/bin.mjs.map +1 -1
  9. package/dist/{cli-DAl8LQzI.mjs → cli-tpvFNqFY.mjs} +325 -73
  10. package/dist/cli-tpvFNqFY.mjs.map +1 -0
  11. package/dist/cli.mjs +1 -1
  12. package/dist/{coreTypes-DiCddBKu.mjs → coreTypes-CPKXf2dc.mjs} +9 -4
  13. package/dist/coreTypes-CPKXf2dc.mjs.map +1 -0
  14. package/dist/{coreTypes-CnEea7Kh.d.mts → coreTypes-CkxML8g2.d.mts} +128 -10
  15. package/dist/index.d.mts +642 -22
  16. package/dist/index.mjs +5 -5
  17. package/dist/{session-XDrocA3j.mjs → session-CK0x28RO.mjs} +2 -2
  18. package/dist/session-CK0x28RO.mjs.map +1 -0
  19. package/dist/{session-B7aR6hno.mjs → session-ZHBi3LVQ.mjs} +1 -1
  20. package/dist/{shared-fUKfJ1UA.mjs → shared-BTR35aMz.mjs} +1 -1
  21. package/dist/{shared-CCq4haEV.mjs → shared-DwdyWmvE.mjs} +1 -3
  22. package/dist/shared-DwdyWmvE.mjs.map +1 -0
  23. package/dist/{src-CHVJLGKt.mjs → src-BTyz-wS6.mjs} +2009 -584
  24. package/dist/src-BTyz-wS6.mjs.map +1 -0
  25. package/docs/markform-apis.md +112 -0
  26. package/docs/markform-reference.md +27 -0
  27. package/docs/markform-spec.md +115 -0
  28. package/examples/movie-research/movie-deep-research-mock-filled.form.md +1 -1
  29. package/examples/movie-research/movie-deep-research.form.md +1 -1
  30. package/examples/parallel/parallel-research.form.md +57 -0
  31. package/examples/startup-deep-research/startup-deep-research.form.md +1 -1
  32. package/package.json +16 -14
  33. package/dist/apply-DgDJBscb.mjs.map +0 -1
  34. package/dist/cli-DAl8LQzI.mjs.map +0 -1
  35. package/dist/coreTypes-DiCddBKu.mjs.map +0 -1
  36. package/dist/session-XDrocA3j.mjs.map +0 -1
  37. package/dist/shared-CCq4haEV.mjs.map +0 -1
  38. package/dist/src-CHVJLGKt.mjs.map +0 -1
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
 
2
- import { $ as IdIndexEntry, $n as UrlFieldSchema, $t as SetMultiSelectPatch, A as ExplicitCheckboxValue, An as StepResultSchema, At as PatchSchema, B as FieldProgressSchema, Bn as StructureSummarySchema, Bt as RunModeSchema, C as DateFieldSchema, Cn as SingleSelectValue, Cr as WireToolResult, Ct as Option, D as DocumentationBlockSchema, Dn as SourceRange, Dr as YearValue, Dt as ParsedForm, E as DocumentationBlock, En as SourcePositionSchema, Er as YearFieldSchema, Et as OptionSchema, F as FieldGroupSchema, Fn as StringListValue, Ft as ProgressSummary, G as FieldValueSchema, Gn as TableFieldSchema, Gt as SessionTurn, H as FieldResponseSchema, Hn as TableColumn, Ht as SessionFinalSchema, I as FieldKind, In as StringListValueSchema, It as ProgressSummarySchema, J as FormSchemaSchema, Jn as TableRowResponse, Jt as SessionTurnStats, K as FillMode, Kn as TableRowPatch, Kt as SessionTurnContext, L as FieldKindSchema, Ln as StringValue, Lt as QualifiedColumnRef, M as Field, Mn as StringFieldSchema, Mt as ProgressCountsSchema, N as FieldBase, Nn as StringListField, Nt as ProgressState, O as DocumentationTag, On as SourceRangeSchema, Or as YearValueSchema, Ot as Patch, P as FieldGroup, Pn as StringListFieldSchema, Pt as ProgressStateSchema, Q as Id, Qn as UrlField, Qt as SetDatePatchSchema, R as FieldPriorityLevel, Rn as StringValueSchema, Rt as QualifiedOptionRef, S as DateField, Sn as SingleSelectFieldSchema, Sr as WireToolCallSchema, St as NumberValueSchema, T as DateValueSchema, Tn as SourcePosition, Tr as YearField, Tt as OptionIdSchema, U as FieldSchema, Un as TableColumnSchema, Ut as SessionTranscript, V as FieldResponse, Vn as SyntaxStyle, Vt as SessionFinal, W as FieldValue, Wn as TableField, Wt as SessionTranscriptSchema, X as HarnessConfig, Xn as TableValue, Xt as SetCheckboxesPatchSchema, Y as FrontmatterHarnessConfig, Yn as TableRowResponseSchema, Yt as SetCheckboxesPatch, Z as HarnessConfigSchema, Zn as TableValueSchema, Zt as SetDatePatch, _ as CheckboxesValueSchema, _n as Severity, _r as WireResponseFormat, _t as NodeType, a as ApprovalMode, an as SetStringListPatch, ar as UrlValueSchema, at as IssueReason, b as ColumnTypeName, bn as SimpleCheckboxStateSchema, br as WireResponseStepSchema, bt as NumberFieldSchema, c as CheckboxMode, cn as SetStringPatchSchema, cr as ValidatorContext, ct as IssueScopeSchema, d as CheckboxProgressCountsSchema, dn as SetUrlListPatch, dr as ValidatorRefSchema, dt as MultiCheckboxState, en as SetMultiSelectPatchSchema, er as UrlListField, et as IdSchema, f as CheckboxValue, fn as SetUrlListPatchSchema, fr as ValidatorRegistry, ft as MultiCheckboxStateSchema, g as CheckboxesValue, gn as SetYearPatchSchema, gr as WireRequestFormatSchema, gt as MultiSelectValueSchema, h as CheckboxesFieldSchema, hn as SetYearPatch, hr as WireRequestFormat, ht as MultiSelectValue, i as ApplyResultSchema, in as SetSingleSelectPatchSchema, ir as UrlValue, it as InspectResultSchema, j as ExplicitCheckboxValueSchema, jn as StringField, jt as ProgressCounts, k as DocumentationTagSchema, kn as StepResult, kt as PatchRejection, l as CheckboxModeSchema, ln as SetTablePatch, lr as ValidatorFn, lt as MarkformFrontmatter, m as CheckboxesField, mn as SetUrlPatchSchema, mr as WireFormatSchema, mt as MultiSelectFieldSchema, n as AnswerStateSchema, nn as SetNumberPatchSchema, nr as UrlListValue, nt as InspectIssueSchema, o as CellResponse, on as SetStringListPatchSchema, or as ValidationIssue, ot as IssueReasonSchema, p as CheckboxValueSchema, pn as SetUrlPatch, pr as WireFormat, pt as MultiSelectField, q as FormSchema, qn as TableRowPatchSchema, qt as SessionTurnSchema, r as ApplyResult, rn as SetSingleSelectPatch, rr as UrlListValueSchema, rt as InspectResult, s as CellResponseSchema, sn as SetStringPatch, sr as ValidationIssueSchema, st as IssueScope, t as AnswerState, tn as SetNumberPatch, tr as UrlListFieldSchema, tt as InspectIssue, u as CheckboxProgressCounts, un as SetTablePatchSchema, ur as ValidatorRef, ut as MarkformFrontmatterSchema, v as ClearFieldPatch, vn as SeveritySchema, vr as WireResponseFormatSchema, vt as Note, w as DateValue, wn as SingleSelectValueSchema, wr as WireToolResultSchema, wt as OptionId, x as ColumnTypeNameSchema, xn as SingleSelectField, xr as WireToolCall, xt as NumberValue, y as ClearFieldPatchSchema, yn as SimpleCheckboxState, yr as WireResponseStep, yt as NumberField, z as FieldProgress, zn as StructureSummary, zt as RunMode } from "./coreTypes-CnEea7Kh.mjs";
2
+ import { $ as HarnessConfigSchema, $n as TableValueSchema, $t as SetDatePatch, A as ExecutionPlan, An as SourceRangeSchema, Ar as YearValueSchema, At as Patch, B as FieldPriorityLevel, Bn as StringValueSchema, Bt as QualifiedOptionRef, C as DateFieldSchema, Cn as SingleSelectField, Cr as WireToolCall, Ct as NumberValue, D as DocumentationBlockSchema, Dn as SourcePosition, Dr as YearField, Dt as OptionIdSchema, E as DocumentationBlock, En as SingleSelectValueSchema, Er as WireToolResultSchema, Et as OptionId, F as FieldBase, Fn as StringListField, Ft as ProgressState, G as FieldSchema, Gn as TableColumnSchema, Gt as SessionTranscript, H as FieldProgressSchema, Hn as StructureSummarySchema, Ht as RunModeSchema, I as FieldGroup, In as StringListFieldSchema, It as ProgressStateSchema, J as FillMode, Jn as TableRowPatch, Jt as SessionTurnContext, K as FieldValue, Kn as TableField, Kt as SessionTranscriptSchema, L as FieldGroupSchema, Ln as StringListValue, Lt as ProgressSummary, M as ExplicitCheckboxValue, Mn as StepResultSchema, Mt as PatchSchema, N as ExplicitCheckboxValueSchema, Nn as StringField, Nt as ProgressCounts, O as DocumentationTag, On as SourcePositionSchema, Or as YearFieldSchema, Ot as OptionSchema, P as Field, Pn as StringFieldSchema, Pt as ProgressCountsSchema, Q as HarnessConfig, Qn as TableValue, Qt as SetCheckboxesPatchSchema, R as FieldKind, Rn as StringListValueSchema, Rt as ProgressSummarySchema, S as DateField, Sn as SimpleCheckboxStateSchema, Sr as WireResponseStepSchema, St as NumberFieldSchema, T as DateValueSchema, Tn as SingleSelectValue, Tr as WireToolResult, Tt as Option, U as FieldResponse, Un as SyntaxStyle, Ut as SessionFinal, V as FieldProgress, Vn as StructureSummary, Vt as RunMode, W as FieldResponseSchema, Wn as TableColumn, Wt as SessionFinalSchema, X as FormSchemaSchema, Xn as TableRowResponse, Xt as SessionTurnStats, Y as FormSchema, Yn as TableRowPatchSchema, Yt as SessionTurnSchema, Z as FrontmatterHarnessConfig, Zn as TableRowResponseSchema, Zt as SetCheckboxesPatch, _ as CheckboxesValueSchema, _n as SetYearPatch, _r as WireRequestFormat, _t as MultiSelectValue, a as ApprovalMode, an as SetSingleSelectPatch, ar as UrlListValueSchema, at as InspectResult, b as ColumnTypeName, bn as SeveritySchema, br as WireResponseFormatSchema, bt as Note, c as CheckboxMode, cn as SetStringListPatchSchema, cr as ValidationIssue, ct as IssueReasonSchema, d as CheckboxProgressCountsSchema, dn as SetTablePatch, dr as ValidatorFn, dt as MarkformFrontmatter, en as SetDatePatchSchema, er as UrlField, et as Id, f as CheckboxValue, fn as SetTablePatchSchema, fr as ValidatorRef, ft as MarkformFrontmatterSchema, g as CheckboxesValue, gn as SetUrlPatchSchema, gr as WireFormatSchema, gt as MultiSelectFieldSchema, h as CheckboxesFieldSchema, hn as SetUrlPatch, hr as WireFormat, ht as MultiSelectField, i as ApplyResultSchema, in as SetNumberPatchSchema, ir as UrlListValue, it as InspectIssueSchema, j as ExecutionPlanItem, jn as StepResult, jt as PatchRejection, k as DocumentationTagSchema, kn as SourceRange, kr as YearValue, kt as ParsedForm, l as CheckboxModeSchema, ln as SetStringPatch, lr as ValidationIssueSchema, lt as IssueScope, m as CheckboxesField, mn as SetUrlListPatchSchema, mr as ValidatorRegistry, mt as MultiCheckboxStateSchema, n as AnswerStateSchema, nn as SetMultiSelectPatchSchema, nr as UrlListField, nt as IdSchema, o as CellResponse, on as SetSingleSelectPatchSchema, or as UrlValue, ot as InspectResultSchema, p as CheckboxValueSchema, pn as SetUrlListPatch, pr as ValidatorRefSchema, pt as MultiCheckboxState, q as FieldValueSchema, qn as TableFieldSchema, qt as SessionTurn, r as ApplyResult, rn as SetNumberPatch, rr as UrlListFieldSchema, rt as InspectIssue, s as CellResponseSchema, sn as SetStringListPatch, sr as UrlValueSchema, st as IssueReason, t as AnswerState, tn as SetMultiSelectPatch, tr as UrlFieldSchema, tt as IdIndexEntry, u as CheckboxProgressCounts, un as SetStringPatchSchema, ur as ValidatorContext, ut as IssueScopeSchema, v as ClearFieldPatch, vn as SetYearPatchSchema, vr as WireRequestFormatSchema, vt as MultiSelectValueSchema, w as DateValue, wn as SingleSelectFieldSchema, wr as WireToolCallSchema, wt as NumberValueSchema, x as ColumnTypeNameSchema, xn as SimpleCheckboxState, xr as WireResponseStep, xt as NumberField, y as ClearFieldPatchSchema, yn as Severity, yr as WireResponseFormat, yt as NodeType, z as FieldKindSchema, zn as StringValue, zt as QualifiedColumnRef } from "./coreTypes-CkxML8g2.mjs";
3
+ import { z } from "zod";
3
4
  import { LanguageModel, Tool } from "ai";
4
5
 
5
6
  //#region src/errors.d.ts
6
-
7
7
  /**
8
8
  * Structured error types for markform.
9
9
  *
@@ -170,7 +170,6 @@ declare const ParseError: typeof MarkformParseError;
170
170
  declare function parseForm(markdown: string): ParsedForm;
171
171
  //#endregion
172
172
  //#region src/engine/serialize.d.ts
173
-
174
173
  interface SerializeOptions {
175
174
  /** Markform spec version to use in frontmatter. Defaults to MF_SPEC_VERSION. */
176
175
  specVersion?: string;
@@ -831,6 +830,14 @@ declare class FormHarness {
831
830
  * Form-level issues are always included.
832
831
  */
833
832
  private filterIssuesByScope;
833
+ /**
834
+ * Filter issues by order level.
835
+ *
836
+ * Only includes issues for fields at the current (lowest incomplete) order level.
837
+ * Fields at higher order levels are deferred until all lower-order fields are complete.
838
+ * If no order attributes are used, all issues pass through (all at order 0).
839
+ */
840
+ private filterIssuesByOrder;
834
841
  /**
835
842
  * Extract field ID from an issue ref.
836
843
  */
@@ -854,6 +861,341 @@ declare class FormHarness {
854
861
  */
855
862
  declare function createHarness(form: ParsedForm, config?: Partial<HarnessConfig>): FormHarness;
856
863
  //#endregion
864
+ //#region src/harness/fillRecord.d.ts
865
+ /**
866
+ * Per-tool statistics with timing percentiles.
867
+ * Enables analysis like "web_search p95 is 2.5s" or "fill_form has 98% success rate"
868
+ */
869
+ declare const ToolStatsSchema: z.ZodObject<{
870
+ toolName: z.ZodString;
871
+ callCount: z.ZodNumber;
872
+ successCount: z.ZodNumber;
873
+ failureCount: z.ZodNumber;
874
+ successRate: z.ZodNumber;
875
+ results: z.ZodOptional<z.ZodObject<{
876
+ totalResults: z.ZodNumber;
877
+ avgResultsPerCall: z.ZodNumber;
878
+ zeroResultCalls: z.ZodNumber;
879
+ }, z.core.$strip>>;
880
+ timing: z.ZodObject<{
881
+ totalMs: z.ZodNumber;
882
+ avgMs: z.ZodNumber;
883
+ minMs: z.ZodNumber;
884
+ maxMs: z.ZodNumber;
885
+ p50Ms: z.ZodNumber;
886
+ p95Ms: z.ZodNumber;
887
+ }, z.core.$strip>;
888
+ }, z.core.$strip>;
889
+ type ToolStats = z.infer<typeof ToolStatsSchema>;
890
+ /**
891
+ * Individual tool call in the timeline.
892
+ */
893
+ declare const ToolCallRecordSchema: z.ZodObject<{
894
+ tool: z.ZodString;
895
+ startedAt: z.ZodString;
896
+ completedAt: z.ZodString;
897
+ durationMs: z.ZodNumber;
898
+ success: z.ZodBoolean;
899
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
900
+ result: z.ZodOptional<z.ZodObject<{
901
+ resultCount: z.ZodOptional<z.ZodNumber>;
902
+ error: z.ZodOptional<z.ZodString>;
903
+ }, z.core.$strip>>;
904
+ }, z.core.$strip>;
905
+ type ToolCallRecord = z.infer<typeof ToolCallRecordSchema>;
906
+ /**
907
+ * Single turn in the fill timeline.
908
+ */
909
+ declare const TimelineEntrySchema: z.ZodObject<{
910
+ turnNumber: z.ZodNumber;
911
+ order: z.ZodNumber;
912
+ executionId: z.ZodString;
913
+ startedAt: z.ZodString;
914
+ completedAt: z.ZodString;
915
+ durationMs: z.ZodNumber;
916
+ issuesAddressed: z.ZodNumber;
917
+ patchesApplied: z.ZodNumber;
918
+ patchesRejected: z.ZodNumber;
919
+ tokens: z.ZodObject<{
920
+ input: z.ZodNumber;
921
+ output: z.ZodNumber;
922
+ }, z.core.$strip>;
923
+ toolCalls: z.ZodArray<z.ZodObject<{
924
+ tool: z.ZodString;
925
+ startedAt: z.ZodString;
926
+ completedAt: z.ZodString;
927
+ durationMs: z.ZodNumber;
928
+ success: z.ZodBoolean;
929
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
930
+ result: z.ZodOptional<z.ZodObject<{
931
+ resultCount: z.ZodOptional<z.ZodNumber>;
932
+ error: z.ZodOptional<z.ZodString>;
933
+ }, z.core.$strip>>;
934
+ }, z.core.$strip>>;
935
+ }, z.core.$strip>;
936
+ type TimelineEntry = z.infer<typeof TimelineEntrySchema>;
937
+ /**
938
+ * Breakdown item for visualization.
939
+ */
940
+ declare const TimingBreakdownItemSchema: z.ZodObject<{
941
+ category: z.ZodEnum<{
942
+ llm: "llm";
943
+ tools: "tools";
944
+ overhead: "overhead";
945
+ }>;
946
+ label: z.ZodString;
947
+ ms: z.ZodNumber;
948
+ percentage: z.ZodNumber;
949
+ }, z.core.$strip>;
950
+ type TimingBreakdownItem = z.infer<typeof TimingBreakdownItemSchema>;
951
+ /**
952
+ * Timing breakdown showing where time was spent.
953
+ */
954
+ declare const TimingBreakdownSchema: z.ZodObject<{
955
+ totalMs: z.ZodNumber;
956
+ llmTimeMs: z.ZodNumber;
957
+ toolTimeMs: z.ZodNumber;
958
+ overheadMs: z.ZodNumber;
959
+ breakdown: z.ZodArray<z.ZodObject<{
960
+ category: z.ZodEnum<{
961
+ llm: "llm";
962
+ tools: "tools";
963
+ overhead: "overhead";
964
+ }>;
965
+ label: z.ZodString;
966
+ ms: z.ZodNumber;
967
+ percentage: z.ZodNumber;
968
+ }, z.core.$strip>>;
969
+ }, z.core.$strip>;
970
+ type TimingBreakdown = z.infer<typeof TimingBreakdownSchema>;
971
+ /**
972
+ * Aggregated tool usage statistics.
973
+ */
974
+ declare const ToolSummarySchema: z.ZodObject<{
975
+ totalCalls: z.ZodNumber;
976
+ successfulCalls: z.ZodNumber;
977
+ failedCalls: z.ZodNumber;
978
+ successRate: z.ZodNumber;
979
+ totalDurationMs: z.ZodNumber;
980
+ byTool: z.ZodArray<z.ZodObject<{
981
+ toolName: z.ZodString;
982
+ callCount: z.ZodNumber;
983
+ successCount: z.ZodNumber;
984
+ failureCount: z.ZodNumber;
985
+ successRate: z.ZodNumber;
986
+ results: z.ZodOptional<z.ZodObject<{
987
+ totalResults: z.ZodNumber;
988
+ avgResultsPerCall: z.ZodNumber;
989
+ zeroResultCalls: z.ZodNumber;
990
+ }, z.core.$strip>>;
991
+ timing: z.ZodObject<{
992
+ totalMs: z.ZodNumber;
993
+ avgMs: z.ZodNumber;
994
+ minMs: z.ZodNumber;
995
+ maxMs: z.ZodNumber;
996
+ p50Ms: z.ZodNumber;
997
+ p95Ms: z.ZodNumber;
998
+ }, z.core.$strip>;
999
+ }, z.core.$strip>>;
1000
+ }, z.core.$strip>;
1001
+ type ToolSummary = z.infer<typeof ToolSummarySchema>;
1002
+ /**
1003
+ * Execution metadata for the fill.
1004
+ */
1005
+ declare const ExecutionMetadataSchema: z.ZodObject<{
1006
+ totalTurns: z.ZodNumber;
1007
+ parallelEnabled: z.ZodBoolean;
1008
+ maxParallelAgents: z.ZodOptional<z.ZodNumber>;
1009
+ orderLevels: z.ZodArray<z.ZodNumber>;
1010
+ executionThreads: z.ZodArray<z.ZodString>;
1011
+ }, z.core.$strip>;
1012
+ type ExecutionMetadata = z.infer<typeof ExecutionMetadataSchema>;
1013
+ /**
1014
+ * Fill status enum.
1015
+ */
1016
+ declare const FillRecordStatusSchema: z.ZodEnum<{
1017
+ partial: "partial";
1018
+ completed: "completed";
1019
+ failed: "failed";
1020
+ cancelled: "cancelled";
1021
+ }>;
1022
+ type FillRecordStatus = z.infer<typeof FillRecordStatusSchema>;
1023
+ /**
1024
+ * Complete record of a form fill operation.
1025
+ *
1026
+ * Captures everything that happened during the fill for:
1027
+ * - Provenance/corroboration
1028
+ * - Cost analysis
1029
+ * - Debugging
1030
+ * - Analytics
1031
+ */
1032
+ declare const FillRecordSchema: z.ZodObject<{
1033
+ sessionId: z.ZodString;
1034
+ startedAt: z.ZodString;
1035
+ completedAt: z.ZodString;
1036
+ durationMs: z.ZodNumber;
1037
+ form: z.ZodObject<{
1038
+ id: z.ZodString;
1039
+ title: z.ZodOptional<z.ZodString>;
1040
+ description: z.ZodOptional<z.ZodString>;
1041
+ structure: z.ZodObject<{
1042
+ groupCount: z.ZodNumber;
1043
+ fieldCount: z.ZodNumber;
1044
+ optionCount: z.ZodNumber;
1045
+ fieldCountByKind: z.ZodRecord<z.ZodEnum<{
1046
+ string: "string";
1047
+ number: "number";
1048
+ string_list: "string_list";
1049
+ url: "url";
1050
+ url_list: "url_list";
1051
+ single_select: "single_select";
1052
+ multi_select: "multi_select";
1053
+ checkboxes: "checkboxes";
1054
+ date: "date";
1055
+ year: "year";
1056
+ table: "table";
1057
+ }>, z.ZodNumber>;
1058
+ groupsById: z.ZodRecord<z.ZodString, z.ZodLiteral<"field_group">>;
1059
+ fieldsById: z.ZodRecord<z.ZodString, z.ZodEnum<{
1060
+ string: "string";
1061
+ number: "number";
1062
+ string_list: "string_list";
1063
+ url: "url";
1064
+ url_list: "url_list";
1065
+ single_select: "single_select";
1066
+ multi_select: "multi_select";
1067
+ checkboxes: "checkboxes";
1068
+ date: "date";
1069
+ year: "year";
1070
+ table: "table";
1071
+ }>>;
1072
+ optionsById: z.ZodRecord<z.ZodString, z.ZodObject<{
1073
+ parentFieldId: z.ZodString;
1074
+ parentFieldKind: z.ZodEnum<{
1075
+ string: "string";
1076
+ number: "number";
1077
+ string_list: "string_list";
1078
+ url: "url";
1079
+ url_list: "url_list";
1080
+ single_select: "single_select";
1081
+ multi_select: "multi_select";
1082
+ checkboxes: "checkboxes";
1083
+ date: "date";
1084
+ year: "year";
1085
+ table: "table";
1086
+ }>;
1087
+ }, z.core.$strip>>;
1088
+ }, z.core.$strip>;
1089
+ }, z.core.$strip>;
1090
+ status: z.ZodEnum<{
1091
+ partial: "partial";
1092
+ completed: "completed";
1093
+ failed: "failed";
1094
+ cancelled: "cancelled";
1095
+ }>;
1096
+ statusDetail: z.ZodOptional<z.ZodString>;
1097
+ formProgress: z.ZodObject<{
1098
+ totalFields: z.ZodNumber;
1099
+ requiredFields: z.ZodNumber;
1100
+ unansweredFields: z.ZodNumber;
1101
+ answeredFields: z.ZodNumber;
1102
+ skippedFields: z.ZodNumber;
1103
+ abortedFields: z.ZodNumber;
1104
+ validFields: z.ZodNumber;
1105
+ invalidFields: z.ZodNumber;
1106
+ emptyFields: z.ZodNumber;
1107
+ filledFields: z.ZodNumber;
1108
+ emptyRequiredFields: z.ZodNumber;
1109
+ totalNotes: z.ZodNumber;
1110
+ }, z.core.$strip>;
1111
+ llm: z.ZodObject<{
1112
+ provider: z.ZodString;
1113
+ model: z.ZodString;
1114
+ totalCalls: z.ZodNumber;
1115
+ inputTokens: z.ZodNumber;
1116
+ outputTokens: z.ZodNumber;
1117
+ }, z.core.$strip>;
1118
+ toolSummary: z.ZodObject<{
1119
+ totalCalls: z.ZodNumber;
1120
+ successfulCalls: z.ZodNumber;
1121
+ failedCalls: z.ZodNumber;
1122
+ successRate: z.ZodNumber;
1123
+ totalDurationMs: z.ZodNumber;
1124
+ byTool: z.ZodArray<z.ZodObject<{
1125
+ toolName: z.ZodString;
1126
+ callCount: z.ZodNumber;
1127
+ successCount: z.ZodNumber;
1128
+ failureCount: z.ZodNumber;
1129
+ successRate: z.ZodNumber;
1130
+ results: z.ZodOptional<z.ZodObject<{
1131
+ totalResults: z.ZodNumber;
1132
+ avgResultsPerCall: z.ZodNumber;
1133
+ zeroResultCalls: z.ZodNumber;
1134
+ }, z.core.$strip>>;
1135
+ timing: z.ZodObject<{
1136
+ totalMs: z.ZodNumber;
1137
+ avgMs: z.ZodNumber;
1138
+ minMs: z.ZodNumber;
1139
+ maxMs: z.ZodNumber;
1140
+ p50Ms: z.ZodNumber;
1141
+ p95Ms: z.ZodNumber;
1142
+ }, z.core.$strip>;
1143
+ }, z.core.$strip>>;
1144
+ }, z.core.$strip>;
1145
+ timingBreakdown: z.ZodObject<{
1146
+ totalMs: z.ZodNumber;
1147
+ llmTimeMs: z.ZodNumber;
1148
+ toolTimeMs: z.ZodNumber;
1149
+ overheadMs: z.ZodNumber;
1150
+ breakdown: z.ZodArray<z.ZodObject<{
1151
+ category: z.ZodEnum<{
1152
+ llm: "llm";
1153
+ tools: "tools";
1154
+ overhead: "overhead";
1155
+ }>;
1156
+ label: z.ZodString;
1157
+ ms: z.ZodNumber;
1158
+ percentage: z.ZodNumber;
1159
+ }, z.core.$strip>>;
1160
+ }, z.core.$strip>;
1161
+ timeline: z.ZodArray<z.ZodObject<{
1162
+ turnNumber: z.ZodNumber;
1163
+ order: z.ZodNumber;
1164
+ executionId: z.ZodString;
1165
+ startedAt: z.ZodString;
1166
+ completedAt: z.ZodString;
1167
+ durationMs: z.ZodNumber;
1168
+ issuesAddressed: z.ZodNumber;
1169
+ patchesApplied: z.ZodNumber;
1170
+ patchesRejected: z.ZodNumber;
1171
+ tokens: z.ZodObject<{
1172
+ input: z.ZodNumber;
1173
+ output: z.ZodNumber;
1174
+ }, z.core.$strip>;
1175
+ toolCalls: z.ZodArray<z.ZodObject<{
1176
+ tool: z.ZodString;
1177
+ startedAt: z.ZodString;
1178
+ completedAt: z.ZodString;
1179
+ durationMs: z.ZodNumber;
1180
+ success: z.ZodBoolean;
1181
+ input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1182
+ result: z.ZodOptional<z.ZodObject<{
1183
+ resultCount: z.ZodOptional<z.ZodNumber>;
1184
+ error: z.ZodOptional<z.ZodString>;
1185
+ }, z.core.$strip>>;
1186
+ }, z.core.$strip>>;
1187
+ }, z.core.$strip>>;
1188
+ execution: z.ZodObject<{
1189
+ totalTurns: z.ZodNumber;
1190
+ parallelEnabled: z.ZodBoolean;
1191
+ maxParallelAgents: z.ZodOptional<z.ZodNumber>;
1192
+ orderLevels: z.ZodArray<z.ZodNumber>;
1193
+ executionThreads: z.ZodArray<z.ZodString>;
1194
+ }, z.core.$strip>;
1195
+ customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1196
+ }, z.core.$strip>;
1197
+ type FillRecord = z.infer<typeof FillRecordSchema>;
1198
+ //#endregion
857
1199
  //#region src/harness/harnessTypes.d.ts
858
1200
  /**
859
1201
  * Per-turn statistics from LLM calls.
@@ -867,27 +1209,19 @@ interface TurnStats {
867
1209
  outputTokens?: number;
868
1210
  /** Tool calls made during this turn */
869
1211
  toolCalls: {
870
- /** Tool name */
871
- name: string;
872
- /** Number of times called */
1212
+ /** Tool name */name: string; /** Number of times called */
873
1213
  count: number;
874
1214
  }[];
875
1215
  /** Form progress after this turn */
876
1216
  formProgress: {
877
- /** Fields with values */
878
- answeredFields: number;
879
- /** Fields marked as skipped */
880
- skippedFields: number;
881
- /** Required issues still remaining */
882
- requiredRemaining: number;
883
- /** Optional/recommended issues still remaining */
1217
+ /** Fields with values */answeredFields: number; /** Fields marked as skipped */
1218
+ skippedFields: number; /** Required issues still remaining */
1219
+ requiredRemaining: number; /** Optional/recommended issues still remaining */
884
1220
  optionalRemaining: number;
885
1221
  };
886
1222
  /** Full prompts sent to LLM (for verbose logging) */
887
1223
  prompts?: {
888
- /** System prompt with instructions */
889
- system: string;
890
- /** Context prompt with form state and issues */
1224
+ /** System prompt with instructions */system: string; /** Context prompt with form state and issues */
891
1225
  context: string;
892
1226
  };
893
1227
  /**
@@ -947,7 +1281,9 @@ interface FillCallbacks {
947
1281
  /** Called when a turn begins */
948
1282
  onTurnStart?(turn: {
949
1283
  turnNumber: number;
950
- issuesCount: number;
1284
+ issuesCount: number; /** Field ordering level for parallel execution (can be negative) */
1285
+ order: number; /** Execution thread ID (e.g., "0-serial", "1-batch-contacts-0") */
1286
+ executionId: string;
951
1287
  }): void;
952
1288
  /** Called after inspect identifies issues for this turn (before agent generates patches) */
953
1289
  onIssuesIdentified?(info: {
@@ -965,24 +1301,59 @@ interface FillCallbacks {
965
1301
  /** Called before a tool executes */
966
1302
  onToolStart?(call: {
967
1303
  name: string;
968
- input: unknown;
1304
+ input: unknown; /** Execution thread ID for parallel tracking */
1305
+ executionId: string;
969
1306
  }): void;
970
1307
  /** Called after a tool completes */
971
1308
  onToolEnd?(call: {
972
1309
  name: string;
973
1310
  output: unknown;
974
1311
  durationMs: number;
975
- error?: string;
1312
+ error?: string; /** Execution thread ID for parallel tracking */
1313
+ executionId: string;
976
1314
  }): void;
977
1315
  /** Called before an LLM request */
978
1316
  onLlmCallStart?(call: {
979
- model: string;
1317
+ model: string; /** Execution thread ID for parallel tracking */
1318
+ executionId: string;
980
1319
  }): void;
981
1320
  /** Called after an LLM response */
982
1321
  onLlmCallEnd?(call: {
983
1322
  model: string;
984
1323
  inputTokens: number;
985
- outputTokens: number;
1324
+ outputTokens: number; /** Execution thread ID for parallel tracking */
1325
+ executionId: string;
1326
+ }): void;
1327
+ /** Called when a parallel batch starts execution */
1328
+ onBatchStart?(info: {
1329
+ batchId: string;
1330
+ itemCount: number;
1331
+ }): void;
1332
+ /** Called when a parallel batch completes */
1333
+ onBatchComplete?(info: {
1334
+ batchId: string;
1335
+ patchesApplied: number;
1336
+ }): void;
1337
+ /** Called when an order level starts processing */
1338
+ onOrderLevelStart?(info: {
1339
+ order: number;
1340
+ }): void;
1341
+ /** Called when an order level completes */
1342
+ onOrderLevelComplete?(info: {
1343
+ order: number;
1344
+ patchesApplied: number;
1345
+ }): void;
1346
+ /**
1347
+ * Called when a web search is performed.
1348
+ *
1349
+ * This provides access to the search query and result count for analytics and debugging.
1350
+ * Note: Not all providers expose the exact query. When available, this is called.
1351
+ */
1352
+ onWebSearch?(info: {
1353
+ /** The search query that was executed */query: string; /** Number of results returned (0 if none) */
1354
+ resultCount: number; /** Provider that performed the search (e.g., "anthropic", "openai") */
1355
+ provider: string; /** Execution thread ID for parallel tracking */
1356
+ executionId: string;
986
1357
  }): void;
987
1358
  }
988
1359
  /**
@@ -1036,6 +1407,16 @@ interface FillOptions {
1036
1407
  targetRoles?: string[];
1037
1408
  /** Fill mode: 'continue' (skip filled) or 'overwrite' (re-fill) */
1038
1409
  fillMode?: FillMode;
1410
+ /**
1411
+ * Enable parallel execution for forms with `parallel` batches.
1412
+ * When false (default), parallel attributes are ignored and everything runs serially.
1413
+ * When true, batch items run concurrently up to `maxParallelAgents`.
1414
+ *
1415
+ * @default false
1416
+ */
1417
+ enableParallel?: boolean;
1418
+ /** Max concurrent agents for parallel batches (default: 4) */
1419
+ maxParallelAgents?: number;
1039
1420
  /** Callbacks for observing form-filling execution */
1040
1421
  callbacks?: FillCallbacks;
1041
1422
  /** AbortSignal for cancellation */
@@ -1071,6 +1452,22 @@ interface FillOptions {
1071
1452
  * per multi-turn session). Set to false for production use.
1072
1453
  */
1073
1454
  captureWireFormat: boolean;
1455
+ /**
1456
+ * Collect a complete FillRecord capturing all execution details.
1457
+ *
1458
+ * When true, the FillResult will include a `record` field containing:
1459
+ * - Turn-by-turn timeline with token usage
1460
+ * - Tool calls with timing and results
1461
+ * - Aggregated statistics with percentiles
1462
+ * - Execution metadata for parallel fills
1463
+ *
1464
+ * Useful for:
1465
+ * - Cost analysis and billing
1466
+ * - Debugging and troubleshooting
1467
+ * - Analytics and optimization
1468
+ * - Audit trails and provenance
1469
+ */
1470
+ recordFill: boolean;
1074
1471
  }
1075
1472
  /**
1076
1473
  * Progress information for each turn.
@@ -1132,6 +1529,13 @@ interface FillResult {
1132
1529
  severity: 'required' | 'recommended';
1133
1530
  priority: number;
1134
1531
  }[];
1532
+ /**
1533
+ * Complete fill record when recordFill option is enabled.
1534
+ *
1535
+ * Contains timeline, token usage, tool calls, and execution metadata.
1536
+ * Useful for cost analysis, debugging, and analytics.
1537
+ */
1538
+ record?: FillRecord;
1135
1539
  }
1136
1540
  //#endregion
1137
1541
  //#region src/harness/mockAgent.d.ts
@@ -1228,6 +1632,222 @@ declare function fillForm(options: FillOptions): Promise<FillResult>;
1228
1632
  */
1229
1633
  declare function resolveHarnessConfig(form: ParsedForm, options?: Partial<FillOptions>): HarnessConfig;
1230
1634
  //#endregion
1635
+ //#region src/harness/parallelHarness.d.ts
1636
+ /**
1637
+ * Scoped fill request for a parallel agent.
1638
+ * Provides the full form for context but limits the agent to specific fields.
1639
+ */
1640
+ interface ScopedFillRequest {
1641
+ /** Full form for read-only context */
1642
+ form: ParsedForm;
1643
+ /** Field IDs this agent should fill */
1644
+ targetFieldIds: string[];
1645
+ /** Group IDs this agent is responsible for */
1646
+ targetGroupIds: string[];
1647
+ /** Issues scoped to target fields */
1648
+ issues: InspectIssue[];
1649
+ }
1650
+ /**
1651
+ * Result of running a single order level.
1652
+ */
1653
+ interface ParallelStepResult {
1654
+ /** Total patches applied in this order level */
1655
+ patchesApplied: number;
1656
+ /** Whether any errors occurred */
1657
+ errors: string[];
1658
+ }
1659
+ /**
1660
+ * Result of running all order levels.
1661
+ */
1662
+ interface ParallelRunResult {
1663
+ /** Whether the form is complete */
1664
+ isComplete: boolean;
1665
+ /** Total patches applied across all levels */
1666
+ totalPatchesApplied: number;
1667
+ /** Order levels processed */
1668
+ orderLevelsProcessed: number[];
1669
+ /** Errors from any level */
1670
+ errors: string[];
1671
+ }
1672
+ /**
1673
+ * Configuration for the parallel harness.
1674
+ */
1675
+ interface ParallelHarnessConfig {
1676
+ /** Maximum concurrent agents for parallel batches (default: DEFAULT_MAX_PARALLEL_AGENTS) */
1677
+ maxParallelAgents?: number;
1678
+ /** Factory to create scoped agents for parallel batch items */
1679
+ agentFactory?: (request: ScopedFillRequest) => Agent;
1680
+ /** Callback when a parallel batch starts */
1681
+ onBatchStart?: (batchId: string) => void;
1682
+ /** Callback when a parallel batch completes */
1683
+ onBatchComplete?: (batchId: string) => void;
1684
+ /** Callback when an order level starts processing */
1685
+ onOrderLevelStart?: (order: number) => void;
1686
+ /** Callback when an order level completes */
1687
+ onOrderLevelComplete?: (order: number) => void;
1688
+ /** Target roles (default: ['agent']) */
1689
+ targetRoles?: string[];
1690
+ /** Max patches per agent turn */
1691
+ maxPatchesPerTurn?: number;
1692
+ }
1693
+ /**
1694
+ * Filter issues to only those relevant to an execution plan item's fields.
1695
+ * Form-scoped issues are excluded (they don't belong to individual agents).
1696
+ */
1697
+ declare function scopeIssuesForItem(form: ParsedForm, item: ExecutionPlanItem, allIssues: InspectIssue[]): InspectIssue[];
1698
+ /**
1699
+ * Parallel harness that orchestrates concurrent agent execution.
1700
+ */
1701
+ declare class ParallelHarness {
1702
+ private form;
1703
+ private plan;
1704
+ private config;
1705
+ constructor(form: ParsedForm, config?: ParallelHarnessConfig);
1706
+ /**
1707
+ * Get the execution plan.
1708
+ */
1709
+ getExecutionPlan(): ExecutionPlan;
1710
+ /**
1711
+ * Run a single order level: execute loose serial items with the primary agent,
1712
+ * and parallel batch items concurrently.
1713
+ */
1714
+ runOrderLevel(order: number, primaryAgent: Agent): Promise<ParallelStepResult>;
1715
+ /**
1716
+ * Run all order levels sequentially, filling the entire form.
1717
+ */
1718
+ runAll(primaryAgent: Agent): Promise<ParallelRunResult>;
1719
+ }
1720
+ /**
1721
+ * Create a parallel harness for the given form.
1722
+ */
1723
+ declare function createParallelHarness(form: ParsedForm, config?: ParallelHarnessConfig): ParallelHarness;
1724
+ //#endregion
1725
+ //#region src/harness/fillRecordCollector.d.ts
1726
+ interface FillRecordCollectorOptions {
1727
+ /** Form metadata */
1728
+ form: {
1729
+ id: string;
1730
+ title?: string;
1731
+ description?: string;
1732
+ structure: StructureSummary;
1733
+ };
1734
+ /** LLM provider name */
1735
+ provider: string;
1736
+ /** Model identifier */
1737
+ model: string;
1738
+ /** Whether parallel execution is enabled */
1739
+ parallelEnabled?: boolean;
1740
+ /** Maximum parallel agents */
1741
+ maxParallelAgents?: number;
1742
+ /** Custom data to include in record */
1743
+ customData?: Record<string, unknown>;
1744
+ }
1745
+ /**
1746
+ * Thread-safe collector for FillRecord data.
1747
+ *
1748
+ * Uses an append-only event log pattern for thread safety.
1749
+ * Events are aggregated when getRecord() is called.
1750
+ */
1751
+ declare class FillRecordCollector implements FillCallbacks {
1752
+ private readonly startedAt;
1753
+ private readonly sessionId;
1754
+ private readonly form;
1755
+ private readonly provider;
1756
+ private readonly model;
1757
+ private readonly parallelEnabled;
1758
+ private readonly maxParallelAgents?;
1759
+ private customData;
1760
+ private events;
1761
+ private explicitStatus?;
1762
+ private explicitStatusDetail?;
1763
+ private pendingToolCalls;
1764
+ private pendingLlmCalls;
1765
+ constructor(options: FillRecordCollectorOptions);
1766
+ onTurnStart(turn: {
1767
+ turnNumber: number;
1768
+ issuesCount: number;
1769
+ order: number;
1770
+ executionId: string;
1771
+ }): void;
1772
+ onTurnComplete(progress: TurnProgress): void;
1773
+ onLlmCallStart(call: {
1774
+ model: string;
1775
+ executionId: string;
1776
+ }): void;
1777
+ onLlmCallEnd(call: {
1778
+ model: string;
1779
+ inputTokens: number;
1780
+ outputTokens: number;
1781
+ executionId: string;
1782
+ }): void;
1783
+ onToolStart(call: {
1784
+ name: string;
1785
+ input: unknown;
1786
+ executionId: string;
1787
+ }): void;
1788
+ onToolEnd(call: {
1789
+ name: string;
1790
+ output: unknown;
1791
+ durationMs: number;
1792
+ error?: string;
1793
+ executionId: string;
1794
+ }): void;
1795
+ onWebSearch(info: {
1796
+ query: string;
1797
+ resultCount: number;
1798
+ provider: string;
1799
+ executionId: string;
1800
+ }): void;
1801
+ /**
1802
+ * Add custom data during execution.
1803
+ */
1804
+ addCustomData(key: string, value: unknown): void;
1805
+ /**
1806
+ * Set explicit status (overrides auto-detection from progress).
1807
+ */
1808
+ setStatus(status: FillRecordStatus, detail?: string): void;
1809
+ /**
1810
+ * Assemble the complete FillRecord from collected events.
1811
+ */
1812
+ getRecord(formProgress: ProgressCounts): FillRecord;
1813
+ private buildTimeline;
1814
+ private findTurnForExecutionId;
1815
+ private normalizeInput;
1816
+ private extractResultCount;
1817
+ private calculateLlmTotals;
1818
+ private calculateToolSummary;
1819
+ private extractResultCountFromOutput;
1820
+ private percentile;
1821
+ private calculateTimingBreakdown;
1822
+ private buildExecutionMetadata;
1823
+ private determineStatus;
1824
+ }
1825
+ //#endregion
1826
+ //#region src/harness/formatFillRecordSummary.d.ts
1827
+ /**
1828
+ * Options for formatting the summary.
1829
+ */
1830
+ interface FormatFillRecordSummaryOptions {
1831
+ /** Show detailed breakdown including per-tool stats */
1832
+ verbose?: boolean;
1833
+ }
1834
+ /**
1835
+ * Format FillRecord as a human-readable text summary.
1836
+ *
1837
+ * @param record - The FillRecord to format
1838
+ * @param options - Formatting options (verbose mode for more detail)
1839
+ * @returns Multi-line text summary
1840
+ *
1841
+ * @example
1842
+ * ```typescript
1843
+ * const result = await fillForm({ form, model, recordFill: true });
1844
+ * if (result.record) {
1845
+ * console.log(formatFillRecordSummary(result.record));
1846
+ * }
1847
+ * ```
1848
+ */
1849
+ declare function formatFillRecordSummary(record: FillRecord, options?: FormatFillRecordSummaryOptions): string;
1850
+ //#endregion
1231
1851
  //#region src/research/researchTypes.d.ts
1232
1852
  /**
1233
1853
  * Research execution status.
@@ -1315,5 +1935,5 @@ declare function validateResearchForm(form: ParsedForm): {
1315
1935
  /** Markform version (injected at build time). */
1316
1936
  declare const VERSION: string;
1317
1937
  //#endregion
1318
- export { type AgentResponse, type AnswerState, AnswerStateSchema, type ApplyResult, ApplyResultSchema, type CellResponse, CellResponseSchema, type CellScopeRef, type CheckboxInfo, type CheckboxMode, CheckboxModeSchema, type CheckboxProgressCounts, CheckboxProgressCountsSchema, type CheckboxValue, CheckboxValueSchema, type CheckboxesField, CheckboxesFieldSchema, type CheckboxesValue, CheckboxesValueSchema, type ClearFieldPatch, ClearFieldPatchSchema, type CoerceInputContextResult, type CoercionResult, type ColumnTypeName, ColumnTypeNameSchema, type ComputedSummaries, type DateField, DateFieldSchema, type DateValue, DateValueSchema, type DocumentationBlock, DocumentationBlockSchema, type DocumentationTag, DocumentationTagSchema, type ExplicitCheckboxValue, ExplicitCheckboxValueSchema, type Field, type FieldBase, type FieldGroup, FieldGroupSchema, type FieldKind, FieldKindSchema, type FieldProgress, FieldProgressSchema, type FieldResponse, FieldResponseSchema, FieldSchema, type FieldScopeRef, type FieldValue, FieldValueSchema, type FillCallbacks, type FillOptions, type FillResult, type FillStatus, FormHarness, type FormSchema, FormSchemaSchema, type FrontmatterHarnessConfig, type HarnessConfig, HarnessConfigSchema, type HeadingInfo, type Id, type IdIndexEntry, IdSchema, type InjectCheckboxIdsOptions, type InjectHeaderIdsOptions, type InjectIdsResult, type InputContext, type InspectIssue, InspectIssueSchema, type InspectOptions, type InspectResult, InspectResultSchema, type IssueReason, IssueReasonSchema, type IssueScope, IssueScopeSchema, type JsonSchemaDraft, type JsonSchemaOptions, type JsonSchemaResult, MarkformAbortError, MarkformConfigError, MarkformError, type MarkformFieldExtension, type MarkformFrontmatter, MarkformFrontmatterSchema, MarkformLlmError, MarkformParseError, MarkformPatchError, type MarkformSchemaExtension, MarkformValidationError, MockAgent, type MultiCheckboxState, MultiCheckboxStateSchema, type MultiSelectField, MultiSelectFieldSchema, type MultiSelectValue, MultiSelectValueSchema, type NodeType, type NumberField, NumberFieldSchema, type NumberValue, NumberValueSchema, type Option, type OptionId, OptionIdSchema, OptionSchema, ParseError, type ParseScopeRefResult, type ParseTableResult, type ParsedForm, type ParsedRawTable, type ParsedScopeRef, type Patch, type PatchRejection, PatchSchema, type ProgressCounts, ProgressCountsSchema, type ProgressState, ProgressStateSchema, type ProgressSummary, ProgressSummarySchema, type QualifiedColumnRef, type QualifiedOptionRef, type QualifiedScopeRef, type RawFieldValue, type ResearchOptions, type ResearchResult, type ResearchStatus, type RunMode, RunModeSchema, type SerializeOptions, type SessionFinal, SessionFinalSchema, type SessionTranscript, SessionTranscriptSchema, type SessionTurn, SessionTurnSchema, type SessionTurnStats, type SetCheckboxesPatch, SetCheckboxesPatchSchema, type SetDatePatch, SetDatePatchSchema, type SetMultiSelectPatch, SetMultiSelectPatchSchema, type SetNumberPatch, SetNumberPatchSchema, type SetSingleSelectPatch, SetSingleSelectPatchSchema, type SetStringListPatch, SetStringListPatchSchema, type SetStringPatch, SetStringPatchSchema, type SetTablePatch, SetTablePatchSchema, type SetUrlListPatch, SetUrlListPatchSchema, type SetUrlPatch, SetUrlPatchSchema, type SetYearPatch, SetYearPatchSchema, type Severity, SeveritySchema, type SimpleCheckboxState, SimpleCheckboxStateSchema, type SingleSelectField, SingleSelectFieldSchema, type SingleSelectValue, SingleSelectValueSchema, type SourcePosition, SourcePositionSchema, type SourceRange, SourceRangeSchema, type StepResult, StepResultSchema, type StringField, StringFieldSchema, type StringListField, StringListFieldSchema, type StringListValue, StringListValueSchema, type StringValue, StringValueSchema, type StructureSummary, StructureSummarySchema, type TableColumn, TableColumnSchema, type TableField, TableFieldSchema, type TableRowPatch, TableRowPatchSchema, type TableRowResponse, TableRowResponseSchema, type TableValue, TableValueSchema, type TurnProgress, type TurnStats, type UrlField, UrlFieldSchema, type UrlListField, UrlListFieldSchema, type UrlListValue, UrlListValueSchema, type UrlValue, UrlValueSchema, VERSION, type ValidateOptions, type ValidateResult, type ValidationIssue, ValidationIssueSchema, type ValidatorContext, type ValidatorFn, type ValidatorRef, ValidatorRefSchema, type ValidatorRegistry, type WireFormat, WireFormatSchema, type WireRequestFormat, WireRequestFormatSchema, type WireResponseFormat, WireResponseFormatSchema, type WireResponseStep, WireResponseStepSchema, type WireToolCall, WireToolCallSchema, type WireToolResult, WireToolResultSchema, type YearField, YearFieldSchema, type YearValue, YearValueSchema, applyPatches, coerceInputContext, coerceToFieldPatch, computeAllSummaries, computeFormState, computeProgressSummary, computeStructureSummary, createHarness, createMockAgent, fieldToJsonSchema, fillForm, findAllCheckboxes, findAllHeadings, findEnclosingHeadings, findFieldById, formToJsonSchema, getFieldId, injectCheckboxIds, injectHeaderIds, inspect, isAbortError, isCellRef, isConfigError, isFieldRef, isFormComplete, isLlmError, isMarkformError, isParseError, isPatchError, isQualifiedRef, isResearchForm, isRetryableError, isValidationError, parseCellValue, parseForm, parseMarkdownTable, parseRawTable, parseScopeRef, parseSession, resolveHarnessConfig, runResearch, serializeForm, serializeReport, serializeScopeRef, serializeSession, validate, validateResearchForm };
1938
+ export { type AgentResponse, type AnswerState, AnswerStateSchema, type ApplyResult, ApplyResultSchema, type CellResponse, CellResponseSchema, type CellScopeRef, type CheckboxInfo, type CheckboxMode, CheckboxModeSchema, type CheckboxProgressCounts, CheckboxProgressCountsSchema, type CheckboxValue, CheckboxValueSchema, type CheckboxesField, CheckboxesFieldSchema, type CheckboxesValue, CheckboxesValueSchema, type ClearFieldPatch, ClearFieldPatchSchema, type CoerceInputContextResult, type CoercionResult, type ColumnTypeName, ColumnTypeNameSchema, type ComputedSummaries, type DateField, DateFieldSchema, type DateValue, DateValueSchema, type DocumentationBlock, DocumentationBlockSchema, type DocumentationTag, DocumentationTagSchema, type ExecutionMetadata, ExecutionMetadataSchema, type ExplicitCheckboxValue, ExplicitCheckboxValueSchema, type Field, type FieldBase, type FieldGroup, FieldGroupSchema, type FieldKind, FieldKindSchema, type FieldProgress, FieldProgressSchema, type FieldResponse, FieldResponseSchema, FieldSchema, type FieldScopeRef, type FieldValue, FieldValueSchema, type FillCallbacks, type FillOptions, type FillRecord, FillRecordCollector, type FillRecordCollectorOptions, FillRecordSchema, type FillRecordStatus, FillRecordStatusSchema, type FillResult, type FillStatus, FormHarness, type FormSchema, FormSchemaSchema, type FormatFillRecordSummaryOptions, type FrontmatterHarnessConfig, type HarnessConfig, HarnessConfigSchema, type HeadingInfo, type Id, type IdIndexEntry, IdSchema, type InjectCheckboxIdsOptions, type InjectHeaderIdsOptions, type InjectIdsResult, type InputContext, type InspectIssue, InspectIssueSchema, type InspectOptions, type InspectResult, InspectResultSchema, type IssueReason, IssueReasonSchema, type IssueScope, IssueScopeSchema, type JsonSchemaDraft, type JsonSchemaOptions, type JsonSchemaResult, MarkformAbortError, MarkformConfigError, MarkformError, type MarkformFieldExtension, type MarkformFrontmatter, MarkformFrontmatterSchema, MarkformLlmError, MarkformParseError, MarkformPatchError, type MarkformSchemaExtension, MarkformValidationError, MockAgent, type MultiCheckboxState, MultiCheckboxStateSchema, type MultiSelectField, MultiSelectFieldSchema, type MultiSelectValue, MultiSelectValueSchema, type NodeType, type NumberField, NumberFieldSchema, type NumberValue, NumberValueSchema, type Option, type OptionId, OptionIdSchema, OptionSchema, ParallelHarness, type ParallelHarnessConfig, type ParallelRunResult, type ParallelStepResult, ParseError, type ParseScopeRefResult, type ParseTableResult, type ParsedForm, type ParsedRawTable, type ParsedScopeRef, type Patch, type PatchRejection, PatchSchema, type ProgressCounts, ProgressCountsSchema, type ProgressState, ProgressStateSchema, type ProgressSummary, ProgressSummarySchema, type QualifiedColumnRef, type QualifiedOptionRef, type QualifiedScopeRef, type RawFieldValue, type ResearchOptions, type ResearchResult, type ResearchStatus, type RunMode, RunModeSchema, type ScopedFillRequest, type SerializeOptions, type SessionFinal, SessionFinalSchema, type SessionTranscript, SessionTranscriptSchema, type SessionTurn, SessionTurnSchema, type SessionTurnStats, type SetCheckboxesPatch, SetCheckboxesPatchSchema, type SetDatePatch, SetDatePatchSchema, type SetMultiSelectPatch, SetMultiSelectPatchSchema, type SetNumberPatch, SetNumberPatchSchema, type SetSingleSelectPatch, SetSingleSelectPatchSchema, type SetStringListPatch, SetStringListPatchSchema, type SetStringPatch, SetStringPatchSchema, type SetTablePatch, SetTablePatchSchema, type SetUrlListPatch, SetUrlListPatchSchema, type SetUrlPatch, SetUrlPatchSchema, type SetYearPatch, SetYearPatchSchema, type Severity, SeveritySchema, type SimpleCheckboxState, SimpleCheckboxStateSchema, type SingleSelectField, SingleSelectFieldSchema, type SingleSelectValue, SingleSelectValueSchema, type SourcePosition, SourcePositionSchema, type SourceRange, SourceRangeSchema, type StepResult, StepResultSchema, type StringField, StringFieldSchema, type StringListField, StringListFieldSchema, type StringListValue, StringListValueSchema, type StringValue, StringValueSchema, type StructureSummary, StructureSummarySchema, type TableColumn, TableColumnSchema, type TableField, TableFieldSchema, type TableRowPatch, TableRowPatchSchema, type TableRowResponse, TableRowResponseSchema, type TableValue, TableValueSchema, type TimelineEntry, TimelineEntrySchema, type TimingBreakdown, type TimingBreakdownItem, TimingBreakdownItemSchema, TimingBreakdownSchema, type ToolCallRecord, ToolCallRecordSchema, type ToolStats, ToolStatsSchema, type ToolSummary, ToolSummarySchema, type TurnProgress, type TurnStats, type UrlField, UrlFieldSchema, type UrlListField, UrlListFieldSchema, type UrlListValue, UrlListValueSchema, type UrlValue, UrlValueSchema, VERSION, type ValidateOptions, type ValidateResult, type ValidationIssue, ValidationIssueSchema, type ValidatorContext, type ValidatorFn, type ValidatorRef, ValidatorRefSchema, type ValidatorRegistry, type WireFormat, WireFormatSchema, type WireRequestFormat, WireRequestFormatSchema, type WireResponseFormat, WireResponseFormatSchema, type WireResponseStep, WireResponseStepSchema, type WireToolCall, WireToolCallSchema, type WireToolResult, WireToolResultSchema, type YearField, YearFieldSchema, type YearValue, YearValueSchema, applyPatches, coerceInputContext, coerceToFieldPatch, computeAllSummaries, computeFormState, computeProgressSummary, computeStructureSummary, createHarness, createMockAgent, createParallelHarness, fieldToJsonSchema, fillForm, findAllCheckboxes, findAllHeadings, findEnclosingHeadings, findFieldById, formToJsonSchema, formatFillRecordSummary, getFieldId, injectCheckboxIds, injectHeaderIds, inspect, isAbortError, isCellRef, isConfigError, isFieldRef, isFormComplete, isLlmError, isMarkformError, isParseError, isPatchError, isQualifiedRef, isResearchForm, isRetryableError, isValidationError, parseCellValue, parseForm, parseMarkdownTable, parseRawTable, parseScopeRef, parseSession, resolveHarnessConfig, runResearch, scopeIssuesForItem, serializeForm, serializeReport, serializeScopeRef, serializeSession, validate, validateResearchForm };
1319
1939
  //# sourceMappingURL=index.d.mts.map