feat(sse): add HyperAgent (hyperagent.com) unofficial web provider - #7994
Merged
diegosouzapw merged 4 commits intoJul 22, 2026
Merged
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Owner
|
Thanks for this — HyperAgent is wired correctly end-to-end (registry, executor, models, usage, web-cookie UI) and the executor's own test suite (16/16) is solid. Before merge, two EXISTING test suites need to be updated since they weren't touched by this PR and now fail:
Optionally, worth a look: the sticky thread/session cache in |
Reverse-engineered from live SPA captures (hyperagent/*.txt):
Chat:
- Cookie session auth (full Cookie header)
- New thread via GET /threads/new (or POST /api/threads)
- POST /api/threads/{id}/chat with SPA feature flags + content
- SSE parse of text/session_start/session_end/done events
- Multi-turn sticky threadId + sessionId cache (history prefix + last assistant)
Models:
- Hardcoded catalog from SPA pricing map
- Pretty display names (Claude Fable 5) while wire modelId stays fable etc.
- /v1/models exposes pretty name; chat uses modelId
Limits:
- GET /api/settings/billing/usage → creditBlocks initialUsd/remainingUsd/usedUsd
- USD Credits quota for Limits page
Tests: 15/15 unit/executor-hyperagent
Addresses pre-merge review feedback on diegosouzapw#7994: - Documents HYPERAGENT_USAGE_URL in .env.example and ENVIRONMENT.md (OMNIROUTE_DATA_DIR was already documented via the sibling PromptQL provider) so check-env-doc-sync.test.ts passes. - Regenerates the provider-translate-path golden snapshot to include the new hyperagent/ha registry entries. - Swaps the local toNumber() helper in usage/hyperagent.ts for the canonical @/shared/utils/numeric import (diegosouzapw#7879 no-restricted-syntax rule landed on the release branch after this PR was opened). - Freezes file-size baseline entries for the new open-sse/executors/hyperagent.ts (937 LOC, new-file cap 800) and the +3 LOC growth in src/lib/usage/providerLimits.ts (1000->1003), both irreducible to this PR's own provider-registration wiring. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
diegosouzapw
force-pushed
the
feat/hyperagent-web
branch
from
July 22, 2026 10:02
8217d92 to
38e98ab
Compare
diegosouzapw
merged commit Jul 22, 2026
1b010f6
into
diegosouzapw:release/v3.8.49
2 of 5 checks passed
diegosouzapw
added a commit
to artickc/OmniRoute
that referenced
this pull request
Jul 22, 2026
… conflict w/ diegosouzapw#7994) Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
5 tasks done
Merged
This was referenced Jul 24, 2026
diegosouzapw
added a commit
that referenced
this pull request
Jul 28, 2026
…8470) * fix(hyperagent): sticky thread for agentic tool loops (Claude Code) Follow-up to #7994. When a reverse-conversion proxy rewrites assistant text between turns (Intent+JSON -> native tool_calls -> re-serialized tool text), conversationFingerprint(prefix) no longer matches the key stored after turn 1, so HyperAgent created a new thread and multi-turn tool results appeared as a cold start. - Key sticky sessions by root user task (normalize pin wrappers) - Flatten Anthropic tool_use / tool_result for lastUserText + fingerprints - Regression tests for mutated-assistant tool loops Tests: tests/unit/executor-hyperagent.test.ts (19/19) * chore(quality): rebaseline for PR #8470 own-growth (hyperagent sticky thread) open-sse/executors/hyperagent.ts grows 937->1026 lines and gains one new cognitive/cyclomatic-complexity violation (extractMessageText, from the new Anthropic tool_use/tool_result flattening branches) on top of inherited base-tip drift already present on origin/release/v3.8.49 (file-size was already at cap; cognitive-complexity 951->956 and cyclomatic-complexity 2130->2169 drift predates this PR). Rebaselined file-size to 1026, cognitiveComplexity to 957, complexity count to 2170, matching measured values on the merged tree. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> --------- Co-authored-by: ikelvingo <im.kelvinwong@gmail.com> Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…iegosouzapw#7994) * feat(sse): add HyperAgent (hyperagent.com) unofficial web provider Reverse-engineered from live SPA captures (hyperagent/*.txt): Chat: - Cookie session auth (full Cookie header) - New thread via GET /threads/new (or POST /api/threads) - POST /api/threads/{id}/chat with SPA feature flags + content - SSE parse of text/session_start/session_end/done events - Multi-turn sticky threadId + sessionId cache (history prefix + last assistant) Models: - Hardcoded catalog from SPA pricing map - Pretty display names (Claude Fable 5) while wire modelId stays fable etc. - /v1/models exposes pretty name; chat uses modelId Limits: - GET /api/settings/billing/usage → creditBlocks initialUsd/remainingUsd/usedUsd - USD Credits quota for Limits page Tests: 15/15 unit/executor-hyperagent * fix(sse): HyperAgent execution mode + fable-latest wire model (no plan mode) * fix(sse): document HyperAgent env vars + regenerate golden snapshot Addresses pre-merge review feedback on diegosouzapw#7994: - Documents HYPERAGENT_USAGE_URL in .env.example and ENVIRONMENT.md (OMNIROUTE_DATA_DIR was already documented via the sibling PromptQL provider) so check-env-doc-sync.test.ts passes. - Regenerates the provider-translate-path golden snapshot to include the new hyperagent/ha registry entries. - Swaps the local toNumber() helper in usage/hyperagent.ts for the canonical @/shared/utils/numeric import (diegosouzapw#7879 no-restricted-syntax rule landed on the release branch after this PR was opened). - Freezes file-size baseline entries for the new open-sse/executors/hyperagent.ts (937 LOC, new-file cap 800) and the +3 LOC growth in src/lib/usage/providerLimits.ts (1000->1003), both irreducible to this PR's own provider-registration wiring. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
HouMinXi
pushed a commit
to HouMinXi/OmniRoute
that referenced
this pull request
Aug 2, 2026
…iegosouzapw#8470) * fix(hyperagent): sticky thread for agentic tool loops (Claude Code) Follow-up to diegosouzapw#7994. When a reverse-conversion proxy rewrites assistant text between turns (Intent+JSON -> native tool_calls -> re-serialized tool text), conversationFingerprint(prefix) no longer matches the key stored after turn 1, so HyperAgent created a new thread and multi-turn tool results appeared as a cold start. - Key sticky sessions by root user task (normalize pin wrappers) - Flatten Anthropic tool_use / tool_result for lastUserText + fingerprints - Regression tests for mutated-assistant tool loops Tests: tests/unit/executor-hyperagent.test.ts (19/19) * chore(quality): rebaseline for PR diegosouzapw#8470 own-growth (hyperagent sticky thread) open-sse/executors/hyperagent.ts grows 937->1026 lines and gains one new cognitive/cyclomatic-complexity violation (extractMessageText, from the new Anthropic tool_use/tool_result flattening branches) on top of inherited base-tip drift already present on origin/release/v3.8.49 (file-size was already at cap; cognitive-complexity 951->956 and cyclomatic-complexity 2130->2169 drift predates this PR). Rebaselined file-size to 1026, cognitiveComplexity to 957, complexity count to 2170, matching measured values on the merged tree. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> --------- Co-authored-by: ikelvingo <im.kelvinwong@gmail.com> Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…iegosouzapw#7994) * feat(sse): add HyperAgent (hyperagent.com) unofficial web provider Reverse-engineered from live SPA captures (hyperagent/*.txt): Chat: - Cookie session auth (full Cookie header) - New thread via GET /threads/new (or POST /api/threads) - POST /api/threads/{id}/chat with SPA feature flags + content - SSE parse of text/session_start/session_end/done events - Multi-turn sticky threadId + sessionId cache (history prefix + last assistant) Models: - Hardcoded catalog from SPA pricing map - Pretty display names (Claude Fable 5) while wire modelId stays fable etc. - /v1/models exposes pretty name; chat uses modelId Limits: - GET /api/settings/billing/usage → creditBlocks initialUsd/remainingUsd/usedUsd - USD Credits quota for Limits page Tests: 15/15 unit/executor-hyperagent * fix(sse): HyperAgent execution mode + fable-latest wire model (no plan mode) * fix(sse): document HyperAgent env vars + regenerate golden snapshot Addresses pre-merge review feedback on diegosouzapw#7994: - Documents HYPERAGENT_USAGE_URL in .env.example and ENVIRONMENT.md (OMNIROUTE_DATA_DIR was already documented via the sibling PromptQL provider) so check-env-doc-sync.test.ts passes. - Regenerates the provider-translate-path golden snapshot to include the new hyperagent/ha registry entries. - Swaps the local toNumber() helper in usage/hyperagent.ts for the canonical @/shared/utils/numeric import (diegosouzapw#7879 no-restricted-syntax rule landed on the release branch after this PR was opened). - Freezes file-size baseline entries for the new open-sse/executors/hyperagent.ts (937 LOC, new-file cap 800) and the +3 LOC growth in src/lib/usage/providerLimits.ts (1000->1003), both irreducible to this PR's own provider-registration wiring. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: Diego Rodrigues de Sa e Souza <diegosouza.pw@gmail.com>
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…iegosouzapw#8470) * fix(hyperagent): sticky thread for agentic tool loops (Claude Code) Follow-up to diegosouzapw#7994. When a reverse-conversion proxy rewrites assistant text between turns (Intent+JSON -> native tool_calls -> re-serialized tool text), conversationFingerprint(prefix) no longer matches the key stored after turn 1, so HyperAgent created a new thread and multi-turn tool results appeared as a cold start. - Key sticky sessions by root user task (normalize pin wrappers) - Flatten Anthropic tool_use / tool_result for lastUserText + fingerprints - Regression tests for mutated-assistant tool loops Tests: tests/unit/executor-hyperagent.test.ts (19/19) * chore(quality): rebaseline for PR diegosouzapw#8470 own-growth (hyperagent sticky thread) open-sse/executors/hyperagent.ts grows 937->1026 lines and gains one new cognitive/cyclomatic-complexity violation (extractMessageText, from the new Anthropic tool_use/tool_result flattening branches) on top of inherited base-tip drift already present on origin/release/v3.8.49 (file-size was already at cap; cognitive-complexity 951->956 and cyclomatic-complexity 2130->2169 drift predates this PR). Rebaselined file-size to 1026, cognitiveComplexity to 957, complexity count to 2170, matching measured values on the merged tree. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> --------- Co-authored-by: ikelvingo <im.kelvinwong@gmail.com> Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds HyperAgent (
hyperagent/ aliasha) as an unofficial web-cookie provider reverse-engineered from the live SPA (hyperagent.com).Protocol (from captures)
GET /threads/new(fallbackPOST /api/threads)/thread/{id}POST /api/threads/{id}/chatdata:eventssessionId: nullsession_startreturns sessionIdGET /api/settings/billing/usagecreditData.creditBlocks[].initialUsd/remainingUsdModels
Hardcoded catalog from SPA pricing map. Pretty names in
/v1/models(e.g. Claude Fable 5) while chat sends wire modelId (fable,opus-latest,gpt-5.6-sol, …).Auth
Browser Cookie header (same pattern as other web-session providers).
Tests
tests/unit/executor-hyperagent.test.ts— 15/15 pass.Risk
Unofficial/undocumented endpoints; labeled
subscriptionRisk+ webCookie risk notice.