markform 0.1.1 → 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 (36) hide show
  1. package/DOCS.md +546 -0
  2. package/README.md +338 -71
  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-BQdd-fdx.mjs → apply-BfAGTHMh.mjs} +837 -730
  7. package/dist/bin.mjs +6 -3
  8. package/dist/{cli-pjOiHgCW.mjs → cli-B3NVm6zL.mjs} +1349 -422
  9. package/dist/cli.mjs +6 -3
  10. package/dist/{coreTypes--6etkcwb.d.mts → coreTypes-BXhhz9Iq.d.mts} +1946 -794
  11. package/dist/coreTypes-Dful87E0.mjs +537 -0
  12. package/dist/index.d.mts +116 -19
  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 +17 -13
  26. package/examples/simple/simple-skipped-filled.form.md +32 -9
  27. package/examples/simple/simple-with-skips.session.yaml +102 -143
  28. package/examples/simple/simple.form.md +13 -13
  29. package/examples/simple/simple.session.yaml +80 -69
  30. package/examples/startup-deep-research/startup-deep-research.form.md +60 -8
  31. package/examples/startup-research/startup-research-mock-filled.form.md +1 -1
  32. package/examples/startup-research/startup-research.form.md +1 -1
  33. package/package.json +9 -5
  34. package/dist/src-Cs4_9lWP.mjs +0 -2151
  35. package/examples/political-research/political-research.form.md +0 -233
  36. 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, gn as ValidatorRegistry, t as ApplyResult, ut as ParsedForm } from "./coreTypes--6etkcwb.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 { et as PatchSchema, r as inspect, t as applyPatches, u as serialize } from "./apply-BQdd-fdx.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
  }