install.sh 生成 shell wrapper 脚本 exec bun run cli.ts,
而非 bun build --compile(生成空文件)。
auth-cli.ts 修复 HOME 环境变量缺失时 homedir() 返回空的问题。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skills copy this file into their src/ and import from it instead of
npm-depending on @clawd/auth-runtime. Uses process.execPath for bun
resolution and AUTH_RUNTIME_DIR env for path override.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Auth-runtime is infrastructure — cascading updates to all clients x
all skills is a business-system concern, not a CI job. Dependent
skills will pick up latest auth-runtime next time they are deployed
via their install.sh (which always does fresh npm install).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When auth-runtime is pushed to main, CI notifies the skill-update
webhook to reinstall all dependent skills (1688-product-master,
client-finder, email-content-compose), ensuring they pick up the
latest auth-runtime via their install.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Root cause: 1688-product-master uses the functional API (createEnvConfig,
getAccessToken, requestApi) which never loaded ~/.openclaw/.env, so
CLIENT_KEY was always empty at runtime.
- auth.ts: createEnvConfig() now calls loadGlobalEnv() first
- index.ts: export all functional API + requestApi from main entry
- Bump version to 1.1.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dist/ was stale — missing loadGlobalEnv in client.js, causing bundled
skills to never read ~/.openclaw/.env at runtime.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Correct retry logic:
1. Use cached token
2. Token rejected → refresh session with current CLIENT_KEY
3. Still failing → reloadGlobalEnv() to pick up updated .env, rebuild
config with new CLIENT_KEY, retry
env.ts now tracks which keys it loaded from .env so reloadGlobalEnv()
can overwrite them without touching externally-set env vars.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Every call now hits /auth/skill-credit/session directly.
Deletes cache.ts, removes CachedTokenData type, strips cacheDir/minTtlSec options.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds src/cli.ts with commands: token, session, client-config, request.
Python auth-runtime-py will call this via `bun run cli.ts` instead of
reimplementing auth logic in Python.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skills no longer need to manually export env vars. auth-runtime
reads the global config file automatically on first client creation.
Won't overwrite explicitly set environment variables.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
hookUrl/hookToken are now resolved via /auth/skill-credit/client-config
endpoint instead of key binding. Added ClientConfig type and extraHeaders
support in requestApi.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Skills no longer need to manage config, tokens, or retry logic.
Just `createSkillClient()` and call `client.post(path, body)`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>