evOo-local/scripts/seed-ollama.ts
Claude 693ab5e4ce
chore: remove legacy orchestrator, trading and one-off script leftovers
The repository still carried the pre-evOo prototype: a Python orchestrator,
the old HTML "evoo-platform" cockpit (whose test ran in the root unit
suite), an apex-trading package, the hot-reload deploy.sh for it, a
permissions manifest, an architecture note with local file links, agent
handoff notes, a Steve Jobs persona template and about ninety one-off
scripts that probe a developer database with hard-coded local URLs. None
of it is used by the product, CI or the real deploy in ops/evo-deploy.

Delete those files, drop the evoo-platform test glob from the root vitest
config, the Cockpit section from .env.example and the dead biome and
gitignore entries, and update the docs that listed the removed tools.
scripts/start-tmux.sh no longer starts the removed sentinel and resolves
the checkout from its own location instead of a machine-specific path;
scripts/seed-ollama.ts requires DATABASE_URL instead of falling back to a
local URL with a username.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
2026-10-03 13:04:16 +00:00

43 lines
1.1 KiB
TypeScript

import { createDb } from "../packages/db/src/index.js";
const dbUrl = process.env.DATABASE_URL;
if (!dbUrl) throw new Error("DATABASE_URL is required");
const { prisma } = createDb(dbUrl);
async function main() {
const users = await prisma.user.findMany();
console.log(
"Users found:",
users.map((u) => ({ id: u.id, email: u.email })),
);
for (const user of users) {
const secretId = `secret_ollama_${Math.random().toString(36).slice(2)}`;
await prisma.secret.create({
data: {
id: secretId,
userId: user.id,
kind: "model",
ciphertext: "ollama_local_dummy_ciphertext",
},
});
await prisma.userModelCredential.create({
data: {
id: `cred_ollama_${Math.random().toString(36).slice(2)}`,
userId: user.id,
provider: "openai-compatible",
label: "Ollama Local (gemma4:latest)",
secretId: secretId,
supportsImages: true,
},
});
console.log(`Seeded Ollama credential for user: ${user.email}`);
}
}
main()
.catch((e) => console.error(e))
.finally(() => prisma.$disconnect());