adaptive-memory-multi-model-router 2.14.45 → 2.14.47
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.
- package/dist/index.d.ts +4 -0
- package/dist/index.js +8 -2
- package/dist/memory/hybridMemory.d.ts +71 -0
- package/dist/memory/hybridMemory.js +124 -0
- package/dist/memory/reasoningBank.d.ts +88 -0
- package/dist/memory/reasoningBank.js +303 -0
- package/{docs/llms.txt → llms.txt.bak} +6 -6
- package/package.json +13 -84
- package/src/index.ts +8 -0
- package/src/memory/hybridMemory.ts +155 -0
- package/src/memory/reasoningBank.ts +335 -0
- package/src/routing/advancedRouter.ts.bak +650 -0
- package/test.js.bak +376 -0
- package/.dockerignore +0 -82
- package/.env.example +0 -303
- package/.github/DISCUSSIONS_WELCOME.md +0 -27
- package/.github/DISCUSSION_TEMPLATE.yml +0 -5
- package/.github/FUNDING.yml +0 -2
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -94
- package/.github/ISSUE_TEMPLATE/config.yml +0 -17
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -71
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -71
- package/.github/dependabot.yml +0 -9
- package/.github/workflows/auto-publish.yml +0 -51
- package/.github/workflows/ci.yml +0 -263
- package/.github/workflows/codeql.yml +0 -38
- package/.github/workflows/npm-publish.yml +0 -20
- package/.github/workflows/pages.yml +0 -37
- package/.github/workflows/stale.yml +0 -54
- package/.publish-tick +0 -1
- package/.well-known/ai-plugin.json +0 -16
- package/AGENT_COUNCIL_FINDINGS.md +0 -142
- package/ARCHITECTURE.md +0 -346
- package/AUDIT_REPORT.md +0 -28
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -50
- package/CONTRIBUTORS.md +0 -20
- package/Dockerfile +0 -53
- package/Dockerfile.proxy +0 -33
- package/HEALTH_REPORT.md +0 -118
- package/IMPROVEMENT_PLAN.md +0 -107
- package/LANDING.md +0 -43
- package/LAUNCH-PAIN-DRIVEN.md +0 -339
- package/LAUNCH.md +0 -337
- package/LAUNCH_CHECKLIST.md +0 -141
- package/LAUNCH_SNAPSHOT.md +0 -260
- package/MANIFESTO.md +0 -41
- package/POPULARITY_BOOSTERS.md +0 -285
- package/PR_STATUS_REPORT.md +0 -148
- package/REDESIGN.md +0 -95
- package/RUNKIT.md +0 -83
- package/SECURITY.md +0 -29
- package/SUBMISSIONS.md +0 -43
- package/_schema.html +0 -53
- package/ai-plugin.json +0 -16
- package/articles/AI_AGENT_LLM_ROUTING.md +0 -150
- package/articles/CHINESE_DIRECTORIES.md +0 -100
- package/articles/CHINESE_SUBMISSIONS_READY.md +0 -322
- package/articles/COMPETITOR_ALERTS.md +0 -31
- package/articles/COMPLETE_POSTING_DIRECTORY.md +0 -147
- package/articles/CONTENT_STRUCTURE.md +0 -292
- package/articles/DEVTO_COST_GUIDE.md +0 -473
- package/articles/DEVTO_FINAL.md +0 -416
- package/articles/DEVTO_MULTI_PROVIDER.md +0 -542
- package/articles/DEVTO_READY.md +0 -255
- package/articles/DEVTO_V2_ANNOUNCEMENT.md +0 -160
- package/articles/DEVTO_VIRAL_GROWTH.md +0 -280
- package/articles/FRESH_devto.md +0 -460
- package/articles/FRESH_devto_2026_05.md +0 -73
- package/articles/FRESH_hackernews.md +0 -14
- package/articles/FRESH_reddit_ml.md +0 -90
- package/articles/FRESH_reddit_node.md +0 -198
- package/articles/FRESH_reddit_sideproject.md +0 -72
- package/articles/FRESH_reddit_webdev.md +0 -130
- package/articles/FROM_ZERO_TO_10K.md +0 -107
- package/articles/HN_10X_BETTER.md +0 -430
- package/articles/HN_ACCOUNT_GUIDE.md +0 -21
- package/articles/HN_CHINESE_STYLE.md +0 -308
- package/articles/HN_FINAL.md +0 -148
- package/articles/HN_POSTED_VERSION.md +0 -56
- package/articles/HN_POST_READY.md +0 -137
- package/articles/HN_RESEARCH.md +0 -364
- package/articles/HN_SHOW_routerarena.md +0 -17
- package/articles/HN_TIMING_GUIDE.md +0 -52
- package/articles/INDIEHACKERS_POST.md +0 -52
- package/articles/INDIEHACKERS_READY.md +0 -120
- package/articles/LLM_BENCHMARK_DEEP_DIVE.md +0 -153
- package/articles/MASTER_POSTING_DIRECTORY.md +0 -189
- package/articles/NEWSLETTER_SEND_NOW.md +0 -259
- package/articles/NEWSLETTER_SUBMISSIONS.md +0 -112
- package/articles/PAIN-DRIVEN-devto-v2.md +0 -308
- package/articles/PAIN-DRIVEN-devto-v3.md +0 -268
- package/articles/PAIN-DRIVEN-devto.md +0 -242
- package/articles/PAIN-DRIVEN-hackernews-v2.md +0 -138
- package/articles/PAIN-DRIVEN-hackernews-v3.md +0 -151
- package/articles/PAIN-DRIVEN-hackernews.md +0 -131
- package/articles/PAIN-DRIVEN-reddit-v2.md +0 -301
- package/articles/PAIN-DRIVEN-reddit-v3.md +0 -236
- package/articles/PAIN-DRIVEN-reddit.md +0 -218
- package/articles/PAIN-DRIVEN-twitter-v2.md +0 -110
- package/articles/PAIN-DRIVEN-twitter-v3.md +0 -121
- package/articles/PAIN-DRIVEN-twitter.md +0 -120
- package/articles/PORTKEY_VS_A3M.md +0 -147
- package/articles/POSTING_KIT_2026_05.md +0 -67
- package/articles/PRESS_KIT_routerarena.md +0 -77
- package/articles/PRODUCTHUNT_LISTING.md +0 -48
- package/articles/PRODUCTHUNT_READY.md +0 -106
- package/articles/PR_PLAN_vault.md +0 -125
- package/articles/REDDIT_FINAL.md +0 -232
- package/articles/REDDIT_POST.md +0 -67
- package/articles/REDDIT_SUBMISSION_READY.md +0 -348
- package/articles/ROUTERARENA_LEADER.md +0 -45
- package/articles/SHOW_HN_FINAL.md +0 -29
- package/articles/TWEETS_10K_DOWNLOADS.md +0 -47
- package/articles/TWEETS_BENCHMARK_FIRST.md +0 -46
- package/articles/TWEETS_MCP_PLAY.md +0 -51
- package/articles/TWEETS_SEQUENTIAL_BROKEN.md +0 -49
- package/articles/TWEETS_WHY_BUILD.md +0 -54
- package/articles/TWEETS_routerarena_leader.md +0 -53
- package/articles/TWEET_STORM_READY.md +0 -165
- package/articles/TWITTER_FINAL.md +0 -167
- package/articles/WHY_10X_BETTER.md +0 -261
- package/articles/WHY_CHINESE_STYLE_BETTER.md +0 -323
- package/articles/ai-discoverability-llm-routing.md +0 -210
- package/articles/devto-llm-routing.md +0 -138
- package/articles/hackernews-show-hn.md +0 -54
- package/articles/hashnode-llm-cost-optimization.md +0 -125
- package/articles/hn_show_2026_05.md +0 -11
- package/articles/medium-building-llm-router.md +0 -205
- package/articles/reddit-ml.md +0 -76
- package/articles/twitter-thread-cost-savings.md +0 -50
- package/articles/youtube-tutorial-script.md +0 -262
- package/assets/a3m_3blue1brown.mp4 +0 -0
- package/assets/banner.svg +0 -109
- package/assets/chart-cost-v2.svg +0 -91
- package/assets/chart-cost-v3.svg +0 -143
- package/assets/chart-features-v2.svg +0 -132
- package/assets/chart-features-v3.svg +0 -211
- package/assets/chart-growth-v2.svg +0 -122
- package/assets/chart-growth-v3.svg +0 -189
- package/assets/cost-comparison.svg +0 -134
- package/assets/cost-simple.svg +0 -64
- package/assets/demo-hn.gif +0 -0
- package/assets/feature-matrix.svg +0 -136
- package/assets/growth-chart-animated.svg +0 -76
- package/assets/growth-chart.svg +0 -82
- package/assets/growth-simple.svg +0 -69
- package/assets/hero-diagram.svg +0 -81
- package/assets/logo-new.svg +0 -21
- package/assets/logo.svg +0 -68
- package/assets/provider-comparison.svg +0 -121
- package/assets/social-preview-new.svg +0 -100
- package/assets/social-preview.svg +0 -194
- package/assets/social-v2.svg +0 -130
- package/assets/social-v3.svg +0 -212
- package/benchmark-provider-results.json +0 -245
- package/benchmark-results.json +0 -54
- package/council-votes/architecture-vote.md +0 -121
- package/council-votes/coverage-vote.md +0 -93
- package/data/adaptive-benchmark.json +0 -92
- package/data/benchmark-results.json +0 -47
- package/data/labeled-benchmark.json +0 -88
- package/demo/3blue1brown_video.py +0 -285
- package/demo/3blue1brown_video_v2.py +0 -310
- package/demo/IMPROVED_PROMPTS.md +0 -229
- package/demo/VEO3_PROMPTS.md +0 -269
- package/demo/VIDEO_PRODUCTION_GUIDE.md +0 -333
- package/demo/a3m_3blue1brown.mp4 +0 -0
- package/demo/asciinema-demo.sh +0 -195
- package/demo/demo-hn.tape +0 -74
- package/demo/demo-script.md +0 -53
- package/demo/demo-script.sh +0 -62
- package/demo/demo.svg +0 -75
- package/demo/frame1_ai_data_center.png +0 -0
- package/demo/frame1_sunset_video.mp4 +0 -0
- package/demo/frame2_cost_comparison.png +0 -0
- package/demo/frame2_cost_comparison_fallback.png +0 -0
- package/demo/frame3_parallel_execution.png +0 -0
- package/demo/frame3_parallel_execution_fallback.png +0 -0
- package/demo/frame4_providers.png +0 -0
- package/demo/frame4_providers_fallback.png +0 -0
- package/demo/frame5_endcard.png +0 -0
- package/demo/frame5_endcard_fallback.png +0 -0
- package/demo/new_frame1_hook.png +0 -0
- package/demo/new_frame2_proof.png +0 -0
- package/demo/new_frame3_wow.png +0 -0
- package/demo/new_frame4_social.png +0 -0
- package/demo/new_frame5_cta.png +0 -0
- package/demo/package.json +0 -13
- package/demo/product-video-final.mp4 +0 -0
- package/demo/product-video-hype-v1.mp4 +0 -0
- package/demo/product-video-v1.mp4 +0 -0
- package/demo/public/index.html +0 -762
- package/demo/recording.cast +0 -55
- package/demo/server.js +0 -405
- package/demo-new.tape +0 -71
- package/demo-real.sh +0 -198
- package/demo-simple.tape +0 -205
- package/demo.html +0 -520
- package/demo.sh +0 -85
- package/demo.tape +0 -259
- package/dist/analytics/costAnalytics.d.ts.map +0 -1
- package/dist/analytics/costAnalytics.js.map +0 -1
- package/dist/benchmark/comprehensive.js.map +0 -1
- package/dist/benchmark/reproducible.d.ts.map +0 -1
- package/dist/benchmark/reproducible.js.map +0 -1
- package/dist/cache/prefixCache.d.ts.map +0 -1
- package/dist/cache/prefixCache.js.map +0 -1
- package/dist/cache/responseCache.d.ts.map +0 -1
- package/dist/cache/responseCache.js.map +0 -1
- package/dist/cache/semanticCache.d.ts.map +0 -1
- package/dist/cache/semanticCache.js.map +0 -1
- package/dist/cli/setupWizard.d.ts.map +0 -1
- package/dist/cli/setupWizard.js.map +0 -1
- package/dist/cost/budgetEnforcer.d.ts.map +0 -1
- package/dist/cost/budgetEnforcer.js.map +0 -1
- package/dist/cost/costTracker.d.ts.map +0 -1
- package/dist/cost/costTracker.js.map +0 -1
- package/dist/ensemble/multiRoundDialog.js.map +0 -1
- package/dist/ensemble/shapleyValue.js.map +0 -1
- package/dist/integrations/langchainAdapter.d.ts.map +0 -1
- package/dist/integrations/langchainAdapter.js.map +0 -1
- package/dist/integrations/oauth.d.ts.map +0 -1
- package/dist/integrations/oauth.js.map +0 -1
- package/dist/integrations/scienceAdapter.js.map +0 -1
- package/dist/memory/autoFetch.d.ts.map +0 -1
- package/dist/memory/autoFetch.js.map +0 -1
- package/dist/memory/episodicMemory.d.ts.map +0 -1
- package/dist/memory/episodicMemory.js.map +0 -1
- package/dist/memory/memoryTree.d.ts.map +0 -1
- package/dist/memory/memoryTree.js.map +0 -1
- package/dist/memory/obsidianVault.d.ts.map +0 -1
- package/dist/memory/obsidianVault.js.map +0 -1
- package/dist/observability/changeWatch.d.ts.map +0 -1
- package/dist/observability/changeWatch.js.map +0 -1
- package/dist/observability/fatigueDetector.d.ts.map +0 -1
- package/dist/observability/fatigueDetector.js.map +0 -1
- package/dist/observability/index.d.ts.map +0 -1
- package/dist/observability/index.js.map +0 -1
- package/dist/observability/metrics.d.ts.map +0 -1
- package/dist/observability/metrics.js.map +0 -1
- package/dist/observability/middleware.d.ts.map +0 -1
- package/dist/observability/middleware.js.map +0 -1
- package/dist/observability/tracer.d.ts.map +0 -1
- package/dist/observability/tracer.js.map +0 -1
- package/dist/observability/types.d.ts.map +0 -1
- package/dist/observability/types.js.map +0 -1
- package/dist/orchestration/haloOrchestrator.d.ts.map +0 -1
- package/dist/orchestration/haloOrchestrator.js.map +0 -1
- package/dist/orchestration/mctsWorkflow.d.ts.map +0 -1
- package/dist/orchestration/mctsWorkflow.js.map +0 -1
- package/dist/providers/localProvider.d.ts.map +0 -1
- package/dist/providers/localProvider.js.map +0 -1
- package/dist/providers/providerConfig.d.ts.map +0 -1
- package/dist/providers/providerConfig.js.map +0 -1
- package/dist/providers/registry.d.ts.map +0 -1
- package/dist/providers/registry.js.map +0 -1
- package/dist/routing/advancedRouter.d.ts.map +0 -1
- package/dist/routing/advancedRouter.js.map +0 -1
- package/dist/routing/crossModelValidation.d.ts.map +0 -1
- package/dist/routing/crossModelValidation.js.map +0 -1
- package/dist/routing/providerHealth.d.ts.map +0 -1
- package/dist/routing/providerHealth.js.map +0 -1
- package/dist/routing/providerRetry.d.ts.map +0 -1
- package/dist/routing/providerRetry.js.map +0 -1
- package/dist/scripts/banner.js +0 -29
- package/dist/security/guardrails.d.ts.map +0 -1
- package/dist/security/guardrails.js.map +0 -1
- package/dist/server/dashboard.d.ts.map +0 -1
- package/dist/server/dashboard.js.map +0 -1
- package/dist/server/modelMapper.d.ts.map +0 -1
- package/dist/server/modelMapper.js.map +0 -1
- package/dist/server/proxyServer.d.ts.map +0 -1
- package/dist/server/proxyServer.js.map +0 -1
- package/dist/skills/__tests__/skill_manager.test.d.ts +0 -2
- package/dist/skills/__tests__/skill_manager.test.d.ts.map +0 -1
- package/dist/skills/__tests__/skill_manager.test.js +0 -268
- package/dist/skills/__tests__/skill_manager.test.js.map +0 -1
- package/dist/tools/tmlpdTools.d.ts.map +0 -1
- package/dist/tools/tmlpdTools.js.map +0 -1
- package/dist/tui/dashboard.d.ts.map +0 -1
- package/dist/tui/dashboard.js.map +0 -1
- package/dist/tui/index.d.ts.map +0 -1
- package/dist/tui/index.js.map +0 -1
- package/dist/utils/batchProcessor.d.ts.map +0 -1
- package/dist/utils/batchProcessor.js.map +0 -1
- package/dist/utils/compression.d.ts.map +0 -1
- package/dist/utils/compression.js.map +0 -1
- package/dist/utils/costUtils.d.ts.map +0 -1
- package/dist/utils/costUtils.js.map +0 -1
- package/dist/utils/reliability.d.ts.map +0 -1
- package/dist/utils/reliability.js.map +0 -1
- package/dist/utils/sorting.d.ts.map +0 -1
- package/dist/utils/sorting.js.map +0 -1
- package/dist/utils/speculativeDecoding.d.ts.map +0 -1
- package/dist/utils/speculativeDecoding.js.map +0 -1
- package/dist/utils/tokenUtils.d.ts.map +0 -1
- package/dist/utils/tokenUtils.js.map +0 -1
- package/docs/.nojekyll +0 -0
- package/docs/ANALYSIS_PRINCIPLES.md +0 -162
- package/docs/API.md +0 -855
- package/docs/ARCHITECTURAL-IMPROVEMENTS-2025.md +0 -1391
- package/docs/ARCHITECTURAL-IMPROVEMENTS-REVISED-2025.md +0 -1051
- package/docs/BENCHMARK.md +0 -170
- package/docs/CHINESE_PROVIDER_RELIABILITY.md +0 -37
- package/docs/CITATIONS.md +0 -74
- package/docs/CLAIMS_AND_EVIDENCE.md +0 -58
- package/docs/CONFIGURATION.md +0 -476
- package/docs/COUNCIL_DECISION.json +0 -816
- package/docs/COUNCIL_SUMMARY.md +0 -319
- package/docs/COUNCIL_V2.2_DECISION.md +0 -416
- package/docs/ENGINEERING_SPEC.md +0 -55
- package/docs/FACTORY_RESET.md +0 -34
- package/docs/GEO.md +0 -66
- package/docs/GEO_OPTIMIZATION.md +0 -30
- package/docs/GEO_ROOT_CAUSE.md +0 -136
- package/docs/GEO_STATUS.md +0 -85
- package/docs/GEO_TEST_RESULTS.md +0 -176
- package/docs/HN_CHECKLIST.md +0 -38
- package/docs/HN_FOUNDER_COMMENT.md +0 -17
- package/docs/HN_SUBMISSION_FINAL.md +0 -180
- package/docs/HN_SUBMISSION_V3.md +0 -56
- package/docs/IMPROVEMENT_ROADMAP.md +0 -515
- package/docs/INTEGRATIONS.md +0 -420
- package/docs/LANGCHAIN_INTEGRATION.md +0 -147
- package/docs/LLM_COUNCIL_DECISION.md +0 -508
- package/docs/MIDDLEWARE_CHAIN.md +0 -35
- package/docs/PROMO_CHECKLIST.md +0 -200
- package/docs/QUICKSTART.md +0 -271
- package/docs/QUICK_START.md +0 -43
- package/docs/QUICK_START_VISIBILITY.md +0 -782
- package/docs/REDDIT_GAP_ANALYSIS.md +0 -299
- package/docs/RELEASE_CHECKLIST.md +0 -32
- package/docs/REPRODUCIBILITY.md +0 -63
- package/docs/RESEARCH_BACKED_IMPROVEMENTS.md +0 -1180
- package/docs/ROUTING_RUBRIC.md +0 -197
- package/docs/SEO_AUDIT.md +0 -186
- package/docs/SOCIAL_LISTENING.md +0 -219
- package/docs/TMLPD_QNA.md +0 -751
- package/docs/TMLPD_V2.1_COMPLETE.md +0 -763
- package/docs/TMLPD_V2.2_RESEARCH_ROADMAP.md +0 -754
- package/docs/UPDATE_TOPICS.md +0 -15
- package/docs/USE_CASES.md +0 -59
- package/docs/V2.2_IMPLEMENTATION_COMPLETE.md +0 -446
- package/docs/V2_IMPLEMENTATION_GUIDE.md +0 -388
- package/docs/VERCEL_AI_SDK.md +0 -209
- package/docs/VISIBILITY_ADOPTION_PLAN.md +0 -1005
- package/docs/_config.yml +0 -49
- package/docs/ai-plugin.json +0 -16
- package/docs/api.html +0 -513
- package/docs/architecture-diagram.md +0 -40
- package/docs/benchmark-chart.png +0 -0
- package/docs/benchmark.html +0 -387
- package/docs/blog/routerarena-number-one.html +0 -73
- package/docs/cli-cheatsheet.md +0 -339
- package/docs/compare.md +0 -109
- package/docs/comparison-litellm.md +0 -88
- package/docs/comparison.md +0 -108
- package/docs/cost-chart-ascii.md +0 -42
- package/docs/cost-comparison-chart.svg +0 -88
- package/docs/curl-examples.md +0 -247
- package/docs/demo-auto.html +0 -264
- package/docs/demo.html +0 -416
- package/docs/geo/GENERATIVE_ENGINE_OPTIMIZATION.md +0 -232
- package/docs/index.html +0 -507
- package/docs/launch-content/LAUNCH_EXECUTION_CHECKLIST.md +0 -421
- package/docs/launch-content/README.md +0 -457
- package/docs/launch-content/assets/cost_comparison_100_tasks.png +0 -0
- package/docs/launch-content/assets/cumulative_savings.png +0 -0
- package/docs/launch-content/assets/parallel_speedup.png +0 -0
- package/docs/launch-content/assets/provider_pricing_comparison.png +0 -0
- package/docs/launch-content/assets/task_breakdown_comparison.png +0 -0
- package/docs/launch-content/generate_charts.py +0 -313
- package/docs/launch-content/hn_show_post.md +0 -139
- package/docs/launch-content/partner_outreach_templates.md +0 -745
- package/docs/launch-content/reddit_posts.md +0 -467
- package/docs/launch-content/twitter_thread.txt +0 -460
- package/docs/npm-downloads-chart.svg +0 -43
- package/docs/openapi.json +0 -139
- package/docs/openapi.yaml +0 -1318
- package/docs/quick-start.html +0 -366
- package/docs/robots.txt +0 -52
- package/docs/sitemap.xml +0 -57
- package/docs/styles.css +0 -682
- package/docs/well-known/ai-plugin.json +0 -16
- package/docs/wellknown/ai-plugin.json +0 -16
- package/docs-site/assets/og-banner.svg +0 -194
- package/docs-site/index.html +0 -632
- package/eval/README.md +0 -46
- package/eval/baselines/main.json +0 -12
- package/eval/benchmark_dataset.jsonl +0 -16
- package/eval/check_golden_routes.js +0 -64
- package/eval/datasets/catalog.json +0 -33
- package/eval/datasets/slices/cn_provider_reliability_v1.jsonl +0 -3
- package/eval/datasets/slices/cost_pressure_v1.jsonl +0 -3
- package/eval/datasets/slices/safety_guardrails_v1.jsonl +0 -3
- package/eval/evals.json +0 -199
- package/eval/fault_injection_thresholds.json +0 -3
- package/eval/generate_report.js +0 -128
- package/eval/golden_routes.json +0 -114
- package/eval/lib/experiment_registry.js +0 -24
- package/eval/run_eval.js +0 -197
- package/eval/run_fault_injection.js +0 -201
- package/eval/run_shadow_eval.js +0 -85
- package/eval/thresholds.json +0 -9
- package/examples/QUICKSTART.md +0 -183
- package/examples/README.md +0 -61
- package/examples/a3m-sdk.js +0 -124
- package/examples/basic-route.js +0 -54
- package/examples/chat-loop.js +0 -202
- package/examples/classify-then-route.js +0 -102
- package/examples/cost-compare.js +0 -120
- package/examples/ensemble.js +0 -160
- package/examples/whatsapp-telegram-bridge-demo.js +0 -302
- package/examples/whatsapp-telegram-bridge.js +0 -269
- package/hf-space/README.md +0 -23
- package/hf-space/app.py +0 -240
- package/hf-space/requirements.txt +0 -1
- package/huggingface_space/README.md +0 -35
- package/huggingface_space/app.py +0 -126
- package/huggingface_space/create_space.py +0 -208
- package/huggingface_space/requirements.txt +0 -1
- package/mcp-server/README.md +0 -188
- package/mcp-server/package.json +0 -29
- package/mcp-server/src/index.ts +0 -744
- package/mcp-server/tsconfig.json +0 -19
- package/openclaw-alexa-bridge/ALL_REMAINING_FIXES_PLAN.md +0 -313
- package/openclaw-alexa-bridge/REMAINING_FIXES_SUMMARY.md +0 -277
- package/openclaw-alexa-bridge/src/alexa_handler_no_tmlpd.js +0 -1234
- package/openclaw-alexa-bridge/test_fixes.js +0 -77
- package/playground/README.md +0 -51
- package/playground/codesandbox.json +0 -12
- package/playground/index.js +0 -39
- package/proxy/README.md +0 -227
- package/proxy/package-lock.json +0 -831
- package/proxy/package.json +0 -17
- package/proxy/rate-limit.js +0 -145
- package/proxy/rate-limit.test.js +0 -311
- package/proxy/server.js +0 -970
- package/python/README.md +0 -102
- package/python/a3m/__init__.py +0 -6
- package/python/a3m/client.py +0 -190
- package/python/a3m/models.py +0 -40
- package/python/a3m/sync_client.py +0 -61
- package/python/examples.py +0 -53
- package/python/integrations.py +0 -330
- package/python/pyproject.toml +0 -23
- package/python/setup.py +0 -28
- package/python/tmlpd.py +0 -369
- package/qna/REDDIT_GAP_ANALYSIS.md +0 -299
- package/qna/TMLPD_QNA.md +0 -751
- package/research/FINDING_001_safety.md +0 -28
- package/research/FINDING_002_error_diversity.md +0 -32
- package/research/FINDING_003_confidence_weighted_voting.md +0 -32
- package/research/FINDING_004_cross_model_semantic_detection.md +0 -37
- package/research/FINDING_005_knowledge_gap_orthogonality.md +0 -34
- package/research/HALLUCINATION_RESEARCH.md +0 -27
- package/research/ensemble-voting.md +0 -324
- package/research/loss-functions.md +0 -545
- package/research-log.md +0 -49
- package/scripts/banner.js +0 -29
- package/scripts/benchmark-local-routerarena.ts +0 -176
- package/scripts/benchmark.js +0 -145
- package/scripts/benchmark.sh +0 -61
- package/scripts/compare-providers.sh +0 -230
- package/scripts/content-planner.js +0 -25
- package/scripts/create-labeled-benchmark.ts +0 -105
- package/scripts/cross_post.py +0 -443
- package/scripts/local-router-benchmark.ts +0 -154
- package/scripts/post-all.sh +0 -41
- package/scripts/publish_fcc.py +0 -106
- package/scripts/push-to-gitee.sh +0 -25
- package/scripts/routerarena_ensemble.js +0 -144
- package/scripts/routing-benchmark-v2.js +0 -373
- package/scripts/routing-benchmark-v3.js +0 -118
- package/scripts/routing-benchmark.js +0 -462
- package/scripts/run-labeled-benchmark.mjs +0 -104
- package/scripts/run-mmlu-benchmark.js +0 -176
- package/scripts/run-provider-benchmark.js +0 -244
- package/scripts/update-npm-badges.js +0 -158
- package/skill/SKILL.md +0 -238
- package/src/__tests__/integration/tmpld_integration.test.py +0 -540
- package/src/skills/__tests__/skill_manager.test.ts +0 -328
- package/submissions/benchmarks/ALL_PLATFORMS_SUBMISSION.md +0 -94
- package/submissions/benchmarks/LLMROUTERBENCH_SUBMISSION.md +0 -121
- package/submissions/benchmarks/MMRBENCH_SUBMISSION.md +0 -94
- package/submissions/benchmarks/ROUTERARENA_UPDATE.md +0 -83
- package/submissions/benchmarks/ROUTERBENCH_SUBMISSION.md +0 -225
- package/test-council/1-structure-tests.test.js +0 -353
- package/test-council/1-structure-tests.test.ts +0 -353
- package/test-council/2-edge-case-tests.test.ts +0 -361
- package/test-council/3-performance-tests.test.ts +0 -669
- package/test-council/4-integration-tests.test.ts +0 -391
- package/test-council/5-agent-council-eval.test.ts +0 -413
- package/test-council/AGENT_COUNCIL_ARCHITECTURE.md +0 -349
- package/test-council/TEST_COUNCIL_REPORT.md +0 -201
- package/test-council/agents/edge-case-agent.ts +0 -363
- package/test-council/agents/performance-agent.ts +0 -426
- package/test-council/agents/structure-agent.ts +0 -227
- package/test-council/council.md +0 -183
- package/tests/__mocks__/tokenUtils.ts +0 -8
- package/tests/memory/episodicMemory.test.ts +0 -227
- package/tests/package-lock.json +0 -1628
- package/tests/package.json +0 -18
- package/tests/routing/ensembleVoting.test.ts +0 -236
- package/tests/routing/providerRetry.test.ts +0 -360
- package/tests/routing/queryTypePresets.test.ts +0 -208
- package/tests/security/guardrailEngine.test.ts +0 -700
- package/tests/tsconfig.json +0 -21
- package/tests/vitest.config.ts +0 -18
- package/tmlpd-pi-extension/README.md +0 -66
- package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts +0 -114
- package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cache/prefixCache.js +0 -285
- package/tmlpd-pi-extension/dist/cache/prefixCache.js.map +0 -1
- package/tmlpd-pi-extension/dist/cache/responseCache.d.ts +0 -58
- package/tmlpd-pi-extension/dist/cache/responseCache.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cache/responseCache.js +0 -153
- package/tmlpd-pi-extension/dist/cache/responseCache.js.map +0 -1
- package/tmlpd-pi-extension/dist/cli.js +0 -59
- package/tmlpd-pi-extension/dist/cost/costTracker.d.ts +0 -95
- package/tmlpd-pi-extension/dist/cost/costTracker.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cost/costTracker.js +0 -240
- package/tmlpd-pi-extension/dist/cost/costTracker.js.map +0 -1
- package/tmlpd-pi-extension/dist/index.d.ts +0 -723
- package/tmlpd-pi-extension/dist/index.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/index.js +0 -239
- package/tmlpd-pi-extension/dist/index.js.map +0 -1
- package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts +0 -82
- package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/memory/episodicMemory.js +0 -145
- package/tmlpd-pi-extension/dist/memory/episodicMemory.js.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts +0 -102
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js +0 -207
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts +0 -85
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js +0 -210
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js.map +0 -1
- package/tmlpd-pi-extension/dist/providers/localProvider.d.ts +0 -102
- package/tmlpd-pi-extension/dist/providers/localProvider.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/providers/localProvider.js +0 -338
- package/tmlpd-pi-extension/dist/providers/localProvider.js.map +0 -1
- package/tmlpd-pi-extension/dist/providers/registry.d.ts +0 -55
- package/tmlpd-pi-extension/dist/providers/registry.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/providers/registry.js +0 -138
- package/tmlpd-pi-extension/dist/providers/registry.js.map +0 -1
- package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts +0 -68
- package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/routing/advancedRouter.js +0 -332
- package/tmlpd-pi-extension/dist/routing/advancedRouter.js.map +0 -1
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts +0 -101
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.js +0 -368
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts +0 -96
- package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/batchProcessor.js +0 -170
- package/tmlpd-pi-extension/dist/utils/batchProcessor.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/compression.d.ts +0 -61
- package/tmlpd-pi-extension/dist/utils/compression.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/compression.js +0 -281
- package/tmlpd-pi-extension/dist/utils/compression.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/reliability.d.ts +0 -74
- package/tmlpd-pi-extension/dist/utils/reliability.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/reliability.js +0 -177
- package/tmlpd-pi-extension/dist/utils/reliability.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts +0 -117
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js +0 -246
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts +0 -50
- package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/tokenUtils.js +0 -124
- package/tmlpd-pi-extension/dist/utils/tokenUtils.js.map +0 -1
- package/tmlpd-pi-extension/examples/QUICKSTART.md +0 -183
- package/tmlpd-pi-extension/package-lock.json +0 -79
- package/tmlpd-pi-extension/package.json +0 -172
- package/tmlpd-pi-extension/python/examples.py +0 -53
- package/tmlpd-pi-extension/python/integrations.py +0 -330
- package/tmlpd-pi-extension/python/setup.py +0 -28
- package/tmlpd-pi-extension/python/tmlpd.py +0 -369
- package/tmlpd-pi-extension/qna/REDDIT_GAP_ANALYSIS.md +0 -299
- package/tmlpd-pi-extension/qna/TMLPD_QNA.md +0 -751
- package/tmlpd-pi-extension/skill/SKILL.md +0 -238
- package/tmlpd-pi-extension/src/cache/responseCache.ts +0 -147
- package/tmlpd-pi-extension/src/cost/costTracker.ts +0 -302
- package/tmlpd-pi-extension/src/index.ts +0 -232
- package/tmlpd-pi-extension/src/memory/episodicMemory.ts +0 -257
- package/tmlpd-pi-extension/src/orchestration/haloOrchestrator.ts +0 -266
- package/tmlpd-pi-extension/src/orchestration/mctsWorkflow.ts +0 -262
- package/tmlpd-pi-extension/src/providers/localProvider.ts +0 -406
- package/tmlpd-pi-extension/src/providers/registry.ts +0 -164
- package/tmlpd-pi-extension/src/routing/ensembleVoting.ts +0 -159
- package/tmlpd-pi-extension/src/routing/queryTypePresets.ts +0 -136
- package/tmlpd-pi-extension/src/tools/tmlpdTools.ts +0 -433
- package/tmlpd-pi-extension/src/utils/batchProcessor.ts +0 -232
- package/tmlpd-pi-extension/src/utils/compression.ts +0 -325
- package/tmlpd-pi-extension/src/utils/reliability.ts +0 -221
- package/tmlpd-pi-extension/src/utils/tokenUtils.ts +0 -145
- package/tmlpd-pi-extension/tsconfig.json +0 -18
- package/tsconfig.build.json +0 -29
- package/tsconfig.json +0 -18
- /package/{docs/llms-full.txt → llms-full.txt.bak} +0 -0
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create labeled benchmark dataset for local testing
|
|
3
|
-
*
|
|
4
|
-
* Each query has an "actualTier" based on the model's required capability.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const BENCHMARK_QUERIES = [
|
|
8
|
-
// === FREE TIER (simple factual, definitions, basic math) ===
|
|
9
|
-
{ query: "What is 2+2?", actualTier: "free" },
|
|
10
|
-
{ query: "What is the capital of France?", actualTier: "free" },
|
|
11
|
-
{ query: "How do you say hello in Spanish?", actualTier: "free" },
|
|
12
|
-
{ query: "What day is it today?", actualTier: "free" },
|
|
13
|
-
{ query: "Convert 100 Celsius to Fahrenheit", actualTier: "free" },
|
|
14
|
-
{ query: "What is the largest planet in the solar system?", actualTier: "free" },
|
|
15
|
-
{ query: "How many ounces in a pound?", actualTier: "free" },
|
|
16
|
-
{ query: "What is the speed of light?", actualTier: "free" },
|
|
17
|
-
{ query: "Who wrote Romeo and Juliet?", actualTier: "free" },
|
|
18
|
-
{ query: "What is photosynthesis?", actualTier: "free" },
|
|
19
|
-
{ query: "What is the square root of 144?", actualTier: "free" },
|
|
20
|
-
{ query: "Name three primary colors", actualTier: "free" },
|
|
21
|
-
{ query: "What is the chemical symbol for gold?", actualTier: "free" },
|
|
22
|
-
{ query: "How many continents are there?", actualTier: "free" },
|
|
23
|
-
{ query: "What is gravity?", actualTier: "free" },
|
|
24
|
-
{ query: "Define 'ubiquitous'", actualTier: "free" },
|
|
25
|
-
{ query: "What does 'benevolent' mean?", actualTier: "free" },
|
|
26
|
-
{ query: "How many bytes in a kilobyte?", actualTier: "free" },
|
|
27
|
-
{ query: "What is H2O commonly known as?", actualTier: "free" },
|
|
28
|
-
{ query: "Translate 'good morning' to French", actualTier: "free" },
|
|
29
|
-
|
|
30
|
-
// === CHEAP TIER (simple tasks, short code, basic translation) ===
|
|
31
|
-
{ query: "Write a Python function to sort a list", actualTier: "cheap" },
|
|
32
|
-
{ query: "Explain the difference between TCP and UDP", actualTier: "cheap" },
|
|
33
|
-
{ query: "Write a SQL query to find duplicate records", actualTier: "cheap" },
|
|
34
|
-
{ query: "Create a REST API endpoint in Express.js", actualTier: "cheap" },
|
|
35
|
-
{ query: "Explain Docker containers vs virtual machines", actualTier: "cheap" },
|
|
36
|
-
{ query: "Write a regex to validate email addresses", actualTier: "cheap" },
|
|
37
|
-
{ query: "Describe the water cycle in simple terms", actualTier: "cheap" },
|
|
38
|
-
{ query: "Summarize this article about climate change in 3 bullet points", actualTier: "cheap" },
|
|
39
|
-
{ query: "Translate this paragraph from English to French", actualTier: "cheap" },
|
|
40
|
-
{ query: "How do I reverse a string in JavaScript?", actualTier: "cheap" },
|
|
41
|
-
{ query: "Write a for loop in Python", actualTier: "cheap" },
|
|
42
|
-
{ query: "What is the difference between let and const in JavaScript?", actualTier: "cheap" },
|
|
43
|
-
{ query: "Explain what an API is to a non-technical person", actualTier: "cheap" },
|
|
44
|
-
{ query: "How do I center a div in CSS?", actualTier: "cheap" },
|
|
45
|
-
{ query: "Write a basic HTML form", actualTier: "cheap" },
|
|
46
|
-
{ query: "Explain git merge vs rebase", actualTier: "cheap" },
|
|
47
|
-
{ query: "What is a RESTful API?", actualTier: "cheap" },
|
|
48
|
-
{ query: "How do I read a file in Node.js?", actualTier: "cheap" },
|
|
49
|
-
{ query: "Write a simple unit test in Jest", actualTier: "cheap" },
|
|
50
|
-
{ query: "Explain what a database index does", actualTier: "cheap" },
|
|
51
|
-
{ query: "How do I parse JSON in Python?", actualTier: "cheap" },
|
|
52
|
-
|
|
53
|
-
// === MID TIER (multi-step, domain knowledge, system design basics) ===
|
|
54
|
-
{ query: "Design a REST API for a blog with users, posts, and comments", actualTier: "mid" },
|
|
55
|
-
{ query: "Explain how OAuth 2.0 authentication works", actualTier: "mid" },
|
|
56
|
-
{ query: "Design a rate limiting system for a web API", actualTier: "mid" },
|
|
57
|
-
{ query: "How would you implement a caching layer for a web application?", actualTier: "mid" },
|
|
58
|
-
{ query: "Compare and contrast SQL and NoSQL databases", actualTier: "mid" },
|
|
59
|
-
{ query: "Design a user authentication system with JWT tokens", actualTier: "mid" },
|
|
60
|
-
{ query: "Explain the CAP theorem and its implications", actualTier: "mid" },
|
|
61
|
-
{ query: "How do you design a URL shortening service like bit.ly?", actualTier: "mid" },
|
|
62
|
-
{ query: "Design a real-time notification system", actualTier: "mid" },
|
|
63
|
-
{ query: "Explain the pros and cons of microservices vs monolith", actualTier: "mid" },
|
|
64
|
-
{ query: "How would you implement search functionality in a web app?", actualTier: "mid" },
|
|
65
|
-
{ query: "Design a payment processing system", actualTier: "mid" },
|
|
66
|
-
{ query: "Explain how blockchain achieves consensus", actualTier: "mid" },
|
|
67
|
-
{ query: "Design a multi-tenant SaaS architecture", actualTier: "mid" },
|
|
68
|
-
{ query: "How do you handle database migrations in production?", actualTier: "mid" },
|
|
69
|
-
{ query: "Design a logging and monitoring system", actualTier: "mid" },
|
|
70
|
-
{ query: "Explain load balancing algorithms", actualTier: "mid" },
|
|
71
|
-
{ query: "How would you design a file upload system?", actualTier: "mid" },
|
|
72
|
-
{ query: "Design a chat application with WebSockets", actualTier: "mid" },
|
|
73
|
-
{ query: "Explain event-driven architecture patterns", actualTier: "mid" },
|
|
74
|
-
|
|
75
|
-
// === PREMIUM TIER (complex reasoning, architecture, novel problems) ===
|
|
76
|
-
{ query: "Design a distributed system that handles 10 million requests per second", actualTier: "premium" },
|
|
77
|
-
{ query: "Architect a real-time collaboration system like Google Docs", actualTier: "premium" },
|
|
78
|
-
{ query: "Design a machine learning pipeline from data ingestion to model serving", actualTier: "premium" },
|
|
79
|
-
{ query: "Create a comprehensive technical design for a social media platform at scale", actualTier: "premium" },
|
|
80
|
-
{ query: "Design a zero-downtime deployment strategy for a distributed system", actualTier: "premium" },
|
|
81
|
-
{ query: "Architect a system that processes streaming data with sub-second latency", actualTier: "premium" },
|
|
82
|
-
{ query: "Design a fraud detection system using machine learning", actualTier: "premium" },
|
|
83
|
-
{ query: "Create an architecture for a global CDN with edge computing", actualTier: "premium" },
|
|
84
|
-
{ query: "Design a multi-region active-active database architecture", actualTier: "premium" },
|
|
85
|
-
{ query: "Architect a system for real-time video transcoding at scale", actualTier: "premium" },
|
|
86
|
-
{ query: "Design a privacy-preserving data analytics system", actualTier: "premium" },
|
|
87
|
-
{ query: "Create a comprehensive security architecture for a fintech application", actualTier: "premium" },
|
|
88
|
-
{ query: "Design a system that handles 1 billion events per day", actualTier: "premium" },
|
|
89
|
-
{ query: "Architect a serverless system with consistent performance", actualTier: "premium" },
|
|
90
|
-
{ query: "Design a data warehouse architecture for petabyte-scale analytics", actualTier: "premium" },
|
|
91
|
-
{ query: "Create a multi-cloud hybrid architecture strategy", actualTier: "premium" },
|
|
92
|
-
{ query: "Design a system for real-time anomaly detection in financial transactions", actualTier: "premium" },
|
|
93
|
-
{ query: "Architect a mesh network for IoT at scale", actualTier: "premium" },
|
|
94
|
-
{ query: "Design a comprehensive disaster recovery strategy", actualTier: "premium" },
|
|
95
|
-
{ query: "Create an architecture for autonomous vehicle sensor fusion", actualTier: "premium" },
|
|
96
|
-
];
|
|
97
|
-
|
|
98
|
-
import * as fs from 'fs';
|
|
99
|
-
const output = { queries: BENCHMARK_QUERIES };
|
|
100
|
-
fs.writeFileSync('./data/labeled-benchmark.json', JSON.stringify(output, null, 2));
|
|
101
|
-
console.log(`Created benchmark with ${BENCHMARK_QUERIES.length} labeled queries`);
|
|
102
|
-
console.log(`Free: ${BENCHMARK_QUERIES.filter(q => q.actualTier === 'free').length}`);
|
|
103
|
-
console.log(`Cheap: ${BENCHMARK_QUERIES.filter(q => q.actualTier === 'cheap').length}`);
|
|
104
|
-
console.log(`Mid: ${BENCHMARK_QUERIES.filter(q => q.actualTier === 'mid').length}`);
|
|
105
|
-
console.log(`Premium: ${BENCHMARK_QUERIES.filter(q => q.actualTier === 'premium').length}`);
|
package/scripts/cross_post.py
DELETED
|
@@ -1,443 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Cross-post A3M Router article to multiple platforms using Playwright (headless)
|
|
3
|
-
"""
|
|
4
|
-
import sys, json, time, os, re
|
|
5
|
-
from playwright.sync_api import sync_playwright, TimeoutError as PwTimeout
|
|
6
|
-
|
|
7
|
-
PROFILE_PATH = "/var/folders/l9/4016_h694kdbx1wvdg5881bh0000gp/T/chrome_profile_100llyqq"
|
|
8
|
-
|
|
9
|
-
def get_article_text():
|
|
10
|
-
path = "/Users/Subho/adaptive-memory-multi-model-router/articles/FRESH_devto_2026_05.md"
|
|
11
|
-
with open(path) as f:
|
|
12
|
-
return f.read()
|
|
13
|
-
|
|
14
|
-
def safe_screenshot(page, name):
|
|
15
|
-
try:
|
|
16
|
-
page.screenshot(path=f"/tmp/{name}.png")
|
|
17
|
-
except:
|
|
18
|
-
pass
|
|
19
|
-
|
|
20
|
-
def try_fcc(browser):
|
|
21
|
-
"""Try to publish on FreeCodeCamp"""
|
|
22
|
-
page = browser.new_page()
|
|
23
|
-
results = []
|
|
24
|
-
|
|
25
|
-
try:
|
|
26
|
-
print("\n=== FCC: Starting ===")
|
|
27
|
-
page.goto("https://www.freecodecamp.org/news/settings/publishing", timeout=30000, wait_until="domcontentloaded")
|
|
28
|
-
time.sleep(3)
|
|
29
|
-
safe_screenshot(page, "fcc_1_landing")
|
|
30
|
-
|
|
31
|
-
# Check if we're on login page
|
|
32
|
-
if "login" in page.url.lower() or page.query_selector('input[type="email"]'):
|
|
33
|
-
print("[FCC] Login page detected, logging in...")
|
|
34
|
-
email_input = page.wait_for_selector('input[type="email"]', timeout=5000)
|
|
35
|
-
email_input.fill("subho.matteragent@gmail.com")
|
|
36
|
-
|
|
37
|
-
pw_input = page.wait_for_selector('input[type="password"]', timeout=5000)
|
|
38
|
-
pw_input.fill("YourChance2025!")
|
|
39
|
-
|
|
40
|
-
submit = page.query_selector('button[type="submit"]')
|
|
41
|
-
if submit:
|
|
42
|
-
submit.click()
|
|
43
|
-
time.sleep(5)
|
|
44
|
-
safe_screenshot(page, "fcc_2_after_login")
|
|
45
|
-
|
|
46
|
-
# Navigate to publishing page again
|
|
47
|
-
page.goto("https://www.freecodecamp.org/news/settings/publishing", timeout=30000, wait_until="domcontentloaded")
|
|
48
|
-
time.sleep(3)
|
|
49
|
-
|
|
50
|
-
# Check page content
|
|
51
|
-
html = page.content()
|
|
52
|
-
if "draft" in html.lower():
|
|
53
|
-
print("[FCC] Found drafts!")
|
|
54
|
-
results.append("FCC: Found drafts page, check screenshots for details")
|
|
55
|
-
|
|
56
|
-
# Try clicking any edit/publish link for the A3M article
|
|
57
|
-
for link in page.query_selector_all('a'):
|
|
58
|
-
href = link.get_attribute('href') or ''
|
|
59
|
-
text = link.inner_text() or ''
|
|
60
|
-
if 'draft' in href or 'edit' in href:
|
|
61
|
-
print(f" Link: {text[:80]} -> {href}")
|
|
62
|
-
|
|
63
|
-
# Try finding publish buttons
|
|
64
|
-
for btn in page.query_selector_all('button'):
|
|
65
|
-
text = (btn.inner_text() or '').lower()
|
|
66
|
-
if 'publish' in text or 'submit' in text:
|
|
67
|
-
print(f" Button: {btn.inner_text()}")
|
|
68
|
-
btn.click()
|
|
69
|
-
time.sleep(3)
|
|
70
|
-
safe_screenshot(page, "fcc_3_publish_clicked")
|
|
71
|
-
results.append("FCC: Publish button clicked")
|
|
72
|
-
break
|
|
73
|
-
else:
|
|
74
|
-
print(f"[FCC] No drafts section - page title: {page.title()}")
|
|
75
|
-
results.append(f"FCC: No drafts accessible. Page: {page.title()}")
|
|
76
|
-
|
|
77
|
-
except Exception as e:
|
|
78
|
-
print(f"[FCC] Error: {e}")
|
|
79
|
-
results.append(f"FCC Error: {str(e)[:100]}")
|
|
80
|
-
safe_screenshot(page, "fcc_error")
|
|
81
|
-
|
|
82
|
-
page.close()
|
|
83
|
-
return results
|
|
84
|
-
|
|
85
|
-
def try_hackernoon(browser):
|
|
86
|
-
"""Try to post on HackerNoon"""
|
|
87
|
-
page = browser.new_page()
|
|
88
|
-
results = []
|
|
89
|
-
|
|
90
|
-
try:
|
|
91
|
-
print("\n=== HackerNoon: Starting ===")
|
|
92
|
-
page.goto("https://hackernoon.com/", timeout=30000, wait_until="domcontentloaded")
|
|
93
|
-
time.sleep(3)
|
|
94
|
-
safe_screenshot(page, "hn_1_landing")
|
|
95
|
-
|
|
96
|
-
# Try to find login button
|
|
97
|
-
login_selectors = [
|
|
98
|
-
'a[href*="login"]', 'a[href*="signin"]', 'a[href*="sign-up"]',
|
|
99
|
-
'button:has-text("Log in")', 'button:has-text("Sign in")',
|
|
100
|
-
'a:has-text("Log in")', 'a:has-text("Sign in")',
|
|
101
|
-
'[data-cy="login-button"]', '[test-id="login"]'
|
|
102
|
-
]
|
|
103
|
-
|
|
104
|
-
clicked_login = False
|
|
105
|
-
for sel in login_selectors:
|
|
106
|
-
try:
|
|
107
|
-
btn = page.wait_for_selector(sel, timeout=2000)
|
|
108
|
-
if btn and btn.is_visible():
|
|
109
|
-
print(f"[HN] Found login button: {sel}")
|
|
110
|
-
btn.click()
|
|
111
|
-
time.sleep(3)
|
|
112
|
-
clicked_login = True
|
|
113
|
-
break
|
|
114
|
-
except:
|
|
115
|
-
continue
|
|
116
|
-
|
|
117
|
-
if not clicked_login:
|
|
118
|
-
# Try JavaScript click on all possible login elements
|
|
119
|
-
try:
|
|
120
|
-
page.evaluate("""
|
|
121
|
-
[...document.querySelectorAll('a, button')].find(el =>
|
|
122
|
-
el.innerText.toLowerCase().includes('log in') ||
|
|
123
|
-
el.innerText.toLowerCase().includes('sign in') ||
|
|
124
|
-
el.href?.includes('login')
|
|
125
|
-
)?.click()
|
|
126
|
-
""")
|
|
127
|
-
time.sleep(3)
|
|
128
|
-
except:
|
|
129
|
-
pass
|
|
130
|
-
|
|
131
|
-
safe_screenshot(page, "hn_2_login_clicked")
|
|
132
|
-
|
|
133
|
-
# Fill in credentials if login form appears
|
|
134
|
-
try:
|
|
135
|
-
email_input = page.wait_for_selector('input[type="email"], input[name="email"]', timeout=5000)
|
|
136
|
-
email_input.fill("subho.matteragent@gmail.com")
|
|
137
|
-
time.sleep(1)
|
|
138
|
-
|
|
139
|
-
pw_input = page.wait_for_selector('input[type="password"]', timeout=3000)
|
|
140
|
-
pw_input.fill("YourChance2025!")
|
|
141
|
-
time.sleep(1)
|
|
142
|
-
|
|
143
|
-
submit = page.query_selector('button[type="submit"]')
|
|
144
|
-
if submit:
|
|
145
|
-
submit.click()
|
|
146
|
-
time.sleep(5)
|
|
147
|
-
safe_screenshot(page, "hn_3_logged_in")
|
|
148
|
-
results.append("HN: Login attempted")
|
|
149
|
-
else:
|
|
150
|
-
print("[HN] No submit button found")
|
|
151
|
-
except:
|
|
152
|
-
print("[HN] No login form appeared")
|
|
153
|
-
results.append("HN: Login form did not appear (React/Cloudflare issue)")
|
|
154
|
-
|
|
155
|
-
# Try navigating to write/create post
|
|
156
|
-
page.goto("https://hackernoon.com/new-story", timeout=30000, wait_until="domcontentloaded")
|
|
157
|
-
time.sleep(3)
|
|
158
|
-
safe_screenshot(page, "hn_4_new_story")
|
|
159
|
-
|
|
160
|
-
# Check if we can write
|
|
161
|
-
html = page.content()
|
|
162
|
-
if "new-story" in page.url or "write" in page.url or "create" in page.url:
|
|
163
|
-
results.append("HN: On story creation page")
|
|
164
|
-
|
|
165
|
-
# Try to fill in title and content
|
|
166
|
-
title_input = page.query_selector('input[placeholder*="title" i], textarea[placeholder*="title" i], [contenteditable="true"]')
|
|
167
|
-
if title_input:
|
|
168
|
-
article = get_article_text()
|
|
169
|
-
lines = article.strip().split('\n')
|
|
170
|
-
title = lines[0].replace('#', '').strip() if lines[0].startswith('#') else "Three LLM Infrastructure Problems That Shouldn't Exist in 2026"
|
|
171
|
-
|
|
172
|
-
title_input.fill(title)
|
|
173
|
-
print(f"[HN] Filled title: {title}")
|
|
174
|
-
time.sleep(1)
|
|
175
|
-
|
|
176
|
-
# Try content area
|
|
177
|
-
content_area = page.query_selector('[contenteditable="true"], textarea, .ProseMirror, [data-lexical-editor]')
|
|
178
|
-
if content_area:
|
|
179
|
-
content_area.fill(article)
|
|
180
|
-
results.append("HN: Content filled")
|
|
181
|
-
safe_screenshot(page, "hn_5_content_filled")
|
|
182
|
-
else:
|
|
183
|
-
results.append("HN: Could not find content area")
|
|
184
|
-
else:
|
|
185
|
-
results.append("HN: No title input found")
|
|
186
|
-
else:
|
|
187
|
-
results.append(f"HN: Not on create page. URL: {page.url}")
|
|
188
|
-
|
|
189
|
-
except Exception as e:
|
|
190
|
-
print(f"[HN] Error: {e}")
|
|
191
|
-
results.append(f"HN Error: {str(e)[:100]}")
|
|
192
|
-
safe_screenshot(page, "hn_error")
|
|
193
|
-
|
|
194
|
-
page.close()
|
|
195
|
-
return results
|
|
196
|
-
|
|
197
|
-
def try_linkedin(browser):
|
|
198
|
-
"""Try to post on LinkedIn using Chrome profile cookies"""
|
|
199
|
-
page = browser.new_page()
|
|
200
|
-
results = []
|
|
201
|
-
|
|
202
|
-
try:
|
|
203
|
-
print("\n=== LinkedIn: Starting ===")
|
|
204
|
-
page.goto("https://www.linkedin.com", timeout=30000, wait_until="domcontentloaded")
|
|
205
|
-
time.sleep(3)
|
|
206
|
-
safe_screenshot(page, "li_1_landing")
|
|
207
|
-
|
|
208
|
-
# Check if already logged in
|
|
209
|
-
if "feed" in page.url or "/in/" in page.url:
|
|
210
|
-
print("[LI] Already logged in!")
|
|
211
|
-
results.append("LI: Already logged in")
|
|
212
|
-
else:
|
|
213
|
-
# Try logging in
|
|
214
|
-
try:
|
|
215
|
-
email_input = page.wait_for_selector('input#session_key, input[name="session_key"], input[autocomplete="username"]', timeout=5000)
|
|
216
|
-
email_input.fill("subho.matteragent@gmail.com")
|
|
217
|
-
time.sleep(1)
|
|
218
|
-
|
|
219
|
-
pw_input = page.wait_for_selector('input#session_password, input[name="session_password"]', timeout=3000)
|
|
220
|
-
pw_input.fill("YourChance2025!")
|
|
221
|
-
time.sleep(1)
|
|
222
|
-
|
|
223
|
-
submit = page.query_selector('button[type="submit"]')
|
|
224
|
-
if submit:
|
|
225
|
-
submit.click()
|
|
226
|
-
time.sleep(5)
|
|
227
|
-
safe_screenshot(page, "li_2_logged_in")
|
|
228
|
-
results.append("LI: Login attempted")
|
|
229
|
-
except:
|
|
230
|
-
print("[LI] No login form found or already logged in")
|
|
231
|
-
|
|
232
|
-
# Try to write an article
|
|
233
|
-
page.goto("https://www.linkedin.com/post/new/", timeout=30000, wait_until="domcontentloaded")
|
|
234
|
-
time.sleep(3)
|
|
235
|
-
safe_screenshot(page, "li_3_new_post")
|
|
236
|
-
|
|
237
|
-
# Check if we're on the post page
|
|
238
|
-
if "post" in page.url:
|
|
239
|
-
# Try clicking "Write article" or similar
|
|
240
|
-
for selector in ['button:has-text("Write article")', 'a:has-text("Write article")', 'button:has-text("Create post")']:
|
|
241
|
-
try:
|
|
242
|
-
btn = page.wait_for_selector(selector, timeout=3000)
|
|
243
|
-
if btn:
|
|
244
|
-
btn.click()
|
|
245
|
-
time.sleep(3)
|
|
246
|
-
break
|
|
247
|
-
except:
|
|
248
|
-
continue
|
|
249
|
-
|
|
250
|
-
safe_screenshot(page, "li_4_article_editor")
|
|
251
|
-
|
|
252
|
-
# Try to find contenteditable area
|
|
253
|
-
editor = page.query_selector('[contenteditable="true"][aria-label*="editor" i]')
|
|
254
|
-
if editor:
|
|
255
|
-
article = get_article_text()
|
|
256
|
-
editor.fill(article)
|
|
257
|
-
results.append("LI: Content filled in editor")
|
|
258
|
-
safe_screenshot(page, "li_5_content_filled")
|
|
259
|
-
else:
|
|
260
|
-
results.append("LI: Could not find article editor")
|
|
261
|
-
else:
|
|
262
|
-
results.append(f"LI: Not on post page. URL: {page.url}")
|
|
263
|
-
|
|
264
|
-
except Exception as e:
|
|
265
|
-
print(f"[LI] Error: {e}")
|
|
266
|
-
results.append(f"LI Error: {str(e)[:100]}")
|
|
267
|
-
safe_screenshot(page, "li_error")
|
|
268
|
-
|
|
269
|
-
page.close()
|
|
270
|
-
return results
|
|
271
|
-
|
|
272
|
-
def try_devto(browser):
|
|
273
|
-
"""Write and publish a SECOND article on dev.to"""
|
|
274
|
-
page = browser.new_page()
|
|
275
|
-
results = []
|
|
276
|
-
|
|
277
|
-
second_article = """---
|
|
278
|
-
title: Why Sequential LLM Fallback Is a Lie
|
|
279
|
-
published: false
|
|
280
|
-
description: How parallel LLM execution with confidence scoring replaces the illusion of sequential fallback with actual better results
|
|
281
|
-
tags: llm, ai, infrastructure, javascript
|
|
282
|
-
---
|
|
283
|
-
|
|
284
|
-
## The Lie
|
|
285
|
-
|
|
286
|
-
Every LLM gateway does the same thing: try Provider A, wait, fail, try Provider B, wait, fail, try Provider C. They call this "fallback." But what it really means is you always get whatever Provider A returns — good or bad — and only try the others when A is completely broken.
|
|
287
|
-
|
|
288
|
-
This isn't a sophisticated strategy. It's basic error handling dressed up as infrastructure.
|
|
289
|
-
|
|
290
|
-
## The Math
|
|
291
|
-
|
|
292
|
-
Here's something no one talks about: **running 3 providers in parallel costs less than running 2 in sequence.**
|
|
293
|
-
|
|
294
|
-
Why? Timeout waste.
|
|
295
|
-
|
|
296
|
-
If Provider A has a 5-second timeout and you're running sequentially, you burn 5 seconds waiting before even touching Provider B. In a parallel setup, all 3 run simultaneously. You pay for all 3, but you get results in the time of the fastest provider.
|
|
297
|
-
|
|
298
|
-
Worst-case sequential: 5s (A timeout) + 5s (B timeout) + 5s (C timeout) = 15s
|
|
299
|
-
Worst-case parallel: 5s (all run simultaneously)
|
|
300
|
-
|
|
301
|
-
For many use cases — especially with providers averaging 300-700ms — parallel execution is both faster AND more reliable.
|
|
302
|
-
|
|
303
|
-
## How A3M Does It
|
|
304
|
-
|
|
305
|
-
Our router doesn't do fallback. It does **ensemble execution**:
|
|
306
|
-
|
|
307
|
-
1. Classify the query by type (code, creative, analytical, simple)
|
|
308
|
-
2. Route to 3 appropriate providers in parallel
|
|
309
|
-
3. Score every result on specificity, structure, and relevance
|
|
310
|
-
4. Return the best result with confidence scores attached
|
|
311
|
-
|
|
312
|
-
The result is you get the **best** answer, not the **first** answer. And you get it faster than most sequential fallback setups.
|
|
313
|
-
|
|
314
|
-
## The Bottom Line
|
|
315
|
-
|
|
316
|
-
Sequential fallback is a crutch from the era when LLM providers were unreliable. In 2026, most providers have >99% uptime. The bottleneck isn't reliability — it's picking the right provider for the right query.
|
|
317
|
-
|
|
318
|
-
Parallel ensemble execution solves the actual problem: getting the best possible answer in the shortest possible time.
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
*A3M Router — npm: `adaptive-memory-multi-model-router`*
|
|
323
|
-
*GitHub: [github.com/Das-rebel/a3m-router](https://github.com/Das-rebel/a3m-router)*
|
|
324
|
-
"""
|
|
325
|
-
|
|
326
|
-
try:
|
|
327
|
-
print("\n=== dev.to: Starting second article ===")
|
|
328
|
-
page.goto("https://dev.to/", timeout=30000, wait_until="domcontentloaded")
|
|
329
|
-
time.sleep(3)
|
|
330
|
-
safe_screenshot(page, "dev_1_landing")
|
|
331
|
-
|
|
332
|
-
# Try logging in
|
|
333
|
-
if "sign-in" in page.url.lower() or page.query_selector('input[type="email"]'):
|
|
334
|
-
print("[dev] Login page, signing in...")
|
|
335
|
-
try:
|
|
336
|
-
email_input = page.wait_for_selector('input[type="email"], input[name="user[email]"], input[autocomplete="email"]', timeout=5000)
|
|
337
|
-
email_input.fill("subho.matteragent@gmail.com")
|
|
338
|
-
time.sleep(1)
|
|
339
|
-
|
|
340
|
-
pw_input = page.wait_for_selector('input[type="password"], input[name="user[password]"]', timeout=3000)
|
|
341
|
-
pw_input.fill("YourChance2025!")
|
|
342
|
-
time.sleep(1)
|
|
343
|
-
|
|
344
|
-
submit = page.query_selector('button[type="submit"], input[type="submit"]')
|
|
345
|
-
if submit:
|
|
346
|
-
submit.click()
|
|
347
|
-
time.sleep(5)
|
|
348
|
-
safe_screenshot(page, "dev_2_logged_in")
|
|
349
|
-
except Exception as e:
|
|
350
|
-
print(f"[dev] Login form interaction failed: {e}")
|
|
351
|
-
|
|
352
|
-
# Navigate to write a post
|
|
353
|
-
page.goto("https://dev.to/new", timeout=30000, wait_until="domcontentloaded")
|
|
354
|
-
time.sleep(3)
|
|
355
|
-
safe_screenshot(page, "dev_3_new_post")
|
|
356
|
-
|
|
357
|
-
# Check if we're on the new post page
|
|
358
|
-
if "new" in page.url:
|
|
359
|
-
# Fill title
|
|
360
|
-
title_input = page.query_selector('input[placeholder*="title" i], input#article_title, textarea#article_title')
|
|
361
|
-
if title_input:
|
|
362
|
-
title_input.fill("Why Sequential LLM Fallback Is a Lie")
|
|
363
|
-
print("[dev] Title filled")
|
|
364
|
-
|
|
365
|
-
time.sleep(1)
|
|
366
|
-
|
|
367
|
-
# Fill body - dev.to uses a textarea or contenteditable
|
|
368
|
-
body_editor = page.query_selector('textarea#article_body_markdown, [contenteditable="true"][aria-label*="content" i], textarea[aria-label*="content" i]')
|
|
369
|
-
if body_editor:
|
|
370
|
-
body_editor.fill(second_article)
|
|
371
|
-
print("[dev] Body filled")
|
|
372
|
-
|
|
373
|
-
time.sleep(1)
|
|
374
|
-
|
|
375
|
-
# Try to publish
|
|
376
|
-
publish_btn = page.query_selector('button:has-text("Publish"), input[value*="Publish"]')
|
|
377
|
-
if publish_btn:
|
|
378
|
-
publish_btn.click()
|
|
379
|
-
time.sleep(3)
|
|
380
|
-
safe_screenshot(page, "dev_4_published")
|
|
381
|
-
results.append("dev.to: Publish attempted")
|
|
382
|
-
else:
|
|
383
|
-
# Try save as draft
|
|
384
|
-
save_btn = page.query_selector('button:has-text("Save"), button:has-text("Draft")')
|
|
385
|
-
if save_btn:
|
|
386
|
-
save_btn.click()
|
|
387
|
-
time.sleep(3)
|
|
388
|
-
safe_screenshot(page, "dev_4_saved")
|
|
389
|
-
results.append("dev.to: Saved as draft")
|
|
390
|
-
else:
|
|
391
|
-
results.append("dev.to: Could not find publish or save button")
|
|
392
|
-
|
|
393
|
-
safe_screenshot(page, "dev_final")
|
|
394
|
-
else:
|
|
395
|
-
results.append(f"dev.to: Not on new post page. URL: {page.url}")
|
|
396
|
-
# Maybe we need to click "Write a post" or similar
|
|
397
|
-
write_links = page.query_selector_all('a[href="/new"], a:has-text("Write"), a:has-text("Create")')
|
|
398
|
-
for link in write_links:
|
|
399
|
-
print(f" Write link: {link.inner_text()} -> {link.get_attribute('href')}")
|
|
400
|
-
link.click()
|
|
401
|
-
time.sleep(3)
|
|
402
|
-
break
|
|
403
|
-
|
|
404
|
-
except Exception as e:
|
|
405
|
-
print(f"[dev] Error: {e}")
|
|
406
|
-
results.append(f"dev.to Error: {str(e)[:100]}")
|
|
407
|
-
safe_screenshot(page, "dev_error")
|
|
408
|
-
|
|
409
|
-
page.close()
|
|
410
|
-
return results
|
|
411
|
-
|
|
412
|
-
def main():
|
|
413
|
-
print("=== Cross-Posting A3M Router Article ===\n")
|
|
414
|
-
|
|
415
|
-
all_results = {}
|
|
416
|
-
|
|
417
|
-
with sync_playwright() as p:
|
|
418
|
-
# Use persistent context with Chrome profile for cookies
|
|
419
|
-
context = p.chromium.launch_persistent_context(
|
|
420
|
-
PROFILE_PATH,
|
|
421
|
-
headless=True,
|
|
422
|
-
args=["--no-sandbox", "--disable-blink-features=AutomationControlled"],
|
|
423
|
-
user_agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
|
424
|
-
)
|
|
425
|
-
|
|
426
|
-
# Try each platform
|
|
427
|
-
all_results["fcc"] = try_fcc(context)
|
|
428
|
-
all_results["hackernoon"] = try_hackernoon(context)
|
|
429
|
-
all_results["linkedin"] = try_linkedin(context)
|
|
430
|
-
all_results["devto"] = try_devto(context)
|
|
431
|
-
|
|
432
|
-
context.close()
|
|
433
|
-
|
|
434
|
-
print("\n\n=== RESULTS SUMMARY ===")
|
|
435
|
-
for platform, results in all_results.items():
|
|
436
|
-
print(f"\n--- {platform.upper()} ---")
|
|
437
|
-
for r in results:
|
|
438
|
-
print(f" {r}")
|
|
439
|
-
|
|
440
|
-
print("\nScreenshots saved to /tmp/*.png")
|
|
441
|
-
|
|
442
|
-
if __name__ == "__main__":
|
|
443
|
-
main()
|