@adcp/sdk 12.1.0 → 12.1.1
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/auth/oauth/authorization-required.d.mts +3 -0
- package/dist/lib/auth/oauth/authorization-required.d.ts +3 -0
- package/dist/lib/auth/oauth/authorization-required.d.ts.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.js +12 -9
- package/dist/lib/auth/oauth/authorization-required.js.map +1 -1
- package/dist/lib/auth/oauth/authorization-required.mjs +12 -9
- package/dist/lib/auth/oauth/authorization-required.mjs.map +1 -1
- package/dist/lib/core/AgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.d.mts +2 -2
- package/dist/lib/core/SingleAgentClient.d.ts +2 -2
- package/dist/lib/core/SingleAgentClient.d.ts.map +1 -1
- package/dist/lib/core/SingleAgentClient.js +145 -55
- package/dist/lib/core/SingleAgentClient.js.map +1 -1
- package/dist/lib/core/SingleAgentClient.mjs +145 -55
- package/dist/lib/core/SingleAgentClient.mjs.map +1 -1
- package/dist/lib/core/TaskExecutor.js +1 -1
- package/dist/lib/core/TaskExecutor.js.map +1 -1
- package/dist/lib/core/TaskExecutor.mjs +1 -1
- package/dist/lib/core/TaskExecutor.mjs.map +1 -1
- package/dist/lib/net/ssrf-fetch.d.mts +13 -1
- package/dist/lib/net/ssrf-fetch.d.ts +13 -1
- package/dist/lib/net/ssrf-fetch.d.ts.map +1 -1
- package/dist/lib/net/ssrf-fetch.js +14 -7
- package/dist/lib/net/ssrf-fetch.js.map +1 -1
- package/dist/lib/net/ssrf-fetch.mjs +14 -7
- package/dist/lib/net/ssrf-fetch.mjs.map +1 -1
- package/dist/lib/protocols/a2a.d.mts +2 -2
- package/dist/lib/protocols/a2a.d.ts +2 -2
- package/dist/lib/protocols/a2a.d.ts.map +1 -1
- package/dist/lib/protocols/a2a.js +14 -9
- package/dist/lib/protocols/a2a.js.map +1 -1
- package/dist/lib/protocols/a2a.mjs +14 -9
- package/dist/lib/protocols/a2a.mjs.map +1 -1
- package/dist/lib/protocols/index.d.mts +20 -3
- package/dist/lib/protocols/index.d.ts +20 -3
- package/dist/lib/protocols/index.d.ts.map +1 -1
- package/dist/lib/protocols/index.js +40 -18
- package/dist/lib/protocols/index.js.map +1 -1
- package/dist/lib/protocols/index.mjs +40 -18
- package/dist/lib/protocols/index.mjs.map +1 -1
- package/dist/lib/protocols/mcp-tasks.d.mts +3 -0
- package/dist/lib/protocols/mcp-tasks.d.ts +3 -0
- package/dist/lib/protocols/mcp-tasks.d.ts.map +1 -1
- package/dist/lib/protocols/mcp-tasks.js +21 -11
- package/dist/lib/protocols/mcp-tasks.js.map +1 -1
- package/dist/lib/protocols/mcp-tasks.mjs +21 -11
- package/dist/lib/protocols/mcp-tasks.mjs.map +1 -1
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/testing/client.d.ts.map +1 -1
- package/dist/lib/testing/client.js +12 -4
- package/dist/lib/testing/client.js.map +1 -1
- package/dist/lib/testing/client.mjs +12 -4
- package/dist/lib/testing/client.mjs.map +1 -1
- package/dist/lib/testing/compliance/comply.d.mts +1 -1
- package/dist/lib/testing/compliance/comply.d.ts +1 -1
- package/dist/lib/testing/compliance/comply.d.ts.map +1 -1
- package/dist/lib/testing/compliance/comply.js +16 -6
- package/dist/lib/testing/compliance/comply.js.map +1 -1
- package/dist/lib/testing/compliance/comply.mjs +16 -6
- package/dist/lib/testing/compliance/comply.mjs.map +1 -1
- package/dist/lib/testing/storyboard/probes.d.mts +6 -0
- package/dist/lib/testing/storyboard/probes.d.ts +6 -0
- package/dist/lib/testing/storyboard/probes.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/probes.js +16 -5
- package/dist/lib/testing/storyboard/probes.js.map +1 -1
- package/dist/lib/testing/storyboard/probes.mjs +16 -5
- package/dist/lib/testing/storyboard/probes.mjs.map +1 -1
- package/dist/lib/testing/storyboard/runner.d.ts.map +1 -1
- package/dist/lib/testing/storyboard/runner.js +6 -2
- package/dist/lib/testing/storyboard/runner.js.map +1 -1
- package/dist/lib/testing/storyboard/runner.mjs +6 -2
- package/dist/lib/testing/storyboard/runner.mjs.map +1 -1
- package/dist/lib/testing/types.d.mts +7 -1
- package/dist/lib/testing/types.d.ts +7 -1
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/testing/types.js.map +1 -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.js.map +1 -1
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/version.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -796,7 +796,12 @@ async function complyImpl(agentUrl, options) {
|
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
798
|
if (!profileStep.passed) {
|
|
799
|
-
const authCheck = await detectAuthRejection(
|
|
799
|
+
const authCheck = await detectAuthRejection(
|
|
800
|
+
agentUrl,
|
|
801
|
+
profileStep.error,
|
|
802
|
+
signal,
|
|
803
|
+
effectiveOptions.transport?.fetchFn
|
|
804
|
+
);
|
|
800
805
|
if (authCheck.isAuth) {
|
|
801
806
|
const degraded = { name: profile.name || "Unknown (auth required)", tools: [] };
|
|
802
807
|
const candidate = explicitStoryboards?.length ? resolveExplicitStoryboards(explicitStoryboards, resolveOptions) : resolveFromCapabilities(degraded, resolveOptions).storyboards;
|
|
@@ -996,7 +1001,7 @@ function buildComplyTimeoutBudgetObservation(timeout_ms, storyboardsExecuted, st
|
|
|
996
1001
|
source: { kind: "profile", code: "timeout-budget-exceeded" }
|
|
997
1002
|
};
|
|
998
1003
|
}
|
|
999
|
-
async function detectAuthRejection(agentUrl, errorMsg, signal) {
|
|
1004
|
+
async function detectAuthRejection(agentUrl, errorMsg, signal, fetchFn) {
|
|
1000
1005
|
const err = errorMsg || "Unknown error";
|
|
1001
1006
|
const observations = [];
|
|
1002
1007
|
const lower = err.toLowerCase();
|
|
@@ -1006,7 +1011,7 @@ async function detectAuthRejection(agentUrl, errorMsg, signal) {
|
|
|
1006
1011
|
if (!isAuth) {
|
|
1007
1012
|
try {
|
|
1008
1013
|
const probeSignal = signal ? AbortSignal.any([signal, AbortSignal.timeout(5e3)]) : AbortSignal.timeout(5e3);
|
|
1009
|
-
const probe = await fetch(agentUrl, {
|
|
1014
|
+
const probe = await (fetchFn ?? fetch)(agentUrl, {
|
|
1010
1015
|
method: "POST",
|
|
1011
1016
|
headers: { "Content-Type": "application/json" },
|
|
1012
1017
|
redirect: "manual",
|
|
@@ -1018,7 +1023,7 @@ async function detectAuthRejection(agentUrl, errorMsg, signal) {
|
|
|
1018
1023
|
}
|
|
1019
1024
|
if (isAuth) {
|
|
1020
1025
|
const { discoverOAuthMetadata } = await import("../../auth/oauth/discovery.js");
|
|
1021
|
-
const oauthMeta = await discoverOAuthMetadata(agentUrl);
|
|
1026
|
+
const oauthMeta = await discoverOAuthMetadata(agentUrl, { fetch: fetchFn });
|
|
1022
1027
|
const looksOAuth = oauthMeta !== null || hasOAuthSignal;
|
|
1023
1028
|
if (looksOAuth) {
|
|
1024
1029
|
const issuer = oauthMeta?.issuer ? fenceAgentText(oauthMeta.issuer, 200) : "(unknown)";
|
|
@@ -1131,8 +1136,13 @@ async function runWithDegradedProfile(agentUrl, profile, storyboards, options, e
|
|
|
1131
1136
|
notices: []
|
|
1132
1137
|
};
|
|
1133
1138
|
}
|
|
1134
|
-
async function buildUnreachableResult(agentUrl, profile, errorMsg, start,
|
|
1135
|
-
const { isAuth, observations } = await detectAuthRejection(
|
|
1139
|
+
async function buildUnreachableResult(agentUrl, profile, errorMsg, start, effectiveOptions, adcpVersion, signal) {
|
|
1140
|
+
const { isAuth, observations } = await detectAuthRejection(
|
|
1141
|
+
agentUrl,
|
|
1142
|
+
errorMsg,
|
|
1143
|
+
signal,
|
|
1144
|
+
effectiveOptions.transport?.fetchFn
|
|
1145
|
+
);
|
|
1136
1146
|
const err = errorMsg || "Unknown error";
|
|
1137
1147
|
const headline = isAuth ? `Authentication required` : `Agent unreachable \u2014 ${err}`;
|
|
1138
1148
|
return {
|