@falai/agent 0.3.23 → 0.3.25

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/README.md CHANGED
@@ -9,8 +9,9 @@
9
9
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.3+-blue.svg)](https://www.typescriptlang.org/)
10
10
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)
11
11
  [![Bun](https://img.shields.io/badge/bun-compatible-orange.svg)](https://bun.sh)
12
+ [![Website](https://img.shields.io/badge/🌐-falai.dev-brightgreen.svg)](https://falai.dev)
12
13
 
13
- [Features](#-features) • [Installation](#-installation) • [Quick Start](#-quick-start) • [Documentation](#-documentation) • [Examples](#-examples)
14
+ [🌐 Website](https://falai.dev) • [Features](#-features) • [Installation](#-installation) • [Quick Start](#-quick-start) • [Documentation](#-documentation) • [Examples](#-examples)
14
15
 
15
16
  </div>
16
17
 
package/docs/STRUCTURE.md CHANGED
@@ -1,8 +1,17 @@
1
1
  # Package Structure
2
2
 
3
- \`\`\`
3
+ ```
4
4
  src/
5
5
  ├── types/ # Type definitions (interfaces, types, enums)
6
+ │ ├── agent.ts # Agent types and configuration
7
+ │ ├── ai.ts # AI provider interfaces
8
+ │ ├── history.ts # Event and message history types
9
+ │ ├── observation.ts # Observation and disambiguation types
10
+ │ ├── persistence.ts # Persistence adapter interfaces
11
+ │ ├── prompt.ts # Prompt building types
12
+ │ ├── route.ts # Route and state types
13
+ │ ├── tool.ts # Tool definition types
14
+ │ └── index.ts # Type exports
6
15
  ├── core/ # Core framework classes
7
16
  │ ├── Agent.ts # Main agent class
8
17
  │ ├── Route.ts # Route/Journey DSL
@@ -12,21 +21,38 @@ src/
12
21
  │ ├── Tool.ts # Tool definitions
13
22
  │ ├── PromptBuilder.ts # Prompt construction
14
23
  │ ├── Events.ts # Event history
15
- └── DomainRegistry.ts # Domain organization
24
+ ├── DomainRegistry.ts # Domain organization
25
+ │ └── PersistenceManager.ts # Persistence lifecycle management
16
26
  ├── providers/ # AI provider implementations
17
- └── GeminiProvider.ts # Google Gemini AI
27
+ ├── AnthropicProvider.ts # Claude (Anthropic)
28
+ │ ├── GeminiProvider.ts # Google Gemini
29
+ │ ├── OpenAIProvider.ts # OpenAI GPT
30
+ │ ├── OpenRouterProvider.ts # OpenRouter (200+ models)
31
+ │ └── index.ts # Provider exports
32
+ ├── adapters/ # Database persistence adapters
33
+ │ ├── MemoryAdapter.ts # In-memory (testing/dev)
34
+ │ ├── PrismaAdapter.ts # Prisma ORM
35
+ │ ├── RedisAdapter.ts # Redis
36
+ │ ├── MongoAdapter.ts # MongoDB
37
+ │ ├── PostgreSQLAdapter.ts # PostgreSQL
38
+ │ ├── SQLiteAdapter.ts # SQLite
39
+ │ ├── OpenSearchAdapter.ts # OpenSearch/Elasticsearch
40
+ │ └── index.ts # Adapter exports
18
41
  ├── utils/ # Utility functions
19
- └── retry.ts # Retry/timeout logic
42
+ ├── retry.ts # Retry/timeout logic
43
+ │ └── id.ts # Deterministic ID generation
20
44
  ├── constants/ # Constants and symbols
21
- │ └── index.ts # END_ROUTE, etc.
45
+ │ └── index.ts # END_ROUTE, EventSource, etc.
22
46
  └── index.ts # Public API exports
23
- \`\`\`
47
+ ```
24
48
 
25
49
  ## Design Principles
26
50
 
27
51
  1. **Flat, organized structure** - Clear separation by purpose
28
52
  2. **Types-first** - All types in dedicated folder
29
53
  3. **Core logic isolated** - Business logic in \`core/\`
30
- 4. **Provider pattern** - Pluggable AI backends
31
- 5. **Path aliases** - Clean imports with \`@/types\`, \`@/core\`, etc.
32
- 6. **Fluent API** - Methods return \`this\` for chaining
54
+ 4. **Provider pattern** - Pluggable AI backends and database adapters
55
+ 5. **Optional persistence** - Multiple database adapters following the same pattern
56
+ 6. **Extensibility** - Easy to add new providers, adapters, and tools
57
+ 7. **Path aliases** - Clean imports with \`@/types\`, \`@/core\`, etc.
58
+ 8. **Fluent API** - Methods return \`this\` for chaining
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@falai/agent",
3
- "version": "0.3.23",
3
+ "version": "0.3.25",
4
4
  "description": "Standalone, strongly-typed AI Agent framework with route DSL and AI provider strategy",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",