Skip to content

teleagent: list opencode-teleagent-auth - #882

Merged
yetone merged 1 commit into
magpie-community:mainfrom
anbulang:add-opencode-teleagent-auth
Nov 9, 2026
Merged

yetone merged 1 commit into
magpie-community:mainfrom
anbulang:add-opencode-teleagent-auth

Conversation

@anbulang

@anbulang anbulang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Adds the teleagent channel to the market.

Package: opencode-teleagent-auth — https://github.com/anbulang/opencode-teleagent-auth
Provider id: teleagent
What it signs in to: the TeleAgent (天翼 AI 星辰超级智能体) desktop app's own sign-in.

What it does

Sign-in Reads the app's app-auth/token.json and decrypts it with the keychain entry TeleAgent Safe Storage (Electron safeStorage v10). No API key, nothing pasted: signed in to the desktop means signed in here.
Requests Straight to the app's own OpenAI-compatible gateway, each one signed with a two-step HMAC over ts / nonce / body sha256 plus the device fingerprint the desktop stores.
Models The 5 the desktop ships: chat-pro 400K/x0.6, chat-flagship 400K/x1.0, chat-flash 400K/x0.2, chat-lite 100K/x0.5, chat-nano 100K/x0.1. Model ids outside that catalog are refused locally, not sent upstream.
Usage Read-only points balance, earliest expiry and plan name (auth.usage, so magpie quota and the card both show it).
Check-in Daily claim that reads claimed_today first and returns done when already claimed, so it is idempotent.
Tool One read-only points tool; no arguments, no spend, no model request.

Image input is declared only on chat-pro and chat-flash. That is measured, not copied from the app's own catalog: chat-lite answers 200 to an image but ignores it, chat-nano says the model is not multimodal, and chat-flagship answers business code 1210.

Why it is careful about request shape

The upstream treats automation as hostile. Two accounts got banned during development over the plugin's own synthetic probing (5 models × image data URLs, 50–600 KB filler bodies, 10/100/265 generated tool names, a real chat request on every boot), the second one within about 1h45m. The plugin therefore ships concurrency 2, 20 requests/minute and a circuit break of 10 minutes after 3 consecutive 401/403, per account; no boot-time probe, and no retry on quota-exceeded, banned or rate-limited replies. Those are account-survival parameters rather than performance ones, and docs/PROTOCOL.md writes up both incidents.

It does not impersonate the official client: messages[0] is the agent's own prompt, the tools are magpie's, and only the parts the desktop's own protocol requires (its device fingerprint, its session/message ids) are reproduced.

Single channel

providers: ["teleagent"] is not in any existing entry, so this adds a channel rather than duplicating one.

Checks

  • scripts/registry.mjs: registryProblems → none, agentKindProblems → none, 63,977 bytes.
  • bun test — 7,288 pass / 9 skip / 43 fail. The same 43 fail on main without this change on this machine (they need Chrome and a real macOS profile), so they are not from the added entry; registry.json is only read by the market tests.
  • The icon is a checked-in assets/icon.svg (200 on the URL above), so the card does not depend on a third-party host.

Note on a name collision

Another repository, cuddlesgiggles/teleagent-auth, publishes a package.json whose name is also opencode-teleagent-auth; it is a different, earlier implementation for Windows. Listing this package here is what lets magpie's market card win the dedupe over the tagged repository card (plugins.js: a tagged repo whose package the market already lists is drawn as the market's card), so users searching teleagent install this one rather than that one.

TeleAgent (天翼 AI 星辰超级智能体) desktop app, as a magpie provider plugin:
the desktop's own sign-in, no API key.

- Sign-in: reads the app's `app-auth/token.json` and decrypts it with the
  keychain entry `TeleAgent Safe Storage` (Electron safeStorage v10), so a
  user who is signed in to the desktop is signed in here — nothing is pasted.
- Requests: per-request two-step HMAC over `ts`/`nonce`/`body` sha256 with
  the device fingerprint the desktop stores, straight to the app's own
  OpenAI-compatible gateway; no client impersonation, no injected persona.
- Models: the 5 the desktop ships (`chat-pro` 400K/x0.6, `chat-flagship`
  400K/x1.0, `chat-flash` 400K/x0.2, `chat-lite` 100K/x0.5, `chat-nano`
  100K/x0.1), whitelisted locally. Image input only on `chat-pro` and
  `chat-flash`: measured, not copied from the app's catalog, because
  `chat-lite` answers 200 to an image but ignores it and the other two
  reject it (`1210` / not-multimodal).
- Usage and check-in: read-only points balance, expiry and plan name, and a
  daily check-in that reads `claimed_today` first, so it never claims twice.
- Safety: concurrency 2, 20 requests/minute, circuit break open for 10
  minutes after 3 consecutive 401/403, per account. Two accounts were banned
  by the upstream during development over synthetic probing, so those
  numbers are account-survival parameters, not performance knobs.

The `teleagent` channel is not listed yet.

Package: https://github.com/anbulang/opencode-teleagent-auth
npm: https://www.npmjs.com/package/opencode-teleagent-auth
@yetone
yetone merged commit ab16053 into magpie-community:main Nov 9, 2026
@yetone

yetone commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Merged as ab16053: I read every file of opencode-teleagent-auth@0.1.0 from npm (sha512 checked, byte-identical to the v0.1.0 tag). It has no install scripts and no dependencies, and it sends requests only to agent.teleai.com.cn. bun scripts/check.mjs and bun test scripts/ pass.

Small follow-ups worth a PR, none blocking:

  • Registry summary: say "Unofficial" and "macOS only", like the orcaterm and deepaicode entries. package.json declares os: ["darwin"], and the README mentions accounts being banned.
  • explainFailure comment: it says a 40109 ban is marked x-magpie-sign-in: kept, but the code sends expired for it and kept for 40105.
  • Host check: the signed fetch could refuse a host other than agent.teleai.com.cn, so a changed api never receives the signature.

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.

2 participants