Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Quality

on:
pull_request:
push:
branches: [main]

permissions:
contents: read

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 22
cache: npm
- run: npm ci --ignore-scripts
- run: npm run format:check
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Repository Guide

- Follow the [organization file-size rule](https://github.com/cordisx/cordisxmono/blob/main/.agents/rules/file-size.md) for formatting and responsibility-based splitting guidance.
- Use the [repository README](README.md) to select the CordisX plugin or Reset
petition site before changing files or running commands.
- `plugin/` owns the plugin and its [usage and development documentation](plugin/README.md).
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<p align="center">
<img alt="OpenAI Imperium Ouroboros coin" src="./public/favicon.png" width="160">
<img
alt="OpenAI Imperium Ouroboros coin"
src="./public/favicon.png"
width="160"
>
</p>

<p align="center">
Expand All @@ -25,10 +29,10 @@
OpenAI Imperium contains a CordisX reasoning-intensity presentation plugin and
a Reset petition site. Each component has its own runtime and maintenance entry:

| Component | Usage and maintenance |
| --- | --- |
| CordisX plugin (`plugin/`) | [Plugin README](plugin/README.md): configuration, Host compatibility, and development commands |
| Reset petition site (repository root) | [Site README](app/README.md): experience, local development, and persistent ledger |
| Component | Usage and maintenance |
| ------------------------------------- | ---------------------------------------------------------------------------------------------- |
| CordisX plugin (`plugin/`) | [Plugin README](plugin/README.md): configuration, Host compatibility, and development commands |
| Reset petition site (repository root) | [Site README](app/README.md): experience, local development, and persistent ledger |

![OpenAI Imperium — Veni. Vidi. Reset.](./public/og.png)

Expand Down
8 changes: 4 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
OpenAI Imperium 在同一仓库中提供 CordisX 思考强度视觉插件与 Reset 请愿站。
两个组件分别维护运行入口:

| 组件 | 使用与维护说明 |
| --- | --- |
| CordisX 插件(`plugin/`) | [插件 README](plugin/README.md#中文):配置、Host 兼容条件与开发命令 |
| Reset 请愿站(仓库根目录) | [请愿站 README](app/README.zh-CN.md):体验介绍、本地运行与持久账本 |
| 组件 | 使用与维护说明 |
| -------------------------- | ------------------------------------------------------------------- |
| CordisX 插件(`plugin/`) | [插件 README](plugin/README.md#中文):配置、Host 兼容条件与开发命令 |
| Reset 请愿站(仓库根目录) | [请愿站 README](app/README.zh-CN.md):体验介绍、本地运行与持久账本 |

![OpenAI Imperium——我来,我见,我 Reset。](./public/og.png)

Expand Down
10 changes: 5 additions & 5 deletions app/api/admin/reset/route.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { grantReset, isAuthorizedReset } from "@/db/ledger";
import { grantReset, isAuthorizedReset } from '@/db/ledger';

export const dynamic = "force-dynamic";
export const dynamic = 'force-dynamic';

export async function POST(request: Request) {
if (!isAuthorizedReset(request)) {
return Response.json({ error: "Imperial authority required." }, { status: 403 });
return Response.json({ error: 'Imperial authority required.' }, { status: 403 });
}
try {
return Response.json(await grantReset(), { headers: { "Cache-Control": "no-store" } });
return Response.json(await grantReset(), { headers: { 'Cache-Control': 'no-store' } });
} catch {
return Response.json({ error: "The reset could not be granted." }, { status: 503 });
return Response.json({ error: 'The reset could not be granted.' }, { status: 503 });
}
}
12 changes: 6 additions & 6 deletions app/api/ledger/route.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { readLedger } from "@/db/ledger";
import { proxyDevelopmentLedger } from "@/db/ledger-proxy";
import { readLedger } from '@/db/ledger';
import { proxyDevelopmentLedger } from '@/db/ledger-proxy';

export const dynamic = "force-dynamic";
export const dynamic = 'force-dynamic';

export async function GET() {
try {
const proxied = await proxyDevelopmentLedger("/api/ledger");
const proxied = await proxyDevelopmentLedger('/api/ledger');
if (proxied) return proxied;
return Response.json(await readLedger(), { headers: { "Cache-Control": "no-store" } });
return Response.json(await readLedger(), { headers: { 'Cache-Control': 'no-store' } });
} catch {
return Response.json({ error: "The petition ledger is temporarily unavailable." }, { status: 503 });
return Response.json({ error: 'The petition ledger is temporarily unavailable.' }, { status: 503 });
}
}
12 changes: 6 additions & 6 deletions app/api/petition/route.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { recordPetition } from "@/db/ledger";
import { proxyDevelopmentLedger } from "@/db/ledger-proxy";
import { recordPetition } from '@/db/ledger';
import { proxyDevelopmentLedger } from '@/db/ledger-proxy';

export const dynamic = "force-dynamic";
export const dynamic = 'force-dynamic';

export async function POST() {
try {
const proxied = await proxyDevelopmentLedger("/api/petition", { method: "POST" });
const proxied = await proxyDevelopmentLedger('/api/petition', { method: 'POST' });
if (proxied) return proxied;
return Response.json(await recordPetition(), { headers: { "Cache-Control": "no-store" } });
return Response.json(await recordPetition(), { headers: { 'Cache-Control': 'no-store' } });
} catch {
return Response.json({ error: "The petition could not be recorded." }, { status: 503 });
return Response.json({ error: 'The petition could not be recorded.' }, { status: 503 });
}
}
34 changes: 19 additions & 15 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
import type { Metadata } from "next";
import "./globals.css";
import type { Metadata } from 'next';
import './globals.css';

export const metadata: Metadata = {
title: "OpenAI Imperium",
description: "Petition for a Codex reset and witness Tibo ascend from promptly bankrupt to Codex Maximus.",
title: 'OpenAI Imperium',
description: 'Petition for a Codex reset and witness Tibo ascend from promptly bankrupt to Codex Maximus.',
icons: {
icon: [{ url: "/favicon.png", type: "image/png", sizes: "512x512" }],
apple: [{ url: "/apple-touch-icon.png", type: "image/png", sizes: "180x180" }],
icon: [{ url: '/favicon.png', type: 'image/png', sizes: '512x512' }],
apple: [{ url: '/apple-touch-icon.png', type: 'image/png', sizes: '180x180' }],
},
openGraph: {
title: "OpenAI Imperium",
description: "Veni. Vidi. Reset. Join the live Codex reset petition.",
images: [{ url: "/og.png", width: 1731, height: 909, alt: "OpenAI Imperium — Veni. Vidi. Reset." }],
title: 'OpenAI Imperium',
description: 'Veni. Vidi. Reset. Join the live Codex reset petition.',
images: [{ url: '/og.png', width: 1731, height: 909, alt: 'OpenAI Imperium — Veni. Vidi. Reset.' }],
},
twitter: {
card: "summary_large_image",
title: "OpenAI Imperium",
description: "Veni. Vidi. Reset. Join the live Codex reset petition.",
images: ["/og.png"],
card: 'summary_large_image',
title: 'OpenAI Imperium',
description: 'Veni. Vidi. Reset. Join the live Codex reset petition.',
images: ['/og.png'],
},
};

export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
return <html lang="en"><body>{children}</body></html>;
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode; }>) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
Loading