- Updated the TraceNode structure to allow multiple parent IDs, facilitating implicit joins in trace management.
- Enhanced the TraceNodeOption to include a type field for better categorization of nodes.
- Refactored related methods in the trace manager and node handling to accommodate the new parent structure and type field.
- Improved test coverage for trace node creation and retrieval, ensuring robust handling of the new multi-parent functionality.
- Integrated i18n translations for trace logging messages in the Assistant's Stream method, improving localization for user-facing messages.
- Updated logging in the OpenAI provider and CUI writer to utilize i18n for error messages, enhancing clarity and consistency across different locales.
- Added new embedded template handling in the i18n package, allowing for more flexible message formatting with variable substitutions.
- Improved test coverage for i18n functionalities, ensuring robust handling of various translation scenarios and edge cases.
- Changed event field names in tests from "Type", "TraceID", and "Timestamp" to "type", "trace_id", and "timestamp" to align with the updated API format.
- Updated struct field tags in types.go to reflect the new naming conventions, ensuring consistency across the codebase and improving JSON serialization.
- Adjusted indentation and formatting in the OpenAI provider's logging statements to enhance readability and maintainability.
- Cleaned up test files by removing unnecessary blank lines, improving overall code clarity and consistency.
- Ensured that logging for request and response details is properly structured for better debugging capabilities.
- Introduced new methods in the trace manager for retrieving events, trace info, nodes, logs, and spaces from storage, improving data access and management.
- Updated the driver implementations to support loading and unarchiving traces, ensuring robust handling of trace data.
- Enhanced error handling and logging in the OpenAI provider to facilitate better debugging and traceability of requests and responses.
- Added a new TraceSpaceData struct to encapsulate space metadata along with key-value data for improved API responses.
- Added functionality to archive traces by compressing and marking them as read-only, enhancing data management capabilities.
- Introduced methods for checking if a trace is archived and for unarchiving traces, allowing for better control over trace data.
- Updated the trace manager and driver interfaces to support archiving operations, ensuring consistency across components.
- Enhanced error handling for operations on archived traces, preventing modifications to read-only data.
- Improved trace metadata structure to include archived status and timestamp, facilitating better trace lifecycle management.
- Adjusted the formatting of the persistNode struct fields to enhance code clarity by aligning the field definitions.
- Maintained the existing functionality while improving the overall structure for better maintainability.
- Updated the Assistant's Stream method to set output for the agent node and conditionally close the output writer based on call depth, improving resource management.
- Integrated detailed trace logging for output closure events, distinguishing between root and nested calls to enhance debugging capabilities.
- Refactored trace creation in context to utilize authorized information for better trace context management.
- Introduced a lightweight persistNode structure for efficient storage of trace nodes, optimizing the save and load operations in local and store drivers.
- Integrated trace management into the Assistant's Stream method, allowing for detailed logging of processing steps and errors.
- Improved error handling in the OpenAI stream and post methods, adding trace logs for retries and failures.
- Enhanced CUI and OpenAI writers to log message adaptation and sending errors, improving debugging capabilities.
- Updated trace manager to use milliseconds for timestamps, ensuring consistency across the trace system.
- Refactored log methods in the trace node to streamline logging and broadcasting of events.
- Added an interrupt controller to manage user interrupts during streaming operations.
- Introduced methods for registering and unregistering contexts in a global registry to facilitate interrupt handling.
- Enhanced the Assistant's Stream method to check for force interrupts and handle them appropriately.
- Updated context creation to include unique IDs for better identification during interrupts.
- Implemented logic for graceful and force interrupts, allowing for flexible response to user signals.
- Introduced a trace manager in the context struct for lazy initialization and management of trace operations.
- Implemented the Trace method in the context to facilitate trace object creation and management within JavaScript.
- Enhanced configuration options for trace drivers, including defaults for local and store drivers, and added path and prefix settings.
- Updated related tests to verify the functionality of the new trace management features.
- Adjusted indentation and formatting in `trace_concurrent_test.go` and `trace_node_test.go` to enhance code clarity.
- Ensured consistent structure in test cases by aligning the setup and assertions, improving overall maintainability.
- Replaced the previous node and space management with a channel-based state management system in `manager.go`, enhancing concurrency handling.
- Implemented methods for loading and saving trace updates to disk in `local/driver.go` and `store/driver.go`, allowing for persistent state across sessions.
- Updated subscription handling in `subscription.go` to streamline the process of broadcasting updates to active subscribers.
- Enhanced node and trace status management, including cancellation and completion states, to provide better control over trace execution.
- Adjusted related tests to ensure compatibility with the new state management approach.
- Removed unnecessary blank lines in multiple test files to enhance code clarity and maintainability.
- Adjusted formatting in `subscription.go`, `trace_bench_test.go`, `trace_concurrent_test.go`, `trace_mem_test.go`, `trace_node_test.go`, `trace_space_test.go`, and `trace_subscription_test.go` for consistency.
- Updated benchmark and memory leak detection commands in the Makefile to include both agent and trace components.
- Refactored the manager struct in `manager.go` to support cancellable contexts and added per-space locks for improved concurrency safety.
- Enhanced subscription handling in `subscription.go` to only broadcast updates if there are active subscribers, preventing unnecessary operations.
- Implemented comprehensive disk operations in `local/driver.go` and `store/driver.go` for managing trace nodes, spaces, and logs, including loading, saving, and deleting functionalities.
- Improved README documentation to clarify driver configurations and usage examples for trace management.
- Updated trace ID validation in `TestEnterStack_RootCreation` to ensure it is at least 8 digits long.
- Changed import path for the trace package in `stack.go` for consistency.
- Removed the entire `manager.go`, `node.go`, `space.go`, `subscription.go`, `trace.go`, `local/driver.go`, `store/driver.go`, and related types and events files to streamline the trace package, focusing on essential functionality.
- Introduced a global trace registry to manage active traces with thread-safe access.
- Added support for two storage drivers: Local (file-based) and Store (Gou store).
- Enhanced trace ID generation to include a date prefix and improved uniqueness.
- Implemented functions for creating, loading, and releasing traces, along with checking their existence in both the registry and persistent storage.
- Added functionality to retrieve trace metadata and list active traces, improving trace management capabilities.
- Added a new field to track the current message type (text, thinking, tool_call) in the streamState struct.
- Updated message handling methods to set the current message type appropriately.
- Modified the group end handling to use the tracked message type when sending messages, ensuring accurate type representation.
- Enhanced unit tests to verify the correct handling of group end events and their associated types.
- Changed the Vision field in ModelCapabilities from bool to interface{} to accommodate both boolean values and VisionFormat strings.
- Modified the getConnectorCapabilities function to directly assign the Vision capability based on the updated model configuration, enhancing compatibility with various vision input formats.
- Integrated Claude API keys into GitHub workflows for both unit and PR tests.
- Introduced a new VisionFormat type and constants to manage image input formats.
- Updated ModelCapabilities to support vision input, allowing for flexible handling of image formats.
- Enhanced VisionAdapter to preprocess messages and convert image URLs to base64 format for Claude compatibility.
- Improved OpenAI provider to utilize vision support in message preprocessing, ensuring better integration with vision capabilities.
- Renamed and refactored functions and variables to transition from connector settings to model capabilities, enhancing clarity and consistency.
- Updated the loading mechanism to read model capabilities from `models.yml` instead of `connectors.yml`.
- Adjusted the assistant's global settings to utilize model capabilities, ensuring proper integration with the new configuration structure.
- Enhanced the reasoning adapter to support temperature adjustment based on model capabilities, improving flexibility in handling reasoning parameters.
- Added DeepSeek API keys and model configurations to the GitHub workflows for both unit and PR tests.
- Introduced a new `ReasoningEffort` parameter in the `CompletionOptions` struct to manage reasoning levels for models like o1 and GPT-5.
- Updated the `ReasoningAdapter` to handle the new `ReasoningEffort` parameter, ensuring it is stripped if not supported by the model.
- Enhanced the OpenAI provider to preprocess options through adapters, improving the handling of reasoning content and ensuring compatibility with DeepSeek R1 reasoning format.
- Removed legacy and audio providers, consolidating functionality into a new architecture that separates API format handling from capability management.
- Updated the OpenAI provider to support capability adapters for tool calls, vision, audio, and reasoning, enhancing modularity and extensibility.
- Introduced a new method for detecting API formats and streamlined the provider selection process.
- Enhanced documentation to reflect the new architecture and clarify provider capabilities and usage.
- Added logic to ignore "done" messages that are not delta updates, ensuring that final confirmation messages are not sent to OpenAI clients, which rely on finish_reason instead.
- Added support for lifecycle event messages, including a new event type for tracking stream states (e.g., stream_start, stream_end).
- Introduced a NewEventMessage function to create event messages with structured properties.
- Updated the output package to include event messages in the built-in types, ensuring compatibility with CUI clients while remaining silent for OpenAI clients.
- Enhanced the DefaultStreamHandler to utilize event messages for better lifecycle tracking during streaming operations.
- Improved error handling and logging in the OpenAI provider to capture and report streaming errors effectively.
- Implemented a state management system for handling different streaming chunk types, including stream start, group start, text, thinking, tool calls, metadata, errors, and stream end.
- Introduced a new Send method in the context to facilitate message sending to the client.
- Enhanced the output package with message sending capabilities, including support for message groups and flushing.
- Improved error handling and message ID generation for better streaming reliability and user feedback.
- Added context cancellation handling in the OpenAI provider's Stream and Post methods, allowing for graceful termination of operations when the context is cancelled.
- Implemented a new test, TestOpenAIStreamContextCancellation, to validate that streaming respects context cancellation, ensuring proper error handling and event emission during cancellation scenarios.
- Refactored context usage in existing methods to improve consistency and reliability in handling context across streaming operations.
- Removed unnecessary blank lines in the TestOpenAIStreamLifecycleEvents function to improve code readability.
- Adjusted log formatting for group_end event to ensure consistent output during test execution.
- Added support for stream lifecycle events including stream_start, stream_end, group_start, and group_end.
- Introduced new data structures for handling lifecycle event data, enhancing communication of stream boundaries and metadata.
- Updated the OpenAI provider to track and emit these events during streaming operations, improving UI/UX capabilities.
- Added tests to validate the correct emission and order of lifecycle events during streaming.
- Introduced TestOpenAIJSONMode and TestOpenAIJSONModePost to validate JSON response formatting for streaming and non-streaming requests.
- Added TestOpenAIJSONSchema and TestOpenAIJSONSchemaPost to ensure compliance with strict JSON schema validation.
- Enhanced request body construction in the OpenAI provider to support JSON schema details in response formats.
- Added message preprocessing in the base provider to filter unsupported content types (vision and audio) based on model capabilities.
- Introduced new methods in the OpenAI provider for handling streaming and non-streaming requests with retry logic and tool call validation.
- Enhanced request body building to support various options and improved error handling for API interactions.
- Implemented validation for tool call arguments against JSON schemas, ensuring compliance with expected formats.
- Upgraded Go version to 1.25 and updated several dependencies, including `testify` to v1.11.1 and added new indirect dependencies for JSON schema validation.
- Refactored the assistant's context management to utilize a new `context.Uses` structure, improving the handling of vision, audio, search, and fetch configurations.
- Enhanced the assistant's request building process to support new response formats, including JSON schema validation, ensuring better integration with various tools and services.
- Added global uses configuration to the assistant, allowing for centralized management of vision, audio, search, and fetch settings.
- Updated the Assistant struct and related methods to support the new Uses configuration, improving flexibility in assistant operations.
- Refactored the Stream method to utilize the new CompletionResponse type, enhancing response handling.
- Introduced new methods for building requests and managing capabilities, streamlining the assistant's interaction with various connectors.
- Refactored the Makefile to include new benchmark and memory leak detection tests, improving test coverage.
- Introduced context adjustments in the Create method, allowing hooks to modify context fields such as AssistantID, Connector, Locale, Theme, Route, and Metadata.
- Added a new test scenario to validate context field adjustments, ensuring proper updates during assistant operations.
- Updated test preparation to support optional V8 mode configuration for improved performance during benchmarks.
- Introduced a new test scenario to verify context fields in the assistant's JavaScript execution.
- Enhanced validation checks for response messages, ensuring proper handling of success and failure indicators.
- Improved logging for detailed validation results, aiding in debugging and verification of context handling.
- Introduced a new test context creation function to streamline test setup for assistant operations.
- Refactored context structure to replace the deprecated 'Data' field with 'Metadata', improving clarity and consistency.
- Updated various methods to utilize the new 'Metadata' field, ensuring proper handling of request metadata across the system.
- Adjusted tests to reflect changes in metadata handling, enhancing validation of context fields in JavaScript integration.
- Updated the Create method in the Script type to return a structured HookCreateResponse instead of the previous ResponseHookCreate.
- Enhanced the getHookCreateResponse method to handle various response scenarios, including nil and undefined results.
- Refactored context types to introduce the new HookCreateResponse structure, which includes fields for messages, audio configuration, generation parameters, and metadata.
- Adjusted related methods in the Assistant to ensure compatibility with the new response structure.
- Implemented TestCreate to validate the creation of the 'tests.create' assistant.
- Added context handling for the assistant, ensuring proper execution of the script with a sample user message.
- Enhanced error handling to check for the presence of the script in the assistant.
- Updated the objectRegister method to generate a new ID internally, simplifying the API by removing the need for an external ID parameter.
- Adjusted the NewObject method to utilize the new object registration mechanism, ensuring proper ID assignment and resource cleanup during instance creation.
- Implemented TestJsValueConcurrent to validate the JsValue function under concurrent requests, ensuring proper handling of multiple goroutines.
- Added TestJsValueRegistrationAndCleanup to verify the registration and cleanup of context objects, enhancing resource management.
- Introduced object registration and release mechanisms in the Context type to manage JavaScript object lifecycles effectively.
- Utilized sync.Mutex for thread-safe access to shared resources, improving the robustness of concurrent operations.
- Updated the Stream method to return a structured response, including create, done, and completion hooks.
- Introduced new methods for managing message history and building LLM requests, enhancing modularity.
- Refactored the Script type to utilize a new hook structure, improving code organization.
- Removed the obsolete hooks file to streamline the codebase.
- Enhanced context types with additional fields for better integration with LLM models.
- Updated Stream and Run methods in the Assistant to use pointer receivers for context, enhancing performance and clarity.
- Introduced stack management in context handling, including initialization and cleanup of stack references.
- Enhanced the Release method in Context to ensure proper cleanup of resources, including stacks and writer references.
- Added new stack status constants and validation to improve traceability and error handling in agent operations.
- Removed the obsolete JavaScript API file to streamline the codebase.