Commit Graph

808 Commits

Author SHA1 Message Date
ejclaw
54ea9afae6 fix paired owner progress identity 2026-04-30 00:45:04 +09:00
ejclaw
c44b8c5160 fix message loop human interjection handling 2026-04-29 22:45:09 +09:00
ejclaw
6c6b67daca detect owner codex bad request loops 2026-04-29 22:20:06 +09:00
ejclaw
b653fe5375 fix dashboard progress turn activity 2026-04-29 20:04:47 +09:00
ejclaw
a536829673 fix: escalate paired step-done loops 2026-04-29 17:49:10 +09:00
ejclaw
f286b9f99e refactor: split ipc task processor handlers 2026-04-29 13:42:36 +09:00
ejclaw
4dcd4037f1 chore: clear low-risk lint warnings 2026-04-29 13:31:11 +09:00
ejclaw
8b458e9b0e test: remove duplicate handoff helper coverage 2026-04-29 13:02:51 +09:00
ejclaw
b56e91c232 test: rename paired completion signal tests 2026-04-29 12:51:34 +09:00
ejclaw
3d35feb6f3 Remove queued paired follow-up wrapper 2026-04-29 12:07:43 +09:00
ejclaw
118c255ad2 Extract message runtime handoff adapter 2026-04-29 11:54:38 +09:00
ejclaw
6502eb6586 Extract message runtime final delivery 2026-04-29 11:42:40 +09:00
ejclaw
2098db72d2 Extract message runtime after-delivery follow-up 2026-04-29 11:27:32 +09:00
ejclaw
dab8f97e5e Extract message runtime preflight helpers 2026-04-29 11:15:18 +09:00
ejclaw
e4d30f527d Extract message runtime role channel resolution 2026-04-29 11:03:16 +09:00
ejclaw
ac93c96c8f Remove paired execution shared shim 2026-04-29 10:52:37 +09:00
ejclaw
b774dcaae5 Extract paired task status helpers 2026-04-29 10:44:28 +09:00
ejclaw
34b0ee8f4c Extract paired arbiter request helper 2026-04-29 10:32:36 +09:00
ejclaw
247a710ae7 Extract paired source ref helpers 2026-04-29 10:22:33 +09:00
ejclaw
274e234365 Extract paired verdict signal helpers 2026-04-29 10:05:26 +09:00
ejclaw
d7649f006f fix: require discord evidence for legacy dashboard outbound 2026-04-29 01:52:13 +09:00
ejclaw
6b2ef42374 fix: use work items as dashboard outbound SSOT 2026-04-29 01:23:29 +09:00
ejclaw
4daa1382f0 Route outbound messages through canonical delivery 2026-04-29 00:07:06 +09:00
ejclaw
d2a27ecf34 Unify IPC outbound delivery through work items 2026-04-28 23:36:34 +09:00
ejclaw
85e04e8a67 Use canonical turn progress for dashboard rooms 2026-04-28 22:53:00 +09:00
ejclaw
b83de973f8 Align dashboard room progress with Discord messages 2026-04-28 22:33:12 +09:00
ejclaw
1417c37042 Extract message runtime handoff helpers 2026-04-28 22:13:24 +09:00
ejclaw
929dc2ac5a Extract config path loading 2026-04-28 21:58:02 +09:00
ejclaw
55edab6475 Extract Discord inbound message handler 2026-04-28 21:40:08 +09:00
ejclaw
750f7d99d2 Cover dashboard route state helpers 2026-04-28 20:18:57 +09:00
ejclaw
4ea9f0749b Trim dashboard server integration tests 2026-04-28 20:06:40 +09:00
ejclaw
38ba5b87fa Show full dashboard room content 2026-04-28 19:53:00 +09:00
ejclaw
23056f7cc7 Extract dashboard inbox action route 2026-04-28 19:34:43 +09:00
ejclaw
ee8be2f127 Extract dashboard room message route 2026-04-28 19:20:39 +09:00
ejclaw
0d8682b2da Extract dashboard overview route 2026-04-28 19:08:58 +09:00
ejclaw
29d1587afb Extract dashboard task routes 2026-04-28 18:56:26 +09:00
ejclaw
46e6ab7a51 Extract dashboard room timeline routes 2026-04-28 18:39:46 +09:00
ejclaw
77fe00e4b8 Extract dashboard service routes 2026-04-28 18:19:42 +09:00
ejclaw
cbb8e6bc85 Extract dashboard settings routes 2026-04-28 18:00:35 +09:00
ejclaw
7f4c518c23 Extract dashboard simple route table 2026-04-28 17:43:20 +09:00
ejclaw
df8ee09bb4 Fix structured attachment rendering 2026-04-28 17:24:38 +09:00
ejclaw
76313b9ebd Remove duplicate work item attachment migration from owner branch 2026-04-28 11:17:22 +09:00
ejclaw
166833a255 Merge remote-tracking branch 'origin/main' into codex/owner/ejclaw 2026-04-28 01:35:44 +09:00
Eyejoker
8bb77ffaa3 Fix structured IPC envelope leakage
Normalize EJClaw structured send_message envelopes, preserve attachments, unwrap stored room payloads, and add regression tests.
2026-04-28 01:35:26 +09:00
Eyejoker
20e1a1e5e1 Fix mobile rooms and live progress parity
Improve mobile room UX, separate live progress from recent chat, and lock the parity behavior with service tests.
2026-04-28 01:27:55 +09:00
ejclaw
79b9e74386 Merge remote-tracking branch 'origin/main' into codex/owner/ejclaw 2026-04-28 00:53:46 +09:00
Eyejoker
e2dd12a235 Codex switch: translate settings-index ↔ rotation-index by auth path (#51)
settings-store lists codex accounts as
  index 0 = ~/.codex/auth.json (default)
  index N = ~/.codex-accounts/{N}/auth.json
but codex-token-rotation only loads ~/.codex-accounts/{N} when those
dirs exist (it ignores ~/.codex/auth.json in that mode), so the
rotation array's indices are off-by-one vs settings indices.

Old buggy behavior:
- "사용중" badge pointed at the wrong account.
- Clicking 전환 on UI #N called setCurrentCodexAccountIndex(N) which
  selected rotation array element N — typically a different
  ~/.codex-accounts/{N+1} entry. Effectively the UI told us a
  different account was now active than what the next codex spawn
  actually used.

Fix
- New findCodexAccountIndexByAuthPath(path) on the rotation module
  exposes a path-based lookup.
- New getActiveCodexSettingsIndex() / setActiveCodexSettingsIndex(idx)
  in settings-store translate via codexAuthPath() ↔
  findCodexAccountIndexByAuthPath().
- /api/settings/accounts.codexCurrentIndex and PUT
  /api/settings/accounts/codex/current both go through the
  settings-side translation, so UI indices are now authoritative.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:47:40 +09:00
Eyejoker
4ed12332d4 Codex refresh: pull live plan_type from /wham/usage (#50)
* Settings: clarify Codex 만료=결제, drop Claude expiry badge

- Codex expiry badge now says "결제 만료/까지" so it's unambiguous that
  this is the ChatGPT Pro/Team subscription end-date, not an OAuth
  access-token TTL.
- Claude rows no longer show an expiry badge: Claude credentials only
  expose an OAuth access_token TTL (auto-refreshed every few minutes
  by the existing claude token refresh loop), which is meaningless to
  the user. Replace it with a static "토큰 자동갱신" tag so the column
  alignment stays consistent.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* Codex refresh: pull live plan_type from /wham/usage (sidecar override)

OAuth refresh_token grant returns a fresh JWT but auth0 caches the
chatgpt_plan_type and chatgpt_subscription_active_until claims at issue
time. So users who upgrade/downgrade their plan kept seeing the old
plan in the dashboard even after a forced refresh.

After each refreshCodexAccount() call, additionally GET
https://chatgpt.com/backend-api/wham/usage with the freshly-issued
access_token. That endpoint returns the current plan_type and email
from OpenAI's account service. Persist it to a sidecar
plan-status.json next to auth.json (not into auth.json itself, since
codex CLI may rewrite that file). readCodexAccount prefers the live
plan_type and uses the sidecar's checked_at as subscriptionLastChecked,
so the dashboard immediately reflects post-billing-event plan changes.

Confirmed end-to-end: account that was billed-down from Pro to Plus
now shows plus instead of stale pro after one refresh.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:33:22 +09:00
Eyejoker
c2a6889567 Codex accounts: 6h auto-refresh, manual refresh, manual switch (#48)
Auto refresh
- New refreshCodexAccount(index) calls https://auth.openai.com/oauth/token
  with grant_type=refresh_token and persists rotated tokens back to
  ~/.codex-accounts/{N}/auth.json. JWT's subscription_active_until
  reflects the latest plan state OpenAI hands back.
- startCodexAccountRefreshLoop() runs every 6h (first run delayed 60s
  after boot to keep startup snappy). Hooked into main()/shutdown()
  alongside the existing claude token refresh loop.

Manual controls (Settings → 계정 → Codex)
- "갱신" button per row: forces an immediate refresh for that account.
- "전체 갱신" button: refreshes all codex accounts in sequence.
- "전환" button: writes data/codex-rotation-state.json so the next codex
  spawn picks the chosen account. Active account marked with a green-
  bordered card and "사용중" badge.

Endpoints
- POST /api/settings/accounts/codex/{i}/refresh
- POST /api/settings/accounts/codex/refresh-all
- PUT  /api/settings/accounts/codex/current  { index }
- GET  /api/settings/accounts now also returns codexCurrentIndex.

Why
JWTs cache subscription state at issue-time. When a Pro plan lapses or
a user upgrades/downgrades, the dashboard kept showing stale data until
the user logged in again. Periodic refresh + explicit "갱신" button
keeps the displayed state honest, and the manual switch unblocks the
user when rotation lands on a known-bad account.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:23:06 +09:00
Eyejoker
7047caa608 Settings: add Fast Mode toggle for codex/claude + tidy account row alignment (#46)
Fast mode controls
- Codex: writes [features].fast_mode = true|false in ~/.codex/config.toml.
  This matches the in-TUI /fast toggle ("toggle Fast mode to enable
  fastest inference with increased plan usage").
- Claude: writes fastMode: bool to ~/.claude/settings.json. Mirrors the
  /fast slash command preference (effective on opus-4-6).

UX polish
- Account rows switch from flex-wrap to a fixed grid (tag · email · plan ·
  expiry · action) so emails of varying lengths don't cause ragged
  baselines between rows.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:06:56 +09:00