markform 0.1.9 → 0.1.11

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.
package/dist/index.d.mts CHANGED
@@ -1,16 +1,160 @@
1
1
 
2
- import { $ as IdIndexEntry, $n as UrlListField, $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 WireToolResultSchema, Ct as Option, D as DocumentationBlockSchema, Dn as SourceRange, Dr as YearValueSchema, Dt as ParsedForm, E as DocumentationBlock, En as SourcePositionSchema, Er as YearValue, Et as OptionSchema, F as FieldGroupSchema, Fn as StringListValue, Ft as ProgressSummary, G as FieldValueSchema, Gn as TableRowPatch, Gt as SessionTurn, H as FieldResponseSchema, Hn as TableColumnSchema, Ht as SessionFinalSchema, I as FieldKind, In as StringListValueSchema, It as ProgressSummarySchema, J as FormSchemaSchema, Jn as TableRowResponseSchema, Jt as SessionTurnStats, K as FillMode, Kn as TableRowPatchSchema, 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, Ot as Patch, P as FieldGroup, Pn as StringListFieldSchema, Pt as ProgressStateSchema, Q as Id, Qn as UrlFieldSchema, Qt as SetDatePatchSchema, R as FieldPriorityLevel, Rn as StringValueSchema, Rt as QualifiedOptionRef, S as DateField, Sn as SingleSelectFieldSchema, Sr as WireToolResult, St as NumberValueSchema, T as DateValueSchema, Tn as SourcePosition, Tr as YearFieldSchema, Tt as OptionIdSchema, U as FieldSchema, Un as TableField, Ut as SessionTranscript, V as FieldResponse, Vn as TableColumn, Vt as SessionFinal, W as FieldValue, Wn as TableFieldSchema, Wt as SessionTranscriptSchema, X as HarnessConfig, Xn as TableValueSchema, Xt as SetCheckboxesPatchSchema, Y as FrontmatterHarnessConfig, Yn as TableValue, Yt as SetCheckboxesPatch, Z as HarnessConfigSchema, Zn as UrlField, Zt as SetDatePatch, _ as CheckboxesValueSchema, _n as Severity, _r as WireResponseFormatSchema, _t as NodeType, a as ApprovalMode, an as SetStringListPatch, ar as ValidationIssue, at as IssueReason, b as ColumnTypeName, bn as SimpleCheckboxStateSchema, br as WireToolCall, bt as NumberFieldSchema, c as CheckboxMode, cn as SetStringPatchSchema, cr as ValidatorFn, ct as IssueScopeSchema, d as CheckboxProgressCountsSchema, dn as SetUrlListPatch, dr as ValidatorRegistry, dt as MultiCheckboxState, en as SetMultiSelectPatchSchema, er as UrlListFieldSchema, et as IdSchema, f as CheckboxValue, fn as SetUrlListPatchSchema, fr as WireFormat, ft as MultiCheckboxStateSchema, g as CheckboxesValue, gn as SetYearPatchSchema, gr as WireResponseFormat, gt as MultiSelectValueSchema, h as CheckboxesFieldSchema, hn as SetYearPatch, hr as WireRequestFormatSchema, ht as MultiSelectValue, i as ApplyResultSchema, in as SetSingleSelectPatchSchema, ir as UrlValueSchema, 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 ValidatorRef, lt as MarkformFrontmatter, m as CheckboxesField, mn as SetUrlPatchSchema, mr as WireRequestFormat, mt as MultiSelectFieldSchema, n as AnswerStateSchema, nn as SetNumberPatchSchema, nr as UrlListValueSchema, nt as InspectIssueSchema, o as CellResponse, on as SetStringListPatchSchema, or as ValidationIssueSchema, ot as IssueReasonSchema, p as CheckboxValueSchema, pn as SetUrlPatch, pr as WireFormatSchema, pt as MultiSelectField, q as FormSchema, qn as TableRowResponse, qt as SessionTurnSchema, r as ApplyResult, rn as SetSingleSelectPatch, rr as UrlValue, rt as InspectResult, s as CellResponseSchema, sn as SetStringPatch, sr as ValidatorContext, st as IssueScope, t as AnswerState, tn as SetNumberPatch, tr as UrlListValue, tt as InspectIssue, u as CheckboxProgressCounts, un as SetTablePatchSchema, ur as ValidatorRefSchema, ut as MarkformFrontmatterSchema, v as ClearFieldPatch, vn as SeveritySchema, vr as WireResponseStep, vt as Note, w as DateValue, wn as SingleSelectValueSchema, wr as YearField, wt as OptionId, x as ColumnTypeNameSchema, xn as SingleSelectField, xr as WireToolCallSchema, xt as NumberValue, y as ClearFieldPatchSchema, yn as SimpleCheckboxState, yr as WireResponseStepSchema, yt as NumberField, z as FieldProgress, zn as StructureSummary, zt as RunMode } from "./coreTypes-JCPm418M.mjs";
3
- import "@markdoc/markdoc";
2
+ import { $ as IdIndexEntry, $n as UrlListField, $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 WireToolResultSchema, Ct as Option, D as DocumentationBlockSchema, Dn as SourceRange, Dr as YearValueSchema, Dt as ParsedForm, E as DocumentationBlock, En as SourcePositionSchema, Er as YearValue, Et as OptionSchema, F as FieldGroupSchema, Fn as StringListValue, Ft as ProgressSummary, G as FieldValueSchema, Gn as TableRowPatch, Gt as SessionTurn, H as FieldResponseSchema, Hn as TableColumnSchema, Ht as SessionFinalSchema, I as FieldKind, In as StringListValueSchema, It as ProgressSummarySchema, J as FormSchemaSchema, Jn as TableRowResponseSchema, Jt as SessionTurnStats, K as FillMode, Kn as TableRowPatchSchema, 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, Ot as Patch, P as FieldGroup, Pn as StringListFieldSchema, Pt as ProgressStateSchema, Q as Id, Qn as UrlFieldSchema, Qt as SetDatePatchSchema, R as FieldPriorityLevel, Rn as StringValueSchema, Rt as QualifiedOptionRef, S as DateField, Sn as SingleSelectFieldSchema, Sr as WireToolResult, St as NumberValueSchema, T as DateValueSchema, Tn as SourcePosition, Tr as YearFieldSchema, Tt as OptionIdSchema, U as FieldSchema, Un as TableField, Ut as SessionTranscript, V as FieldResponse, Vn as TableColumn, Vt as SessionFinal, W as FieldValue, Wn as TableFieldSchema, Wt as SessionTranscriptSchema, X as HarnessConfig, Xn as TableValueSchema, Xt as SetCheckboxesPatchSchema, Y as FrontmatterHarnessConfig, Yn as TableValue, Yt as SetCheckboxesPatch, Z as HarnessConfigSchema, Zn as UrlField, Zt as SetDatePatch, _ as CheckboxesValueSchema, _n as Severity, _r as WireResponseFormatSchema, _t as NodeType, a as ApprovalMode, an as SetStringListPatch, ar as ValidationIssue, at as IssueReason, b as ColumnTypeName, bn as SimpleCheckboxStateSchema, br as WireToolCall, bt as NumberFieldSchema, c as CheckboxMode, cn as SetStringPatchSchema, cr as ValidatorFn, ct as IssueScopeSchema, d as CheckboxProgressCountsSchema, dn as SetUrlListPatch, dr as ValidatorRegistry, dt as MultiCheckboxState, en as SetMultiSelectPatchSchema, er as UrlListFieldSchema, et as IdSchema, f as CheckboxValue, fn as SetUrlListPatchSchema, fr as WireFormat, ft as MultiCheckboxStateSchema, g as CheckboxesValue, gn as SetYearPatchSchema, gr as WireResponseFormat, gt as MultiSelectValueSchema, h as CheckboxesFieldSchema, hn as SetYearPatch, hr as WireRequestFormatSchema, ht as MultiSelectValue, i as ApplyResultSchema, in as SetSingleSelectPatchSchema, ir as UrlValueSchema, 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 ValidatorRef, lt as MarkformFrontmatter, m as CheckboxesField, mn as SetUrlPatchSchema, mr as WireRequestFormat, mt as MultiSelectFieldSchema, n as AnswerStateSchema, nn as SetNumberPatchSchema, nr as UrlListValueSchema, nt as InspectIssueSchema, o as CellResponse, on as SetStringListPatchSchema, or as ValidationIssueSchema, ot as IssueReasonSchema, p as CheckboxValueSchema, pn as SetUrlPatch, pr as WireFormatSchema, pt as MultiSelectField, q as FormSchema, qn as TableRowResponse, qt as SessionTurnSchema, r as ApplyResult, rn as SetSingleSelectPatch, rr as UrlValue, rt as InspectResult, s as CellResponseSchema, sn as SetStringPatch, sr as ValidatorContext, st as IssueScope, t as AnswerState, tn as SetNumberPatch, tr as UrlListValue, tt as InspectIssue, u as CheckboxProgressCounts, un as SetTablePatchSchema, ur as ValidatorRefSchema, ut as MarkformFrontmatterSchema, v as ClearFieldPatch, vn as SeveritySchema, vr as WireResponseStep, vt as Note, w as DateValue, wn as SingleSelectValueSchema, wr as YearField, wt as OptionId, x as ColumnTypeNameSchema, xn as SingleSelectField, xr as WireToolCallSchema, xt as NumberValue, y as ClearFieldPatchSchema, yn as SimpleCheckboxState, yr as WireResponseStepSchema, yt as NumberField, z as FieldProgress, zn as StructureSummary, zt as RunMode } from "./coreTypes-Cw_cJsa5.mjs";
4
3
  import { LanguageModel, Tool } from "ai";
5
4
 
6
- //#region src/engine/parseHelpers.d.ts
5
+ //#region src/errors.d.ts
7
6
 
8
- /** Parse error with source location info */
9
- declare class ParseError extends Error {
10
- readonly line?: number | undefined;
11
- readonly col?: number | undefined;
12
- constructor(message: string, line?: number | undefined, col?: number | undefined);
7
+ /**
8
+ * Structured error types for markform.
9
+ *
10
+ * Provides a typed error hierarchy with context-rich information for debugging
11
+ * and error handling by consumers.
12
+ */
13
+ /**
14
+ * Base error class for all markform errors.
15
+ * Consumers can catch this to handle any markform error.
16
+ */
17
+ declare class MarkformError extends Error {
18
+ readonly name: string;
19
+ readonly version: string;
20
+ constructor(message: string, options?: {
21
+ cause?: Error;
22
+ });
13
23
  }
24
+ /**
25
+ * Form definition/parsing errors.
26
+ * Thrown when the form markdown is invalid.
27
+ */
28
+ declare class MarkformParseError extends MarkformError {
29
+ readonly name = "MarkformParseError";
30
+ /** File path or form identifier */
31
+ readonly source?: string;
32
+ /** Line number in source (1-indexed) */
33
+ readonly line?: number;
34
+ /** Column number in source (1-indexed) */
35
+ readonly column?: number;
36
+ constructor(message: string, context?: {
37
+ source?: string;
38
+ line?: number;
39
+ column?: number;
40
+ cause?: Error;
41
+ });
42
+ }
43
+ /**
44
+ * Single patch validation error.
45
+ * Thrown when an LLM generates an invalid patch value.
46
+ */
47
+ declare class MarkformPatchError extends MarkformError {
48
+ readonly name = "MarkformPatchError";
49
+ /** The field ID that was targeted */
50
+ readonly fieldId: string;
51
+ /** The patch operation that failed */
52
+ readonly patchOperation: string;
53
+ /** The expected type description */
54
+ readonly expectedType: string;
55
+ /** The actual value that was received */
56
+ readonly receivedValue: unknown;
57
+ /** The type of the received value */
58
+ readonly receivedType: string;
59
+ /** Patch index in the batch (for batch operations) */
60
+ readonly patchIndex?: number;
61
+ constructor(message: string, context: {
62
+ fieldId: string;
63
+ patchOperation: string;
64
+ expectedType: string;
65
+ receivedValue: unknown;
66
+ patchIndex?: number;
67
+ cause?: Error;
68
+ });
69
+ }
70
+ /**
71
+ * Multiple validation errors in a single operation.
72
+ * Thrown when multiple patches fail validation.
73
+ */
74
+ declare class MarkformValidationError extends MarkformError {
75
+ readonly name = "MarkformValidationError";
76
+ /** Individual patch errors */
77
+ readonly issues: MarkformPatchError[];
78
+ constructor(issues: MarkformPatchError[]);
79
+ /** Get all affected field IDs */
80
+ get fieldIds(): string[];
81
+ }
82
+ /**
83
+ * LLM/API errors.
84
+ * Thrown for rate limits, timeouts, invalid responses, etc.
85
+ */
86
+ declare class MarkformLlmError extends MarkformError {
87
+ readonly name = "MarkformLlmError";
88
+ /** LLM provider (e.g., 'anthropic', 'openai') */
89
+ readonly provider?: string;
90
+ /** Model identifier */
91
+ readonly model?: string;
92
+ /** HTTP status code if applicable */
93
+ readonly statusCode?: number;
94
+ /** Whether this error is retryable */
95
+ readonly retryable: boolean;
96
+ constructor(message: string, context: {
97
+ provider?: string;
98
+ model?: string;
99
+ statusCode?: number;
100
+ retryable?: boolean;
101
+ cause?: Error;
102
+ });
103
+ }
104
+ /**
105
+ * Configuration errors.
106
+ * Thrown when invalid options are passed to fillForm, etc.
107
+ */
108
+ declare class MarkformConfigError extends MarkformError {
109
+ readonly name = "MarkformConfigError";
110
+ /** The configuration option that was invalid */
111
+ readonly option: string;
112
+ /** Expected type or value description */
113
+ readonly expectedType: string;
114
+ /** The actual value that was received */
115
+ readonly receivedValue: unknown;
116
+ constructor(message: string, context: {
117
+ option: string;
118
+ expectedType: string;
119
+ receivedValue: unknown;
120
+ });
121
+ }
122
+ /**
123
+ * Form abort error.
124
+ * Thrown when a form is explicitly aborted via abort_form patch.
125
+ */
126
+ declare class MarkformAbortError extends MarkformError {
127
+ readonly name = "MarkformAbortError";
128
+ /** The reason for aborting */
129
+ readonly reason: string;
130
+ /** Field ID that triggered the abort, if applicable */
131
+ readonly fieldId?: string;
132
+ constructor(reason: string, fieldId?: string);
133
+ }
134
+ /**
135
+ * Check if an error is any markform error.
136
+ * Works in environments where instanceof might not be reliable (bundlers, etc.).
137
+ */
138
+ declare function isMarkformError(error: unknown): error is MarkformError;
139
+ /** Check if an error is a parse error */
140
+ declare function isParseError(error: unknown): error is MarkformParseError;
141
+ /** Check if an error is a single patch error */
142
+ declare function isPatchError(error: unknown): error is MarkformPatchError;
143
+ /** Check if an error is a validation error (multiple patches) */
144
+ declare function isValidationError(error: unknown): error is MarkformValidationError;
145
+ /** Check if an error is an LLM/API error */
146
+ declare function isLlmError(error: unknown): error is MarkformLlmError;
147
+ /** Check if an error is a configuration error */
148
+ declare function isConfigError(error: unknown): error is MarkformConfigError;
149
+ /** Check if an error is a form abort error */
150
+ declare function isAbortError(error: unknown): error is MarkformAbortError;
151
+ /** Check if an error is retryable (currently only LLM errors) */
152
+ declare function isRetryableError(error: unknown): boolean;
153
+ /**
154
+ * Alias for MarkformParseError.
155
+ * @deprecated Use MarkformParseError instead. ParseError will be removed in a future version.
156
+ */
157
+ declare const ParseError: typeof MarkformParseError;
14
158
  //#endregion
15
159
  //#region src/engine/parse.d.ts
16
160
  /**
@@ -23,7 +167,6 @@ declare class ParseError extends Error {
23
167
  declare function parseForm(markdown: string): ParsedForm;
24
168
  //#endregion
25
169
  //#region src/engine/serialize.d.ts
26
-
27
170
  interface SerializeOptions {
28
171
  /** Markform spec version to use in frontmatter. Defaults to MF_SPEC_VERSION. */
29
172
  specVersion?: string;
@@ -35,7 +178,20 @@ interface SerializeOptions {
35
178
  * @param opts - Serialization options
36
179
  * @returns The canonical markdown string
37
180
  */
38
- declare function serialize(form: ParsedForm, opts?: SerializeOptions): string;
181
+ declare function serializeForm(form: ParsedForm, opts?: SerializeOptions): string;
182
+ /**
183
+ * Serialize a form to filtered markdown for reports.
184
+ *
185
+ * Produces clean, readable markdown with filtered content based on `report` attribute:
186
+ * - Fields with report=false are excluded
187
+ * - Groups with report=false are excluded
188
+ * - Documentation blocks with report=false are excluded
189
+ * - Instructions blocks are excluded by default (unless report=true)
190
+ *
191
+ * @param form - The parsed form to serialize
192
+ * @returns Filtered plain markdown string suitable for sharing
193
+ */
194
+ declare function serializeReport(form: ParsedForm): string;
39
195
  //#endregion
40
196
  //#region src/engine/summaries.d.ts
41
197
  /**
@@ -204,6 +360,8 @@ interface JsonSchemaProperty {
204
360
  maxItems?: number;
205
361
  uniqueItems?: boolean;
206
362
  additionalProperties?: boolean | JsonSchemaProperty;
363
+ anyOf?: JsonSchemaProperty[];
364
+ oneOf?: JsonSchemaProperty[];
207
365
  'x-markform'?: MarkformFieldExtension;
208
366
  }
209
367
  /** Root JSON Schema object (does not extend JsonSchemaProperty to allow different x-markform type) */
@@ -724,6 +882,19 @@ interface FillOptions {
724
882
  * When provided, model is ignored and this agent is used instead.
725
883
  */
726
884
  _testAgent?: Agent;
885
+ /**
886
+ * Capture wire format (full LLM request/response) in session logs.
887
+ *
888
+ * Wire format includes complete system prompts, context prompts, tool schemas,
889
+ * and LLM responses. This is useful for:
890
+ * - Golden tests requiring exact prompt matching
891
+ * - Debugging prompt issues
892
+ * - LLM regression testing
893
+ *
894
+ * **Warning**: Wire format significantly increases session file size (~2000+ lines
895
+ * per multi-turn session). Set to false for production use.
896
+ */
897
+ captureWireFormat: boolean;
727
898
  }
728
899
  /**
729
900
  * Progress information for each turn.
@@ -962,4 +1133,4 @@ declare function validateResearchForm(form: ParsedForm): {
962
1133
  /** Markform version (injected at build time). */
963
1134
  declare const VERSION: string;
964
1135
  //#endregion
965
- export { type AgentResponse, type AnswerState, AnswerStateSchema, type ApplyResult, ApplyResultSchema, type CellResponse, CellResponseSchema, type CellScopeRef, 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 Id, type IdIndexEntry, IdSchema, type InputContext, type InspectIssue, InspectIssueSchema, type InspectOptions, type InspectResult, InspectResultSchema, type IssueReason, IssueReasonSchema, type IssueScope, IssueScopeSchema, type JsonSchemaDraft, type JsonSchemaOptions, type JsonSchemaResult, type MarkformFieldExtension, type MarkformFrontmatter, MarkformFrontmatterSchema, type MarkformSchemaExtension, 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, findFieldById, formToJsonSchema, getFieldId, inspect, isCellRef, isFieldRef, isFormComplete, isQualifiedRef, isResearchForm, parseCellValue, parseForm, parseMarkdownTable, parseRawTable, parseScopeRef, parseSession, resolveHarnessConfig, runResearch, serialize, serializeScopeRef, serializeSession, validate, validateResearchForm };
1136
+ export { type AgentResponse, type AnswerState, AnswerStateSchema, type ApplyResult, ApplyResultSchema, type CellResponse, CellResponseSchema, type CellScopeRef, 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 Id, type IdIndexEntry, IdSchema, 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, findFieldById, formToJsonSchema, getFieldId, 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 };
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
- import { $ as SetUrlListPatchSchema, A as MultiCheckboxStateSchema, At as WireToolResultSchema, B as ProgressSummarySchema, C as HarnessConfigSchema, Ct as ValidationIssueSchema, D as IssueReasonSchema, Dt as WireResponseFormatSchema, E as InspectResultSchema, Et as WireRequestFormatSchema, F as OptionIdSchema, G as SetCheckboxesPatchSchema, H as SessionFinalSchema, I as OptionSchema, J as SetNumberPatchSchema, K as SetDatePatchSchema, L as PatchSchema, M as MultiSelectValueSchema, Mt as YearValueSchema, N as NumberFieldSchema, O as IssueScopeSchema, Ot as WireResponseStepSchema, P as NumberValueSchema, Q as SetTablePatchSchema, R as ProgressCountsSchema, S as FormSchemaSchema, St as UrlValueSchema, T as InspectIssueSchema, Tt as WireFormatSchema, U as SessionTranscriptSchema, V as RunModeSchema, W as SessionTurnSchema, X as SetStringListPatchSchema, Y as SetSingleSelectPatchSchema, Z as SetStringPatchSchema, _ as FieldKindSchema, _t as TableRowResponseSchema, a as CheckboxProgressCountsSchema, at as SingleSelectValueSchema, b as FieldSchema, bt as UrlListFieldSchema, c as CheckboxesValueSchema, ct as StepResultSchema, d as DateFieldSchema, dt as StringListValueSchema, et as SetUrlPatchSchema, f as DateValueSchema, ft as StringValueSchema, g as FieldGroupSchema, gt as TableRowPatchSchema, h as ExplicitCheckboxValueSchema, ht as TableFieldSchema, i as CheckboxModeSchema, it as SingleSelectFieldSchema, j as MultiSelectFieldSchema, jt as YearFieldSchema, k as MarkformFrontmatterSchema, kt as WireToolCallSchema, l as ClearFieldPatchSchema, lt as StringFieldSchema, m as DocumentationTagSchema, mt as TableColumnSchema, n as ApplyResultSchema, nt as SeveritySchema, o as CheckboxValueSchema, ot as SourcePositionSchema, p as DocumentationBlockSchema, pt as StructureSummarySchema, q as SetMultiSelectPatchSchema, r as CellResponseSchema, rt as SimpleCheckboxStateSchema, s as CheckboxesFieldSchema, st as SourceRangeSchema, t as AnswerStateSchema, tt as SetYearPatchSchema, u as ColumnTypeNameSchema, ut as StringListFieldSchema, v as FieldProgressSchema, vt as TableValueSchema, w as IdSchema, wt as ValidatorRefSchema, x as FieldValueSchema, xt as UrlListValueSchema, y as FieldResponseSchema, yt as UrlFieldSchema, z as ProgressStateSchema } from "./coreTypes-B1oI7qvV.mjs";
3
- import { a as validate, c as computeProgressSummary, d as serialize, i as inspect, l as computeStructureSummary, o as computeAllSummaries, s as computeFormState, t as applyPatches, u as isFormComplete } from "./apply-B2kt6C2z.mjs";
4
- import { A as parseRawTable, C as parseScopeRef, D as parseForm, E as formToJsonSchema, O as parseCellValue, S as isQualifiedRef, T as fieldToJsonSchema, _ as coerceToFieldPatch, a as resolveHarnessConfig, b as isCellRef, f as MockAgent, g as coerceInputContext, h as createHarness, i as runResearch, j as ParseError, k as parseMarkdownTable, m as FormHarness, n as isResearchForm, o as fillForm, p as createMockAgent, r as validateResearchForm, t as VERSION, v as findFieldById, w as serializeScopeRef, x as isFieldRef, y as getFieldId } from "./src-DFsC5wwy.mjs";
5
- import { n as serializeSession, t as parseSession } from "./session-Dxqwt0RC.mjs";
2
+ import { $ as SetUrlListPatchSchema, A as MultiCheckboxStateSchema, At as WireToolResultSchema, B as ProgressSummarySchema, C as HarnessConfigSchema, Ct as ValidationIssueSchema, D as IssueReasonSchema, Dt as WireResponseFormatSchema, E as InspectResultSchema, Et as WireRequestFormatSchema, F as OptionIdSchema, G as SetCheckboxesPatchSchema, H as SessionFinalSchema, I as OptionSchema, J as SetNumberPatchSchema, K as SetDatePatchSchema, L as PatchSchema, M as MultiSelectValueSchema, Mt as YearValueSchema, N as NumberFieldSchema, O as IssueScopeSchema, Ot as WireResponseStepSchema, P as NumberValueSchema, Q as SetTablePatchSchema, R as ProgressCountsSchema, S as FormSchemaSchema, St as UrlValueSchema, T as InspectIssueSchema, Tt as WireFormatSchema, U as SessionTranscriptSchema, V as RunModeSchema, W as SessionTurnSchema, X as SetStringListPatchSchema, Y as SetSingleSelectPatchSchema, Z as SetStringPatchSchema, _ as FieldKindSchema, _t as TableRowResponseSchema, a as CheckboxProgressCountsSchema, at as SingleSelectValueSchema, b as FieldSchema, bt as UrlListFieldSchema, c as CheckboxesValueSchema, ct as StepResultSchema, d as DateFieldSchema, dt as StringListValueSchema, et as SetUrlPatchSchema, f as DateValueSchema, ft as StringValueSchema, g as FieldGroupSchema, gt as TableRowPatchSchema, h as ExplicitCheckboxValueSchema, ht as TableFieldSchema, i as CheckboxModeSchema, it as SingleSelectFieldSchema, j as MultiSelectFieldSchema, jt as YearFieldSchema, k as MarkformFrontmatterSchema, kt as WireToolCallSchema, l as ClearFieldPatchSchema, lt as StringFieldSchema, m as DocumentationTagSchema, mt as TableColumnSchema, n as ApplyResultSchema, nt as SeveritySchema, o as CheckboxValueSchema, ot as SourcePositionSchema, p as DocumentationBlockSchema, pt as StructureSummarySchema, q as SetMultiSelectPatchSchema, r as CellResponseSchema, rt as SimpleCheckboxStateSchema, s as CheckboxesFieldSchema, st as SourceRangeSchema, t as AnswerStateSchema, tt as SetYearPatchSchema, u as ColumnTypeNameSchema, ut as StringListFieldSchema, v as FieldProgressSchema, vt as TableValueSchema, w as IdSchema, wt as ValidatorRefSchema, x as FieldValueSchema, xt as UrlListValueSchema, y as FieldResponseSchema, yt as UrlFieldSchema, z as ProgressStateSchema } from "./coreTypes-Z8SvQyoL.mjs";
3
+ import { $ as isPatchError, B as MarkformAbortError, G as MarkformPatchError, H as MarkformError, J as isAbortError, K as MarkformValidationError, Q as isParseError, U as MarkformLlmError, V as MarkformConfigError, W as MarkformParseError, X as isLlmError, Y as isConfigError, Z as isMarkformError, a as validate, c as computeProgressSummary, d as serializeForm, et as isRetryableError, i as inspect, l as computeStructureSummary, o as computeAllSummaries, p as serializeReport, q as ParseError, s as computeFormState, t as applyPatches, tt as isValidationError, u as isFormComplete } from "./apply-yfRtNIHc.mjs";
4
+ import { A as parseRawTable, C as parseScopeRef, D as parseForm, E as formToJsonSchema, O as parseCellValue, S as isQualifiedRef, T as fieldToJsonSchema, _ as coerceToFieldPatch, a as resolveHarnessConfig, b as isCellRef, f as MockAgent, g as coerceInputContext, h as createHarness, i as runResearch, k as parseMarkdownTable, m as FormHarness, n as isResearchForm, o as fillForm, p as createMockAgent, r as validateResearchForm, t as VERSION, v as findFieldById, w as serializeScopeRef, x as isFieldRef, y as getFieldId } from "./src-ozWOSQTW.mjs";
5
+ import { n as serializeSession, t as parseSession } from "./session-DX-DvjRP.mjs";
6
6
 
7
- export { AnswerStateSchema, ApplyResultSchema, CellResponseSchema, CheckboxModeSchema, CheckboxProgressCountsSchema, CheckboxValueSchema, CheckboxesFieldSchema, CheckboxesValueSchema, ClearFieldPatchSchema, ColumnTypeNameSchema, DateFieldSchema, DateValueSchema, DocumentationBlockSchema, DocumentationTagSchema, ExplicitCheckboxValueSchema, FieldGroupSchema, FieldKindSchema, FieldProgressSchema, FieldResponseSchema, FieldSchema, FieldValueSchema, FormHarness, FormSchemaSchema, HarnessConfigSchema, IdSchema, InspectIssueSchema, InspectResultSchema, IssueReasonSchema, IssueScopeSchema, MarkformFrontmatterSchema, MockAgent, MultiCheckboxStateSchema, MultiSelectFieldSchema, MultiSelectValueSchema, NumberFieldSchema, NumberValueSchema, OptionIdSchema, OptionSchema, ParseError, PatchSchema, ProgressCountsSchema, ProgressStateSchema, ProgressSummarySchema, RunModeSchema, SessionFinalSchema, SessionTranscriptSchema, SessionTurnSchema, SetCheckboxesPatchSchema, SetDatePatchSchema, SetMultiSelectPatchSchema, SetNumberPatchSchema, SetSingleSelectPatchSchema, SetStringListPatchSchema, SetStringPatchSchema, SetTablePatchSchema, SetUrlListPatchSchema, SetUrlPatchSchema, SetYearPatchSchema, SeveritySchema, SimpleCheckboxStateSchema, SingleSelectFieldSchema, SingleSelectValueSchema, SourcePositionSchema, SourceRangeSchema, StepResultSchema, StringFieldSchema, StringListFieldSchema, StringListValueSchema, StringValueSchema, StructureSummarySchema, TableColumnSchema, TableFieldSchema, TableRowPatchSchema, TableRowResponseSchema, TableValueSchema, UrlFieldSchema, UrlListFieldSchema, UrlListValueSchema, UrlValueSchema, VERSION, ValidationIssueSchema, ValidatorRefSchema, WireFormatSchema, WireRequestFormatSchema, WireResponseFormatSchema, WireResponseStepSchema, WireToolCallSchema, WireToolResultSchema, YearFieldSchema, YearValueSchema, applyPatches, coerceInputContext, coerceToFieldPatch, computeAllSummaries, computeFormState, computeProgressSummary, computeStructureSummary, createHarness, createMockAgent, fieldToJsonSchema, fillForm, findFieldById, formToJsonSchema, getFieldId, inspect, isCellRef, isFieldRef, isFormComplete, isQualifiedRef, isResearchForm, parseCellValue, parseForm, parseMarkdownTable, parseRawTable, parseScopeRef, parseSession, resolveHarnessConfig, runResearch, serialize, serializeScopeRef, serializeSession, validate, validateResearchForm };
7
+ export { AnswerStateSchema, ApplyResultSchema, CellResponseSchema, CheckboxModeSchema, CheckboxProgressCountsSchema, CheckboxValueSchema, CheckboxesFieldSchema, CheckboxesValueSchema, ClearFieldPatchSchema, ColumnTypeNameSchema, DateFieldSchema, DateValueSchema, DocumentationBlockSchema, DocumentationTagSchema, ExplicitCheckboxValueSchema, FieldGroupSchema, FieldKindSchema, FieldProgressSchema, FieldResponseSchema, FieldSchema, FieldValueSchema, FormHarness, FormSchemaSchema, HarnessConfigSchema, IdSchema, InspectIssueSchema, InspectResultSchema, IssueReasonSchema, IssueScopeSchema, MarkformAbortError, MarkformConfigError, MarkformError, MarkformFrontmatterSchema, MarkformLlmError, MarkformParseError, MarkformPatchError, MarkformValidationError, MockAgent, MultiCheckboxStateSchema, MultiSelectFieldSchema, MultiSelectValueSchema, NumberFieldSchema, NumberValueSchema, OptionIdSchema, OptionSchema, ParseError, PatchSchema, ProgressCountsSchema, ProgressStateSchema, ProgressSummarySchema, RunModeSchema, SessionFinalSchema, SessionTranscriptSchema, SessionTurnSchema, SetCheckboxesPatchSchema, SetDatePatchSchema, SetMultiSelectPatchSchema, SetNumberPatchSchema, SetSingleSelectPatchSchema, SetStringListPatchSchema, SetStringPatchSchema, SetTablePatchSchema, SetUrlListPatchSchema, SetUrlPatchSchema, SetYearPatchSchema, SeveritySchema, SimpleCheckboxStateSchema, SingleSelectFieldSchema, SingleSelectValueSchema, SourcePositionSchema, SourceRangeSchema, StepResultSchema, StringFieldSchema, StringListFieldSchema, StringListValueSchema, StringValueSchema, StructureSummarySchema, TableColumnSchema, TableFieldSchema, TableRowPatchSchema, TableRowResponseSchema, TableValueSchema, UrlFieldSchema, UrlListFieldSchema, UrlListValueSchema, UrlValueSchema, VERSION, ValidationIssueSchema, ValidatorRefSchema, WireFormatSchema, WireRequestFormatSchema, WireResponseFormatSchema, WireResponseStepSchema, WireToolCallSchema, WireToolResultSchema, YearFieldSchema, YearValueSchema, applyPatches, coerceInputContext, coerceToFieldPatch, computeAllSummaries, computeFormState, computeProgressSummary, computeStructureSummary, createHarness, createMockAgent, fieldToJsonSchema, fillForm, findFieldById, formToJsonSchema, getFieldId, 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 };
@@ -1,4 +1,4 @@
1
1
 
2
- import { n as serializeSession, t as parseSession } from "./session-Dxqwt0RC.mjs";
2
+ import { n as serializeSession, t as parseSession } from "./session-DX-DvjRP.mjs";
3
3
 
4
4
  export { serializeSession };
@@ -1,5 +1,5 @@
1
1
 
2
- import { U as SessionTranscriptSchema } from "./coreTypes-B1oI7qvV.mjs";
2
+ import { U as SessionTranscriptSchema } from "./coreTypes-Z8SvQyoL.mjs";
3
3
  import YAML from "yaml";
4
4
 
5
5
  //#region src/engine/session.ts
@@ -77,8 +77,8 @@ function toCamelCaseDeep(obj, preserveKeys = false) {
77
77
  const record = obj;
78
78
  for (const [key, value] of Object.entries(record)) {
79
79
  const resultKey = preserveKeys ? key : snakeToCamel(key);
80
- const isCheckboxValues = key === "values" && record.op === "set_checkboxes";
81
- const isTableRows = key === "rows" && record.op === "set_table";
80
+ const isCheckboxValues = key === "value" && record.op === "set_checkboxes";
81
+ const isTableRows = key === "value" && record.op === "set_table";
82
82
  result[resultKey] = toCamelCaseDeep(value, isCheckboxValues || isTableRows || key === "tools");
83
83
  }
84
84
  return result;
@@ -102,8 +102,8 @@ function toSnakeCaseDeep(obj, preserveKeys = false) {
102
102
  const record = obj;
103
103
  for (const [key, value] of Object.entries(record)) {
104
104
  const resultKey = preserveKeys ? key : camelToSnake(key);
105
- const isCheckboxValues = key === "values" && record.op === "set_checkboxes";
106
- const isTableRows = key === "rows" && record.op === "set_table";
105
+ const isCheckboxValues = key === "value" && record.op === "set_checkboxes";
106
+ const isTableRows = key === "value" && record.op === "set_table";
107
107
  result[resultKey] = toSnakeCaseDeep(value, isCheckboxValues || isTableRows || key === "tools");
108
108
  }
109
109
  return result;