PYAE1994's picture
Upload folder using huggingface_hub
dd480ef verified
#!/bin/bash
set -e
cd /home/user/webapp
git config user.email "pyaesonegtckglay-dotcom@users.noreply.github.com"
git config user.name "pyaesonegtckglay-dotcom"
echo "=== Git Status ==="
git status --short
echo "=== Staging all changes ==="
git add -A
echo "=== Committing ==="
git commit -m "feat: Workflow Factor OS v2.0 β€” Full Production Upgrade
BREAKING CHANGES & MAJOR FEATURES:
## LLM Gateway (Provider-Agnostic)
- REMOVED: direct OpenAI SDK dependency from all agents
- ADDED: integrations/llm-providers/index.ts β€” pure fetch-based LLM gateway
- SUPPORTS: openai | anthropic | openai-compatible | custom endpoints
- FEATURES: retry with exponential backoff, fallback provider, timeout handling
- CONFIG: LLM_API_KEY, LLM_GATEWAY_URL, LLM_MODEL, LLM_PROVIDER env vars
- BACKWARD COMPAT: OPENAI_API_KEY still supported as legacy fallback
## Node Registry System (Strict β€” No Hallucinated Nodes)
- REBUILT: apps/simulator/src/knowledge/nodeRegistry.ts β€” 35+ real n8n nodes
- ADDED: NodeRegistryEntry interface with full schema per node type
- ADDED: isValidNodeType(), getNodeDef(), getTriggerNodeTypes() helpers
- ENFORCED: unknown node types REJECTED at graph engine + validator stages
- COVERS: Triggers, AI/LLM, Transform, HTTP, Messaging, Productivity, Database, CRM, Utility
## Swarm Multi-Agent Orchestration
- NEW: apps/simulator/src/services/swarmOrchestrator.ts
- RUNS: 1-5 parallel workflow design candidates simultaneously
- STRATEGIES: Reliability-First, Simplicity-First, Observability-First, AI-Optimized, Pipeline-Optimized
- SELECTS: best design via quality scoring (validation + registry + expression + dataflow)
- CONFIG: swarmSize option (default: 3)
## Self-Healing System
- NEW: apps/simulator/src/services/selfHealing.ts
- PHASE 1: Rule-based deterministic fixes (active:false, IDs, positions, retry, onError, unknown nodes)
- PHASE 2: AI-assisted healing for complex expression/logic issues
- MEMORY: records failure patterns, applies historical fixes
- TRIGGERS: automatically on validation failure before re-validation
## Memory / Learning System
- NEW: apps/simulator/src/services/memorySystem.ts
- STORES: successful patterns, failed patterns, fix strategies, architecture templates
- BUILT-IN: 4 high-performing templates (Telegram Bot, Webhook Pipeline, Data Pipeline, Email-CRM)
- INFLUENCES: planning (memory context injection), architecture selection
- STATS: getStats() for reporting
## Webhook Auto-Bind System
- NEW: apps/simulator/src/services/webhookAutoBind.ts
- AUTO-DETECTS: trigger type from user request + intent (Telegram, Slack, GitHub, Email, Schedule, Webhook, Manual)
- AUTO-GENERATES: webhook paths, trigger settings, credential stubs
- INJECTS: trigger node into graph automatically
- USER: never needs to manually define triggers
## Validation Engine (UPGRADED β€” 7 stages)
- ADDED: Stage F β€” NodeRegistry validation (rejects unknown/hallucinated node types)
- ADDED: Stage G β€” DataFlow validation (SET empty, CODE placeholder, IF no conditions)
- UPGRADED: Expression validation (static nodes, placeholder detection, unsafe access)
- SCORE: 7-dimension weighted scoring
## All Agents Upgraded (Provider-Agnostic)
- intentInterpreter.ts: uses LLMGateway, detects triggerType for auto-bind
- workflowPlanner.ts: uses LLMGateway
- graphEngine.ts: uses LLMGateway + validates all node types against registry
- compiler.ts: uses LLMGateway + strict expression rules + node schema injection
- validator.ts: uses LLMGateway + 7-stage validation
- simulator.ts: uses LLMGateway + chaos testing + deployment blockers
- credentialIntelligence.ts: uses registry for credential mapping
## All Prompts Upgraded
- intentInterpreter: triggerType detection added
- workflowPlanner: strict node type rules, expression examples, anti-placeholder rules
- graphEngine: registry enforcement, expression requirements, data contract rules
- compiler: full expression guide (correct/wrong examples), node-specific rules
- simulator: scoring formula, chaos scenarios, deployment blockers
## wrangler.toml (Added/Upgraded)
- LLM_PROVIDER, LLM_GATEWAY_URL, LLM_MODEL vars
- Development environment overrides
- Production environment section
- Secrets documentation updated
## Worker (Upgraded)
- types/env.ts: LLM_GATEWAY_URL, LLM_MODEL, LLM_PROVIDER, LLM_FALLBACK_* added
- types/workflow.ts: SwarmResultSummary, TriggerDetectionResult, HealingResultSummary types added
- routes/generate.ts: passes LLM config to simulator, stores swarm/healing/trigger results
- routes/health.ts: capabilities info, safety policy documentation
- routes/validate.ts, simulate.ts: llmApiKey support (legacy openaiApiKey still works)
## Safety Rules (Maintained)
- NEVER auto-activate workflows
- ALWAYS validate + simulate before deploy
- ALWAYS require human approval before activation
- NEVER deploy partially valid workflows
- NEVER allow unknown node types
- active: false enforced at compiler + self-healing stages"
echo "=== Pushing to main ==="
git push origin main
echo "=== Done! ==="