mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-02 17:54:48 +00:00
Rotation on every surface: desktop rotator, Rotation page + run queue, MCP tools (CLI 0.15.0) (#269)
- method "desktop": dashboard-only keys (OpenAI, ElevenLabs, Brave Search, Civitai, Cloudflare Global API Key roll, Anthropic/Claude OAuth report-only) rotated by an agent on a W3BS Agentic Desktop Layer host (--desktop / LOGICSRC_DESKTOP_HOST). Agent browser only, old key by its last 4 chars, DOM-to-file capture (wl-paste fallback), two-phase revoke after health, rollback deletes the new key, remote file shredded. needs-login and busy are waits, not failures. Roll needs --allow-roll plus a capture self-test. - app.logicsrc.com: /teams/:slug/rotation plan page + rotation run queue (migration 010), API routes; runner: rotate-keys --from-queue. - MCP: rotation_plan, rotation_set, rotate_keys (dry run default), rotation_runs. - docs/rotation.md: desktop rotators and every surface. Co-authored-by: Anthony Ettinger <anthony@profullstack.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
aec3e5f5fa
commit
87bbc50423
23 changed files with 2191 additions and 35 deletions
|
|
@ -50,7 +50,7 @@ async function actor(req) {
|
|||
* "write" allowed unless the key is read-only
|
||||
* "register" allowed even for a read-only key (its own public key)
|
||||
*/
|
||||
function api(handler, { machine = false } = {}) {
|
||||
export function api(handler, { machine = false } = {}) {
|
||||
return async (req, res) => {
|
||||
const found = await actor(req);
|
||||
if (!found) return res.status(401).json({ error: "Not authenticated, or the API key is revoked or expired. Run: logicsrc login" });
|
||||
|
|
@ -73,7 +73,7 @@ function api(handler, { machine = false } = {}) {
|
|||
};
|
||||
}
|
||||
|
||||
async function requireMember(res, slug, userId, key = null) {
|
||||
export async function requireMember(res, slug, userId, key = null) {
|
||||
const team = await get(`SELECT * FROM credshare_teams WHERE slug = ?`, [slug]);
|
||||
if (!team) { res.status(404).json({ error: `Unknown team: ${slug}` }); return null; }
|
||||
if (isMachine(key) && key.team_id !== team.id) { res.status(403).json({ error: "This API key is scoped to another team." }); return null; }
|
||||
|
|
@ -96,7 +96,7 @@ function auditStatement(ev) {
|
|||
};
|
||||
}
|
||||
|
||||
async function audit(ev) {
|
||||
export async function audit(ev) {
|
||||
const st = auditStatement(ev);
|
||||
await run(st.sql, st.args);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue