single source of truth for pi config via ~/.pi/agent

auth.json stores api keys, models.json stores local providers directly.
no more copies, sync layers, or per-user config generation.
docker containers mount pi config read-only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 18:42:30 +00:00
co-authored by Claude Opus 4.6
parent 500a70910e
commit 11845fbae5
12 changed files with 302 additions and 580 deletions
-2
View File
@@ -4,7 +4,6 @@ import { getUserCount, createUser } from 'officerdb';
import { sign, verify } from '@@/jwt';
import argon2 from 'argon2';
import * as errors from '@@/custom-errors';
import { syncUserPiConfig } from '@@/api/server-settings/sync-user-pi-config';
import { validatePassword } from './validate-password';
export const bootstrapHandler: Handler = async function (ctx) {
@@ -58,6 +57,5 @@ export const bootstrapHandler: Handler = async function (ctx) {
status: 'Active',
});
syncUserPiConfig(payload.email).catch(() => {});
return ctx.json({ ok: true });
};
-2
View File
@@ -4,7 +4,6 @@ import { join } from 'node:path';
import { getUserByEmail, getPasskeysByUserIdAndOrigin } from 'officerdb';
import { sign } from '@@/jwt';
import { getClaudeDir } from '@@/data-path';
import { syncUserPiConfig } from '@@/api/server-settings/sync-user-pi-config';
import argon2 from 'argon2';
import * as errors from '@@/custom-errors';
@@ -27,7 +26,6 @@ export const signinHandler: Handler = async function (ctx) {
const { id, name, username, role } = dbUser;
mkdir(join(getClaudeDir(email), 'archived'), { recursive: true }).catch(() => {});
syncUserPiConfig(email).catch(() => {});
const tokenUser = { id, email, name, username, role, passkeys: passkeys.length };