markform 0.1.0 → 0.1.2

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 (37) hide show
  1. package/DOCS.md +546 -0
  2. package/README.md +484 -45
  3. package/SPEC.md +2779 -0
  4. package/dist/ai-sdk.d.mts +2 -2
  5. package/dist/ai-sdk.mjs +5 -3
  6. package/dist/{apply-C0vjijlP.mjs → apply-BfAGTHMh.mjs} +1044 -593
  7. package/dist/bin.mjs +6 -3
  8. package/dist/cli-B3NVm6zL.mjs +3904 -0
  9. package/dist/cli.mjs +6 -3
  10. package/dist/{coreTypes-T7dAuewt.d.mts → coreTypes-BXhhz9Iq.d.mts} +2795 -685
  11. package/dist/coreTypes-Dful87E0.mjs +537 -0
  12. package/dist/index.d.mts +196 -18
  13. package/dist/index.mjs +5 -3
  14. package/dist/session-Bqnwi9wp.mjs +110 -0
  15. package/dist/session-DdAtY2Ni.mjs +4 -0
  16. package/dist/shared-D7gf27Tr.mjs +3 -0
  17. package/dist/shared-N_s1M-_K.mjs +176 -0
  18. package/dist/src-BXRkGFpG.mjs +7587 -0
  19. package/examples/celebrity-deep-research/celebrity-deep-research.form.md +912 -0
  20. package/examples/earnings-analysis/earnings-analysis.form.md +6 -1
  21. package/examples/earnings-analysis/earnings-analysis.valid.ts +119 -59
  22. package/examples/movie-research/movie-research-basic.form.md +164 -0
  23. package/examples/movie-research/movie-research-deep.form.md +486 -0
  24. package/examples/movie-research/movie-research-minimal.form.md +73 -0
  25. package/examples/simple/simple-mock-filled.form.md +52 -12
  26. package/examples/simple/simple-skipped-filled.form.md +170 -0
  27. package/examples/simple/simple-with-skips.session.yaml +189 -0
  28. package/examples/simple/simple.form.md +34 -12
  29. package/examples/simple/simple.session.yaml +80 -37
  30. package/examples/startup-deep-research/startup-deep-research.form.md +456 -0
  31. package/examples/startup-research/startup-research-mock-filled.form.md +307 -0
  32. package/examples/startup-research/startup-research.form.md +211 -0
  33. package/package.json +11 -5
  34. package/dist/cli-9fvFySww.mjs +0 -2564
  35. package/dist/src-DBD3Dt4f.mjs +0 -1785
  36. package/examples/political-research/political-research.form.md +0 -233
  37. package/examples/political-research/political-research.mock.lincoln.form.md +0 -355
package/dist/ai-sdk.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { A as FieldValue, H as InspectResult, L as Id, N as FormSchema, dt as Patch, ft as PatchSchema, mn as ValidatorRegistry, t as ApplyResult, ut as ParsedForm } from "./coreTypes-T7dAuewt.mjs";
3
+ import { H as Id, L as FormSchema, Sn as ValidatorRegistry, _t as ParsedForm, j as FieldResponse, q as InspectResult, r as ApplyResult, vt as Patch, yt as PatchSchema } from "./coreTypes-BXhhz9Iq.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/integrations/toolTypes.d.ts
@@ -28,7 +28,7 @@ interface ExportToolResult {
28
28
  success: boolean;
29
29
  data: {
30
30
  schema: FormSchema;
31
- values: Record<Id, FieldValue>;
31
+ values: Record<Id, FieldResponse>;
32
32
  };
33
33
  message: string;
34
34
  }
package/dist/ai-sdk.mjs CHANGED
@@ -1,4 +1,5 @@
1
- import { $ as PatchSchema, r as inspect, t as applyPatches, u as serialize } from "./apply-C0vjijlP.mjs";
1
+ import { N as PatchSchema } from "./coreTypes-Dful87E0.mjs";
2
+ import { r as inspect, t as applyPatches, u as serialize } from "./apply-BfAGTHMh.mjs";
2
3
  import { z } from "zod";
3
4
 
4
5
  //#region src/integrations/ai-sdk.ts
@@ -133,13 +134,14 @@ function createMarkformTools(options) {
133
134
  inputSchema: ExportInputSchema,
134
135
  execute: () => {
135
136
  const form = sessionStore.getForm();
137
+ const answeredCount = Object.values(form.responsesByFieldId).filter((response) => response.state === "answered").length;
136
138
  return Promise.resolve({
137
139
  success: true,
138
140
  data: {
139
141
  schema: form.schema,
140
- values: form.valuesByFieldId
142
+ values: form.responsesByFieldId
141
143
  },
142
- message: `Exported form with ${form.schema.groups.length} group(s) and ${Object.keys(form.valuesByFieldId).length} value(s).`
144
+ message: `Exported form with ${form.schema.groups.length} group(s) and ${answeredCount} answered field(s).`
143
145
  });
144
146
  }
145
147
  }