markform 0.1.24 → 0.1.25
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 +54 -31
- package/dist/ai-sdk.d.mts +1 -1
- package/dist/ai-sdk.mjs +2 -2
- package/dist/bin.mjs +1 -1
- package/dist/{cli-B1DhFYBS.mjs → cli-B1T8kMFt.mjs} +85 -40
- package/dist/cli-B1T8kMFt.mjs.map +1 -0
- package/dist/cli.mjs +1 -1
- package/dist/{coreTypes-GxzWNXap.d.mts → coreTypes-CxpqKpBA.d.mts} +45 -2
- package/dist/{coreTypes-CctFK6uE.mjs → coreTypes-DIv9Aabl.mjs} +19 -5
- package/dist/coreTypes-DIv9Aabl.mjs.map +1 -0
- package/dist/{fillRecord-DeqI2pQ5.d.mts → fillRecord-V3vlyobd.d.mts} +5 -1
- package/dist/{fillRecordRenderer-VBQ2vwPV.mjs → fillRecordRenderer-BqRPHPmE.mjs} +47 -15
- package/dist/fillRecordRenderer-BqRPHPmE.mjs.map +1 -0
- package/dist/index.d.mts +32 -4
- package/dist/index.mjs +4 -4
- package/dist/{prompts-BCnYaH4_.mjs → prompts-DaPKumGY.mjs} +114 -11
- package/dist/prompts-DaPKumGY.mjs.map +1 -0
- package/dist/render.d.mts +2 -2
- package/dist/render.mjs +1 -1
- package/dist/{session-BLjN3BkJ.mjs → session-BW9jtYNV.mjs} +2 -2
- package/dist/{session-BLjN3BkJ.mjs.map → session-BW9jtYNV.mjs.map} +1 -1
- package/dist/{session-D7C7IlEv.mjs → session-DHyTMP67.mjs} +1 -1
- package/dist/{shared-DtorFV21.mjs → shared-BLh342F5.mjs} +1 -1
- package/dist/{shared-CuSRYcIB.mjs → shared-BszoSkAO.mjs} +8 -8
- package/dist/{shared-CuSRYcIB.mjs.map → shared-BszoSkAO.mjs.map} +1 -1
- package/dist/{src-C5OWf1dL.mjs → src-DrXmaOWl.mjs} +155 -27
- package/dist/src-DrXmaOWl.mjs.map +1 -0
- package/docs/markform-apis.md +19 -7
- package/docs/markform-reference.md +247 -178
- package/docs/markform-spec.md +81 -33
- package/docs/skill/SKILL.md +62 -20
- package/examples/markform-demo-playbook.md +342 -0
- package/examples/parallel/parallel-research.form.md +2 -6
- package/examples/simple/simple-mock-filled.report.md +2 -2
- package/examples/simple/simple-skipped-filled.report.md +2 -2
- package/examples/twitter-thread/twitter-thread.form.md +5 -5
- package/package.json +1 -1
- package/dist/cli-B1DhFYBS.mjs.map +0 -1
- package/dist/coreTypes-CctFK6uE.mjs.map +0 -1
- package/dist/fillRecordRenderer-VBQ2vwPV.mjs.map +0 -1
- package/dist/prompts-BCnYaH4_.mjs.map +0 -1
- package/dist/src-C5OWf1dL.mjs.map +0 -1
- package/examples/startup-research/startup-research-mock-filled.form.md +0 -297
- package/examples/startup-research/startup-research.form.md +0 -181
package/docs/markform-apis.md
CHANGED
|
@@ -239,8 +239,8 @@ const result = await fillForm({
|
|
|
239
239
|
**Behavior:**
|
|
240
240
|
- `enableParallel: false` (default): All fields filled serially, `parallel` attributes
|
|
241
241
|
ignored. The `order` attribute still controls issue filtering.
|
|
242
|
-
- `enableParallel: true`: Batch items run concurrently (up to `maxParallelAgents`).
|
|
243
|
-
|
|
242
|
+
- `enableParallel: true`: Batch items run concurrently (up to `maxParallelAgents`). Each
|
|
243
|
+
agent runs a multi-turn loop with rejection feedback, same as the serial path.
|
|
244
244
|
- If the form has no `parallel` batches, falls back to serial automatically.
|
|
245
245
|
- `FillResult` shape is identical regardless of serial or parallel execution.
|
|
246
246
|
|
|
@@ -256,6 +256,16 @@ The `status` field in `FillResult` indicates success or failure:
|
|
|
256
256
|
| `{ ok: false, reason: 'cancelled' }` | Aborted via signal |
|
|
257
257
|
| `{ ok: false, reason: 'error' }` | Unexpected error |
|
|
258
258
|
|
|
259
|
+
When `ok` is `false`, the status also includes:
|
|
260
|
+
|
|
261
|
+
- `message?: string` — Human-readable error description
|
|
262
|
+
- `error?: Error` — The original Error object with its full cause chain preserved (when
|
|
263
|
+
the caught value was an Error instance).
|
|
264
|
+
For `MarkformLlmError` instances, this carries `.statusCode`, `.responseBody`,
|
|
265
|
+
`.provider`, `.model`, and `.retryable` properties.
|
|
266
|
+
Not serialized into FillRecord — use for in-memory diagnostics and real-time error
|
|
267
|
+
handling.
|
|
268
|
+
|
|
259
269
|
### Resumable Form Fills
|
|
260
270
|
|
|
261
271
|
For orchestrated environments with timeout constraints (e.g., Convex, AWS Step
|
|
@@ -351,6 +361,7 @@ await fillForm({
|
|
|
351
361
|
| `onLlmCallStart` | `{ model }` | Called before an LLM request |
|
|
352
362
|
| `onLlmCallEnd` | `{ model, inputTokens, outputTokens }` | Called after an LLM response |
|
|
353
363
|
| `onWebSearch` | `{ query, resultCount, provider }` | Called when a web search is performed |
|
|
364
|
+
| `onError` | `(error: Error, { turnNumber })` | Called when an error occurs during the fill loop |
|
|
354
365
|
|
|
355
366
|
**TurnProgress fields:**
|
|
356
367
|
|
|
@@ -376,8 +387,9 @@ interface PatchRejection {
|
|
|
376
387
|
|
|
377
388
|
### FillRecord
|
|
378
389
|
|
|
379
|
-
When `recordFill: true`, the `FillResult.record` contains a complete record of
|
|
380
|
-
that happened during the fill operation.
|
|
390
|
+
When `recordFill: true`, the `FillResult.record` contains a complete record of
|
|
391
|
+
everything that happened during the fill operation.
|
|
392
|
+
Useful for cost analysis, debugging, and auditing.
|
|
381
393
|
|
|
382
394
|
```typescript
|
|
383
395
|
const result = await fillForm({
|
|
@@ -503,10 +515,10 @@ interface HeadingInfo {
|
|
|
503
515
|
|
|
504
516
|
### findEnclosingHeadings(markdown: string, line: number): HeadingInfo[]
|
|
505
517
|
|
|
506
|
-
Find all headings that enclose a given line position.
|
|
507
|
-
(most specific) to outermost (least specific).
|
|
518
|
+
Find all headings that enclose a given line position.
|
|
519
|
+
Returns headings from innermost (most specific) to outermost (least specific).
|
|
508
520
|
|
|
509
|
-
A heading
|
|
521
|
+
A heading “encloses” a line if the heading appears before the line and no heading of
|
|
510
522
|
equal or higher level appears between them.
|
|
511
523
|
|
|
512
524
|
### findAllCheckboxes(markdown: string): CheckboxInfo[]
|