A2A agent protocol interoperability, Agent Cards, and MCP bridging / Protokol agen A2A, Agent Cards, dan integrasi MCP.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Expert guide for Bun 1.2+ JavaScript/TypeScript runtime — native Bun.sql Postgres client, Bun.s3 object storage, text lockfile, multi-core HTTP clusters, and bun:test / Panduan ahli runtime Bun 1.2+.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
실행 점수 미검증
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
<a name="english"></a>
Connects and orchestrates with domain skills:
js-backend-expert (Hono on Bun, Fastify/Express migration), api-design-expert (REST & WebSocket contracts), and sse-websocket-streaming-expert (native Bun.serve WebSockets).database-orm-expert (Drizzle ORM with native bun:sql, PostgreSQL/SQLite) and file-upload-media-expert (zero-dependency Bun.s3 client).autonomous-tdd-debugger, e2e-testing-expert, and anti-slop for executing high-speed bun test suites with snapshot matching.brainstorming and zero-to-prod-orchestrator (Phase 4: Backend & APIs).Expert-level guidance for engineering ultra-low-latency backend microservices with Bun 1.2+. Covers the native PostgreSQL driver (import { SQL } from 'bun'), native S3 object storage (Bun.s3), git-friendly text lockfiles (bun.lock), multi-core HTTP clustering via reusePort, built-in SQLite, and high-speed Jest-compatible unit testing via bun:test.
Bun.sql.Bun.s3.bun test.import { SQL } from 'bun')Bun 1.2 includes a built-in, high-speed PostgreSQL driver that communicates directly via binary wire protocol without pg or postgres.js:
// src/lib/db.ts
import { SQL } from 'bun';
// Instantiate pooled database client
export const sql = new SQL({
url: process.env.DATABASE_URL || 'postgres://user:password@localhost:5432/production_db',
max: 20, // Connection pool size
idleTimeout: 30, // Max idle time in seconds
});
export interface UserAccount {
id: string;
email: string;
balance: number;
}
// 1. Tagged template query with automatic parameterized SQL injection defense
export async function getActiveUser(email: string): Promise<UserAccount | null> {
const users = await sql<UserAccount[]>`
SELECT id, email, balance
FROM users
WHERE email = ${email} AND active = true
LIMIT 1
`;
return users[0] ?? null;
}
// 2. Atomic Database Transaction
export async function transferFunds(fromUserId: string, toUserId: string, amount: number) {
return await sql.begin(async (tx) => {
const debit = await tx`
UPDATE users
SET balance = balance - ${amount}
WHERE id = ${fromUserId} AND balance >= ${amount}
RETURNING id, balance
`;
if (debit.length === 0) {
throw new Error('Insufficient funds or sender not found');
}
await tx`
UPDATE users
SET balance = balance + ${amount}
WHERE id = ${toUserId}
`;
return { success: true };
});
}
Bun.s3)Interact with AWS S3, Cloudflare R2, or MinIO with zero external SDK dependencies:
// src/lib/storage.ts
import { s3 } from 'bun';
// Configure credentials once or let Bun auto-detect AWS_* environment variables
s3.credentials({
accessKeyId: process.env.S3_ACCESS_KEY_ID!,
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY!,
bucket: process.env.S3_BUCKET_NAME!,
region: process.env.S3_REGION || 'auto',
endpoint: process.env.S3_ENDPOINT, // e.g. https://<account_id>.r2.cloudflarestorage.com
});
// Upload file directly from memory buffer
export async function uploadInvoicePdf(invoiceId: string, pdfBuffer: Buffer): Promise<string> {
const fileKey = `invoices/${invoiceId}.pdf`;
await s3.write(fileKey, pdfBuffer, {
type: 'application/pdf',
});
return fileKey;
}
// Generate presigned upload URL for direct browser uploads
export function getDirectUploadUrl(fileName: string): string {
return s3.presign(`uploads/${fileName}`, {
method: 'PUT',
expiresIn: 300, // 5 minutes
});
}
Bun.serve()Scale HTTP throughput across all CPU cores on a single host with reusePort: true:
// src/server.ts
import { serve } from 'bun';
const server = serve({
port: Number(process.env.PORT) || 3000,
reusePort: true, // Enables SO_REUSEPORT: spawn multiple instances to scale across cores
async fetch(req) {
const url = new URL(req.url);
if (url.pathname === '/health') {
return Response.json({
status: 'healthy',
pid: process.pid,
timestamp: new Date().toISOString(),
});
}
return new Response('Not Found', { status: 404 });
},
error(error) {
return new Response(`Internal Server Error: ${error.message}`, { status: 500 });
},
});
console.log(`Worker process ${process.pid} listening on port ${server.port}`);
bun.lock)In Bun 1.2+, the default lockfile format is a plain text bun.lock file (replacing binary bun.lockb):
cat, grep).bun:testJest/Vitest compatible test suite running natively on JavaScriptCore:
// test/user.test.ts
import { describe, expect, it, beforeEach } from 'bun:test';
import { getActiveUser, sql } from '../src/lib/db';
describe('User Database Service', () => {
beforeEach(async () => {
await sql`TRUNCATE TABLE users CASCADE`;
await sql`INSERT INTO users (id, email, balance, active) VALUES ('usr-1', 'test@example.com', 100.0, true)`;
});
it('retrieves active user by email', async () => {
const user = await getActiveUser('test@example.com');
expect(user).not.toBeNull();
expect(user?.email).toBe('test@example.com');
expect(user?.balance).toBe(100.0);
});
it('returns null for inactive or missing user', async () => {
const missing = await getActiveUser('missing@example.com');
expect(missing).toBeNull();
});
});
<a name="bahasa-indonesia"></a>
Terhubung dan mengorkestrasi bersama skill domain:
js-backend-expert (Hono di atas Bun, migrasi Fastify/Express), api-design-expert (kontrak REST & WebSocket), dan sse-websocket-streaming-expert (WebSocket native Bun.serve).database-orm-expert (Drizzle ORM dengan native bun:sql, PostgreSQL/SQLite) dan file-upload-media-expert (klien object storage Bun.s3 zero-dependency).autonomous-tdd-debugger, e2e-testing-expert, dan anti-slop untuk eksekusi test runner bun test berkecepatan tinggi dengan pencocokan snapshot.brainstorming dan zero-to-prod-orchestrator (Fase 4: Backend & APIs).Panduan tingkat ahli untuk rekayasa microservices backend berlatensi ultra-rendah menggunakan Bun 1.2+. Mencakup driver PostgreSQL native (import { SQL } from 'bun'), penyimpanan objek native S3 (Bun.s3), format lockfile teks yang ramah git (bun.lock), clustering HTTP multi-core melalui reusePort, SQLite bawaan, dan pengujian unit kompatibel Jest via bun:test.
Bun.sql.Bun.s3.bun test.import { SQL } from 'bun')Bun 1.2 menyertakan driver PostgreSQL berkecepatan tinggi yang berkomunikasi langsung melalui protokol biner tanpa overhead library pihak ketiga:
import { SQL } from 'bun';
export const sql = new SQL({
url: process.env.DATABASE_URL || 'postgres://user:password@localhost:5432/db_produksi',
max: 20,
});
// Query aman terhadap SQL Injection melalui tagged template literals
export async function cariPenggunaAktif(email: string) {
const pengguna = await sql`
SELECT id, email, balance
FROM users
WHERE email = ${email} AND active = true
LIMIT 1
`;
return pengguna[0] ?? null;
}
Bun.s3)Unggah dan kelola file di S3 atau Cloudflare R2 secara native:
import { s3 } from 'bun';
// Unggah buffer file dokumen langsung
export async function simpanFaktur(fakturId: string, pdfBuffer: Buffer) {
const namaFile = `faktur/${fakturId}.pdf`;
await s3.write(namaFile, pdfBuffer, { type: 'application/pdf' });
return namaFile;
}
// Buat URL presigned untuk upload langsung dari browser klien
export function buatUrlUploadLangsung(namaFile: string) {
return s3.presign(`unggah/${namaFile}`, {
method: 'PUT',
expiresIn: 300,
});
}
Bun.serve()import { serve } from 'bun';
const server = serve({
port: Number(process.env.PORT) || 3000,
reusePort: true, // Memungkinkan beberapa proses Bun berjalan di port yang sama lintas CPU cores
async fetch(req) {
return Response.json({
status: 'aktif',
pid: process.pid,
waktu: new Date().toISOString(),
});
},
});
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
A2A agent protocol interoperability, Agent Cards, and MCP bridging / Protokol agen A2A, Agent Cards, dan integrasi MCP.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Web accessibility testing with axe-core, Playwright, and WCAG 2.2 / Pengujian aksesibilitas web axe-core, Playwright, dan WCAG 2.2.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Model cascading & complexity-scored routing (Grok, Gemini, Claude) / Routing kaskade model & scoring kompleksitas (Grok, Gemini, Claude).
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Affective computing, emotion AI, and multimodal sentiment analysis / Komputasi afektif, AI emosional, dan analisis sentimen multimodal.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.