Skip to content

Instantly share code, notes, and snippets.

@aliou
aliou / session.html
Last active February 13, 2026 20:22
Pi session export
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Session Export</title>
<style>
:root {
--accent: #7a8aa6;
@aliou
aliou / session.html
Created February 11, 2026 20:49
Pi session export
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Session Export</title>
<style>
:root {
--accent: #7a8aa6;
--border: #404040;
@aliou
aliou / session.html
Created February 11, 2026 20:43
Pi session: investigating mass process kill on macOS
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Session Export</title>
<style>
:root {
--accent: #7a8aa6;
--border: #404040;
@aliou
aliou / README.md
Created February 5, 2026 01:47
Repro/test for streaming image drop bug (pi-mono PR #1271)

Image delivery repro tests

Two test artifacts for verifying that images are not dropped when steer / follow_up are used during streaming.

RPC test (rpc-test.mjs)

Spawns pi in RPC mode and runs three tests:

  1. prompt with image (non-streaming baseline) -- should always pass
@aliou
aliou / Dockerfile
Created February 1, 2026 14:58
Pi Alpine ARM64 MUSL repro
FROM node:22-alpine
# Install pi-coding-agent
RUN npm install -g @mariozechner/pi-coding-agent
# Try to run it
CMD ["pi", "--help"]
@aliou
aliou / index.ts
Created January 23, 2026 17:26
Sleep tool for testing abort behavior with multiple queued tools
/**
* Sleep Tool - For testing abort behavior with multiple queued tools
*/
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import { Type } from "@sinclair/typebox";
export default function (pi: ExtensionAPI) {
pi.registerTool({
name: "sleep",
@aliou
aliou / index.ts
Last active January 23, 2026 16:23
Pi extension - A nice surprise
/**
* Surprise Extension
*
* Displays a countdown and then opens a surprise URL.
*/
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import { exec } from "node:child_process";
import { platform } from "node:os";
@aliou
aliou / index.ts
Last active January 23, 2026 16:21
Pi extension test - stall compaction
/**
* Stall Compaction Extension (for debugging)
*
* Provides /stall-compact command to force-trigger compaction, and stalls it for 10 seconds
* to reproduce the Alt-Up "no queued messages to restore" bug.
*/
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
const STALL_SECONDS = 15;
@aliou
aliou / postmortem.md
Created May 5, 2020 14:32 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym

While going source spelunking, I came across this piece of code in Rails' ActiveModel:

key = "#{key.to_s.camelize}Validator"

begin
  validator = key.include?("::".freeze) ? key.constantize : const_get(key)
rescue NameError