markform 0.1.6 → 0.1.8

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 (47) hide show
  1. package/README.md +464 -207
  2. package/dist/ai-sdk.d.mts +1 -2
  3. package/dist/ai-sdk.mjs +3 -2
  4. package/dist/{apply-DMQl-VVd.mjs → apply-BUU2QcJ2.mjs} +130 -23
  5. package/dist/bin.d.mts +0 -1
  6. package/dist/bin.mjs +3 -6
  7. package/dist/{cli-CXjkdym_.mjs → cli-BZh25bvy.mjs} +1380 -632
  8. package/dist/cli.d.mts +0 -1
  9. package/dist/cli.mjs +2 -6
  10. package/dist/coreTypes-BSPJ9H27.d.mts +3253 -0
  11. package/dist/{coreTypes-pyctKRgc.mjs → coreTypes-DJtu8OOp.mjs} +26 -4
  12. package/dist/index.d.mts +112 -5
  13. package/dist/index.mjs +6 -5
  14. package/dist/{session-uF0e6m6k.mjs → session-CmHdAPyg.mjs} +3 -2
  15. package/dist/session-DSTNiHza.mjs +4 -0
  16. package/dist/{shared-u22MtBRo.mjs → shared-C9yW5FLZ.mjs} +2 -1
  17. package/dist/{shared-DRlgu2ZJ.mjs → shared-DQ6y3Ggc.mjs} +3 -1
  18. package/dist/{src-o_5TSoHQ.mjs → src-kUggXhN1.mjs} +519 -98
  19. package/docs/markform-apis.md +30 -1
  20. package/docs/markform-reference.md +65 -6
  21. package/docs/markform-spec.md +2 -2
  22. package/examples/earnings-analysis/earnings-analysis.form.md +1 -0
  23. package/examples/movie-research/movie-research-basic.form.md +1 -0
  24. package/examples/movie-research/movie-research-deep.form.md +16 -56
  25. package/examples/movie-research/movie-research-demo.form.md +60 -0
  26. package/examples/rejection-test/rejection-test-mock-filled.form.md +41 -0
  27. package/examples/rejection-test/rejection-test-mock-filled.report.md +15 -0
  28. package/examples/rejection-test/rejection-test-mock-filled.schema.json +59 -0
  29. package/examples/rejection-test/rejection-test-mock-filled.yml +13 -0
  30. package/examples/rejection-test/rejection-test.form.md +35 -0
  31. package/examples/rejection-test/rejection-test.session.yaml +88 -0
  32. package/examples/simple/simple-mock-filled.report.md +96 -0
  33. package/examples/simple/simple-mock-filled.schema.json +374 -0
  34. package/examples/simple/simple-mock-filled.yml +87 -0
  35. package/examples/simple/simple-skipped-filled.report.md +90 -0
  36. package/examples/simple/simple-skipped-filled.schema.json +374 -0
  37. package/examples/simple/simple-skipped-filled.yml +77 -0
  38. package/examples/simple/simple-with-skips.session.yaml +3 -3
  39. package/examples/simple/simple.form.md +1 -0
  40. package/examples/simple/simple.schema.json +374 -0
  41. package/examples/simple/simple.session.yaml +3 -3
  42. package/examples/startup-deep-research/startup-deep-research.form.md +1 -0
  43. package/examples/startup-research/startup-research.form.md +1 -0
  44. package/package.json +11 -9
  45. package/dist/coreTypes-9XZSNOv6.d.mts +0 -8951
  46. package/dist/session-B_stoXQn.mjs +0 -4
  47. package/examples/movie-research/movie-research-minimal.form.md +0 -68
@@ -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
+ }
@@ -120,7 +120,7 @@ turns:
120
120
  test: na
121
121
  after:
122
122
  required_issue_count: 2
123
- markdown_sha256: e2bc5c169fc2650828ad870267eeb83c2ed4a219afb38570c5004e753260290d
123
+ markdown_sha256: e6cb237f40f14343b6616099b1ab4cededabc99e9434c2e72ea600b4473d0048
124
124
  answered_field_count: 10
125
125
  skipped_field_count: 0
126
126
  - turn: 2
@@ -229,7 +229,7 @@ turns:
229
229
  value: 87.5
230
230
  after:
231
231
  required_issue_count: 0
232
- markdown_sha256: e508fd266c842961a1fae7cd203be0ab529c71c8c3565d76ca766256ebe4fb44
232
+ markdown_sha256: 54b5d3fe131f5dd0179a116bf7d25f356ada1eb5cec0df2223a2716e145801ee
233
233
  answered_field_count: 16
234
234
  skipped_field_count: 4
235
235
  - turn: 3
@@ -254,7 +254,7 @@ turns:
254
254
  start_date: 2023-06-01
255
255
  after:
256
256
  required_issue_count: 0
257
- markdown_sha256: 0835d5fb6a05a52885e3200fa55584981e73dcd801c05405ddc341d60bdc8b91
257
+ markdown_sha256: b59a771c156f4391e4fcb352a98cea568aac90660a8b264f8de8390cafb0bc02
258
258
  answered_field_count: 17
259
259
  skipped_field_count: 4
260
260
  final:
@@ -3,6 +3,7 @@ markform:
3
3
  spec: MF/0.1
4
4
  title: Startup Deep Research
5
5
  description: Comprehensive startup intelligence gathering with company info, founders, funding, competitors, social media, and community presence.
6
+ run_mode: research
6
7
  roles:
7
8
  - user
8
9
  - agent
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  markform:
3
3
  spec: MF/0.1
4
+ run_mode: research
4
5
  roles:
5
6
  - user
6
7
  - agent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "markform",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Markdown forms for token-friendly workflows",
5
5
  "license": "AGPL-3.0-or-later",
6
6
  "author": "Joshua Levy",
@@ -58,27 +58,29 @@
58
58
  "@ai-sdk/deepseek": "^2.0.1",
59
59
  "@ai-sdk/google": "^3.0.1",
60
60
  "@ai-sdk/openai": "^3.0.1",
61
- "@ai-sdk/xai": "^3.0.1",
62
- "@clack/prompts": "^0.9.1",
61
+ "@ai-sdk/xai": "^3.0.2",
62
+ "@clack/prompts": "^0.11.0",
63
63
  "@markdoc/markdoc": "^0.5.4",
64
64
  "ai": "^6.0.3",
65
65
  "atomically": "^2.1.0",
66
- "commander": "^13.1.0",
66
+ "commander": "^14.0.2",
67
67
  "dotenv": "^17.2.3",
68
68
  "jiti": "^2.6.1",
69
69
  "js-sha256": "^0.11.1",
70
70
  "picocolors": "^1.1.1",
71
71
  "yaml": "^2.8.2",
72
- "zod": "^3.25.76"
72
+ "zod": "^4.2.1"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@ai-sdk/anthropic": "^3.0.1",
76
- "@types/node": "^24.10.4",
77
- "@vitest/coverage-v8": "^3.2.4",
76
+ "@types/node": "^22.15.30",
77
+ "@vitest/coverage-v8": "^4.0.16",
78
+ "ajv": "^8.17.1",
79
+ "ajv-formats": "^3.0.1",
78
80
  "publint": "^0.3.16",
79
- "tsdown": "^0.16.8",
81
+ "tsdown": "^0.18.3",
80
82
  "typescript": "^5.9.3",
81
- "vitest": "^3.2.4"
83
+ "vitest": "^4.0.16"
82
84
  },
83
85
  "scripts": {
84
86
  "copy-docs": "cp ../../README.md . && mkdir -p docs && cp ../../docs/markform-spec.md docs/ && cp ../../docs/markform-reference.md docs/ && cp ../../docs/markform-apis.md docs/",