@node-llm/orm 0.4.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -2,6 +2,58 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.12.0] - 2026-02-22 (@node-llm/core)
6
+
7
+ ### Features
8
+
9
+ - **Lazy Agent Evaluation**: Support for defining `instructions` and `tools` as functions that resolve at runtime based on provided `inputs`.
10
+ - **Runtime Agent Inputs**: Pass dynamic context (e.g., user preferences, scope) via `agent.ask(msg, { inputs })` for per-turn configuration overrides.
11
+ - **Agent Telemetry Hooks**: Integrated delegation of life-cycle events (`onToolCallStart`, `onToolCallEnd`, `afterResponse`) from Agents to underlying Chat instances, enabling declarative observability.
12
+
13
+ ## [0.6.0] - 2026-02-22 (@node-llm/orm)
14
+
15
+ ### Features
16
+
17
+ - **Automated Agent Persistence**: `AgentSession` now automatically registers internal hooks to persist tool calls and provider request metrics (tokens, latency) to the database.
18
+ - **Dynamic Metadata Updates**: Added `session.updateMetadata()` for mid-conversation context updates with immediate agent re-resolution.
19
+ - **Proof-of-Concept**: Full integration in HR Chatbot example demonstrating persistent multi-turn agent conversations with a complete audit trail.
20
+
21
+ ## [1.11.0] - 2026-02-07 (@node-llm/core)
22
+
23
+ ### Features
24
+
25
+ - **Agent Class**: Declarative DSL for defining agents with static properties (model, instructions, tools, temperature, thinking, schema).
26
+ - **ToolHalt Mechanism**: Early termination of agentic loops via `this.halt(result)` in Tool.execute().
27
+ - **defineAgent()**: Inline agent definition without creating a class.
28
+ - **Agent Inheritance**: Child agents inherit parent static properties.
29
+ - **Instance Overrides**: Override static properties at instantiation (temperature, maxTokens, etc.).
30
+
31
+ ### Documentation
32
+
33
+ - Comprehensive Agent documentation with examples for RAG, model routing, and multi-agent patterns.
34
+ - Added doc tests for Agent, Tool, and ToolHalt patterns.
35
+
36
+ ## [0.5.0] - 2026-02-07 (@node-llm/orm)
37
+
38
+ ### Features
39
+
40
+ - **AgentSession**: Persistent agent conversations following "Code Wins" principle.
41
+ - `createAgentSession()`: Create new session with metadata.
42
+ - `loadAgentSession()`: Resume session by ID with class validation.
43
+ - Agent class defines behavior (model, tools, instructions), database provides history.
44
+ - **Idempotent Migrations**: Safe migration files for LlmAgentSession table.
45
+ - **Custom Table Names**: Support for custom table name mapping.
46
+
47
+ ## [0.5.0] - 2026-02-07 (@node-llm/testing)
48
+
49
+ ### Features
50
+
51
+ - **Agent Testing Support**:
52
+ - `mocker.callsTools()`: Mock responses that trigger multiple tool calls.
53
+ - `mocker.sequence()`: Return different responses for multi-turn agent conversations.
54
+ - `mocker.times(n)`: Limit mock matches with fallthrough behavior.
55
+ - **Improved Matching**: First-match semantics enable `times()` fallthrough patterns.
56
+
5
57
  ## [1.10.0] - 2026-02-01 (@node-llm/core)
6
58
 
7
59
  ### Features
@@ -109,7 +161,7 @@ All notable changes to this project will be documented in this file.
109
161
  - Shifted from `db push` to professional **Prisma Migrate** workflow for safe, versioned schema updates.
110
162
  - Added repository-wide `prisma/migrations` folder for reproducible deployments.
111
163
  - New built-in scripts: `npm run db:migrate`, `npm run db:deploy`, and `npm run db:status`.
112
- - Comprehensive [Database Migration Guide](https://node-llm.eshaiju.com/orm/migrations) for application scaling.
164
+ - Comprehensive [Database Migration Guide](https://nodellm.dev/orm/migrations) for application scaling.
113
165
 
114
166
  ## [1.6.2] - 2026-01-21 (@node-llm/core)
115
167
 
@@ -211,7 +263,7 @@ All notable changes to this project will be documented in this file.
211
263
  - `onToolCallStart`: Triggered when a tool call begins
212
264
  - `onToolCallEnd`: Triggered when a tool call completes successfully
213
265
  - `onToolCallError`: Triggered when a tool call fails
214
- - **Security Documentation**: New comprehensive [Security & Compliance](https://node-llm.eshaiju.com/advanced/security.html) guide covering:
266
+ - **Security Documentation**: New comprehensive [Security & Compliance](https://nodellm.dev/advanced/security.html) guide covering:
215
267
  - Smart Context Isolation
216
268
  - Content Policy Hooks
217
269
  - Tool Execution Policies
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  > Database persistence layer for NodeLLM. Automatically tracks chats, messages, tool calls, and API requests.
9
9
 
10
- **[Read the Full Documentation](https://node-llm.eshaiju.com/orm/prisma)** | **[View Example App](https://github.com/node-llm/node-llm/tree/main/examples/applications/hr-chatbot-rag)**
10
+ **[Read the Full Documentation](https://nodellm.dev/orm/prisma)** | **[View Example App](https://github.com/node-llm/node-llm/tree/main/examples/applications/hr-chatbot-rag)**
11
11
 
12
12
  ## Features
13
13
 
@@ -123,14 +123,15 @@ console.log(messages); // [{ role: 'user', content: '...' }, { role: 'assistant'
123
123
 
124
124
  ## Architecture
125
125
 
126
- The ORM tracks four core entities:
126
+ The ORM tracks five core entities:
127
127
 
128
- | Model | Purpose | Example |
129
- | --------------- | -------------------- | ------------------------------------------ |
130
- | **LlmChat** | Session container | Holds model, provider, system instructions |
131
- | **LlmMessage** | Conversation history | User queries and assistant responses |
132
- | **LlmToolCall** | Tool executions | Function calls made by the assistant |
133
- | **LlmRequest** | API metrics | Token usage, latency, cost per API call |
128
+ | Model | Purpose | Example |
129
+ | ------------------- | -------------------- | ------------------------------------------ |
130
+ | **LlmAgentSession** | Agent persistence | Links Agent class to Chat (v0.5.0+) |
131
+ | **LlmChat** | Session container | Holds model, provider, system instructions |
132
+ | **LlmMessage** | Conversation history | User queries and assistant responses |
133
+ | **LlmToolCall** | Tool executions | Function calls made by the assistant |
134
+ | **LlmRequest** | API metrics | Token usage, latency, cost per API call |
134
135
 
135
136
  ### Data Flow
136
137
 
@@ -152,6 +153,91 @@ Chat.ask()
152
153
  Return Response
153
154
  ```
154
155
 
156
+ ## Agent Sessions (v0.5.0+)
157
+
158
+ For **stateful agents** with persistence, use `AgentSession`. This follows the "Code Wins" principle:
159
+
160
+ - **Model, Tools, Instructions** → from Agent class (code)
161
+ - **Message History** → from database
162
+
163
+ ### Define an Agent (in @node-llm/core)
164
+
165
+ ```typescript
166
+ import { Agent, Tool, z } from "@node-llm/core";
167
+
168
+ class LookupOrderTool extends Tool {
169
+ static definition = {
170
+ name: "lookup_order",
171
+ description: "Look up order status",
172
+ parameters: z.object({ orderId: z.string() })
173
+ };
174
+ async execute({ orderId }) {
175
+ return { status: "shipped", eta: "Tomorrow" };
176
+ }
177
+ }
178
+
179
+ class SupportAgent extends Agent {
180
+ static model = "gpt-4.1";
181
+ static instructions = "You are a helpful support agent.";
182
+ static tools = [LookupOrderTool];
183
+ }
184
+ ```
185
+
186
+ ### Create & Resume Sessions
187
+
188
+ ```typescript
189
+ import { createAgentSession, loadAgentSession } from "@node-llm/orm/prisma";
190
+
191
+ // Create a new persistent session
192
+ const session = await createAgentSession(prisma, llm, SupportAgent, {
193
+ metadata: { userId: "user_123", ticketId: "TKT-456" }
194
+ });
195
+
196
+ await session.ask("Where is my order #789?");
197
+ console.log(session.id); // "sess_abc123" - save this!
198
+
199
+ // Resume later (even after code upgrades)
200
+ const session = await loadAgentSession(prisma, llm, SupportAgent, "sess_abc123");
201
+ await session.ask("Can you cancel it?");
202
+ ```
203
+
204
+ ### Code Wins Principle
205
+
206
+ When you deploy a code change (new model, updated tools), resumed sessions use the **new configuration**:
207
+
208
+ | Aspect | Source | Why |
209
+ | ------------ | ----------- | ------------------------------- |
210
+ | Model | Agent class | Immediate upgrades |
211
+ | Tools | Agent class | Only code can execute functions |
212
+ | Instructions | Agent class | Deploy prompt fixes immediately |
213
+ | History | Database | Sacred, never modified |
214
+
215
+ ### Schema Addition
216
+
217
+ Add `LlmAgentSession` to your Prisma schema:
218
+
219
+ ```prisma
220
+ model LlmAgentSession {
221
+ id String @id @default(uuid())
222
+ agentClass String // For validation (e.g., 'SupportAgent')
223
+ chatId String @unique
224
+ metadata Json? // Session context (userId, ticketId)
225
+ createdAt DateTime @default(now())
226
+ updatedAt DateTime @updatedAt
227
+
228
+ chat LlmChat @relation(fields: [chatId], references: [id], onDelete: Cascade)
229
+
230
+ @@index([agentClass])
231
+ @@index([createdAt])
232
+ }
233
+
234
+ // Add relation to LlmChat
235
+ model LlmChat {
236
+ // ... existing fields
237
+ agentSession LlmAgentSession?
238
+ }
239
+ ```
240
+
155
241
  ## Advanced Usage
156
242
 
157
243
  ### Streaming Responses
package/bin/cli.js CHANGED
@@ -63,21 +63,55 @@ function sync() {
63
63
  "thoughtSignature"
64
64
  ];
65
65
 
66
+ // Check for AgentSession model (v0.5.0+)
67
+ const hasAgentSession =
68
+ userSchema.includes("LlmAgentSession") || userSchema.includes("AgentSession");
69
+
66
70
  const missingFields = requiredFields.filter((field) => !userSchema.includes(field));
67
71
 
68
- if (missingFields.length === 0) {
69
- console.log("✓ Schema is already up to date with @node-llm/orm v0.2.0 features.");
72
+ if (missingFields.length === 0 && hasAgentSession) {
73
+ console.log("✓ Schema is already up to date with @node-llm/orm v0.5.0 features.");
70
74
  return;
71
75
  }
72
76
 
73
- console.log("🛠 Syncing missing fields for Extended Thinking support...");
74
- console.log(`\nDetected missing fields: ${missingFields.join(", ")}`);
77
+ if (missingFields.length > 0) {
78
+ console.log("🛠 Syncing missing fields for Extended Thinking support...");
79
+ console.log(`\nDetected missing fields: ${missingFields.join(", ")}`);
80
+ }
81
+
82
+ if (!hasAgentSession) {
83
+ console.log("\n🤖 Missing AgentSession support (v0.5.0+)");
84
+ console.log(
85
+ " AgentSession enables persistent agent conversations with the 'Code Wins' pattern."
86
+ );
87
+ console.log("\n To add AgentSession, copy the migration from:");
88
+ console.log(" node_modules/@node-llm/orm/migrations/add_agent_session.sql");
89
+ console.log("\n Or add this to your schema.prisma:");
90
+ console.log(`
91
+ model LlmAgentSession {
92
+ id String @id @default(uuid())
93
+ agentClass String
94
+ chatId String @unique
95
+ metadata Json?
96
+ createdAt DateTime @default(now())
97
+ updatedAt DateTime @updatedAt
98
+
99
+ chat LlmChat @relation(fields: [chatId], references: [id], onDelete: Cascade)
100
+
101
+ @@index([agentClass])
102
+ @@index([createdAt])
103
+ }
104
+
105
+ // Also add to LlmChat:
106
+ // agentSession LlmAgentSession?
107
+ `);
108
+ }
75
109
 
76
110
  console.log("\nTo update your schema safely, follow the Reference Schema at:");
77
111
  console.log("https://github.com/node-llm/node-llm/blob/main/packages/orm/schema.prisma");
78
112
 
79
113
  console.log("\nOr run this to generate a versioned migration:");
80
- console.log(" npx prisma migrate dev --name add_reasoning_support");
114
+ console.log(" npx prisma migrate dev --name add_agent_session");
81
115
  }
82
116
 
83
117
  function main() {
@@ -103,7 +137,7 @@ function main() {
103
137
  console.log(" npx @node-llm/orm sync # Check for missing ORM fields");
104
138
  console.log(" npx @node-llm/orm migrate # Rails-style migration helper");
105
139
  console.log("\nFor enterprise patterns, see:");
106
- console.log(" https://node-llm.eshaiju.com/orm/migrations");
140
+ console.log(" https://nodellm.dev/orm/migrations");
107
141
  }
108
142
  }
109
143
 
@@ -0,0 +1,171 @@
1
+ import { ChatOptions, AskOptions, NodeLLMCore, Agent, AgentConfig, Message, ChatChunk, Usage } from "@node-llm/core";
2
+ /**
3
+ * Record structure for the LLM Agent Session table.
4
+ */
5
+ export interface AgentSessionRecord {
6
+ id: string;
7
+ agentClass: string;
8
+ chatId: string;
9
+ metadata?: Record<string, unknown> | null;
10
+ createdAt: Date;
11
+ updatedAt: Date;
12
+ }
13
+ /**
14
+ * Record structure for the LLM Message table.
15
+ */
16
+ export interface MessageRecord {
17
+ id: string;
18
+ chatId: string;
19
+ role: string;
20
+ content: string | null;
21
+ contentRaw?: string | null;
22
+ thinkingText?: string | null;
23
+ thinkingSignature?: string | null;
24
+ thinkingTokens?: number | null;
25
+ inputTokens?: number | null;
26
+ outputTokens?: number | null;
27
+ modelId?: string | null;
28
+ provider?: string | null;
29
+ createdAt: Date;
30
+ }
31
+ /**
32
+ * Table name customization.
33
+ */
34
+ export interface TableNames {
35
+ agentSession?: string;
36
+ chat?: string;
37
+ message?: string;
38
+ toolCall?: string;
39
+ request?: string;
40
+ }
41
+ type AgentClass<T extends Agent<any, any> = Agent<any, any>> = (new (overrides?: Partial<AgentConfig<any> & ChatOptions>) => T) & {
42
+ name: string;
43
+ model?: string;
44
+ instructions?: unknown;
45
+ tools?: unknown;
46
+ };
47
+ /**
48
+ * AgentSession - Wraps an Agent instance with persistence capabilities.
49
+ *
50
+ * Follows "Code Wins" sovereignty:
51
+ * - Model, Tools, Instructions come from the Agent class (code)
52
+ * - Message history comes from the database
53
+ * - Metadata from DB is injected as 'inputs' for dynamic resolution
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * // Create a new session
58
+ * const session = await createAgentSession(prisma, llm, SupportAgent, {
59
+ * metadata: { userId: "123" }
60
+ * });
61
+ *
62
+ * // Resume a session
63
+ * const session = await loadAgentSession(prisma, llm, SupportAgent, "sess_abc");
64
+ *
65
+ * // Agent behavior is always defined in code
66
+ * const result = await session.ask("Hello");
67
+ * ```
68
+ */
69
+ export declare class AgentSession<I extends Record<string, any> = Record<string, any>, T extends Agent<I, any> = Agent<I, any>> {
70
+ private prisma;
71
+ private llm;
72
+ private AgentClass;
73
+ private record;
74
+ private agent;
75
+ private currentMessageId;
76
+ private tableNames;
77
+ private debug;
78
+ constructor(prisma: any, llm: NodeLLMCore, AgentClass: AgentClass<T>, record: AgentSessionRecord, tableNames?: TableNames, agent?: T, debug?: boolean);
79
+ private log;
80
+ /** Agent instance (for direct access if needed) */
81
+ get instance(): T;
82
+ /** Session ID for persistence */
83
+ get id(): string;
84
+ /** Underlying chat ID */
85
+ get chatId(): string;
86
+ /** Session metadata */
87
+ get metadata(): I | null | undefined;
88
+ /** Agent class name */
89
+ get agentClass(): string;
90
+ /** Model ID used by the agent */
91
+ get modelId(): string;
92
+ /** Cumulative usage for this session (from agent memory) */
93
+ get totalUsage(): Usage;
94
+ /** Current in-memory message history */
95
+ get history(): readonly Message[];
96
+ /**
97
+ * Helper to get a typed Prisma model by its dynamic name.
98
+ */
99
+ private getModel;
100
+ /**
101
+ * Register persistence hooks on the agent.
102
+ */
103
+ private registerHooks;
104
+ /**
105
+ * Send a message and persist the conversation.
106
+ */
107
+ ask(message: string, options?: AskOptions & {
108
+ inputs?: I;
109
+ }): Promise<MessageRecord>;
110
+ /**
111
+ * Stream a response and persist the conversation.
112
+ */
113
+ askStream(message: string, options?: AskOptions & {
114
+ inputs?: I;
115
+ }): AsyncGenerator<ChatChunk, MessageRecord, undefined>;
116
+ /**
117
+ * Returns a usage summary for this chat session.
118
+ */
119
+ stats(): Promise<Usage>;
120
+ /**
121
+ * Add a tool to the session (turn-level).
122
+ */
123
+ withTool(tool: any): this;
124
+ /**
125
+ * Add instructions to the session (turn-level).
126
+ */
127
+ withInstructions(instructions: string, options?: {
128
+ replace?: boolean;
129
+ }): this;
130
+ /**
131
+ * Returns the current full message history for this session.
132
+ */
133
+ messages(): Promise<MessageRecord[]>;
134
+ /**
135
+ * Delete the entire session and its history.
136
+ */
137
+ delete(): Promise<void>;
138
+ /**
139
+ * Update session metadata and re-resolve agent configuration.
140
+ */
141
+ updateMetadata(metadata: Partial<I>): Promise<void>;
142
+ }
143
+ /**
144
+ * Options for creating a new agent session.
145
+ */
146
+ export interface CreateAgentSessionOptions<I = any> {
147
+ metadata?: I;
148
+ tableNames?: TableNames;
149
+ debug?: boolean;
150
+ model?: string;
151
+ provider?: string;
152
+ instructions?: string;
153
+ maxToolCalls?: number;
154
+ }
155
+ /**
156
+ * Creates a new agent session and its persistent chat record.
157
+ */
158
+ export declare function createAgentSession<I extends Record<string, any>, T extends Agent<I, any>>(prisma: any, llm: NodeLLMCore, AgentClass: AgentClass<T>, options?: CreateAgentSessionOptions<I>): Promise<AgentSession<I, T>>;
159
+ /**
160
+ * Options for loading an existing agent session.
161
+ */
162
+ export interface LoadAgentSessionOptions {
163
+ tableNames?: TableNames;
164
+ debug?: boolean;
165
+ }
166
+ /**
167
+ * Loads an existing agent session and re-instantiates the agent with history.
168
+ */
169
+ export declare function loadAgentSession<I extends Record<string, any>, T extends Agent<I, any>>(prisma: any, llm: NodeLLMCore, AgentClass: AgentClass<T>, sessionId: string, options?: LoadAgentSessionOptions): Promise<AgentSession<I, T> | null>;
170
+ export {};
171
+ //# sourceMappingURL=AgentSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AgentSession.d.ts","sourceRoot":"","sources":["../../../src/adapters/prisma/AgentSession.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,WAAW,EACX,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,KAAK,EACN,MAAM,gBAAgB,CAAC;AASxB;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IAC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