Skip to content

fix: register alien x llm UCEP provider - #10

Open
saurabhhhcodes wants to merge 1 commit into
Nkovaturient:mainfrom
saurabhhhcodes:fix/alien-x-llm-ucep-1
Open

fix: register alien x llm UCEP provider#10
saurabhhhcodes wants to merge 1 commit into
Nkovaturient:mainfrom
saurabhhhcodes:fix/alien-x-llm-ucep-1

Conversation

@saurabhhhcodes

Copy link
Copy Markdown

Summary

  • instantiate the terminal LLMService and register the real alien-x-llm UCEP provider after the libp2p node starts
  • add the missing app/llm-extension-provider.js manifest and command handler for chat and ping
  • update docs so hosted browser builds are clearly UI-only and validate the terminal provider with window.testExtension('alien-x-llm', 'chat', ['ping'])

Fixes #1

Root Cause

app/index.js logged that alien-x-llm was registered, but it never called registerExtension for that provider. The file-transfer path also referenced llmService without creating it, so terminal-side LLM analysis could crash at runtime.

Testing

  • node --check p2p-X/web/app/index.js
  • node --check p2p-X/web/app/llm-extension-provider.js
  • git diff --check
  • npm ci in p2p-X/web/app
  • INTERACTIVE=false TIMEOUT_DURATION=5s npm start in p2p-X/web/app
    • confirmed log: Registering extension: alien-x-llm v1.0.0 at /uc/extension/alien-x-llm/1.0.0
    • confirmed log: Extension alien-x-llm registered and will be advertised via Identify

Notes

npm ci reports existing dependency audit findings (3 moderate, 4 high). This PR does not change dependencies.

@Nkovaturient

Copy link
Copy Markdown
Owner

isnt this is a duplicate PR of #8 ?

@saurabhhhcodes

Copy link
Copy Markdown
Author

Hi @Nkovaturient, I've rebased this branch onto the latest main, resolved the merge conflict in index.js, and verified that all syntax checks and Node scripts load cleanly. Ready for review and merge. Thanks!

@Nkovaturient

Copy link
Copy Markdown
Owner

@saurabhhhcodes : remove the duplicate PR, and present a snapshot of logs and demo the working as mentioned in the Issue. #1

Demo or Repro (show)

Local (expected after fix):

  1. cd p2p-X/web/app && npm start — confirm Identify advertises alien-x-llm.
  2. cd p2p-X/web && npm run dev — dial /ws multiaddr, mesh sync.
  3. Chat message → Alien X reply via UCEP (not browser fetch to Ollama).

Production:

  1. Deploy UI to Vercel without VITE_ALLOW_BROWSER_LLM.
  2. Run terminal agent with OPENAI_API_KEY or OLLAMA reachable from that host.
  3. Connect using production multiaddr (blocked today — see connectivity issue).

Current repro: Browser console shows only echo extension from agent; resolveAlienXReply falls through to UCEP_ONLY_HINT on non-localhost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wire alien-x-llm UCEP provider and document production LLM path

2 participants