@kontourai/survey 0.4.3 → 0.4.4

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 (32) hide show
  1. package/README.md +211 -9
  2. package/dist/examples/review-workbench/downstream-public-directory-adapter.d.ts +3 -0
  3. package/dist/examples/review-workbench/downstream-public-directory-adapter.js +262 -0
  4. package/dist/examples/review-workbench/review-queue-session.d.ts +54 -0
  5. package/dist/examples/review-workbench/review-queue-session.js +122 -0
  6. package/dist/examples/review-workbench/review-surface-preview.d.ts +55 -0
  7. package/dist/examples/review-workbench/review-surface-preview.js +104 -0
  8. package/dist/examples/review-workbench/review-workbench-data.d.ts +261 -0
  9. package/dist/examples/review-workbench/review-workbench-data.js +199 -0
  10. package/dist/examples/review-workbench/review-workbench.d.ts +7 -0
  11. package/dist/examples/review-workbench/review-workbench.js +488 -0
  12. package/dist/fixtures/downstream-public-directory-proposal.d.ts +100 -0
  13. package/dist/fixtures/downstream-public-directory-proposal.js +59 -0
  14. package/dist/fixtures/public-directory-review-resource.d.ts +156 -0
  15. package/dist/fixtures/public-directory-review-resource.js +157 -0
  16. package/dist/fixtures/regulated-document-review-resource.d.ts +121 -0
  17. package/dist/fixtures/regulated-document-review-resource.js +131 -0
  18. package/dist/src/builder.d.ts +4 -1
  19. package/dist/src/builder.js +7 -0
  20. package/dist/src/index.d.ts +8 -4
  21. package/dist/src/index.js +4 -2
  22. package/dist/src/learning-projections.d.ts +19 -0
  23. package/dist/src/learning-projections.js +77 -0
  24. package/dist/src/raw-source.d.ts +15 -0
  25. package/dist/src/raw-source.js +22 -0
  26. package/dist/src/review-proof.d.ts +28 -0
  27. package/dist/src/review-proof.js +58 -1
  28. package/dist/src/review-resource.d.ts +111 -0
  29. package/dist/src/review-resource.js +1 -0
  30. package/dist/src/to-surface.js +226 -13
  31. package/dist/src/types.d.ts +17 -1
  32. package/package.json +10 -4
@@ -1,5 +1,5 @@
1
1
  import type { ConfidenceBasis, DerivationEdge, EvidenceMethod, EvidenceType, ImpactLevel, TrustStatus } from "@kontourai/surface";
2
- export type RawSourceKind = "uploaded-document" | "web-page" | "api-record" | "manual-entry";
2
+ export type RawSourceKind = "uploaded-document" | "web-page" | "api-record" | "manual-entry" | "policy-standard";
3
3
  export type LocatorScheme = "pdf" | "text" | "html" | "structured-field";
4
4
  export interface RawSource {
5
5
  id: string;
@@ -9,6 +9,9 @@ export interface RawSource {
9
9
  fetchedAt?: string;
10
10
  checksum?: string;
11
11
  locatorScheme: LocatorScheme;
12
+ inlineText?: string;
13
+ standardVersion?: string;
14
+ paragraphRef?: string;
12
15
  metadata?: Record<string, unknown>;
13
16
  }
14
17
  export interface Extraction {
@@ -31,6 +34,7 @@ export interface Candidate {
31
34
  value: unknown;
32
35
  confidence?: number;
33
36
  sourceRank?: number;
37
+ rejectionReason?: string;
34
38
  metadata?: Record<string, unknown>;
35
39
  }
36
40
  export interface CandidateSet {
@@ -67,6 +71,17 @@ export interface EscalationRecord {
67
71
  resolvedBy?: string;
68
72
  metadata?: Record<string, unknown>;
69
73
  }
74
+ export interface Interpretation {
75
+ id: string;
76
+ appliesToTarget?: string;
77
+ appliesToClaimId?: string;
78
+ anchorsToSourceId: string;
79
+ ruleLocator: string;
80
+ reading: string;
81
+ actor: string;
82
+ recordedAt: string;
83
+ metadata?: Record<string, unknown>;
84
+ }
70
85
  export interface ClaimTarget {
71
86
  id: string;
72
87
  candidateSetId: string;
@@ -100,4 +115,5 @@ export interface SurveyInput {
100
115
  reviewOutcomes: ReviewOutcome[];
101
116
  claims: ClaimTarget[];
102
117
  escalations?: EscalationRecord[];
118
+ interpretations?: Interpretation[];
103
119
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontourai/survey",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "Producer-side source, extraction, candidate, and review contracts for projecting verified claims into Surface.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -19,7 +19,9 @@
19
19
  "exports": {
20
20
  ".": "./dist/src/index.js",
21
21
  "./fixtures/public-field-review": "./dist/fixtures/public-field-review.js",
22
- "./fixtures/corrected-document-candidates": "./dist/fixtures/corrected-document-candidates.js"
22
+ "./fixtures/corrected-document-candidates": "./dist/fixtures/corrected-document-candidates.js",
23
+ "./fixtures/public-directory-review-resource": "./dist/fixtures/public-directory-review-resource.js",
24
+ "./fixtures/regulated-document-review-resource": "./dist/fixtures/regulated-document-review-resource.js"
23
25
  },
24
26
  "files": [
25
27
  "dist/examples/",
@@ -31,8 +33,12 @@
31
33
  "build": "rm -rf dist && tsc",
32
34
  "typecheck": "tsc --noEmit",
33
35
  "test": "npm run build && node --test dist/tests/*.test.js",
34
- "verify": "node scripts/check-content-boundary.cjs && npm run typecheck && npm test",
35
- "check:content-boundary": "node scripts/check-content-boundary.cjs"
36
+ "verify": "node scripts/check-content-boundary.cjs && npm run typecheck && npm test && npm run check:review-workbench",
37
+ "check:content-boundary": "node scripts/check-content-boundary.cjs",
38
+ "check:review-workbench": "npm run check:review-workbench:static",
39
+ "check:review-workbench:static": "npm run build && node scripts/check-review-workbench.cjs",
40
+ "setup:repo-hooks": "node scripts/setup-repo-hooks.cjs",
41
+ "validate:repo-hooks": "node scripts/validate-repo-hooks.cjs"
36
42
  },
37
43
  "dependencies": {
38
44
  "@kontourai/surface": "^0.5.1"