Network Weekend (Marty 2026-11-17): Boost views from the live VABShop SKU on every page, quote and chatbot, the network ribbon
chainskus.js reads skus(1) every 60 s and keeps C.boost in step (BOOST_VIEWS stays the normal 500 as normalViews), so a $5 Boost shows 750 once the owner signs setSku and 500 before or after; crediting already follows the Purchase event's views. common.js rewrites the pages' static '500 guaranteed views' copy to the live number only when the chain differs. weekend.js: the Fri 11-27 00:00 CT to Tue 12-01 00:00 CT gate (WEEKEND_NOW test clock) for the dated chatbot fact; the ribbon line (netdeals.setLocal) only exists while the chain really holds the weekend Boost. chatcore render hook, live intro. qa/weekend.test.mjs 18 pass, chatbot 206, smoke 197. common.js?v=9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,9 @@ const hubevents = require('./hubevents'); // network hub hook (2026-11-16): sign
|
||||
const hubline = require('./hubline');
|
||||
const proof = require('./proof');
|
||||
const netsites = require('./netsites');
|
||||
const netdeals = require('./netdeals'); // Network Weekend ribbon feed from the hub (2026-11-17)
|
||||
const weekend = require('./weekend'); // Network Weekend: what the ribbon and chatbot say, from live chain values
|
||||
const chainskus = require('./chainskus'); // live VABShop Boost views/price for every page, quote and the chatbot (2026-11-17)
|
||||
const vabnas = require('./vabnas');
|
||||
const lstrack = require('./lstrack');
|
||||
const chatbot = require('./chatbot'); // the site assistant (2026-11-15): chatcore.js + kb.js + the network knowledge base (netkb.js)
|
||||
@@ -307,6 +310,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (p === '/api/ledger' && req.method === 'GET') return json(res, 200, proof.ledger(u.searchParams.get('n')), { 'Cache-Control': 'public, max-age=10' });
|
||||
if (p === '/api/contract' && req.method === 'GET') { if (limited(req, 'contract', 600, 3600000)) return json(res, 429, { error: 'Too many requests' }); return json(res, 200, await proof.contract(), { 'Cache-Control': 'public, max-age=60' }); }
|
||||
if (p === '/api/network-sites' && req.method === 'GET') return netsites.handle(req, res);
|
||||
if (p === '/api/network-deals' && req.method === 'GET') return netdeals.handle(req, res, 'viraladblitz');
|
||||
// toasts: real events of the last 30 minutes (new ads, Boosts with the levels they paid)
|
||||
if (p === '/api/recent' && req.method === 'GET') {
|
||||
const cut = Date.now() - 30 * 60000;
|
||||
@@ -500,6 +504,8 @@ const server = http.createServer(async (req, res) => {
|
||||
shop.setAttach(rec => { wire.attach(rec); store.bump('boosts', Number(rec.qty) || 1); });
|
||||
shop.setHook(proof.onPurchase);
|
||||
shop.init(C);
|
||||
chainskus.syncBoost(C); chainskus.init(C, [C.boost.sku], () => chainskus.syncBoost(C)); // C.boost follows the chain (2026-11-17)
|
||||
netdeals.setLocal(d => weekend.dealLine(C, d));
|
||||
vabnas.init({ boosts: () => wire.purchases(), remaining: b => wire.remaining(b), ad: id => store.ad(id) });
|
||||
setInterval(() => { if (store.prune()) wire.rebuild(); }, 3600000).unref();
|
||||
chatbot.init(); // after docstore.init: kb.json is a MySQL document
|
||||
|
||||
Reference in New Issue
Block a user