docs: remove CLIENT_KEY/env.local — auth handled by auth-runtime

This commit is contained in:
ivanberry 2026-03-12 08:20:45 +08:00
parent c5620be08b
commit de691cbf79
1 changed files with 10 additions and 35 deletions

View File

@ -5,58 +5,35 @@ description: "找客户、找买家、开发客户、cold outreach。当用户
# Client Finder
Use `skill-credit` + `ecom run-flow` so agents only need workflow input `client_key`.
This skill includes query expansion before calling `/ecom/cold-outreach/run-flow`.
Skill-credit + ecom run-flow: query expansion → `/ecom/cold-outreach/run-flow`.
Execution mode is fire-and-return: start workflow fast and return accepted immediately; terminal callbacks are handled by backend webhook delivery.
> Auth (CLIENT_KEY) is loaded automatically from `~/.openclaw/.env` by auth-runtime. No need to pass it.
## Run Skill
Run the skill runner (primary entrypoint agents should call):
```bash
<skill-dir>/scripts/cliet-finder.sh --client-key='<sk_xxx.yyy>' "office machine" "us"
<skill-dir>/scripts/cliet-finder.sh "office machine" "us"
```
Optional: provide LLM-generated query expansion JSON. If provided, it must be valid and non-empty:
Optional: provide LLM-generated query expansion JSON:
```bash
QUERY_EXPANSION_JSON='{"expandedQueries":["office machine supplier us","office equipment distributor us"],"primaryQuery":"office machine supplier us"}' \
<skill-dir>/scripts/cliet-finder.sh --client-key='<sk_xxx.yyy>' "office machine" "us"
<skill-dir>/scripts/cliet-finder.sh "office machine" "us"
```
Use dry-run to verify endpoint sequence without network calls:
Dry-run (no network calls):
```bash
<skill-dir>/scripts/cliet-finder.sh --client-key='<sk_xxx.yyy>' "office machine" "us" --dry-run
```
## Quick Test
Run the test wrapper (it calls the skill runner above):
```bash
<skill-dir>/scripts/run-endpoint-test.sh "office machine" "us"
```
Default behavior is `--dry-run`. For live execution, pass mode + client key as 3rd/4th args.
```bash
<skill-dir>/scripts/run-endpoint-test.sh "office machine" "us" --dry-run
<skill-dir>/scripts/run-endpoint-test.sh "office machine" "us" --live "sk_xxx.yyy"
<skill-dir>/scripts/cliet-finder.sh "office machine" "us" --dry-run
```
## Required Inputs
For live execution:
- `client_key` from workflow input (pass into script as `--client-key=<client_key>`)
- `query` (string)
- `country` (optional, default `us`)
Optional runtime config:
- `AUTH_BASE` (default: `https://api-gw-test.yuanwei-lnc.com`, can be passed as `--auth-base=<url>`)
Optional:
- `QUERY_EXPANSION_JSON` (optional LLM expansion input)
@ -74,8 +51,8 @@ For client onboarding and billing flow (Chinese), read [how-to-use.md](how-to-us
- Remove leading `cold-outreach:` prefix (case-insensitive).
2. Exchange runtime token.
- Call `POST /auth/skill-credit/session` with `{ "clientKey": "<client_key>" }`.
- Require `accessToken` in response.
- auth-runtime handles this automatically via `~/.openclaw/.env`.
- Calls `POST /auth/skill-credit/session` with `CLIENT_KEY`, caches token with TTL.
3. Expand query.
- Build candidate queries from skill logic (`rule`) or `QUERY_EXPANSION_JSON` (`llm`).
@ -87,11 +64,9 @@ For client onboarding and billing flow (Chinese), read [how-to-use.md](how-to-us
- `query` = `primaryQuery`
- `country`
- Require `workflowId` in response.
- This workflow only covers discovery + email-find data collection.
5. Return accepted immediately.
- Return JSON with `workflowStatus = "accepted"` and `workflowId`.
- This runner does not poll or finalize billing.
- Backend pushes terminal callback to webhook bound on the client key.
## Output Contract (Strict)