Shared Cloudflare Workers core for organization-isolated AI task services (OAuth provider, SQLite Durable Object task store, routing, completion webhooks, delivery diagnostics, and agent adapters).
CodeGovernanceLab/AiTaskService is the single canonical source for the Cloudflare Workers task-service runtime (@codegovernancelab/ai-task-service). Business repositories (QuantStrategyLab/QuantAIService, Pigbibi/PersonalAIService, etc.) remain in their own organizations and consume this core via a pinned Git submodule (vendor/ai-task-service) and a local file dependency in package.json (works in hardened npm environments where github: and remote tarballs are disabled):
{
"dependencies": {
"@codegovernancelab/ai-task-service": "file:./vendor/ai-task-service"
}
}
```json
{
"dependencies": {
"@codegovernancelab/ai-task-service": "github:CodeGovernanceLab/AiTaskService#<40-char-commit-sha>"
}
}Each consumer keeps only:
- Its own private
wrangler.toml/wrangler.example.jsonc(Worker name, Durable Object binding, org-specific env vars, and Secrets). - A minimal
src/worker.mjswrapper that re-exports its existing Durable Object class name (e.g.,QuantTaskStore as PersonalTaskStoreorPigbibiTaskStore as PersonalTaskStore) so Cloudflare Durable Object SQLite state stays 100% intact with zero migration risk. - Any org-specific Python scripts, prompts, or business workflows.
npm ci
npm run build
npm test