← back to AbramsEgo
Mount point-and-click Unblock widget on AbramsEgo, forwarding to CNCP (TK-00088 slice 3)
e81fa880f3c85fbd65a6af2d0c4c589f498a6057 · 2026-07-27 14:25:48 -0700 · Steve
AbramsEgo is a thin click surface (DTD verdict A): serves the single shared
unblock.js from CNCP's public dir (no drift), proxies /api/yolo/status for the
health dot, and forwards POST /api/dispatch server-to-server to CNCP's localOnly
backend so the browser widget never POSTs cross-origin. Verified: widget mounted,
dispatch relayed to CNCP and wrote a memo, degrades cleanly when the runner is down.
Files touched
M public/index.htmlM server.js
Diff
commit e81fa880f3c85fbd65a6af2d0c4c589f498a6057
Author: Steve <steve@designerwallcoverings.com>
Date: Mon Jul 27 14:25:48 2026 -0700
Mount point-and-click Unblock widget on AbramsEgo, forwarding to CNCP (TK-00088 slice 3)
AbramsEgo is a thin click surface (DTD verdict A): serves the single shared
unblock.js from CNCP's public dir (no drift), proxies /api/yolo/status for the
health dot, and forwards POST /api/dispatch server-to-server to CNCP's localOnly
backend so the browser widget never POSTs cross-origin. Verified: widget mounted,
dispatch relayed to CNCP and wrote a memo, degrades cleanly when the runner is down.
---
public/index.html | 2 ++
server.js | 26 ++++++++++++++++++++++++++
2 files changed, 28 insertions(+)
diff --git a/public/index.html b/public/index.html
index 256f080..9a281f9 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1055,5 +1055,7 @@ async function loadWpb(){
async function tick(){ if(document.hidden) return; await load(); loadWpb(); if(!_booted){ _booted=true; playEntrance(); } }
tick(); setInterval(tick, 15000);
</script>
+<script>window.UNBLOCK_CONFIG={surface:'abramsego',endpoint:'/api/dispatch',statusEndpoint:'/api/yolo/status'};</script>
+<script src="/unblock.js" defer></script>
</body>
</html>
diff --git a/server.js b/server.js
index 8e37320..9d85d46 100644
--- a/server.js
+++ b/server.js
@@ -1042,6 +1042,32 @@ for (const key of ['system', 'localFleet', 'kamatera', 'canaries', 'crons', 'act
// above). This is the ONLY money-touching write — it just logs income that
// actually landed; it does NOT charge anyone. Turning an engine's *mechanism*
// on (Stripe, ads, affiliate) stays gated to Steve.
+
+// ── Point-and-click Unblock widget (TK-00088 slice 3) ────────────────────────
+// AbramsEgo is a thin click SURFACE; CNCP stays the single execution backend
+// (DTD verdict A). Serve the ONE shared widget file straight from CNCP's public
+// dir (no drift), proxy the runner-health check, and FORWARD dispatches
+// server-to-server to CNCP's localOnly /api/dispatch — the browser widget can't
+// POST cross-origin to :3333, so AbramsEgo relays it (both are local on Mac2).
+app.get('/unblock.js', (req, res) => {
+ res.set('Cache-Control', 'no-cache');
+ res.type('application/javascript');
+ res.sendFile(path.join(os.homedir(), 'cncp-starter', 'public', 'unblock.js'));
+});
+app.get('/api/yolo/status', async (req, res) => {
+ try { const r = await fetch(CNCP + '/api/yolo/status'); res.json(await r.json()); }
+ catch (e) { res.json({ error: e.message }); }
+});
+app.post('/api/dispatch', async (req, res) => {
+ try {
+ const body = Object.assign({}, req.body, { surface: (req.body && req.body.surface) || 'abramsego' });
+ const r = await fetch(CNCP + '/api/dispatch', {
+ method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body)
+ });
+ res.status(r.status).json(await r.json().catch(() => ({ error: 'bad response from CNCP' })));
+ } catch (e) { res.status(502).json({ error: 'CNCP unreachable: ' + e.message }); }
+});
+
const REVENUE_ENGINES = ['sell_product', 'affiliate', 'billable_work', 'ads', 'licensing'];
app.post('/api/revenue/record', async (req, res) => {
const b = req.body || {};
← 7e1b8bc auto-save: 2026-07-27T14:21:14 (1 files) — data/local-fleet.
·
back to AbramsEgo
·
auto-save: 2026-07-27T14:51:27 (1 files) — data/local-fleet. 345d81e →