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.
- package/DOCS.md +546 -0
- package/README.md +484 -45
- package/SPEC.md +2779 -0
- package/dist/ai-sdk.d.mts +2 -2
- package/dist/ai-sdk.mjs +5 -3
- package/dist/{apply-C0vjijlP.mjs → apply-BfAGTHMh.mjs} +1044 -593
- package/dist/bin.mjs +6 -3
- package/dist/cli-B3NVm6zL.mjs +3904 -0
- package/dist/cli.mjs +6 -3
- package/dist/{coreTypes-T7dAuewt.d.mts → coreTypes-BXhhz9Iq.d.mts} +2795 -685
- package/dist/coreTypes-Dful87E0.mjs +537 -0
- package/dist/index.d.mts +196 -18
- package/dist/index.mjs +5 -3
- package/dist/session-Bqnwi9wp.mjs +110 -0
- package/dist/session-DdAtY2Ni.mjs +4 -0
- package/dist/shared-D7gf27Tr.mjs +3 -0
- package/dist/shared-N_s1M-_K.mjs +176 -0
- package/dist/src-BXRkGFpG.mjs +7587 -0
- package/examples/celebrity-deep-research/celebrity-deep-research.form.md +912 -0
- package/examples/earnings-analysis/earnings-analysis.form.md +6 -1
- package/examples/earnings-analysis/earnings-analysis.valid.ts +119 -59
- package/examples/movie-research/movie-research-basic.form.md +164 -0
- package/examples/movie-research/movie-research-deep.form.md +486 -0
- package/examples/movie-research/movie-research-minimal.form.md +73 -0
- package/examples/simple/simple-mock-filled.form.md +52 -12
- package/examples/simple/simple-skipped-filled.form.md +170 -0
- package/examples/simple/simple-with-skips.session.yaml +189 -0
- package/examples/simple/simple.form.md +34 -12
- package/examples/simple/simple.session.yaml +80 -37
- package/examples/startup-deep-research/startup-deep-research.form.md +456 -0
- package/examples/startup-research/startup-research-mock-filled.form.md +307 -0
- package/examples/startup-research/startup-research.form.md +211 -0
- package/package.json +11 -5
- package/dist/cli-9fvFySww.mjs +0 -2564
- package/dist/src-DBD3Dt4f.mjs +0 -1785
- package/examples/political-research/political-research.form.md +0 -233
- 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 {
|
|
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,
|
|
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 {
|
|
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.
|
|
142
|
+
values: form.responsesByFieldId
|
|
141
143
|
},
|
|
142
|
-
message: `Exported form with ${form.schema.groups.length} group(s) and ${
|
|
144
|
+
message: `Exported form with ${form.schema.groups.length} group(s) and ${answeredCount} answered field(s).`
|
|
143
145
|
});
|
|
144
146
|
}
|
|
145
147
|
}
|