Commit graph

424 commits

Author SHA1 Message Date
Frederic Jung
8d709d7fb9
Merge pull request #283 from thesysadmindev/call-the-bank
Call the bank: ask for a loan from the Bank window
2026-11-04 13:34:30 +00:00
Frederic Jung
97e7cb17bd
Merge pull request #279 from thesysadmindev/noc-window
A NOC screen in its own window, for a second display
2026-11-04 13:31:24 +00:00
Charlie Allom
82f3833d8f
Founding your own IX says why it can't
foundIx returned without a word in mainland China, where an exchange
already runs (incumbent or your own), and without a POP, while its dry
run quoted $80k with nothing blocked. foundIxWhy() gives the reason, most
lasting first (China reuses the panel's own text), for the toast and the
quote alike.

The route fuzz's direct moves called foundIx at every POP city. They now
offer it only where the city panel shows the button, as their comment
says, so a refusal that now logs a toast does not count as diverging
from main.
2026-11-04 23:07:57 +10:00
Charlie Allom
034a5de66e
Merge remote-tracking branch 'origin/main' into df-pop-checks
# Conflicts:
#	src/game/90-actions/60-links.js
#	src/game/90-actions/87-fiber-and-hardware.js
#	src/game/90-actions/90-action-helpers.js
2026-11-04 22:49:53 +10:00
Frederic Jung
08bf22cfec
Fiber over land inside one country; no circuits between the Koreas
Towns with no road in (Russia's Arctic and Kamchatka, Juneau and Alaska's
Arctic coast, Greenland's towns) keep their own landmass, which now says
which land it is really part of. isSub() lets two cities of one country on
that land build over land; other countries still need the sea. Inside one
country, Europe to Asia (Moscow-Vladivostok, Istanbul-Ankara) is no longer
a crossing between continents.

North and South Korea join Kyiv-Moscow in a table of pairs nobody sells a
circuit between: the link window says so, the actions refuse, and neither
the diversity map nor the latency floor counts a link there.
2026-11-04 12:46:37 +00:00
Charlie Allom
4b554f2ecb
A POP in a retired city says why it can't open
buildPop returned without a word for a city that is off the map (the small
Brazilian towns retired in 3d469d9), so the agent API reported no_effect
with no toast. It now toasts that the city is off the map and names the
nearest open city in its country to build in instead, and its dry run
reports that as blocked. An old save that kept a POP there is unchanged.
2026-11-04 22:46:10 +10:00
Charlie Allom
3fd44908af
A link starts at one of your POPs, for typed orders too
The map only drags a link from a POP, but buildLink, orderDf and orderCable
read both ends from UI.pending, which the agent API fills from its
arguments. An agent could sign a dark fiber IRU from a city with no POP
(Aracaju got three of them). The three orders now refuse that with a toast,
and their dry-run quotes report it as blocked.

Three tests ordered from a city with no POP (ACT.start ignores city, so the
only POP was Frankfurt); they now open the POP they assumed.
2026-11-04 22:45:52 +10:00
Christopher Hawker
ae70e8e750 Call the bank: ask for a loan from the Bank window
With a rating of A or better, five amount buttons in the Bank window make an
immediate offer. The terms follow from the rating alone (bank, APR, conditions
and limit in CALL_TERMS), so calling again gets nothing better and rolls no
dice. The limit is a multiple of monthly revenue less current debt. An offer
goes through the existing card and takeLoan, and a new call replaces an earlier
called offer.

Fixes #251
2026-11-04 23:40:46 +11:00
Christopher Hawker
f9d24699c1 Merge remote-tracking branch 'upstream/main' into noc-window
# Conflicts:
#	CHANGELOG.md
#	src/game/99-loop.js
#	tests/harness.js
2026-11-04 20:01:57 +11:00
Christopher Hawker
80f671953a A NOC screen in its own window, for a second display
A button next to the speed controls opens this page at ?noc=<slot> in a
noopener pop-up, so it runs on its own thread. The window never claims the
slot, saves or runs a day. The game sends it a copy of S and R over a
BroadcastChannel, at most once a second and only while a window is connected,
and runs its clicks through an allowlist of the same ACT.* a click uses.

The window opens on a dark wallboard: a live world map of links and POPs,
traffic and money graphs, alarms, and the hottest ports with the dashboard's
own upgrade buttons (connUp). Clicking a POP filters the ports. Details shows
the full dashboard. Phones do not show the button.
2026-11-04 20:01:37 +11:00
Frederic Jung
47799d7e47
Merge remote-tracking branch 'origin/main' 2026-11-04 08:32:00 +00:00
Frederic Jung
8b0e198c03
Merge pull request #271 from thesysadmindev/intern-port-headroom
The intern can keep PNI and IX ports ahead of their traffic (closes #234)
2026-11-04 07:55:14 +00:00
Frederic Jung
b74fe1bda6
Merge pull request #266 from wnagele
# Conflicts:
#	CHANGELOG.md
2026-11-04 08:44:34 +01:00
Frederic Jung
24d865aa57
Follow-ups to #276, #277 and #278
Saves clamp a runaway DE-Kicks price and its remembered quote to the ceiling, and a clipped rise announces only what the bill shows.
A PNI steps down only to the smallest size its network sells, so Tier 1 and closed-CDN PNIs stop at 100G.
A trace off the metrics says it shows a customer circuit's path, not where the internet traffic goes.
2026-11-04 08:11:03 +01:00
Lambro-codes
35854ee253 feat(peering): step exchange ports, transit ports and PNIs down one size
Shrinking a port meant leaving and rejoining. The exchange, transit and PNI panels now have a button that steps the port down one size (downIx, downT, downP). A PNI cannot step down while an augment is on order. The actions are classified in the MCP command table.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-04 05:36:04 +01:00
Wolfgang Nagele
7438fd1065 Agent mode: an AI agent plays in the player's own tab, with the agent's clock or a running one
The MCP server gains a second session, --browser: the game in the player's tab, reached through the
agent relay npm run dev hosts at /agent (loopback unless --host; Host and Origin checked, no token).
The player turns it on in Settings → Agent API, a section only the development page has, and picks the
clock: a pace of 30 s to 5 min a day that nobody can pause, or the agent's own. Headless gets the
running clock too (--clock realtime --pace MS) and both get a wait tool.

All of it lives in src/agent/ (development page only). The game offers HOOKS, UI.clockLocked,
setSpeed() and runClock(dt), the frame's day block moved out unchanged, and nothing more: the page
players get grows by under 1 KB gzipped and runs exactly as before.
2026-11-03 16:18:43 -05:00
Frederic Jung
b2366ed260
Every capital in Africa, which completes every capital of the world
Brazzaville and Congo Telecom join, Abuja gets Nigeria's wholesale backbone, the Gulf of Guinea and Comoros islands sit on their cables, and the capitals test now checks all 193 UN members.
2026-11-03 22:11:43 +01:00
Frederic Jung
b4cfa2b320
Every capital in South, East and Southeast Asia and the Pacific 2026-11-03 21:17:45 +01:00
Frederic Jung
894307a35c
Every capital in the Middle East, the Caucasus and Central Asia, with Bahrain on the Gulf's cables
The MCP server reads a dropdown as its selected option, so a long network list no longer crowds the traceroute out of a report.
2026-11-03 20:48:15 +01:00
Frederic Jung
296392fb96
Every capital in Europe: Tirana to Ljubljana, Malta and Cyprus on their cables, and Bern
Sixteen capitals and Bern. National telcos with their real ASNs (One Albania,
Andorra Telecom, Beltelecom, BH Telecom, Hrvatski Telekom, Cyta, Cablenet, FL1,
Hoi, Telia Lietuva, Bite, GO, Melita, Moldtelecom, Monaco Telecom, Crnogorski
Telekom, Slovak Telekom, Telekom Slovenije, Telenet San Marino), and the groups
already in the game take the countries they really run (A1, Orange, Vodafone,
Telekom Srbija, Magyar Telekom, TIM). Andorra and Monaco have one operator each
(W2), San Marino buys its transit in Italy (W3).

Malta and Cyprus are islands on PEACE, MedNautilus, Blue and Malta's own lines
to Sicily; Malta's coastline from Natural Earth. Exchanges only where PeeringDB
has one with members. The capitals test covers Europe's 44.
2026-11-03 19:40:23 +01:00
Frederic Jung
c5c0d853ae
Every capital in the Americas: the eastern Caribbean, Central America, the Guianas, Haiti, Sucre
Saint John's, Basseterre, Roseau, Castries, Kingstown and Saint George's land
ECFS and Southern Caribbean Fiber in their real order (the old pairs stay for
saves), with Flow and Digicel on every island. San Salvador, Tegucigalpa and
Managua get Claro and Tigo; Belize, Guyana, Suriname and Haiti their national
telcos (BTL, GTT, Telesur, Natcom, real ASNs). Sucre, Bolivia's constitutional
capital, has no facility, so it is a W3 exception.

Guyana and Suriname land SG-SCS, Deep Blue One and X-Link; Haiti Fibralink to
Jamaica and the Bahamas' BDSNi, and shares Hispaniola with the Dominican
Republic. The six islands' coastlines come from Natural Earth 1:50m, like
Cebu's. Exchanges only where PeeringDB lists one with members.

tests/capitals.test.js checks the Americas' 35 capitals.
2026-11-03 19:11:56 +01:00
Frederic Jung
017eba4ca2
Every US state capital, Washington DC, Canada's capitals and Greenland
44 US cities (every missing state capital and DC) and 12 Canadian ones (every
provincial and territorial capital), sized by metro population, with exchanges
only where PeeringDB lists a real one. Level Tree is in every state capital;
Cogentle, AT&Tease and Drizzle Electric in the bigger ones, and Drizzle on the
Edmonton, Winnipeg, Saskatoon and Quebec City exchanges as Hurricane is.

Greenland: Nuuk, Qaqortoq, Sisimiut and Aasiaat, each its own landmass (no road
or fiber over the ice), on Greenland Connect's real landings (Iceland-Qaqortoq-
Nuuk-Newfoundland) and Connect-the-Dots North up the coast. Too Sassy (Tusass,
AS8818) is the one operator. Iqaluit has only satellites: a beach, no seller.

New regional carriers: Bell Alien (Bell Aliant, AS855), SaskTell-Tale (SaskTel,
AS803), Northwest Passage Tel (Northwestel, AS22573). Victoria and Iqaluit are
documented W3 exceptions, Greenland a W2 one; the real names go on the blocklist.
2026-11-03 17:57:27 +01:00
Christopher Hawker
44c587221a Merge remote-tracking branch 'upstream/main' into intern-port-headroom
# Conflicts:
#	CHANGELOG.md
2026-11-03 22:56:58 +11:00
Christopher Hawker
62c242c9a7 The intern can keep PNI and IX ports ahead of their traffic (closes #234)
A new standing order, Keep peering headroom, works like the transit one: it
keeps each PNI and IX port above a multiple of today's traffic (1.25x to 3x).
A single port at a POP with several routers gets a second port in a LAG; any
other port moves up to the smallest port size that fits, or the biggest the
router takes. If the preferred move cannot be done it tries the other one.

It pays through the same actions as a click (ACT.pni, ACT.lagP, ACT.buyIx,
ACT.lagIx), is off by default, has the Headroom and Budget dials and the
per-POP switch, and keeps to the cash floor. A PNI augment on order is waited
for, router ports an augment will take are not promised twice, and nothing
is bought while a DDoS flood is live, since the flood counts as port usage.

The intern's monthly bill figure (opsMoNow) now counts IX ports too.
2026-11-03 22:54:54 +11:00
Frederic Jung
9cf90d0ad0
Merge branch 'pr270' 2026-11-03 11:50:47 +01:00
Charlie Allom
c5c5aac970
Merge remote-tracking branch 'origin/main' into keyboard-shortcuts 2026-11-03 10:48:01 +00:00
Charlie Allom
3192f42b5a
$ steps through the open offers, soonest to expire first
$ moves the map to the next offer's city, in the Deals list's order,
opens the Customers tab on a POP and marks the offer under Offers here
(UI.offerAt, the existing .row.on style). Two offers in one city each
get a press; any other selection clears the mark. With nothing on the
table it says so with the Deals tab's own "No open offers" text.
2026-11-03 10:47:51 +00:00
Charlie Allom
a0acb27c7a
Merge remote-tracking branch 'origin/main' into keyboard-shortcuts
# Conflicts:
#	CHANGELOG.md
2026-11-03 10:39:00 +00:00
Frederic Jung
823e4188be
Pay to hurry the permits and factory of your own subsea cable (closes #258)
Before laying starts, seaRush buys 30 days a step (or all of them at once)
at $500k plus $60 a km, with the market's build prices. The floor is the
factory: 60 days plus a day per ~80 km from the order (prepMin, through
leadDays), then the lay ships still need their time at sea, which a second
ship still halves. 6,000 km: from 600 days of prep to 132 for about $13M.
2026-11-03 10:35:16 +00:00
Charlie Allom
2680f3d82b
The arrow keys and W A S D move the map while held
The map moves at 700 px a second on screen at any zoom. The keys run
their own frame loop only while one is down, so the game loop does no
extra work. Letting go, a window opening or leaving the browser window
stops it, and a slow frame moves at most 50 ms worth. Arrows still
scroll the NOC dashboard when it is open, and Alt or Cmd with an arrow
stays the browser's.
2026-11-03 10:31:42 +00:00
Frederic Jung
4d609d996f
Port Hedland, Townsville and Alice Springs; the wet season up north (closes #255)
Three cities in the gaps of northern Australia, Telstraya everywhere, Hocus
Pocus in Port Hedland and Townsville, Aussie Boyband in Townsville. Port
Hedland lands the No Worries Cable System up to Darwin (the real NWCS) and a
Port Hedland-Singapore pair on the Darwin Award Cable (the DJSC interconnect
onto the ASC). Alice Springs has no cable and its only facility is an old
telegraph station.

Cities in the tropical north (Darwin, Port Hedland, Townsville) are wet: from
November to April a cut on land there takes twice as long to reach, with its
own message. The real DigiCo, iseek, NEXTDC, NWCS and DJSC names go on the
blocklist.
2026-11-03 10:28:03 +00:00
Charlie Allom
d88684d86e
n opens the NOC dashboard, and a letter right after it opens a tab
n then o, u, c, t, r or l, within a second, opens Overview, Customers,
Connections, Traffic, Links & routers or Leased lines. n never closes
the dashboard, so n c switches tabs without it flashing shut; Escape
closes it. Shift on the way does not cancel the wait, any other key
does. The ? list shows the letters.
2026-11-03 10:20:15 +00:00
Charlie Allom
23eeddf44f
Keyboard shortcuts: [ ] step through your POPs, - = zoom, ? lists every key
[ and ] select the previous or next of your POPs, in the order Find a
city lists them, and move the map there. - and = (also _ and +) zoom
around the middle of the map. ? opens a list of every shortcut, and Help
links to it on a computer. Keys are ignored while typing, with Ctrl or
Cmd held, or behind an open window.
2026-11-03 10:08:29 +00:00
Frederic Jung
3048c18b14
Fit the left tabs on small screens; move routing settings into a modal
The left panel's four tabs overflowed its 272px width on tablets and small
laptops: Goals wrapped its count, Networks ran off the edge. Counts now sit
on the tab's corner, labels stay on one line and shrink last.

Backbone, Auto-TE and DDoS settings sat below every notification in the NOC
tab. A Routing & DDoS button at the top opens them in a modal that redraws
in place after each action, with a red dot when Auto-TE is paused.
2026-11-03 10:20:57 +01:00
Frederic Jung
4a66bbf998
Best Effort: PNIs are up at once, no attack warnings without attacks
A pnis rule (wait or instant): in Best Effort pniLead() is 0, new PNIs are
on the moment they are ordered and augments and LAG members are applied at
once (pniUpDone(), split out of pniDay()). Gaming customers' attack warning
shows only where DDoS can happen.
2026-11-03 08:19:10 +00:00
Frederic Jung
09f205e458
Add Best Effort, a soft mode, and quiet notifications
A fourth Normal preset, gentler than Change Freeze: calm chaos (so no DDoS
and no chaos monkey), quick builds and no market, plus four new rules that
only it softens: sea cuts mend on their own clock without cable ships, no
conference season, a five-year Ministry of Tubes rescue loan instead of
game over, and customers who sour half as fast. The new rules are written
into S.rules only when they differ from the classic game, so older networks'
rules stay byte for byte what they were.

Quiet notifications is a new setting for every mode, on by default in Best
Effort: toasts the day itself raises pop up only for trouble and milestones,
the rest goes to the NOC log; what a click says still shows. Best Effort
badges count as Freeze-dried. The preset picker is four wide, two by two on
a phone in portrait.
2026-11-03 08:12:09 +00:00
Frederic Jung
de4a750cdd Let the intern light new fiber with the biggest optic (#262)
The optics order gets an Optics setting: most Gbps per dollar (the old
behaviour, still the default) or the biggest optic on new fiber, the most
Gbps per channel that fits the budget. It is still an intern: once a fiber
is lit it keeps adding what is in there and never swaps optics or line
systems. X.can() takes a quiet flag so asking about an unaffordable optic
is not logged as the budget running out.
2026-11-03 09:11:08 +01:00
Frederic Jung
3e57b41e13 Keep route-server networks on the route server (#265)
With an Open policy and the route server on, the peering desk still picked
networks the route server already reached and stored them as bilateral
sessions. It now skips a request from a network ixSessions() already has,
after drawing its random numbers, so the desk's draws stay as they were.

The changed peer list still moves seeded games a little: the Mid-Atlantic
scenario's floor goes from day 40 to 30 (main wins on days 34-58 across
seeds), and the past week 2026-W44 is regenerated as rev 3.
2026-11-03 09:03:33 +01:00
Frederic Jung
1a4a62d0f2
Show the standard POP's routers in the price of a new POP (#261)
The Build POP button quoted only the site, though popStdApply then paid
for the standard routers on top. popStdQuote() prices the standard the
way it is paid; the button, a note under it and the intern's one-tap
template now include it, and the toast says what the routers cost.
2026-11-02 21:40:14 +01:00
Frederic Jung
0dad03727f
Merge #254: a plug-in optic too short for a subsea cable is no longer sent to upgrades that cannot stretch it (closes #253)
# Conflicts:
#	CHANGELOG.md
2026-11-01 19:27:10 +01:00
Frederic Jung
25a43e22df
A 1.6T transponder takes two ports on 800G routers, one per 800G client (#256) 2026-11-01 19:02:06 +01:00
thesysadmindev
54f40221d5
Merge branch 'main' into sea-optic-hint 2026-11-01 23:11:36 +11:00
Frederic Jung
19b546f5ab
Damaged saves are retried by the next version and have a Try again button; imports up to 64 MB 2026-11-01 13:08:43 +01:00
Christopher Hawker
0bf27a66c7 A plug-in optic too short for a subsea cable is no longer sent to upgrades that cannot stretch it (closes #253)
On an own subsea cable, the hint under an optic that cannot reach the route
said "Consider submarine terminals or optical engineering" for every optic.
Those upgrades only lengthen the Sienna WaveMagic 1.6T and 3.2T transponder
modes (optModes()); the 400ZR+ and 800ZR+ plug-ins gain nothing, also with
both upgrades in service. Perth to Cape Town (8,891 km) showed it: 800ZR+
reaches 5,400 km and the advice was to buy $17M of upgrades that change
nothing.

chWhy() now asks whether the optic would reach with both upgrades in service
(withSubUps()). If so, the advice stays. If not, the hint says the upgrades do
not stretch this optic and names the optics that do reach the route. A
consortium seat and a leased line keep their own message.
2026-11-01 23:03:47 +11:00
Frederic Jung
96e2c2f537
Cable ships: club repair ships sail out to subsea cuts, private charters jump the queue, lay ships build your cables
A subsea cut sends the nearest free ship of its region's maintenance club from its port, along the cable routes at about 500 km a day; the cut lasts while it sails, waits for permits in slow countries and splices (3-5 days shallow, 6-12 deep). Ships stay busy until home (S.fleet). With the club's ships all out the cut waits; a private charter of the quickest free ship costs $1M + $200/km sailed. Own subsea builds show survey/factory, then a lay ship at 150 km/day; a second lay ship can be booked before laying ($3M + $150k/day saved), and crews no longer speed up cables at sea. Ships are drawn on the map and can be tapped.
2026-11-01 11:24:53 +00:00
Frederic Jung
7202441716
400G cache boxes behind 400G or faster router ports 2026-11-01 11:37:34 +01:00
Frederic Jung
533532ba32
A standard POP: new POPs get the standard router model and count at once (closes #240) 2026-11-01 11:32:29 +01:00
Frederic Jung
38fdf9b4d8
Subsea hurry costs a cable ship: charters for builds, the repair-ship queue for cuts
Speeding up an own subsea cable charters another cable ship ($3M plus $500/km per 30 days saved), and a rush repair on a subsea cut costs $1M plus $200/km. Land crews and trench repairs keep their prices.
2026-11-01 10:25:32 +00:00
Christopher Hawker
eb78d7104e Prefer keeps the say at its own POP only, and the direct ranks stop slowing the game day
Review of #205:

- Prefer no longer switches the carrier-direct rule off for the whole network.
  A POP with a Prefer-marked transit port keeps what Prefer says; every other
  POP keeps the rule. compute(), traceroute and the reference loop in the tests
  all use the same per-POP rule, and a new test covers it (New York and Chicago,
  Prefer on one POP's Tell-Ya port).
- dayTick() cost. The harness is neutral (the same page on both sides differs by
  1%), but the cost was real: the four extra rank passes inside compute()'s main
  loop made V8 deoptimise compute() 954 times in 30 game days against 46 on main.
  The direct ranks now run in a small function of their own, in the plain way the
  reference loop does (their lists are one carrier's ports), so the main loop is
  the one main has, and the setup moved out of compute(). 61 deopts instead of 954.
- Italian: "Porta qui" read as "port here" next to "Porta più vicina"; it is
  "Instrada qui" now, and "Ogni POP instrada il traffico..." matches.
- Help text: says that real BGP carries the traffic from every POP (the shorter
  AS path beats IGP distance), that Carry here does that here, and that Nearest
  port is the default. All six languages.
2026-11-01 20:07:23 +11:00
Christopher Hawker
a469844f61 Merge remote-tracking branch 'upstream/main' into own-carrier-egress 2026-11-01 01:37:42 +11:00