@sekuire/sdk 0.1.9 → 0.1.11

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.
Files changed (49) hide show
  1. package/README.md +69 -5
  2. package/dist/a2a-client.d.ts +95 -0
  3. package/dist/a2a-delegator.d.ts +58 -0
  4. package/dist/a2a-server.d.ts +84 -0
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/beacon.d.ts +100 -0
  7. package/dist/compliance.d.ts +3 -3
  8. package/dist/config/loader.d.ts +38 -1
  9. package/dist/crypto.d.ts +0 -3
  10. package/dist/http/base-client.d.ts +25 -0
  11. package/dist/http/index.d.ts +2 -0
  12. package/dist/identity.d.ts +11 -2
  13. package/dist/index.d.ts +1315 -175
  14. package/dist/index.esm.js +16151 -5209
  15. package/dist/index.js +16178 -5207
  16. package/dist/llm/anthropic.d.ts +4 -12
  17. package/dist/llm/base-provider.d.ts +13 -0
  18. package/dist/llm/google.d.ts +4 -12
  19. package/dist/llm/index.d.ts +0 -12
  20. package/dist/llm/ollama.d.ts +4 -11
  21. package/dist/llm/openai.d.ts +4 -12
  22. package/dist/llm/types.d.ts +19 -12
  23. package/dist/logger.d.ts +4 -0
  24. package/dist/memory/base.d.ts +7 -0
  25. package/dist/memory/cloudflare-d1.d.ts +24 -0
  26. package/dist/memory/cloudflare-kv.d.ts +25 -0
  27. package/dist/memory/convex.d.ts +21 -0
  28. package/dist/memory/dynamodb.d.ts +28 -0
  29. package/dist/memory/in-memory.d.ts +1 -0
  30. package/dist/memory/index.d.ts +28 -1
  31. package/dist/memory/postgres.d.ts +5 -1
  32. package/dist/memory/redis.d.ts +5 -1
  33. package/dist/memory/registry.d.ts +12 -0
  34. package/dist/memory/sqlite.d.ts +22 -0
  35. package/dist/memory/turso.d.ts +23 -0
  36. package/dist/memory/upstash.d.ts +22 -0
  37. package/dist/new-agent.d.ts +2 -2
  38. package/dist/platform-url.d.ts +1 -0
  39. package/dist/registry-client.d.ts +171 -0
  40. package/dist/sdk.d.ts +117 -0
  41. package/dist/telemetry/exporter.d.ts +21 -0
  42. package/dist/telemetry/index.d.ts +22 -0
  43. package/dist/tools/agent-invocation.d.ts +16 -68
  44. package/dist/tools/remote.d.ts +1 -1
  45. package/dist/types/a2a-types.d.ts +194 -0
  46. package/dist/types.d.ts +1 -0
  47. package/dist/utils.d.ts +0 -4
  48. package/dist/worker.d.ts +104 -0
  49. package/package.json +40 -2
@@ -0,0 +1,171 @@
1
+ import { type AgentResponse, type Manifest, type ReputationResponse, type VerificationStatus } from "./types";
2
+ export interface RegistryClientConfig {
3
+ apiUrl: string;
4
+ apiKey?: string;
5
+ timeout?: number;
6
+ retries?: number;
7
+ }
8
+ export interface PublishAgentOptions {
9
+ manifest: Manifest;
10
+ privateKeyHex: string;
11
+ systemPrompt: string;
12
+ tools: string;
13
+ publisherOrgId?: string;
14
+ visibility?: "public" | "private" | "internal";
15
+ }
16
+ export interface UpdateAgentOptions {
17
+ manifest?: Partial<Manifest>;
18
+ visibility?: "public" | "private" | "internal";
19
+ gitRepository?: string;
20
+ }
21
+ export interface SearchAgentsOptions {
22
+ query?: string;
23
+ tags?: string[];
24
+ verificationStatus?: VerificationStatus;
25
+ category?: string;
26
+ limit?: number;
27
+ offset?: number;
28
+ }
29
+ export interface TaskCompletion {
30
+ taskId: string;
31
+ taskHash: string;
32
+ rating: number;
33
+ comment?: string;
34
+ evidence?: string;
35
+ }
36
+ export interface LeaderboardEntry {
37
+ sekuireId: string;
38
+ name: string;
39
+ reputationScore: number;
40
+ taskCount: number;
41
+ verificationStatus: VerificationStatus;
42
+ rank: number;
43
+ }
44
+ export interface PublishResponse {
45
+ sekuireId: string;
46
+ name: string;
47
+ version: string;
48
+ verificationStatus: VerificationStatus;
49
+ createdAt: string;
50
+ }
51
+ export interface DisputeResponse {
52
+ id: string;
53
+ sekuireId: string;
54
+ status: "pending" | "reviewing" | "resolved" | "rejected";
55
+ createdAt: string;
56
+ }
57
+ export interface VerificationRequest {
58
+ sekuireId: string;
59
+ repositoryUrl?: string;
60
+ commitHash?: string;
61
+ complianceFramework?: string;
62
+ }
63
+ export interface VerificationResult {
64
+ passed: boolean;
65
+ securityScore: number;
66
+ complianceScore: number;
67
+ issues: VerificationIssue[];
68
+ timestamp: string;
69
+ }
70
+ export interface VerificationIssue {
71
+ severity: "critical" | "high" | "medium" | "low";
72
+ category: string;
73
+ message: string;
74
+ file?: string;
75
+ line?: number;
76
+ }
77
+ export interface TrustHeadersRequest {
78
+ agentId: string;
79
+ action?: string;
80
+ context?: Record<string, unknown>;
81
+ }
82
+ export interface TrustHeaders {
83
+ "X-Sekuire-Agent-ID": string;
84
+ "X-Sekuire-Reputation": string;
85
+ "X-Sekuire-Verification": string;
86
+ "X-Sekuire-Badges": string;
87
+ "X-Sekuire-Timestamp": string;
88
+ "X-Sekuire-Signature": string;
89
+ }
90
+ export declare class SekuireRegistryClient {
91
+ private readonly http;
92
+ constructor(config: RegistryClientConfig | string, authToken?: string);
93
+ setAuthToken(token: string): void;
94
+ setApiKey(apiKey: string): void;
95
+ publishAgent(options: PublishAgentOptions): Promise<PublishResponse>;
96
+ getAgent(sekuireId: string): Promise<AgentResponse>;
97
+ updateAgent(sekuireId: string, options: UpdateAgentOptions): Promise<AgentResponse>;
98
+ deleteAgent(sekuireId: string): Promise<void>;
99
+ listAgents(options?: SearchAgentsOptions): Promise<AgentResponse[]>;
100
+ searchAgents(query: string, options?: Omit<SearchAgentsOptions, "query">): Promise<AgentResponse[]>;
101
+ getMyAgents(): Promise<AgentResponse[]>;
102
+ getReputation(sekuireId: string): Promise<ReputationResponse>;
103
+ recordTaskCompletion(sekuireId: string, task: TaskCompletion, privateKeyHex: string): Promise<void>;
104
+ getLeaderboard(limit?: number): Promise<LeaderboardEntry[]>;
105
+ fileDispute(sekuireId: string, reason: string, evidenceLog: string, accuserId: string): Promise<DisputeResponse>;
106
+ verifyAgentQuick(sekuireId: string): Promise<VerificationResult>;
107
+ verifyAgentComprehensive(request: VerificationRequest): Promise<VerificationResult>;
108
+ getVerificationHistory(sekuireId: string): Promise<VerificationResult[]>;
109
+ getLatestVerification(sekuireId: string): Promise<VerificationResult | null>;
110
+ generateTrustHeaders(request: TrustHeadersRequest): Promise<TrustHeaders>;
111
+ getTrustProfile(agentDid: string): Promise<Record<string, unknown>>;
112
+ getTransactionHistory(agentDid: string): Promise<unknown[]>;
113
+ createTask(task: {
114
+ description: string;
115
+ capabilities: string[];
116
+ priority?: number;
117
+ callbackUrl?: string;
118
+ }): Promise<{
119
+ taskId: string;
120
+ status: string;
121
+ }>;
122
+ getTask(taskId: string): Promise<{
123
+ taskId: string;
124
+ status: string;
125
+ result?: unknown;
126
+ error?: string;
127
+ }>;
128
+ completeTask(taskId: string, result: unknown, privateKeyHex: string): Promise<void>;
129
+ getRegistryStats(): Promise<{
130
+ totalAgents: number;
131
+ verifiedAgents: number;
132
+ totalTasks: number;
133
+ categories: string[];
134
+ }>;
135
+ getCategories(): Promise<Array<{
136
+ slug: string;
137
+ name: string;
138
+ agentCount: number;
139
+ }>>;
140
+ getAgentsByCategory(categorySlug: string): Promise<AgentResponse[]>;
141
+ getWorkspace(workspaceId: string): Promise<Record<string, unknown>>;
142
+ getWorkspacePolicies(workspaceId: string): Promise<unknown[]>;
143
+ getActivePolicy(workspaceId: string): Promise<unknown>;
144
+ getPolicyTemplates(): Promise<unknown[]>;
145
+ evaluatePolicy(workspaceId: string, action: {
146
+ type: string;
147
+ resource: string;
148
+ context?: Record<string, unknown>;
149
+ }): Promise<{
150
+ allowed: boolean;
151
+ violations: string[];
152
+ }>;
153
+ logAgentEvents(sekuireId: string, events: Array<{
154
+ type: string;
155
+ severity: string;
156
+ data: Record<string, unknown>;
157
+ timestamp?: string;
158
+ }>): Promise<void>;
159
+ logAgentHealth(sekuireId: string, health: {
160
+ status: "healthy" | "degraded" | "unhealthy";
161
+ uptime: number;
162
+ memoryMb?: number;
163
+ cpuPercent?: number;
164
+ }): Promise<void>;
165
+ getAgentLogs(sekuireId: string, options?: {
166
+ limit?: number;
167
+ offset?: number;
168
+ type?: string;
169
+ }): Promise<unknown[]>;
170
+ }
171
+ export declare function createRegistryClient(apiUrl: string, authToken?: string, apiKey?: string): SekuireRegistryClient;
package/dist/sdk.d.ts ADDED
@@ -0,0 +1,117 @@
1
+ /**
2
+ * SekuireSDK - Main SDK entry point for TypeScript agents
3
+ *
4
+ * Combines identity, logging, and heartbeat functionality with a simple API.
5
+ */
6
+ import { type BeaconStatus } from "./beacon";
7
+ import { AgentIdentity } from "./identity";
8
+ import { SekuireLogger, type EventType, type Severity } from "./logger";
9
+ export declare const DEFAULT_API_URL = "https://api.sekuire.ai";
10
+ export interface SekuireSDKConfig {
11
+ privateKey?: string;
12
+ agentId: string;
13
+ agentName?: string;
14
+ apiUrl?: string;
15
+ apiKey?: string;
16
+ /** Install token from dashboard (preferred for BYOC deployments) */
17
+ installToken?: string;
18
+ workspaceId?: string;
19
+ environment?: string;
20
+ autoHeartbeat?: boolean;
21
+ /** Heartbeat interval in seconds (default: 60) */
22
+ heartbeatIntervalSeconds?: number;
23
+ loggingEnabled?: boolean;
24
+ /** Capabilities this agent provides */
25
+ capabilities?: string[];
26
+ }
27
+ export declare class SekuireSDK {
28
+ private config;
29
+ private identity;
30
+ private logger;
31
+ private client;
32
+ private beacon;
33
+ private isRunning;
34
+ constructor(config: SekuireSDKConfig);
35
+ /**
36
+ * Create SDK instance from environment variables.
37
+ *
38
+ * Required env vars:
39
+ * SEKUIRE_AGENT_ID - The agent's sekuire_id
40
+ * SEKUIRE_INSTALL_TOKEN - Install token from dashboard (required for heartbeat)
41
+ *
42
+ * Optional env vars:
43
+ * SEKUIRE_API_KEY - API key for authentication (X-API-Key header)
44
+ * SEKUIRE_PRIVATE_KEY - Private key for signing
45
+ * SEKUIRE_AGENT_NAME - Human-readable agent name
46
+ * SEKUIRE_API_URL - API base URL (default: https://api.sekuire.ai)
47
+ * SEKUIRE_WORKSPACE_ID - Workspace ID for policy enforcement
48
+ * SEKUIRE_ENVIRONMENT - Environment name (default: production)
49
+ */
50
+ static fromEnv(options?: {
51
+ autoHeartbeat?: boolean;
52
+ loggingEnabled?: boolean;
53
+ }): SekuireSDK;
54
+ /**
55
+ * Start the SDK.
56
+ *
57
+ * - Bootstraps with Sekuire using the install token
58
+ * - Starts auto-heartbeat loop if enabled
59
+ *
60
+ * Requires SEKUIRE_INSTALL_TOKEN to be set (from dashboard or CLI).
61
+ */
62
+ start(): Promise<void>;
63
+ /**
64
+ * Check if the beacon is connected and sending heartbeats.
65
+ *
66
+ * @returns True if the beacon has successfully bootstrapped
67
+ */
68
+ isConnected(): boolean;
69
+ /**
70
+ * Log an event to Sekuire.
71
+ *
72
+ * @param eventType Type of event (tool_execution, model_call, policy_check, etc.)
73
+ * @param data Event-specific data
74
+ * @param severity Severity level (debug, info, warn, error)
75
+ */
76
+ log(eventType: EventType, data: Record<string, unknown>, severity?: Severity): void;
77
+ /**
78
+ * Check if an action is allowed by the workspace policy.
79
+ *
80
+ * @param action The action to check (e.g., "read_file", "network_access")
81
+ * @param context Context for the action (e.g., {path: "/etc/passwd"})
82
+ * @returns True if allowed, False if denied
83
+ */
84
+ checkPolicy(action: string, context: Record<string, unknown>): Promise<boolean>;
85
+ /**
86
+ * Shutdown the SDK gracefully.
87
+ */
88
+ shutdown(): Promise<void>;
89
+ /**
90
+ * Get the current beacon status (heartbeat health, connection info).
91
+ */
92
+ getBeaconStatus(): BeaconStatus;
93
+ /**
94
+ * Get the agent ID.
95
+ */
96
+ get agentId(): string;
97
+ /**
98
+ * Get the agent's public key.
99
+ */
100
+ get publicKey(): string | undefined;
101
+ /**
102
+ * Sign a message with the agent's private key.
103
+ */
104
+ sign(message: string): Promise<string>;
105
+ /**
106
+ * Verify a signature using the agent's public key.
107
+ */
108
+ verify(message: string, signature: string): boolean;
109
+ /**
110
+ * Get the underlying identity object.
111
+ */
112
+ getIdentity(): AgentIdentity;
113
+ /**
114
+ * Get the underlying logger object.
115
+ */
116
+ getLogger(): SekuireLogger;
117
+ }
@@ -0,0 +1,21 @@
1
+ import { ExportResult } from '@opentelemetry/core';
2
+ import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-base';
3
+ export interface SekuireExporterConfig {
4
+ apiUrl: string;
5
+ agentId: string;
6
+ authToken?: string;
7
+ workspaceId?: string;
8
+ }
9
+ export declare class SekuireSpanExporter implements SpanExporter {
10
+ private config;
11
+ private pendingExport;
12
+ constructor(config: SekuireExporterConfig);
13
+ export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
14
+ private spanToEvent;
15
+ private mapSpanToEventType;
16
+ private getDurationMs;
17
+ private extractAttributes;
18
+ private sendEvents;
19
+ shutdown(): Promise<void>;
20
+ forceFlush(): Promise<void>;
21
+ }
@@ -0,0 +1,22 @@
1
+ import { Tracer } from '@opentelemetry/api';
2
+ export type ExporterType = 'otlp' | 'sekuire' | 'console' | 'none';
3
+ export interface TelemetryConfig {
4
+ enabled?: boolean;
5
+ agentId: string;
6
+ exporter?: ExporterType;
7
+ otlpEndpoint?: string;
8
+ sekuireApiUrl?: string;
9
+ authToken?: string;
10
+ workspaceId?: string;
11
+ debug?: boolean;
12
+ batchConfig?: {
13
+ maxQueueSize?: number;
14
+ maxExportBatchSize?: number;
15
+ scheduledDelayMillis?: number;
16
+ };
17
+ }
18
+ export declare function initTelemetry(config: TelemetryConfig): Tracer;
19
+ export declare function getTracer(): Tracer;
20
+ export declare function withSpan<T>(name: string, fn: (span: any) => T): T;
21
+ export declare function shutdownTelemetry(): Promise<void>;
22
+ export { SekuireSpanExporter, type SekuireExporterConfig } from './exporter';
@@ -1,90 +1,38 @@
1
- import type { Tool, ToolMetadata } from './base';
1
+ import { Tool, ToolInput, ToolMetadata } from './base';
2
2
  /**
3
3
  * Tool for invoking other Sekuire agents
4
4
  * Performs handshake and sends requests to verified agents
5
5
  */
6
- export declare class InvokeAgentTool implements Tool {
6
+ export declare class InvokeAgentTool extends Tool {
7
+ metadata: ToolMetadata;
8
+ private client;
7
9
  private readonly privateKey?;
8
10
  private readonly publicKey?;
9
11
  private readonly registryUrl;
10
- name: string;
11
- description: string;
12
- parameters: {
13
- type: "object";
14
- properties: {
15
- agent_url: {
16
- type: "string";
17
- description: string;
18
- };
19
- agent_id: {
20
- type: "string";
21
- description: string;
22
- };
23
- request: {
24
- type: "string";
25
- description: string;
26
- };
27
- parameters: {
28
- type: "object";
29
- description: string;
30
- };
31
- };
32
- required: string[];
33
- };
34
- metadata: ToolMetadata;
35
- private client;
36
- constructor(privateKey?: string | undefined, publicKey?: string | undefined, registryUrl?: string);
37
- execute(args: Record<string, any>): Promise<string>;
12
+ constructor(privateKey?: string, publicKey?: string, registryUrl?: string);
13
+ execute(input: ToolInput): Promise<string>;
38
14
  }
39
15
  /**
40
16
  * Tool for searching the Sekuire registry for agents
41
17
  */
42
- export declare class SearchAgentsTool implements Tool {
18
+ export declare class SearchAgentsTool extends Tool {
19
+ metadata: ToolMetadata;
20
+ private client;
43
21
  private readonly privateKey?;
44
22
  private readonly publicKey?;
45
23
  private readonly registryUrl;
46
- name: string;
47
- description: string;
48
- parameters: {
49
- type: "object";
50
- properties: {
51
- query: {
52
- type: "string";
53
- description: string;
54
- };
55
- limit: {
56
- type: "number";
57
- description: string;
58
- };
59
- };
60
- required: string[];
61
- };
62
- metadata: ToolMetadata;
63
- private client;
64
- constructor(privateKey?: string | undefined, publicKey?: string | undefined, registryUrl?: string);
65
- execute(args: Record<string, any>): Promise<string>;
24
+ constructor(privateKey?: string, publicKey?: string, registryUrl?: string);
25
+ execute(input: ToolInput): Promise<string>;
66
26
  }
67
27
  /**
68
28
  * Tool for getting detailed information about a specific agent
69
29
  */
70
- export declare class GetAgentInfoTool implements Tool {
30
+ export declare class GetAgentInfoTool extends Tool {
31
+ metadata: ToolMetadata;
32
+ private client;
71
33
  private readonly privateKey?;
72
34
  private readonly publicKey?;
73
35
  private readonly registryUrl;
74
- name: string;
75
- description: string;
76
- parameters: {
77
- type: "object";
78
- properties: {
79
- agent_id: {
80
- type: "string";
81
- description: string;
82
- };
83
- };
84
- required: string[];
85
- };
86
- metadata: ToolMetadata;
87
- private client;
88
- constructor(privateKey?: string | undefined, publicKey?: string | undefined, registryUrl?: string);
89
- execute(args: Record<string, any>): Promise<string>;
36
+ constructor(privateKey?: string, publicKey?: string, registryUrl?: string);
37
+ execute(input: ToolInput): Promise<string>;
90
38
  }
@@ -1,5 +1,5 @@
1
- import type { SekuireClient } from '../client';
2
1
  import type { ToolDefinition } from '../agent';
2
+ import type { SekuireClient } from '../client';
3
3
  /**
4
4
  * Create a tool for discovering other agents in the Sekuire network
5
5
  */
@@ -0,0 +1,194 @@
1
+ /**
2
+ * A2A Protocol Type Definitions
3
+ *
4
+ * Types implementing the A2A Protocol specification for agent interoperability.
5
+ * See: https://github.com/a2aproject/A2A
6
+ */
7
+ /** Full A2A-compliant Agent Card */
8
+ export interface AgentCard {
9
+ /** Unique agent identifier (e.g., "sekuire:workspace:agent-name") */
10
+ agentId: string;
11
+ /** Human-readable agent name */
12
+ name: string;
13
+ /** Agent description */
14
+ description: string;
15
+ /** Semantic version */
16
+ version: string;
17
+ /** Provider information */
18
+ provider?: AgentProvider;
19
+ /** Supported A2A protocol versions */
20
+ protocolVersions: string[];
21
+ /** Agent capabilities */
22
+ capabilities: AgentCapabilities;
23
+ /** Skills the agent provides */
24
+ skills: AgentSkill[];
25
+ /** Default input MIME types accepted */
26
+ defaultInputModes?: string[];
27
+ /** Default output MIME types produced */
28
+ defaultOutputModes?: string[];
29
+ /** Security schemes supported */
30
+ securitySchemes?: Record<string, SecurityScheme>;
31
+ /** Required security scheme names */
32
+ security?: string[];
33
+ /** Base URL for A2A endpoints */
34
+ url: string;
35
+ }
36
+ /** Provider information */
37
+ export interface AgentProvider {
38
+ name: string;
39
+ url?: string;
40
+ }
41
+ /** Agent capabilities */
42
+ export interface AgentCapabilities {
43
+ /** Supports streaming responses via SSE */
44
+ streaming: boolean;
45
+ /** Supports push notifications */
46
+ pushNotifications: boolean;
47
+ /** Supports extended agent card endpoint */
48
+ extendedAgentCard: boolean;
49
+ }
50
+ /** Security scheme definition */
51
+ export interface SecurityScheme {
52
+ type: string;
53
+ scheme?: string;
54
+ bearerFormat?: string;
55
+ }
56
+ /** Structured skill definition */
57
+ export interface AgentSkill {
58
+ /** Skill identifier (e.g., "document:summarize") */
59
+ id: string;
60
+ /** Human-readable skill name */
61
+ name: string;
62
+ /** Skill description */
63
+ description?: string;
64
+ /** Tags for categorization */
65
+ tags?: string[];
66
+ /** Input MIME types accepted */
67
+ inputModes?: string[];
68
+ /** Output MIME types produced */
69
+ outputModes?: string[];
70
+ /** Example prompts */
71
+ examples?: string[];
72
+ }
73
+ /** A2A message with role and parts */
74
+ export interface A2AMessage {
75
+ /** Message role: "user" or "agent" */
76
+ role: "user" | "agent";
77
+ /** Message content parts */
78
+ parts: A2AMessagePart[];
79
+ }
80
+ /** Message part content */
81
+ export type A2AMessagePart = {
82
+ type: "text";
83
+ text: string;
84
+ } | {
85
+ type: "file";
86
+ uri: string;
87
+ mimeType?: string;
88
+ } | {
89
+ type: "data";
90
+ data: unknown;
91
+ };
92
+ /** A2A task states */
93
+ export type A2ATaskState = "pending" | "working" | "input-required" | "completed" | "failed" | "cancelled";
94
+ /** A2A task status with timestamp */
95
+ export interface A2ATaskStatus {
96
+ state: A2ATaskState;
97
+ timestamp: string;
98
+ }
99
+ /** Full A2A task */
100
+ export interface A2ATask {
101
+ taskId: string;
102
+ contextId?: string;
103
+ status: A2ATaskStatus;
104
+ artifacts: A2AArtifact[];
105
+ history: A2AMessage[];
106
+ /** ID of the task that delegated to this task */
107
+ parentTaskId?: string;
108
+ /** Trace ID shared across the delegation chain */
109
+ traceId?: string;
110
+ }
111
+ /** Task artifact output */
112
+ export interface A2AArtifact {
113
+ name?: string;
114
+ parts: A2AMessagePart[];
115
+ index?: number;
116
+ }
117
+ /** Request for skill-based auto-discovery routing */
118
+ export interface A2ARouteRequest {
119
+ /** Required skill (e.g., "document:summarize") */
120
+ skill: string;
121
+ /** Message to send to the agent */
122
+ message: A2AMessage;
123
+ /** Optional conversation context ID */
124
+ contextId?: string;
125
+ /** Parent task ID for delegation tracking */
126
+ parentTaskId?: string;
127
+ /** Trace ID for the entire delegation chain */
128
+ traceId?: string;
129
+ }
130
+ /** Response from skill-based routing */
131
+ export interface A2ARouteResponse {
132
+ /** Created task ID */
133
+ taskId: string;
134
+ /** Current task status */
135
+ status: A2ATaskState;
136
+ /** ID of the selected agent */
137
+ agentId: string;
138
+ /** Initial response message (if any) */
139
+ message?: A2AMessage;
140
+ /** Trace ID for the delegation chain */
141
+ traceId?: string;
142
+ }
143
+ /** JSON-RPC 2.0 Request */
144
+ export interface JsonRpcRequest {
145
+ jsonrpc: "2.0";
146
+ method: string;
147
+ id: string | number;
148
+ params?: unknown;
149
+ }
150
+ /** JSON-RPC 2.0 Response */
151
+ export interface JsonRpcResponse<T = unknown> {
152
+ jsonrpc: "2.0";
153
+ id: string | number;
154
+ result?: T;
155
+ error?: JsonRpcError;
156
+ }
157
+ /** JSON-RPC 2.0 Error */
158
+ export interface JsonRpcError {
159
+ code: number;
160
+ message: string;
161
+ data?: unknown;
162
+ }
163
+ /** Parameters for tasks/send method */
164
+ export interface TasksSendParams {
165
+ /** Optional existing task ID to continue */
166
+ taskId?: string;
167
+ /** Message to send */
168
+ message: A2AMessage;
169
+ /** Optional context ID for grouping tasks */
170
+ contextId?: string;
171
+ }
172
+ /** Parameters for tasks/get method */
173
+ export interface TasksGetParams {
174
+ taskId: string;
175
+ }
176
+ /** Parameters for tasks/cancel method */
177
+ export interface TasksCancelParams {
178
+ taskId: string;
179
+ }
180
+ /** Parameters for tasks/sendSubscribe method */
181
+ export interface TasksSendSubscribeParams {
182
+ /** Optional existing task ID to continue */
183
+ taskId?: string;
184
+ /** Message to send */
185
+ message: A2AMessage;
186
+ }
187
+ /** SSE task update event */
188
+ export interface TaskUpdateEvent {
189
+ taskId: string;
190
+ status: A2ATaskState;
191
+ updatedAt: string;
192
+ message?: A2AMessage;
193
+ artifacts?: A2AArtifact[];
194
+ }
package/dist/types.d.ts CHANGED
@@ -134,6 +134,7 @@ export interface WorkspaceSummary {
134
134
  }
135
135
  export interface SekuireClientConfig {
136
136
  registryUrl: string;
137
+ apiKey?: string;
137
138
  timeout?: number;
138
139
  retries?: number;
139
140
  }
package/dist/utils.d.ts CHANGED
@@ -22,10 +22,6 @@ export declare function createSekuireClient(keyPair: KeyPair, registryUrl?: stri
22
22
  * Load keypair from environment variables
23
23
  */
24
24
  export declare function loadKeyPairFromEnv(): KeyPair;
25
- /**
26
- * Load keypair from files
27
- */
28
- export declare function loadKeyPairFromFiles(privateKeyPath: string, publicKeyPath?: string): Promise<KeyPair>;
29
25
  /**
30
26
  * Validate agent configuration
31
27
  */