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
@@ -1,248 +1,235 @@
1
1
  ---
2
2
  markform:
3
- spec: "MF/0.1"
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
  roles:
7
7
  - user
8
8
  role_instructions:
9
- user: "Fill in all fields in this form."
9
+ user: Fill in all fields in this form.
10
10
  ---
11
- {% form id="simple_test" title="Simple Test Form" %}
12
11
 
13
- {% description ref="simple_test" %}
12
+ <!-- form id="simple_test" title="Simple Test Form" -->
13
+
14
+ <!-- description ref="simple_test" -->
14
15
  A fully interactive form demonstrating all Markform v0.1 field types.
15
16
  Fill all fields using interactive prompts - no LLM API key needed.
16
- {% /description %}
17
+ <!-- /description -->
17
18
 
18
- {% group id="basic_fields" title="Basic Fields" %}
19
+ <!-- group id="basic_fields" title="Basic Fields" -->
19
20
 
20
- {% field kind="string" id="name" label="Name" role="user" required=true minLength=2 maxLength=50 placeholder="Enter your name" examples=["John Smith", "Jane Doe"] %}
21
+ <!-- field kind="string" id="name" role="user" examples=["John Smith", "Jane Doe"] label="Name" maxLength=50 minLength=2 placeholder="Enter your name" required=true -->
21
22
  ```value
22
23
  Alice Johnson
23
24
  ```
24
- {% /field %}
25
+ <!-- /field -->
25
26
 
26
- {% instructions ref="name" %}
27
+ <!-- instructions ref="name" -->
27
28
  Enter your full name (2-50 characters).
28
- {% /instructions %}
29
+ <!-- /instructions -->
29
30
 
30
- {% field kind="string" id="email" label="Email" role="user" required=true pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" examples=["alice@company.com", "bob@example.org"] %}
31
+ <!-- field kind="string" id="email" role="user" examples=["alice@company.com", "bob@example.org"] label="Email" pattern="^[^@]+@[^@]+\\.[^@]+$" placeholder="email@example.com" required=true -->
31
32
  ```value
32
33
  alice@example.com
33
34
  ```
34
- {% /field %}
35
+ <!-- /field -->
35
36
 
36
- {% field kind="number" id="age" label="Age" role="user" required=true min=0 max=150 integer=true placeholder="25" examples=["18", "30", "45"] %}
37
+ <!-- field kind="number" id="age" role="user" examples=["18", "30", "45"] integer=true label="Age" max=150 min=0 placeholder="25" required=true -->
37
38
  ```value
38
39
  32
39
40
  ```
40
- {% /field %}
41
+ <!-- /field -->
41
42
 
42
- {% 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"] %}
43
+ <!-- field kind="number" id="score" role="user" examples=["75.0", "90.5", "100.0"] label="Score" max=100 min=0 placeholder="85.5" -->
43
44
  ```value
44
45
  87.5
45
46
  ```
46
- {% /field %}
47
+ <!-- /field -->
47
48
 
48
- {% instructions ref="score" %}
49
+ <!-- instructions ref="score" -->
49
50
  Enter a score between 0 and 100 (optional).
50
- {% /instructions %}
51
+ <!-- /instructions -->
51
52
 
52
- {% /group %}
53
+ <!-- /group -->
53
54
 
54
- {% group id="list_fields" title="List Fields" %}
55
+ <!-- group id="list_fields" title="List Fields" -->
55
56
 
56
- {% field kind="string_list" id="tags" label="Tags" role="user" required=true minItems=1 maxItems=5 itemMinLength=2 uniqueItems=true %}
57
+ <!-- field kind="string_list" id="tags" role="user" itemMinLength=2 label="Tags" maxItems=5 minItems=1 required=true uniqueItems=true -->
57
58
  ```value
58
59
  typescript
59
60
  testing
60
61
  forms
61
62
  ```
62
- {% /field %}
63
+ <!-- /field -->
63
64
 
64
- {% instructions ref="tags" %}
65
+ <!-- instructions ref="tags" -->
65
66
  Add 1-5 unique tags (each at least 2 characters).
66
- {% /instructions %}
67
-
68
- {% /group %}
69
-
70
- {% group id="selection_fields" title="Selection Fields" %}
71
-
72
- {% field kind="single_select" id="priority" label="Priority" role="user" required=true %}
73
-
74
- - [ ] Low {% #low %}
75
- - [x] Medium {% #medium %}
76
- - [ ] High {% #high %}
67
+ <!-- /instructions -->
77
68
 
78
- {% /field %}
69
+ <!-- /group -->
79
70
 
80
- {% field kind="multi_select" id="categories" label="Categories" role="user" required=true minSelections=1 maxSelections=3 %}
71
+ <!-- group id="selection_fields" title="Selection Fields" -->
81
72
 
82
- - [x] Frontend {% #frontend %}
83
- - [x] Backend {% #backend %}
84
- - [ ] Database {% #database %}
85
- - [ ] DevOps {% #devops %}
73
+ <!-- field kind="single_select" id="priority" role="user" label="Priority" required=true -->
74
+ - [ ] Low <!-- #low -->
75
+ - [x] Medium <!-- #medium -->
76
+ - [ ] High <!-- #high -->
77
+ <!-- /field -->
86
78
 
87
- {% /field %}
79
+ <!-- field kind="multi_select" id="categories" role="user" label="Categories" maxSelections=3 minSelections=1 required=true -->
80
+ - [x] Frontend <!-- #frontend -->
81
+ - [x] Backend <!-- #backend -->
82
+ - [ ] Database <!-- #database -->
83
+ - [ ] DevOps <!-- #devops -->
84
+ <!-- /field -->
88
85
 
89
- {% /group %}
86
+ <!-- /group -->
90
87
 
91
- {% group id="checkbox_fields" title="Checkbox Fields" %}
88
+ <!-- group id="checkbox_fields" title="Checkbox Fields" -->
92
89
 
93
- {% field kind="checkboxes" id="tasks_multi" label="Tasks (Multi Mode)" role="user" checkboxMode="multi" required=true %}
90
+ <!-- field kind="checkboxes" id="tasks_multi" role="user" label="Tasks (Multi Mode)" required=true -->
91
+ - [x] Research <!-- #research -->
92
+ - [x] Design <!-- #design -->
93
+ - [x] Implement <!-- #implement -->
94
+ - [-] Test <!-- #test -->
95
+ <!-- /field -->
94
96
 
95
- - [x] Research {% #research %}
96
- - [x] Design {% #design %}
97
- - [x] Implement {% #implement %}
98
- - [-] Test {% #test %}
99
-
100
- {% /field %}
101
-
102
- {% instructions ref="tasks_multi" %}
97
+ <!-- instructions ref="tasks_multi" -->
103
98
  Track task progress.
104
99
  All must reach done or na state to complete.
105
- {% /instructions %}
106
-
107
- {% field kind="checkboxes" id="tasks_simple" label="Agreements (Simple Mode)" role="user" checkboxMode="simple" required=true %}
108
-
109
- - [x] I have read the guidelines {% #read_guidelines %}
110
- - [x] I agree to the terms {% #agree_terms %}
100
+ <!-- /instructions -->
111
101
 
112
- {% /field %}
102
+ <!-- field kind="checkboxes" id="tasks_simple" role="user" checkboxMode="simple" label="Agreements (Simple Mode)" required=true -->
103
+ - [x] I have read the guidelines <!-- #read_guidelines -->
104
+ - [x] I agree to the terms <!-- #agree_terms -->
105
+ <!-- /field -->
113
106
 
114
- {% field kind="checkboxes" id="confirmations" label="Confirmations (Explicit Mode)" role="user" checkboxMode="explicit" required=true %}
107
+ <!-- field kind="checkboxes" id="confirmations" role="user" checkboxMode="explicit" label="Confirmations (Explicit Mode)" required=true -->
108
+ - [y] Data has been backed up <!-- #backed_up -->
109
+ - [n] Stakeholders notified <!-- #notified -->
110
+ <!-- /field -->
115
111
 
116
- - [y] Data has been backed up {% #backed_up %}
117
- - [n] Stakeholders notified {% #notified %}
118
-
119
- {% /field %}
120
-
121
- {% instructions ref="confirmations" %}
112
+ <!-- instructions ref="confirmations" -->
122
113
  Answer yes or no for each confirmation.
123
114
  All must be explicitly answered.
124
- {% /instructions %}
115
+ <!-- /instructions -->
125
116
 
126
- {% /group %}
117
+ <!-- /group -->
127
118
 
128
- {% group id="url_fields" title="URL Fields" %}
119
+ <!-- group id="url_fields" title="URL Fields" -->
129
120
 
130
- {% field kind="url" id="website" label="Website" role="user" required=true placeholder="https://example.com" examples=["https://github.com/user/repo", "https://company.com"] %}
121
+ <!-- field kind="url" id="website" role="user" examples=["https://github.com/user/repo", "https://company.com"] label="Website" placeholder="https://example.com" required=true -->
131
122
  ```value
132
123
  https://alice.dev
133
124
  ```
134
- {% /field %}
125
+ <!-- /field -->
135
126
 
136
- {% instructions ref="website" %}
127
+ <!-- instructions ref="website" -->
137
128
  Enter your website URL (must be http or https).
138
- {% /instructions %}
129
+ <!-- /instructions -->
139
130
 
140
- {% 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"] %}
131
+ <!-- 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 -->
141
132
  ```value
142
133
  https://docs.example.com/guide
143
134
  https://github.com/example/project
144
135
  https://medium.com/article-about-forms
145
136
  ```
146
- {% /field %}
137
+ <!-- /field -->
147
138
 
148
- {% instructions ref="references" %}
139
+ <!-- instructions ref="references" -->
149
140
  Add 1-5 unique reference URLs for sources or documentation.
150
- {% /instructions %}
141
+ <!-- /instructions -->
151
142
 
152
- {% /group %}
143
+ <!-- /group -->
153
144
 
154
- {% group id="date_fields" title="Date and Year Fields" %}
145
+ <!-- group id="date_fields" title="Date and Year Fields" -->
155
146
 
156
- {% field kind="date" id="event_date" label="Event Date" role="user" required=true min="2020-01-01" max="2030-12-31" %}
147
+ <!-- field kind="date" id="event_date" role="user" label="Event Date" max="2030-12-31" min="2020-01-01" required=true -->
157
148
  ```value
158
149
  2025-06-15
159
150
  ```
160
- {% /field %}
151
+ <!-- /field -->
161
152
 
162
- {% instructions ref="event_date" %}
153
+ <!-- instructions ref="event_date" -->
163
154
  Enter the event date (YYYY-MM-DD format, between 2020 and 2030).
164
- {% /instructions %}
155
+ <!-- /instructions -->
165
156
 
166
- {% field kind="year" id="founded_year" label="Founded Year" role="user" required=true min=1900 max=2030 %}
157
+ <!-- field kind="year" id="founded_year" role="user" label="Founded Year" max=2030 min=1900 required=true -->
167
158
  ```value
168
159
  2020
169
160
  ```
170
- {% /field %}
161
+ <!-- /field -->
171
162
 
172
- {% instructions ref="founded_year" %}
163
+ <!-- instructions ref="founded_year" -->
173
164
  Enter the year the company was founded (1900-2030).
174
- {% /instructions %}
175
-
176
- {% /group %}
165
+ <!-- /instructions -->
177
166
 
178
- {% group id="table_fields" title="Table Fields" %}
167
+ <!-- /group -->
179
168
 
180
- {% 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"] %}
169
+ <!-- group id="table_fields" title="Table Fields" -->
181
170
 
171
+ <!-- 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 -->
182
172
  | Name | Role | Start Date |
183
- |------|------|------------|
173
+ | --- | --- | --- |
184
174
  | Alice | Engineer | 2024-01-15 |
185
175
  | Bob | Designer | 2023-06-01 |
176
+ <!-- /field -->
186
177
 
187
- {% /field %}
188
-
189
- {% instructions ref="team_members" %}
178
+ <!-- instructions ref="team_members" -->
190
179
  Add team members with their name (required), role, and start date.
191
- {% /instructions %}
192
-
193
- {% 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"] %}
180
+ <!-- /instructions -->
194
181
 
195
- | Task | Estimate (hrs) | Link |
196
- |------|----------------|------|
182
+ <!-- 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 -->
197
183
 
198
- {% /field %}
199
-
200
- {% instructions ref="project_tasks" %}
184
+ <!-- instructions ref="project_tasks" -->
201
185
  Optionally add project tasks with estimated hours and reference links.
202
- {% /instructions %}
186
+ <!-- /instructions -->
203
187
 
204
- {% /group %}
188
+ <!-- /group -->
205
189
 
206
- {% group id="optional_fields" title="Optional Fields" %}
190
+ <!-- group id="optional_fields" title="Optional Fields" -->
207
191
 
208
- {% field kind="string" id="notes" label="Notes" role="user" %}
192
+ <!-- field kind="string" id="notes" role="user" label="Notes" -->
209
193
  ```value
210
194
  This is a test note.
211
195
  ```
212
- {% /field %}
196
+ <!-- /field -->
213
197
 
214
- {% instructions ref="notes" %}
198
+ <!-- instructions ref="notes" -->
215
199
  Add any relevant notes or observations (optional).
216
- {% /instructions %}
200
+ <!-- /instructions -->
217
201
 
218
- {% field kind="number" id="optional_number" label="Optional Number" role="user" %}{% /field %}
202
+ <!-- field kind="number" id="optional_number" role="user" label="Optional Number" --><!-- /field -->
219
203
 
220
- {% field kind="url" id="related_url" label="Related URL" role="user" %}
204
+ <!-- field kind="url" id="related_url" role="user" label="Related URL" -->
221
205
  ```value
222
206
  https://markform.dev/docs
223
207
  ```
224
- {% /field %}
208
+ <!-- /field -->
225
209
 
226
- {% instructions ref="related_url" %}
210
+ <!-- instructions ref="related_url" -->
227
211
  Optionally add a URL to related documentation or resources.
228
- {% /instructions %}
212
+ <!-- /instructions -->
229
213
 
230
- {% field kind="date" id="optional_date" label="Optional Date" role="user" %}{% /field %}
214
+ <!-- field kind="date" id="optional_date" role="user" label="Optional Date" --><!-- /field -->
231
215
 
232
- {% instructions ref="optional_date" %}
216
+ <!-- instructions ref="optional_date" -->
233
217
  Optionally add a date (YYYY-MM-DD format).
234
- {% /instructions %}
218
+ <!-- /instructions -->
235
219
 
236
- {% field kind="year" id="optional_year" label="Optional Year" role="user" %}{% /field %}
220
+ <!-- field kind="year" id="optional_year" role="user" label="Optional Year" --><!-- /field -->
237
221
 
238
- {% instructions ref="optional_year" %}
222
+ <!-- instructions ref="optional_year" -->
239
223
  Optionally add a year.
240
- {% /instructions %}
224
+ <!-- /instructions -->
241
225
 
242
- {% /group %}
226
+ <!-- /group -->
243
227
 
244
- {% note id="note-review" ref="simple_test" role="user" %}
228
+ <!-- note id="note-review" role="user" ref="simple_test" -->
245
229
  Form completed with all required fields.
246
- {% /note %}
230
+ <!-- /note -->
231
+
232
+ <!-- /form -->
233
+
234
+
247
235
 
248
- {% /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
  {