@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
|
@@ -763,7 +763,12 @@ async function complyImpl(agentUrl, options) {
|
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
765
|
if (!profileStep.passed) {
|
|
766
|
-
const authCheck = await detectAuthRejection(
|
|
766
|
+
const authCheck = await detectAuthRejection(
|
|
767
|
+
agentUrl,
|
|
768
|
+
profileStep.error,
|
|
769
|
+
signal,
|
|
770
|
+
effectiveOptions.transport?.fetchFn
|
|
771
|
+
);
|
|
767
772
|
if (authCheck.isAuth) {
|
|
768
773
|
const degraded = { name: profile.name || "Unknown (auth required)", tools: [] };
|
|
769
774
|
const candidate = explicitStoryboards?.length ? resolveExplicitStoryboards(explicitStoryboards, resolveOptions) : resolveFromCapabilities(degraded, resolveOptions).storyboards;
|
|
@@ -963,7 +968,7 @@ function buildComplyTimeoutBudgetObservation(timeout_ms, storyboardsExecuted, st
|
|
|
963
968
|
source: { kind: "profile", code: "timeout-budget-exceeded" }
|
|
964
969
|
};
|
|
965
970
|
}
|
|
966
|
-
async function detectAuthRejection(agentUrl, errorMsg, signal) {
|
|
971
|
+
async function detectAuthRejection(agentUrl, errorMsg, signal, fetchFn) {
|
|
967
972
|
const err = errorMsg || "Unknown error";
|
|
968
973
|
const observations = [];
|
|
969
974
|
const lower = err.toLowerCase();
|
|
@@ -973,7 +978,7 @@ async function detectAuthRejection(agentUrl, errorMsg, signal) {
|
|
|
973
978
|
if (!isAuth) {
|
|
974
979
|
try {
|
|
975
980
|
const probeSignal = signal ? AbortSignal.any([signal, AbortSignal.timeout(5e3)]) : AbortSignal.timeout(5e3);
|
|
976
|
-
const probe = await fetch(agentUrl, {
|
|
981
|
+
const probe = await (fetchFn ?? fetch)(agentUrl, {
|
|
977
982
|
method: "POST",
|
|
978
983
|
headers: { "Content-Type": "application/json" },
|
|
979
984
|
redirect: "manual",
|
|
@@ -985,7 +990,7 @@ async function detectAuthRejection(agentUrl, errorMsg, signal) {
|
|
|
985
990
|
}
|
|
986
991
|
if (isAuth) {
|
|
987
992
|
const { discoverOAuthMetadata } = await import("../../auth/oauth/discovery.mjs");
|
|
988
|
-
const oauthMeta = await discoverOAuthMetadata(agentUrl);
|
|
993
|
+
const oauthMeta = await discoverOAuthMetadata(agentUrl, { fetch: fetchFn });
|
|
989
994
|
const looksOAuth = oauthMeta !== null || hasOAuthSignal;
|
|
990
995
|
if (looksOAuth) {
|
|
991
996
|
const issuer = oauthMeta?.issuer ? fenceAgentText(oauthMeta.issuer, 200) : "(unknown)";
|
|
@@ -1098,8 +1103,13 @@ async function runWithDegradedProfile(agentUrl, profile, storyboards, options, e
|
|
|
1098
1103
|
notices: []
|
|
1099
1104
|
};
|
|
1100
1105
|
}
|
|
1101
|
-
async function buildUnreachableResult(agentUrl, profile, errorMsg, start,
|
|
1102
|
-
const { isAuth, observations } = await detectAuthRejection(
|
|
1106
|
+
async function buildUnreachableResult(agentUrl, profile, errorMsg, start, effectiveOptions, adcpVersion, signal) {
|
|
1107
|
+
const { isAuth, observations } = await detectAuthRejection(
|
|
1108
|
+
agentUrl,
|
|
1109
|
+
errorMsg,
|
|
1110
|
+
signal,
|
|
1111
|
+
effectiveOptions.transport?.fetchFn
|
|
1112
|
+
);
|
|
1103
1113
|
const err = errorMsg || "Unknown error";
|
|
1104
1114
|
const headline = isAuth ? `Authentication required` : `Agent unreachable \u2014 ${err}`;
|
|
1105
1115
|
return {
|