@smythos/sre 1.7.41 → 1.8.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.
Files changed (60) hide show
  1. package/CHANGELOG +136 -64
  2. package/dist/index.js +65 -50
  3. package/dist/index.js.map +1 -1
  4. package/dist/types/Components/Async.class.d.ts +11 -5
  5. package/dist/types/index.d.ts +2 -0
  6. package/dist/types/subsystems/AgentManager/AgentData.service/connectors/SQLiteAgentDataConnector.class.d.ts +45 -0
  7. package/dist/types/subsystems/LLMManager/LLM.helper.d.ts +32 -1
  8. package/dist/types/subsystems/LLMManager/LLM.inference.d.ts +25 -2
  9. package/dist/types/subsystems/LLMManager/LLM.service/connectors/Anthropic.class.d.ts +22 -2
  10. package/dist/types/subsystems/LLMManager/LLM.service/connectors/Bedrock.class.d.ts +2 -2
  11. package/dist/types/subsystems/LLMManager/LLM.service/connectors/GoogleAI.class.d.ts +27 -2
  12. package/dist/types/subsystems/LLMManager/LLM.service/connectors/Groq.class.d.ts +22 -2
  13. package/dist/types/subsystems/LLMManager/LLM.service/connectors/Ollama.class.d.ts +22 -2
  14. package/dist/types/subsystems/LLMManager/LLM.service/connectors/Perplexity.class.d.ts +3 -3
  15. package/dist/types/subsystems/LLMManager/LLM.service/connectors/openai/OpenAIConnector.class.d.ts +23 -3
  16. package/dist/types/subsystems/LLMManager/LLM.service/connectors/openai/apiInterfaces/ChatCompletionsApiInterface.d.ts +2 -2
  17. package/dist/types/subsystems/LLMManager/LLM.service/connectors/openai/apiInterfaces/OpenAIApiInterface.d.ts +2 -2
  18. package/dist/types/subsystems/LLMManager/LLM.service/connectors/openai/apiInterfaces/ResponsesApiInterface.d.ts +2 -2
  19. package/dist/types/subsystems/LLMManager/LLM.service/connectors/xAI.class.d.ts +3 -3
  20. package/dist/types/subsystems/MemoryManager/LLMContext.d.ts +10 -3
  21. package/dist/types/subsystems/ObservabilityManager/Telemetry.service/connectors/OTel/OTel.class.d.ts +24 -0
  22. package/dist/types/subsystems/ObservabilityManager/Telemetry.service/connectors/OTel/OTel.redaction.helper.d.ts +49 -0
  23. package/dist/types/types/LLM.types.d.ts +30 -1
  24. package/package.json +4 -3
  25. package/src/Components/APICall/OAuth.helper.ts +16 -1
  26. package/src/Components/APIEndpoint.class.ts +11 -4
  27. package/src/Components/Async.class.ts +38 -5
  28. package/src/Components/GenAILLM.class.ts +13 -7
  29. package/src/Components/LLMAssistant.class.ts +3 -1
  30. package/src/Components/LogicAND.class.ts +13 -0
  31. package/src/Components/LogicAtLeast.class.ts +18 -0
  32. package/src/Components/LogicAtMost.class.ts +19 -0
  33. package/src/Components/LogicOR.class.ts +12 -2
  34. package/src/Components/LogicXOR.class.ts +11 -0
  35. package/src/constants.ts +1 -1
  36. package/src/helpers/Conversation.helper.ts +10 -8
  37. package/src/index.ts +2 -0
  38. package/src/index.ts.bak +2 -0
  39. package/src/subsystems/AgentManager/AgentData.service/connectors/SQLiteAgentDataConnector.class.ts +190 -0
  40. package/src/subsystems/AgentManager/AgentData.service/index.ts +2 -0
  41. package/src/subsystems/LLMManager/LLM.helper.ts +117 -1
  42. package/src/subsystems/LLMManager/LLM.inference.ts +136 -67
  43. package/src/subsystems/LLMManager/LLM.service/LLMConnector.ts +13 -6
  44. package/src/subsystems/LLMManager/LLM.service/connectors/Anthropic.class.ts +157 -33
  45. package/src/subsystems/LLMManager/LLM.service/connectors/Bedrock.class.ts +9 -8
  46. package/src/subsystems/LLMManager/LLM.service/connectors/GoogleAI.class.ts +121 -83
  47. package/src/subsystems/LLMManager/LLM.service/connectors/Groq.class.ts +125 -62
  48. package/src/subsystems/LLMManager/LLM.service/connectors/Ollama.class.ts +168 -76
  49. package/src/subsystems/LLMManager/LLM.service/connectors/Perplexity.class.ts +18 -8
  50. package/src/subsystems/LLMManager/LLM.service/connectors/VertexAI.class.ts +8 -4
  51. package/src/subsystems/LLMManager/LLM.service/connectors/openai/OpenAIConnector.class.ts +50 -8
  52. package/src/subsystems/LLMManager/LLM.service/connectors/openai/apiInterfaces/ChatCompletionsApiInterface.ts +30 -16
  53. package/src/subsystems/LLMManager/LLM.service/connectors/openai/apiInterfaces/OpenAIApiInterface.ts +2 -2
  54. package/src/subsystems/LLMManager/LLM.service/connectors/openai/apiInterfaces/ResponsesApiInterface.ts +29 -15
  55. package/src/subsystems/LLMManager/LLM.service/connectors/xAI.class.ts +10 -8
  56. package/src/subsystems/MemoryManager/LLMContext.ts +27 -8
  57. package/src/subsystems/ObservabilityManager/Telemetry.service/connectors/OTel/OTel.class.ts +467 -120
  58. package/src/subsystems/ObservabilityManager/Telemetry.service/connectors/OTel/OTel.redaction.helper.ts +203 -0
  59. package/src/types/LLM.types.ts +31 -1
  60. package/src/types/node-sqlite.d.ts +45 -0
package/CHANGELOG CHANGED
@@ -5,129 +5,201 @@ All notable changes to the SmythOS CORE Runtime Engine will be documented in thi
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.8.0] 2026-02-23
9
+
10
+ ### Observability
11
+
12
+ - **New: Observability Subsystem** with a full OpenTelemetry (OTel) connector — agent spans, skill propagation, session/workflow tracing, and error tracking now available out of the box
13
+ - Sensitive data redaction for OTel logs — new `enableRedaction` option and `redactHeaders` helper to strip secrets and PII from telemetry
14
+ - Agent name, team ID, org tier, and org slot added to OTel spans for richer multi-tenant tracing
15
+ - Agent.Skill spans propagated via HTTP headers across service boundaries
16
+ - Enhanced context previewing in OTel via `prepareContext` method
17
+ - Full input/output context logged in OTel spans, including tool arguments and LLM responses
18
+ - Improved OTel error tracking with consolidated error reporting and error event listeners
19
+ - OTel span hierarchy for conversation sessions fully implemented
20
+ - Graceful handling when OTel endpoint is not configured
21
+
22
+ ### LLM & Model Support
23
+
24
+ - **Abort Controller**: all LLM connectors now support an `abortSignal` parameter and emit a `TLLMEvent.Abort` event — cancellation is first-class
25
+ - **Finish reason normalization**: standardized `TLLMFinishReason` enum across all LLM connectors
26
+ - **Event emitter standardization**: LLM connectors never throw — errors are always emitted as events
27
+ - **Fallback/proxy pattern**: custom model connectors now support a fallback proxy architecture for resilience
28
+ - **Structured output**: implemented structured output extraction for Anthropic's latest models; `_debug` and `_error` fields excluded from structured outputs
29
+ - **Anthropic**: handle `model_context_window_exceeded` stop reason gracefully
30
+ - **Anthropic**: prefill and JSON instructions now only applied to legacy models
31
+ - **Anthropic**: support negative values for `temperature` and `top_p`
32
+ - **Opus 4.5 / 4.6**: thinking effort parameter support
33
+ - **GPT-5.2**: `xhigh` reasoning effort support
34
+ - **Gemini 3**: `reasoningEffort` config and `thoughtSignature` attachment for function calling
35
+ - **Google AI**: fixed system instruction propagation, message part extraction, and `functionResponse.response` structure
36
+ - **Google AI**: fixed multiple tool call logging, tier/cache handling, and image token usage reporting
37
+ - **Claude 4**: enabled streaming in Classifier and LLM Assistant components
38
+ - **Perplexity**: provide actual API error messages; allow either `frequency_penalty` or `presence_penalty` (not both)
39
+ - Flash model family detected via a more generic pattern
40
+ - `modelEntryName` exposed for runtime model identification
41
+ - `readyPromise` added to `LLMContext` class for safer initialization sequencing
42
+
43
+ ### Connectors & Storage
44
+
45
+ - **New: SQLite Agent Data Connector** — lightweight local agent data persistence using SQLite
46
+ - **RAG v2**: embeddings credentials now resolved from either vault or internal config; metadata handling fixed; namespace parsing corrected
47
+ - **DataPools v2**: conditional rollout with updated namespace processing and datasource indexer component
48
+ - **Pinecone**: `delete namespace` and `delete datasource` operations fixed; constructor params made optional
49
+ - **Milvus**: `delete datasource` operation fixed
50
+ - **Secret Manager**: fixed secrets fetching flow and managed vault connector; `smythos` set as default prefix
51
+ - Legacy namespace IDs resolved correctly
52
+ - Vector embedders: legacy OpenAI embedder entries hidden from selection UI
53
+ - OAuth2 credentials manager: `scope` field now supported
54
+
55
+ ### Components & Runtime
56
+
57
+ - **Chat**: fixed attachments being mixed with text file inputs
58
+ - **APIEndpoint**: debug message cleaned up to prevent bloating the debug context
59
+ - **Sub-Agent**: JSON response mode now supported
60
+ - **WebScrape**: `country` proxy option added
61
+ - **Search components**: template variables now supported for search location fields
62
+ - **ForEach / LogicAnd / Async**: improved debug logging
63
+ - Agent variables now resolved before type inference in all component contexts
64
+ - `APIEndpoint` and `ServerlessCode` variable resolution fixed
65
+ - ConversationHelper: fixed SSE event handler memory leak; errors from `toolsPromise` now propagated correctly
66
+ - Maximum tool call limit per session implemented (defaults to `Infinity`)
67
+ - `TemplateString` parser now correctly handles falsy values (`0`, `false`, `""`)
68
+ - SMYTH_PATH now accepts dot-segments for watching models from the default location
69
+ - Base64 detection no longer relies on data length heuristic
70
+ - Empty LLM response errors now include the field name for easier debugging
71
+ - Agent cache support added to the Smyth SDK
72
+
73
+ ### Code Quality
74
+
75
+ - OTel class refactored: removed redundant `lastContext` variable, simplified agent data access, cleaned up unused attributes
76
+ - `LLMConnector`: corrected ordering of `structuredOutputs` inside `prepareParams()`
77
+ - Fixed HookAsync; added support for hookable classes
78
+ - Secrets Manager usage example and documentation added
79
+
8
80
  ## [1.7.9] 2025-11-09
9
81
 
10
- - Fixed edge cases issues with SRE core initialization
11
- - Add support for custom chunkSize and chunkOverlap for VectorDB embeddings
12
- - normalized the embeddings parameters for VectorDB connectors
13
- - JSONVaultConnector now detects missing vault and prompts the user to create it
82
+ - Fixed edge cases issues with SRE core initialization
83
+ - Add support for custom chunkSize and chunkOverlap for VectorDB embeddings
84
+ - normalized the embeddings parameters for VectorDB connectors
85
+ - JSONVaultConnector now detects missing vault and prompts the user to create it
14
86
 
15
87
  ## [1.7.1] 2025-10-30
16
88
 
17
- - Core structures for triggers
18
- - Added Scheduler Connector
19
- - Added Advanced SRE hooks (Aspect Oriented Programming pattern to monitor and interact with internal SRE calls from outside)
20
- - SRE core is now accessible from the sdk package though @smythos/sdk/core
21
- - Implemented OAuth2 credentials manager for SRE (this will become the standard wrapper to handle all oAuth2 credentials)
22
- - APIEndpoint now supports custom code process (harmonizing SDK and SRE)
23
- - Multiple fixes for conversation manager
24
- - Fix for Gemini LLM infinite loop tool calls
25
- - Support local LLM credentials
26
- - add a killReason message when an SRE agent is killed
27
- - AgentDataConnector handles ephemeral agents data (for SDK agents)
28
- - Update Milvus data format to match the latest Milvus sdk release
89
+ - Core structures for triggers
90
+ - Added Scheduler Connector
91
+ - Added Advanced SRE hooks (Aspect Oriented Programming pattern to monitor and interact with internal SRE calls from outside)
92
+ - SRE core is now accessible from the sdk package though @smythos/sdk/core
93
+ - Implemented OAuth2 credentials manager for SRE (this will become the standard wrapper to handle all oAuth2 credentials)
94
+ - APIEndpoint now supports custom code process (harmonizing SDK and SRE)
95
+ - Multiple fixes for conversation manager
96
+ - Fix for Gemini LLM infinite loop tool calls
97
+ - Support local LLM credentials
98
+ - add a killReason message when an SRE agent is killed
99
+ - AgentDataConnector handles ephemeral agents data (for SDK agents)
100
+ - Update Milvus data format to match the latest Milvus sdk release
29
101
 
30
102
  ## [1.6.0]
31
103
 
32
104
  ### Features
33
105
 
34
- - Add Memory Components
35
- - Add Milvus VectorDB Connector
36
- - Add support to Google embeddings
37
- - Add support to OpenAI responses API
38
- - Agent Runtime optimizations : better memory management + stability fixes
106
+ - Add Memory Components
107
+ - Add Milvus VectorDB Connector
108
+ - Add support to Google embeddings
109
+ - Add support to OpenAI responses API
110
+ - Agent Runtime optimizations : better memory management + stability fixes
39
111
 
40
112
  ### Code and tooling
41
113
 
42
- - Added multiple unit tests for a better code coveragge
43
- - Updated dependencies
44
- - Updated .cursor/rules/sre-ai-rules.mdc to enhance the qualty of AI based contributions
114
+ - Added multiple unit tests for a better code coveragge
115
+ - Updated dependencies
116
+ - Updated .cursor/rules/sre-ai-rules.mdc to enhance the qualty of AI based contributions
45
117
 
46
118
  ## [v1.5.60]
47
119
 
48
120
  ### Features
49
121
 
50
- - Fixed memory leak in Agent context manager
51
- - Optimized performances and resolved a rare case causing CPU usage spikes
122
+ - Fixed memory leak in Agent context manager
123
+ - Optimized performances and resolved a rare case causing CPU usage spikes
52
124
 
53
125
  ## [v1.5.50]
54
126
 
55
127
  ### Features
56
128
 
57
- - Added support for OpenAI Responses API
58
- - Added support for GPT-5 family models with reasoning capabilities .
59
- - MCP Client component : support for Streamable HTTP transport
129
+ - Added support for OpenAI Responses API
130
+ - Added support for GPT-5 family models with reasoning capabilities .
131
+ - MCP Client component : support for Streamable HTTP transport
60
132
 
61
133
  ## [v1.5.31]
62
134
 
63
135
  ### LLM & Model Support:
64
136
 
65
- - Added support for new models (Claude 4, xAI/Grok 4, and more).
66
- - Improved model configuration, including support for unlisted/custom models
67
- - better handling of Anthropic tool calling.
68
- - Enhanced multimodal and streaming capabilities for LLMs.
137
+ - Added support for new models (Claude 4, xAI/Grok 4, and more).
138
+ - Improved model configuration, including support for unlisted/custom models
139
+ - better handling of Anthropic tool calling.
140
+ - Enhanced multimodal and streaming capabilities for LLMs.
69
141
 
70
142
  ### Components & Connectors:
71
143
 
72
- - Introduced AWS Lambda code component and connector.
73
- - Added serverless code component.
74
- - Enhanced and unified connectors for S3, Redis, LocalStorage, and JSON vault.
75
- - Added support for local storage cache and improved NKV (key-value) handling.
144
+ - Introduced AWS Lambda code component and connector.
145
+ - Added serverless code component.
146
+ - Enhanced and unified connectors for S3, Redis, LocalStorage, and JSON vault.
147
+ - Added support for local storage cache and improved NKV (key-value) handling.
76
148
 
77
149
  ### Fixes
78
150
 
79
- - Numerous bug fixes for LLM connectors, model selection, and streaming.
80
- - Fixed issues with S3 connector initialization, serverless code component, and vault key fetching.
81
- - Improved error handling for binary input, file uploads, and API calls.
82
- - Fixed issues with usage reporting, especially for user-managed keys and custom models.
151
+ - Numerous bug fixes for LLM connectors, model selection, and streaming.
152
+ - Fixed issues with S3 connector initialization, serverless code component, and vault key fetching.
153
+ - Improved error handling for binary input, file uploads, and API calls.
154
+ - Fixed issues with usage reporting, especially for user-managed keys and custom models.
83
155
 
84
156
  ### Improvements
85
157
 
86
- - Optimized build processes.
87
- - Improved strong typing and code auto-completion.
158
+ - Optimized build processes.
159
+ - Improved strong typing and code auto-completion.
88
160
 
89
161
  ## [v1.5.0] SmythOS becomes open source!
90
162
 
91
163
  ### Features
92
164
 
93
- - Moved to a monorepo structure
94
- - Implemented an SDK that provides an abstracted interface for all SmythOS components
95
- - Implemented a CLI to help running agents and scaffolding SDK and SRE projects along
165
+ - Moved to a monorepo structure
166
+ - Implemented an SDK that provides an abstracted interface for all SmythOS components
167
+ - Implemented a CLI to help running agents and scaffolding SDK and SRE projects along
96
168
 
97
169
  ## [v1.4.0]
98
170
 
99
171
  ### Features
100
172
 
101
- - New connectors : JSON Account connector, RAMVec vectordb, localStorage
102
- - Conversation manager: better handling of agent chats
103
- - logger becomes a connector
104
- - Add support for usage reporting
105
- - LLM : new models provider connector allows loading custom models including local models
173
+ - New connectors : JSON Account connector, RAMVec vectordb, localStorage
174
+ - Conversation manager: better handling of agent chats
175
+ - logger becomes a connector
176
+ - Add support for usage reporting
177
+ - LLM : new models provider connector allows loading custom models including local models
106
178
 
107
179
  ## [v1.2.0]
108
180
 
109
181
  ### Features
110
182
 
111
- - New connectors : AWS Secret Manager Vault, Redis, and RAM Cache
112
- - Conversation manager: better handling of agent chats
113
- - All connectors inherit from SecureConnector using a common security layer
114
- - LLM : support for anthropic, Groq and Gemini
183
+ - New connectors : AWS Secret Manager Vault, Redis, and RAM Cache
184
+ - Conversation manager: better handling of agent chats
185
+ - All connectors inherit from SecureConnector using a common security layer
186
+ - LLM : support for anthropic, Groq and Gemini
115
187
 
116
188
  ## [v1.1.0]
117
189
 
118
190
  ### Features
119
191
 
120
- - New connectors : S3, Pinecone, and local vault
121
- - LLM : implemented common LLM interface to support more providers
192
+ - New connectors : S3, Pinecone, and local vault
193
+ - LLM : implemented common LLM interface to support more providers
122
194
 
123
195
  ## [v1.0.0]
124
196
 
125
197
  ### Features
126
198
 
127
- - Initial release
128
- - LLM : support for openai API
129
- - Smyth Runtime Core
130
- - Connectors Serivece
131
- - Subsystems architecture
132
- - Security & ACL helpers
133
- - Implemented services : AgentData, Storage, Account, VectorDB
199
+ - Initial release
200
+ - LLM : support for openai API
201
+ - Smyth Runtime Core
202
+ - Connectors Serivece
203
+ - Subsystems architecture
204
+ - Security & ACL helpers
205
+ - Implemented services : AgentData, Storage, Account, VectorDB