Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.
TypeScript agentai-agentai-agentsai-assistantandroidautomationchatgptcoding-agentcomputer-usedesktop-appelectronllmlocal-firstmcpmulti-agentollamaopenaiprivacyself-hostedtypescript
chore: describe reasons in comments instead of internal tracker numbers
leen.zhou1a6a716ce132
diff --git a/apps/mobile/src/features/conversations/ChatListScreen.tsx b/apps/mobile/src/features/conversations/ChatListScreen.tsxindex 994bef9..97c2a18 100644--- a/apps/mobile/src/features/conversations/ChatListScreen.tsx+++ b/apps/mobile/src/features/conversations/ChatListScreen.tsx@@ -165,7 +165,7 @@ export function ChatListScreen() {}/>) : (- // F17: "sends when the computer is back" only when the phone cannot answer itself.+ // "sends when the computer is back" only when the phone cannot answer itself.<OfflineBannertext={t(canReplyOffline ? "listOfflinePhone" : "listOffline")}onDetails={() => setOfflineDetails(true)}diff --git a/apps/mobile/src/features/offline/OfflineSettingsScreen.tsx b/apps/mobile/src/features/offline/OfflineSettingsScreen.tsxindex c3dfb67..9289472 100644--- a/apps/mobile/src/features/offline/OfflineSettingsScreen.tsx+++ b/apps/mobile/src/features/offline/OfflineSettingsScreen.tsx@@ -50,7 +50,7 @@ export function OfflineSettingsScreen() {};}, [engine, offline.computerId, offline.revision]);const manifest = offline.manifest;- // F22 (phone 2026-11-14): an older computer lists a router provider's whole catalog as+ // An older computer lists a router provider's whole catalog as// delivered (hundreds of rows); only the models the Bots answer with matter here, by provider.const delivered = useMemo(() => {const groups = new Map<string, NonNullable<typeof manifest>["models"]>();diff --git a/apps/mobile/src/features/phone-data/AndroidCapabilityRows.tsx b/apps/mobile/src/features/phone-data/AndroidCapabilityRows.tsxindex 4428d1b..bdd3df9 100644--- a/apps/mobile/src/features/phone-data/AndroidCapabilityRows.tsx+++ b/apps/mobile/src/features/phone-data/AndroidCapabilityRows.tsx@@ -6,7 +6,7 @@ import { useColors } from "../../theme/use-theme.ts";import { Separator, Switch } from "../../ui/controls.tsx";import type { usePhoneData } from "./use-phone-data.ts";-// F25 (phone 2026-11-14): each source says what it reads, not one shared sentence for both.+// Each source says what it reads, not one shared sentence for both.const READ_ROWS = [{kind: "notifications",diff --git a/apps/mobile/src/features/settings/bot/ProfilePages.tsx b/apps/mobile/src/features/settings/bot/ProfilePages.tsxindex d427f01..5974e8f 100644--- a/apps/mobile/src/features/settings/bot/ProfilePages.tsx+++ b/apps/mobile/src/features/settings/bot/ProfilePages.tsx@@ -220,7 +220,7 @@ export function ModelPage({ state }: Props) {const offlineEngine = useOfflineEngine();const offlineMode =offline.unreachable && !!bot && offline.manifest?.bots.some((row) => row.id === bot.id);- // F22: the models the Bots use, not a router provider's whole catalog.+ // The models the Bots use, not a router provider's whole catalog.const offlineModels = offlineMode ? usedOfflineModels(offline.manifest) : [];const conflict = !!bot && offline.conflicts.includes(bot.id);useEffect(() => {diff --git a/apps/mobile/src/offline/engine.ts b/apps/mobile/src/offline/engine.tsindex b43f05e..1499b19 100644--- a/apps/mobile/src/offline/engine.ts+++ b/apps/mobile/src/offline/engine.ts@@ -130,7 +130,7 @@ function offlineModelFor(}/**- * F22: the delivered models the Bots use. An older computer sends a router provider's whole+ * The delivered models the Bots use. An older computer sends a router provider's whole* catalog marked delivered (hundreds of rows); a Bot can only answer with its own model offline.*/export function usedOfflineModels(manifest: Pick<OfflineManifest, "models" | "bots"> | undefined) {diff --git a/packages/credentials/src/ui/accounts/PasswordSettings.tsx b/packages/credentials/src/ui/accounts/PasswordSettings.tsxindex 2cc4365..45ebd1e 100644--- a/packages/credentials/src/ui/accounts/PasswordSettings.tsx+++ b/packages/credentials/src/ui/accounts/PasswordSettings.tsx@@ -69,7 +69,7 @@ export function PasswordSettings({const names = new Map(bots.map((bot) => [bot.id, bot.name]));const canSave = status?.storage === true;const root = useRef<HTMLDivElement>(null);- // The pre-D130 "passwords" page link lands on this section. Wait a frame so the settings+ // The older "passwords" page link lands on this section. Wait a frame so the settings// dialog's own initial focus has run and the page above has laid out.useEffect(() => {if (!focus) return;diff --git a/packages/policy/src/core/outside-write.ts b/packages/policy/src/core/outside-write.tsindex e3f329a..da88819 100644--- a/packages/policy/src/core/outside-write.ts+++ b/packages/policy/src/core/outside-write.ts@@ -7,7 +7,7 @@ import type { EvaluationInput, PathContext, PolicyResult, ResolvedPath } from ".export { OUTSIDE_WRITE_REASON };/** Root, home itself, system folders, Pi Bot's data and credential stores. */export const PROTECTED_PATH_REASON = "protected_path";-/** The pre-ADR-0054 hard refusal, kept for runners and callers that cannot show the card. */+/** The earlier hard refusal, kept for runners and callers that cannot show the card. */export const OUTSIDE_WRITE_DENIED_REASON = "outside_workplace_write_denied";async function nearestExisting(path: string, context: PathContext) {diff --git a/packages/protocol-base/src/skills/env-example.ts b/packages/protocol-base/src/skills/env-example.tsindex 8193d09..580fc07 100644--- a/packages/protocol-base/src/skills/env-example.ts+++ b/packages/protocol-base/src/skills/env-example.ts@@ -1,7 +1,7 @@/*** Retain assignment names only; values never enter the output. A commented-out assignment* (`# NAME=`) stays a comment: templates ship optional keys that way, and dropping the line left- * the saved example empty or unreadable (F10).+ * the saved example empty or unreadable.*/export function envExampleFilter() {let prefix = "",diff --git a/packages/protocol-base/src/skills/skill-compatibility.ts b/packages/protocol-base/src/skills/skill-compatibility.tsindex f825aa9..7f0c9d6 100644--- a/packages/protocol-base/src/skills/skill-compatibility.ts+++ b/packages/protocol-base/src/skills/skill-compatibility.ts@@ -68,7 +68,7 @@ export const SkillCompatibilityEntrySchema = z.strictObject({.optional(),runtime: z.enum(["python", "node", "bash", "powershell"]).optional(),/**- * F14: the values written in `allowed-tools`. Names only, and never free text: a skill cannot+ * The values written in `allowed-tools`. Names only, and never free text: a skill cannot* smuggle a sentence (or a secret) into the report by putting it in that list.*/tools: zdiff --git a/packages/remote/src/brain/offline/snapshot.ts b/packages/remote/src/brain/offline/snapshot.tsindex 28ac9aa..801af12 100644--- a/packages/remote/src/brain/offline/snapshot.ts+++ b/packages/remote/src/brain/offline/snapshot.ts@@ -79,7 +79,7 @@ export class OfflineSnapshots {async usableModels(grants: readonly OfflineGrantRecord[], bots: readonly Bot[]) {const models: OfflineModel[] = [];for (const grant of grants) {- // F22 (phone 2026-11-14): the whole catalog of a router provider is hundreds of models,+ // The whole catalog of a router provider is hundreds of models,// all marked delivered, so the phone's lists could not be shortened. Only the models the// Bots use (and a grant's own model) go to the phone; a model picked there offline is one// of these, and it becomes a Bot's model when the choice is written back on reconnect.diff --git a/packages/renderer-kit/src/navigation/context.ts b/packages/renderer-kit/src/navigation/context.tsindex 2735bfd..6655fb2 100644--- a/packages/renderer-kit/src/navigation/context.ts+++ b/packages/renderer-kit/src/navigation/context.ts@@ -74,7 +74,7 @@ export interface NavigationValue {closePage(name: View["name"]): void;consumeChatFocus(focus: MessageFocus): void;settingsOverlay: SettingsOverlay | undefined;- /** "passwords" is the pre-D130 page name, kept so older links land on the merged section. */+ /** "passwords" is the older page name, kept so older links land on the merged section. */openSettings(section: SettingsSectionId | "passwords", target?: SettingsTarget): void;dialog: ShellDialog | undefined;/** `update` sees the open dialog, so a repeated request can keep its draft. */diff --git a/packages/skills/src/brain/service/skill-compatibility.ts b/packages/skills/src/brain/service/skill-compatibility.tsindex 88a7ab1..ef2c029 100644--- a/packages/skills/src/brain/service/skill-compatibility.ts+++ b/packages/skills/src/brain/service/skill-compatibility.ts@@ -9,9 +9,9 @@ export interface SkillCompatibilityInput {/** Keys of the original frontmatter, including extensions with list/map values. */frontmatter: Readonly<Record<string, unknown>>;body: string;- /** F14: values written in `allowed-tools`; names only, anything else is dropped. */+ /** Values written in `allowed-tools`; names only, anything else is dropped. */allowedTools?: readonly string[];- /** F14: text of documents SKILL.md points at (references/*.md), scanned like the body. */+ /** Text of documents SKILL.md points at (references/*.md), scanned like the body. */documents?: readonly string[];files: readonly { path: string }[];filesUnavailable?: boolean;@@ -46,7 +46,7 @@ const SYSTEM_DIRECTORIES = new Set([]);/** A tool name is only a tool when it is written as one; see `usesTool`. */const TOOL_VALUE = /^[A-Za-z][A-Za-z0-9_.:-]{0,63}$/;-/** F14: words that make a subagent mention a suggestion; the skill still works without it. */+/** Words that make a subagent mention a suggestion; the skill still works without it. */const OPTIONAL =/\boptional(?:ly)?\b|\bif\s+available\b|\bnice\s+to\s+have\b|\brecommended\b|\bpreferred\b|\bbonus\b|可选|可选地|如果需要|有的话|更好/i;const RUNTIMES = [@@ -74,7 +74,7 @@ export function skillCompatibility(input: SkillCompatibilityInput): SkillCompatielse add("partial", "ignored_field", { field });}for (const [tool, replacement] of Object.entries(SKILL_TOOL_MAPPING)) {- // Listing a tool in allowed-tools is the skill saying it uses it; prose is not (F14).+ // Listing a tool in allowed-tools is the skill saying it uses it; prose is not.if ((input.allowedTools ?? []).includes(tool) || usesTool(input.body, tool))add("notice", "tool_mapping", { tool: tool as keyof typeof SKILL_TOOL_MAPPING, replacement });}@@ -109,7 +109,7 @@ export function skillCompatibility(input: SkillCompatibilityInput): SkillCompati}/**- * F14: prose like "Read this file" or "Edit the deck" is an English verb, not a tool dependency.+ * Prose like "Read this file" or "Edit the deck" is an English verb, not a tool dependency.* Only a name written as one counts: in a code span (`Read`, `Read(...)`) or named as a tool* ("Read tool", "Read 工具").*/@@ -120,7 +120,7 @@ function usesTool(text: string, tool: string) {);}-/** F14: values written in `allowed-tools`, kept only when they look like a tool name. */+/** Values written in `allowed-tools`, kept only when they look like a tool name. */export function allowedToolValues(value: unknown): string[] {// A skill without allowed-tools must not show the literal string "undefined" as a tool.if (value === undefined || value === null || typeof value === "object") return [];@@ -131,7 +131,7 @@ export function allowedToolValues(value: unknown): string[] {return [...new Set(names)].slice(0, 32);}-/** F14: 「有 subagent 更好」 is an option, not a requirement; only an instruction to use one is.+/** 「有 subagent 更好」 is an option, not a requirement; only an instruction to use one is.* A bare mention used to be reported as unavailable, which warned people off skills that work. */function wantsSubagent(text: string) {for (const match of text.matchAll(diff --git a/packages/skills/src/brain/service/skill-import.ts b/packages/skills/src/brain/service/skill-import.tsindex 62b7a7e..6157e3b 100644--- a/packages/skills/src/brain/service/skill-import.ts+++ b/packages/skills/src/brain/service/skill-import.ts@@ -33,7 +33,7 @@ import {import type { SkillService } from "./skill-service.ts";const TEXT = new Set([".md", ".markdown", ".txt"]);-/** F14: only documents SKILL.md itself points at, bounded so a preview stays cheap. */+/** Only documents SKILL.md itself points at, bounded so a preview stays cheap. */const MAX_DOCUMENTS = 8;const MAX_DOCUMENT_BYTES = 256 * 1024;const PREVIEW_MS = 10 * 60 * 1000;@@ -94,7 +94,7 @@ export async function readImportSource(return { document, kind, name: basename(path), pack, sourceFields };}/**- * F14: a skill's own commands often live in the documents SKILL.md points at, so the report reads+ * A skill's own commands often live in the documents SKILL.md points at, so the report reads* those too — but only the files the body names, capped, so a preview never reads the whole pack.*/async function referencedDocuments(@@ -202,7 +202,7 @@ export class SkillImports {work.dispose();}deadline.throwIfAborted();- // F14: values stay names only; prose in that list never reaches the report.+ // Values stay names only; prose in that list never reaches the report.const allowedTools = allowedToolValues(parseSkillFile(source.pack.skillText).fields["allowed-tools"],);diff --git a/packages/skills/src/brain/service/skill-service.ts b/packages/skills/src/brain/service/skill-service.tsindex ace136c..7f1c7e4 100644--- a/packages/skills/src/brain/service/skill-service.ts+++ b/packages/skills/src/brain/service/skill-service.ts@@ -117,7 +117,7 @@ export type SkillChange =| "builtin_kept";const invalid = (message: string) => new RpcError(-32602, message);-/** F14: the detail report reads only documents SKILL.md names, bounded like the import preview. */+/** The detail report reads only documents SKILL.md names, bounded like the import preview. */const MAX_DOCUMENTS = 8;const MAX_DOCUMENT_BYTES = 256 * 1024;@@ -425,7 +425,7 @@ export class SkillService {};}/**- * F14: a skill's commands often live in the documents SKILL.md points at. Only the files the body+ * A skill's commands often live in the documents SKILL.md points at. Only the files the body* names are read, and a read failure only makes the advisory report poorer.*/private async referencedDocuments(diff --git a/packages/storage/src/bots/memory-undo.ts b/packages/storage/src/bots/memory-undo.tsindex 65d326e..0e40c3d 100644--- a/packages/storage/src/bots/memory-undo.ts+++ b/packages/storage/src/bots/memory-undo.ts@@ -2,7 +2,7 @@ import type { DatabaseSync } from "node:sqlite";import { IdSchema, type MemoryOwner, MemorySchema } from "@pibot/protocol-base";import { z } from "zod";-// Only persisted pre-D63 snapshots may omit category; protocol results require it.+// Only persisted older snapshots may omit category; protocol results require it.const legacyMemory = MemorySchema.extend({ category: MemorySchema.shape.category.default(null) });const snapshot = z.strictObject({before: legacyMemory.nullable(),diff --git a/packages/storage/src/conversations/topic-folders.ts b/packages/storage/src/conversations/topic-folders.tsindex f0a411c..96a810c 100644--- a/packages/storage/src/conversations/topic-folders.ts+++ b/packages/storage/src/conversations/topic-folders.ts@@ -6,7 +6,7 @@ export const homeSelection: FolderSelection = { primary: "home", readonly: [] };/*** A DM topic's folders. The primary stays in `conversations.workplace_folder_id`- * (`NULL`, the pre-D119 "follow the Bot", now reads as `home`). Additional associations live in+ * (`NULL`, the older "follow the Bot", now reads as `home`). Additional associations live in* `topic_folders`; only explicit writable markers grant writes, so old references stay read-only.* Changes bump `workplace_revision`, invalidating run and approval snapshots.*/diff --git a/packages/storage/src/conversations/topics.ts b/packages/storage/src/conversations/topics.tsindex 9975f3e..ac5586b 100644--- a/packages/storage/src/conversations/topics.ts+++ b/packages/storage/src/conversations/topics.ts@@ -134,7 +134,7 @@ export class TopicsRepo {});}- /** Sets the primary folder and keeps the other references (`null`, pre-D119 "inherit", is `home`). */+ /** Sets the primary folder and keeps the other references (`null`, older "inherit", is `home`). */setWorkplace(botId: string, topicId: string, folderId: string | null) {return transaction(this.db, () => {const current = new TopicFoldersRepo(this.db).selection(topicId);