Commit Graph

6 Commits

Author SHA1 Message Date
ywkj 153b05414e refactor: remove all token caching — always fetch fresh session
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>
2026-03-20 06:19:16 +08:00
ywkj f7f385321f feat: add CLI entry point for Python skills to call via subprocess
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>
2026-03-19 08:31:49 +08:00
ywkj 22bc6f7438 feat: auto-load ~/.openclaw/.env in buildConfig
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>
2026-03-19 07:51:38 +08:00
ywkj b05363e8f0 feat: add clientConfig() method for querying client metadata
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>
2026-03-19 07:37:56 +08:00
ywkj 69051a3479 feat: add SkillClient — single entry point for authenticated API calls
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>
2026-03-17 08:17:46 +08:00
ivanberry 70cf86889e feat: initial auth-runtime module 2026-03-12 07:33:43 +08:00