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]>
45 lines
1.2 KiB
Bash
45 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
# Check if a file path is provided as an argument
|
|
if [ $# -eq 1 ]; then
|
|
target_file=$1
|
|
echo "Target file provided: $target_file"
|
|
else
|
|
# Run ESLint and capture its output
|
|
eslint_output=$(npm run lint 2>&1)
|
|
|
|
# Extract the last mentioned file path from the ESLint output
|
|
target_file=$(echo "$eslint_output" | grep -oP '/home/danny/agents/\K.*\.ts' | tail -n 1)
|
|
|
|
if [ -z "$target_file" ]; then
|
|
echo "No TypeScript files with issues found in the ESLint output."
|
|
exit 1
|
|
fi
|
|
|
|
echo "Using last file from ESLint output: $target_file"
|
|
fi
|
|
|
|
# Check if the target file exists
|
|
if [ ! -f "$target_file" ]; then
|
|
echo "File not found: $target_file"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Analyzing file: $target_file"
|
|
|
|
# Run the ESM error checker on the target file
|
|
js_output=$(node esm-error-checker.mjs "$target_file")
|
|
|
|
# Print the output
|
|
echo -e "$js_output"
|
|
|
|
# Save the output to a file
|
|
echo -e "$js_output" > lint_output.txt
|
|
echo "Output saved to lint_output.txt"
|
|
|
|
# Try to copy to clipboard, if xclip is available
|
|
if command -v xclip > /dev/null; then
|
|
echo -e "$js_output" | xclip -selection clipboard
|
|
echo "Output copied to clipboard."
|
|
fi
|