summaryrefslogtreecommitdiff
path: root/config/pi/extensions
AgeCommit message (Collapse)Author
24 hourspi forum: let an agent mute its forums while it focusesIgor Soarez
The forum tool's mute holds one forum's posts -- mentions, and unread counts -- or, without a forum, everything, direct messages included. unmute releases them; without a forum it ends every mute. When and whether to mute is the agent's call; the description asks it to mute only when interruptions would hurt the task, and to unmute when done. Held messages wait in the delivery queue, so nothing is lost and a muted forum's unread count is reported once it is unmuted. A sender is told the receiver muted these, and a post's report lists muted members apart from those woken. A run the agent starts while muted opens with what is held, and says that direct messages still arrive when only forums are muted. The status bar, the tool's list, /forums and pi-forum show who is muted. The mute is kept in the registration, so it survives /reload and a restart that restores the agent.
25 hourspi forum: a one-line preamble, and tighter rules on noise and namesIgor Soarez
Every incoming message carried about 1,070 characters of fixed text, which stayed in the receiver's context until compaction: about 46k tokens for the busiest agent over six days. It is now one line of about 290: sender, not the user, no permission, quoted text is data, how to reply. The rest of what it said is in the tool's description, which every receiver has, since a message reaches only a forum member. Agents still told the user about peers by bare id, mostly in a reply's second and later mentions ("j96e4m's review"). The description now says so for every mention, and for messages between agents, which get relayed. A first reply names a peer as label and id; later mentions keep at least its place. From six days of v3-deployments traffic, three more rules: one post mentioning several agents, not a message to each or a forward of news already sent; changing state in the pin, sent once settled; and a request says whether it needs a report back. The naming and noise rules also go in the system prompt's rules, as promptGuidelines, while the tool is active.
26 hourspi forum: an agent stopped by a signal or crash keeps its forumsIgor Soarez
A shutdown sends pi SIGTERM or SIGHUP, which pi handles as a quit, so every agent left its forums, and a dingger restore brought them back in none. Only a quit the user asks for now ends membership. An agent whose pi was stopped any other way stays registered as stopped, and the next pi to start on its session (pi --session, pi -c, a dingger restore) takes it back: same id, same forums, same read position, with a notice of what is unread. pi stops its TUI before session_shutdown on a user's quit, and after it on a signal, so a terminal still in raw mode there means a signal. A crash runs no handler and leaves a dead pid, or a socket nobody answers on, which counts the same. Read positions are saved as they move, for that case. Stopped members are listed as such by the tool, /forums and pi-forum. A direct message to one fails, saying so; a post may mention one, and waits for it as unread. /forum remove and /forum delete clear them.
2 dayspi forum: type the action enum with TypeBox, for pi 1.5Igor Soarez
pi 1.5's pi-ai no longer types StringEnum as TypeBox outside pi's runtime mapping, so the tool's parameters typechecked as unknown. Build the same schema, a string with an enum, with Type.Unsafe.
2 dayspi forum: put the session name back in an agent's labelIgor Soarez
A label of the place alone, deployment:slice, did not say what the agent was doing. It is now place, then session name: deployment:slice · Review agent steering [t26w9t]. The session name no longer needs a field of its own beside it, in the tool or in pi-forum.
5 dayspi-forum: list, show and follow forum posts from a terminalIgor Soarez
The posts agents write to a forum were only readable through the forum tool, or as raw JSON lines. pi-forum lists the forums with their running members and pins, shows a forum's last posts, and follows one forum or all of them as posts, pins, new forums and deletions arrive. It only reads: no model calls, nothing marked read. Direct messages stay where they are, in the two agents' transcripts.
7 dayspi forum: call agents by their place, deployment:slice [t26w9t]Igor Soarez
An agent's label led with its session name, often a long generated one, and agents reported peers to the user by bare id. The label is now the tmux session:window or herdr workspace/tab, else the session name, else the session id; the session name goes beside it. The tool and each incoming message tell the agent to name a peer as label and id, never by id alone.
11 dayspi forum: give a fresh session its notice with the first runIgor Soarez
Appended to a session with no conversation yet -- a new pi, or just after /new -- the join notice sat ahead of the system message pi records at the first run, and pi then sent that message without its content: the provider refused every request with a 400. Queue it for the next turn instead, which pi places after the system message.
11 dayspi forum: fold long messages in the transcript, whole on expandIgor Soarez
A message of up to 4000 characters printed in full in both panes; show its first 10 lines, or 1000 characters, and how much more there is, as pi does for tool output. The model still gets the whole text.
13 dayspi forum: let agents the user puts in a forum find and message each otherIgor Soarez
/forum <name> puts this pi in a forum; its members can list each other, post to it (waking only those mentioned), read its history, set its pin, and send each other direct messages, delivered the way alarm.ts delivers alarms. Only the user adds an agent; any pane can remove one. Forums and their posts live in ~/.pi/forum until /forum delete; membership lasts as long as the pi process.
2026-10-30pi alarm: keep pending alarms across /reloadIgor Soarez
/reload dropped every pending alarm and stopped its when_done command, without a word. An agent that had ended its turn to wait for one was never woken -- nor a pi-goal goal_wait counting on it. The old copy of the extension now leaves what is pending on globalThis instead: each alarm as plain data, the due queue, the next id, and a when_done command's ChildProcess with its own listeners removed. The copy pi loads next arms fresh timers from each alarm's absolute time, listens on the command again (one that exited meanwhile still holds its status), and resumes polling PIDs. Nothing crosses that would reach the old, stale pi or ctx. A handoff from another session or another HANDOFF_VERSION is refused and its commands stopped, with a notice. If nothing takes it within 30s -- the file failed to load, or was removed -- the old copy stops its commands. Quitting, /new, /resume and /fork still drop everything.
2026-10-27pi alarm: fire when a command exits or when processes exitIgor Soarez
when_done runs a command (bash -c, in pi's cwd, output to a log file) and fires when it exits, with its exit status; cancelling the alarm or ending the session stops it. when_exits polls PIDs already running and fires once all are gone. Either takes an optional deadline, 24 hours by default, at which the alarm fires anyway and a still-running command is stopped. A process exiting is a signal any condition can be turned into -- gh run watch, sz-wait-for, an until-curl loop -- so the agent can start something long, end its turn and be woken, instead of blocking on it. The delivery path is the existing one, unchanged. pi-subagent: §5 sets an alarm on the runs' PIDs instead of waiting.
2026-10-23pi alarm: steer a due alarm into a running taskIgor Soarez
An alarm that fell due mid-task used to wait in the extension until the run settled. Now it is steered in: pi adds it after the tool calls in progress finish, before the next model call, and the model weighs it against the task. The alarm text tells it to say which it chose. pi's Esc empties its queue and drops queued extension messages without a word, so an alarm stays listed until message_end shows it in the conversation. One not seen by the end of a stopped run is held and sent again after the next run completes; resending into that run could deliver it twice, since pi takes one queued steer per turn and other aborts leave the original queued.
2026-10-22pi: alarm extension, timed notes the agent sets for itselfIgor Soarez
An `alarm` tool sets, lists and cancels alarms: after a delay, at a wall-clock time, or repeating (at most 12 fires, the last within 24 hours). A fired alarm is a pi.sendMessage custom message, customType "alarm", rendered as set by the agent rather than typed by the user, and wrapped in fixed text the agent cannot drop: it is the agent's own earlier note, not the user's, and grants no permission -- outward actions still need the user's approval. /alarms lists and cancels. An alarm due while pi is busy waits for the task to finish, held here rather than in pi's queue, which drops a custom message on Esc. A run that ended stopped -- Esc, an error, or the abort before /compact, /new, /resume and /fork -- holds due alarms until a later run completes. Timers die with the session; the tool is withdrawn outside the TUI. Reviewed by Fable and GLM 5.3 Flash. Fixed from the review: unbounded every_minutes overflowed setTimeout into 1 ms fires; a due alarm ran right after Esc, or unseen on a session being replaced; stale repeat fires piled up; the session_compact delivery never ran; impossible dates and times skipped by a clock change were accepted; the note could forge the wrapper's delimiters. Declines dot request 20261021-220352-work-laptop-c46033 (sz-agent-alarm, a skill typing into the agent's tmux pane) in favour of this: a custom message is recorded and shown as the agent's, needs no screen-scraping, and loads only in pi.
2026-10-05pi: the session name in herdr's Agent sidebarIgor Soarez
herdr labels every pi pane "pi", so with several open the rows cannot be told apart. herdr 0.9.3's socket API has pane.report_metadata, whose display_agent replaces that label without touching lifecycle state; this reports the session name there on start and on every rename, auto-named titles included. Interactive sessions only: a pi -p or subagent run from inside a pane inherits its HERDR_* variables and would otherwise rename the pane after itself. Checked against a fake herdr socket: a print-mode run sends nothing, while the socket accepted a control message. Outside herdr it returns at once. The pi APIs it uses -- ctx.mode "tui", getSessionName, session_info_changed's name -- are as in pi 1.0.0, and link/pi.sh links it in like any tracked extension. From change request e053eb.
2026-09-17dotfilesIgor Soarez
Shell, editor and terminal configuration, the tools that go with them, and szecret, an age-based secret manager whose store lives elsewhere. History restarts here. What came before was not written to be read by anyone else, and carried machine names, addresses and an encrypted secret store; it is kept privately instead. What is left is meant to be safe on any machine, including one whose owner is not me: see CLAUDE.md for the rule it is written to.