@adcp/sdk 14.0.0-beta.27 → 14.0.0-beta.28
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/dist/lib/core/AgentClient.d.mts +5 -1
- package/dist/lib/core/AgentClient.d.ts +5 -1
- package/dist/lib/core/SingleAgentClient.js +2 -0
- package/dist/lib/core/SingleAgentClient.mjs +2 -0
- package/dist/lib/index.d.mts +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +1 -0
- package/dist/lib/reporting/evidence.d.mts +4 -0
- package/dist/lib/reporting/evidence.d.ts +4 -0
- package/dist/lib/reporting/evidence.js +136 -0
- package/dist/lib/reporting/evidence.mjs +109 -0
- package/dist/lib/reporting/index.d.mts +4 -0
- package/dist/lib/reporting/index.d.ts +4 -0
- package/dist/lib/reporting/index.js +45 -0
- package/dist/lib/reporting/index.mjs +24 -0
- package/dist/lib/reporting/inspection.d.mts +88 -0
- package/dist/lib/reporting/inspection.d.ts +88 -0
- package/dist/lib/reporting/inspection.js +1125 -0
- package/dist/lib/reporting/inspection.mjs +1094 -0
- package/dist/lib/reporting/reconciliation.d.mts +199 -0
- package/dist/lib/reporting/reconciliation.d.ts +199 -0
- package/dist/lib/reporting/reconciliation.js +870 -0
- package/dist/lib/reporting/reconciliation.mjs +844 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.js +1 -0
- package/dist/lib/server/decisioning/runtime/protocol-for-tool.mjs +1 -0
- package/dist/lib/server/wire-spec-fields.generated.d.mts +11 -1
- package/dist/lib/server/wire-spec-fields.generated.d.ts +11 -1
- package/dist/lib/server/wire-spec-fields.generated.js +10 -0
- package/dist/lib/server/wire-spec-fields.generated.mjs +10 -0
- package/dist/lib/testing/storyboard/runner.js +13 -2
- package/dist/lib/testing/storyboard/runner.mjs +13 -2
- package/dist/lib/testing/storyboard/types.d.mts +8 -0
- package/dist/lib/testing/storyboard/types.d.ts +8 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/index.d.mts +1 -0
- package/dist/lib/types/index.d.ts +1 -0
- package/dist/lib/types/schemas.generated.js +29 -2
- package/dist/lib/types/schemas.generated.mjs +29 -2
- package/dist/lib/utils/reporting-status-response.d.mts +2 -0
- package/dist/lib/utils/reporting-status-response.d.ts +2 -0
- package/dist/lib/utils/reporting-status-response.js +338 -0
- package/dist/lib/utils/reporting-status-response.mjs +319 -0
- package/dist/lib/utils/response-schemas.js +6 -1
- package/dist/lib/utils/response-schemas.mjs +6 -1
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +1 -1
- package/docs/guides/REPORTING-RECONCILIATION.md +107 -0
- package/docs/llms.txt +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type CanonicalReferenceResolver } from '../canonical-references';
|
|
2
|
+
import { type SsrfFetchOptions } from '../net/ssrf-fetch';
|
|
3
|
+
import type { ReportingControlTotal } from '../types/tools.generated';
|
|
4
|
+
import type { ReportingInspectionContext, ReportingObservation } from './reconciliation';
|
|
5
|
+
export type ReportingInspectionErrorCode = 'UNSUPPORTED_RESOURCE' | 'RESOURCE_READ_FAILED' | 'RESOURCE_NOT_READY' | 'RESOURCE_TOO_LARGE' | 'INSPECTION_TIMEOUT' | 'MANIFEST_DIGEST_MISMATCH' | 'MANIFEST_INVALID' | 'MANIFEST_INCOMPLETE' | 'MANIFEST_IDENTITY_MISMATCH' | 'MANIFEST_TOTAL_MISMATCH' | 'OBJECT_DUPLICATE' | 'OBJECT_SIZE_MISMATCH' | 'OBJECT_DIGEST_MISMATCH' | 'OBJECT_ROW_COUNT_MISMATCH' | 'FORMAT_UNSUPPORTED' | 'COMPRESSION_UNSUPPORTED' | 'ROW_SCHEMA_FETCH_FAILED' | 'ROW_SCHEMA_INVALID' | 'ROW_SCHEMA_VIOLATION' | 'REPORT_DEFINITION_FETCH_FAILED' | 'REPORT_DEFINITION_INVALID' | 'CANONICALIZATION_FETCH_FAILED' | 'CANONICALIZATION_INVALID' | 'ROW_COUNT_MISMATCH' | 'CONTROL_TOTAL_UNSUPPORTED' | 'CONTROL_TOTAL_MISMATCH' | 'CANONICAL_DIGEST_MISMATCH';
|
|
6
|
+
export declare class ReportingInspectionError extends Error {
|
|
7
|
+
readonly code: ReportingInspectionErrorCode;
|
|
8
|
+
readonly retryable: boolean;
|
|
9
|
+
readonly details?: Record<string, unknown> | undefined;
|
|
10
|
+
readonly observation?: ReportingObservation | undefined;
|
|
11
|
+
constructor(code: ReportingInspectionErrorCode, message: string, retryable?: boolean, details?: Record<string, unknown> | undefined, options?: ErrorOptions, observation?: ReportingObservation | undefined);
|
|
12
|
+
}
|
|
13
|
+
export type ReportingResourceReadRole = 'manifest' | 'object';
|
|
14
|
+
export interface ReportingResourceReadRequest<TCredential = unknown> {
|
|
15
|
+
role: ReportingResourceReadRole;
|
|
16
|
+
location: string;
|
|
17
|
+
objectRef?: string;
|
|
18
|
+
expectedSizeBytes?: number;
|
|
19
|
+
maxBytes: number;
|
|
20
|
+
credential?: TCredential;
|
|
21
|
+
context: ReportingInspectionContext;
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
}
|
|
24
|
+
export interface ReportingResourceReadResult {
|
|
25
|
+
body: Uint8Array;
|
|
26
|
+
contentType?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ReportingResourceReader<TCredential = unknown> {
|
|
29
|
+
read(request: ReportingResourceReadRequest<TCredential>): Promise<ReportingResourceReadResult>;
|
|
30
|
+
}
|
|
31
|
+
export interface ReportingCredentialProvider<TCredential = unknown> {
|
|
32
|
+
getCredentials(context: ReportingInspectionContext): Promise<TCredential | undefined>;
|
|
33
|
+
}
|
|
34
|
+
export interface ReportingHttpCredentials {
|
|
35
|
+
/** Request headers such as Authorization. Values are never copied into errors or receipts. */
|
|
36
|
+
headers: Readonly<Record<string, string>>;
|
|
37
|
+
/** Exact HTTPS origins authorized to receive these headers. */
|
|
38
|
+
allowedOrigins: readonly string[];
|
|
39
|
+
}
|
|
40
|
+
export interface HttpsReportingResourceReaderOptions extends Pick<SsrfFetchOptions, 'allowPrivateIp' | 'timeoutMs' | 'trustedFetchFn' | 'tls'> {
|
|
41
|
+
maxBodyBytes?: number;
|
|
42
|
+
/** Exact HTTPS origins authorized to receive configured mTLS material. */
|
|
43
|
+
tlsAllowedOrigins?: readonly string[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Reader for HTTPS manifests and same-origin objects. DNS pinning, private-IP
|
|
47
|
+
* refusal, redirect blocking, deadlines, and body caps come from ssrfSafeFetch.
|
|
48
|
+
*/
|
|
49
|
+
export declare function createHttpsReportingResourceReader(options?: HttpsReportingResourceReaderOptions): ReportingResourceReader<ReportingHttpCredentials>;
|
|
50
|
+
type ReportingFileFormat = 'jsonl' | 'csv' | 'parquet' | 'avro' | 'orc';
|
|
51
|
+
type ReportingFileCompression = 'none' | 'gzip' | 'zstd' | 'snappy';
|
|
52
|
+
export interface ReportingDecodedFileContext {
|
|
53
|
+
format: ReportingFileFormat;
|
|
54
|
+
objectRef: string;
|
|
55
|
+
rowSchema: Record<string, unknown>;
|
|
56
|
+
inspection: ReportingInspectionContext;
|
|
57
|
+
/** Maximum rows this object may return without exceeding the inspection budget. */
|
|
58
|
+
maxRows: number;
|
|
59
|
+
}
|
|
60
|
+
export type ReportingFormatDecoder = (body: Uint8Array, context: ReportingDecodedFileContext) => Promise<Record<string, unknown>[]> | Record<string, unknown>[];
|
|
61
|
+
export type ReportingCompressionDecoder = (body: Uint8Array, maxOutputBytes: number) => Promise<Uint8Array> | Uint8Array;
|
|
62
|
+
export type ReportingControlTotalCalculator = (rows: readonly Record<string, unknown>[], expected: readonly ReportingControlTotal[], context: ReportingInspectionContext) => Promise<ReportingControlTotal[]> | ReportingControlTotal[];
|
|
63
|
+
export interface ReportingManifestInspectorOptions<TCredential = unknown> {
|
|
64
|
+
reader: ReportingResourceReader<TCredential>;
|
|
65
|
+
credentialProvider?: ReportingCredentialProvider<TCredential>;
|
|
66
|
+
referenceResolver?: CanonicalReferenceResolver;
|
|
67
|
+
/** Consumer-approved origins for schemas and pinned semantic contracts. */
|
|
68
|
+
referenceAllowedOrigins: readonly string[];
|
|
69
|
+
formatDecoders?: Partial<Record<ReportingFileFormat, ReportingFormatDecoder>>;
|
|
70
|
+
compressionDecoders?: Partial<Record<ReportingFileCompression, ReportingCompressionDecoder>>;
|
|
71
|
+
controlTotalCalculator?: ReportingControlTotalCalculator;
|
|
72
|
+
consumerCommitRef?: string | ((context: ReportingInspectionContext) => string | undefined);
|
|
73
|
+
maxManifestBytes?: number;
|
|
74
|
+
maxObjectBytes?: number;
|
|
75
|
+
maxDecodedObjectBytes?: number;
|
|
76
|
+
maxTotalBytes?: number;
|
|
77
|
+
maxDecodedTotalBytes?: number;
|
|
78
|
+
maxFiles?: number;
|
|
79
|
+
maxRows?: number;
|
|
80
|
+
maxRowBytes?: number;
|
|
81
|
+
/** Hard wall-clock budget for one inspection attempt, including custom adapters. */
|
|
82
|
+
maxInspectionMs?: number;
|
|
83
|
+
/** Maximum wall-clock time permitted for synchronous row-schema compilation. */
|
|
84
|
+
maxSchemaCompileMs?: number;
|
|
85
|
+
}
|
|
86
|
+
/** Build the SDK-managed manifest/file inspector used by reconcileReporting. */
|
|
87
|
+
export declare function createReportingManifestInspector<TCredential = unknown>(options: ReportingManifestInspectorOptions<TCredential>): (context: ReportingInspectionContext) => Promise<ReportingObservation>;
|
|
88
|
+
export {};
|