markform 0.1.22 → 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 +36 -16
- package/dist/ai-sdk.mjs +1 -1
- package/dist/{apply-C7mO7VkZ.mjs → apply-KzQztrDV.mjs} +2 -2
- package/dist/{apply-C7mO7VkZ.mjs.map → apply-KzQztrDV.mjs.map} +1 -1
- package/dist/bin.mjs +1 -1
- package/dist/{cli-C8F9yDsv.mjs → cli-ZcOC47KK.mjs} +13 -6
- package/dist/cli-ZcOC47KK.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/{fillRecordRenderer-CruJrLkj.mjs → fillRecordRenderer-VBQ2vwPV.mjs} +2 -5
- package/dist/fillRecordRenderer-VBQ2vwPV.mjs.map +1 -0
- package/dist/index.d.mts +48 -1
- package/dist/index.mjs +3 -3
- package/dist/render.mjs +1 -1
- package/dist/{src-CbRnGzMK.mjs → src-B2uFvGli.mjs} +90 -13
- package/dist/{src-CbRnGzMK.mjs.map → src-B2uFvGli.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/cli-C8F9yDsv.mjs.map +0 -1
- package/dist/fillRecordRenderer-CruJrLkj.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
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/21980795343)
|
|
4
|
+
[](https://github.com/jlevy/markform/actions/runs/21980795343)
|
|
5
5
|
[](https://www.npmjs.com/package/markform)
|
|
6
6
|
[](https://x.com/ojoshe)
|
|
7
7
|
|
|
8
|
+
### What if your Markdown docs had an agent-friendly semantic API?
|
|
9
|
+
|
|
8
10
|
**Markform** is a text format for defining structured forms that humans can read,
|
|
9
11
|
machines can parse, and agents can fill via tool calls.
|
|
10
12
|
|
|
@@ -13,12 +15,14 @@ Agents fill forms incrementally via patches.
|
|
|
13
15
|
Fields are validated, so errors are caught early and can be corrected.
|
|
14
16
|
Humans can review or intervene at any point.
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
### Why forms?
|
|
19
|
+
|
|
20
|
+
For deep research or complex AI tasks, you need more than just prompts or
|
|
17
21
|
flow: you need *structure*, which is precise control over agent output at every stage of
|
|
18
22
|
a workflow. A well-designed form combines instructions, structured data, and validations
|
|
19
23
|
in one place.
|
|
20
24
|
|
|
21
|
-
|
|
25
|
+
### How it Works
|
|
22
26
|
|
|
23
27
|
- A Markform document exposes a programmatic interface: users fill fields via CLI or web
|
|
24
28
|
UI, agents fill via tool calls ([Vercel AI SDK](https://github.com/vercel/ai)
|
|
@@ -33,9 +37,25 @@ in one place.
|
|
|
33
37
|
[precise specification](https://github.com/jlevy/markform/blob/main/docs/markform-spec.md).
|
|
34
38
|
Export Markform syntax to JSON, YAML, JSON Schema, or plain Markdown reports.
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
- Optionally, the whole thing is wrapped in a harness where large forms can be filled
|
|
41
|
+
concurrently by any LLM in a structured agentic loop.
|
|
42
|
+
|
|
43
|
+
### Useful details
|
|
44
|
+
|
|
45
|
+
- Markform syntax is a good source format: it is **token-efficient text** you can read, diff, and
|
|
46
|
+
version control and it is **ideal for context engineering** because it combines
|
|
47
|
+
document context, data schema, and memory (data filled so far).
|
|
48
|
+
|
|
49
|
+
- Structure is defined with HTML comment tags (`<!-- field -->`) that
|
|
50
|
+
render invisibly on GitHub, so **forms look like regular Markdown**. (Jinja-style
|
|
51
|
+
tag syntax also works if you prefer.)
|
|
52
|
+
|
|
53
|
+
- Optionally, **a fill record** of the form-filling process is kept, so you can see
|
|
54
|
+
and debug exactly how forms are filled by agents, tool usage, LLM call time, etc.
|
|
55
|
+
|
|
56
|
+
- The CLI has a built-in web renderer, **`markform serve`**, for easy viewing and debugging
|
|
57
|
+
of forms (including a form web UI, the form schema, and a waterfall-style overview of the
|
|
58
|
+
fill record, including performance details, which is useful for large, concurrently filled forms).
|
|
39
59
|
|
|
40
60
|
## Simple Example: Research a Movie
|
|
41
61
|
|
|
@@ -364,16 +384,16 @@ flowchart LR
|
|
|
364
384
|
subgraph SPEC["<b>MARKFORM SPEC</b>"]
|
|
365
385
|
direction TB
|
|
366
386
|
|
|
367
|
-
subgraph L1["<b>LAYER 1: SYNTAX</b><br/>Markdoc tag syntax
|
|
387
|
+
subgraph L1["<b>LAYER 1: SYNTAX</b><br/>Markdoc tag syntax<br/>and frontmatter (form,<br/>group, string-field, <br/>checkboxes, etc.)"]
|
|
368
388
|
end
|
|
369
389
|
|
|
370
|
-
subgraph L2["<b>LAYER 2: FORM DATA MODEL</b><br/>Schema definitions
|
|
390
|
+
subgraph L2["<b>LAYER 2: FORM DATA MODEL</b><br/>Schema definitions<br/>for forms, fields, values"]
|
|
371
391
|
end
|
|
372
392
|
|
|
373
|
-
subgraph L3["<b>LAYER 3: VALIDATION
|
|
393
|
+
subgraph L3["<b>LAYER 3: VALIDATION <br/>AND PATCHES</b><br/>Rules for filling forms<br/>via patches, required<br/>field semantics, validation"]
|
|
374
394
|
end
|
|
375
395
|
|
|
376
|
-
subgraph L4["<b>LAYER 4: TOOL API
|
|
396
|
+
subgraph L4["<b>LAYER 4: TOOL API <br/>AND INTERFACES</b><br/>Abstract form-filling<br/>loop, concurrency<br/>model, tool layer"]
|
|
377
397
|
end
|
|
378
398
|
|
|
379
399
|
L4 --> L3 --> L2 --> L1
|
|
@@ -382,19 +402,19 @@ flowchart LR
|
|
|
382
402
|
subgraph IMPL["<b>THIS IMPLEMENTATION</b>"]
|
|
383
403
|
direction TB
|
|
384
404
|
|
|
385
|
-
subgraph CLI["<b>`markform` CLI</b><br/>Command-line interface
|
|
405
|
+
subgraph CLI["<b>`markform` CLI</b><br/>Command-line interface<br/>to all features"]
|
|
386
406
|
end
|
|
387
407
|
|
|
388
|
-
subgraph AGENT["<b>AGENT TOOL INTERFACE</b><br/>Tool API library
|
|
408
|
+
subgraph AGENT["<b>AGENT TOOL INTERFACE</b><br/>Tool API library><br/>(AI SDK tools)"]
|
|
389
409
|
end
|
|
390
410
|
|
|
391
|
-
subgraph HARNESS["<b>EXECUTION HARNESS</b><br/>
|
|
411
|
+
subgraph HARNESS["<b>EXECUTION HARNESS</b><br/>Concurrent form-filling<br/>agentic loop<br/>(AI SDK)"]
|
|
392
412
|
end
|
|
393
413
|
|
|
394
|
-
subgraph ENGINE["<b>CORE TYPESCRIPT APIS</b><br/>Markdoc parser, serializer
|
|
414
|
+
subgraph ENGINE["<b>CORE TYPESCRIPT APIS</b><br/>Markdoc parser, serializer,<br/>patch application,<br/>validation (jiti for rules)"]
|
|
395
415
|
end
|
|
396
416
|
|
|
397
|
-
subgraph TEST["<b>TESTING FRAMEWORK</b><br/>Golden session testing
|
|
417
|
+
subgraph TEST["<b>TESTING FRAMEWORK</b><br/>Golden session testing<br/>(.session.yaml transcripts)"]
|
|
398
418
|
end
|
|
399
419
|
|
|
400
420
|
CLI --> ENGINE
|
package/dist/ai-sdk.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { R as PatchSchema } from "./coreTypes-CTLr-NGd.mjs";
|
|
3
|
-
import { d as serializeForm, i as inspect, t as applyPatches } from "./apply-
|
|
3
|
+
import { d as serializeForm, i as inspect, t as applyPatches } from "./apply-KzQztrDV.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
|
|
6
6
|
//#region src/integrations/vercelAiSdkTools.ts
|
|
@@ -3,7 +3,7 @@ import { n as formatUrlAsMarkdownLink } from "./urlFormat-lls7CsEP.mjs";
|
|
|
3
3
|
import YAML from "yaml";
|
|
4
4
|
|
|
5
5
|
//#region src/errors.ts
|
|
6
|
-
const VERSION = "0.1.
|
|
6
|
+
const VERSION = "0.1.23";
|
|
7
7
|
/**
|
|
8
8
|
* Base error class for all markform errors.
|
|
9
9
|
* Consumers can catch this to handle any markform error.
|
|
@@ -4357,4 +4357,4 @@ function applyPatches(form, patches) {
|
|
|
4357
4357
|
|
|
4358
4358
|
//#endregion
|
|
4359
4359
|
export { WEB_SEARCH_CONFIG as $, DEFAULT_FORMS_DIR as A, DEFAULT_ROLES as B, getNumberAttr as C, isTagNode as D, getValidateAttr as E, DEFAULT_MAX_TURNS as F, deriveExportPath as G, MAX_FORMS_IN_MENU as H, DEFAULT_PORT as I, deriveSchemaPath as J, deriveFillRecordPath as K, DEFAULT_PRIORITY as L, DEFAULT_MAX_PARALLEL_AGENTS as M, DEFAULT_MAX_PATCHES_PER_TURN as N, parseOptionText as O, DEFAULT_MAX_STEPS_PER_TURN as P, SUGGESTED_LLMS as Q, DEFAULT_RESEARCH_MAX_ISSUES_PER_TURN as R, getBooleanAttr as S, getStringAttr as T, REPORT_EXTENSION as U, DEFAULT_ROLE_INSTRUCTIONS as V, USER_ROLE as W, parseRolesFlag as X, detectFileType as Y, transformHarnessConfigToTs as Z, tryParseSentinelResponse as _, isPatchError as _t, validate as a, MarkformConfigError as at, extractOptionItems as b, wrapApiError as bt, computeProgressSummary as c, MarkformParseError as ct, serializeForm as d, ParseError as dt, formatSuggestedLlms as et, serializeRawMarkdown as f, isAbortError as ft, validateSyntaxConsistency as g, isParseError as gt, preprocessCommentSyntax as h, isMarkformError as ht, inspect as i, MarkformAbortError as it, DEFAULT_MAX_ISSUES_PER_TURN as j, AGENT_ROLE as k, computeStructureSummary as l, MarkformPatchError as lt, detectSyntaxStyle as m, isLlmError as mt, getAllFields as n, hasWebSearchSupport as nt, computeAllSummaries as o, MarkformError as ot, serializeReport as p, isConfigError as pt, deriveReportPath as q, getFieldsForRoles as r, parseModelIdForDisplay as rt, computeFormState as s, MarkformLlmError as st, applyPatches as t, getWebSearchConfig as tt, isFormComplete as u, MarkformValidationError as ut, CHECKBOX_MARKERS as v, isRetryableError as vt, getStringArrayAttr as w, extractTableContent as x, extractFenceValue as y, isValidationError as yt, DEFAULT_RESEARCH_MAX_PATCHES_PER_TURN as z };
|
|
4360
|
-
//# sourceMappingURL=apply-
|
|
4360
|
+
//# sourceMappingURL=apply-KzQztrDV.mjs.map
|