Adds a Codex/ChatGPT backend path for the supplier alongside the
existing Ollama one. The mainnet supplier is repointed at a localhost
ChatMock proxy (RayBytes/ChatMock, pinned :v1.35) that authenticates
against a ChatGPT Pro subscription via OAuth.
- supplier/src/openai.ts: HTTP client for OpenAI-compatible
/v1/chat/completions. Same return shape as ollama.callOllama so
jobRunner can branch cleanly.
- supplier/src/jobRunner.ts: branch on config.llmBackend.
- supplier/src/config.ts: LLM_BACKEND ("ollama" default | "openai"),
OPENAI_BASE_URL, OPENAI_TIMEOUT_MS (default 180_000 — GPT first-token
latency).
- supplier/src/cli/gen-keypair.ts: standalone Ed25519 keypair generator
+ bech32 address derivation. Used to bootstrap a fresh supplier
wallet without round-tripping through tx:post-advert --dry-run.
- deploy/mainnet/docker-compose.chatmock.yml: long-running chatmock
serve + one-shot --profile login flow.
- deploy/mainnet/docker-compose.supplier.yml: rewritten for openai
backend; Traefik routes at mp-suppliers-gpt.vector.apexfusion.org so
the unsuffixed slot stays free for a future supplier with a
different backend.
- tests/unit/supplier-openai.test.ts: unit coverage for callOpenAi.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
27 lines
718 B
JSON
27 lines
718 B
JSON
{
|
|
"name": "@marketplace/supplier",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit",
|
|
"tx:gen-keypair": "tsx src/cli/gen-keypair.ts",
|
|
"tx:post-advert": "tsx src/cli/post-advert.ts",
|
|
"tx:retire-advert": "tsx src/cli/retire-advert.ts",
|
|
"tx:publish-reference-scripts": "tsx src/cli/publish-reference-scripts.ts"
|
|
},
|
|
"dependencies": {
|
|
"@marketplace/shared": "workspace:*",
|
|
"@noble/ed25519": "^2.1.0",
|
|
"@noble/hashes": "^1.8.0",
|
|
"bech32": "^2.0.0",
|
|
"express": "^4.21.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/express": "^5.0.3",
|
|
"@types/supertest": "^6.0.2",
|
|
"supertest": "^7.0.0",
|
|
"typescript": "^5.7.2"
|
|
}
|
|
}
|