mirror of
https://github.com/hanzochat/agents.git
synced 2026-10-30 20:55:06 +00:00
* chore: test workers and concurrency, remove ESLint configuration and ignore files; add .gitattributes for line endings; introduce scripts for line ending fixes and Zone.Identifier removal * WIP: first pass, StandardGraph rewrite to align with LangGraph patterns for Multi-Agent Composability * fix: revert tool end handler changes * chore: update model var name in StandardGraph's attemptInvoke method * chore: remove unused PoC graph types * fix: add 'emitted' flag to prevent manual tool stream double-call, rename single-agent node, optimize empty chunk check * feat: enhance StandardGraph with new message reducer and system runnable, update LLM configurations * feat: Introduce AgentContext for managing agent-specific state in multi-agent systems - Added AgentContext class to encapsulate agent-specific state and configuration. - Updated Graph and StandardGraph to support multiple agents and their contexts. - Refactored event handling to utilize AgentContext for provider and token management. - Modified run and stream handling to accommodate agent-specific configurations. - Enhanced type definitions for agent inputs and graph configurations. - Adjusted tool handling to integrate with the new agent context structure. * fix: update toolsCondition to accept toolNode parameter * chore: update LLM model from 'gpt-5-mini' to 'gpt-4.1' in llmConfigs * ci: update tests with new configs * refactor: AgentContext to calculate tool tokens and update instruction tokens with tokenCounter * refactor: update agentNode and toolNode declarations to use 'as const' for improved type safety * chore: update Run and StandardGraph classes to use CompiledStateWorkflow for improved type consistency * WIP: first pass, multi-agent graph * chore: update @langchain/core dependency to version 0.3.72 * chore: update @langchain/langgraph dependency to version 0.4.9 * chore: correct type name from CompiledStateWorkflow to CompiledAgentWorkflow in Graph and MultiAgentGraph classes * chore: remove unused fanout concept code * chore: improve paralell workflow prompts * fix: update messages reducer to store result in class property * feat: introduce promptInstructions feature for dynamic human prompts in multi-agent scenarios * refactor: update event handler methods to return promises and await them, due to async nature of dispatchCustomEvent, and typing support MultiAgentGraph * feat: implement custom event handling in Run class * refactor: streamline edge categorization and enhance fan-in prompt handling in MultiAgentGraph * chore: cleanup types, imports, comments * chore: reorder imports for improved readability in MultiAgentGraph * refactor: remove deprecated createGraphState method and adjust startIndex to be Graph field as defined by initial parent state * refactor: token management by introducing a singleton token counter and a TokenEncoderManager for better resource control * chore: remove unused handoff tool example * chore: bun install * chore: update version to 3.0.00-rc1 in package.json and types/package.json * refactor: update edgeType from 'parallel' to 'direct', and add multi-agent-sequence script * refactor: rename 'parallelEdges' to 'directEdges' and update related comments for clarity in MultiAgentGraph Co-authored-by: Hanzo Dev <[email protected]>
69 lines
1.9 KiB
Bash
Executable File
69 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Script to convert all CRLF line endings to LF in the project
|
|
|
|
echo "Fixing line endings from CRLF to LF..."
|
|
echo
|
|
|
|
# Function to convert files
|
|
convert_files() {
|
|
local pattern=$1
|
|
local description=$2
|
|
|
|
echo "Converting $description files..."
|
|
find . -type f -name "$pattern" \
|
|
-not -path "./node_modules/*" \
|
|
-not -path "./dist/*" \
|
|
-not -path "./.git/*" \
|
|
-not -path "./coverage/*" \
|
|
-not -path "./types/*" \
|
|
-print0 | while IFS= read -r -d '' file; do
|
|
# Check if file has CRLF endings
|
|
if file "$file" | grep -q "CRLF"; then
|
|
echo " Converting: $file"
|
|
# Convert CRLF to LF
|
|
sed -i 's/\r$//' "$file"
|
|
fi
|
|
done
|
|
}
|
|
|
|
# Convert TypeScript and JavaScript files
|
|
convert_files "*.ts" "TypeScript"
|
|
convert_files "*.tsx" "TypeScript JSX"
|
|
convert_files "*.js" "JavaScript"
|
|
convert_files "*.jsx" "JavaScript JSX"
|
|
convert_files "*.mjs" "JavaScript module"
|
|
|
|
# Convert configuration files
|
|
convert_files "*.json" "JSON"
|
|
convert_files "*.yml" "YAML"
|
|
convert_files "*.yaml" "YAML"
|
|
convert_files ".eslintrc*" "ESLint config"
|
|
convert_files ".prettierrc*" "Prettier config"
|
|
convert_files "*.md" "Markdown"
|
|
|
|
# Convert other common files
|
|
convert_files "*.sh" "Shell script"
|
|
convert_files "Dockerfile*" "Docker"
|
|
convert_files ".env*" "Environment"
|
|
convert_files ".gitignore" "Git ignore"
|
|
convert_files "LICENSE" "License"
|
|
|
|
echo
|
|
echo "Line ending conversion complete!"
|
|
|
|
# Show statistics
|
|
echo
|
|
echo "Checking for any remaining CRLF files..."
|
|
remaining=$(find . -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -o -name "*.json" \) \
|
|
-not -path "./node_modules/*" \
|
|
-not -path "./dist/*" \
|
|
-not -path "./.git/*" \
|
|
-exec file {} \; | grep -c "CRLF")
|
|
|
|
if [ "$remaining" -eq 0 ]; then
|
|
echo "✅ All files now use LF line endings!"
|
|
else
|
|
echo "⚠️ Found $remaining files still with CRLF endings"
|
|
fi
|