Skip to content

feat(apps): integrate governed app platform and native experiences - #345

Draft
Maneek21 wants to merge 162 commits into
masterfrom
codex/apps-demo-platform
Draft

Maneek21 wants to merge 162 commits into
masterfrom
codex/apps-demo-platform

Conversation

@Maneek21

@Maneek21 Maneek21 commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Installed apps can now participate in the workspace through governed Runtime actions, private resource sync, host-rendered Experiences, attachments, native context and shared Defty/MCP discovery. This PR consolidates the outstanding app-platform integration work; it is the foundation for the separate Author Kit release-preparation and Email WIP example PRs.

The latest changes separate persistent, revocable consent from short technical sessions, retain encrypted private drafts with revision checks, bind human actions to exact host-controlled inputs, and keep agent policy separate. Generic action batches collect up to ten calls to one declared action under one exact review; execution rechecks consent, policy revision, token authority and cancellation. Explicit read observation recovery retains the old unknown outcome and checkpoint. Email-specific provider behavior is excluded from core.

The shared Experience renderer now follows Deft's pill controls, surface tokens and selected states, with a flat list/reader layout and responsive host composer. Schema changes use the supported upgrade manifest through preview.56; existing applied migration bytes are preserved. Back up data and keyrings and use pnpm db:upgrade; rollback requires the matching backup and code, not down-migrating authority history. New capabilities retain their feature gates.

Validation: production web build, lint/typecheck, 115 relevant web tests, API typecheck, migration-contract tests and portable authorization fixtures. The new self-contained security DB suites now use in-repository fixtures and the standard disposable CI database rather than external author directories. Actual local MCP campaign evidence covers exact two-item approval, receipts, revocation and duplicate prevention; mail effects used an isolated synthetic TLS IMAP/SMTP fixture. Desktop and 390px mobile were inspected after the styling change. Full repository CI remains a merge/release gate.

Known limits: historical unknown private sync outcomes still block App upgrades; the explicit recovery path does not rewrite that history. OAuth-positive batch execution and concurrent credential-revocation races have not received independent live acceptance. No real-provider deliverability, full new conversational Defty campaign, or production-readiness claim is made. Retained restore-only tests require their dedicated populated restore fixture and are separate from ordinary CI coverage.

This is a draft for integration review, not a release or publication. The large foundation diff preserves the accumulated implementation rather than pretending the work is only today's UI change. No unrelated main-worktree edits, preview credentials, mailbox files, local evidence or generated package artifacts are included.

Initial CI found an obsolete Kit error-message expectation; that assertion now matches the declared-action contract and its focused tests pass. CodeQL review remains open. The fixture session nonce now uses crypto.randomUUID(). The OAuth hash alert concerns server-minted 256-bit random bearer credentials (randomBytes(32)), not human passwords. The four wildcard postMessage alerts concern opaque allow-scripts iframe sandboxes: the production bridge targets a fixed trusted bootstrap, validates exact window/origin provenance, transfers one governed port once, and runs author code only in a Worker. Replacing * with the host origin would break opaque-origin delivery; adding allow-same-origin would weaken isolation. No alerts were dismissed or suppressed. These invariants require independent review before the security gate can be considered resolved.

Final follow-ups: the image build exposed a shared-source ./resources.js import that Turbopack could not resolve; it now follows the package's extensionless TypeScript source pattern. Five focused resource tests and the local production build pass with that correction. Composer footer pill buttons now measure 44px tall on desktop. Earlier mobile list/reader/Activity checks passed, but the final mobile composer check remains unverified after viewport/capture failures and unresponsive folder selection in the in-app test browser. Do not treat that last interaction as passed. Fresh remote CI on the final head remains required.

Comment thread scripts/gate-g/experiences/rich-host.html Fixed
stopped = true; latestView = null; setSuspended(false); setSource(null); setRunReview(null);
connection.dispose(); lease?.dispose(); ensureAuthority.current = null; setConnectionUnavailable(false);
clearNavigation(navigationOwner);
frame.contentWindow?.postMessage({ kind: 'stop', session_id: session.pin.session_id }, '*');
const startWorker = () => {
if (!bootstrapReady || !locallyCurrent() || started || !frame.contentWindow) return;
started = true;
frame.contentWindow.postMessage({ kind: 'start', session_id: session.pin.session_id, worker_source: session.bundle.worker_source }, '*', [port.port2]);
connection.dispose(); lease?.dispose(); ensureAuthority.current = null;
if (leaseCurrent.current === lease) leaseCurrent.current = null;
clearNavigation(navigationOwner);
frame.contentWindow?.postMessage({ kind: 'stop', session_id: session.pin.session_id }, '*');
window.__experienceEvidence.sessions.push(sessionId);
iframe.onload = () => {
iframe.onload = null;
iframe.contentWindow.postMessage({ kind:'start', session_id:sessionId, version }, '*', [channel.port2]);
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.

2 participants