markform 0.1.21 → 0.1.23
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/README.md +66 -18
- package/dist/ai-sdk.d.mts +1 -1
- package/dist/ai-sdk.mjs +1 -1
- package/dist/{apply-CD-t7ovb.mjs → apply-KzQztrDV.mjs} +100 -74
- package/dist/apply-KzQztrDV.mjs.map +1 -0
- package/dist/bin.mjs +1 -1
- package/dist/{cli-ChdIy1a7.mjs → cli-ZcOC47KK.mjs} +24 -1213
- package/dist/cli-ZcOC47KK.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/{coreTypes-BQrWf_Wt.d.mts → coreTypes-BlsJkU1w.d.mts} +1 -1
- package/dist/fillRecord-DTl5lnK0.d.mts +345 -0
- package/dist/fillRecordRenderer-VBQ2vwPV.mjs +1253 -0
- package/dist/fillRecordRenderer-VBQ2vwPV.mjs.map +1 -0
- package/dist/index.d.mts +53 -343
- package/dist/index.mjs +4 -4
- package/dist/render.d.mts +74 -0
- package/dist/render.mjs +4 -0
- package/dist/{session-ZgegwtkT.mjs → session-BCcltrLA.mjs} +1 -1
- package/dist/{session-ZgegwtkT.mjs.map → session-BCcltrLA.mjs.map} +1 -1
- package/dist/{session-BPuQ-ok0.mjs → session-VeSkVrck.mjs} +1 -1
- package/dist/{shared-DwdyWmvE.mjs → shared-CsdT2T7k.mjs} +1 -1
- package/dist/{shared-DwdyWmvE.mjs.map → shared-CsdT2T7k.mjs.map} +1 -1
- package/dist/{shared-BTR35aMz.mjs → shared-fb0nkzQi.mjs} +1 -1
- package/dist/{src-DOPe4tmu.mjs → src-B2uFvGli.mjs} +103 -21
- package/dist/{src-DOPe4tmu.mjs.map → src-B2uFvGli.mjs.map} +1 -1
- package/dist/urlFormat-lls7CsEP.mjs +71 -0
- package/dist/urlFormat-lls7CsEP.mjs.map +1 -0
- package/docs/markform-apis.md +53 -0
- package/examples/simple/simple-skipped-filled.report.md +8 -8
- package/examples/twitter-thread/twitter-thread.form.md +373 -0
- package/package.json +5 -1
- package/dist/apply-CD-t7ovb.mjs.map +0 -1
- package/dist/cli-ChdIy1a7.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { $ as HarnessConfigSchema, $n as TableValue, $t as SetCheckboxesPatchSchema, A as ExecutionPlan, An as SourceRange, Ar as YearValue, At as ParsedForm, B as FieldPriorityLevel, Bn as StringValue, Bt as QualifiedColumnRef, C as DateFieldSchema, Cn as SimpleCheckboxStateSchema, Cr as WireResponseStepSchema, Ct as NumberFieldSchema, D as DocumentationBlockSchema, Dn as SingleSelectValueSchema, Dr as WireToolResultSchema, Dt as OptionId, E as DocumentationBlock, En as SingleSelectValue, Er as WireToolResult, Et as Option, F as FieldBase, Fn as StringFieldSchema, Ft as ProgressCountsSchema, G as FieldSchema, Gn as TableColumn, Gt as SessionFinalSchema, H as FieldProgressSchema, Hn as StructureSummary, Ht as RunMode, I as FieldGroup, In as StringListField, It as ProgressState, J as FillMode, Jn as TableFieldSchema, Jt as SessionTurn, K as FieldValue, Kn as TableColumnSchema, Kt as SessionTranscript, L as FieldGroupSchema, Ln as StringListFieldSchema, Lt as ProgressStateSchema, M as ExplicitCheckboxValue, Mn as StepResult, Mt as PatchRejection, N as ExplicitCheckboxValueSchema, Nn as StepResultSchema, Nt as PatchSchema, O as DocumentationTag, On as SourcePosition, Or as YearField, Ot as OptionIdSchema, P as Field, Pn as StringField, Pt as ProgressCounts, Q as HarnessConfig, Qn as TableRowResponseSchema, Qt as SetCheckboxesPatch, R as FieldKind, Rn as StringListValue, Rt as ProgressSummary, S as DateField, Sn as SimpleCheckboxState, Sr as WireResponseStep, St as NumberField, T as DateValueSchema, Tn as SingleSelectFieldSchema, Tr as WireToolCallSchema, Tt as NumberValueSchema, U as FieldResponse, Un as StructureSummarySchema, Ut as RunModeSchema, V as FieldProgress, Vn as StringValueSchema, Vt as QualifiedOptionRef, W as FieldResponseSchema, Wn as SyntaxStyle, Wt as SessionFinal, X as FormSchemaSchema, Xn as TableRowPatchSchema, Xt as SessionTurnSchema, Y as FormSchema, Yn as TableRowPatch, Yt as SessionTurnContext, Z as FrontmatterHarnessConfig, Zn as TableRowResponse, Zt as SessionTurnStats, _ as CheckboxesValueSchema, _n as SetUrlPatchSchema, _r as WireFormatSchema, _t as MultiSelectFieldSchema, a as ApprovalMode, an as SetNumberPatchSchema, ar as UrlListValue, at as InspectResult, b as ColumnTypeName, bn as Severity, br as WireResponseFormat, bt as NodeType, c as CheckboxMode, cn as SetStringListPatch, cr as UrlValueSchema, ct as IssueReasonSchema, d as CheckboxProgressCountsSchema, dn as SetStringPatchSchema, dr as ValidatorContext, dt as MarkformFrontmatter, en as SetDatePatch, er as TableValueSchema, et as Id, f as CheckboxValue, fn as SetTablePatch, fr as ValidatorFn, ft as MarkformFrontmatterSchema, g as CheckboxesValue, gn as SetUrlPatch, gr as WireFormat, gt as MultiSelectField, h as CheckboxesFieldSchema, hn as SetUrlListPatchSchema, hr as ValidatorRegistry, ht as MultiCheckboxStateSchema, i as ApplyResultSchema, in as SetNumberPatch, ir as UrlListFieldSchema, it as InspectIssueSchema, j as ExecutionPlanItem, jn as SourceRangeSchema, jr as YearValueSchema, jt as Patch, k as DocumentationTagSchema, kn as SourcePositionSchema, kr as YearFieldSchema, kt as OptionSchema, l as CheckboxModeSchema, ln as SetStringListPatchSchema, lr as ValidationIssue, lt as IssueScope, m as CheckboxesField, mn as SetUrlListPatch, mr as ValidatorRefSchema, mt as MultiCheckboxState, n as AnswerStateSchema, nn as SetMultiSelectPatch, nr as UrlFieldSchema, nt as IdSchema, o as CellResponse, on as SetSingleSelectPatch, or as UrlListValueSchema, ot as InspectResultSchema, p as CheckboxValueSchema, pn as SetTablePatchSchema, pr as ValidatorRef, pt as MarkformSectionInputSchema, q as FieldValueSchema, qn as TableField, qt as SessionTranscriptSchema, r as ApplyResult, rn as SetMultiSelectPatchSchema, rr as UrlListField, rt as InspectIssue, s as CellResponseSchema, sn as SetSingleSelectPatchSchema, sr as UrlValue, st as IssueReason, t as AnswerState, tn as SetDatePatchSchema, tr as UrlField, tt as IdIndexEntry, u as CheckboxProgressCounts, un as SetStringPatch, ur as ValidationIssueSchema, ut as IssueScopeSchema, v as ClearFieldPatch, vn as SetYearPatch, vr as WireRequestFormat, vt as MultiSelectValue, w as DateValue, wn as SingleSelectField, wr as WireToolCall, wt as NumberValue, x as ColumnTypeNameSchema, xn as SeveritySchema, xr as WireResponseFormatSchema, xt as Note, y as ClearFieldPatchSchema, yn as SetYearPatchSchema, yr as WireRequestFormatSchema, yt as MultiSelectValueSchema, z as FieldKindSchema, zn as StringListValueSchema, zt as ProgressSummarySchema } from "./coreTypes-
|
|
3
|
-
import {
|
|
2
|
+
import { $ as HarnessConfigSchema, $n as TableValue, $t as SetCheckboxesPatchSchema, A as ExecutionPlan, An as SourceRange, Ar as YearValue, At as ParsedForm, B as FieldPriorityLevel, Bn as StringValue, Bt as QualifiedColumnRef, C as DateFieldSchema, Cn as SimpleCheckboxStateSchema, Cr as WireResponseStepSchema, Ct as NumberFieldSchema, D as DocumentationBlockSchema, Dn as SingleSelectValueSchema, Dr as WireToolResultSchema, Dt as OptionId, E as DocumentationBlock, En as SingleSelectValue, Er as WireToolResult, Et as Option, F as FieldBase, Fn as StringFieldSchema, Ft as ProgressCountsSchema, G as FieldSchema, Gn as TableColumn, Gt as SessionFinalSchema, H as FieldProgressSchema, Hn as StructureSummary, Ht as RunMode, I as FieldGroup, In as StringListField, It as ProgressState, J as FillMode, Jn as TableFieldSchema, Jt as SessionTurn, K as FieldValue, Kn as TableColumnSchema, Kt as SessionTranscript, L as FieldGroupSchema, Ln as StringListFieldSchema, Lt as ProgressStateSchema, M as ExplicitCheckboxValue, Mn as StepResult, Mt as PatchRejection, N as ExplicitCheckboxValueSchema, Nn as StepResultSchema, Nt as PatchSchema, O as DocumentationTag, On as SourcePosition, Or as YearField, Ot as OptionIdSchema, P as Field, Pn as StringField, Pt as ProgressCounts, Q as HarnessConfig, Qn as TableRowResponseSchema, Qt as SetCheckboxesPatch, R as FieldKind, Rn as StringListValue, Rt as ProgressSummary, S as DateField, Sn as SimpleCheckboxState, Sr as WireResponseStep, St as NumberField, T as DateValueSchema, Tn as SingleSelectFieldSchema, Tr as WireToolCallSchema, Tt as NumberValueSchema, U as FieldResponse, Un as StructureSummarySchema, Ut as RunModeSchema, V as FieldProgress, Vn as StringValueSchema, Vt as QualifiedOptionRef, W as FieldResponseSchema, Wn as SyntaxStyle, Wt as SessionFinal, X as FormSchemaSchema, Xn as TableRowPatchSchema, Xt as SessionTurnSchema, Y as FormSchema, Yn as TableRowPatch, Yt as SessionTurnContext, Z as FrontmatterHarnessConfig, Zn as TableRowResponse, Zt as SessionTurnStats, _ as CheckboxesValueSchema, _n as SetUrlPatchSchema, _r as WireFormatSchema, _t as MultiSelectFieldSchema, a as ApprovalMode, an as SetNumberPatchSchema, ar as UrlListValue, at as InspectResult, b as ColumnTypeName, bn as Severity, br as WireResponseFormat, bt as NodeType, c as CheckboxMode, cn as SetStringListPatch, cr as UrlValueSchema, ct as IssueReasonSchema, d as CheckboxProgressCountsSchema, dn as SetStringPatchSchema, dr as ValidatorContext, dt as MarkformFrontmatter, en as SetDatePatch, er as TableValueSchema, et as Id, f as CheckboxValue, fn as SetTablePatch, fr as ValidatorFn, ft as MarkformFrontmatterSchema, g as CheckboxesValue, gn as SetUrlPatch, gr as WireFormat, gt as MultiSelectField, h as CheckboxesFieldSchema, hn as SetUrlListPatchSchema, hr as ValidatorRegistry, ht as MultiCheckboxStateSchema, i as ApplyResultSchema, in as SetNumberPatch, ir as UrlListFieldSchema, it as InspectIssueSchema, j as ExecutionPlanItem, jn as SourceRangeSchema, jr as YearValueSchema, jt as Patch, k as DocumentationTagSchema, kn as SourcePositionSchema, kr as YearFieldSchema, kt as OptionSchema, l as CheckboxModeSchema, ln as SetStringListPatchSchema, lr as ValidationIssue, lt as IssueScope, m as CheckboxesField, mn as SetUrlListPatch, mr as ValidatorRefSchema, mt as MultiCheckboxState, n as AnswerStateSchema, nn as SetMultiSelectPatch, nr as UrlFieldSchema, nt as IdSchema, o as CellResponse, on as SetSingleSelectPatch, or as UrlListValueSchema, ot as InspectResultSchema, p as CheckboxValueSchema, pn as SetTablePatchSchema, pr as ValidatorRef, pt as MarkformSectionInputSchema, q as FieldValueSchema, qn as TableField, qt as SessionTranscriptSchema, r as ApplyResult, rn as SetMultiSelectPatchSchema, rr as UrlListField, rt as InspectIssue, s as CellResponseSchema, sn as SetSingleSelectPatchSchema, sr as UrlValue, st as IssueReason, t as AnswerState, tn as SetDatePatchSchema, tr as UrlField, tt as IdIndexEntry, u as CheckboxProgressCounts, un as SetStringPatch, ur as ValidationIssueSchema, ut as IssueScopeSchema, v as ClearFieldPatch, vn as SetYearPatch, vr as WireRequestFormat, vt as MultiSelectValue, w as DateValue, wn as SingleSelectField, wr as WireToolCall, wt as NumberValue, x as ColumnTypeNameSchema, xn as SeveritySchema, xr as WireResponseFormatSchema, xt as Note, y as ClearFieldPatchSchema, yn as SetYearPatchSchema, yr as WireRequestFormatSchema, yt as MultiSelectValueSchema, z as FieldKindSchema, zn as StringListValueSchema, zt as ProgressSummarySchema } from "./coreTypes-BlsJkU1w.mjs";
|
|
3
|
+
import { _ as ToolSummary, a as FillRecordStatus, c as TimelineEntrySchema, d as TimingBreakdownItemSchema, f as TimingBreakdownSchema, g as ToolStatsSchema, h as ToolStats, i as FillRecordSchema, l as TimingBreakdown, m as ToolCallRecordSchema, n as ExecutionMetadataSchema, o as FillRecordStatusSchema, p as ToolCallRecord, r as FillRecord, s as TimelineEntry, t as ExecutionMetadata, u as TimingBreakdownItem, v as ToolSummarySchema } from "./fillRecord-DTl5lnK0.mjs";
|
|
4
4
|
import { LanguageModel, Tool } from "ai";
|
|
5
5
|
|
|
6
6
|
//#region src/errors.d.ts
|
|
@@ -93,11 +93,14 @@ declare class MarkformLlmError extends MarkformError {
|
|
|
93
93
|
readonly statusCode?: number;
|
|
94
94
|
/** Whether this error is retryable */
|
|
95
95
|
readonly retryable: boolean;
|
|
96
|
+
/** Raw response body from the API (for debugging) */
|
|
97
|
+
readonly responseBody?: string;
|
|
96
98
|
constructor(message: string, context: {
|
|
97
99
|
provider?: string;
|
|
98
100
|
model?: string;
|
|
99
101
|
statusCode?: number;
|
|
100
102
|
retryable?: boolean;
|
|
103
|
+
responseBody?: string;
|
|
101
104
|
cause?: Error;
|
|
102
105
|
});
|
|
103
106
|
}
|
|
@@ -861,346 +864,6 @@ declare class FormHarness {
|
|
|
861
864
|
*/
|
|
862
865
|
declare function createHarness(form: ParsedForm, config?: Partial<HarnessConfig>): FormHarness;
|
|
863
866
|
//#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
|
-
startMs: z.ZodNumber;
|
|
898
|
-
durationMs: z.ZodNumber;
|
|
899
|
-
success: z.ZodBoolean;
|
|
900
|
-
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
901
|
-
result: z.ZodOptional<z.ZodObject<{
|
|
902
|
-
resultCount: z.ZodOptional<z.ZodNumber>;
|
|
903
|
-
error: z.ZodOptional<z.ZodString>;
|
|
904
|
-
}, z.core.$strip>>;
|
|
905
|
-
}, z.core.$strip>;
|
|
906
|
-
type ToolCallRecord = z.infer<typeof ToolCallRecordSchema>;
|
|
907
|
-
/**
|
|
908
|
-
* Single turn in the fill timeline.
|
|
909
|
-
*/
|
|
910
|
-
declare const TimelineEntrySchema: z.ZodObject<{
|
|
911
|
-
turnNumber: z.ZodNumber;
|
|
912
|
-
order: z.ZodNumber;
|
|
913
|
-
executionId: z.ZodString;
|
|
914
|
-
startedAt: z.ZodString;
|
|
915
|
-
completedAt: z.ZodString;
|
|
916
|
-
startMs: z.ZodNumber;
|
|
917
|
-
durationMs: z.ZodNumber;
|
|
918
|
-
issuesAddressed: z.ZodNumber;
|
|
919
|
-
patchesApplied: z.ZodNumber;
|
|
920
|
-
patchesRejected: z.ZodNumber;
|
|
921
|
-
tokens: z.ZodObject<{
|
|
922
|
-
input: z.ZodNumber;
|
|
923
|
-
output: z.ZodNumber;
|
|
924
|
-
}, z.core.$strip>;
|
|
925
|
-
toolCalls: z.ZodArray<z.ZodObject<{
|
|
926
|
-
tool: z.ZodString;
|
|
927
|
-
startedAt: z.ZodString;
|
|
928
|
-
completedAt: z.ZodString;
|
|
929
|
-
startMs: z.ZodNumber;
|
|
930
|
-
durationMs: z.ZodNumber;
|
|
931
|
-
success: z.ZodBoolean;
|
|
932
|
-
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
933
|
-
result: z.ZodOptional<z.ZodObject<{
|
|
934
|
-
resultCount: z.ZodOptional<z.ZodNumber>;
|
|
935
|
-
error: z.ZodOptional<z.ZodString>;
|
|
936
|
-
}, z.core.$strip>>;
|
|
937
|
-
}, z.core.$strip>>;
|
|
938
|
-
}, z.core.$strip>;
|
|
939
|
-
type TimelineEntry = z.infer<typeof TimelineEntrySchema>;
|
|
940
|
-
/**
|
|
941
|
-
* Breakdown item for visualization.
|
|
942
|
-
*/
|
|
943
|
-
declare const TimingBreakdownItemSchema: z.ZodObject<{
|
|
944
|
-
category: z.ZodEnum<{
|
|
945
|
-
llm: "llm";
|
|
946
|
-
tools: "tools";
|
|
947
|
-
overhead: "overhead";
|
|
948
|
-
}>;
|
|
949
|
-
label: z.ZodString;
|
|
950
|
-
ms: z.ZodNumber;
|
|
951
|
-
percentage: z.ZodNumber;
|
|
952
|
-
}, z.core.$strip>;
|
|
953
|
-
type TimingBreakdownItem = z.infer<typeof TimingBreakdownItemSchema>;
|
|
954
|
-
/**
|
|
955
|
-
* Timing breakdown showing where time was spent.
|
|
956
|
-
*/
|
|
957
|
-
declare const TimingBreakdownSchema: z.ZodObject<{
|
|
958
|
-
totalMs: z.ZodNumber;
|
|
959
|
-
llmTimeMs: z.ZodNumber;
|
|
960
|
-
toolTimeMs: z.ZodNumber;
|
|
961
|
-
overheadMs: z.ZodNumber;
|
|
962
|
-
breakdown: z.ZodArray<z.ZodObject<{
|
|
963
|
-
category: z.ZodEnum<{
|
|
964
|
-
llm: "llm";
|
|
965
|
-
tools: "tools";
|
|
966
|
-
overhead: "overhead";
|
|
967
|
-
}>;
|
|
968
|
-
label: z.ZodString;
|
|
969
|
-
ms: z.ZodNumber;
|
|
970
|
-
percentage: z.ZodNumber;
|
|
971
|
-
}, z.core.$strip>>;
|
|
972
|
-
}, z.core.$strip>;
|
|
973
|
-
type TimingBreakdown = z.infer<typeof TimingBreakdownSchema>;
|
|
974
|
-
/**
|
|
975
|
-
* Aggregated tool usage statistics.
|
|
976
|
-
*/
|
|
977
|
-
declare const ToolSummarySchema: z.ZodObject<{
|
|
978
|
-
totalCalls: z.ZodNumber;
|
|
979
|
-
successfulCalls: z.ZodNumber;
|
|
980
|
-
failedCalls: z.ZodNumber;
|
|
981
|
-
successRate: z.ZodNumber;
|
|
982
|
-
totalDurationMs: z.ZodNumber;
|
|
983
|
-
byTool: z.ZodArray<z.ZodObject<{
|
|
984
|
-
toolName: z.ZodString;
|
|
985
|
-
callCount: z.ZodNumber;
|
|
986
|
-
successCount: z.ZodNumber;
|
|
987
|
-
failureCount: z.ZodNumber;
|
|
988
|
-
successRate: z.ZodNumber;
|
|
989
|
-
results: z.ZodOptional<z.ZodObject<{
|
|
990
|
-
totalResults: z.ZodNumber;
|
|
991
|
-
avgResultsPerCall: z.ZodNumber;
|
|
992
|
-
zeroResultCalls: z.ZodNumber;
|
|
993
|
-
}, z.core.$strip>>;
|
|
994
|
-
timing: z.ZodObject<{
|
|
995
|
-
totalMs: z.ZodNumber;
|
|
996
|
-
avgMs: z.ZodNumber;
|
|
997
|
-
minMs: z.ZodNumber;
|
|
998
|
-
maxMs: z.ZodNumber;
|
|
999
|
-
p50Ms: z.ZodNumber;
|
|
1000
|
-
p95Ms: z.ZodNumber;
|
|
1001
|
-
}, z.core.$strip>;
|
|
1002
|
-
}, z.core.$strip>>;
|
|
1003
|
-
}, z.core.$strip>;
|
|
1004
|
-
type ToolSummary = z.infer<typeof ToolSummarySchema>;
|
|
1005
|
-
/**
|
|
1006
|
-
* Execution metadata for the fill.
|
|
1007
|
-
*/
|
|
1008
|
-
declare const ExecutionMetadataSchema: z.ZodObject<{
|
|
1009
|
-
totalTurns: z.ZodNumber;
|
|
1010
|
-
parallelEnabled: z.ZodBoolean;
|
|
1011
|
-
maxParallelAgents: z.ZodOptional<z.ZodNumber>;
|
|
1012
|
-
orderLevels: z.ZodArray<z.ZodNumber>;
|
|
1013
|
-
executionThreads: z.ZodArray<z.ZodString>;
|
|
1014
|
-
}, z.core.$strip>;
|
|
1015
|
-
type ExecutionMetadata = z.infer<typeof ExecutionMetadataSchema>;
|
|
1016
|
-
/**
|
|
1017
|
-
* Fill status enum.
|
|
1018
|
-
*/
|
|
1019
|
-
declare const FillRecordStatusSchema: z.ZodEnum<{
|
|
1020
|
-
partial: "partial";
|
|
1021
|
-
completed: "completed";
|
|
1022
|
-
failed: "failed";
|
|
1023
|
-
cancelled: "cancelled";
|
|
1024
|
-
}>;
|
|
1025
|
-
type FillRecordStatus = z.infer<typeof FillRecordStatusSchema>;
|
|
1026
|
-
/**
|
|
1027
|
-
* Complete record of a form fill operation.
|
|
1028
|
-
*
|
|
1029
|
-
* Captures everything that happened during the fill for:
|
|
1030
|
-
* - Provenance/corroboration
|
|
1031
|
-
* - Cost analysis
|
|
1032
|
-
* - Debugging
|
|
1033
|
-
* - Analytics
|
|
1034
|
-
*/
|
|
1035
|
-
declare const FillRecordSchema: z.ZodObject<{
|
|
1036
|
-
sessionId: z.ZodString;
|
|
1037
|
-
startedAt: z.ZodString;
|
|
1038
|
-
completedAt: z.ZodString;
|
|
1039
|
-
durationMs: z.ZodNumber;
|
|
1040
|
-
form: z.ZodObject<{
|
|
1041
|
-
id: z.ZodString;
|
|
1042
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1043
|
-
description: z.ZodOptional<z.ZodString>;
|
|
1044
|
-
structure: z.ZodObject<{
|
|
1045
|
-
groupCount: z.ZodNumber;
|
|
1046
|
-
fieldCount: z.ZodNumber;
|
|
1047
|
-
optionCount: z.ZodNumber;
|
|
1048
|
-
fieldCountByKind: z.ZodRecord<z.ZodEnum<{
|
|
1049
|
-
string: "string";
|
|
1050
|
-
number: "number";
|
|
1051
|
-
string_list: "string_list";
|
|
1052
|
-
url: "url";
|
|
1053
|
-
url_list: "url_list";
|
|
1054
|
-
single_select: "single_select";
|
|
1055
|
-
multi_select: "multi_select";
|
|
1056
|
-
checkboxes: "checkboxes";
|
|
1057
|
-
date: "date";
|
|
1058
|
-
year: "year";
|
|
1059
|
-
table: "table";
|
|
1060
|
-
}>, z.ZodNumber>;
|
|
1061
|
-
groupsById: z.ZodRecord<z.ZodString, z.ZodLiteral<"field_group">>;
|
|
1062
|
-
fieldsById: z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
1063
|
-
string: "string";
|
|
1064
|
-
number: "number";
|
|
1065
|
-
string_list: "string_list";
|
|
1066
|
-
url: "url";
|
|
1067
|
-
url_list: "url_list";
|
|
1068
|
-
single_select: "single_select";
|
|
1069
|
-
multi_select: "multi_select";
|
|
1070
|
-
checkboxes: "checkboxes";
|
|
1071
|
-
date: "date";
|
|
1072
|
-
year: "year";
|
|
1073
|
-
table: "table";
|
|
1074
|
-
}>>;
|
|
1075
|
-
optionsById: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1076
|
-
parentFieldId: z.ZodString;
|
|
1077
|
-
parentFieldKind: z.ZodEnum<{
|
|
1078
|
-
string: "string";
|
|
1079
|
-
number: "number";
|
|
1080
|
-
string_list: "string_list";
|
|
1081
|
-
url: "url";
|
|
1082
|
-
url_list: "url_list";
|
|
1083
|
-
single_select: "single_select";
|
|
1084
|
-
multi_select: "multi_select";
|
|
1085
|
-
checkboxes: "checkboxes";
|
|
1086
|
-
date: "date";
|
|
1087
|
-
year: "year";
|
|
1088
|
-
table: "table";
|
|
1089
|
-
}>;
|
|
1090
|
-
}, z.core.$strip>>;
|
|
1091
|
-
}, z.core.$strip>;
|
|
1092
|
-
}, z.core.$strip>;
|
|
1093
|
-
status: z.ZodEnum<{
|
|
1094
|
-
partial: "partial";
|
|
1095
|
-
completed: "completed";
|
|
1096
|
-
failed: "failed";
|
|
1097
|
-
cancelled: "cancelled";
|
|
1098
|
-
}>;
|
|
1099
|
-
statusDetail: z.ZodOptional<z.ZodString>;
|
|
1100
|
-
formProgress: z.ZodObject<{
|
|
1101
|
-
totalFields: z.ZodNumber;
|
|
1102
|
-
requiredFields: z.ZodNumber;
|
|
1103
|
-
unansweredFields: z.ZodNumber;
|
|
1104
|
-
answeredFields: z.ZodNumber;
|
|
1105
|
-
skippedFields: z.ZodNumber;
|
|
1106
|
-
abortedFields: z.ZodNumber;
|
|
1107
|
-
validFields: z.ZodNumber;
|
|
1108
|
-
invalidFields: z.ZodNumber;
|
|
1109
|
-
emptyFields: z.ZodNumber;
|
|
1110
|
-
filledFields: z.ZodNumber;
|
|
1111
|
-
emptyRequiredFields: z.ZodNumber;
|
|
1112
|
-
totalNotes: z.ZodNumber;
|
|
1113
|
-
}, z.core.$strip>;
|
|
1114
|
-
llm: z.ZodObject<{
|
|
1115
|
-
provider: z.ZodString;
|
|
1116
|
-
model: z.ZodString;
|
|
1117
|
-
totalCalls: z.ZodNumber;
|
|
1118
|
-
inputTokens: z.ZodNumber;
|
|
1119
|
-
outputTokens: z.ZodNumber;
|
|
1120
|
-
}, z.core.$strip>;
|
|
1121
|
-
toolSummary: z.ZodObject<{
|
|
1122
|
-
totalCalls: z.ZodNumber;
|
|
1123
|
-
successfulCalls: z.ZodNumber;
|
|
1124
|
-
failedCalls: z.ZodNumber;
|
|
1125
|
-
successRate: z.ZodNumber;
|
|
1126
|
-
totalDurationMs: z.ZodNumber;
|
|
1127
|
-
byTool: z.ZodArray<z.ZodObject<{
|
|
1128
|
-
toolName: z.ZodString;
|
|
1129
|
-
callCount: z.ZodNumber;
|
|
1130
|
-
successCount: z.ZodNumber;
|
|
1131
|
-
failureCount: z.ZodNumber;
|
|
1132
|
-
successRate: z.ZodNumber;
|
|
1133
|
-
results: z.ZodOptional<z.ZodObject<{
|
|
1134
|
-
totalResults: z.ZodNumber;
|
|
1135
|
-
avgResultsPerCall: z.ZodNumber;
|
|
1136
|
-
zeroResultCalls: z.ZodNumber;
|
|
1137
|
-
}, z.core.$strip>>;
|
|
1138
|
-
timing: z.ZodObject<{
|
|
1139
|
-
totalMs: z.ZodNumber;
|
|
1140
|
-
avgMs: z.ZodNumber;
|
|
1141
|
-
minMs: z.ZodNumber;
|
|
1142
|
-
maxMs: z.ZodNumber;
|
|
1143
|
-
p50Ms: z.ZodNumber;
|
|
1144
|
-
p95Ms: z.ZodNumber;
|
|
1145
|
-
}, z.core.$strip>;
|
|
1146
|
-
}, z.core.$strip>>;
|
|
1147
|
-
}, z.core.$strip>;
|
|
1148
|
-
timingBreakdown: z.ZodObject<{
|
|
1149
|
-
totalMs: z.ZodNumber;
|
|
1150
|
-
llmTimeMs: z.ZodNumber;
|
|
1151
|
-
toolTimeMs: z.ZodNumber;
|
|
1152
|
-
overheadMs: z.ZodNumber;
|
|
1153
|
-
breakdown: z.ZodArray<z.ZodObject<{
|
|
1154
|
-
category: z.ZodEnum<{
|
|
1155
|
-
llm: "llm";
|
|
1156
|
-
tools: "tools";
|
|
1157
|
-
overhead: "overhead";
|
|
1158
|
-
}>;
|
|
1159
|
-
label: z.ZodString;
|
|
1160
|
-
ms: z.ZodNumber;
|
|
1161
|
-
percentage: z.ZodNumber;
|
|
1162
|
-
}, z.core.$strip>>;
|
|
1163
|
-
}, z.core.$strip>;
|
|
1164
|
-
timeline: z.ZodArray<z.ZodObject<{
|
|
1165
|
-
turnNumber: z.ZodNumber;
|
|
1166
|
-
order: z.ZodNumber;
|
|
1167
|
-
executionId: z.ZodString;
|
|
1168
|
-
startedAt: z.ZodString;
|
|
1169
|
-
completedAt: z.ZodString;
|
|
1170
|
-
startMs: z.ZodNumber;
|
|
1171
|
-
durationMs: z.ZodNumber;
|
|
1172
|
-
issuesAddressed: z.ZodNumber;
|
|
1173
|
-
patchesApplied: z.ZodNumber;
|
|
1174
|
-
patchesRejected: z.ZodNumber;
|
|
1175
|
-
tokens: z.ZodObject<{
|
|
1176
|
-
input: z.ZodNumber;
|
|
1177
|
-
output: z.ZodNumber;
|
|
1178
|
-
}, z.core.$strip>;
|
|
1179
|
-
toolCalls: z.ZodArray<z.ZodObject<{
|
|
1180
|
-
tool: z.ZodString;
|
|
1181
|
-
startedAt: z.ZodString;
|
|
1182
|
-
completedAt: z.ZodString;
|
|
1183
|
-
startMs: z.ZodNumber;
|
|
1184
|
-
durationMs: z.ZodNumber;
|
|
1185
|
-
success: z.ZodBoolean;
|
|
1186
|
-
input: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
1187
|
-
result: z.ZodOptional<z.ZodObject<{
|
|
1188
|
-
resultCount: z.ZodOptional<z.ZodNumber>;
|
|
1189
|
-
error: z.ZodOptional<z.ZodString>;
|
|
1190
|
-
}, z.core.$strip>>;
|
|
1191
|
-
}, z.core.$strip>>;
|
|
1192
|
-
}, z.core.$strip>>;
|
|
1193
|
-
execution: z.ZodObject<{
|
|
1194
|
-
totalTurns: z.ZodNumber;
|
|
1195
|
-
parallelEnabled: z.ZodBoolean;
|
|
1196
|
-
maxParallelAgents: z.ZodOptional<z.ZodNumber>;
|
|
1197
|
-
orderLevels: z.ZodArray<z.ZodNumber>;
|
|
1198
|
-
executionThreads: z.ZodArray<z.ZodString>;
|
|
1199
|
-
}, z.core.$strip>;
|
|
1200
|
-
customData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1201
|
-
}, z.core.$strip>;
|
|
1202
|
-
type FillRecord = z.infer<typeof FillRecordSchema>;
|
|
1203
|
-
//#endregion
|
|
1204
867
|
//#region src/harness/harnessTypes.d.ts
|
|
1205
868
|
/**
|
|
1206
869
|
* Per-turn statistics from LLM calls.
|
|
@@ -1260,6 +923,39 @@ interface Agent {
|
|
|
1260
923
|
*/
|
|
1261
924
|
fillFormTool(issues: InspectIssue[], form: ParsedForm, maxPatches: number, previousRejections?: PatchRejection[]): Promise<AgentResponse>;
|
|
1262
925
|
}
|
|
926
|
+
/**
|
|
927
|
+
* Built-in provider names corresponding to the @ai-sdk/* packages from Vercel AI SDK.
|
|
928
|
+
*/
|
|
929
|
+
type BuiltInProviderName = 'anthropic' | 'openai' | 'google' | 'xai' | 'deepseek';
|
|
930
|
+
/**
|
|
931
|
+
* Any provider name — built-in or custom. Provides autocomplete for built-in names.
|
|
932
|
+
*/
|
|
933
|
+
type ProviderName = BuiltInProviderName | (string & {});
|
|
934
|
+
/**
|
|
935
|
+
* Adapter for an AI provider. Clients import their own @ai-sdk/* package,
|
|
936
|
+
* configure it, and pass the adapter to markform.
|
|
937
|
+
*
|
|
938
|
+
* The interface matches the AI SDK provider shape so providers can often
|
|
939
|
+
* be passed directly without wrapping.
|
|
940
|
+
*/
|
|
941
|
+
interface ProviderAdapter {
|
|
942
|
+
/** Resolve a model name to a LanguageModel instance. */
|
|
943
|
+
model(modelId: string): LanguageModel;
|
|
944
|
+
/** Optional provider-specific tools (e.g., web search). */
|
|
945
|
+
tools?: Record<string, Tool>;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* AI SDK providers are callable: provider(modelId) => LanguageModel.
|
|
949
|
+
* They may also have a .tools property with tool factories.
|
|
950
|
+
*/
|
|
951
|
+
type AiSdkProviderCallable = ((modelId: string) => LanguageModel) & {
|
|
952
|
+
tools?: Record<string, (...args: unknown[]) => Tool>;
|
|
953
|
+
};
|
|
954
|
+
/**
|
|
955
|
+
* A ProviderInput is either a ProviderAdapter (with `.model()` method)
|
|
956
|
+
* or an AI SDK provider callable (auto-normalized via `normalizeProvider()`).
|
|
957
|
+
*/
|
|
958
|
+
type ProviderInput = ProviderAdapter | AiSdkProviderCallable;
|
|
1263
959
|
/**
|
|
1264
960
|
* Callbacks for observing form-filling execution in real-time.
|
|
1265
961
|
*
|
|
@@ -1439,6 +1135,13 @@ interface FillOptions {
|
|
|
1439
1135
|
* If a custom tool has the same name as a built-in tool, the custom tool wins.
|
|
1440
1136
|
*/
|
|
1441
1137
|
additionalTools?: Record<string, Tool>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Additional providers for string-based model resolution.
|
|
1140
|
+
* Keys are provider names (the part before the `/` in model IDs).
|
|
1141
|
+
* Values are ProviderAdapter objects or AI SDK provider callables.
|
|
1142
|
+
* These take priority over built-in providers.
|
|
1143
|
+
*/
|
|
1144
|
+
providers?: Record<string, ProviderInput>;
|
|
1442
1145
|
/**
|
|
1443
1146
|
* TEST ONLY: Override agent for testing with MockAgent.
|
|
1444
1147
|
* When provided, model is ignored and this agent is used instead.
|
|
@@ -1738,6 +1441,13 @@ declare class ParallelHarness {
|
|
|
1738
1441
|
*/
|
|
1739
1442
|
declare function createParallelHarness(form: ParsedForm, config?: ParallelHarnessConfig): ParallelHarness;
|
|
1740
1443
|
//#endregion
|
|
1444
|
+
//#region src/harness/modelResolver.d.ts
|
|
1445
|
+
/**
|
|
1446
|
+
* Built-in providers available by default.
|
|
1447
|
+
* Exported so callers can inspect which providers are built-in.
|
|
1448
|
+
*/
|
|
1449
|
+
declare const BUILT_IN_PROVIDERS: Readonly<Record<BuiltInProviderName, BuiltInProviderName>>;
|
|
1450
|
+
//#endregion
|
|
1741
1451
|
//#region src/harness/fillRecordCollector.d.ts
|
|
1742
1452
|
interface FillRecordCollectorOptions {
|
|
1743
1453
|
/** Form metadata */
|
|
@@ -1952,5 +1662,5 @@ declare function validateResearchForm(form: ParsedForm): {
|
|
|
1952
1662
|
/** Markform version (injected at build time). */
|
|
1953
1663
|
declare const VERSION: string;
|
|
1954
1664
|
//#endregion
|
|
1955
|
-
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, MarkformSectionInputSchema, 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 };
|
|
1665
|
+
export { type AgentResponse, type AnswerState, AnswerStateSchema, type ApplyResult, ApplyResultSchema, BUILT_IN_PROVIDERS, type BuiltInProviderName, 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, MarkformSectionInputSchema, 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 ProviderAdapter, type ProviderInput, type ProviderName, 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 };
|
|
1956
1666
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { $ as SetTablePatchSchema, A as MarkformSectionInputSchema, At as WireToolCallSchema, B as ProgressStateSchema, C as HarnessConfigSchema, Ct as UrlValueSchema, D as IssueReasonSchema, Dt as WireRequestFormatSchema, E as InspectResultSchema, Et as WireFormatSchema, F as NumberValueSchema, G as SessionTurnSchema, H as RunModeSchema, I as OptionIdSchema, J as SetMultiSelectPatchSchema, K as SetCheckboxesPatchSchema, L as OptionSchema, M as MultiSelectFieldSchema, Mt as YearFieldSchema, N as MultiSelectValueSchema, Nt as YearValueSchema, O as IssueScopeSchema, Ot as WireResponseFormatSchema, P as NumberFieldSchema, Q as SetStringPatchSchema, R as PatchSchema, S as FormSchemaSchema, St as UrlListValueSchema, T as InspectIssueSchema, Tt as ValidatorRefSchema, U as SessionFinalSchema, V as ProgressSummarySchema, W as SessionTranscriptSchema, X as SetSingleSelectPatchSchema, Y as SetNumberPatchSchema, Z as SetStringListPatchSchema, _ as FieldKindSchema, _t as TableRowPatchSchema, a as CheckboxProgressCountsSchema, at as SingleSelectFieldSchema, b as FieldSchema, bt as UrlFieldSchema, c as CheckboxesValueSchema, ct as SourceRangeSchema, d as DateFieldSchema, dt as StringListFieldSchema, et as SetUrlListPatchSchema, f as DateValueSchema, ft as StringListValueSchema, g as FieldGroupSchema, gt as TableFieldSchema, h as ExplicitCheckboxValueSchema, ht as TableColumnSchema, i as CheckboxModeSchema, it as SimpleCheckboxStateSchema, j as MultiCheckboxStateSchema, jt as WireToolResultSchema, k as MarkformFrontmatterSchema, kt as WireResponseStepSchema, l as ClearFieldPatchSchema, lt as StepResultSchema, m as DocumentationTagSchema, mt as StructureSummarySchema, n as ApplyResultSchema, nt as SetYearPatchSchema, o as CheckboxValueSchema, ot as SingleSelectValueSchema, p as DocumentationBlockSchema, pt as StringValueSchema, q as SetDatePatchSchema, r as CellResponseSchema, rt as SeveritySchema, s as CheckboxesFieldSchema, st as SourcePositionSchema, t as AnswerStateSchema, tt as SetUrlPatchSchema, u as ColumnTypeNameSchema, ut as StringFieldSchema, v as FieldProgressSchema, vt as TableRowResponseSchema, w as IdSchema, wt as ValidationIssueSchema, x as FieldValueSchema, xt as UrlListFieldSchema, y as FieldResponseSchema, yt as TableValueSchema, z as ProgressCountsSchema } from "./coreTypes-CTLr-NGd.mjs";
|
|
3
|
-
import { _t as
|
|
4
|
-
import { A as
|
|
5
|
-
import { n as serializeSession, t as parseSession } from "./session-
|
|
3
|
+
import { _t as isPatchError, a as validate, at as MarkformConfigError, c as computeProgressSummary, ct as MarkformParseError, d as serializeForm, dt as ParseError, ft as isAbortError, gt as isParseError, ht as isMarkformError, i as inspect, it as MarkformAbortError, l as computeStructureSummary, lt as MarkformPatchError, mt as isLlmError, o as computeAllSummaries, ot as MarkformError, p as serializeReport, pt as isConfigError, s as computeFormState, st as MarkformLlmError, t as applyPatches, u as isFormComplete, ut as MarkformValidationError, vt as isRetryableError, yt as isValidationError } from "./apply-KzQztrDV.mjs";
|
|
4
|
+
import { A as createMockAgent, B as parseScopeRef, D as FillRecordCollector, F as findFieldById, G as findAllCheckboxes, H as fieldToJsonSchema, I as getFieldId, J as findAllHeadings, K as injectCheckboxIds, L as isCellRef, M as createHarness, N as coerceInputContext, P as coerceToFieldPatch, Q as parseRawTable, R as isFieldRef, U as formToJsonSchema, V as serializeScopeRef, W as parseForm, X as parseCellValue, Y as findEnclosingHeadings, Z as parseMarkdownTable, _ as fillForm, a as ExecutionMetadataSchema, b as scopeIssuesForItem, c as TimelineEntrySchema, d as ToolCallRecordSchema, f as ToolStatsSchema, g as resolveHarnessConfig, h as formatFillRecordSummary, i as runResearch, j as FormHarness, k as MockAgent, l as TimingBreakdownItemSchema, n as isResearchForm, o as FillRecordSchema, p as ToolSummarySchema, q as injectHeaderIds, r as validateResearchForm, s as FillRecordStatusSchema, t as VERSION, u as TimingBreakdownSchema, v as ParallelHarness, x as BUILT_IN_PROVIDERS, y as createParallelHarness, z as isQualifiedRef } from "./src-B2uFvGli.mjs";
|
|
5
|
+
import { n as serializeSession, t as parseSession } from "./session-BCcltrLA.mjs";
|
|
6
6
|
|
|
7
|
-
export { AnswerStateSchema, ApplyResultSchema, CellResponseSchema, CheckboxModeSchema, CheckboxProgressCountsSchema, CheckboxValueSchema, CheckboxesFieldSchema, CheckboxesValueSchema, ClearFieldPatchSchema, ColumnTypeNameSchema, DateFieldSchema, DateValueSchema, DocumentationBlockSchema, DocumentationTagSchema, ExecutionMetadataSchema, ExplicitCheckboxValueSchema, FieldGroupSchema, FieldKindSchema, FieldProgressSchema, FieldResponseSchema, FieldSchema, FieldValueSchema, FillRecordCollector, FillRecordSchema, FillRecordStatusSchema, FormHarness, FormSchemaSchema, HarnessConfigSchema, IdSchema, InspectIssueSchema, InspectResultSchema, IssueReasonSchema, IssueScopeSchema, MarkformAbortError, MarkformConfigError, MarkformError, MarkformFrontmatterSchema, MarkformLlmError, MarkformParseError, MarkformPatchError, MarkformSectionInputSchema, MarkformValidationError, MockAgent, MultiCheckboxStateSchema, MultiSelectFieldSchema, MultiSelectValueSchema, NumberFieldSchema, NumberValueSchema, OptionIdSchema, OptionSchema, ParallelHarness, 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, TimelineEntrySchema, TimingBreakdownItemSchema, TimingBreakdownSchema, ToolCallRecordSchema, ToolStatsSchema, ToolSummarySchema, UrlFieldSchema, UrlListFieldSchema, UrlListValueSchema, UrlValueSchema, VERSION, ValidationIssueSchema, ValidatorRefSchema, WireFormatSchema, WireRequestFormatSchema, WireResponseFormatSchema, WireResponseStepSchema, WireToolCallSchema, WireToolResultSchema, YearFieldSchema, 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 };
|
|
7
|
+
export { AnswerStateSchema, ApplyResultSchema, BUILT_IN_PROVIDERS, CellResponseSchema, CheckboxModeSchema, CheckboxProgressCountsSchema, CheckboxValueSchema, CheckboxesFieldSchema, CheckboxesValueSchema, ClearFieldPatchSchema, ColumnTypeNameSchema, DateFieldSchema, DateValueSchema, DocumentationBlockSchema, DocumentationTagSchema, ExecutionMetadataSchema, ExplicitCheckboxValueSchema, FieldGroupSchema, FieldKindSchema, FieldProgressSchema, FieldResponseSchema, FieldSchema, FieldValueSchema, FillRecordCollector, FillRecordSchema, FillRecordStatusSchema, FormHarness, FormSchemaSchema, HarnessConfigSchema, IdSchema, InspectIssueSchema, InspectResultSchema, IssueReasonSchema, IssueScopeSchema, MarkformAbortError, MarkformConfigError, MarkformError, MarkformFrontmatterSchema, MarkformLlmError, MarkformParseError, MarkformPatchError, MarkformSectionInputSchema, MarkformValidationError, MockAgent, MultiCheckboxStateSchema, MultiSelectFieldSchema, MultiSelectValueSchema, NumberFieldSchema, NumberValueSchema, OptionIdSchema, OptionSchema, ParallelHarness, 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, TimelineEntrySchema, TimingBreakdownItemSchema, TimingBreakdownSchema, ToolCallRecordSchema, ToolStatsSchema, ToolSummarySchema, UrlFieldSchema, UrlListFieldSchema, UrlListValueSchema, UrlValueSchema, VERSION, ValidationIssueSchema, ValidatorRefSchema, WireFormatSchema, WireRequestFormatSchema, WireResponseFormatSchema, WireResponseStepSchema, WireToolCallSchema, WireToolResultSchema, YearFieldSchema, 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 };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
|
|
2
|
+
import { At as ParsedForm } from "./coreTypes-BlsJkU1w.mjs";
|
|
3
|
+
import { r as FillRecord } from "./fillRecord-DTl5lnK0.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/render/renderUtils.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Rendering utility functions for HTML generation.
|
|
8
|
+
*
|
|
9
|
+
* Pure utility functions used across all renderers. No CLI or server dependencies.
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Escape HTML special characters.
|
|
13
|
+
*/
|
|
14
|
+
declare function escapeHtml(str: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Format milliseconds as human-readable duration.
|
|
17
|
+
*/
|
|
18
|
+
declare function formatDuration(ms: number): string;
|
|
19
|
+
/**
|
|
20
|
+
* Format token count with K suffix for large numbers.
|
|
21
|
+
*/
|
|
22
|
+
declare function formatTokens(count: number): string;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/render/contentRenderers.d.ts
|
|
25
|
+
/**
|
|
26
|
+
* Render form view content (read-only display of form fields).
|
|
27
|
+
* Used for View tab content.
|
|
28
|
+
*/
|
|
29
|
+
declare function renderViewContent(form: ParsedForm): string;
|
|
30
|
+
/**
|
|
31
|
+
* Render source content with Markdown and Jinja syntax highlighting.
|
|
32
|
+
* Used for Source tab content.
|
|
33
|
+
*/
|
|
34
|
+
declare function renderSourceContent(content: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* Render markdown content (content only, no page wrapper).
|
|
37
|
+
* Used for tab content.
|
|
38
|
+
*/
|
|
39
|
+
declare function renderMarkdownContent(content: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Render YAML content with syntax highlighting (content only, no page wrapper).
|
|
42
|
+
* Used for tab content.
|
|
43
|
+
*/
|
|
44
|
+
declare function renderYamlContent(content: string): string;
|
|
45
|
+
/**
|
|
46
|
+
* Render JSON content with syntax highlighting (content only, no page wrapper).
|
|
47
|
+
* Used for tab content.
|
|
48
|
+
*/
|
|
49
|
+
declare function renderJsonContent(content: string): string;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/render/fillRecordRenderer.d.ts
|
|
52
|
+
/**
|
|
53
|
+
* JavaScript for fill record interactive features.
|
|
54
|
+
* Consumers should include this in a <script> tag on their page.
|
|
55
|
+
* Provides: frShowTip(el), frHideTip(), frCopyYaml(btn)
|
|
56
|
+
*/
|
|
57
|
+
declare const FILL_RECORD_SCRIPTS = "\n// Copy YAML content handler for Fill Record tab (must be global for dynamically loaded content)\nfunction frCopyYaml(btn) {\n const pre = btn.parentElement.querySelector('pre');\n navigator.clipboard.writeText(pre.textContent).then(() => {\n const orig = btn.textContent;\n btn.textContent = 'Copied!';\n setTimeout(() => btn.textContent = orig, 1500);\n });\n}\n\n// Tooltip handlers for Fill Record visualizations (must be global for dynamically loaded content)\nfunction frShowTip(el) {\n var tip = document.getElementById('fr-tooltip');\n if (tip && el.dataset.tooltip) {\n tip.textContent = el.dataset.tooltip;\n // Position tooltip centered above the element\n var rect = el.getBoundingClientRect();\n tip.style.left = (rect.left + rect.width / 2) + 'px';\n tip.style.top = (rect.top - 8) + 'px';\n tip.style.transform = 'translate(-50%, -100%)';\n tip.classList.add('visible');\n }\n}\nfunction frHideTip() {\n var tip = document.getElementById('fr-tooltip');\n if (tip) tip.classList.remove('visible');\n}\n";
|
|
58
|
+
/**
|
|
59
|
+
* CSS styles for fill record visualization.
|
|
60
|
+
* Uses CSS custom properties for theming (supports dark mode via prefers-color-scheme).
|
|
61
|
+
* Designed to be lightweight, reusable, and embeddable.
|
|
62
|
+
*/
|
|
63
|
+
declare const FILL_RECORD_STYLES = "\n<style>\n .fr-dashboard {\n --fr-bg: #ffffff;\n --fr-bg-muted: #f9fafb;\n --fr-bg-subtle: #f3f4f6;\n --fr-border: #e5e7eb;\n --fr-text: #111827;\n --fr-text-muted: #6b7280;\n --fr-primary: #3b82f6;\n --fr-success: #22c55e;\n --fr-warning: #f59e0b;\n --fr-error: #ef4444;\n --fr-info: #6b7280;\n\n /* Typography - consolidated to fewer sizes */\n --fr-font-sm: 13px;\n --fr-font-base: 14px;\n --fr-font-lg: 20px;\n\n font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;\n padding: 20px;\n max-width: 900px;\n margin: 0 auto;\n color: var(--fr-text);\n line-height: 1.5;\n }\n\n @media (prefers-color-scheme: dark) {\n .fr-dashboard {\n --fr-bg: #1f2937;\n --fr-bg-muted: #374151;\n --fr-bg-subtle: #4b5563;\n --fr-border: #4b5563;\n --fr-text: #f9fafb;\n --fr-text-muted: #9ca3af;\n }\n }\n\n .fr-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 16px;\n padding-bottom: 12px;\n border-bottom: 1px solid var(--fr-border);\n }\n .fr-header__model {\n font-weight: 600;\n font-size: var(--fr-font-base);\n color: var(--fr-text);\n }\n .fr-header__time {\n font-weight: 600;\n font-size: var(--fr-font-base);\n color: var(--fr-text);\n }\n\n .fr-banner {\n border-radius: 8px;\n padding: 12px 16px;\n margin-bottom: 20px;\n font-size: var(--fr-font-base);\n }\n .fr-banner--error {\n background: color-mix(in srgb, var(--fr-error) 10%, var(--fr-bg));\n border: 1px solid var(--fr-error);\n }\n .fr-banner--warning {\n background: color-mix(in srgb, var(--fr-warning) 10%, var(--fr-bg));\n border: 1px solid var(--fr-warning);\n }\n\n .fr-cards {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));\n gap: 16px;\n margin-bottom: 24px;\n }\n\n .fr-card {\n padding: 16px;\n background: var(--fr-bg-muted);\n border-radius: 8px;\n text-align: center;\n }\n .fr-card__label {\n font-size: var(--fr-font-sm);\n color: var(--fr-text-muted);\n margin-bottom: 4px;\n }\n .fr-card__value {\n font-size: var(--fr-font-lg);\n font-weight: 600;\n }\n .fr-card__sub {\n font-size: var(--fr-font-sm);\n color: var(--fr-text-muted);\n margin-top: 2px;\n }\n\n .fr-badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 4px 10px;\n border-radius: 4px;\n font-weight: 600;\n font-size: var(--fr-font-sm);\n }\n .fr-badge--completed { background: color-mix(in srgb, var(--fr-success) 15%, transparent); color: var(--fr-success); }\n .fr-badge--partial { background: color-mix(in srgb, var(--fr-warning) 15%, transparent); color: var(--fr-warning); }\n .fr-badge--cancelled { background: color-mix(in srgb, var(--fr-info) 15%, transparent); color: var(--fr-info); }\n .fr-badge--failed { background: color-mix(in srgb, var(--fr-error) 15%, transparent); color: var(--fr-error); }\n\n .fr-section {\n margin-bottom: 24px;\n }\n .fr-section__title {\n font-size: var(--fr-font-base);\n font-weight: 500;\n color: var(--fr-text);\n margin-bottom: 8px;\n }\n\n .fr-progress {\n background: var(--fr-border);\n border-radius: 4px;\n height: 20px;\n overflow: hidden;\n }\n .fr-progress__bar {\n background: var(--fr-primary);\n height: 100%;\n transition: width 0.3s ease;\n }\n .fr-progress__text {\n font-size: var(--fr-font-sm);\n color: var(--fr-text-muted);\n margin-top: 4px;\n }\n\n .fr-progress__segments {\n display: flex;\n height: 100%;\n width: 100%;\n }\n .fr-progress-segment {\n height: 100%;\n min-width: 2px;\n border-right: 2px solid var(--fr-bg);\n cursor: pointer;\n }\n .fr-progress-segment:last-child {\n border-right: none;\n }\n .fr-progress-segment--filled {\n background: var(--fr-primary);\n }\n .fr-progress-segment--filled:hover {\n background: color-mix(in srgb, var(--fr-primary) 70%, white);\n }\n .fr-progress-segment--prefilled {\n background: #8b5cf6;\n }\n .fr-progress-segment--prefilled:hover {\n background: color-mix(in srgb, #8b5cf6 70%, white);\n }\n .fr-progress-segment--skipped {\n background: var(--fr-warning);\n }\n .fr-progress-segment--skipped:hover {\n background: color-mix(in srgb, var(--fr-warning) 70%, white);\n }\n .fr-progress-segment--empty {\n background: var(--fr-border);\n }\n\n /* Gantt chart - each call on its own row */\n .fr-gantt {\n margin-bottom: 8px;\n }\n .fr-gantt__row {\n display: flex;\n align-items: center;\n height: 20px;\n margin-bottom: 3px;\n }\n .fr-gantt__label {\n width: 90px;\n flex-shrink: 0;\n font-size: 11px;\n color: var(--fr-text-muted);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-right: 8px;\n text-align: right;\n }\n .fr-gantt__track {\n flex: 1;\n background: var(--fr-bg-subtle);\n border-radius: 3px;\n height: 14px;\n position: relative;\n }\n .fr-gantt__bar {\n position: absolute;\n top: 2px;\n height: calc(100% - 4px);\n min-width: 6px;\n border-radius: 2px;\n cursor: pointer;\n }\n .fr-gantt__bar:hover {\n filter: brightness(1.15);\n }\n .fr-gantt__bar--llm {\n background: var(--fr-primary);\n }\n .fr-gantt__bar--tool {\n background: var(--fr-success);\n }\n .fr-gantt__legend {\n display: flex;\n gap: 16px;\n font-size: var(--fr-font-sm);\n color: var(--fr-text-muted);\n margin-top: 12px;\n padding-top: 8px;\n border-top: 1px solid var(--fr-border);\n }\n .fr-gantt__legend-item {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .fr-gantt__legend-dot {\n width: 10px;\n height: 10px;\n border-radius: 2px;\n }\n .fr-gantt__legend-dot--llm { background: var(--fr-primary); }\n .fr-gantt__legend-dot--tool { background: var(--fr-success); }\n\n /* Tooltip container */\n .fr-tooltip {\n position: fixed;\n background: #1f2937;\n color: #f9fafb;\n padding: 8px 12px;\n border-radius: 4px;\n font-size: var(--fr-font-sm);\n white-space: pre-line;\n pointer-events: none;\n z-index: 1000;\n box-shadow: 0 4px 12px rgba(0,0,0,0.3);\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.05s ease-out, visibility 0.05s ease-out;\n }\n .fr-tooltip.visible {\n opacity: 1;\n visibility: visible;\n transition: opacity 0.2s ease-in, visibility 0.2s ease-in;\n }\n\n .fr-table {\n width: 100%;\n border-collapse: collapse;\n font-size: var(--fr-font-sm);\n }\n .fr-table th {\n padding: 8px 12px;\n text-align: left;\n font-weight: 600;\n background: var(--fr-bg-subtle);\n }\n .fr-table th:not(:first-child) { text-align: center; }\n .fr-table td {\n padding: 8px 12px;\n border-bottom: 1px solid var(--fr-border);\n }\n .fr-table td:not(:first-child) { text-align: center; }\n\n .fr-details {\n border: none;\n background: none;\n }\n .fr-details > summary {\n cursor: pointer;\n font-size: var(--fr-font-base);\n font-weight: 500;\n color: var(--fr-text);\n padding: 8px 0;\n list-style: none;\n }\n .fr-details > summary::-webkit-details-marker { display: none; }\n .fr-details > summary::before {\n content: '\u25B6';\n display: inline-block;\n margin-right: 8px;\n transition: transform 0.2s;\n font-size: 11px;\n }\n .fr-details[open] > summary::before {\n transform: rotate(90deg);\n }\n .fr-details__content {\n background: var(--fr-bg-muted);\n border-radius: 8px;\n padding: 16px;\n margin-top: 8px;\n }\n\n .fr-turn {\n margin-bottom: 8px;\n background: var(--fr-bg-muted);\n border-radius: 4px;\n }\n .fr-turn summary {\n cursor: pointer;\n padding: 12px;\n font-size: var(--fr-font-sm);\n list-style: none;\n }\n .fr-turn summary::-webkit-details-marker { display: none; }\n .fr-turn summary::before {\n content: '\u25B6';\n display: inline-block;\n margin-right: 8px;\n transition: transform 0.2s;\n font-size: 11px;\n }\n .fr-turn[open] summary::before {\n transform: rotate(90deg);\n }\n .fr-turn__content {\n padding: 0 12px 12px;\n }\n .fr-turn__tools {\n margin: 0;\n padding-left: 20px;\n list-style: none;\n }\n .fr-turn__tool {\n margin: 4px 0;\n font-size: var(--fr-font-sm);\n color: var(--fr-text-muted);\n }\n .fr-turn__tool--error { color: var(--fr-error); }\n\n .fr-turn__query {\n color: var(--fr-primary);\n font-style: italic;\n }\n\n .fr-turn__patches {\n margin: 4px 0 8px 20px;\n padding: 8px 12px;\n background: var(--fr-bg-subtle);\n border-radius: 4px;\n font-size: var(--fr-font-sm);\n }\n .fr-turn__patch {\n margin: 4px 0;\n padding: 4px 0;\n border-bottom: 1px solid var(--fr-border);\n }\n .fr-turn__patch:last-child {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n }\n .fr-turn__patch-field {\n font-weight: 600;\n color: var(--fr-text);\n }\n .fr-turn__patch-op {\n font-size: 11px;\n padding: 1px 4px;\n border-radius: 2px;\n background: var(--fr-bg-muted);\n color: var(--fr-text-muted);\n margin-left: 6px;\n }\n .fr-turn__patch-value {\n display: block;\n margin-top: 2px;\n color: var(--fr-text-muted);\n font-family: ui-monospace, 'SF Mono', Menlo, monospace;\n word-break: break-word;\n white-space: pre-wrap;\n max-height: 200px;\n overflow: auto;\n }\n .fr-turn__patch-value--skip {\n color: var(--fr-warning);\n font-style: italic;\n }\n .fr-turn__patch-value--clear {\n color: var(--fr-info);\n font-style: italic;\n }\n\n .fr-raw {\n position: relative;\n }\n .fr-copy-btn {\n position: absolute;\n top: 8px;\n right: 8px;\n padding: 4px 8px;\n font-size: var(--fr-font-sm);\n background: var(--fr-bg-subtle);\n border: 1px solid var(--fr-border);\n border-radius: 4px;\n cursor: pointer;\n color: var(--fr-text-muted);\n transition: all 0.15s;\n }\n .fr-copy-btn:hover {\n background: var(--fr-border);\n color: var(--fr-text);\n }\n .fr-copy-btn:active {\n transform: scale(0.95);\n }\n\n /* Scoped pre styles to override parent .tab-content pre */\n .fr-dashboard pre {\n background: var(--fr-bg-muted);\n color: var(--fr-text);\n padding: 1rem;\n border-radius: 6px;\n border: 1px solid var(--fr-border);\n overflow-x: auto;\n font-family: ui-monospace, 'SF Mono', Menlo, monospace;\n font-size: 0.85rem;\n line-height: 1.5;\n margin: 0;\n }\n\n /* Override syntax highlighting colors for dark mode compatibility */\n .fr-dashboard .syn-key { color: var(--fr-primary); }\n .fr-dashboard .syn-string { color: var(--fr-success); }\n .fr-dashboard .syn-number { color: var(--fr-primary); }\n .fr-dashboard .syn-bool { color: var(--fr-warning); }\n .fr-dashboard .syn-null { color: var(--fr-error); }\n\n @media (max-width: 600px) {\n .fr-dashboard { padding: 12px; }\n .fr-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }\n .fr-card { padding: 12px; }\n .fr-card__value { font-size: 18px; }\n .fr-table { font-size: var(--fr-font-sm); }\n .fr-table th, .fr-table td { padding: 6px 8px; }\n }\n</style>\n";
|
|
64
|
+
/**
|
|
65
|
+
* Render fill record content (dashboard-style visualization).
|
|
66
|
+
* Uses CSS custom properties for theming with automatic dark mode support.
|
|
67
|
+
* Mobile responsive with grid-based layout.
|
|
68
|
+
*
|
|
69
|
+
* @public Exported for testing and reuse.
|
|
70
|
+
*/
|
|
71
|
+
declare function renderFillRecordContent(record: FillRecord): string;
|
|
72
|
+
//#endregion
|
|
73
|
+
export { FILL_RECORD_SCRIPTS, FILL_RECORD_STYLES, escapeHtml, formatDuration, formatTokens, renderFillRecordContent, renderJsonContent, renderMarkdownContent, renderSourceContent, renderViewContent, renderYamlContent };
|
|
74
|
+
//# sourceMappingURL=render.d.mts.map
|
package/dist/render.mjs
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
|
|
2
|
+
import { a as renderJsonContent, c as renderViewContent, d as formatDuration, f as formatTokens, l as renderYamlContent, n as FILL_RECORD_STYLES, o as renderMarkdownContent, r as renderFillRecordContent, s as renderSourceContent, t as FILL_RECORD_SCRIPTS, u as escapeHtml } from "./fillRecordRenderer-VBQ2vwPV.mjs";
|
|
3
|
+
|
|
4
|
+
export { FILL_RECORD_SCRIPTS, FILL_RECORD_STYLES, escapeHtml, formatDuration, formatTokens, renderFillRecordContent, renderJsonContent, renderMarkdownContent, renderSourceContent, renderViewContent, renderYamlContent };
|