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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pi Monorepo

[Pi](https://github.com/badlogic/pi-mono) is a minimal terminal coding agent. It ships four tools, four execution modes, and a philosophy: adapt Pi to your workflows, not the other way around. Users extend it with TypeScript extensions, skills, prompt templates, and shareable packages.
[Pi](https://github.com/earendil-works/pi) is a minimal terminal coding agent. It ships four tools, four execution modes, and a philosophy: adapt Pi to your workflows, not the other way around. Users extend it with TypeScript extensions, skills, prompt templates, and shareable packages.

This repo builds the pieces that extend Pi and teach other coding agents about it.

Expand All @@ -10,6 +10,8 @@ This repo builds the pieces that extend Pi and teach other coding agents about i

**[`packages/pi-web-search`](packages/pi-web-search/)** -- An extension that adds `web_search` and `web_fetch` tools. Three search backends (Brave, Tavily, Exa) behind a single interface with automatic provider ranking and fallback. Page fetching via Jina Reader.

**[`packages/pi-memory`](packages/pi-memory/)** -- An extension that adds explicit, Markdown-backed durable memory with global and project scopes.

**[`packages/skill-pi`](packages/skill-pi/)** -- The `pi` skill packaged for `npm`, so `pi install` can fetch it from the registry.

## Install
Expand All @@ -21,6 +23,9 @@ pi install npm:@counterposition/skill-pi

# the web search extension
pi install npm:@counterposition/pi-web-search

# the memory extension
pi install npm:@counterposition/pi-memory
```

---
Expand Down Expand Up @@ -58,6 +63,7 @@ pnpm --filter @counterposition/pi-web-search exec vitest run tests/providers.tes
skills/pi/ canonical skill source (loaded by Pi and Agent Skills)
packages/skill-pi/ npm package wrapping the pi skill
packages/pi-web-search/ web search extension (TypeScript, vitest tests)
packages/pi-memory/ durable Markdown memory extension
scripts/ validators and sync utilities
docs/ architecture, ADRs, contributor guides
.pi/settings.json project-local Pi config
Expand Down
1 change: 1 addition & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ This repository separates canonical skill authoring from publishable Pi packages
- `skills/pi` - canonical Pi skill.
- `packages/skill-pi` - single-skill npm distribution for `pi install` and local package smoke tests.
- `packages/pi-web-search` - web search extension package and local package smoke-test target.
- `packages/pi-memory` - durable memory extension package and local package smoke-test target.
1 change: 1 addition & 0 deletions docs/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ npm is the primary registry for Pi-installable packages in this repo.

- `@counterposition/skill-pi` ships the `pi` skill for `pi install npm:@counterposition/skill-pi`.
- `@counterposition/pi-web-search` ships the web search extension for `pi install npm:@counterposition/pi-web-search`.
- `@counterposition/pi-memory` ships the durable memory extension for `pi install npm:@counterposition/pi-memory`.

All publishable packages must include:

Expand Down
15 changes: 15 additions & 0 deletions packages/pi-memory/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

## 0.2.0

### Minor Changes

- Update Pi peer dependencies and extension imports to the official
`@earendil-works/*` package scope for Pi 0.74.
- Treat `typebox` as a Pi-provided peer dependency for extension schemas.

## 0.1.0

### Minor Changes

- Initial durable Markdown-backed memory package for Pi.
2 changes: 1 addition & 1 deletion packages/pi-memory/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pi Memory

`@counterposition/pi-memory` is a
[Pi](https://github.com/badlogic/pi-coding-agent) extension that gives the
[Pi](https://github.com/earendil-works/pi) extension that gives the
agent a durable, human-readable memory store on disk.

V1 ships a private Markdown-backed store under Pi's resolved agent directory,
Expand Down
6 changes: 3 additions & 3 deletions packages/pi-memory/docs/pi-073-integration-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ the prompt-injection bug pass typecheck.

Next steps:

- Prefer typechecking against the real `@mariozechner/pi-coding-agent@0.73.x`
- Prefer typechecking against the real `@earendil-works/pi-coding-agent@0.74.x`
declarations in dev/test.
- If an ambient shim remains necessary, narrow it to the exact current
event/result shapes used by this package.
- Update imports toward the documented `typebox` package for schemas while
keeping `StringEnum` from `@mariozechner/pi-ai`.
keeping `StringEnum` from `@earendil-works/pi-ai`.
- Add type-level coverage for `BeforeAgentStartEventResult` so return-vs-mutate
mistakes are harder to reintroduce.

Expand Down Expand Up @@ -109,7 +109,7 @@ Next steps:

The v1 design doc says `/dream` is blocked because extensions lack a supported
LLM-call path. That is no longer strictly accurate: current Pi examples show
extension-launched model calls through `@mariozechner/pi-ai` and
extension-launched model calls through `@earendil-works/pi-ai` and
`ctx.modelRegistry`.

Next steps:
Expand Down
4 changes: 2 additions & 2 deletions packages/pi-memory/docs/v1-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ normal conversation and performs bounded memory hygiene. It is **deferred past
v1** for product-risk reasons: it can create or rewrite durable memory without
the user watching each change, and mistakes would be harder to notice than
ordinary tool output. Current Pi examples show extension-launched model work is
technically possible through `@mariozechner/pi-ai` plus
technically possible through `@earendil-works/pi-ai` plus
`ctx.modelRegistry.getApiKeyAndHeaders()`, so the blocker is not impossibility.

V1 still rejects `/dream` because maintenance needs a stricter contract than
Expand Down Expand Up @@ -1157,7 +1157,7 @@ model-backed maintenance or new durable writes to either lifecycle event.
managed write path's validation, symlink checks, secret filtering, and atomic
temp-file-and-rename behavior.
- Schema definitions should import `Type` from the TypeBox 1.x `typebox`
package while continuing to use `StringEnum` from `@mariozechner/pi-ai`.
package while continuing to use `StringEnum` from `@earendil-works/pi-ai`.

## Prompt Behavior

Expand Down
6 changes: 3 additions & 3 deletions packages/pi-memory/extensions/memory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CustomMessageComponent } from "@mariozechner/pi-coding-agent";
import { StringEnum } from "@earendil-works/pi-ai";
import { CustomMessageComponent } from "@earendil-works/pi-coding-agent";
import type {
BeforeAgentStartEvent,
BeforeAgentStartEventResult,
Expand All @@ -7,8 +8,7 @@ import type {
MessageRenderer,
ToolCallEvent,
ToolCallEventResult,
} from "@mariozechner/pi-coding-agent";
import { StringEnum } from "@mariozechner/pi-ai";
} from "@earendil-works/pi-coding-agent";
import { Type } from "typebox";

import {
Expand Down
15 changes: 7 additions & 8 deletions packages/pi-memory/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@counterposition/pi-memory",
"version": "0.1.0",
"version": "0.2.0",
"description": "Durable Markdown-backed memory for Pi",
"keywords": [
"memory",
Expand Down Expand Up @@ -43,22 +43,21 @@
"check": "pnpm run lint && pnpm run format:check && pnpm run typecheck && pnpm run test",
"pack:check": "pnpm pack --pack-destination ../../.pack"
},
"dependencies": {
"typebox": "^1.1.24"
},
"devDependencies": {
"@mariozechner/pi-ai": "^0.73.0",
"@mariozechner/pi-coding-agent": "^0.73.0",
"@earendil-works/pi-ai": "^0.74.0",
"@earendil-works/pi-coding-agent": "^0.74.0",
"@types/node": "^25.5.0",
"markdownlint-cli2": "^0.18.1",
"oxfmt": "^0.42.0",
"oxlint": "^1.57.0",
"typebox": "^1.1.38",
"typescript": "^6.0.2",
"vitest": "^4.1.2"
},
"peerDependencies": {
"@mariozechner/pi-ai": "^0.73.0",
"@mariozechner/pi-coding-agent": "^0.73.0"
"@earendil-works/pi-ai": "*",
"@earendil-works/pi-coding-agent": "*",
"typebox": "*"
},
"engines": {
"node": ">=24"
Expand Down
2 changes: 1 addition & 1 deletion packages/pi-memory/src/write-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { randomBytes } from "node:crypto";
import fs from "node:fs/promises";
import path from "node:path";

import { withFileMutationQueue } from "@mariozechner/pi-coding-agent";
import { withFileMutationQueue } from "@earendil-works/pi-coding-agent";

import { ensureMemoryRoots, pathIsInside } from "./storage.js";
import { formatIsoDate, parseMemoryFileSource } from "./parser.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/pi-memory/tests/pi-types.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {
BeforeAgentStartEvent,
BeforeAgentStartEventResult,
ExtensionHandler,
} from "@mariozechner/pi-coding-agent";
} from "@earendil-works/pi-coding-agent";
import { describe, expect, it } from "vitest";

describe("Pi API type coverage", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/pi-memory/tests/write-path.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const mutationQueue = vi.hoisted(() => {
};
});

vi.mock("@mariozechner/pi-coding-agent", () => ({
vi.mock("@earendil-works/pi-coding-agent", () => ({
withFileMutationQueue: mutationQueue.withFileMutationQueue,
}));

Expand Down
Loading