@sekuire/sdk 0.1.4 → 0.1.6

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.
@@ -1,4 +1,4 @@
1
- import type { ChatChunk, ChatOptions, ChatResponse, LLMProvider, LLMProviderConfig, Message } from "./types";
1
+ import type { ChatChunk, ChatOptions, ChatResponse, LLMProvider, LLMProviderConfig, Message } from './types';
2
2
  /**
3
3
  * Anthropic LLM Provider
4
4
  * Supports Claude models (Claude 3, Claude 3.5, etc.)
@@ -1,4 +1,4 @@
1
- import type { ChatChunk, ChatOptions, ChatResponse, LLMProvider, LLMProviderConfig, Message } from "./types";
1
+ import type { ChatChunk, ChatOptions, ChatResponse, LLMProvider, LLMProviderConfig, Message } from './types';
2
2
  /**
3
3
  * Google Gemini LLM Provider
4
4
  * Supports Gemini Pro, Gemini Pro Vision, and other Google models
@@ -1,13 +1,13 @@
1
- import { AnthropicProvider } from "./anthropic";
2
- import { GoogleProvider } from "./google";
3
- import { OllamaProvider } from "./ollama";
4
- import { OpenAIProvider } from "./openai";
5
- import type { LLMProvider, LLMProviderConfig } from "./types";
6
- export * from "./anthropic";
7
- export * from "./google";
8
- export * from "./ollama";
9
- export * from "./openai";
10
- export * from "./types";
1
+ import { AnthropicProvider } from './anthropic';
2
+ import { GoogleProvider } from './google';
3
+ import { OllamaProvider } from './ollama';
4
+ import { OpenAIProvider } from './openai';
5
+ import type { LLMProvider, LLMProviderConfig } from './types';
6
+ export * from './anthropic';
7
+ export * from './google';
8
+ export * from './ollama';
9
+ export * from './openai';
10
+ export * from './types';
11
11
  /**
12
12
  * Create an LLM provider based on provider name
13
13
  */
@@ -1,4 +1,4 @@
1
- import type { ChatChunk, ChatOptions, ChatResponse, LLMProvider, LLMProviderConfig, Message } from "./types";
1
+ import type { ChatChunk, ChatOptions, ChatResponse, LLMProvider, LLMProviderConfig, Message } from './types';
2
2
  /**
3
3
  * Ollama LLM Provider
4
4
  * Supports local models via Ollama (Llama 2, Mistral, CodeLlama, etc.)
@@ -1,4 +1,4 @@
1
- import type { ChatChunk, ChatOptions, ChatResponse, LLMProvider, LLMProviderConfig, Message } from "./types";
1
+ import type { ChatChunk, ChatOptions, ChatResponse, LLMProvider, LLMProviderConfig, Message } from './types';
2
2
  /**
3
3
  * OpenAI LLM Provider
4
4
  * Supports GPT-3.5, GPT-4, and other OpenAI models
@@ -2,7 +2,7 @@
2
2
  * Message format for chat conversations
3
3
  */
4
4
  export interface Message {
5
- role: "system" | "user" | "assistant" | "function" | "tool";
5
+ role: 'system' | 'user' | 'assistant' | 'function' | 'tool';
6
6
  content: string | null;
7
7
  name?: string;
8
8
  tool_call_id?: string;
@@ -1,5 +1,5 @@
1
1
  export interface MemoryMessage {
2
- role: "user" | "assistant" | "system";
2
+ role: 'user' | 'assistant' | 'system';
3
3
  content: string;
4
4
  timestamp: number;
5
5
  metadata?: Record<string, unknown>;
@@ -1,4 +1,4 @@
1
- import { BaseMemoryStorage, type MemoryMessage } from "./base";
1
+ import { BaseMemoryStorage, type MemoryMessage } from './base';
2
2
  export declare class InMemoryStorage extends BaseMemoryStorage {
3
3
  private storage;
4
4
  add(sessionId: string, message: MemoryMessage): Promise<void>;
@@ -1,11 +1,11 @@
1
- export * from "./base";
2
- export * from "./in-memory";
3
- export * from "./postgres";
4
- export * from "./redis";
5
- import type { MemoryStorage } from "./base";
6
- import { type PostgresConfig } from "./postgres";
7
- import { type RedisConfig } from "./redis";
8
- export type MemoryType = "in-memory" | "redis" | "postgres";
1
+ export * from './base';
2
+ export * from './in-memory';
3
+ export * from './postgres';
4
+ export * from './redis';
5
+ import type { MemoryStorage } from './base';
6
+ import { type PostgresConfig } from './postgres';
7
+ import { type RedisConfig } from './redis';
8
+ export type MemoryType = 'in-memory' | 'redis' | 'postgres';
9
9
  export interface MemoryFactoryConfig {
10
10
  type: MemoryType;
11
11
  redis?: RedisConfig;
@@ -1,4 +1,4 @@
1
- import { BaseMemoryStorage, type MemoryMessage } from "./base";
1
+ import { BaseMemoryStorage, type MemoryMessage } from './base';
2
2
  export interface PostgresConfig {
3
3
  connectionString?: string;
4
4
  host?: string;
@@ -1,4 +1,4 @@
1
- import { BaseMemoryStorage, type MemoryMessage } from "./base";
1
+ import { BaseMemoryStorage, type MemoryMessage } from './base';
2
2
  export interface RedisConfig {
3
3
  host?: string;
4
4
  port?: number;
package/dist/server.d.ts CHANGED
@@ -22,6 +22,10 @@ export declare abstract class SekuireServer {
22
22
  * Get the agent's ID
23
23
  */
24
24
  getAgentId(): string;
25
+ /**
26
+ * Handle incoming webhooks from other agents
27
+ */
28
+ handleWebhook(payload: any, signature?: string): Promise<any>;
25
29
  }
26
30
  /**
27
31
  * Express.js middleware for Sekuire protocol
@@ -1,4 +1,4 @@
1
- import type { Tool, ToolMetadata } from "./base";
1
+ import type { Tool, ToolMetadata } from './base';
2
2
  /**
3
3
  * Tool for invoking other Sekuire agents
4
4
  * Performs handshake and sends requests to verified agents
@@ -1,10 +1,10 @@
1
- import type { PolicyEnforcer } from "../policy-enforcer";
1
+ import type { PolicyEnforcer } from '../policy-enforcer';
2
2
  export interface ToolInput {
3
3
  [key: string]: string | number | boolean | object;
4
4
  }
5
5
  export interface ToolParameter {
6
6
  name: string;
7
- type: "string" | "number" | "boolean" | "object";
7
+ type: 'string' | 'number' | 'boolean' | 'object';
8
8
  description: string;
9
9
  required: boolean;
10
10
  default?: string | number | boolean | object;
@@ -14,7 +14,7 @@ export interface ToolMetadata {
14
14
  description: string;
15
15
  parameters: ToolParameter[];
16
16
  category?: string;
17
- compliance_level?: "public" | "internal" | "restricted" | "system";
17
+ compliance_level?: 'public' | 'internal' | 'restricted' | 'system';
18
18
  requires_approval?: boolean;
19
19
  }
20
20
  export declare abstract class Tool {
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolInput, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolInput, type ToolMetadata } from './base';
2
2
  export declare class CalculatorTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(input: ToolInput): Promise<string>;
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolMetadata } from './base';
2
2
  export declare class AuditLogTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(input: {
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolInput, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolInput, type ToolMetadata } from './base';
2
2
  export declare class JsonParseTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(input: ToolInput): Promise<string>;
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolInput, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolInput, type ToolMetadata } from './base';
2
2
  export declare class DirectoryListTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(input: ToolInput): Promise<string>;
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolInput, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolInput, type ToolMetadata } from './base';
2
2
  export declare class FileReadTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(input: ToolInput): Promise<string>;
@@ -0,0 +1,8 @@
1
+ import { Tool, type ToolInput, type ToolMetadata } from './base';
2
+ export declare class GoogleDocsCreateTool extends Tool {
3
+ metadata: ToolMetadata;
4
+ execute(input: ToolInput): Promise<{
5
+ documentId: string;
6
+ url: string;
7
+ }>;
8
+ }
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolInput, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolInput, type ToolMetadata } from './base';
2
2
  export declare class HttpRequestTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(input: ToolInput): Promise<string | object>;
@@ -1,34 +1,36 @@
1
- export * from "./agent-delegation";
2
- export * from "./agent-invocation";
3
- export * from "./base";
4
- export * from "./calculator";
5
- export * from "./compliance-operations";
6
- export * from "./data-formats";
7
- export * from "./data-operations";
8
- export * from "./directory-operations";
9
- export * from "./file-operations";
10
- export * from "./http-request";
11
- export * from "./network-operations";
12
- export * from "./pattern-parser";
13
- export * from "./system-operations";
14
- export * from "./utility-operations";
15
- export * from "./verification-status";
16
- export * from "./web-search";
17
- import { AgentDelegationTool, AgentDiscoveryTool, AgentStatusTool } from "./agent-delegation";
18
- import { GetAgentInfoTool, InvokeAgentTool, SearchAgentsTool } from "./agent-invocation";
19
- import { ToolRegistry } from "./base";
20
- import { CalculatorTool } from "./calculator";
21
- import { AuditLogTool, DecryptDataTool, EncryptDataTool, PiiDetectTool } from "./compliance-operations";
22
- import { CsvParseTool, CsvWriteTool, JsonStringifyTool, XmlParseTool, YamlParseTool } from "./data-formats";
23
- import { Base64DecodeTool, Base64EncodeTool, HashTool, JsonParseTool } from "./data-operations";
24
- import { DirectoryCopyTool, DirectoryExistsTool, DirectoryListTool, DirectoryMkdirTool, DirectoryMoveTool, DirectoryRmdirTool, DirectoryRmRecursiveTool, DirectoryTreeTool } from "./directory-operations";
25
- import { FileAppendTool, FileChmodTool, FileCopyTool, FileDeleteTool, FileExistsTool, FileListTool, FileMoveTool, FileReadTool, FileStatTool, FileWriteTool } from "./file-operations";
26
- import { HttpRequestTool } from "./http-request";
27
- import { DnsLookupTool, DownloadFileTool, HttpDeleteTool, HttpPostTool, HttpPutTool, PingTool } from "./network-operations";
28
- import { EnvGetTool, EnvSetTool, GetCwdTool, GetPlatformTool } from "./system-operations";
29
- import { DateFormatTool, GenerateUuidTool, RandomNumberTool, RegexMatchTool, SleepTool, UrlParseTool } from "./utility-operations";
30
- import { VerificationStatusTool } from "./verification-status";
31
- import { WebSearchTool } from "./web-search";
1
+ export * from './agent-delegation';
2
+ export * from './agent-invocation';
3
+ export * from './base';
4
+ export * from './calculator';
5
+ export * from './compliance-operations';
6
+ export * from './data-formats';
7
+ export * from './data-operations';
8
+ export * from './directory-operations';
9
+ export * from './file-operations';
10
+ export * from './google-workspace';
11
+ export * from './http-request';
12
+ export * from './network-operations';
13
+ export * from './pattern-parser';
14
+ export * from './system-operations';
15
+ export * from './utility-operations';
16
+ export * from './verification-status';
17
+ export * from './web-search';
18
+ import { AgentDelegationTool, AgentDiscoveryTool, AgentStatusTool } from './agent-delegation';
19
+ import { GetAgentInfoTool, InvokeAgentTool, SearchAgentsTool } from './agent-invocation';
20
+ import { ToolRegistry } from './base';
21
+ import { CalculatorTool } from './calculator';
22
+ import { AuditLogTool, DecryptDataTool, EncryptDataTool, PiiDetectTool } from './compliance-operations';
23
+ import { CsvParseTool, CsvWriteTool, JsonStringifyTool, XmlParseTool, YamlParseTool } from './data-formats';
24
+ import { Base64DecodeTool, Base64EncodeTool, HashTool, JsonParseTool } from './data-operations';
25
+ import { DirectoryCopyTool, DirectoryExistsTool, DirectoryListTool, DirectoryMkdirTool, DirectoryMoveTool, DirectoryRmdirTool, DirectoryRmRecursiveTool, DirectoryTreeTool } from './directory-operations';
26
+ import { FileAppendTool, FileChmodTool, FileCopyTool, FileDeleteTool, FileExistsTool, FileListTool, FileMoveTool, FileReadTool, FileStatTool, FileWriteTool } from './file-operations';
27
+ import { HttpRequestTool } from './http-request';
28
+ import { DnsLookupTool, DownloadFileTool, HttpDeleteTool, HttpPostTool, HttpPutTool, PingTool } from './network-operations';
29
+ import { EnvGetTool, EnvSetTool, GetCwdTool, GetPlatformTool } from './system-operations';
30
+ import { GoogleDocsCreateTool } from './google-workspace';
31
+ import { DateFormatTool, GenerateUuidTool, RandomNumberTool, RegexMatchTool, SleepTool, UrlParseTool } from './utility-operations';
32
+ import { VerificationStatusTool } from './verification-status';
33
+ import { WebSearchTool } from './web-search';
32
34
  export interface ToolRegistryOptions {
33
35
  privateKey?: string;
34
36
  publicKey?: string;
@@ -62,6 +64,7 @@ export declare const builtInTools: {
62
64
  DownloadFileTool: typeof DownloadFileTool;
63
65
  DnsLookupTool: typeof DnsLookupTool;
64
66
  PingTool: typeof PingTool;
67
+ GoogleDocsCreateTool: typeof GoogleDocsCreateTool;
65
68
  JsonParseTool: typeof JsonParseTool;
66
69
  JsonStringifyTool: typeof JsonStringifyTool;
67
70
  CsvParseTool: typeof CsvParseTool;
@@ -1,4 +1,4 @@
1
- import type { ToolRegistry } from "./base";
1
+ import type { ToolRegistry } from './base';
2
2
  export declare class ToolPatternParser {
3
3
  /**
4
4
  * Get the tool name prefix for a category
@@ -0,0 +1,10 @@
1
+ import type { SekuireClient } from '../client';
2
+ import type { ToolDefinition } from '../agent';
3
+ /**
4
+ * Create a tool for discovering other agents in the Sekuire network
5
+ */
6
+ export declare function createDiscoveryTool(client: SekuireClient): ToolDefinition;
7
+ /**
8
+ * Create a tool for delegating tasks to other agents
9
+ */
10
+ export declare function createDelegationTool(client: SekuireClient): ToolDefinition;
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolMetadata } from './base';
2
2
  export declare class GetCwdTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(): Promise<string>;
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolMetadata } from './base';
2
2
  export declare class DateFormatTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(input: {
@@ -11,7 +11,7 @@
11
11
  * - Security score and reputation
12
12
  * - Code review status
13
13
  */
14
- import { Tool, type ToolInput, type ToolMetadata } from "./base";
14
+ import { Tool, type ToolInput, type ToolMetadata } from './base';
15
15
  export declare class VerificationStatusTool extends Tool {
16
16
  metadata: ToolMetadata;
17
17
  private registryUrl;
@@ -1,4 +1,4 @@
1
- import { Tool, type ToolInput, type ToolMetadata } from "./base";
1
+ import { Tool, type ToolInput, type ToolMetadata } from './base';
2
2
  export declare class WebSearchTool extends Tool {
3
3
  metadata: ToolMetadata;
4
4
  execute(input: ToolInput): Promise<string>;
package/package.json CHANGED
@@ -1,11 +1,18 @@
1
1
  {
2
2
  "name": "@sekuire/sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Sekuire Identity Protocol SDK for TypeScript/JavaScript",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.esm.js",
8
8
  "types": "dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.esm.js",
12
+ "require": "./dist/index.js",
13
+ "types": "./dist/index.d.ts"
14
+ }
15
+ },
9
16
  "scripts": {
10
17
  "build": "rollup -c",
11
18
  "dev": "rollup -c -w",