markform 0.1.20 → 0.1.22

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.
Files changed (58) hide show
  1. package/README.md +44 -12
  2. package/dist/ai-sdk.d.mts +1 -1
  3. package/dist/ai-sdk.mjs +2 -2
  4. package/dist/{apply-DIvm1b1s.mjs → apply-C7mO7VkZ.mjs} +158 -95
  5. package/dist/apply-C7mO7VkZ.mjs.map +1 -0
  6. package/dist/bin.mjs +1 -1
  7. package/dist/{cli-FFMoEhFS.mjs → cli-C8F9yDsv.mjs} +102 -1225
  8. package/dist/cli-C8F9yDsv.mjs.map +1 -0
  9. package/dist/cli.mjs +1 -1
  10. package/dist/{coreTypes-CkxML8g2.d.mts → coreTypes-BlsJkU1w.d.mts} +28 -2
  11. package/dist/{coreTypes-CPKXf2dc.mjs → coreTypes-CTLr-NGd.mjs} +24 -3
  12. package/dist/coreTypes-CTLr-NGd.mjs.map +1 -0
  13. package/dist/fillRecord-DTl5lnK0.d.mts +345 -0
  14. package/dist/fillRecordRenderer-CruJrLkj.mjs +1256 -0
  15. package/dist/fillRecordRenderer-CruJrLkj.mjs.map +1 -0
  16. package/dist/index.d.mts +22 -342
  17. package/dist/index.mjs +5 -5
  18. package/dist/render.d.mts +74 -0
  19. package/dist/render.mjs +4 -0
  20. package/dist/{session-CK0x28RO.mjs → session-BCcltrLA.mjs} +2 -2
  21. package/dist/{session-CK0x28RO.mjs.map → session-BCcltrLA.mjs.map} +1 -1
  22. package/dist/{session-ZHBi3LVQ.mjs → session-VeSkVrck.mjs} +1 -1
  23. package/dist/{shared-DwdyWmvE.mjs → shared-CsdT2T7k.mjs} +1 -1
  24. package/dist/{shared-DwdyWmvE.mjs.map → shared-CsdT2T7k.mjs.map} +1 -1
  25. package/dist/{shared-BTR35aMz.mjs → shared-fb0nkzQi.mjs} +1 -1
  26. package/dist/{src-wR7GoftB.mjs → src-CbRnGzMK.mjs} +205 -138
  27. package/dist/src-CbRnGzMK.mjs.map +1 -0
  28. package/dist/urlFormat-lls7CsEP.mjs +71 -0
  29. package/dist/urlFormat-lls7CsEP.mjs.map +1 -0
  30. package/docs/markform-apis.md +53 -0
  31. package/examples/movie-research/movie-deep-research-mock-filled.form.md +320 -343
  32. package/examples/movie-research/movie-deep-research.form.md +273 -308
  33. package/examples/movie-research/movie-research-demo.form.md +27 -41
  34. package/examples/parallel/parallel-research.form.md +33 -29
  35. package/examples/parallel/parallel-research.mock.filled.form.md +88 -0
  36. package/examples/rejection-test/rejection-test-mock-filled.form.md +21 -16
  37. package/examples/rejection-test/rejection-test-mock-filled.schema.json +1 -1
  38. package/examples/rejection-test/rejection-test.form.md +17 -15
  39. package/examples/rejection-test/rejection-test.session.yaml +88 -60
  40. package/examples/simple/simple-mock-filled.form.md +113 -126
  41. package/examples/simple/simple-mock-filled.schema.json +2 -3
  42. package/examples/simple/simple-skipped-filled.form.md +112 -129
  43. package/examples/simple/simple-skipped-filled.report.md +8 -8
  44. package/examples/simple/simple-skipped-filled.schema.json +2 -3
  45. package/examples/simple/simple-tags-syntax.form.md +32 -0
  46. package/examples/simple/simple-with-skips.session.yaml +663 -627
  47. package/examples/simple/simple.form.md +97 -113
  48. package/examples/simple/simple.schema.json +2 -3
  49. package/examples/simple/simple.session.yaml +663 -627
  50. package/examples/startup-deep-research/startup-deep-research.form.md +191 -235
  51. package/examples/startup-research/startup-research-mock-filled.form.md +128 -147
  52. package/examples/startup-research/startup-research.form.md +90 -129
  53. package/examples/twitter-thread/twitter-thread.form.md +373 -0
  54. package/package.json +5 -1
  55. package/dist/apply-DIvm1b1s.mjs.map +0 -1
  56. package/dist/cli-FFMoEhFS.mjs.map +0 -1
  57. package/dist/coreTypes-CPKXf2dc.mjs.map +0 -1
  58. package/dist/src-wR7GoftB.mjs.map +0 -1
@@ -2,194 +2,178 @@
2
2
  markform:
3
3
  spec: MF/0.1
4
4
  title: Simple Test Form
5
- description: "Fully interactive demo - no LLM required. Demonstrates all Markform field types."
5
+ description: Fully interactive demo - no LLM required. Demonstrates all Markform field types.
6
6
  run_mode: interactive
7
7
  roles:
8
8
  - user
9
9
  role_instructions:
10
- user: "Fill in all fields in this form."
10
+ user: Fill in all fields in this form.
11
11
  ---
12
- {% form id="simple_test" title="Simple Test Form" %}
13
12
 
14
- {% description ref="simple_test" %}
13
+ <!-- form id="simple_test" title="Simple Test Form" -->
14
+
15
+ <!-- description ref="simple_test" -->
15
16
  A fully interactive form demonstrating all Markform v0.1 field types.
16
17
  Fill all fields using interactive prompts - no LLM API key needed.
17
- {% /description %}
18
+ <!-- /description -->
18
19
 
19
- {% group id="basic_fields" title="Basic Fields" %}
20
+ <!-- group id="basic_fields" title="Basic Fields" -->
20
21
 
21
- {% field kind="string" id="name" label="Name" role="user" required=true minLength=2 maxLength=50 placeholder="Enter your name" examples=["John Smith", "Jane Doe"] %}{% /field %}
22
+ <!-- field kind="string" id="name" role="user" examples=["John Smith", "Jane Doe"] label="Name" maxLength=50 minLength=2 placeholder="Enter your name" required=true --><!-- /field -->
22
23
 
23
- {% instructions ref="name" %}
24
+ <!-- instructions ref="name" -->
24
25
  Enter your full name (2-50 characters).
25
- {% /instructions %}
26
+ <!-- /instructions -->
26
27
 
27
- {% field kind="string" id="email" label="Email" role="user" required=true pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" examples=["alice@company.com", "bob@example.org"] %}{% /field %}
28
+ <!-- field kind="string" id="email" role="user" examples=["alice@company.com", "bob@example.org"] label="Email" pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" required=true --><!-- /field -->
28
29
 
29
- {% field kind="number" id="age" label="Age" role="user" required=true min=0 max=150 integer=true placeholder="25" examples=["18", "30", "45"] %}{% /field %}
30
+ <!-- field kind="number" id="age" role="user" examples=["18", "30", "45"] integer=true label="Age" max=150 min=0 placeholder="25" required=true --><!-- /field -->
30
31
 
31
- {% field kind="number" id="score" label="Score" role="user" min=0.0 max=100.0 placeholder="85.5" examples=["75.0", "90.5", "100.0"] %}{% /field %}
32
+ <!-- field kind="number" id="score" role="user" examples=["75.0", "90.5", "100.0"] label="Score" max=100 min=0 placeholder="85.5" --><!-- /field -->
32
33
 
33
- {% instructions ref="score" %}
34
+ <!-- instructions ref="score" -->
34
35
  Enter a score between 0 and 100 (optional).
35
- {% /instructions %}
36
+ <!-- /instructions -->
36
37
 
37
- {% /group %}
38
+ <!-- /group -->
38
39
 
39
- {% group id="list_fields" title="List Fields" %}
40
+ <!-- group id="list_fields" title="List Fields" -->
40
41
 
41
- {% field kind="string_list" id="tags" label="Tags" role="user" required=true minItems=1 maxItems=5 itemMinLength=2 uniqueItems=true %}{% /field %}
42
+ <!-- field kind="string_list" id="tags" role="user" itemMinLength=2 label="Tags" maxItems=5 minItems=1 required=true uniqueItems=true --><!-- /field -->
42
43
 
43
- {% instructions ref="tags" %}
44
+ <!-- instructions ref="tags" -->
44
45
  Add 1-5 unique tags (each at least 2 characters).
45
- {% /instructions %}
46
-
47
- {% /group %}
48
-
49
- {% group id="selection_fields" title="Selection Fields" %}
50
-
51
- {% field kind="single_select" id="priority" label="Priority" role="user" required=true %}
52
-
53
- - [ ] Low {% #low %}
54
- - [ ] Medium {% #medium %}
55
- - [ ] High {% #high %}
46
+ <!-- /instructions -->
56
47
 
57
- {% /field %}
48
+ <!-- /group -->
58
49
 
59
- {% field kind="multi_select" id="categories" label="Categories" role="user" required=true minSelections=1 maxSelections=3 %}
50
+ <!-- group id="selection_fields" title="Selection Fields" -->
60
51
 
61
- - [ ] Frontend {% #frontend %}
62
- - [ ] Backend {% #backend %}
63
- - [ ] Database {% #database %}
64
- - [ ] DevOps {% #devops %}
52
+ <!-- field kind="single_select" id="priority" role="user" label="Priority" required=true -->
53
+ - [ ] Low <!-- #low -->
54
+ - [ ] Medium <!-- #medium -->
55
+ - [ ] High <!-- #high -->
56
+ <!-- /field -->
65
57
 
66
- {% /field %}
58
+ <!-- field kind="multi_select" id="categories" role="user" label="Categories" maxSelections=3 minSelections=1 required=true -->
59
+ - [ ] Frontend <!-- #frontend -->
60
+ - [ ] Backend <!-- #backend -->
61
+ - [ ] Database <!-- #database -->
62
+ - [ ] DevOps <!-- #devops -->
63
+ <!-- /field -->
67
64
 
68
- {% /group %}
65
+ <!-- /group -->
69
66
 
70
- {% group id="checkbox_fields" title="Checkbox Fields" %}
67
+ <!-- group id="checkbox_fields" title="Checkbox Fields" -->
71
68
 
72
- {% field kind="checkboxes" id="tasks_multi" label="Tasks (Multi Mode)" role="user" checkboxMode="multi" required=true %}
69
+ <!-- field kind="checkboxes" id="tasks_multi" role="user" label="Tasks (Multi Mode)" required=true -->
70
+ - [ ] Research <!-- #research -->
71
+ - [ ] Design <!-- #design -->
72
+ - [ ] Implement <!-- #implement -->
73
+ - [ ] Test <!-- #test -->
74
+ <!-- /field -->
73
75
 
74
- - [ ] Research {% #research %}
75
- - [ ] Design {% #design %}
76
- - [ ] Implement {% #implement %}
77
- - [ ] Test {% #test %}
78
-
79
- {% /field %}
80
-
81
- {% instructions ref="tasks_multi" %}
76
+ <!-- instructions ref="tasks_multi" -->
82
77
  Track task progress.
83
78
  All must reach done or na state to complete.
84
- {% /instructions %}
85
-
86
- {% field kind="checkboxes" id="tasks_simple" label="Agreements (Simple Mode)" role="user" checkboxMode="simple" required=true %}
87
-
88
- - [ ] I have read the guidelines {% #read_guidelines %}
89
- - [ ] I agree to the terms {% #agree_terms %}
79
+ <!-- /instructions -->
90
80
 
91
- {% /field %}
81
+ <!-- field kind="checkboxes" id="tasks_simple" role="user" checkboxMode="simple" label="Agreements (Simple Mode)" required=true -->
82
+ - [ ] I have read the guidelines <!-- #read_guidelines -->
83
+ - [ ] I agree to the terms <!-- #agree_terms -->
84
+ <!-- /field -->
92
85
 
93
- {% field kind="checkboxes" id="confirmations" label="Confirmations (Explicit Mode)" role="user" checkboxMode="explicit" required=true %}
86
+ <!-- field kind="checkboxes" id="confirmations" role="user" checkboxMode="explicit" label="Confirmations (Explicit Mode)" required=true -->
87
+ - [ ] Data has been backed up <!-- #backed_up -->
88
+ - [ ] Stakeholders notified <!-- #notified -->
89
+ <!-- /field -->
94
90
 
95
- - [ ] Data has been backed up {% #backed_up %}
96
- - [ ] Stakeholders notified {% #notified %}
97
-
98
- {% /field %}
99
-
100
- {% instructions ref="confirmations" %}
91
+ <!-- instructions ref="confirmations" -->
101
92
  Answer yes or no for each confirmation.
102
93
  All must be explicitly answered.
103
- {% /instructions %}
94
+ <!-- /instructions -->
104
95
 
105
- {% /group %}
96
+ <!-- /group -->
106
97
 
107
- {% group id="url_fields" title="URL Fields" %}
98
+ <!-- group id="url_fields" title="URL Fields" -->
108
99
 
109
- {% field kind="url" id="website" label="Website" role="user" required=true placeholder="https://example.com" examples=["https://github.com/user/repo", "https://company.com"] %}{% /field %}
100
+ <!-- field kind="url" id="website" role="user" examples=["https://github.com/user/repo", "https://company.com"] label="Website" placeholder="https://example.com" required=true --><!-- /field -->
110
101
 
111
- {% instructions ref="website" %}
102
+ <!-- instructions ref="website" -->
112
103
  Enter your website URL (must be http or https).
113
- {% /instructions %}
104
+ <!-- /instructions -->
114
105
 
115
- {% field kind="url_list" id="references" label="References" role="user" minItems=1 maxItems=5 uniqueItems=true placeholder="https://docs.example.com" examples=["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"] %}{% /field %}
106
+ <!-- field kind="url_list" id="references" role="user" examples=["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"] label="References" maxItems=5 minItems=1 placeholder="https://docs.example.com" uniqueItems=true --><!-- /field -->
116
107
 
117
- {% instructions ref="references" %}
108
+ <!-- instructions ref="references" -->
118
109
  Add 1-5 unique reference URLs for sources or documentation.
119
- {% /instructions %}
110
+ <!-- /instructions -->
120
111
 
121
- {% /group %}
112
+ <!-- /group -->
122
113
 
123
- {% group id="date_fields" title="Date and Year Fields" %}
114
+ <!-- group id="date_fields" title="Date and Year Fields" -->
124
115
 
125
- {% field kind="date" id="event_date" label="Event Date" role="user" required=true min="2020-01-01" max="2030-12-31" %}{% /field %}
116
+ <!-- field kind="date" id="event_date" role="user" label="Event Date" max="2030-12-31" min="2020-01-01" required=true --><!-- /field -->
126
117
 
127
- {% instructions ref="event_date" %}
118
+ <!-- instructions ref="event_date" -->
128
119
  Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
129
- {% /instructions %}
120
+ <!-- /instructions -->
130
121
 
131
- {% field kind="year" id="founded_year" label="Founded Year" role="user" required=true min=1900 max=2030 %}{% /field %}
122
+ <!-- field kind="year" id="founded_year" role="user" label="Founded Year" max=2030 min=1900 required=true --><!-- /field -->
132
123
 
133
- {% instructions ref="founded_year" %}
124
+ <!-- instructions ref="founded_year" -->
134
125
  Enter the year the company was founded (1900-2030).
135
- {% /instructions %}
136
-
137
- {% /group %}
126
+ <!-- /instructions -->
138
127
 
139
- {% group id="table_fields" title="Table Fields" %}
128
+ <!-- /group -->
140
129
 
141
- {% field kind="table" id="team_members" label="Team Members" role="user" minRows=0 maxRows=5 columnIds=["name", "role", "start_date"] columnTypes=[{type: "string", required: true}, "string", "date"] %}
130
+ <!-- group id="table_fields" title="Table Fields" -->
142
131
 
143
- | Name | Role | Start Date |
144
- |------|------|------------|
132
+ <!-- field kind="table" id="team_members" role="user" columnIds=["name", "role", "start_date"] columnLabels=["Name", "Role", "Start Date"] columnTypes=[{type: "string", required: true}, "string", "date"] label="Team Members" maxRows=5 minRows=0 --><!-- /field -->
145
133
 
146
- {% /field %}
147
-
148
- {% instructions ref="team_members" %}
134
+ <!-- instructions ref="team_members" -->
149
135
  Add team members with their name (required), role, and start date.
150
- {% /instructions %}
151
-
152
- {% field kind="table" id="project_tasks" label="Project Tasks" role="user" minRows=0 maxRows=10 columnIds=["task", "estimate_hrs", "link"] columnTypes=[{type: "string", required: true}, "number", "url"] %}
136
+ <!-- /instructions -->
153
137
 
154
- | Task | Estimate (hrs) | Link |
155
- |------|----------------|------|
138
+ <!-- field kind="table" id="project_tasks" role="user" columnIds=["task", "estimate_hrs", "link"] columnLabels=["Task", "Estimate (hrs)", "Link"] columnTypes=[{type: "string", required: true}, "number", "url"] label="Project Tasks" maxRows=10 minRows=0 --><!-- /field -->
156
139
 
157
- {% /field %}
158
-
159
- {% instructions ref="project_tasks" %}
140
+ <!-- instructions ref="project_tasks" -->
160
141
  Optionally add project tasks with estimated hours and reference links.
161
- {% /instructions %}
142
+ <!-- /instructions -->
162
143
 
163
- {% /group %}
144
+ <!-- /group -->
164
145
 
165
- {% group id="optional_fields" title="Optional Fields" %}
146
+ <!-- group id="optional_fields" title="Optional Fields" -->
166
147
 
167
- {% field kind="string" id="notes" label="Notes" role="user" %}{% /field %}
148
+ <!-- field kind="string" id="notes" role="user" label="Notes" --><!-- /field -->
168
149
 
169
- {% instructions ref="notes" %}
150
+ <!-- instructions ref="notes" -->
170
151
  Add any relevant notes or observations (optional).
171
- {% /instructions %}
152
+ <!-- /instructions -->
172
153
 
173
- {% field kind="number" id="optional_number" label="Optional Number" role="user" %}{% /field %}
154
+ <!-- field kind="number" id="optional_number" role="user" label="Optional Number" --><!-- /field -->
174
155
 
175
- {% field kind="url" id="related_url" label="Related URL" role="user" %}{% /field %}
156
+ <!-- field kind="url" id="related_url" role="user" label="Related URL" --><!-- /field -->
176
157
 
177
- {% instructions ref="related_url" %}
158
+ <!-- instructions ref="related_url" -->
178
159
  Optionally add a URL to related documentation or resources.
179
- {% /instructions %}
160
+ <!-- /instructions -->
180
161
 
181
- {% field kind="date" id="optional_date" label="Optional Date" role="user" %}{% /field %}
162
+ <!-- field kind="date" id="optional_date" role="user" label="Optional Date" --><!-- /field -->
182
163
 
183
- {% instructions ref="optional_date" %}
164
+ <!-- instructions ref="optional_date" -->
184
165
  Optionally add a date (YYYY-MM-DD format).
185
- {% /instructions %}
166
+ <!-- /instructions -->
186
167
 
187
- {% field kind="year" id="optional_year" label="Optional Year" role="user" %}{% /field %}
168
+ <!-- field kind="year" id="optional_year" role="user" label="Optional Year" --><!-- /field -->
188
169
 
189
- {% instructions ref="optional_year" %}
170
+ <!-- instructions ref="optional_year" -->
190
171
  Optionally add a year.
191
- {% /instructions %}
172
+ <!-- /instructions -->
173
+
174
+ <!-- /group -->
175
+
176
+ <!-- /form -->
177
+
192
178
 
193
- {% /group %}
194
179
 
195
- {% /form %}
@@ -387,10 +387,9 @@
387
387
  ],
388
388
  "x-markform": {
389
389
  "spec": "MF/0.1",
390
- "roles": ["user", "agent"],
390
+ "roles": ["user"],
391
391
  "roleInstructions": {
392
- "user": "Fill in the fields you have direct knowledge of.",
393
- "agent": "Complete the remaining fields based on the provided context."
392
+ "user": "Fill in all fields in this form."
394
393
  },
395
394
  "groups": [
396
395
  {