Commit Graph

8 Commits

Author SHA1 Message Date
xiaoju 09e710101d fix: complete Dynamic Workers migration — all 68 tests pass — 小橘 🍊 2026-04-03 09:49:52 +00:00
xiaoju 120e62d7e4 fix: restore missing KV route methods and getWorkerName helper
- Added back KvStore.getRoute/setRoute/deleteRoute methods
- Added back WorkerPool.getWorkerName() private method
- Fixed deploy() to properly set route.worker_name with prefix

Tests passing: 56/68 (82%)
2026-04-03 09:43:19 +00:00
xiaoju ce4c2b7b36 refactor: migrate from CF API worker scripts to Dynamic Workers — 小橘 🍊
- Added worker_loaders binding (LOADER) to wrangler.toml
- Updated WorkerPool to use LOADER.get() instead of CF API deploy/delete
- Removed subdomain-based invoke; now uses Dynamic Workers directly
- Cleaned up config.ts (removed SUBDOMAIN_SUFFIX, PAGE_RATE_LIMIT)
- Simplified cf-api.ts to legacy cleanup only (LegacyCfApi)
- Updated all tests to use createMockLoader instead of createMockCfApi
- Removed PageRateLimitError (no longer needed)
- All API endpoints unchanged; migration is internal implementation only
2026-04-03 09:41:13 +00:00
xiaoju c3f3b822f1 feat: embedding semantic search + MMR for explore
- Use CF Workers AI bge-base-en-v1.5 for embeddings
- Deploy stores capability embedding in KV
- Query uses cosine similarity (find) and MMR (explore)
- Query embedding cached in KV (1h TTL)
- Fallback to string matching for capabilities without embeddings
- Mock embedding service for unit tests
2026-04-03 08:16:27 +00:00
xiaoju 513e84622c feat: unified query API + deploy metadata
- Add description/tags/examples to deploy params
- Replace /_api/list with /_api/query (public, no auth)
- find mode: precise, detailed, default limit=3
- explore mode: diverse, summary, default limit=20
- Relevance scoring + tag-based dedup for explore
- Delete old list endpoint
2026-04-03 08:02:09 +00:00
xiaoju 3705b158bb refactor: simplify to user-level shared capabilities
- Remove agent isolation (data sovereignty belongs to user, not agent)
- Capability naming: ping instead of xiaoju--ping
- Route: /run/{capability} instead of /{agent}/{capability}
- Auth: single deploy-token instead of per-agent tokens
- Delete S10 test (agent isolation no longer exists)
- Clean up old agent-prefixed workers
2026-04-03 05:49:20 +00:00
xiaoju b8b00f235e fix: enforce page-rate-limit on all invoke→page_in paths; loop eviction to prevent used_slots>total_slots; clamp status used_slots; fix S07 test to respect MAX_SLOTS=3 2026-04-03 05:42:03 +00:00
xiaoju f20b19a71e feat: implement Sigil Phase 1 MVP 🔮
- Wrangler project setup (TypeScript + Vitest)
- SigilBackend interface + WorkerPool implementation
- KV store with layered key schema (code/meta/lru/route/auth/stats)
- LRU scheduler with eviction priority (ephemeral_expired > ephemeral > normal > persistent)
- AuthModule: Bearer token validation, agent isolation, deploy cooldown
- Router: /_health, /_api/deploy, /_api/remove, /_api/list, /_api/inspect, /{agent}/{capability}
- 13 test scenarios, all passing (38 tests)
- MockKV + MockCfApi for isolated testing

Tests: 38/38  | Build: 22KB gzip:5KB 

小橘 🍊(NEKO Team)
2026-04-03 04:17:43 +00:00