@agwab/pi-workflow 0.3.0 → 0.4.0
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 +3 -1
- package/dist/artifact-graph-runtime.d.ts +1 -1
- package/dist/artifact-graph-runtime.js +10 -5
- package/dist/artifact-graph-schema.js +127 -5
- package/dist/compiler.js +46 -11
- package/dist/dynamic-decision.d.ts +1 -0
- package/dist/dynamic-decision.js +7 -0
- package/dist/dynamic-generated-task-runtime.js +3 -1
- package/dist/dynamic-profiles.d.ts +1 -0
- package/dist/dynamic-profiles.js +3 -0
- package/dist/engine-run-graph.d.ts +2 -0
- package/dist/engine-run-graph.js +55 -5
- package/dist/engine.js +278 -15
- package/dist/extension.js +3 -2
- package/dist/index.d.ts +8 -0
- package/dist/index.js +4 -0
- package/dist/prompt-json.d.ts +7 -0
- package/dist/prompt-json.js +13 -0
- package/dist/roles.d.ts +1 -1
- package/dist/roles.js +5 -8
- package/dist/store.d.ts +20 -1
- package/dist/store.js +89 -29
- package/dist/strings.d.ts +11 -0
- package/dist/strings.js +24 -0
- package/dist/subagent-backend.js +557 -13
- package/dist/types.d.ts +101 -1
- package/dist/verification-ontology.d.ts +31 -0
- package/dist/verification-ontology.js +66 -0
- package/dist/workflow-artifact-tool.js +5 -6
- package/dist/workflow-artifacts.d.ts +7 -0
- package/dist/workflow-artifacts.js +55 -4
- package/dist/workflow-fetch-cache-extension.d.ts +1 -0
- package/dist/workflow-fetch-cache-extension.js +57 -9
- package/dist/workflow-metrics.d.ts +113 -0
- package/dist/workflow-metrics.js +272 -0
- package/dist/workflow-output-artifacts.js +5 -3
- package/dist/workflow-partial-output.d.ts +45 -0
- package/dist/workflow-partial-output.js +205 -0
- package/dist/workflow-progress-health.js +42 -10
- package/dist/workflow-web-source-extension.js +27 -4
- package/dist/workflow-web-source.js +26 -12
- package/docs/usage.md +76 -29
- package/node_modules/@agwab/pi-subagent/package.json +1 -1
- package/node_modules/@agwab/pi-subagent/src/index.ts +53 -5
- package/node_modules/@agwab/pi-subagent/src/panel.ts +7 -3
- package/package.json +2 -2
- package/skills/workflow-guide/SKILL.md +1 -0
- package/src/artifact-graph-runtime.ts +19 -13
- package/src/artifact-graph-schema.ts +143 -3
- package/src/cli.mjs +52 -0
- package/src/compiler.ts +49 -9
- package/src/dynamic-decision.ts +11 -0
- package/src/dynamic-generated-task-runtime.ts +3 -1
- package/src/dynamic-profiles.ts +4 -0
- package/src/engine-run-graph.ts +63 -4
- package/src/engine.ts +400 -14
- package/src/extension.ts +3 -2
- package/src/index.ts +49 -0
- package/src/prompt-json.ts +13 -0
- package/src/roles.ts +6 -9
- package/src/store.ts +123 -34
- package/src/strings.ts +38 -0
- package/src/subagent-backend.ts +727 -41
- package/src/types.ts +110 -2
- package/src/verification-ontology.ts +88 -0
- package/src/workflow-artifact-tool.ts +5 -7
- package/src/workflow-artifacts.ts +83 -3
- package/src/workflow-fetch-cache-extension.ts +78 -13
- package/src/workflow-metrics.ts +478 -0
- package/src/workflow-output-artifacts.ts +5 -3
- package/src/workflow-partial-output.ts +299 -0
- package/src/workflow-progress-health.ts +47 -15
- package/src/workflow-web-source-extension.ts +33 -4
- package/src/workflow-web-source.ts +36 -12
- package/workflows/README.md +7 -25
- package/workflows/deep-research/batched-verification.spec.json +253 -0
- package/workflows/deep-research/helpers/batch-verification-candidates.mjs +136 -0
- package/workflows/deep-research/helpers/claim-evidence-gate.mjs +173 -20
- package/workflows/deep-research/helpers/normalize-input-packet.mjs +80 -1
- package/workflows/deep-research/helpers/render-executive.mjs +32 -5
- package/workflows/deep-research/helpers/shadow-select-verification.mjs +229 -0
- package/workflows/deep-research/helpers/verification-ontology.mjs +77 -0
- package/workflows/deep-research/schemas/deep-research-executive-render-control.schema.json +3 -2
- package/workflows/deep-research/schemas/deep-research-research-questions-control.schema.json +38 -0
- package/workflows/deep-research/schemas/deep-research-sanitize-claims-control.schema.json +63 -0
- package/workflows/deep-research/schemas/deep-research-verify-claims-batch-control.schema.json +47 -0
- package/workflows/deep-research/schemas/deep-research-verify-claims-control.schema.json +10 -3
- package/workflows/deep-research/spec.json +32 -12
- package/skills/workflow-guide/scaffolds/dag-required-reads/spec.json.validate.stderr +0 -0
- package/skills/workflow-guide/scaffolds/dag-required-reads/spec.json.validate.stdout +0 -13
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
// Shadow-only selective verification reporter for deep-research.
|
|
2
|
+
//
|
|
3
|
+
// This helper never skips verification. It records which candidates a future
|
|
4
|
+
// selector might skip, then joins those shadow decisions to actual audit output
|
|
5
|
+
// so adoption can be judged with evidence before any verifier is removed.
|
|
6
|
+
|
|
7
|
+
function asArray(value) {
|
|
8
|
+
if (Array.isArray(value)) return value;
|
|
9
|
+
if (value && typeof value === "object") {
|
|
10
|
+
if (Array.isArray(value.claimInventory?.verificationCandidates))
|
|
11
|
+
return value.claimInventory.verificationCandidates;
|
|
12
|
+
if (Array.isArray(value.verificationCandidates))
|
|
13
|
+
return value.verificationCandidates;
|
|
14
|
+
if (Array.isArray(value.auditedClaims)) return value.auditedClaims;
|
|
15
|
+
if (Array.isArray(value.claims)) return value.claims;
|
|
16
|
+
if (Array.isArray(value.items)) return value.items;
|
|
17
|
+
}
|
|
18
|
+
return [];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function findCandidates(sources) {
|
|
22
|
+
for (const [specId, source] of Object.entries(sources ?? {})) {
|
|
23
|
+
if (specId === "sanitize-claims" || specId.startsWith("sanitize-claims.")) {
|
|
24
|
+
const candidates = asArray(source);
|
|
25
|
+
if (candidates.length > 0) return candidates;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
for (const [specId, source] of Object.entries(sources ?? {})) {
|
|
29
|
+
if (
|
|
30
|
+
specId === "normalize-claims" ||
|
|
31
|
+
specId.startsWith("normalize-claims.")
|
|
32
|
+
) {
|
|
33
|
+
const candidates = asArray(source);
|
|
34
|
+
if (candidates.length > 0) return candidates;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function findAuditedClaims(sources) {
|
|
41
|
+
for (const [specId, source] of Object.entries(sources ?? {})) {
|
|
42
|
+
if (specId === "audit-claims" || specId.startsWith("audit-claims.")) {
|
|
43
|
+
const claims = asArray(source);
|
|
44
|
+
if (claims.length > 0) return claims;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return [];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function findAuditSource(sources) {
|
|
51
|
+
for (const [specId, source] of Object.entries(sources ?? {})) {
|
|
52
|
+
if (specId === "audit-claims" || specId.startsWith("audit-claims."))
|
|
53
|
+
return source && typeof source === "object" ? source : {};
|
|
54
|
+
}
|
|
55
|
+
return {};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function issueCount(audit, field) {
|
|
59
|
+
const fromSummary = Number(audit?.gateSummary?.[field] ?? 0);
|
|
60
|
+
const fromArray = Array.isArray(audit?.[field]) ? audit[field].length : 0;
|
|
61
|
+
return Math.max(Number.isFinite(fromSummary) ? fromSummary : 0, fromArray);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function auditIntegrityBlockers(audit) {
|
|
65
|
+
return [
|
|
66
|
+
["audit_invalid_verifier_rows", issueCount(audit, "invalidVerifierRows")],
|
|
67
|
+
[
|
|
68
|
+
"audit_missing_verifier_results",
|
|
69
|
+
issueCount(audit, "missingVerifierResults"),
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"audit_duplicate_verifier_rows",
|
|
73
|
+
issueCount(audit, "duplicateVerifierRows"),
|
|
74
|
+
],
|
|
75
|
+
[
|
|
76
|
+
"audit_duplicate_status_conflicts",
|
|
77
|
+
issueCount(audit, "duplicateStatusConflicts"),
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
"audit_invalid_normalized_candidates",
|
|
81
|
+
issueCount(audit, "invalidNormalizedCandidates"),
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"audit_source_ref_join_failures",
|
|
85
|
+
issueCount(audit, "sourceRefJoinFailures"),
|
|
86
|
+
],
|
|
87
|
+
]
|
|
88
|
+
.filter(([, count]) => count > 0)
|
|
89
|
+
.map(([reason, count]) => ({ reason, count }));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function candidateId(candidate, index) {
|
|
93
|
+
const id = typeof candidate?.id === "string" ? candidate.id.trim() : "";
|
|
94
|
+
return id || `candidate-${String(index + 1).padStart(3, "0")}`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function hasExactQuantitativeText(candidate) {
|
|
98
|
+
return /\b\d+(?:\.\d+)?\b|\b(v\d+(?:\.\d+)*)\b|\b\d+\s*(?:ms|s|min|hour|day|%|percent|usd|dollars?|tokens?|kb|mb|gb)\b/iu.test(
|
|
99
|
+
String(candidate?.claim ?? ""),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function hasCriticalSlots(candidate) {
|
|
104
|
+
const ids = Array.isArray(candidate?.factSlotIds)
|
|
105
|
+
? candidate.factSlotIds
|
|
106
|
+
: [];
|
|
107
|
+
return ids.some((id) =>
|
|
108
|
+
/(price|pricing|cost|ttl|limit|version|date|policy|security|numeric|slot-critical)/iu.test(
|
|
109
|
+
String(id),
|
|
110
|
+
),
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function hasExactSourceHint(candidate) {
|
|
115
|
+
return (
|
|
116
|
+
Array.isArray(candidate?.sourceEvidenceHints) &&
|
|
117
|
+
candidate.sourceEvidenceHints.some(
|
|
118
|
+
(hint) =>
|
|
119
|
+
typeof hint?.quote === "string" &&
|
|
120
|
+
hint.quote.trim() &&
|
|
121
|
+
(typeof hint.sourceRef === "string" ||
|
|
122
|
+
typeof hint.sourceUrl === "string"),
|
|
123
|
+
)
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function decide(candidate) {
|
|
128
|
+
const reasonCodes = [];
|
|
129
|
+
if (hasExactQuantitativeText(candidate))
|
|
130
|
+
reasonCodes.push("exact_quantitative");
|
|
131
|
+
if (hasCriticalSlots(candidate)) reasonCodes.push("critical_fact_slot");
|
|
132
|
+
if (!hasExactSourceHint(candidate)) reasonCodes.push("no_exact_source_hint");
|
|
133
|
+
if (reasonCodes.length > 0) {
|
|
134
|
+
return { decision: "would_verify", reasonCodes };
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
decision: "would_skip_shadow_only",
|
|
138
|
+
reasonCodes: ["exact_source_hint_noncritical"],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export default async function shadowSelectVerification({ sources }) {
|
|
143
|
+
const audit = findAuditSource(sources);
|
|
144
|
+
const candidates = findCandidates(sources).map((candidate, index) => ({
|
|
145
|
+
candidate,
|
|
146
|
+
id: candidateId(candidate, index),
|
|
147
|
+
}));
|
|
148
|
+
const auditedById = new Map(
|
|
149
|
+
findAuditedClaims(sources).map((claim, index) => [
|
|
150
|
+
candidateId(claim, index),
|
|
151
|
+
claim,
|
|
152
|
+
]),
|
|
153
|
+
);
|
|
154
|
+
const decisions = candidates.map(({ candidate, id }) => {
|
|
155
|
+
const decision = decide(candidate);
|
|
156
|
+
const audited = auditedById.get(id);
|
|
157
|
+
return {
|
|
158
|
+
id,
|
|
159
|
+
decision: decision.decision,
|
|
160
|
+
reasonCodes: decision.reasonCodes,
|
|
161
|
+
actualStatus:
|
|
162
|
+
typeof audited?.status === "string" ? audited.status : undefined,
|
|
163
|
+
actualVerified: audited?.status === "verified",
|
|
164
|
+
factSlotIds: Array.isArray(candidate.factSlotIds)
|
|
165
|
+
? [...candidate.factSlotIds]
|
|
166
|
+
: [],
|
|
167
|
+
};
|
|
168
|
+
});
|
|
169
|
+
const wouldSkip = decisions.filter(
|
|
170
|
+
(decision) => decision.decision === "would_skip_shadow_only",
|
|
171
|
+
);
|
|
172
|
+
const wouldVerify = decisions.filter(
|
|
173
|
+
(decision) => decision.decision === "would_verify",
|
|
174
|
+
);
|
|
175
|
+
const skippedButVerified = wouldSkip.filter(
|
|
176
|
+
(decision) => decision.actualVerified,
|
|
177
|
+
);
|
|
178
|
+
const wouldSkipWithoutAudit = wouldSkip.filter(
|
|
179
|
+
(decision) => typeof decision.actualStatus !== "string",
|
|
180
|
+
);
|
|
181
|
+
const blockers = [];
|
|
182
|
+
if (skippedButVerified.length > 0)
|
|
183
|
+
blockers.push({
|
|
184
|
+
reason: "would_skip_verified_claims",
|
|
185
|
+
count: skippedButVerified.length,
|
|
186
|
+
});
|
|
187
|
+
if (wouldSkipWithoutAudit.length > 0)
|
|
188
|
+
blockers.push({
|
|
189
|
+
reason: "would_skip_without_audit_result",
|
|
190
|
+
count: wouldSkipWithoutAudit.length,
|
|
191
|
+
});
|
|
192
|
+
blockers.push(...auditIntegrityBlockers(audit));
|
|
193
|
+
if (wouldSkip.length === 0)
|
|
194
|
+
blockers.push({ reason: "no_shadow_skip_candidates", count: 0 });
|
|
195
|
+
const realSkipReadiness = {
|
|
196
|
+
status: blockers.length === 0 ? "eligible_for_canary" : "blocked",
|
|
197
|
+
realSkippingEnabled: false,
|
|
198
|
+
adopted: false,
|
|
199
|
+
canaryRequired: true,
|
|
200
|
+
reason:
|
|
201
|
+
blockers.length === 0
|
|
202
|
+
? "Shadow selector found skip candidates with no verified or missing-audit rows; real skipping still requires a non-holdout canary."
|
|
203
|
+
: "Real selective verification is blocked until shadow decisions prove no verified or unaudited claims would be skipped.",
|
|
204
|
+
blockers,
|
|
205
|
+
};
|
|
206
|
+
return {
|
|
207
|
+
schema: "deep-research-verification-shadow-selector-v1",
|
|
208
|
+
digest: `${wouldSkip.length} would-skip shadow candidate(s), ${wouldVerify.length} would-verify candidate(s); real skipping disabled`,
|
|
209
|
+
realSkippingEnabled: false,
|
|
210
|
+
candidateCount: decisions.length,
|
|
211
|
+
summary: {
|
|
212
|
+
wouldSkip: wouldSkip.length,
|
|
213
|
+
wouldVerify: wouldVerify.length,
|
|
214
|
+
skippedButVerified: skippedButVerified.length,
|
|
215
|
+
wouldSkipWithoutAudit: wouldSkipWithoutAudit.length,
|
|
216
|
+
skippedCritical: wouldSkip.filter((decision) =>
|
|
217
|
+
decision.reasonCodes.includes("critical_fact_slot"),
|
|
218
|
+
).length,
|
|
219
|
+
shadowOnly: true,
|
|
220
|
+
},
|
|
221
|
+
realSkipReadiness,
|
|
222
|
+
decisions,
|
|
223
|
+
w8FastProfilePrerequisite: {
|
|
224
|
+
status: "not_met",
|
|
225
|
+
reason:
|
|
226
|
+
"selective verification is shadow-only; no verified cost/speed reduction is available to package as an opt-in fast profile",
|
|
227
|
+
},
|
|
228
|
+
};
|
|
229
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// Bundle-local compatibility surface for the package verification ontology.
|
|
2
|
+
//
|
|
3
|
+
// Workflow support helpers are bundled from the workflow spec directory, so this
|
|
4
|
+
// dependency-free helper intentionally lives inside the deep-research bundle.
|
|
5
|
+
// Keep it in semantic parity with src/verification-ontology.ts.
|
|
6
|
+
|
|
7
|
+
export const VERIFICATION_STATUS = Object.freeze({
|
|
8
|
+
VERIFIED: "verified",
|
|
9
|
+
PARTIALLY_SUPPORTED: "partially_supported",
|
|
10
|
+
UNSUPPORTED: "unsupported",
|
|
11
|
+
CONFLICTING: "conflicting",
|
|
12
|
+
VERIFICATION_BLOCKED: "verification_blocked",
|
|
13
|
+
UNVERIFIED: "unverified",
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const VERIFICATION_STATUS_VALUES = Object.freeze([
|
|
17
|
+
VERIFICATION_STATUS.VERIFIED,
|
|
18
|
+
VERIFICATION_STATUS.PARTIALLY_SUPPORTED,
|
|
19
|
+
VERIFICATION_STATUS.UNSUPPORTED,
|
|
20
|
+
VERIFICATION_STATUS.CONFLICTING,
|
|
21
|
+
VERIFICATION_STATUS.VERIFICATION_BLOCKED,
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
export const VERIFICATION_STATUS_BUCKETS = Object.freeze({
|
|
25
|
+
[VERIFICATION_STATUS.VERIFIED]: "verified",
|
|
26
|
+
[VERIFICATION_STATUS.PARTIALLY_SUPPORTED]: "partiallySupported",
|
|
27
|
+
[VERIFICATION_STATUS.UNSUPPORTED]: "unsupported",
|
|
28
|
+
[VERIFICATION_STATUS.CONFLICTING]: "conflicting",
|
|
29
|
+
[VERIFICATION_STATUS.VERIFICATION_BLOCKED]: "verificationBlocked",
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const VERIFICATION_STATUS_LABELS = Object.freeze({
|
|
33
|
+
[VERIFICATION_STATUS.VERIFIED]: "verified",
|
|
34
|
+
[VERIFICATION_STATUS.PARTIALLY_SUPPORTED]: "partially supported",
|
|
35
|
+
[VERIFICATION_STATUS.UNSUPPORTED]: "unsupported",
|
|
36
|
+
[VERIFICATION_STATUS.CONFLICTING]: "conflicting",
|
|
37
|
+
[VERIFICATION_STATUS.VERIFICATION_BLOCKED]: "verification blocked",
|
|
38
|
+
[VERIFICATION_STATUS.UNVERIFIED]: "unverified",
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export function canonicalVerificationStatus(status) {
|
|
42
|
+
const text = String(status ?? "").trim();
|
|
43
|
+
if (!text) return VERIFICATION_STATUS.UNVERIFIED;
|
|
44
|
+
if (text === "partiallySupported")
|
|
45
|
+
return VERIFICATION_STATUS.PARTIALLY_SUPPORTED;
|
|
46
|
+
if (text === "verificationBlocked" || text === "blocked")
|
|
47
|
+
return VERIFICATION_STATUS.VERIFICATION_BLOCKED;
|
|
48
|
+
return Object.values(VERIFICATION_STATUS).includes(text)
|
|
49
|
+
? text
|
|
50
|
+
: VERIFICATION_STATUS.UNVERIFIED;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function verificationStatusBucket(status) {
|
|
54
|
+
return (
|
|
55
|
+
VERIFICATION_STATUS_BUCKETS[canonicalVerificationStatus(status)] ?? "other"
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function isVerifiedStatus(status) {
|
|
60
|
+
return canonicalVerificationStatus(status) === VERIFICATION_STATUS.VERIFIED;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function isVerificationBlockedStatus(status) {
|
|
64
|
+
return (
|
|
65
|
+
canonicalVerificationStatus(status) ===
|
|
66
|
+
VERIFICATION_STATUS.VERIFICATION_BLOCKED
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function isNonVerifiedTerminalStatus(status) {
|
|
71
|
+
return [
|
|
72
|
+
VERIFICATION_STATUS.PARTIALLY_SUPPORTED,
|
|
73
|
+
VERIFICATION_STATUS.UNSUPPORTED,
|
|
74
|
+
VERIFICATION_STATUS.CONFLICTING,
|
|
75
|
+
VERIFICATION_STATUS.VERIFICATION_BLOCKED,
|
|
76
|
+
].includes(canonicalVerificationStatus(status));
|
|
77
|
+
}
|
|
@@ -24,13 +24,14 @@
|
|
|
24
24
|
"sourceUrls": { "type": "array", "items": { "type": "string" } },
|
|
25
25
|
"claimSummary": {
|
|
26
26
|
"type": "object",
|
|
27
|
-
"required": ["total", "verified", "partially_supported", "unsupported", "conflicting"],
|
|
27
|
+
"required": ["total", "verified", "partially_supported", "unsupported", "conflicting", "verification_blocked"],
|
|
28
28
|
"properties": {
|
|
29
29
|
"total": { "type": "number" },
|
|
30
30
|
"verified": { "type": "number" },
|
|
31
31
|
"partially_supported": { "type": "number" },
|
|
32
32
|
"unsupported": { "type": "number" },
|
|
33
|
-
"conflicting": { "type": "number" }
|
|
33
|
+
"conflicting": { "type": "number" },
|
|
34
|
+
"verification_blocked": { "type": "number" }
|
|
34
35
|
},
|
|
35
36
|
"additionalProperties": true
|
|
36
37
|
},
|
package/workflows/deep-research/schemas/deep-research-research-questions-control.schema.json
CHANGED
|
@@ -38,6 +38,44 @@
|
|
|
38
38
|
"type": "object"
|
|
39
39
|
},
|
|
40
40
|
"maxItems": 24
|
|
41
|
+
},
|
|
42
|
+
"additionalUnverifiedLeads": {
|
|
43
|
+
"type": "array",
|
|
44
|
+
"items": {
|
|
45
|
+
"type": "object"
|
|
46
|
+
},
|
|
47
|
+
"maxItems": 24
|
|
48
|
+
},
|
|
49
|
+
"budgetLedger": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"searchBudget": {
|
|
53
|
+
"type": "number"
|
|
54
|
+
},
|
|
55
|
+
"searchCallsUsed": {
|
|
56
|
+
"type": "number"
|
|
57
|
+
},
|
|
58
|
+
"searchQueriesAttempted": {
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": {
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
"maxItems": 12
|
|
64
|
+
},
|
|
65
|
+
"omittedSearchQueries": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"type": "string"
|
|
69
|
+
},
|
|
70
|
+
"maxItems": 12
|
|
71
|
+
},
|
|
72
|
+
"budgetExhausted": {
|
|
73
|
+
"type": "boolean"
|
|
74
|
+
},
|
|
75
|
+
"gapRecorded": {
|
|
76
|
+
"type": "boolean"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
41
79
|
}
|
|
42
80
|
}
|
|
43
81
|
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": [
|
|
4
|
+
"schema",
|
|
5
|
+
"claimInventory",
|
|
6
|
+
"factSlotCoverage"
|
|
7
|
+
],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"claimInventory": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": [
|
|
16
|
+
"verificationCandidates",
|
|
17
|
+
"preservedClaims",
|
|
18
|
+
"duplicates"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"verificationCandidates": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"properties": {
|
|
26
|
+
"id": { "type": "string" },
|
|
27
|
+
"claim": { "type": "string" },
|
|
28
|
+
"sourceUrls": { "type": "array", "items": { "type": "string" } },
|
|
29
|
+
"sourceRefs": { "type": "array", "items": { "type": "string" } },
|
|
30
|
+
"sourceQuality": { "type": "string" },
|
|
31
|
+
"reasonToVerify": { "type": "string" },
|
|
32
|
+
"scopeItems": { "type": "array", "items": { "type": "string" } },
|
|
33
|
+
"factSlotIds": { "type": "array", "items": { "type": "string" } },
|
|
34
|
+
"verificationNeed": { "enum": ["core", "useful", "optional"] }
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"maxItems": 48
|
|
38
|
+
},
|
|
39
|
+
"preservedClaims": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": { "type": "object" },
|
|
42
|
+
"maxItems": 24
|
|
43
|
+
},
|
|
44
|
+
"duplicates": {}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"factSlotCoverage": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": { "type": "object" },
|
|
50
|
+
"maxItems": 64
|
|
51
|
+
},
|
|
52
|
+
"coverageGaps": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": { "type": "object" }
|
|
55
|
+
},
|
|
56
|
+
"researchScopeCoverage": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": { "type": "object" }
|
|
59
|
+
},
|
|
60
|
+
"normalizationNotes": {},
|
|
61
|
+
"sanitizerDiagnostics": {}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"required": ["schema", "digest", "results"],
|
|
4
|
+
"additionalProperties": false,
|
|
5
|
+
"properties": {
|
|
6
|
+
"schema": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"minLength": 1
|
|
9
|
+
},
|
|
10
|
+
"digest": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1
|
|
13
|
+
},
|
|
14
|
+
"results": {
|
|
15
|
+
"type": "array",
|
|
16
|
+
"minItems": 1,
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["id", "status", "verdictDigest", "evidence"],
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1
|
|
25
|
+
},
|
|
26
|
+
"claim": {},
|
|
27
|
+
"factSlotIds": {},
|
|
28
|
+
"status": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": ["verified", "partially_supported", "unsupported", "conflicting", "verification_blocked"]
|
|
31
|
+
},
|
|
32
|
+
"confidence": {},
|
|
33
|
+
"verdictDigest": {},
|
|
34
|
+
"evidence": {
|
|
35
|
+
"type": "array",
|
|
36
|
+
"items": {
|
|
37
|
+
"type": "object"
|
|
38
|
+
},
|
|
39
|
+
"maxItems": 5
|
|
40
|
+
},
|
|
41
|
+
"caveats": {},
|
|
42
|
+
"correctionOrCounterclaim": {}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"verdictDigest",
|
|
9
9
|
"evidence"
|
|
10
10
|
],
|
|
11
|
+
"additionalProperties": false,
|
|
11
12
|
"properties": {
|
|
12
13
|
"schema": {
|
|
13
14
|
"type": "string",
|
|
@@ -17,13 +18,17 @@
|
|
|
17
18
|
"type": "string",
|
|
18
19
|
"minLength": 1
|
|
19
20
|
},
|
|
20
|
-
"id": {
|
|
21
|
+
"id": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1
|
|
24
|
+
},
|
|
21
25
|
"claim": {},
|
|
22
26
|
"factSlotIds": {},
|
|
23
27
|
"status": {
|
|
24
28
|
"type": "string",
|
|
25
|
-
"enum": ["verified", "partially_supported", "unsupported", "conflicting"]
|
|
29
|
+
"enum": ["verified", "partially_supported", "unsupported", "conflicting", "verification_blocked"]
|
|
26
30
|
},
|
|
31
|
+
"confidence": {},
|
|
27
32
|
"verdictDigest": {},
|
|
28
33
|
"evidence": {
|
|
29
34
|
"type": "array",
|
|
@@ -31,6 +36,8 @@
|
|
|
31
36
|
"type": "object"
|
|
32
37
|
},
|
|
33
38
|
"maxItems": 5
|
|
34
|
-
}
|
|
39
|
+
},
|
|
40
|
+
"caveats": {},
|
|
41
|
+
"correctionOrCounterclaim": {}
|
|
35
42
|
}
|
|
36
43
|
}
|