Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
145 changes: 111 additions & 34 deletions bun.lock

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"//": "Not an npm package. The CLI ships only as a Bun-compiled single binary via the Homebrew tap (see .github/workflows/release.yml). `private` blocks accidental `npm publish`; there is deliberately no `bin` so `npm i -g .` can't install a stale global that shadows the brew binary.",
"private": true,
"engines": {
"node": ">=18"
"node": ">=22"
},
"scripts": {
"dev": "tsx src/cli.tsx",
Expand All @@ -20,19 +20,24 @@
"test:watch": "vitest"
},
"dependencies": {
"@ellipsis-dev/sdk": "^0.3.0",
"@ellipsis-dev/sdk": "^0.4.0",
"chalk": "^5.6.2",
"cli-table3": "^0.6.5",
"commander": "^12.1.0",
"ink": "^5.0.1",
"ink-spinner": "^5.0.0",
"react": "^18.3.1",
"ink": "^7.1.1",
"marked": "^15.0.12",
"marked-terminal": "^7.3.0",
"react": "^19.2.0",
"strip-ansi": "^7.2.0",
"wrap-ansi": "^10.0.0",
"ws": "^8.18.0",
"yaml": "^2.9.0"
},
"devDependencies": {
"@types/node": "^22.5.0",
"@types/react": "^18.3.0",
"@types/react": "^19.2.0",
"@types/ws": "^8.5.12",
"react-devtools-core": "^4.28.5",
"react-devtools-core": "^6.1.2",
"tsup": "^8.3.0",
"tsx": "^4.19.0",
"typescript": "^5.6.0",
Expand Down
5 changes: 5 additions & 0 deletions src/commands/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ export async function runConnect(
configName: config,
exitState,
}),
// Render every frame as it happens even without a TTY. Ink's default is to
// buffer and emit only the final frame off-TTY, which would silence the
// documented headless path (`--no-input` piped into a script or an agent)
// for the entire life of the session.
{ interactive: true },
)
// Guard against the revoked-TTY spin. When the controlling terminal is torn
// down abruptly (terminal app force-quit/crash, SSH drop, login-session
Expand Down
112 changes: 112 additions & 0 deletions src/lib/facts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
// The trivia shown under "What are we shipping today?" on the new-session
// pane — one fact, picked at random each time the pane mounts. Entertaining
// over educational; software engineering and CS lore, light on math and
// physics. One line per fact.
export const FACTS: readonly string[] = [
'The first computer "bug" was literal: a moth taped into the Harvard Mark II logbook in 1947, with the note "first actual case of bug being found."',
'Python is named after Monty Python, not the snake. Guido van Rossum was reading the scripts while building it.',
'A 1978 spam email sent to 393 ARPANET users is considered the first spam ever. People were furious. It reportedly sold $13 million in DEC computers anyway.',
'The Apollo 11 guidance computer had about 4KB of RAM. Your terminal prompt is using more memory than the moon landing did.',
'In 1996, a $370 million Ariane 5 rocket exploded because of a 64-bit float being stuffed into a 16-bit integer.',
'"Ada", the language, is named after Ada Lovelace, who wrote the first published algorithm in 1843 for a computer that was never built.',
'Linus Torvalds also wrote Git in about two weeks, mostly because he was annoyed at every existing version control system.',
"The QWERTY layout was designed partly to slow typists down so mechanical typewriter arms wouldn't jam. We just never stopped using it.",
'NASA still flies code written in the 1970s: the Voyager probes get patches from billions of miles away, at 160 bits per second.',
'The "404" error is just HTTP\'s fourth class of status code, fourth entry. The legend about a "room 404 at CERN" is itself a 404: not found.',
"Windows 95 had a timer bug that crashed the OS after exactly 49.7 days of uptime. Nobody noticed for years because nobody's Windows 95 stayed up that long.",
"The first webcam watched a coffee pot. Cambridge researchers pointed a camera at it so they wouldn't walk downstairs to an empty pot.",
'JavaScript was built in 10 days. It now runs most of the visible internet. Sleep well.',
'A single bit flipped by a cosmic ray once gave a Belgian election candidate 4,096 extra votes. The universe has write access to your RAM.',
'There\'s a number so illegal that publishing it was a crime: the AACS encryption key. People printed it on t-shirts anyway.',
'The average pencil can draw a line 35 miles long. The average programmer can debug a line for 35 miles before noticing the typo.',
'Grace Hopper handed out foot-long wires to explain a nanosecond: that\'s how far light travels in one. She kept a "microsecond" coil of wire that was 984 feet.',
'In binary, 42 is 101010. Douglas Adams claimed the choice was a joke with no meaning. Fans refuse to believe him to this day.',
'The Y2K bug cost an estimated $300+ billion to fix, worked, and is now remembered as a hoax because it worked.',
'TCP\'s three-way handshake is basically: "Can you hear me?" "I can hear you, can you hear me?" "I can hear you." Every website you open starts with this tiny trust exercise.',
'Ctrl-C sends a signal called SIGINT. It sounds like a spy agency, and it does terminate people\'s jobs.',
'"Bluetooth" is named after a 10th-century Viking king, Harald Bluetooth, who united Denmark and Norway. The logo is his initials in runes.',
'The first hard drive shipped in 1956. It stored 5MB, weighed about a ton, and was moved by forklift. IBM leased it for $3,200 a month.',
'Vim\'s license asks you to consider donating to orphans in Uganda. Its author, Bram Moolenaar, called it "charityware."',
'The save icon is a floppy disk. Most people who click it have never touched one.',
'Email is older than the web by about 20 years. People had inbox anxiety before they had browsers.',
'The word "robot" comes from the Czech word for forced labor. It first appeared in a 1920 play where the robots revolt. We used the name anyway.',
'A group of flamingos is called a flamboyance. A group of programmers is called a merge conflict.',
'A race condition in the Therac-25 radiation machine hurt real patients in the 1980s. It is why safety code reviewers are so picky. They have a good reason.',
'Dennis Ritchie co-created C and Unix. He died the same week as Steve Jobs and got a fraction of the news coverage. Every tribute to Jobs was typed on Ritchie\'s work.',
'Ada Lovelace was asked to translate a paper about the Analytical Engine. Her notes ended up three times longer than the paper. The first case of scope creep.',
'"Debugging is twice as hard as writing the code in the first place," wrote Brian Kernighan. So if you write the cleverest possible code, you cannot debug it.',
'The Unix epoch began January 1, 1970. On January 19, 2038, 32-bit timestamps overflow. Y2K fans call it "the sequel."',
'The @ symbol was a dying accounting character until 1971. Ray Tomlinson picked it to separate user from machine in the first email address.',
'Google was misspelled. The founders meant "googol," the number 1 followed by 100 zeros, and registered the typo.',
'The first banner ad ran in 1994. It said "Have you ever clicked your mouse right HERE?" and 44% of people clicked. It has been downhill ever since.',
'Amazon found that every extra 100ms of page load time cost them about 1% in sales. Milliseconds have a salary.',
'Space Invaders sped up as you killed aliens because the hardware had less to draw. The bug became the difficulty curve.',
'Pac-Man breaks on level 256 because the level counter is a single byte. The kill screen is an integer overflow you can visit.',
'Walk far enough in old Minecraft and the terrain turned to glitchy chaos, the "Far Lands." That was floating point math running out of precision.',
'The PlayStation startup sound was partly there to cover the slow boot. Loading screens have always been theater.',
'The Konami Code exists because a developer found his own game too hard to test. He added a cheat, then forgot to remove it.',
'Mario has a mustache because 1981 pixels could not draw a mouth. He wears a hat because they could not animate hair.',
'The dial-up modem scream was a negotiation. Two machines shouted what they could do at each other until they agreed on a speed.',
'Wi-Fi does not stand for anything. A branding agency made it up to sound like "hi-fi." People invented "wireless fidelity" after the fact.',
'CAPTCHA stands for "Completely Automated Public Turing test to tell Computers and Humans Apart." You have failed one before. Think about that.',
'The first 1GB hard drive shipped in 1980. It cost $40,000 and weighed 550 pounds. Today a gigabyte falls out of your pocket.',
'The Morris Worm of 1988 was meant to measure the size of the internet. A bug made it crash machines instead. Its author now teaches at MIT.',
'Junk mail is called "spam" because of a Monty Python sketch. Vikings chant "spam" until nobody can talk. That is also how your inbox works.',
'A "jiffy" is a real unit of time. The Linux kernel uses it for its clock tick. "Back in a jiffy" is a promise you can measure.',
'The Boeing 787 had a counter that overflowed after 248 days and cut electrical power. The fix: reboot the plane on a schedule. Turn it off and on again, but with paperwork.',
'Half of all "Stack Overflow copy-paste" jokes are copied and pasted.',
'The first domain name ever registered was symbolics.com, in 1985. It is still up, as a museum of itself.',
'IPv4 has about 4.3 billion addresses, and we ran out. IPv6 has enough to give every grain of sand on Earth trillions of them. We should be fine for a bit.',
'In 1997, Deep Blue made a chess move that spooked Kasparov. It may have been a bug: the machine could not decide, so it played a random move.',
'Rubber duck debugging is real and it works. Explaining your code out loud to a duck forces you to actually read what you wrote.',
'The cloud icon in network diagrams is decades older than cloud computing. Engineers drew a cloud to mean "stuff we don\'t care about here."',
'Every software safety course uses the same two disasters: Therac-25 and Ariane 5. The good news is that the list of famous ones is short.',
'Excel thinks 1900 was a leap year. It was not. Lotus 1-2-3 had the bug first, and Excel copied it on purpose to stay compatible. The bug is older than most of its users.',
'Scientists renamed human genes like SEPT1 and MARCH1 because Excel kept turning them into dates. The spreadsheet won.',
'Early Unix had a command called "biff" that announced new mail. It was named after a real dog that barked at the mailman.',
'Background processes are called "daemons" after Maxwell\'s demon in physics: an invisible worker that never stops. Pronounce it however you want. Everyone else does.',
'"Booting" a computer comes from "pulling yourself up by your bootstraps." The machine loads the loader that loads the loader.',
'Gangnam Style got so many views it overflowed YouTube\'s 32-bit counter in 2014. Google had to upgrade to 64 bits.',
'Arrays start at 0, so the 13th element is at index 12. Someone on your team got bitten by this in the last month.',
'The first computer mouse was made of wood. Douglas Engelbart showed it off in 1968, in a demo that also introduced video calls and hypertext.',
'The first six programmers of the ENIAC were all women. They programmed it by rewiring it. The job title "programmer" did not exist yet.',
'Margaret Hamilton printed out her Apollo flight code, and the stack stood as tall as she did. She also coined the term "software engineering."',
'Floppy disks had a write-protect notch. Cover the hole with tape and the drive physically could not write. File permissions, but with tape.',
'Ken Thompson showed how to hide a backdoor in a compiler so well that recompiling cannot remove it. His conclusion: you cannot fully trust code you did not write yourself.',
'The ASCII delete character is 127: all seven bits set to 1. On paper tape, you deleted something by punching out every hole. Deletion by total destruction.',
'In The Hitchhiker\'s Guide, the answer to everything is 42. In ASCII, 42 is the asterisk: the wildcard. So the answer to everything is whatever you want it to be.',
'The traveling salesman problem and the seating chart at your wedding are the same math problem. Only one of them has good software.',
'There are more possible chess games than atoms in the observable universe. Your test suite still won\'t cover every input.',
'A googol is 1 followed by 100 zeros. A googolplex is 1 followed by a googol zeros. You cannot write it out. The universe does not have enough paper.',
'Put 23 people in a room and odds are two of them share a birthday. Hash collisions work the same way. That is why cryptographers use very big numbers.',
'Fermat claimed he had a proof of his Last Theorem, but the margin of his book was too small to write it down. The real proof took 358 years and 129 pages.',
'A day on Venus is longer than a year on Venus. It spins that slowly. Somewhere, a calendar library maintainer is sweating.',
'GPS satellites correct their clocks for relativity. Without the fix, your map position would drift about 10 kilometers per day.',
'Sunlight takes 8 minutes to reach Earth. Light from the next nearest star takes over 4 years. The night sky is a very stale cache.',
'A small part of old TV static came from the afterglow of the Big Bang. The snow between channels was partly the birth of the universe.',
'Honey never spoils, sharks predate trees, and there is code in production older than the person debugging it.',
'"Foo" and "bar" come from the old military slang FUBAR. Your placeholder variables have a service record.',
'Linux still has an error code that means "not a typewriter" (ENOTTY). Terminals were once real teletypewriters. That is what TTY stands for.',
'A software "patch" was once a real patch. You fixed a program by taping over holes in the punched tape and punching new ones.',
'The Mars Climate Orbiter burned up because one team used pounds and another used newtons. A missing unit conversion cost $327 million.',
'The first Apple logo was a drawing of Isaac Newton under an apple tree. It lasted a year. It was impossible to print small.',
'"Hello, World!" comes from a 1978 C tutorial by Brian Kernighan. The first version, in 1972, had no exclamation point. The excitement was added later.',
'The Commodore 64 is still the best-selling single computer model ever. Its prompt said "READY." Modern shells are not so upbeat.',
'The ancient Greeks built a gear computer to predict eclipses over 2,000 years ago. It is legacy hardware with no docs and no maintainers.',
'IBM put "THINK" signs on office walls decades before Google wrote "Don\'t be evil." Company slogans are the oldest form of prompt engineering.',
'Alan Turing proposed his famous test in 1950 and called it "the imitation game." He guessed machines would pass it by the year 2000. He was close.',
'Some servers have run for over 16 years without a reboot. At that point, nobody dares to try.',
'SQL is older than the compact disc. NoSQL databases are a rebellion against something older than Star Wars.',
'Microsoft\'s official name for the blue screen of death is a "bug check." That is like calling a house fire a "warmth event."',
'During the Moon landing, the Apollo computer raised a 1202 alarm. It was overloaded, so it dropped low-priority work and kept flying. Graceful degradation, live on TV.',
'The most common bug report of all time is "works on my machine." Docker was invented so you could ship your machine.',
'Radia Perlman invented the spanning tree protocol and explained it in a poem. It rhymes, and it routed the world.',
'CSS came out in 1994. Centering a div was not truly easy until around 2015. Twenty-one years. Still faster than the Fermat proof.',
'Undo is Ctrl-Z, in the bottom-left corner of the keyboard. Fixing mistakes was designed to be within easy reach.',
]

// One at random. The caller reads it once per mount, so the fact changes each
// time the pane opens rather than flickering on re-render.
export function randomFact(): string {
return FACTS[Math.floor(Math.random() * FACTS.length)] ?? FACTS[0]!
}
Binary file added src/lib/markdown.ts
Binary file not shown.
Loading