markform 0.1.7 → 0.1.9

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 (40) hide show
  1. package/README.md +451 -240
  2. package/dist/ai-sdk.d.mts +1 -1
  3. package/dist/ai-sdk.mjs +2 -2
  4. package/dist/{apply-g23rRn7p.mjs → apply-B2kt6C2z.mjs} +136 -32
  5. package/dist/bin.mjs +1 -1
  6. package/dist/{cli-Bqlm-WWw.mjs → cli-Dt_PlYi_.mjs} +519 -60
  7. package/dist/cli.mjs +1 -1
  8. package/dist/{coreTypes-__Cwxz5q.mjs → coreTypes-B1oI7qvV.mjs} +52 -4
  9. package/dist/{coreTypes-DCvD7feM.d.mts → coreTypes-JCPm418M.d.mts} +265 -9
  10. package/dist/index.d.mts +22 -10
  11. package/dist/index.mjs +5 -5
  12. package/dist/{session-DruaYPZ1.mjs → session-CzCh6JeY.mjs} +1 -1
  13. package/dist/{session-CgCNni0e.mjs → session-Dxqwt0RC.mjs} +3 -3
  14. package/dist/{shared-C9yW5FLZ.mjs → shared-CNqwaxUt.mjs} +1 -1
  15. package/dist/{shared-DQ6y3Ggc.mjs → shared-D3dNi-Gn.mjs} +1 -1
  16. package/dist/{src-BiuxbzF3.mjs → src-DFsC5wwy.mjs} +308 -59
  17. package/docs/markform-apis.md +30 -1
  18. package/docs/markform-reference.md +65 -6
  19. package/docs/markform-spec.md +3 -3
  20. package/examples/movie-research/{movie-research-deep.form.md → movie-deep-research.form.md} +17 -58
  21. package/examples/movie-research/movie-research-demo.form.md +25 -34
  22. package/examples/rejection-test/rejection-test-mock-filled.form.md +41 -0
  23. package/examples/rejection-test/rejection-test-mock-filled.report.md +15 -0
  24. package/examples/rejection-test/rejection-test-mock-filled.schema.json +59 -0
  25. package/examples/rejection-test/rejection-test-mock-filled.yml +13 -0
  26. package/examples/rejection-test/rejection-test.form.md +35 -0
  27. package/examples/rejection-test/rejection-test.session.yaml +534 -0
  28. package/examples/simple/simple-mock-filled.report.md +96 -0
  29. package/examples/simple/simple-mock-filled.schema.json +374 -0
  30. package/examples/simple/simple-mock-filled.yml +87 -0
  31. package/examples/simple/simple-skipped-filled.report.md +90 -0
  32. package/examples/simple/simple-skipped-filled.schema.json +374 -0
  33. package/examples/simple/simple-skipped-filled.yml +77 -0
  34. package/examples/simple/simple-with-skips.session.yaml +1969 -21
  35. package/examples/simple/simple.session.yaml +1982 -21
  36. package/package.json +1 -1
  37. package/examples/earnings-analysis/earnings-analysis.form.md +0 -159
  38. package/examples/earnings-analysis/earnings-analysis.raw.md +0 -801
  39. package/examples/earnings-analysis/earnings-analysis.valid.ts +0 -198
  40. package/examples/movie-research/movie-research-basic.form.md +0 -169
@@ -0,0 +1,374 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "simple_test",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "title": "Name",
9
+ "minLength": 2,
10
+ "maxLength": 50,
11
+ "x-markform": {
12
+ "role": "user",
13
+ "group": "basic_fields",
14
+ "placeholder": "Enter your name",
15
+ "examples": ["John Smith", "Jane Doe"]
16
+ }
17
+ },
18
+ "email": {
19
+ "type": "string",
20
+ "title": "Email",
21
+ "pattern": "^[^@]+@[^@]+\\.[^@]+$",
22
+ "x-markform": {
23
+ "role": "user",
24
+ "group": "basic_fields",
25
+ "placeholder": "email@example.com",
26
+ "examples": ["alice@company.com", "bob@example.org"]
27
+ }
28
+ },
29
+ "age": {
30
+ "type": "integer",
31
+ "title": "Age",
32
+ "minimum": 0,
33
+ "maximum": 150,
34
+ "x-markform": {
35
+ "role": "user",
36
+ "group": "basic_fields",
37
+ "placeholder": "25",
38
+ "examples": ["18", "30", "45"]
39
+ }
40
+ },
41
+ "score": {
42
+ "type": "number",
43
+ "title": "Score",
44
+ "minimum": 0,
45
+ "maximum": 100,
46
+ "x-markform": {
47
+ "role": "user",
48
+ "group": "basic_fields",
49
+ "placeholder": "85.5",
50
+ "examples": ["75.0", "90.5", "100.0"]
51
+ }
52
+ },
53
+ "tags": {
54
+ "type": "array",
55
+ "items": {
56
+ "type": "string",
57
+ "minLength": 2
58
+ },
59
+ "title": "Tags",
60
+ "minItems": 1,
61
+ "maxItems": 5,
62
+ "uniqueItems": true,
63
+ "x-markform": {
64
+ "role": "user",
65
+ "group": "list_fields"
66
+ }
67
+ },
68
+ "priority": {
69
+ "type": "string",
70
+ "enum": ["low", "medium", "high"],
71
+ "title": "Priority",
72
+ "x-markform": {
73
+ "role": "user",
74
+ "group": "selection_fields"
75
+ }
76
+ },
77
+ "categories": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "string",
81
+ "enum": ["frontend", "backend", "database", "devops"]
82
+ },
83
+ "title": "Categories",
84
+ "minItems": 1,
85
+ "maxItems": 3,
86
+ "x-markform": {
87
+ "role": "user",
88
+ "group": "selection_fields"
89
+ }
90
+ },
91
+ "tasks_multi": {
92
+ "type": "object",
93
+ "properties": {
94
+ "research": {
95
+ "type": "string",
96
+ "enum": ["todo", "done", "incomplete", "active", "na"],
97
+ "title": "Research"
98
+ },
99
+ "design": {
100
+ "type": "string",
101
+ "enum": ["todo", "done", "incomplete", "active", "na"],
102
+ "title": "Design"
103
+ },
104
+ "implement": {
105
+ "type": "string",
106
+ "enum": ["todo", "done", "incomplete", "active", "na"],
107
+ "title": "Implement"
108
+ },
109
+ "test": {
110
+ "type": "string",
111
+ "enum": ["todo", "done", "incomplete", "active", "na"],
112
+ "title": "Test"
113
+ }
114
+ },
115
+ "title": "Tasks (Multi Mode)",
116
+ "x-markform": {
117
+ "role": "user",
118
+ "group": "checkbox_fields",
119
+ "checkboxMode": "multi"
120
+ }
121
+ },
122
+ "tasks_simple": {
123
+ "type": "object",
124
+ "properties": {
125
+ "read_guidelines": {
126
+ "type": "string",
127
+ "enum": ["todo", "done"],
128
+ "title": "I have read the guidelines"
129
+ },
130
+ "agree_terms": {
131
+ "type": "string",
132
+ "enum": ["todo", "done"],
133
+ "title": "I agree to the terms"
134
+ }
135
+ },
136
+ "title": "Agreements (Simple Mode)",
137
+ "x-markform": {
138
+ "role": "user",
139
+ "group": "checkbox_fields",
140
+ "checkboxMode": "simple"
141
+ }
142
+ },
143
+ "confirmations": {
144
+ "type": "object",
145
+ "properties": {
146
+ "backed_up": {
147
+ "type": "string",
148
+ "enum": ["unfilled", "yes", "no"],
149
+ "title": "Data has been backed up"
150
+ },
151
+ "notified": {
152
+ "type": "string",
153
+ "enum": ["unfilled", "yes", "no"],
154
+ "title": "Stakeholders notified"
155
+ }
156
+ },
157
+ "title": "Confirmations (Explicit Mode)",
158
+ "x-markform": {
159
+ "role": "user",
160
+ "group": "checkbox_fields",
161
+ "checkboxMode": "explicit"
162
+ }
163
+ },
164
+ "website": {
165
+ "type": "string",
166
+ "format": "uri",
167
+ "title": "Website",
168
+ "x-markform": {
169
+ "role": "user",
170
+ "group": "url_fields",
171
+ "placeholder": "https://example.com",
172
+ "examples": ["https://github.com/user/repo", "https://company.com"]
173
+ }
174
+ },
175
+ "references": {
176
+ "type": "array",
177
+ "items": {
178
+ "type": "string",
179
+ "format": "uri"
180
+ },
181
+ "title": "References",
182
+ "minItems": 1,
183
+ "maxItems": 5,
184
+ "uniqueItems": true,
185
+ "x-markform": {
186
+ "role": "user",
187
+ "group": "url_fields",
188
+ "placeholder": "https://docs.example.com",
189
+ "examples": ["https://wikipedia.org/wiki/Example", "https://docs.github.com/en"]
190
+ }
191
+ },
192
+ "event_date": {
193
+ "type": "string",
194
+ "format": "date",
195
+ "title": "Event Date",
196
+ "formatMinimum": "2020-01-01",
197
+ "formatMaximum": "2030-12-31",
198
+ "x-markform": {
199
+ "role": "user",
200
+ "group": "date_fields",
201
+ "minDate": "2020-01-01",
202
+ "maxDate": "2030-12-31"
203
+ }
204
+ },
205
+ "founded_year": {
206
+ "type": "integer",
207
+ "title": "Founded Year",
208
+ "minimum": 1900,
209
+ "maximum": 2030,
210
+ "x-markform": {
211
+ "role": "user",
212
+ "group": "date_fields"
213
+ }
214
+ },
215
+ "team_members": {
216
+ "type": "array",
217
+ "items": {
218
+ "type": "object",
219
+ "properties": {
220
+ "name": {
221
+ "title": "Name",
222
+ "type": "string"
223
+ },
224
+ "role": {
225
+ "title": "Role",
226
+ "type": "string"
227
+ },
228
+ "start_date": {
229
+ "title": "Start Date",
230
+ "type": "string",
231
+ "format": "date"
232
+ }
233
+ },
234
+ "required": ["name"]
235
+ },
236
+ "title": "Team Members",
237
+ "minItems": 0,
238
+ "maxItems": 5,
239
+ "x-markform": {
240
+ "role": "user",
241
+ "group": "table_fields"
242
+ }
243
+ },
244
+ "project_tasks": {
245
+ "type": "array",
246
+ "items": {
247
+ "type": "object",
248
+ "properties": {
249
+ "task": {
250
+ "title": "Task",
251
+ "type": "string"
252
+ },
253
+ "estimate_hrs": {
254
+ "title": "Estimate (hrs)",
255
+ "type": "number"
256
+ },
257
+ "link": {
258
+ "title": "Link",
259
+ "type": "string",
260
+ "format": "uri"
261
+ }
262
+ },
263
+ "required": ["task"]
264
+ },
265
+ "title": "Project Tasks",
266
+ "minItems": 0,
267
+ "maxItems": 10,
268
+ "x-markform": {
269
+ "role": "user",
270
+ "group": "table_fields"
271
+ }
272
+ },
273
+ "notes": {
274
+ "type": "string",
275
+ "title": "Notes",
276
+ "x-markform": {
277
+ "role": "user",
278
+ "group": "optional_fields"
279
+ }
280
+ },
281
+ "optional_number": {
282
+ "type": "number",
283
+ "title": "Optional Number",
284
+ "x-markform": {
285
+ "role": "user",
286
+ "group": "optional_fields"
287
+ }
288
+ },
289
+ "related_url": {
290
+ "type": "string",
291
+ "format": "uri",
292
+ "title": "Related URL",
293
+ "x-markform": {
294
+ "role": "user",
295
+ "group": "optional_fields"
296
+ }
297
+ },
298
+ "optional_date": {
299
+ "type": "string",
300
+ "format": "date",
301
+ "title": "Optional Date",
302
+ "x-markform": {
303
+ "role": "user",
304
+ "group": "optional_fields"
305
+ }
306
+ },
307
+ "optional_year": {
308
+ "type": "integer",
309
+ "title": "Optional Year",
310
+ "x-markform": {
311
+ "role": "user",
312
+ "group": "optional_fields"
313
+ }
314
+ }
315
+ },
316
+ "title": "Simple Test Form",
317
+ "description": "A fully interactive form demonstrating all Markform v0.1 field types.\nFill all fields using interactive prompts - no LLM API key needed.",
318
+ "required": [
319
+ "name",
320
+ "email",
321
+ "age",
322
+ "tags",
323
+ "priority",
324
+ "categories",
325
+ "tasks_multi",
326
+ "tasks_simple",
327
+ "confirmations",
328
+ "website",
329
+ "event_date",
330
+ "founded_year"
331
+ ],
332
+ "x-markform": {
333
+ "spec": "MF/0.1",
334
+ "roles": ["user", "agent"],
335
+ "roleInstructions": {
336
+ "user": "Fill in the fields you have direct knowledge of.",
337
+ "agent": "Complete the remaining fields based on the provided context."
338
+ },
339
+ "groups": [
340
+ {
341
+ "id": "basic_fields",
342
+ "title": "Basic Fields"
343
+ },
344
+ {
345
+ "id": "list_fields",
346
+ "title": "List Fields"
347
+ },
348
+ {
349
+ "id": "selection_fields",
350
+ "title": "Selection Fields"
351
+ },
352
+ {
353
+ "id": "checkbox_fields",
354
+ "title": "Checkbox Fields"
355
+ },
356
+ {
357
+ "id": "url_fields",
358
+ "title": "URL Fields"
359
+ },
360
+ {
361
+ "id": "date_fields",
362
+ "title": "Date and Year Fields"
363
+ },
364
+ {
365
+ "id": "table_fields",
366
+ "title": "Table Fields"
367
+ },
368
+ {
369
+ "id": "optional_fields",
370
+ "title": "Optional Fields"
371
+ }
372
+ ]
373
+ }
374
+ }
@@ -0,0 +1,87 @@
1
+ values:
2
+ name:
3
+ state: answered
4
+ value: Alice Johnson
5
+ email:
6
+ state: answered
7
+ value: alice@example.com
8
+ age:
9
+ state: answered
10
+ value: 32
11
+ score:
12
+ state: answered
13
+ value: 87.5
14
+ tags:
15
+ state: answered
16
+ value:
17
+ - typescript
18
+ - testing
19
+ - forms
20
+ priority:
21
+ state: answered
22
+ value: medium
23
+ categories:
24
+ state: answered
25
+ value:
26
+ - frontend
27
+ - backend
28
+ tasks_multi:
29
+ state: answered
30
+ value:
31
+ research: done
32
+ design: done
33
+ implement: done
34
+ test: na
35
+ tasks_simple:
36
+ state: answered
37
+ value:
38
+ read_guidelines: done
39
+ agree_terms: done
40
+ confirmations:
41
+ state: answered
42
+ value:
43
+ backed_up: yes
44
+ notified: no
45
+ website:
46
+ state: answered
47
+ value: https://alice.dev
48
+ references:
49
+ state: answered
50
+ value:
51
+ - https://docs.example.com/guide
52
+ - https://github.com/example/project
53
+ - https://medium.com/article-about-forms
54
+ event_date:
55
+ state: answered
56
+ value: 2025-06-15
57
+ founded_year:
58
+ state: answered
59
+ value: 2020
60
+ team_members:
61
+ state: answered
62
+ value:
63
+ - name: Alice
64
+ role: Engineer
65
+ start_date: 2024-01-15
66
+ - name: Bob
67
+ role: Designer
68
+ start_date: 2023-06-01
69
+ project_tasks:
70
+ state: unanswered
71
+ notes:
72
+ state: answered
73
+ value: This is a test note.
74
+ optional_number:
75
+ state: unanswered
76
+ related_url:
77
+ state: answered
78
+ value: https://markform.dev/docs
79
+ optional_date:
80
+ state: unanswered
81
+ optional_year:
82
+ state: unanswered
83
+ notes:
84
+ - id: note-review
85
+ ref: simple_test
86
+ role: user
87
+ text: Form completed with all required fields.
@@ -0,0 +1,90 @@
1
+ # Simple Test Form
2
+
3
+ A fully interactive form demonstrating all Markform v0.1 field types.
4
+ Fill all fields using interactive prompts - no LLM API key needed.
5
+
6
+ ## Basic Fields
7
+
8
+ **Name:**
9
+ Test User
10
+
11
+ **Email:**
12
+ test@example.com
13
+
14
+ **Age:**
15
+ 25
16
+
17
+ **Score:**
18
+ _(empty)_
19
+
20
+ ## List Fields
21
+
22
+ **Tags:**
23
+ - typescript
24
+ - testing
25
+
26
+ ## Selection Fields
27
+
28
+ **Priority:**
29
+ High
30
+
31
+ **Categories:**
32
+ - Frontend
33
+ - Backend
34
+
35
+ ## Checkbox Fields
36
+
37
+ **Tasks (Multi Mode):**
38
+ - [x] Research
39
+ - [x] Design
40
+ - [x] Implement
41
+ - [-] Test
42
+
43
+ **Agreements (Simple Mode):**
44
+ - [x] I have read the guidelines
45
+ - [x] I agree to the terms
46
+
47
+ **Confirmations (Explicit Mode):**
48
+ - [x] Data has been backed up
49
+ - [ ] Stakeholders notified
50
+
51
+ ## URL Fields
52
+
53
+ **Website:**
54
+ https://test.example.com
55
+
56
+ **References:**
57
+ - https://docs.example.com
58
+
59
+ ## Date and Year Fields
60
+
61
+ **Event Date:**
62
+ 2025-03-15
63
+
64
+ **Founded Year:**
65
+ 2021
66
+
67
+ ## Table Fields
68
+
69
+ **Team Members:**
70
+ _(empty)_
71
+
72
+ **Project Tasks:**
73
+ _(empty)_
74
+
75
+ ## Optional Fields
76
+
77
+ **Notes:**
78
+ _(empty)_
79
+
80
+ **Optional Number:**
81
+ _(empty)_
82
+
83
+ **Related URL:**
84
+ _(empty)_
85
+
86
+ **Optional Date:**
87
+ _(empty)_
88
+
89
+ **Optional Year:**
90
+ _(empty)_