AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
翻譯準備中
Fetcher is not just another HTTP client—it's a complete ecosystem designed for modern web development with native LLM streaming API support. Built on the native Fetch API, Fetcher provides an Axios-like experience with powerful features while maintaining an incredibly small footprint.
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Fetcher is a TypeScript HTTP-client ecosystem built around the platform
fetch API. Start with typed requests, interceptors, timeouts, and streaming;
add React, OpenAPI generation, authentication, Wow CQRS, or data-viewer packages
only when the application needs them.
Node.js 18.20.8 or newer is required.檢視完整 README ↗中文 · Documentation · Skills · Storybook · npm
Fetcher is a TypeScript HTTP-client ecosystem built around the platform
fetch API. Start with typed requests, interceptors, timeouts, and streaming;
add React, OpenAPI types, authentication, or storage packages only when the
application needs them.
pnpm add @ahoo-wang/fetcher
Node.js 18.20.8 or newer is required.
import { Fetcher, FetcherError } from '@ahoo-wang/fetcher';
interface User {
id: string;
name: string;
}
const api = new Fetcher({
baseURL: 'https://api.example.com',
timeout: 10_000,
});
try {
const response = await api.get('/users/{id}', {
urlParams: {
path: { id: 'u-42' },
query: { include: 'team' },
},
});
const user: User = await response.json();
console.log(user.name);
} catch (error) {
if (error instanceof FetcherError) {
console.error(error.message);
}
}
| Job | Package |
|---|---|
| HTTP client and interceptors | @ahoo-wang/fetcher |
| Declarative service classes | @ahoo-wang/fetcher-decorator |
| Typed events | @ahoo-wang/fetcher-eventbus |
| Server-Sent Events | @ahoo-wang/fetcher-eventstream |
| OpenAI Chat Completions | @ahoo-wang/fetcher-openai |
| OpenAPI TypeScript types | @ahoo-wang/fetcher-openapi |
| React hooks | @ahoo-wang/fetcher-react |
| Typed storage | @ahoo-wang/fetcher-storage |
| CoSec authentication | @ahoo-wang/fetcher-cosec |
Choose packages explains peer dependencies and the smallest useful combination.
The packages coupled to Wow now live in the Wow repository, are versioned with Wow, and depend on the fetcher packages above:
| Was | Now |
|---|---|
@ahoo-wang/fetcher-wow | @ahoo-wang/wow-client |
Wow query hooks in fetcher-react | @ahoo-wang/wow-react |
@ahoo-wang/fetcher-generator | @ahoo-wang/wow-generator (command wow-generator) |
@ahoo-wang/fetcher-view-engine | @ahoo-wang/wow-view-engine |
@ahoo-wang/fetcher-viewer (deprecated) | Not moved: frozen on the 5.x branch; replaced by @ahoo-wang/wow-view-engine (Wow 9.2+) |
The new packages, @ahoo-wang/wow-view-engine included, are on npm from Wow 9.2.0, Wow's first stable release; from Wow 9.2.1 they accept fetcher 6 (peer range ^5.1.5 || ^6.0.0). To upgrade a 5.x application, switch to the Wow packages (9.2.1 or later) first, then upgrade fetcher. Documentation: wow.ahoo.me.
The fetcher 5.x line keeps receiving fixes from the 5.x branch.
pnpm install --frozen-lockfile
pnpm build
VITEST_MAX_WORKERS=4 pnpm test:unit
pnpm lint
See the contributor guide for focused package, integration, Wiki, and Storybook checks.