Skip to content

EPIC AI OS v4 — P-A Director foundation - #6

Draft
EpicStarAi wants to merge 50 commits into
mainfrom
feature/epic-ai-os-v4-pa
Draft

EPIC AI OS v4 — P-A Director foundation#6
EpicStarAi wants to merge 50 commits into
mainfrom
feature/epic-ai-os-v4-pa

Conversation

@EpicStarAi

@EpicStarAi EpicStarAi commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Scope

Implements the safe P-A vertical slice for EPIC AI OS v4 on an isolated branch.

Implemented

  • canonical P-A specification and execution state machine;
  • typed tool registry (telegram.list_chats, guarded telegram.publish_post definition);
  • approval/autonomy policy;
  • immutable execution request + SHA-256 approval snapshot;
  • server-side runtime store keyed by execution ID;
  • risk gate and audit buffer;
  • Director planning endpoint;
  • approval and execute endpoints;
  • real read-only TDLib telegram.list_chats executor;
  • Claude-like /operator-v4 UI with inline Allow/Deny;
  • guarded OpenRouter Director adapter (disabled without OPENROUTER_API_KEY);
  • publishing and production writes remain disabled.

Safety

  • No arbitrary Bash or unregistered tool execution.
  • Browser cannot replace frozen execution arguments.
  • Risk policy is rechecked immediately before execution.
  • Only telegram.list_chats is executable in P-A.
  • No merge or deploy until validation passes.

Validation blocker

GitHub Actions jobs are being created but expose no steps/logs and produce no artifacts; connector log download returns BlobNotFound. This looks like a runner/account Actions startup problem rather than a reported compile error. PR remains draft.

Required before merge

  • working GitHub runner or local/VPS build;
  • npm ci;
  • npm run lint;
  • npm run build;
  • smoke tests for /operator-v4, /api/operator/v4/manifest, plan/approval/execute;
  • verify existing /operator-office and Telegram routes remain unchanged.

@EpicStarAi EpicStarAi left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P-A progress update:

  • fixed the manifest import path;
  • added immutable execution-request hashing and approval snapshot validation;
  • added Director planning scaffold for the read-only telegram.list_chats vertical slice;
  • added POST /api/operator/v4/plan;
  • execution and production writes remain disabled.

CI is currently failing, but GitHub's downloadable job log is returning BlobNotFound, so the exact failing command is not yet visible through the connector. Do not merge until CI is green and the manifest/plan endpoints pass smoke tests.

@EpicStarAi EpicStarAi left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deployment preparation added: scripts/deploy-operator-v4-candidate.sh performs an isolated checkout, npm ci, lint, build, PM2 candidate start on port 3016, and smoke tests for /operator-v4, manifest, and plan endpoint. It intentionally leaves production unchanged.

Current hard blocker: GitHub Actions jobs start with zero visible steps/logs/artifacts and the connector returns BlobNotFound; there is no usable runner output. Actual VPS deployment also requires SSH access to 194.163.140.26, which is not available through the current GitHub connection. Do not merge/promote until the candidate script succeeds on the VPS.

Copy link
Copy Markdown
Owner Author

Added the first real user-facing Telegram login flow on the candidate branch.

Implemented:

  • simplified /login with only two choices: phone number or QR;
  • country code selector (UA/PL/DE/CZ/RO/US/GB/GE/TR/KZ);
  • real TDLib phone, code, 2FA and QR endpoints;
  • live polling of /api/telegram/status;
  • automatic ready state and transition to /client;
  • existing authorized session is preserved; no reset or production change yet;
  • Safe Mode notice remains visible.

Commits:

  • c82324eSimpleTelegramLogin.tsx
  • dd13ac4 — wire /login to the new flow

Next validation: deploy a fresh candidate from feature/epic-ai-os-v4-pa, verify /login, then back up/reset only the candidate TDLib session before testing a clean phone/QR login.

Copy link
Copy Markdown
Owner Author

P0 hotfix applied — browser session isolation gate

Commits added to this candidate branch:

  • 6c5ea61 — bind explicitly active Telegram account to the current browser session after successful login
  • a90fd67 — add /client gate that rejects missing/mismatched browser bindings
  • adc2c29 — mount binder on /login
  • 4f3916b — wrap /client with the gate

Immediate effect

A fresh browser/device opening /client no longer mounts EpicGramShell automatically. It is redirected into the explicit Telegram connection flow unless that same browser session completed login and its bound account still matches the backend active account.

Important boundary

This is an emergency UI/session isolation barrier, not the final multi-tenant security model. Backend /telegram/* remains globally scoped and must be changed to resolve user/workspace -> telegram_account -> tdlib_session server-side before public multi-user release.

Today P0 execution order

  1. Build + candidate smoke test.
  2. Verify fresh-device /client shows no NOVIKOVA data.
  3. Authorize one new test account through /login.
  4. Confirm /client opens only in that browser session.
  5. Wire one operator vertical slice: list chats -> draft 3 posts -> approval -> send one -> persist two scheduled jobs.
  6. Keep Telegram writes manual-approval-only until queue/audit verification passes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant