@abassey/aid 0.1.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/agents/index.cjs +741 -0
- package/dist/agents/index.d.cts +78 -0
- package/dist/agents/index.d.ts +78 -0
- package/dist/agents/index.js +741 -0
- package/dist/ai-AWJOUXFM.js +9 -0
- package/dist/ai-DOAYJKKI.cjs +9 -0
- package/dist/chunk-2TNYBUNK.js +124 -0
- package/dist/chunk-3LGKZRGY.cjs +124 -0
- package/dist/chunk-AUR2BBB5.cjs +1436 -0
- package/dist/chunk-IJLTRQF4.cjs +276 -0
- package/dist/chunk-JPD7UBAZ.js +58 -0
- package/dist/chunk-M4RQALTT.js +276 -0
- package/dist/chunk-NB65IHJE.cjs +58 -0
- package/dist/chunk-YNIEOBDF.js +1436 -0
- package/dist/client/index.cjs +18 -0
- package/dist/client/index.d.cts +8 -0
- package/dist/client/index.d.ts +8 -0
- package/dist/client/index.js +18 -0
- package/dist/errors-CUVTnseb.d.ts +13 -0
- package/dist/errors-CgCce4cK.d.cts +158 -0
- package/dist/errors-CgCce4cK.d.ts +158 -0
- package/dist/errors-zAPbTlpe.d.cts +13 -0
- package/dist/eval/index.cjs +308 -0
- package/dist/eval/index.d.cts +106 -0
- package/dist/eval/index.d.ts +106 -0
- package/dist/eval/index.js +308 -0
- package/dist/index.cjs +35 -0
- package/dist/index.d.cts +107 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.js +35 -0
- package/dist/middleware/index.cjs +201 -0
- package/dist/middleware/index.d.cts +36 -0
- package/dist/middleware/index.d.ts +36 -0
- package/dist/middleware/index.js +201 -0
- package/dist/observability/index.cjs +147 -0
- package/dist/observability/index.d.cts +30 -0
- package/dist/observability/index.d.ts +30 -0
- package/dist/observability/index.js +147 -0
- package/dist/react/index.cjs +253 -0
- package/dist/react/index.d.cts +64 -0
- package/dist/react/index.d.ts +64 -0
- package/dist/react/index.js +253 -0
- package/dist/serve/index.cjs +545 -0
- package/dist/serve/index.d.cts +69 -0
- package/dist/serve/index.d.ts +69 -0
- package/dist/serve/index.js +545 -0
- package/dist/types-BJReASS-.d.cts +196 -0
- package/dist/types-BJReASS-.d.ts +196 -0
- package/dist/types-CguX3F16.d.cts +173 -0
- package/dist/types-CrFH-_qp.d.cts +68 -0
- package/dist/types-DvdzPmW0.d.ts +173 -0
- package/dist/types-qfE32ADy.d.ts +68 -0
- package/package.json +144 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { T as Tool, d as Message } from '../types-BJReASS-.cjs';
|
|
2
|
+
import { A as AgentConfig, a as Agent, C as CrewConfig, b as Crew, W as WorkflowConfig, c as Workflow, S as SwarmConfig, d as Swarm, M as MemoryProvider, e as AgentEvent, f as AgentEventCallback, g as AgentEventMap } from '../types-CguX3F16.cjs';
|
|
3
|
+
export { h as AgentResult, i as AgentStep, j as CrewResult, H as HandoffData, L as LlmCallData, O as OrchestratorEventCallback, k as OrchestratorEventPayload, l as SwarmResult, T as ToolCallData, m as WorkflowResult, n as WorkflowStep } from '../types-CguX3F16.cjs';
|
|
4
|
+
import '../errors-zAPbTlpe.cjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shorthand parameter definition — a plain string is treated as
|
|
8
|
+
* `{ type: "string", description: <the string> }`.
|
|
9
|
+
*/
|
|
10
|
+
type ToolParamShorthand = string;
|
|
11
|
+
/**
|
|
12
|
+
* Rich parameter definition with explicit type, enum, and optional support.
|
|
13
|
+
*/
|
|
14
|
+
interface ToolParamRich {
|
|
15
|
+
description: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
enum?: string[];
|
|
18
|
+
optional?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A single parameter definition: either shorthand (string) or rich (object).
|
|
22
|
+
*/
|
|
23
|
+
type ToolParamDef = ToolParamShorthand | ToolParamRich;
|
|
24
|
+
/**
|
|
25
|
+
* The params map passed to the `tool()` factory.
|
|
26
|
+
*/
|
|
27
|
+
type ToolParams = Record<string, ToolParamDef>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Create a Tool with a developer-friendly API.
|
|
31
|
+
*
|
|
32
|
+
* @param name - Unique tool name (used in function calling)
|
|
33
|
+
* @param description - Human-readable description shown to the model
|
|
34
|
+
* @param params - Parameter definitions (shorthand strings or rich objects)
|
|
35
|
+
* @param handler - Function that executes the tool, receives parsed args
|
|
36
|
+
* @returns A fully-formed Tool object with JSON Schema parameters
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const search = tool("search", "Search the web", {
|
|
41
|
+
* query: "The search query to execute",
|
|
42
|
+
* }, async ({ query }) => {
|
|
43
|
+
* return `Results for: ${query}`;
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function tool(name: string, description: string, params: ToolParams, handler: (args: Record<string, unknown>) => string | Promise<string>): Tool;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Create an autonomous agent that can run tasks, use tools, and maintain conversation state.
|
|
51
|
+
*/
|
|
52
|
+
declare function agent(config: AgentConfig): Agent;
|
|
53
|
+
|
|
54
|
+
declare function crew(config: CrewConfig): Crew;
|
|
55
|
+
|
|
56
|
+
declare function workflow(config: WorkflowConfig): Workflow;
|
|
57
|
+
|
|
58
|
+
declare function swarm(config: SwarmConfig): Swarm;
|
|
59
|
+
|
|
60
|
+
declare class InMemoryProvider implements MemoryProvider {
|
|
61
|
+
private messages;
|
|
62
|
+
private maxMessages;
|
|
63
|
+
constructor(options?: {
|
|
64
|
+
maxMessages?: number;
|
|
65
|
+
});
|
|
66
|
+
add(messages: Message[]): Promise<void>;
|
|
67
|
+
retrieve(_query: string, limit?: number): Promise<Message[]>;
|
|
68
|
+
clear(): Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare class AgentEventEmitter {
|
|
72
|
+
private listeners;
|
|
73
|
+
on<E extends AgentEvent>(event: E, cb: AgentEventCallback<E>): void;
|
|
74
|
+
off<E extends AgentEvent>(event: E, cb: AgentEventCallback<E>): void;
|
|
75
|
+
emit<E extends AgentEvent>(event: E, payload: AgentEventMap[E]): void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { Agent, AgentConfig, AgentEvent, AgentEventCallback, AgentEventEmitter, AgentEventMap, Crew, CrewConfig, InMemoryProvider, MemoryProvider, Swarm, SwarmConfig, Workflow, WorkflowConfig, agent, crew, swarm, tool, workflow };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { T as Tool, d as Message } from '../types-BJReASS-.js';
|
|
2
|
+
import { A as AgentConfig, a as Agent, C as CrewConfig, b as Crew, W as WorkflowConfig, c as Workflow, S as SwarmConfig, d as Swarm, M as MemoryProvider, e as AgentEvent, f as AgentEventCallback, g as AgentEventMap } from '../types-DvdzPmW0.js';
|
|
3
|
+
export { h as AgentResult, i as AgentStep, j as CrewResult, H as HandoffData, L as LlmCallData, O as OrchestratorEventCallback, k as OrchestratorEventPayload, l as SwarmResult, T as ToolCallData, m as WorkflowResult, n as WorkflowStep } from '../types-DvdzPmW0.js';
|
|
4
|
+
import '../errors-CUVTnseb.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Shorthand parameter definition — a plain string is treated as
|
|
8
|
+
* `{ type: "string", description: <the string> }`.
|
|
9
|
+
*/
|
|
10
|
+
type ToolParamShorthand = string;
|
|
11
|
+
/**
|
|
12
|
+
* Rich parameter definition with explicit type, enum, and optional support.
|
|
13
|
+
*/
|
|
14
|
+
interface ToolParamRich {
|
|
15
|
+
description: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
enum?: string[];
|
|
18
|
+
optional?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A single parameter definition: either shorthand (string) or rich (object).
|
|
22
|
+
*/
|
|
23
|
+
type ToolParamDef = ToolParamShorthand | ToolParamRich;
|
|
24
|
+
/**
|
|
25
|
+
* The params map passed to the `tool()` factory.
|
|
26
|
+
*/
|
|
27
|
+
type ToolParams = Record<string, ToolParamDef>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Create a Tool with a developer-friendly API.
|
|
31
|
+
*
|
|
32
|
+
* @param name - Unique tool name (used in function calling)
|
|
33
|
+
* @param description - Human-readable description shown to the model
|
|
34
|
+
* @param params - Parameter definitions (shorthand strings or rich objects)
|
|
35
|
+
* @param handler - Function that executes the tool, receives parsed args
|
|
36
|
+
* @returns A fully-formed Tool object with JSON Schema parameters
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const search = tool("search", "Search the web", {
|
|
41
|
+
* query: "The search query to execute",
|
|
42
|
+
* }, async ({ query }) => {
|
|
43
|
+
* return `Results for: ${query}`;
|
|
44
|
+
* });
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare function tool(name: string, description: string, params: ToolParams, handler: (args: Record<string, unknown>) => string | Promise<string>): Tool;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Create an autonomous agent that can run tasks, use tools, and maintain conversation state.
|
|
51
|
+
*/
|
|
52
|
+
declare function agent(config: AgentConfig): Agent;
|
|
53
|
+
|
|
54
|
+
declare function crew(config: CrewConfig): Crew;
|
|
55
|
+
|
|
56
|
+
declare function workflow(config: WorkflowConfig): Workflow;
|
|
57
|
+
|
|
58
|
+
declare function swarm(config: SwarmConfig): Swarm;
|
|
59
|
+
|
|
60
|
+
declare class InMemoryProvider implements MemoryProvider {
|
|
61
|
+
private messages;
|
|
62
|
+
private maxMessages;
|
|
63
|
+
constructor(options?: {
|
|
64
|
+
maxMessages?: number;
|
|
65
|
+
});
|
|
66
|
+
add(messages: Message[]): Promise<void>;
|
|
67
|
+
retrieve(_query: string, limit?: number): Promise<Message[]>;
|
|
68
|
+
clear(): Promise<void>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare class AgentEventEmitter {
|
|
72
|
+
private listeners;
|
|
73
|
+
on<E extends AgentEvent>(event: E, cb: AgentEventCallback<E>): void;
|
|
74
|
+
off<E extends AgentEvent>(event: E, cb: AgentEventCallback<E>): void;
|
|
75
|
+
emit<E extends AgentEvent>(event: E, payload: AgentEventMap[E]): void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { Agent, AgentConfig, AgentEvent, AgentEventCallback, AgentEventEmitter, AgentEventMap, Crew, CrewConfig, InMemoryProvider, MemoryProvider, Swarm, SwarmConfig, Workflow, WorkflowConfig, agent, crew, swarm, tool, workflow };
|