@kontourai/survey 0.4.24 → 0.5.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.
Files changed (37) hide show
  1. package/README.md +10 -10
  2. package/dist/example-data/corrected-document-candidates.d.ts +2 -0
  3. package/dist/{fixtures → example-data}/corrected-document-candidates.js +3 -3
  4. package/dist/{fixtures → example-data}/downstream-public-directory-proposal.d.ts +1 -1
  5. package/dist/{fixtures → example-data}/downstream-public-directory-proposal.js +1 -1
  6. package/dist/{fixtures → example-data}/public-directory-review-resource.d.ts +2 -2
  7. package/dist/{fixtures → example-data}/public-directory-review-resource.js +2 -2
  8. package/dist/example-data/public-field-review.d.ts +2 -0
  9. package/dist/{fixtures → example-data}/public-field-review.js +2 -2
  10. package/dist/{fixtures → example-data}/regulated-document-review-resource.d.ts +1 -1
  11. package/dist/{fixtures → example-data}/regulated-document-review-resource.js +3 -3
  12. package/dist/examples/public-field-observation.js +4 -4
  13. package/dist/examples/review-workbench/downstream-public-directory-adapter.d.ts +1 -1
  14. package/dist/examples/review-workbench/facility-credential-consumer.d.ts +2 -2
  15. package/dist/examples/review-workbench/facility-credential-consumer.js +8 -8
  16. package/dist/examples/review-workbench/server-apply-consumer.d.ts +1 -1
  17. package/dist/examples/review-workbench/server-apply-consumer.js +3 -3
  18. package/dist/src/agent-utterance.d.ts +166 -0
  19. package/dist/src/agent-utterance.js +373 -0
  20. package/dist/src/anthropic.d.ts +104 -0
  21. package/dist/src/anthropic.js +383 -0
  22. package/dist/src/index.d.ts +8 -2
  23. package/dist/src/index.js +4 -1
  24. package/dist/src/inquiry-mapping.d.ts +256 -0
  25. package/dist/src/inquiry-mapping.js +385 -0
  26. package/dist/src/review-workbench/review-queue-session.js +3 -3
  27. package/dist/src/review-workbench/review-surface-preview.js +1 -1
  28. package/dist/src/review-workbench/review-workbench-data.d.ts +4 -4
  29. package/dist/src/review-workbench/review-workbench-data.js +14 -14
  30. package/dist/src/schema-mapping.d.ts +196 -0
  31. package/dist/src/schema-mapping.js +486 -0
  32. package/dist/src/to-surface.d.ts +3 -3
  33. package/dist/src/to-surface.js +1 -1
  34. package/dist/src/types.d.ts +2 -2
  35. package/package.json +20 -7
  36. package/dist/fixtures/corrected-document-candidates.d.ts +0 -2
  37. package/dist/fixtures/public-field-review.d.ts +0 -2
@@ -1,6 +1,6 @@
1
- import type { TrustInput } from "@kontourai/surface";
1
+ import type { TrustBundle } from "@kontourai/surface";
2
2
  import type { SurveyInput } from "./types.js";
3
- export interface BuildSurveyTrustInputOptions {
3
+ export interface BuildSurveyTrustBundleOptions {
4
4
  reviewProofs?: boolean;
5
5
  }
6
- export declare function buildSurveyTrustInput(input: SurveyInput, options?: BuildSurveyTrustInputOptions): TrustInput;
6
+ export declare function buildSurveyTrustBundle(input: SurveyInput, options?: BuildSurveyTrustBundleOptions): TrustBundle;
@@ -1,5 +1,5 @@
1
1
  import { buildReviewProofAnchor } from "./review-proof.js";
2
- export function buildSurveyTrustInput(input, options = {}) {
2
+ export function buildSurveyTrustBundle(input, options = {}) {
3
3
  const rawSources = indexById(input.rawSources, "raw source");
4
4
  const extractions = indexById(input.extractions, "extraction");
5
5
  const candidateSets = indexById(input.candidateSets, "candidate set");
@@ -1,6 +1,6 @@
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" | "policy-standard";
3
- export type LocatorScheme = "pdf" | "text" | "html" | "structured-field";
2
+ export type RawSourceKind = "uploaded-document" | "web-page" | "api-record" | "manual-entry" | "policy-standard" | "inquiry-question" | "agent-utterance" | "system-schema";
3
+ export type LocatorScheme = "pdf" | "text" | "html" | "structured-field" | "text-span";
4
4
  export interface RawSource {
5
5
  id: string;
6
6
  kind: RawSourceKind;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontourai/survey",
3
- "version": "0.4.24",
3
+ "version": "0.5.0",
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",
@@ -18,6 +18,10 @@
18
18
  },
19
19
  "exports": {
20
20
  ".": "./dist/src/index.js",
21
+ "./anthropic": {
22
+ "types": "./dist/src/anthropic.d.ts",
23
+ "default": "./dist/src/anthropic.js"
24
+ },
21
25
  "./review-workbench": {
22
26
  "types": "./dist/src/review-workbench/review-workbench.d.ts",
23
27
  "default": "./dist/src/review-workbench/review-workbench.js"
@@ -28,14 +32,14 @@
28
32
  },
29
33
  "./review-workbench.css": "./dist/src/review-workbench/review-workbench.css",
30
34
  "./review-workbench/standalone.css": "./dist/src/review-workbench/review-workbench.standalone.css",
31
- "./fixtures/public-field-review": "./dist/fixtures/public-field-review.js",
32
- "./fixtures/corrected-document-candidates": "./dist/fixtures/corrected-document-candidates.js",
33
- "./fixtures/public-directory-review-resource": "./dist/fixtures/public-directory-review-resource.js",
34
- "./fixtures/regulated-document-review-resource": "./dist/fixtures/regulated-document-review-resource.js"
35
+ "./example-data/public-field-review": "./dist/example-data/public-field-review.js",
36
+ "./example-data/corrected-document-candidates": "./dist/example-data/corrected-document-candidates.js",
37
+ "./example-data/public-directory-review-resource": "./dist/example-data/public-directory-review-resource.js",
38
+ "./example-data/regulated-document-review-resource": "./dist/example-data/regulated-document-review-resource.js"
35
39
  },
36
40
  "files": [
37
41
  "dist/examples/",
38
- "dist/fixtures/",
42
+ "dist/example-data/",
39
43
  "dist/src/",
40
44
  "README.md"
41
45
  ],
@@ -57,9 +61,18 @@
57
61
  "docs:check": "npm run docs:build && node scripts/docs-site/check-links.ts"
58
62
  },
59
63
  "dependencies": {
60
- "@kontourai/surface": "^0.5.1"
64
+ "@kontourai/surface": "^0.9.0"
65
+ },
66
+ "peerDependencies": {
67
+ "@anthropic-ai/sdk": ">=0.20.0"
68
+ },
69
+ "peerDependenciesMeta": {
70
+ "@anthropic-ai/sdk": {
71
+ "optional": true
72
+ }
61
73
  },
62
74
  "devDependencies": {
75
+ "@anthropic-ai/sdk": "^0.54.0",
63
76
  "@kontourai/console-kit": "^0.1.0",
64
77
  "@playwright/test": "^1.60.0",
65
78
  "@types/node": "^25.6.0",
@@ -1,2 +0,0 @@
1
- import type { SurveyInput } from "../src/index.js";
2
- export declare const correctedDocumentCandidatesFixture: SurveyInput;
@@ -1,2 +0,0 @@
1
- import type { SurveyInput } from "../src/index.js";
2
- export declare const publicFieldReviewFixture: SurveyInput;