markform 0.1.27 → 0.1.29
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/ai-sdk.mjs +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/{cli-yBrJefDI.mjs → cli-DVAFMui4.mjs} +11 -5
- package/dist/cli-DVAFMui4.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +12 -0
- package/dist/index.mjs +2 -2
- package/dist/{prompts-CwEV0X5z.mjs → prompts-BR5xYbvY.mjs} +281 -25
- package/dist/prompts-BR5xYbvY.mjs.map +1 -0
- package/dist/{src-DMIq0BFC.mjs → src-eBNM0w2R.mjs} +20 -230
- package/dist/src-eBNM0w2R.mjs.map +1 -0
- package/docs/markform-reference.md +12 -2
- package/docs/markform-spec.md +12 -2
- package/package.json +1 -1
- package/dist/cli-yBrJefDI.mjs.map +0 -1
- package/dist/prompts-CwEV0X5z.mjs.map +0 -1
- package/dist/src-DMIq0BFC.mjs.map +0 -1
package/dist/ai-sdk.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { R as PatchSchema } from "./coreTypes-DIv9Aabl.mjs";
|
|
3
|
-
import { _ as inspect, m as applyPatches, p as findFieldById, s as getPatchFormatHint, u as getFieldIdFromRef, w as serializeForm } from "./prompts-
|
|
3
|
+
import { _ as inspect, m as applyPatches, p as findFieldById, s as getPatchFormatHint, u as getFieldIdFromRef, w as serializeForm } from "./prompts-BR5xYbvY.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/integrations/vercelAiSdkTools.ts
|
package/dist/bin.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { R as PatchSchema } from "./coreTypes-DIv9Aabl.mjs";
|
|
3
|
-
import { $ as
|
|
4
|
-
import { C as getProviderInfo, D as createLiveAgent, E as buildMockWireFormat, H as parseForm, N as createHarness, O as FillRecordCollector, T as resolveModel, V as formToJsonSchema, _ as resolveHarnessConfig, g as formatFillRecordSummary, h as stripUnstableFillRecordFields, i as runResearch, j as createMockAgent, k as computeExecutionPlan, m as isEmptyFillRecord, n as isResearchForm, t as VERSION, v as fillForm, w as getProviderNames } from "./src-
|
|
3
|
+
import { $ as DEFAULT_MAX_TURNS, E as serializeReport, J as DEFAULT_FORMS_DIR, K as AGENT_ROLE, S as computeStructureSummary, T as serializeRawMarkdown, Y as DEFAULT_MAX_ISSUES_PER_TURN, Z as DEFAULT_MAX_PATCHES_PER_TURN, _ as inspect, _t as WEB_SEARCH_CONFIG, bt as hasWebSearchSupport, c as filterIssuesByOrder, ct as USER_ROLE, d as coerceInputContext, dt as deriveReportPath, et as DEFAULT_PORT, f as coerceToFieldPatch, ft as deriveSchemaPath, gt as SUGGESTED_LLMS, h as getAllFields, k as validateSyntaxConsistency, l as filterIssuesByScope, lt as deriveExportPath, m as applyPatches, mt as parseRolesFlag, nt as DEFAULT_RESEARCH_MAX_ISSUES_PER_TURN, ot as MAX_FORMS_IN_MENU, p as findFieldById, pt as detectFileType, q as CLI_DEFAULT_MAX_RETRIES, rt as DEFAULT_RESEARCH_MAX_PATCHES_PER_TURN, st as REPORT_EXTENSION, u as getFieldIdFromRef, ut as deriveFillRecordPath, vt as formatSuggestedLlms, w as serializeForm, x as computeProgressSummary, xt as parseModelIdForDisplay } from "./prompts-BR5xYbvY.mjs";
|
|
4
|
+
import { C as getProviderInfo, D as createLiveAgent, E as buildMockWireFormat, H as parseForm, N as createHarness, O as FillRecordCollector, T as resolveModel, V as formToJsonSchema, _ as resolveHarnessConfig, g as formatFillRecordSummary, h as stripUnstableFillRecordFields, i as runResearch, j as createMockAgent, k as computeExecutionPlan, m as isEmptyFillRecord, n as isResearchForm, t as VERSION, v as fillForm, w as getProviderNames } from "./src-eBNM0w2R.mjs";
|
|
5
5
|
import { n as serializeSession } from "./session-BW9jtYNV.mjs";
|
|
6
6
|
import { _ as writeFile$1, a as formatPath, c as logError, d as logTiming, f as logVerbose, g as stripHtmlComments, h as shouldUseColors, i as formatOutput, l as logInfo, m as readFile$1, n as createSpinner, o as getCommandContext, p as logWarn, r as ensureFormsDir, s as logDryRun, t as OUTPUT_FORMATS, u as logSuccess } from "./shared-BszoSkAO.mjs";
|
|
7
7
|
import { a as renderJsonContent, c as renderViewContent, i as highlightYamlValue, l as renderYamlContent, o as renderMarkdownContent, r as renderFillRecordContent, s as renderSourceContent, u as escapeHtml } from "./fillRecordRenderer-BqRPHPmE.mjs";
|
|
@@ -2284,6 +2284,7 @@ async function runAgentFillWorkflow(form, modelId, formsDir, filePath, isResearc
|
|
|
2284
2284
|
maxTurnsTotal: maxTurns,
|
|
2285
2285
|
maxPatchesPerTurn,
|
|
2286
2286
|
maxIssuesPerTurn,
|
|
2287
|
+
maxRetries: CLI_DEFAULT_MAX_RETRIES,
|
|
2287
2288
|
targetRoles: [AGENT_ROLE],
|
|
2288
2289
|
fillMode: overwrite ? "overwrite" : "continue",
|
|
2289
2290
|
enableWebSearch: isResearch,
|
|
@@ -2808,7 +2809,7 @@ function formatConsoleSession(transcript, useColors) {
|
|
|
2808
2809
|
* Register the fill command.
|
|
2809
2810
|
*/
|
|
2810
2811
|
function registerFillCommand(program) {
|
|
2811
|
-
program.command("fill <file>").description("Run an agent to autonomously fill a form").option("--mock", "Use mock agent (requires --mock-source)").option("--model <id>", "Model ID for live agent (format: provider/model-id, e.g. openai/gpt-5-mini)").option("--mock-source <file>", "Path to completed form for mock agent").option("--record <file>", "Record session transcript to file").option("--max-turns <n>", `Maximum turns (default: ${DEFAULT_MAX_TURNS})`, String(DEFAULT_MAX_TURNS)).option("--max-patches <n>", `Maximum patches per turn (default: ${DEFAULT_MAX_PATCHES_PER_TURN})`, String(DEFAULT_MAX_PATCHES_PER_TURN)).option("--max-issues <n>", `Maximum issues shown per turn (default: ${DEFAULT_MAX_ISSUES_PER_TURN})`, String(DEFAULT_MAX_ISSUES_PER_TURN)).option("--max-fields <n>", "Maximum unique fields per turn (applied before --max-issues)").option("--max-groups <n>", "Maximum unique groups per turn (applied before --max-issues)").option("--roles <roles>", "Target roles to fill (comma-separated, or '*' for all; default: 'agent', or 'user' in --interactive mode)").option("--mode <mode>", "Fill mode: continue (skip filled fields) or overwrite (re-fill; default: continue)").option("-o, --output <file>", "Write final form to file").option("--prompt <file>", "Path to custom system prompt file (appends to default)").option("--instructions <text>", "Inline system prompt (appends to default; takes precedence over --prompt)").option("-i, --interactive", "Interactive mode: prompt user for field values (defaults to user role)").option("--normalize", "Regenerate form without preserving external content").option("--record-fill", "Write fill record to sidecar .fill.json file").option("--record-fill-stable", "Write fill record without timestamps/durations (for golden tests)").option("--parallel", "Enable parallel execution for forms with parallel batches").action(async (file, options, cmd) => {
|
|
2812
|
+
program.command("fill <file>").description("Run an agent to autonomously fill a form").option("--mock", "Use mock agent (requires --mock-source)").option("--model <id>", "Model ID for live agent (format: provider/model-id, e.g. openai/gpt-5-mini)").option("--mock-source <file>", "Path to completed form for mock agent").option("--record <file>", "Record session transcript to file").option("--max-turns <n>", `Maximum turns (default: ${DEFAULT_MAX_TURNS})`, String(DEFAULT_MAX_TURNS)).option("--max-patches <n>", `Maximum patches per turn (default: ${DEFAULT_MAX_PATCHES_PER_TURN})`, String(DEFAULT_MAX_PATCHES_PER_TURN)).option("--max-issues <n>", `Maximum issues shown per turn (default: ${DEFAULT_MAX_ISSUES_PER_TURN})`, String(DEFAULT_MAX_ISSUES_PER_TURN)).option("--max-retries <n>", `Maximum retries for transient API errors (default: ${CLI_DEFAULT_MAX_RETRIES})`, String(CLI_DEFAULT_MAX_RETRIES)).option("--max-fields <n>", "Maximum unique fields per turn (applied before --max-issues)").option("--max-groups <n>", "Maximum unique groups per turn (applied before --max-issues)").option("--roles <roles>", "Target roles to fill (comma-separated, or '*' for all; default: 'agent', or 'user' in --interactive mode)").option("--mode <mode>", "Fill mode: continue (skip filled fields) or overwrite (re-fill; default: continue)").option("-o, --output <file>", "Write final form to file").option("--prompt <file>", "Path to custom system prompt file (appends to default)").option("--instructions <text>", "Inline system prompt (appends to default; takes precedence over --prompt)").option("-i, --interactive", "Interactive mode: prompt user for field values (defaults to user role)").option("--normalize", "Regenerate form without preserving external content").option("--record-fill", "Write fill record to sidecar .fill.json file").option("--record-fill-stable", "Write fill record without timestamps/durations (for golden tests)").option("--parallel", "Enable parallel execution for forms with parallel batches").action(async (file, options, cmd) => {
|
|
2812
2813
|
const ctx = getCommandContext(cmd);
|
|
2813
2814
|
const filePath = resolve(file);
|
|
2814
2815
|
let harness;
|
|
@@ -2913,6 +2914,7 @@ function registerFillCommand(program) {
|
|
|
2913
2914
|
await ensureFormsDir(formsDir);
|
|
2914
2915
|
outputPath = generateVersionedPathInFormsDir(filePath, formsDir);
|
|
2915
2916
|
}
|
|
2917
|
+
const maxRetries = parseInt(options.maxRetries, 10);
|
|
2916
2918
|
const result = await fillForm({
|
|
2917
2919
|
form,
|
|
2918
2920
|
model: options.model,
|
|
@@ -2920,6 +2922,7 @@ function registerFillCommand(program) {
|
|
|
2920
2922
|
enableWebSearch: true,
|
|
2921
2923
|
captureWireFormat: false,
|
|
2922
2924
|
recordFill: true,
|
|
2925
|
+
maxRetries,
|
|
2923
2926
|
targetRoles,
|
|
2924
2927
|
fillMode,
|
|
2925
2928
|
maxTurnsTotal: options.maxTurns ? parseInt(options.maxTurns, 10) : void 0,
|
|
@@ -3074,6 +3077,7 @@ function registerFillCommand(program) {
|
|
|
3074
3077
|
systemPromptAddition: systemPrompt,
|
|
3075
3078
|
targetRole,
|
|
3076
3079
|
enableWebSearch: true,
|
|
3080
|
+
maxRetries: parseInt(options.maxRetries, 10),
|
|
3077
3081
|
callbacks
|
|
3078
3082
|
});
|
|
3079
3083
|
agent = liveAgent;
|
|
@@ -5826,7 +5830,7 @@ function validateInitialValueFields(patches, validFieldIds) {
|
|
|
5826
5830
|
* Register the research command.
|
|
5827
5831
|
*/
|
|
5828
5832
|
function registerResearchCommand(program) {
|
|
5829
|
-
program.command("research <input>").description("Fill a form using a web-search-enabled model").option("--model <provider/model>", "LLM model to use (e.g., google/gemini-2.5-flash). Required.").option("--output <path>", "Output path for filled form (default: auto-generated in forms directory)").option("--input <fieldId=value>", "Set initial field value (can be used multiple times)", (value, previous) => previous.concat([value]), []).option("--max-turns <n>", `Maximum turns (default: ${DEFAULT_MAX_TURNS})`, String(DEFAULT_MAX_TURNS)).option("--max-patches <n>", `Maximum patches per turn (default: ${DEFAULT_RESEARCH_MAX_PATCHES_PER_TURN})`, String(DEFAULT_RESEARCH_MAX_PATCHES_PER_TURN)).option("--max-issues <n>", `Maximum issues per turn (default: ${DEFAULT_RESEARCH_MAX_ISSUES_PER_TURN})`, String(DEFAULT_RESEARCH_MAX_ISSUES_PER_TURN)).option("--transcript", "Save session transcript").action(async (input, options, cmd) => {
|
|
5833
|
+
program.command("research <input>").description("Fill a form using a web-search-enabled model").option("--model <provider/model>", "LLM model to use (e.g., google/gemini-2.5-flash). Required.").option("--output <path>", "Output path for filled form (default: auto-generated in forms directory)").option("--input <fieldId=value>", "Set initial field value (can be used multiple times)", (value, previous) => previous.concat([value]), []).option("--max-turns <n>", `Maximum turns (default: ${DEFAULT_MAX_TURNS})`, String(DEFAULT_MAX_TURNS)).option("--max-patches <n>", `Maximum patches per turn (default: ${DEFAULT_RESEARCH_MAX_PATCHES_PER_TURN})`, String(DEFAULT_RESEARCH_MAX_PATCHES_PER_TURN)).option("--max-issues <n>", `Maximum issues per turn (default: ${DEFAULT_RESEARCH_MAX_ISSUES_PER_TURN})`, String(DEFAULT_RESEARCH_MAX_ISSUES_PER_TURN)).option("--max-retries <n>", `Maximum retries for transient API errors (default: ${CLI_DEFAULT_MAX_RETRIES})`, String(CLI_DEFAULT_MAX_RETRIES)).option("--transcript", "Save session transcript").action(async (input, options, cmd) => {
|
|
5830
5834
|
const ctx = getCommandContext(cmd);
|
|
5831
5835
|
const startTime = Date.now();
|
|
5832
5836
|
try {
|
|
@@ -5872,6 +5876,7 @@ function registerResearchCommand(program) {
|
|
|
5872
5876
|
const maxTurns = parseInt(options.maxTurns, 10);
|
|
5873
5877
|
const maxPatchesPerTurn = parseInt(options.maxPatches, 10);
|
|
5874
5878
|
const maxIssuesPerTurn = parseInt(options.maxIssues, 10);
|
|
5879
|
+
const maxRetries = parseInt(options.maxRetries, 10);
|
|
5875
5880
|
logInfo(ctx, `Research fill with model: ${modelId}`);
|
|
5876
5881
|
logVerbose(ctx, `Max turns: ${maxTurns}`);
|
|
5877
5882
|
logVerbose(ctx, `Max patches/turn: ${maxPatchesPerTurn}`);
|
|
@@ -5888,6 +5893,7 @@ function registerResearchCommand(program) {
|
|
|
5888
5893
|
enableWebSearch: true,
|
|
5889
5894
|
captureWireFormat: false,
|
|
5890
5895
|
recordFill: false,
|
|
5896
|
+
maxRetries,
|
|
5891
5897
|
maxTurnsTotal: maxTurns,
|
|
5892
5898
|
maxPatchesPerTurn,
|
|
5893
5899
|
maxIssuesPerTurn,
|
|
@@ -6676,4 +6682,4 @@ async function runCli() {
|
|
|
6676
6682
|
|
|
6677
6683
|
//#endregion
|
|
6678
6684
|
export { runCli as t };
|
|
6679
|
-
//# sourceMappingURL=cli-
|
|
6685
|
+
//# sourceMappingURL=cli-DVAFMui4.mjs.map
|