@slashfi/agents-sdk 0.30.1 → 0.31.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/call-agent-schema.d.ts +155 -0
- package/dist/call-agent-schema.d.ts.map +1 -1
- package/dist/call-agent-schema.js +13 -0
- package/dist/call-agent-schema.js.map +1 -1
- package/dist/cjs/call-agent-schema.js +14 -1
- package/dist/cjs/call-agent-schema.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.map +1 -1
- package/dist/cjs/registry.js +35 -0
- package/dist/cjs/registry.js.map +1 -1
- package/dist/cjs/server.js +26 -10
- package/dist/cjs/server.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/registry-consumer.d.ts +9 -0
- package/dist/registry-consumer.d.ts.map +1 -1
- package/dist/registry-consumer.js.map +1 -1
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +35 -0
- package/dist/registry.js.map +1 -1
- package/dist/server.d.ts +22 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +26 -10
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +53 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/call-agent-schema.ts +21 -0
- package/src/index.ts +6 -0
- package/src/registry-consumer.ts +9 -0
- package/src/registry.ts +39 -0
- package/src/server.ts +51 -10
- package/src/types.ts +59 -0
package/src/types.ts
CHANGED
|
@@ -259,6 +259,32 @@ export type SecurityScheme =
|
|
|
259
259
|
| HttpSecurityScheme
|
|
260
260
|
| NoneSecurityScheme;
|
|
261
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Lightweight security summary for agent listings.
|
|
264
|
+
* The full SecurityScheme has all the details; this is the
|
|
265
|
+
* directory-level overview (e.g., in list_agents responses).
|
|
266
|
+
*/
|
|
267
|
+
export interface SecuritySchemeSummary {
|
|
268
|
+
type: SecurityScheme['type'];
|
|
269
|
+
[key: string]: unknown;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* A static resource exposed by an agent.
|
|
274
|
+
* Well-known resources:
|
|
275
|
+
* - `AUTH.md` — LLM-readable auth/connection setup instructions
|
|
276
|
+
*/
|
|
277
|
+
export interface AgentResource {
|
|
278
|
+
/** Resource URI (e.g., 'AUTH.md') */
|
|
279
|
+
uri: string;
|
|
280
|
+
/** Human-readable name */
|
|
281
|
+
name?: string;
|
|
282
|
+
/** MIME type (defaults to text/markdown for .md) */
|
|
283
|
+
mimeType?: string;
|
|
284
|
+
/** The resource content (populated on read_resources, omitted on list) */
|
|
285
|
+
content?: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
262
288
|
// ============================================
|
|
263
289
|
// Agent Configuration
|
|
264
290
|
// ============================================
|
|
@@ -313,6 +339,13 @@ export interface AgentConfig {
|
|
|
313
339
|
*/
|
|
314
340
|
security?: SecurityScheme;
|
|
315
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Agent resources — static files/documents the agent exposes.
|
|
344
|
+
* Well-known resources:
|
|
345
|
+
* - `AUTH.md` — LLM-readable auth setup instructions
|
|
346
|
+
*/
|
|
347
|
+
resources?: AgentResource[];
|
|
348
|
+
|
|
316
349
|
/** Additional configuration */
|
|
317
350
|
/** Agent refs (paths to other agents this agent can call) */
|
|
318
351
|
refs?: Record<string, { description?: string }>;
|
|
@@ -747,6 +780,30 @@ export interface CallAgentCallbackResponse {
|
|
|
747
780
|
callbackId: string;
|
|
748
781
|
}
|
|
749
782
|
|
|
783
|
+
/** List resources response */
|
|
784
|
+
export interface CallAgentListResourcesResponse {
|
|
785
|
+
success: true;
|
|
786
|
+
agentPath: string;
|
|
787
|
+
resources: Array<{
|
|
788
|
+
uri: string;
|
|
789
|
+
name?: string;
|
|
790
|
+
mimeType?: string;
|
|
791
|
+
}>;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/** Read resources response */
|
|
795
|
+
export interface CallAgentReadResourcesResponse {
|
|
796
|
+
success: true;
|
|
797
|
+
agentPath: string;
|
|
798
|
+
resources: Array<{
|
|
799
|
+
uri: string;
|
|
800
|
+
name?: string;
|
|
801
|
+
mimeType?: string;
|
|
802
|
+
content?: string;
|
|
803
|
+
error?: string;
|
|
804
|
+
}>;
|
|
805
|
+
}
|
|
806
|
+
|
|
750
807
|
/** Error response */
|
|
751
808
|
export interface CallAgentErrorResponse {
|
|
752
809
|
success: false;
|
|
@@ -762,4 +819,6 @@ export type CallAgentResponse =
|
|
|
762
819
|
| CallAgentDescribeToolsResponse
|
|
763
820
|
| CallAgentLoadResponse
|
|
764
821
|
| CallAgentCallbackResponse
|
|
822
|
+
| CallAgentListResourcesResponse
|
|
823
|
+
| CallAgentReadResourcesResponse
|
|
765
824
|
| CallAgentErrorResponse;
|