@igniter-js/agents 0.1.13 → 0.1.14
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/AGENTS.md +115 -54
- package/README.md +72 -42
- package/dist/adapters/index.d.mts +1 -1
- package/dist/adapters/index.d.ts +1 -1
- package/dist/{index-CX4IgrRt.d.mts → index-CqUbHeyY.d.mts} +78 -2
- package/dist/{index-CX4IgrRt.d.ts → index-CqUbHeyY.d.ts} +78 -2
- package/dist/index.d.mts +446 -53
- package/dist/index.d.ts +446 -53
- package/dist/index.js +717 -340
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +717 -341
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
|
@@ -485,7 +485,7 @@ interface IgniterAgentWorkingMemoryConfig {
|
|
|
485
485
|
* ```typescript
|
|
486
486
|
* const historyConfig: IgniterAgentHistoryConfig = {
|
|
487
487
|
* enabled: true,
|
|
488
|
-
* limit: 50 // Load last 50 messages for context
|
|
488
|
+
* limit: 50, // Load last 50 messages for context
|
|
489
489
|
* };
|
|
490
490
|
* ```
|
|
491
491
|
*
|
|
@@ -605,6 +605,56 @@ interface IgniterAgentGetMessagesParams {
|
|
|
605
605
|
*/
|
|
606
606
|
limit?: number;
|
|
607
607
|
}
|
|
608
|
+
/**
|
|
609
|
+
* Parameters for searching messages in history.
|
|
610
|
+
*
|
|
611
|
+
* @public
|
|
612
|
+
*/
|
|
613
|
+
interface IgniterAgentSearchParams {
|
|
614
|
+
/**
|
|
615
|
+
* The chat session ID to retrieve messages from.
|
|
616
|
+
*/
|
|
617
|
+
chatId: string;
|
|
618
|
+
/**
|
|
619
|
+
* Optional user ID to filter messages.
|
|
620
|
+
*/
|
|
621
|
+
userId?: string;
|
|
622
|
+
/**
|
|
623
|
+
* Maximum number of messages to retrieve.
|
|
624
|
+
*/
|
|
625
|
+
limit?: number;
|
|
626
|
+
/**
|
|
627
|
+
* Optional search query to filter messages.
|
|
628
|
+
*/
|
|
629
|
+
search?: string;
|
|
630
|
+
/**
|
|
631
|
+
* Optional date range to filter messages.
|
|
632
|
+
*/
|
|
633
|
+
dateFrom?: Date;
|
|
634
|
+
/**
|
|
635
|
+
* Optional date range to filter messages.
|
|
636
|
+
*/
|
|
637
|
+
dateTo?: Date;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Search result interface.
|
|
641
|
+
*
|
|
642
|
+
* @public
|
|
643
|
+
*/
|
|
644
|
+
interface IgniterAgentSearchResult {
|
|
645
|
+
/**
|
|
646
|
+
* The message ID.
|
|
647
|
+
*/
|
|
648
|
+
id: string;
|
|
649
|
+
/**
|
|
650
|
+
* The message content.
|
|
651
|
+
*/
|
|
652
|
+
content: any;
|
|
653
|
+
/**
|
|
654
|
+
* The message timestamp.
|
|
655
|
+
*/
|
|
656
|
+
timestamp: Date;
|
|
657
|
+
}
|
|
608
658
|
/**
|
|
609
659
|
* Parameters for retrieving chat sessions.
|
|
610
660
|
*
|
|
@@ -908,6 +958,32 @@ interface IgniterAgentMemoryProvider<TScope extends string = string, TIdentifier
|
|
|
908
958
|
* ```
|
|
909
959
|
*/
|
|
910
960
|
deleteChat?(chatId: string): Promise<void>;
|
|
961
|
+
/**
|
|
962
|
+
* Searches for messages in the chat history.
|
|
963
|
+
*
|
|
964
|
+
* @description
|
|
965
|
+
* Retrieves a list of messages that match the search query.
|
|
966
|
+
*
|
|
967
|
+
* @remarks
|
|
968
|
+
* This method is optional. If not implemented, search functionality
|
|
969
|
+
* will be unavailable.
|
|
970
|
+
*
|
|
971
|
+
* @param params - Search parameters
|
|
972
|
+
* @returns List of search results
|
|
973
|
+
*
|
|
974
|
+
* @example
|
|
975
|
+
* ```typescript
|
|
976
|
+
* const results = await provider.search?.({
|
|
977
|
+
* chatId: 'chat_123',
|
|
978
|
+
* userId: 'user_456',
|
|
979
|
+
* limit: 10,
|
|
980
|
+
* search: 'deployment',
|
|
981
|
+
* dateFrom: new Date('2023-01-01'),
|
|
982
|
+
* dateTo: new Date('2023-12-31'),
|
|
983
|
+
* });
|
|
984
|
+
* ```
|
|
985
|
+
*/
|
|
986
|
+
search?(params: IgniterAgentSearchParams): Promise<IgniterAgentSearchResult[]>;
|
|
911
987
|
}
|
|
912
988
|
/**
|
|
913
989
|
* Complete memory configuration for an IgniterAgent.
|
|
@@ -2178,4 +2254,4 @@ declare class IgniterAgentJSONFileAdapter implements IgniterAgentMemoryAdapter<I
|
|
|
2178
2254
|
getStats(): Promise<IgniterAgentAdapterStats>;
|
|
2179
2255
|
}
|
|
2180
2256
|
|
|
2181
|
-
export { type
|
|
2257
|
+
export { type IgniterAgentAdapterFactory as A, type IgniterAgentAdapterBatchResult as B, type IgniterAgentAdapterStats as C, type IgniterAgentMemoryConfig as I, type IgniterAgentMemoryRuntime as a, type IgniterAgentWorkingMemoryParams as b, type IgniterAgentWorkingMemory as c, type IgniterAgentUpdateWorkingMemoryParams as d, type IgniterAgentConversationMessage as e, type IgniterAgentUIMessage as f, type IgniterAgentGetMessagesParams as g, type IgniterAgentChatSession as h, type IgniterAgentGetChatsParams as i, IgniterAgentInMemoryAdapter as j, type IgniterAgentJSONFileAdapterOptions as k, IgniterAgentJSONFileAdapter as l, type IgniterAgentMessageRole as m, type IgniterAgentMemoryScope as n, type IgniterAgentGenerateTitleConfig as o, type IgniterAgentGenerateSuggestionsConfig as p, type IgniterAgentWorkingMemoryConfig as q, type IgniterAgentHistoryConfig as r, type IgniterAgentChatsConfig as s, type IgniterAgentSearchParams as t, type IgniterAgentSearchResult as u, type IgniterAgentMemoryProvider as v, type IgniterAgentAdapterOptions as w, type IgniterAgentInMemoryAdapterOptions as x, type IgniterAgentRedisAdapterOptions as y, type IgniterAgentMemoryAdapter as z };
|