No description
- TypeScript 99.4%
- Shell 0.6%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| agents | ||
| references | ||
| scripts | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| ASYNC.md | ||
| bun.lock | ||
| CONFIG_MIGRATION.md | ||
| how-to-use.md | ||
| install.sh | ||
| output_schema.json | ||
| package.json | ||
| README.md | ||
| REFACTORING_SUMMARY.md | ||
| SKILL.md | ||
Client Finder - Bun + TypeScript Implementation
This document describes the Bun + TypeScript implementation of the client-finder skill.
Overview
The client-finder skill is implemented with Bun + TypeScript, providing:
- Type safety
- Modular structure
- Easier testing
- Robust error handling
Project Structure
client-finder/
├── src/
│ ├── index.ts # Main entry point and orchestration logic
│ ├── expansion.ts # Query expansion logic (LLM and rule-based)
│ ├── workflow.ts # Workflow API calls
│ └── types.ts # TypeScript type definitions
├── scripts/
│ ├── run.ts # Bun CLI entry point
│ └── test.ts # Test suite
├── package.json
├── SKILL.md
└── output_schema.json
Runtime Flow
@clawd/auth-runtimereads~/.yuanwei/auth.json.- Start workflow:
POST /ecom/cold-outreach/run-flow. - If the platform key is missing or rejected, stop with the centralized auth error.
- Return accepted immediately.
Note: this skill does not pass webhook_url/webhook_token in body. Webhook config is resolved from the bound client by backend.
Run
bun run scripts/run.ts "office machine" "us"
Dry-run:
bun run scripts/run.ts "office machine" "us" --dry-run
Environment
~/.yuanwei/auth.json(required for live)QUERY_EXPANSION_JSON(optional)
Testing
Run unit-like checks:
bun run test
Notes
- Output must match
output_schema.json. - This skill is async fire-and-return: no local polling/finalize/hook emission.