@slashfi/agents-sdk 0.40.0 → 0.41.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/adk-tools.d.ts +31 -0
- package/dist/adk-tools.d.ts.map +1 -0
- package/dist/adk-tools.js +140 -0
- package/dist/adk-tools.js.map +1 -0
- package/dist/adk.js +75 -4
- package/dist/adk.js.map +1 -1
- package/dist/call-agent-schema.d.ts +96 -96
- package/dist/cjs/adk-tools.js +143 -0
- package/dist/cjs/adk-tools.js.map +1 -0
- package/dist/cjs/config-store.js +124 -45
- package/dist/cjs/config-store.js.map +1 -1
- package/dist/cjs/define-config.js.map +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/registry-consumer.js +1 -0
- package/dist/cjs/registry-consumer.js.map +1 -1
- package/dist/cjs/registry.js +3 -0
- package/dist/cjs/registry.js.map +1 -1
- package/dist/config-store.d.ts +46 -7
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +124 -45
- package/dist/config-store.js.map +1 -1
- package/dist/define-config.d.ts +17 -0
- package/dist/define-config.d.ts.map +1 -1
- package/dist/define-config.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/registry-consumer.d.ts +2 -0
- package/dist/registry-consumer.d.ts.map +1 -1
- package/dist/registry-consumer.js +1 -0
- package/dist/registry-consumer.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +3 -0
- package/dist/registry.js.map +1 -1
- package/package.json +1 -1
- package/src/adk-tools.ts +156 -0
- package/src/adk.ts +73 -2
- package/src/config-store.ts +191 -54
- package/src/define-config.ts +23 -0
- package/src/index.ts +7 -0
- package/src/registry-consumer.ts +4 -0
- package/src/registry.ts +3 -0
package/src/index.ts
CHANGED
|
@@ -292,6 +292,7 @@ export {
|
|
|
292
292
|
export type {
|
|
293
293
|
RegistryAuth,
|
|
294
294
|
RegistryEntry,
|
|
295
|
+
ProxyEntry,
|
|
295
296
|
RefConfig,
|
|
296
297
|
RefEntry,
|
|
297
298
|
ConsumerConfig,
|
|
@@ -453,11 +454,17 @@ export { createAdk } from "./config-store.js";
|
|
|
453
454
|
export type {
|
|
454
455
|
Adk,
|
|
455
456
|
AdkOptions,
|
|
457
|
+
AdkProxyApi,
|
|
456
458
|
AdkRegistryApi,
|
|
457
459
|
AdkRefApi,
|
|
458
460
|
RefAuthStatus,
|
|
461
|
+
CredentialField,
|
|
459
462
|
AuthStartResult,
|
|
460
463
|
OAuthResult,
|
|
464
|
+
ResolveCredentials,
|
|
465
|
+
ResolveCredentialsContext,
|
|
461
466
|
RegistryTestResult,
|
|
462
467
|
} from "./config-store.js";
|
|
463
468
|
export { createLocalFsStore, getLocalEncryptionKey } from "./local-fs.js";
|
|
469
|
+
export { createAdkTools } from "./adk-tools.js";
|
|
470
|
+
export type { CreateAdkToolsOptions } from "./adk-tools.js";
|
package/src/registry-consumer.ts
CHANGED
|
@@ -224,6 +224,8 @@ export interface AgentListing {
|
|
|
224
224
|
}>;
|
|
225
225
|
/** Context hint from describe_tools (e.g., "Use full: true for complete schemas") */
|
|
226
226
|
context?: string;
|
|
227
|
+
/** Upstream MCP/API URL for direct connections */
|
|
228
|
+
upstream?: string;
|
|
227
229
|
/** Integration config if applicable */
|
|
228
230
|
integration?: {
|
|
229
231
|
provider: string;
|
|
@@ -928,6 +930,7 @@ export async function createRegistryConsumer(
|
|
|
928
930
|
security?: SecuritySchemeSummary;
|
|
929
931
|
resources?: Array<{ uri: string; name?: string; mimeType?: string }>;
|
|
930
932
|
context?: string;
|
|
933
|
+
upstream?: string;
|
|
931
934
|
} | null;
|
|
932
935
|
if (!data) return null;
|
|
933
936
|
return {
|
|
@@ -939,6 +942,7 @@ export async function createRegistryConsumer(
|
|
|
939
942
|
security: data.security,
|
|
940
943
|
resources: data.resources,
|
|
941
944
|
context: data.context,
|
|
945
|
+
...(data.upstream && { upstream: data.upstream }),
|
|
942
946
|
} as AgentListing;
|
|
943
947
|
}),
|
|
944
948
|
);
|
package/src/registry.ts
CHANGED
|
@@ -789,6 +789,7 @@ export function createAgentRegistry(
|
|
|
789
789
|
}
|
|
790
790
|
|
|
791
791
|
case "describe_tools": {
|
|
792
|
+
const configUpstream = (agent.config as Record<string, unknown> | undefined)?.upstream as string | undefined;
|
|
792
793
|
const toolSchemas: ToolSchema[] = agent.tools
|
|
793
794
|
.filter((t: ToolDefinition) =>
|
|
794
795
|
checkToolAccess(
|
|
@@ -817,6 +818,7 @@ export function createAgentRegistry(
|
|
|
817
818
|
tools: toolSchemas,
|
|
818
819
|
description: agent.config?.description,
|
|
819
820
|
security: agent.config?.security,
|
|
821
|
+
...(configUpstream ? { upstream: configUpstream } : {}),
|
|
820
822
|
resources: agent.config?.resources?.map((r) => ({
|
|
821
823
|
uri: r.uri,
|
|
822
824
|
name: r.name,
|
|
@@ -843,6 +845,7 @@ export function createAgentRegistry(
|
|
|
843
845
|
toolSummaries,
|
|
844
846
|
description: agent.config?.description,
|
|
845
847
|
security: agent.config?.security,
|
|
848
|
+
...(configUpstream ? { upstream: configUpstream } : {}),
|
|
846
849
|
resources: agent.config?.resources?.map((r) => ({
|
|
847
850
|
uri: r.uri,
|
|
848
851
|
name: r.name,
|