@astrasyncai/verification-gateway 5.13.0 → 5.14.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/dist/adapters/express.js +28 -10
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +28 -10
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/mcp.js +1 -1
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +1 -1
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.js +28 -10
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +28 -10
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.js +1 -1
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +1 -1
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/bin/astrasync-claude-hook.js +28 -10
- package/dist/bin/astrasync-codex-hook.js +28 -10
- package/dist/bin/astrasync-guard.js +28 -10
- package/dist/bin/astrasync.js +29 -11
- package/dist/browser/background.js +28 -10
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +28 -10
- package/dist/browser/background.mjs.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/codex/index.js +28 -10
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +28 -10
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/extension.js +28 -10
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +28 -10
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.js +1 -1
- package/dist/edge-config.js.map +1 -1
- package/dist/edge-config.mjs +1 -1
- package/dist/edge-config.mjs.map +1 -1
- package/dist/edge-core/index.d.mts +32 -4
- package/dist/edge-core/index.d.ts +32 -4
- package/dist/edge-core/index.js +28 -10
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +28 -10
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/gateway/gateway.js +28 -10
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +28 -10
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +28 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -10
- package/dist/index.mjs.map +1 -1
- package/dist/registration/index.js +1 -1
- package/dist/registration/index.js.map +1 -1
- package/dist/registration/index.mjs +1 -1
- package/dist/registration/index.mjs.map +1 -1
- package/dist/transport/index.js +1 -1
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs +1 -1
- package/dist/transport/index.mjs.map +1 -1
- package/dist/verify.js +1 -1
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +1 -1
- package/dist/verify.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4935,7 +4935,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
|
|
|
4935
4935
|
* silently (never throwing), so this is a no-op there — which is correct:
|
|
4936
4936
|
* in a browser the page's real UA is the honest identity.
|
|
4937
4937
|
*/
|
|
4938
|
-
declare const SDK_USER_AGENT = "astrasync-sdk/5.
|
|
4938
|
+
declare const SDK_USER_AGENT = "astrasync-sdk/5.14.0";
|
|
4939
4939
|
declare const sdkFetch: typeof fetch;
|
|
4940
4940
|
|
|
4941
4941
|
interface LocalPolicy {
|
|
@@ -5053,6 +5053,6 @@ declare function parseYaml(yamlContent: string): ParseResult;
|
|
|
5053
5053
|
* is fine — bumping both in the release-ceremony commit keeps them
|
|
5054
5054
|
* lockstep.
|
|
5055
5055
|
*/
|
|
5056
|
-
declare const SDK_VERSION = "5.
|
|
5056
|
+
declare const SDK_VERSION = "5.14.0";
|
|
5057
5057
|
|
|
5058
5058
|
export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, type ParseResult as LocalPolicyParseResult, type ValidationError as LocalPolicyValidationError, type ValidationResult as LocalPolicyValidationResult, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type ReportAttemptOptions, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, VERIFICATION_STATUS_HEADER, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, buildVerificationUnavailableBody, clearCache, createMcpMiddleware, degradeToObserve, denyStatusFor, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isRejectedIdentityClaim, isVerificationUnavailable, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, normalizeDeclaredSource, parseYaml as parseLocalPolicyYaml, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, unavailableRetryAfterSeconds, validatePolicy as validateLocalPolicy, verify };
|
package/dist/index.d.ts
CHANGED
|
@@ -4935,7 +4935,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
|
|
|
4935
4935
|
* silently (never throwing), so this is a no-op there — which is correct:
|
|
4936
4936
|
* in a browser the page's real UA is the honest identity.
|
|
4937
4937
|
*/
|
|
4938
|
-
declare const SDK_USER_AGENT = "astrasync-sdk/5.
|
|
4938
|
+
declare const SDK_USER_AGENT = "astrasync-sdk/5.14.0";
|
|
4939
4939
|
declare const sdkFetch: typeof fetch;
|
|
4940
4940
|
|
|
4941
4941
|
interface LocalPolicy {
|
|
@@ -5053,6 +5053,6 @@ declare function parseYaml(yamlContent: string): ParseResult;
|
|
|
5053
5053
|
* is fine — bumping both in the release-ceremony commit keeps them
|
|
5054
5054
|
* lockstep.
|
|
5055
5055
|
*/
|
|
5056
|
-
declare const SDK_VERSION = "5.
|
|
5056
|
+
declare const SDK_VERSION = "5.14.0";
|
|
5057
5057
|
|
|
5058
5058
|
export { AgentClient, type AgentCredentials, type AgentProtocol, type AgentRecord, AstraSync, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HealthResponse, KYDRequiredError, type ParseResult as LocalPolicyParseResult, type ValidationError as LocalPolicyValidationError, type ValidationResult as LocalPolicyValidationResult, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, type MerchantSettlementToken, type ModelConfig, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, RUNTIME_SIGNATURES, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type ReportAttemptOptions, type RouteAccessConfig, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, type SettlementRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, VERIFICATION_STATUS_HEADER, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, _resetEdgeConfigCache, index as agent, authorizeSettlement, awaitStepUpApproval, buildGuidance, buildSdkObservedMetadata, buildVerificationUnavailableBody, clearCache, createMcpMiddleware, degradeToObserve, denyStatusFor, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, express, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, hasCredentials, isEdgeConfig, isRejectedIdentityClaim, isVerificationUnavailable, isVerifiedHopValidFor, matchEdgePathRule, matchPlatformSignature, nextjs, normalizeDeclaredSource, parseYaml as parseLocalPolicyYaml, parseVerifiedHop, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, sanitizeHeaders, sdk, sdkFetch, serializeVerifiedHop, setMcpMeta, index$1 as transport, unavailableRetryAfterSeconds, validatePolicy as validateLocalPolicy, verify };
|
package/dist/index.js
CHANGED
|
@@ -122,7 +122,7 @@ function getTrustLevel(score) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
// src/version.ts
|
|
125
|
-
var SDK_VERSION = "5.
|
|
125
|
+
var SDK_VERSION = "5.14.0";
|
|
126
126
|
|
|
127
127
|
// src/http.ts
|
|
128
128
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -1917,6 +1917,11 @@ async function withBudget(promise, ms) {
|
|
|
1917
1917
|
if (timer) clearTimeout(timer);
|
|
1918
1918
|
}
|
|
1919
1919
|
}
|
|
1920
|
+
var CONTAINER_ID = (() => {
|
|
1921
|
+
const c = globalThis.crypto;
|
|
1922
|
+
if (c?.randomUUID) return c.randomUUID();
|
|
1923
|
+
return `c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 12)}`;
|
|
1924
|
+
})();
|
|
1920
1925
|
var destKeyOf = (d) => `${d.apiBaseUrl}\0${d.apiKey ?? ""}\0${d.counterparty}\0${d.adapter ?? ""}`;
|
|
1921
1926
|
var BeaconBuffer = class {
|
|
1922
1927
|
constructor(options = {}) {
|
|
@@ -1924,6 +1929,7 @@ var BeaconBuffer = class {
|
|
|
1924
1929
|
this.droppedSinceLast = 0;
|
|
1925
1930
|
this.droppedTotal = 0;
|
|
1926
1931
|
this.deliveredTotal = 0;
|
|
1932
|
+
this.enqueuedTotal = 0;
|
|
1927
1933
|
this.backoffUntil = 0;
|
|
1928
1934
|
this.collapse = /* @__PURE__ */ new Map();
|
|
1929
1935
|
/** Keys the backend answered 401 for — later batches go unauthenticated. */
|
|
@@ -1936,13 +1942,16 @@ var BeaconBuffer = class {
|
|
|
1936
1942
|
collapseMaxKeys: options.collapseMaxKeys ?? 1e3,
|
|
1937
1943
|
requestTimeoutMs: options.requestTimeoutMs ?? 1e4,
|
|
1938
1944
|
retryBackoffMs: options.retryBackoffMs ?? 1e3,
|
|
1945
|
+
holdRepeats: options.holdRepeats ?? false,
|
|
1946
|
+
containerId: options.containerId ?? CONTAINER_ID,
|
|
1939
1947
|
now: options.now ?? Date.now
|
|
1940
1948
|
};
|
|
1941
1949
|
}
|
|
1942
1950
|
/**
|
|
1943
1951
|
* Queue one beacon. With a `collapseKey`, a repeat inside the window is
|
|
1944
|
-
* merged into
|
|
1945
|
-
*
|
|
1952
|
+
* merged into this key's item while that item is still queued (not yet in
|
|
1953
|
+
* flight). Once it has left, the repeat becomes a new item, sendable on
|
|
1954
|
+
* this flush — nothing waits for a later invocation (round 27.6).
|
|
1946
1955
|
*/
|
|
1947
1956
|
enqueue(dest, item, collapseKey) {
|
|
1948
1957
|
const now = this.opts.now();
|
|
@@ -1955,12 +1964,15 @@ var BeaconBuffer = class {
|
|
|
1955
1964
|
return;
|
|
1956
1965
|
}
|
|
1957
1966
|
}
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1967
|
+
if (this.opts.holdRepeats) {
|
|
1968
|
+
entry.held = this.push(
|
|
1969
|
+
dest,
|
|
1970
|
+
{ ...item, repeatCount: 1 },
|
|
1971
|
+
entry.firstSeenAt + this.opts.collapseWindowMs
|
|
1972
|
+
);
|
|
1973
|
+
return;
|
|
1974
|
+
}
|
|
1975
|
+
entry.first = this.push(dest, { ...item, repeatCount: 1 }, now);
|
|
1964
1976
|
return;
|
|
1965
1977
|
}
|
|
1966
1978
|
this.collapse.delete(collapseKey);
|
|
@@ -1996,6 +2008,7 @@ var BeaconBuffer = class {
|
|
|
1996
2008
|
droppedSinceLast: this.droppedSinceLast,
|
|
1997
2009
|
droppedTotal: this.droppedTotal,
|
|
1998
2010
|
deliveredTotal: this.deliveredTotal,
|
|
2011
|
+
enqueuedTotal: this.enqueuedTotal,
|
|
1999
2012
|
flushing: this.inFlight !== void 0
|
|
2000
2013
|
};
|
|
2001
2014
|
}
|
|
@@ -2010,6 +2023,7 @@ var BeaconBuffer = class {
|
|
|
2010
2023
|
inFlight: false
|
|
2011
2024
|
};
|
|
2012
2025
|
this.queue.push(entry);
|
|
2026
|
+
this.enqueuedTotal += 1;
|
|
2013
2027
|
return entry;
|
|
2014
2028
|
}
|
|
2015
2029
|
dropOldest() {
|
|
@@ -2055,7 +2069,11 @@ var BeaconBuffer = class {
|
|
|
2055
2069
|
droppedSinceLast: reportedDropped,
|
|
2056
2070
|
queueDepth: this.queue.length,
|
|
2057
2071
|
adapter: dest.adapter ?? "edge-core",
|
|
2058
|
-
version: SDK_VERSION
|
|
2072
|
+
version: SDK_VERSION,
|
|
2073
|
+
containerId: this.opts.containerId,
|
|
2074
|
+
enqueuedTotal: this.enqueuedTotal,
|
|
2075
|
+
deliveredTotal: this.deliveredTotal,
|
|
2076
|
+
droppedTotal: this.droppedTotal
|
|
2059
2077
|
};
|
|
2060
2078
|
const controller = typeof AbortController !== "undefined" ? new AbortController() : void 0;
|
|
2061
2079
|
const response = await withBudget(
|