markform 0.1.17 → 0.1.18
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 +2 -2
- package/dist/ai-sdk.d.mts +1 -1
- package/dist/ai-sdk.mjs +2 -2
- package/dist/{apply-DgDJBscb.mjs → apply-BYgtU64w.mjs} +29 -3
- package/dist/apply-BYgtU64w.mjs.map +1 -0
- package/dist/bin.mjs +1 -1
- package/dist/{cli-DAl8LQzI.mjs → cli-D9w0Bp4J.mjs} +192 -6
- package/dist/cli-D9w0Bp4J.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/{coreTypes-CnEea7Kh.d.mts → coreTypes-BMEs8h_2.d.mts} +125 -2
- package/dist/{coreTypes-DiCddBKu.mjs → coreTypes-SDB3KRRJ.mjs} +9 -4
- package/dist/coreTypes-SDB3KRRJ.mjs.map +1 -0
- package/dist/index.d.mts +129 -2
- package/dist/index.mjs +5 -5
- package/dist/{session-B7aR6hno.mjs → session-CW9AQw6i.mjs} +1 -1
- package/dist/{session-XDrocA3j.mjs → session-Ci4B0Pna.mjs} +2 -2
- package/dist/{session-XDrocA3j.mjs.map → session-Ci4B0Pna.mjs.map} +1 -1
- package/dist/{src-CHVJLGKt.mjs → src-DDxi-2ne.mjs} +495 -14
- package/dist/src-DDxi-2ne.mjs.map +1 -0
- package/docs/markform-apis.md +31 -0
- package/docs/markform-reference.md +27 -0
- package/docs/markform-spec.md +115 -0
- package/examples/movie-research/movie-deep-research-mock-filled.form.md +1 -1
- package/examples/movie-research/movie-deep-research.form.md +1 -1
- package/examples/parallel/parallel-research.form.md +57 -0
- package/examples/startup-deep-research/startup-deep-research.form.md +1 -1
- package/package.json +1 -1
- package/dist/apply-DgDJBscb.mjs.map +0 -1
- package/dist/cli-DAl8LQzI.mjs.map +0 -1
- package/dist/coreTypes-DiCddBKu.mjs.map +0 -1
- package/dist/src-CHVJLGKt.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Markform
|
|
2
2
|
|
|
3
|
-
[](https://github.com/jlevy/markform/actions/runs/
|
|
4
|
-
[](https://github.com/jlevy/markform/actions/runs/
|
|
3
|
+
[](https://github.com/jlevy/markform/actions/runs/21430430567)
|
|
4
|
+
[](https://github.com/jlevy/markform/actions/runs/21430430567)
|
|
5
5
|
[](https://www.npmjs.com/package/markform)
|
|
6
6
|
[](https://x.com/ojoshe)
|
|
7
7
|
|
package/dist/ai-sdk.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { At as
|
|
2
|
+
import { At as Patch, Mt as PatchSchema, U as FieldResponse, Y as FormSchema, at as InspectResult, et as Id, kt as ParsedForm, mr as ValidatorRegistry, r as ApplyResult } from "./coreTypes-BMEs8h_2.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/integrations/toolTypes.d.ts
|
package/dist/ai-sdk.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { L as PatchSchema } from "./coreTypes-
|
|
3
|
-
import { d as serializeForm, i as inspect, t as applyPatches } from "./apply-
|
|
2
|
+
import { L as PatchSchema } from "./coreTypes-SDB3KRRJ.mjs";
|
|
3
|
+
import { d as serializeForm, i as inspect, t as applyPatches } from "./apply-BYgtU64w.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/integrations/vercelAiSdkTools.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import YAML from "yaml";
|
|
3
3
|
|
|
4
4
|
//#region src/errors.ts
|
|
5
|
-
const VERSION = "0.1.
|
|
5
|
+
const VERSION = "0.1.18";
|
|
6
6
|
/**
|
|
7
7
|
* Base error class for all markform errors.
|
|
8
8
|
* Consumers can catch this to handle any markform error.
|
|
@@ -373,6 +373,11 @@ const DEFAULT_MAX_PATCHES_PER_TURN = 20;
|
|
|
373
373
|
*/
|
|
374
374
|
const DEFAULT_MAX_ISSUES_PER_TURN = 10;
|
|
375
375
|
/**
|
|
376
|
+
* Default maximum concurrent agents for parallel batches.
|
|
377
|
+
* When parallel batches are executed, this limits how many agents run simultaneously.
|
|
378
|
+
*/
|
|
379
|
+
const DEFAULT_MAX_PARALLEL_AGENTS = 4;
|
|
380
|
+
/**
|
|
376
381
|
* Default maximum AI SDK steps (tool call rounds) per harness turn.
|
|
377
382
|
* Matches AI SDK's ToolLoopAgent default of 20.
|
|
378
383
|
* @see https://ai-sdk.dev/docs/agents/loop-control
|
|
@@ -1236,6 +1241,13 @@ function getMarker(state) {
|
|
|
1236
1241
|
return STATE_TO_MARKER[state] ?? " ";
|
|
1237
1242
|
}
|
|
1238
1243
|
/**
|
|
1244
|
+
* Add parallel and order attributes to a field's attrs object if defined.
|
|
1245
|
+
*/
|
|
1246
|
+
function addParallelOrderAttrs(attrs, field) {
|
|
1247
|
+
if (field.parallel !== void 0) attrs.parallel = field.parallel;
|
|
1248
|
+
if (field.order !== void 0) attrs.order = field.order;
|
|
1249
|
+
}
|
|
1250
|
+
/**
|
|
1239
1251
|
* Serialize a string field.
|
|
1240
1252
|
*/
|
|
1241
1253
|
function serializeStringField(field, response) {
|
|
@@ -1253,6 +1265,7 @@ function serializeStringField(field, response) {
|
|
|
1253
1265
|
if (field.maxLength !== void 0) attrs.maxLength = field.maxLength;
|
|
1254
1266
|
if (field.validate) attrs.validate = field.validate;
|
|
1255
1267
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1268
|
+
addParallelOrderAttrs(attrs, field);
|
|
1256
1269
|
if (field.placeholder) attrs.placeholder = field.placeholder;
|
|
1257
1270
|
if (field.examples && field.examples.length > 0) attrs.examples = field.examples;
|
|
1258
1271
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
@@ -1283,6 +1296,7 @@ function serializeNumberField(field, response) {
|
|
|
1283
1296
|
if (field.integer) attrs.integer = field.integer;
|
|
1284
1297
|
if (field.validate) attrs.validate = field.validate;
|
|
1285
1298
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1299
|
+
addParallelOrderAttrs(attrs, field);
|
|
1286
1300
|
if (field.placeholder) attrs.placeholder = field.placeholder;
|
|
1287
1301
|
if (field.examples && field.examples.length > 0) attrs.examples = field.examples;
|
|
1288
1302
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
@@ -1315,6 +1329,7 @@ function serializeStringListField(field, response) {
|
|
|
1315
1329
|
if (field.uniqueItems) attrs.uniqueItems = field.uniqueItems;
|
|
1316
1330
|
if (field.validate) attrs.validate = field.validate;
|
|
1317
1331
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1332
|
+
addParallelOrderAttrs(attrs, field);
|
|
1318
1333
|
if (field.placeholder) attrs.placeholder = field.placeholder;
|
|
1319
1334
|
if (field.examples && field.examples.length > 0) attrs.examples = field.examples;
|
|
1320
1335
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
@@ -1353,6 +1368,7 @@ function serializeSingleSelectField(field, response) {
|
|
|
1353
1368
|
if (field.role !== AGENT_ROLE) attrs.role = field.role;
|
|
1354
1369
|
if (field.validate) attrs.validate = field.validate;
|
|
1355
1370
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1371
|
+
addParallelOrderAttrs(attrs, field);
|
|
1356
1372
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
1357
1373
|
const attrStr = serializeAttrs(attrs);
|
|
1358
1374
|
let value;
|
|
@@ -1377,6 +1393,7 @@ function serializeMultiSelectField(field, response) {
|
|
|
1377
1393
|
if (field.maxSelections !== void 0) attrs.maxSelections = field.maxSelections;
|
|
1378
1394
|
if (field.validate) attrs.validate = field.validate;
|
|
1379
1395
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1396
|
+
addParallelOrderAttrs(attrs, field);
|
|
1380
1397
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
1381
1398
|
const attrStr = serializeAttrs(attrs);
|
|
1382
1399
|
let value;
|
|
@@ -1403,6 +1420,7 @@ function serializeCheckboxesField(field, response) {
|
|
|
1403
1420
|
if (field.approvalMode !== "none") attrs.approvalMode = field.approvalMode;
|
|
1404
1421
|
if (field.validate) attrs.validate = field.validate;
|
|
1405
1422
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1423
|
+
addParallelOrderAttrs(attrs, field);
|
|
1406
1424
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
1407
1425
|
const attrStr = serializeAttrs(attrs);
|
|
1408
1426
|
let value;
|
|
@@ -1423,6 +1441,7 @@ function serializeUrlField(field, response) {
|
|
|
1423
1441
|
if (field.role !== AGENT_ROLE) attrs.role = field.role;
|
|
1424
1442
|
if (field.validate) attrs.validate = field.validate;
|
|
1425
1443
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1444
|
+
addParallelOrderAttrs(attrs, field);
|
|
1426
1445
|
if (field.placeholder) attrs.placeholder = field.placeholder;
|
|
1427
1446
|
if (field.examples && field.examples.length > 0) attrs.examples = field.examples;
|
|
1428
1447
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
@@ -1453,6 +1472,7 @@ function serializeUrlListField(field, response) {
|
|
|
1453
1472
|
if (field.uniqueItems) attrs.uniqueItems = field.uniqueItems;
|
|
1454
1473
|
if (field.validate) attrs.validate = field.validate;
|
|
1455
1474
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1475
|
+
addParallelOrderAttrs(attrs, field);
|
|
1456
1476
|
if (field.placeholder) attrs.placeholder = field.placeholder;
|
|
1457
1477
|
if (field.examples && field.examples.length > 0) attrs.examples = field.examples;
|
|
1458
1478
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
@@ -1482,6 +1502,7 @@ function serializeDateField(field, response) {
|
|
|
1482
1502
|
if (field.max !== void 0) attrs.max = field.max;
|
|
1483
1503
|
if (field.validate) attrs.validate = field.validate;
|
|
1484
1504
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1505
|
+
addParallelOrderAttrs(attrs, field);
|
|
1485
1506
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
1486
1507
|
const attrStr = serializeAttrs(attrs);
|
|
1487
1508
|
let content = "";
|
|
@@ -1509,6 +1530,7 @@ function serializeYearField(field, response) {
|
|
|
1509
1530
|
if (field.max !== void 0) attrs.max = field.max;
|
|
1510
1531
|
if (field.validate) attrs.validate = field.validate;
|
|
1511
1532
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1533
|
+
addParallelOrderAttrs(attrs, field);
|
|
1512
1534
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
1513
1535
|
const attrStr = serializeAttrs(attrs);
|
|
1514
1536
|
let content = "";
|
|
@@ -1578,6 +1600,7 @@ function serializeTableField(field, response) {
|
|
|
1578
1600
|
if (field.maxRows !== void 0) attrs.maxRows = field.maxRows;
|
|
1579
1601
|
if (field.validate) attrs.validate = field.validate;
|
|
1580
1602
|
if (field.report !== void 0) attrs.report = field.report;
|
|
1603
|
+
addParallelOrderAttrs(attrs, field);
|
|
1581
1604
|
if (response?.state === "skipped" || response?.state === "aborted") attrs.state = response.state;
|
|
1582
1605
|
const attrStr = serializeAttrs(attrs);
|
|
1583
1606
|
let content = "";
|
|
@@ -1654,6 +1677,8 @@ function serializeFieldGroup(group, responses, docs) {
|
|
|
1654
1677
|
if (group.title) attrs.title = group.title;
|
|
1655
1678
|
if (group.validate) attrs.validate = group.validate;
|
|
1656
1679
|
if (group.report !== void 0) attrs.report = group.report;
|
|
1680
|
+
if (group.parallel !== void 0) attrs.parallel = group.parallel;
|
|
1681
|
+
if (group.order !== void 0) attrs.order = group.order;
|
|
1657
1682
|
const attrStr = serializeAttrs(attrs);
|
|
1658
1683
|
lines.push(`{% group ${attrStr} %}`);
|
|
1659
1684
|
}
|
|
@@ -1717,6 +1742,7 @@ function buildHarnessConfig(config) {
|
|
|
1717
1742
|
if (config.maxTurns !== void 0) result.max_turns = config.maxTurns;
|
|
1718
1743
|
if (config.maxPatchesPerTurn !== void 0) result.max_patches_per_turn = config.maxPatchesPerTurn;
|
|
1719
1744
|
if (config.maxIssuesPerTurn !== void 0) result.max_issues_per_turn = config.maxIssuesPerTurn;
|
|
1745
|
+
if (config.maxParallelAgents !== void 0) result.max_parallel_agents = config.maxParallelAgents;
|
|
1720
1746
|
return result;
|
|
1721
1747
|
}
|
|
1722
1748
|
/**
|
|
@@ -3868,5 +3894,5 @@ function applyPatches(form, patches) {
|
|
|
3868
3894
|
}
|
|
3869
3895
|
|
|
3870
3896
|
//#endregion
|
|
3871
|
-
export {
|
|
3872
|
-
//# sourceMappingURL=apply-
|
|
3897
|
+
export { isAbortError as $, DEFAULT_ROLE_INSTRUCTIONS as A, WEB_SEARCH_CONFIG as B, DEFAULT_MAX_STEPS_PER_TURN as C, DEFAULT_RESEARCH_MAX_ISSUES_PER_TURN as D, DEFAULT_PRIORITY as E, deriveReportPath as F, MarkformAbortError as G, getWebSearchConfig as H, deriveSchemaPath as I, MarkformLlmError as J, MarkformConfigError as K, detectFileType as L, REPORT_EXTENSION as M, USER_ROLE as N, DEFAULT_RESEARCH_MAX_PATCHES_PER_TURN as O, deriveExportPath as P, ParseError as Q, parseRolesFlag as R, DEFAULT_MAX_PATCHES_PER_TURN as S, DEFAULT_PORT as T, hasWebSearchSupport as U, formatSuggestedLlms as V, parseModelIdForDisplay as W, MarkformPatchError as X, MarkformParseError as Y, MarkformValidationError as Z, validateSyntaxConsistency as _, validate as a, isRetryableError as at, DEFAULT_MAX_ISSUES_PER_TURN as b, computeProgressSummary as c, serializeForm as d, isConfigError as et, serializeRawMarkdown as f, preprocessCommentSyntax as g, detectSyntaxStyle as h, inspect as i, isPatchError as it, MAX_FORMS_IN_MENU as j, DEFAULT_ROLES as k, computeStructureSummary as l, friendlyUrlAbbrev as m, getAllFields as n, isMarkformError as nt, computeAllSummaries as o, isValidationError as ot, serializeReport as p, MarkformError as q, getFieldsForRoles as r, isParseError as rt, computeFormState as s, applyPatches as t, isLlmError as tt, isFormComplete as u, AGENT_ROLE as v, DEFAULT_MAX_TURNS as w, DEFAULT_MAX_PARALLEL_AGENTS as x, DEFAULT_FORMS_DIR as y, SUGGESTED_LLMS as z };
|
|
3898
|
+
//# sourceMappingURL=apply-BYgtU64w.mjs.map
|