@agimon-ai/po 0.0.0-alpha.161 → 0.0.0-alpha.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,764 +1,73 @@
1
1
  # Po
2
2
 
3
- **An agent harness that loads only the skills and tools you name.**
3
+ Po is a configurable agent runtime built on [Pi](https://github.com/earendil-works/pi). This package owns the `po` launcher and the client-neutral `po-server`. Selected packages supply tools, guidance, workflows, and interfaces; they are not all loaded into every session.
4
4
 
5
- > It begins with one useful MCP server. Then another. Soon the agent fixing a heading
6
- > wakes up with database tools, browser controls, and their small novel of schemas. This
7
- > is our config.
5
+ Po is alpha software. Configuration and package boundaries may change between releases. Node.js 24 or newer is required.
8
6
 
9
- Po is an opinionated, composable agent harness built on
10
- [Pi](https://github.com/earendil-works/pi). It is tailored for people whose agent has one MCP
11
- server too many. It turns extensions, skills, MCP servers, and system prompts into explicit
12
- session configuration instead of background noise.
13
-
14
- ![Po panda, an agent harness that loads only the skills and tools you name](https://cdn.jsdelivr.net/npm/@agimon-ai/po@latest/assets/banner.png)
15
-
16
- Plugin systems scope what an agent knows. They do less to scope which configured plugins and MCP
17
- servers a particular session can load. Claude Code's `enableAllProjectMcpServers` and static
18
- denylist are repository-wide. Po draws that loading boundary around the session. Pick a major
19
- mode and some domains; add a profile if you want one. Four YAML files decide what loads;
20
- `po --explain` tells you what got in, why, and what it costs before launch.
21
-
22
- It borrows its shape from [Po Emacs Core](https://github.com/poemacs/core): quick to
23
- start, close to Pi, opinionated where defaults help, and easy to pull apart when they do
24
- not. Use it as-is, build your own config on top, or raid it for parts.
25
-
26
- ## Contents
27
-
28
- [Install](#install) · [Try Po](#try-po-without-replacing-your-pi-setup) ·
29
- [Philosophy](#philosophy) · [What this buys you](#what-this-buys-you) · [Features](#features) ·
30
- [Configuration](#configuration) · [Trust and data boundaries](#trust-and-data-boundaries) ·
31
- [CLI reference](#cli-reference) · [Troubleshooting](#troubleshooting-and-direct-use) ·
32
- [Architecture](#architecture) · [Development](#development)
33
-
34
- ## Install
7
+ ## Install and start
35
8
 
36
9
  ```bash
37
10
  npm install -g @agimon-ai/po @agimon-ai/po-web
11
+ po init
12
+ po sync
13
+ po
38
14
  ```
39
15
 
40
- The package owns the CLI and the [`po-server` executable and server API](docs/server/index.md) used
41
- by the web and desktop clients. Bare `po` starts the `po-web` console from `@agimon-ai/po-web`, which
42
- depends on `po`, so `po` finds it at run time and prints install guidance when it is missing.
43
-
44
- The root package contains the fixed host foundation only. Feature packages are selected by
45
- `.po/modes.yaml` and installed into the consumer repository when they are first needed.
46
-
47
- ## Status and requirements
48
-
49
- Po is alpha software. Configuration and package boundaries may still change between alpha
50
- releases.
16
+ `po init` seeds personal configuration under `~/.po`, preserving existing files unless `--force` is used. `po sync` installs configured packages and prepares shared browser/native and MCP artifacts. Bare `po` starts Po Web, which supervises a headless child; it prints installation guidance if the presentation package is missing.
51
17
 
52
- - Node.js 24 or newer
53
- - Release targets: macOS arm64, Linux x64, and Linux arm64
54
- - Pi 1.0.0 for packages that declare it as a peer requirement
18
+ For direct server clients, use [`po-server`](docs/server/index.md) with a private token file. The executable is part of this package, not an extension to add to `modes.yaml`.
55
19
 
56
- ## Pi 1.0 sessions and Codex Fast
20
+ ## Choose what a session loads
57
21
 
58
- Headless sessions use fresh `durable-v1` storage. Earlier headless sessions cannot be resumed or
59
- converted. Their files remain untouched, without migration or backups.
22
+ Personal defaults live under `~/.po`; repository overrides live under `<repository>/.po`:
60
23
 
61
- Use `/fast on|off` in CLI or server sessions, or the **Fast** switch in the web model picker.
62
- Fast requests Codex priority service, which may increase cost, independently of thinking effort.
63
- Fresh top-level sessions default to off. New subagents and child sessions inherit the parent's
64
- current setting, then persist their own setting across resumes. Other providers never receive
65
- Po's priority flag.
24
+ - `config.yaml`: runtime and package settings.
25
+ - `modes.yaml`: default packages, named layers, and major modes.
26
+ - `domains.yaml`: plugin catalogs and subject-specific skills, agents, hooks, and MCP access.
27
+ - `profiles.yaml`: optional persona files and environment defaults.
66
28
 
67
- ## Quick start
29
+ A major mode selects the base package layers. Domains select content and integrations. A profile supplies a point of view. Minor modes expose temporary capabilities where their owning packages provide them. These choices are replaceable; they are not security isolation.
68
30
 
69
- ```bash
70
- po init # seed ~/.po
71
- po sync # install configured packages and ensure the global builds
72
- po # start po-web and po-server, then open the printed URL
73
- ```
74
-
75
- `po init` creates `config.yaml`, `modes.yaml`, `domains.yaml`, and `profiles.yaml` under
76
- `~/.po`. It preserves existing files unless you pass `--force`, and it removes the Po entries
77
- and theme that earlier versions wrote to Pi user settings.
78
-
79
- `po sync` installs the packages every declared layer names, so switching modes does not depend on the
80
- root package's dependency closure. It then ensures the one global web build and the MCP app build exist.
81
- It does not change either normal Pi settings file.
82
-
83
- ### No generated per-repository state
31
+ Repository entries replace same-named personal definitions. Relative paths resolve from the declaring root. Keep package-specific settings under their owning package, and pin remote Git/npm plugin sources when reproducibility matters.
84
32
 
85
- Po writes nothing per repository or worktree. po-server composes every session live from configuration
86
- and installed packages, importing each package's built `dist` directly, so a rebuilt or added package
87
- reaches the next session without a sync or a restart. The cockpit web build is shared: it lives under
88
- `~/.po/build/web/<key>`, where the key covers every web plugin package the host root and the
89
- admitted workspaces use, so two repositories with the same plugins share one build.
90
-
91
- Export the HTTP and socket contracts with `po api-export --out ./api-schema --strict`. It reads each
92
- installed server package's built contract. See [API export](docs/server/api-export.md) for artifact
93
- formats, CI checks, and package declarations.
94
-
95
- Run `po sync --check` to report missing packages or a missing global web build without writing anything.
96
- Inside a repository, `po sync` installs for that repository. Outside every repository, it installs for the
97
- host configuration in `~/.po`.
98
-
99
- Bare `po` passes every argument to `po-web`. Use `--explain` to resolve a selection without
100
- starting a session:
33
+ Inspect a selection before starting a model:
101
34
 
102
35
  ```bash
103
36
  po --major-mode copilot --no-domains --explain
104
- po --major-mode minimal --no-domains --explain
105
- ```
106
-
107
- ## Philosophy
108
-
109
- An agent does not need every tool for every job. Po separates the base session from
110
- the things you switch on for a while: modes choose behavior, domains choose subject
111
- matter, and profiles choose a point of view.
112
-
113
- ### Major and minor modes
114
-
115
- A major mode is the base config. It names the extension layers for development, marketing,
116
- or whatever else you do. Define as many as you like; only one is active at a time. Synchronized
117
- sessions can reload compatible changes; launcher-owned composition changes require a relaunch.
118
-
119
- Minor modes are batteries-included switches inside that base. They start off, stack freely,
120
- and keep their model tools and skills out of context until turned on. Po ships six:
121
-
122
- - **Help mode:** expose package-owned guidance only while you need it.
123
- - **Plan mode:** remove Pi's file-editing tools while you agree on an approach.
124
- - **Calendar layer:** schedule durable prompts, workflows and plugin actions while the server is up.
125
- - **Goal mode:** keep one objective in view until it is done or dismissed.
126
- - **Voice mode:** replace typing with local speech.
127
-
128
- ### Domains
129
-
130
- A domain is a named group of agent plugins. It carries the skills and MCP servers for one
131
- kind of work, and `/domains` switches it while the session is running.
132
-
133
- Plugins are cataloged once and domains refer to their names. A configured root may be a
134
- Codex-compatible marketplace or a folder whose direct children are plugins, so a repository
135
- with many plugins does not need one entry per directory:
136
-
137
- ```yaml
138
- plugins:
139
- roots: [plugins]
140
- entries:
141
- remote-review:
142
- source: url
143
- url: '<REVIEW_PLUGIN_GIT_URL>'
144
- ref: v1.2.0
145
-
146
- domains:
147
- development:
148
- description: Implementation and code-review tools.
149
- plugins: [pi-development, remote-review]
150
- ```
151
-
152
- Po also checks personal and repository Codex marketplace layouts. Marketplace IDs use
153
- `plugin@marketplace`. Remote Git and npm sources are downloaded once into the persistent
154
- `~/.po/plugin-cache` directory. Cache entries are reused until their source descriptor
155
- changes; use a Git SHA or exact npm version for reproducible installs. Home and repository
156
- catalogs merge, and repository names replace matching home names.
157
-
158
- A blog is not one task. Research it, draft it, make the assets, then review it. Turn on the
159
- `visual` domain while making assets; the other three steps have no reason to carry it.
160
-
161
- ### Profile
162
-
163
- An LLM has no house style until you give it one. A profile can supply a narrative, brand
164
- rules, or a different voice. It is optional; no profile is a perfectly good profile.
165
-
166
- Profile roots remove the need to list every persona folder. A root may itself contain the
167
- persona files, or its direct-child folders become profiles named after those folders. Po
168
- recognizes `profile.md`, `SOUL.md`, and `AGENTS.md` and never searches deeper directories.
169
-
170
- ```yaml
171
- profiles:
172
- roots: [agents/acme]
173
- entries:
174
- editor:
175
- persona: agents/special/editor
176
- env:
177
- EDITOR_MODE: strict
178
- ```
179
-
180
- Roots from the home and repository files accumulate relative to their declaring config.
181
- Repository discoveries replace same-named home discoveries. Explicit entries override
182
- discovery and can add string environment defaults; repository entries replace matching home
183
- entries. Select one at launch with `--profile editor` or switch with `/profile`.
184
-
185
- ## What this buys you
186
-
187
- Every tool schema and skill name competes for the same context. Loading less has two
188
- immediate effects:
189
-
190
- 1. You spend fewer tokens before the work begins.
191
- 2. The model has fewer plausible-but-wrong tools and skills to choose from.
192
-
193
- The savings get larger when each workflow job starts with its own config instead of
194
- inheriting the last job's toolbox.
195
-
196
- ### Copilot
197
-
198
- Po's web console exposes package-owned tools, commands, settings, and panels.
199
- Po no longer ships terminal leader menus, shortcuts, overlays, or widgets.
200
-
201
- When the keyboard is the wrong tool, autonomous Voice mode keeps the conversation going.
202
- You can talk to the agent while doing the chores instead of carrying a laptop around the
203
- house, and the primary agent can speak its own opening, milestone, and final updates.
204
-
205
- ### Autopilot
206
-
207
- Copilot helps while you are present. Calendar and Workflow keep work moving when you are not.
208
- Together they can dispatch structured jobs from one live session.
209
-
210
- #### Workflows
211
-
212
- Po's native Workflow runtime starts each step as a configured child session.
213
- Jobs select their major mode, domains, and system prompt through `runConfig`.
214
- The tracked examples below contain complete definitions.
215
-
216
- #### Native plugin and workflow examples
217
-
218
- This source repository includes a complete, deliberately small example stack:
219
-
220
- ```text
221
- plugins/
222
- development/ implementation skill and developer agent
223
- testing/ testing and review skills, tester and reviewer agents
224
- blog-writing/ research, outline, drafting, and editorial skills and agents
225
- automations/workflows/
226
- dev-feature.workflow.yml
227
- dev-fix.workflow.yml
228
- blog-writing.workflow.yml
229
- ```
230
-
231
- Each plugin has both `.codex-plugin/plugin.json` and `.claude-plugin/plugin.json`, while its
232
- `skills/` and `agents/` content is shared. `.po/domains.yaml` exposes the `development`,
233
- `testing`, and `blog` domains plus the `engineering` alias. `.po/modes.yaml` mirrors the
234
- standalone package set with workspace-local paths, keeps its canonical modes, and adds an
235
- `examples` base mode with the `workflow` layer for the tracked workflows. Inspect the exact session before launch:
236
-
237
- ```bash
238
- po --major-mode examples --domains engineering --explain
239
- po --major-mode examples --domains blog --explain
240
- ```
241
-
242
- The same bundles can be installed directly through either native marketplace:
243
-
244
- ```bash
245
- # Codex
246
- codex plugin marketplace add .
247
- codex plugin add development@po-examples
248
-
249
- # Claude Code
250
- claude plugin marketplace add ./ --scope user
251
- claude plugin install development@po-examples --scope user
252
- ```
253
-
254
- Substitute `testing` or `blog-writing` to install another bundle. No Po-specific plugin
255
- schema is involved.
256
-
257
- List and dry-run the tracked workflows before spending a model call:
258
-
259
- ```bash
260
- pnpm exec workflow-mcp list-workflows automations/workflows
261
- pnpm exec workflow-mcp run-workflow automations/workflows/dev-feature.workflow.yml \
262
- --dry-run --skip-launch --prompt "Add a health check"
263
- pnpm exec workflow-mcp run-workflow automations/workflows/blog-writing.workflow.yml \
264
- --dry-run --skip-launch --prompt "Write a practical guide to scoped agent tooling"
265
- ```
266
-
267
- Real runs delegate to tmux by default and accept `WORKFLOW_LAUNCHER=cmux`. Development runs do
268
- not create branches, commits, or pushes. Blog runs leave review-ready Markdown, sources, and a
269
- publication checklist in the workflow run directory without writing into a site or calling a CMS.
270
- These examples live in the source repository and are not part of the published npm tarball.
271
-
272
- #### Calendar
273
-
274
- Workflow definitions are exposed like skills, so the agent can choose one for the job. A
275
- Calendar event can send a subagent to fetch the next task, then dispatch the workflow that matches
276
- it. One session becomes the dispatcher instead of the place every job has to fit.
277
-
278
- ## Features
279
-
280
- Po is a modular agent harness, not one giant extension. Each package owns one job; shared UI,
281
- Cordis services, and session contracts make them behave like one. Use the generated
282
- `default.packages` list together, remove packages you do not want, or replace its entries one
283
- at a time. Selectable packages are not runtime dependencies of the root package or of one another.
284
-
285
- ### Foundation and interface
286
-
287
- #### Configuration and composition
288
-
289
- [`@agimon-ai/po`][pkg-po] is the command-line config compiler and the `po-server` runtime.
290
- `po init` creates the personal config, and bare `po` starts the `po-web` console. Sync resolves every major
291
- mode and domain into native server, web, MCP, and resource contributions.
292
-
293
- #### Supporting packages
294
-
295
- [`@agimon-ai/po-config`][pkg-po-config] resolves the four YAML files and exposes the
296
- configuration API. [`@agimon-ai/po-domain`][pkg-po-domain] owns domain selection, plugin
297
- materialization, resource staging, and MCP scoping.
298
- [`@agimon-ai/po-core`][pkg-po-core] contains the shared
299
- Cordis service and event contracts used by extension authors.
300
- [`@agimon-ai/po-hashline`][pkg-po-hashline] provides the shared snapshot tags and line-anchor
301
- protocol. [`@agimon-ai/po-read`][pkg-po-read] and [`@agimon-ai/po-grep`][pkg-po-grep]
302
- produce editable anchors for writable files while preserving native output for non-writable files.
303
- [`@agimon-ai/po-edit`][pkg-po-edit] replaces Pi's search-and-replace `edit` tool with
304
- stale-safe ranges anchored to the file content the model read or searched.
305
- [`@agimon-ai/po-file-edit`][pkg-po-file-edit] keeps the edit timeline and file snapshots.
306
- The fixed `@agimon-ai/po-artifact` package gives each session a durable artifact folder,
307
- names it in the system prompt, and shows recent artifacts in web and native Activity.
308
- The Artifacts heading opens all files in that session's folder as a grid.
309
- [`@agimon-ai/po-log`][pkg-po-log] collects session events, while
310
- `@agimon-ai/po-core/telemetry` is the library-level telemetry adapter. Po Log's `logsink` code-mode namespace reads session evidence and explicitly selected cross-session history.
311
-
312
- Runner selects matching RMUX and RTK native artifacts automatically. Do not install them directly.
313
- The packages cover macOS and Linux on arm64 and x64 for both [RMUX][pkg-rmux-darwin-arm64] and
314
- [RTK][pkg-rtk-darwin-arm64].
315
-
316
- #### Shared UI
317
-
318
- [`@agimon-ai/po-ui`][pkg-po-ui] supplies shared web presentation and theme utilities.
319
- Terminal leader bindings and overlays have been retired.
320
-
321
- ### Coordinated work
322
-
323
- #### Agent team
324
-
325
- [`@agimon-ai/po-team`][pkg-po-team] runs named subagents asynchronously. It owns agents,
326
- runs, membership, intercom, and model policy; Task owns the persistent task graph used for
327
- delegation. Agents can work in parallel and message one another through native Team tools.
328
-
329
- #### Tasks
330
-
331
- [`@agimon-ai/po-task`][pkg-po-task] keeps a task graph on disk, not a disposable checklist in the
332
- transcript. Dependencies persist independently of transcript compaction, and work can be handed to
333
- a subagent, including a smaller model when the job does not need the expensive one. Seeded
334
- `minimal` and `copilot` modes select its `task` layer; omit that layer when a major mode
335
- should not expose the task tool.
336
-
337
- #### Runner
338
-
339
- [`@agimon-ai/po-runner`][pkg-po-runner] replaces Pi's blocking `bash` tool with
340
- supervised command execution. `po init` includes Runner in `default.packages`, so every
341
- generated mode gets it. Short commands still return inline; commands that pass the configurable
342
- threshold of 60 seconds by default move into the background with durable logs. Use
343
- `background: true` for an immediate detached run or `interactive: true` when the command needs
344
- terminal input. Runner IDs and complete raw logs remain available to the current session through
345
- the `po-runner` CLI. Runner tries bundled RMUX, then `rmux` on PATH,
346
- then `tmux` on PATH. If no pane backend accepts the run, non-interactive commands use a supervised
347
- subprocess; interactive commands require RMUX or tmux. Conservatively recognized single commands
348
- use the matching RTK stdin filter after completion. Compound commands, pipelines, incompatible
349
- formats, and unsupported commands keep bounded raw output. Remove Runner from `default.packages` to keep Pi's
350
- `bash`, or add it to a named layer when only selected modes should replace `bash`.
351
-
352
- #### Auto-compact
353
-
354
- Ordinary compaction waits for one summary to save an overgrown session.
355
- [`@agimon-ai/po-autocompact`][pkg-po-autocompact] leaves checkpoints instead:
356
-
357
- 1. At 50%, it writes the first compact summary.
358
- 2. Later, it combines that summary with the messages since; the model decides whether the
359
- result is ready to use.
360
- 3. On the third pass, it combines them again and forces compaction.
361
-
362
- The work runs off-thread and can make up to three additional summarization calls. The standard
363
- adapter preserves staged conversation checkpoints; Task and Team keep their own state rather than
364
- being embedded as special snapshots in the compact summary.
365
-
366
- ### Context and access
367
-
368
- #### Help mode
369
-
370
- [`@agimon-ai/po-help`][pkg-po-help] keeps package guidance out of the default prompt. A
371
- fresh parent session performs no Help retrieval and exposes no Help skills. Activate Help with the
372
- native `minor_mode` tool, then deactivate it before the next interaction.
373
- Help names state their intent: authoring
374
- guides use `po-author-*`, while operational guides use `po-use-*`. Core authoring guidance
375
- covers extensions, runtime config, major modes, domains, profiles, hooks, workflows, and skills.
376
- Parent and detached-child sessions both include the Help runtime, while root and axis authoring
377
- guides remain parent-owned and all guidance stays withdrawn until Help mode is activated.
378
-
379
- #### MCP
380
-
381
- [`@agimon-ai/po-mcp`][pkg-po-mcp] is the gate between a session and its servers. It reads
382
- repository and legacy plugin `.mcp.json` plus Agent Plugins v1 `mcp.json`, then exposes only the
383
- servers and proxy upstreams allowed by the selected domains. A domain switch persists an immutable
384
- projection; Config publishes it through the native session Cordis registry and MCP starts a fresh
385
- in-memory `mcp-proxy` container. No Hono server or localhost proxy sits in this path.
386
-
387
- #### Ask user question
388
-
389
- [`@agimon-ai/po-user-feedback`][pkg-po-user-feedback] gives the agent a structured question
390
- that actually waits for an answer. In autonomous Voice mode it skips the modal, narrates the
391
- choices, and accepts the next spoken response as an ordinary user message.
392
-
393
- #### Logging and telemetry
394
-
395
- Po logging records operational metadata such as counters, spans, session IDs, tool names, and
396
- errors. Callers remain responsible for values they attach to telemetry. Native diagnostics expose
397
- current-session metrics, and [`@agimon-ai/po-logsink`][pkg-po-logsink] provides historical lookup
398
- when a sink is configured.
399
-
400
- #### Plan mode
401
-
402
- A promise to "only plan" is not a permission boundary. [`@agimon-ai/po-plan`][pkg-po-plan]
403
- removes `edit` and `write` tools while the agent explores, persists the plan, and hands it back
404
- for approval. It does not sandbox Bash, external tools, or the operating system. Use the native
405
- planning tools and web review surface; terminal planning menus are no longer available.
406
- Turn it on when the approach should be settled before the files move.
407
-
408
- #### Calendar layer
409
-
410
- [`@agimon-ai/po-calendar`][pkg-po-calendar] schedules durable prompts, workflows and plugin actions.
411
- Keep the calendar layer in the home default major mode for the scheduler. Workflow success means launched,
412
- not finished. Plugin-managed events cannot be edited, but pause, resume, run now and cancel remain available.
413
- Busy runs and downtime are skipped, never replayed. Back up before upgrading: older Calendar versions
414
- cannot read events saved with workflow, action or assignment fields.
415
-
416
- #### Goal mode
417
-
418
- [`@agimon-ai/po-goal`][pkg-po-goal] pins one objective to the session until it completes or
419
- you end it. Native goal tools manage the active objective and repository history. Finished goals
420
- stop contributing active instructions and tools but remain in history when you want to restart one.
421
-
422
- #### Workflow layer
423
-
424
- [`@agimon-ai/po-workflow`][pkg-po-workflow] runs GitHub Actions-style job graphs with
425
- dependencies, timeouts, artifacts, and a separate Po session for each step. Native workflow tools
426
- and the web workflow dock expose launch, status, and recovery. It is for work that needs hard job
427
- boundaries and explicit handoffs rather than one long conversation.
428
-
429
- #### Voice mode
430
-
431
- [`@agimon-ai/po-voice`][pkg-po-voice] captures PCM audio through the local platform helper
432
- and can transcribe it locally. Transcript text, session state, and model requests may still cross
433
- process or provider boundaries according to the configured engines. Native `voice` controls manual
434
- dictation, while `voice-auto` controls autonomous capture. The active native session receives the
435
- Voice capabilities and `narrate` tool.
436
-
437
- While `narrate` is available, the primary agent calls it before every user-facing final
438
- response. Final narration contains the complete answer, including every user-relevant
439
- conclusion, question, warning, result, and next action in the written response, rather than
440
- leaving essential information only in text. Short turns need one complete spoken answer;
441
- longer work also gets an opening and meaningful milestone calls. Each ready-to-speak
442
- utterance is limited to 4,096 characters, waits for physical playback, and returns
443
- `completed`, `interrupted`, `superseded`, or `failed`.
444
-
445
- If the agent never attempts `narrate` during a run, active Voice speaks one sanitized
446
- turn-end fallback rather than leaving the final response silent. Finals of at most 320
447
- characters use deterministic speech; longer finals use the configured
448
- `voice.autoCapture.model` for one bounded summary, with deterministic degradation on
449
- failure or timeout. Any `narrate` attempt suppresses this safety net, so it cannot duplicate
450
- or retry direct speech. Voice does not generate automatic intent, plan, milestone, or tool
451
- progress narration. Native workflow and user-feedback narration remain available, and the same
452
- model continues to provide bounded command correction.
453
-
454
- ## Configuration
455
-
456
- Po reads four configuration files:
457
-
458
- - `config.yaml` defines runtime settings such as trust, editor, planning, and voice behavior.
459
- - `modes.yaml` defines default packages, extension layers, and major modes.
460
- - `domains.yaml` catalogs plugins and sets session access.
461
- - `profiles.yaml` supplies persona files and environment defaults.
462
-
463
- Each matrix file has two optional layers: personal defaults in `~/.po/` and repository
464
- overrides in `<repository>/.po/`. Po loads both. Unique named entries from either layer
465
- remain available; a same-named repository entry replaces the complete personal entry. Plugin
466
- and profile roots from both layers are retained. Relative paths in personal config resolve
467
- from `~/.po/`; relative paths in repository config resolve from the repository root.
468
-
469
- ### `modes.yaml`: choose behavior
470
-
471
- A layer is an ordered bundle of extension packages and hook groups. A major mode names the
472
- layers that should run together. The top-level `default.packages` list is the ordered package
473
- baseline for every major mode. `po init` writes the distribution's current
474
- feature packages there so the baseline is visible and replaceable. If `default` is absent,
475
- Po adds no default feature packages. Use `default.packages: []` for an explicit empty
476
- baseline. The fixed host core remains active independently of this setting, and named layers
477
- keep their existing behavior.
478
-
479
- Launch installs missing required packages from the defaults and selected layers. `po sync`
480
- installs missing required packages from the defaults and every declared layer, moves every
481
- package in Po's shared `~/.po/runtime` to its newest published version, then builds the
482
- synchronized matrix. A package whose published version cannot be read, because the machine is
483
- offline or the registry refuses the request, keeps its installed version and is named in the
484
- sync output. `po sync --check` reports missing packages without modifying the repository. Optional packages and local paths are not installed automatically. Removing an
485
- entry stops activating it but leaves Pi's package cache available for later reuse.
486
-
487
- Packages in `default` and named layers may be bare strings, or mappings when the package accepts
488
- configuration:
489
-
490
- ```yaml
491
- default:
492
- packages:
493
- - '@agimon-ai/po-help'
494
- - '@agimon-ai/po-goal'
495
- - '@agimon-ai/po-voice'
496
- - '@agimon-ai/po-runner'
497
- - '@agimon-ai/po-read'
498
- - '@agimon-ai/po-grep'
499
- - '@agimon-ai/po-edit'
500
- - '@agimon-ai/po-file-edit'
501
- - '@agimon-ai/po-scaffold'
502
- - '@agimon-ai/po-autocompact'
503
- - '@agimon-ai/po-plan'
504
- - '@agimon-ai/po-log'
505
- - '@agimon-ai/po-mcp'
506
-
507
- layers:
508
- calendar:
509
- packages:
510
- - '@agimon-ai/po-calendar'
511
- workflow:
512
- packages:
513
- - '@agimon-ai/po-workflow'
514
- team:
515
- packages:
516
- - name: '@agimon-ai/po-team'
517
- config:
518
- models:
519
- - model: provider/model-id
520
- thinking: high
521
- review:
522
- packages:
523
- - '@scope/review-extension'
524
-
525
- defaultMajorMode: copilot
526
- majorMode:
527
- minimal:
528
- description: Lean sessions with delegation and little else.
529
- layers: [team, workflow, calendar]
530
- copilot:
531
- description: General coding with delegation and review tools.
532
- layers: [team, review, workflow, calendar]
533
- ```
534
-
535
- Order matters: Po assembles `default.packages` first, then the selected layers and their
536
- packages from left to right. Put settings under the package that consumes them; a layer is
537
- composition, not a mystery bag of shared configuration. Home and repository `layers` and
538
- `majorMode` records merge by name, with the repository definition winning a collision. If both
539
- sources declare `default`, the repository block replaces the personal block as one whole package
540
- list.
541
-
542
- Workflow is selected through the `workflow` layer, not a minor-mode switch. New seeds
543
- include it in `minimal`, `copilot` and `examples`; remove the layer from a mode to omit it.
544
- Existing `default.packages` entries still work and deduplicate with the layer. No config
545
- migration runs, and persisted `minorModes: [workflow]` has no effect.
546
-
547
- Configurations created before the hashline tools were split may contain only `po-edit`.
548
- Replace that entry with the ordered `po-read`, `po-grep`, and `po-edit` trio. Init
549
- preserves existing configuration unless it is run with `--force`.
550
-
551
- Choose a mode with `--major-mode copilot`, switch it with `/mode`, or change
552
- `defaultMajorMode` when one mode should be the ordinary starting point.
553
-
554
- ### `domains.yaml`: choose content and access
555
-
556
- Plugins are cataloged once, then domains refer to their names. A root can be a marketplace,
557
- a single plugin, or a container whose direct-child folders are plugins. Discovery is
558
- intentionally nonrecursive: a tool buried five directories down should not load by accident.
559
-
560
- ```yaml
561
- defaultDomains: [development]
562
-
563
- plugins:
564
- roots: [plugins]
565
- entries:
566
- remote-review:
567
- source: url
568
- url: '<REVIEW_PLUGIN_GIT_URL>'
569
- ref: v1.2.0
570
- published-research:
571
- source: npm
572
- package: '@acme/research-plugin'
573
- version: 1.4.0
574
-
575
- domains:
576
- development:
577
- description: Repository implementation tools.
578
- plugins: [coding-tools]
579
- review:
580
- description: Focused review skills with a narrow MCP boundary.
581
- plugins:
582
- - name: remote-review
583
- skills: [typescript]
584
- agents: [reviewer]
585
- hooks: false
586
- mcp: true
587
- mcp:
588
- servers: [filesystem]
589
- proxy: [github]
590
-
591
- aliases:
592
- work: [development, review]
593
- ```
594
-
595
- Here, `coding-tools` is discovered from `plugins/coding-tools`; its manifest name, or its
596
- folder name when no manifest name exists, becomes the catalog ID. Local roots and entries
597
- resolve beside the declaring file. Git and npm entries are cached in
598
- `~/.po/plugin-cache`; pin a Git SHA or exact package version when reproducibility
599
- matters. Domains may load an entire plugin or select only its skills, agents, hooks, and MCP
600
- configuration. The optional `mcp` mapping is an allowlist, not a request to start every server
601
- in the repository.
602
-
603
- Select one or more domains with `--domains development,review`, use an alias such as
604
- `--domains work`, or switch them with `/domains`. `--no-domains` is useful when the right
605
- amount of repository context is none.
606
-
607
- ### `profiles.yaml`: choose a point of view
608
-
609
- A profile directory becomes discoverable when it directly contains `profile.md`, `SOUL.md`,
610
- or `AGENTS.md`. A root may be one profile or a container of direct-child profiles. The folder
611
- name becomes the profile name; Po concatenates those three files in that order.
612
-
613
- ```yaml
614
- profiles:
615
- roots: [personas]
616
- entries:
617
- release-writer:
618
- persona: personas/release-writer
619
- env:
620
- BRAND: acme
621
- TONE: concise
622
- ```
623
-
624
- With that config, `personas/release-writer/profile.md` is enough to discover
625
- `release-writer`. The explicit entry is optional; use one when the profile needs another name,
626
- an exact persona path, or string environment defaults. Explicit entries override discovered
627
- folders. Already exported environment values win, so selecting a profile never quietly
628
- replaces a value supplied by the caller.
629
-
630
- Discovery never recurses. Persona paths must remain under `agents/` or a root declared in the
631
- same file, and symlinks may not escape the persona boundary. Legacy profiles written directly
632
- under `profiles` still load, but new configuration should use `roots` and `entries`.
633
-
634
- Select a profile with `--profile release-writer` or switch it with `/profile`. Leaving the
635
- catalog empty is valid; no profile remains a first-class choice.
636
-
637
- ### Check the matrix before launch
638
-
639
- The fastest configuration debugger is the one that does not start a model:
640
-
641
- ```bash
642
- po --major-mode copilot --domains work --profile release-writer --explain
643
- po sync
644
37
  po sync --check
645
38
  ```
646
39
 
647
- `--explain` prints the resolved mode, domains, profile, plugins, skills, agents, MCP boundary,
648
- and estimated prompt cost. `po sync` resolves the repository configuration and publishes
649
- synchronized state. `po sync --check` turns drift into a
650
- non-zero exit code for CI. If the explanation is surprising, fix the YAML before paying a model
651
- to be surprised with you.
40
+ `--explain` can inspect MCP servers and execute their configured startup commands. Add `--no-mcp` when that inspection is unwanted. `sync --check` is read-only and reports missing packages or shared builds; it does not prove runtime behavior or API compatibility.
652
41
 
653
- ## Trust and data boundaries
42
+ See [Getting started](https://github.com/AgiFlow/po/blob/main/docs/getting-started.md) and [Architecture](https://github.com/AgiFlow/po/blob/main/docs/architecture.md#configuration) for configuration and extension ownership. Activate Help in a session for installed package guidance.
654
43
 
655
- Po executes the extensions, remote Git/npm plugins, hooks, MCP stdio commands, workflows, and
656
- shell commands you configure. Treat them as trusted executable code. Runner commands inherit the
657
- process environment and operating-system privileges; their logs may contain command output and
658
- secrets. MCP credentials may live in the system keyring or private configuration files.
44
+ ## Builds, updates, and recovery
659
45
 
660
- Voice can keep PCM capture and transcription local when local engines are selected, but transcript
661
- text and model requests follow the configured providers. Calendar, Workflow, Plan, Autocompact, Team,
662
- and autonomous Voice can make additional model calls. Telemetry is disabled or redirected through
663
- its owning package's controls; values supplied by callers are not automatically scrubbed.
46
+ Synchronization owns package installation and shared build production. The server can request background synchronization, but scope admission itself reads prepared packages and artifacts. With automatic sync disabled or unsuccessful, inspect notices and run `po sync` rather than assuming a missing feature loaded.
664
47
 
665
- ## CLI reference
48
+ Built server entries are imported through content-addressed URLs. New sessions can use a new build; running sessions retain their loaded code unless an explicit supported reload replaces it. Host/workspace refresh and session selection changes have separate lifetimes. Browser reconnect is not a server reload.
666
49
 
667
- | Command or option | What it does |
668
- | ------------------------------ | ---------------------------------------------------------------------------------- |
669
- | `po` | Starts the `po-web` console and its headless `po-server`; arguments go to po-web |
670
- | `po init` | Seeds personal config and removes Po entries earlier versions wrote to Pi settings |
671
- | `po sync` | Publishes the current repository, or the host composition outside repositories |
672
- | `po sync --check` | Exits non-zero when the applicable registered generation is missing or stale |
673
- | `po-runner` | Inspects and controls supervised Runner processes and logs |
674
- | `--explain` | Prints the resolved matrix and estimated prompt cost without launching Pi |
675
- | `--emit-mcp <dir>`, `--no-mcp` | Writes the resolved MCP config or disables MCP for one run |
676
- | `--` and remaining arguments | Forwards provider or Pi arguments unchanged where the selected command allows it |
50
+ Headless history uses pi-durable SQLite storage. Earlier pre-durable headless sessions cannot be resumed or converted by this runtime; their files are left untouched. Back up important state before an upgrade. Deleting a session is not a promise to delete files it wrote into a workspace.
677
51
 
678
- ## Troubleshooting and direct use
52
+ Runner chooses matching native artifacts; do not install RMUX or RTK payload packages directly. Non-interactive commands can use a supervised subprocess when no pane backend works; interactive commands require a supported pane backend. Inspect runner status and complete logs before retrying a command that may already have changed state.
679
53
 
680
- - Run `po sync --check` to detect drift or missing configured packages, and `po sync`
681
- to install them and rebuild synchronized state.
682
- - If neither RMUX nor tmux is available, non-interactive Runner calls report the supervised subprocess
683
- fallback. Interactive calls require RMUX or tmux. Linux native artifacts require a compatible loader and libc.
684
- - Po-owned packages expose native server, web, and MCP contributions, not Pi entry points. Install
685
- them with `npm install` or select them in `modes.yaml`. Third-party Pi settings packages still load
686
- through the upstream SDK extension host, including provider registration before model selection.
687
- - Terminal leader menus, shortcuts, overlays, and widgets are no longer shipped. Native commands,
688
- tools, and web panels remain where the owning package provides them. RMUX and RTK artifacts are
689
- selected by Runner and should not be installed directly.
690
- - The root `po-runner` command delegates to Runner from the active repository and asks you to add
691
- Runner to `modes.yaml` when it is absent. The distribution remains the supported way to get the
692
- coordinated defaults.
693
- - The Ollama preset and launcher `--mute` and `--auto-stop` flags are retired. They do not have
694
- replacement terminal extensions.
54
+ ## Trust and costs
695
55
 
696
- ## Architecture
56
+ Configured packages, hooks, MCP commands, plugins, and shell commands are executable inputs. They run with the session's admitted environment and execution privileges. Plan mode removes selected editing tools; it does not sandbox Bash or external systems. Workspace containment is an optional, explicitly selected capability, not an effect of remote pairing.
697
57
 
698
- See [Architecture](https://github.com/AgiFlow/po/blob/main/docs/architecture.md) for native
699
- server/web/MCP contributions, canonical fingerprints, transition classification, shared-host
700
- Cordis lifecycle ownership, and parent/child isolation. Po no longer composes its own Pi factories;
701
- third-party Pi packages remain supported through the SDK host.
58
+ Transcript/model requests follow the configured providers. Voice can use local engines, but that does not make all session data local. Planning, delegation, workflows, compaction, and other enabled capabilities may make additional model calls. Commands and telemetry can contain sensitive caller-supplied values.
702
59
 
703
- ## Development
60
+ Calendar occurrences missed during downtime or busy execution are skipped, not replayed. A workflow launch acknowledgement is not workflow completion. Browser notifications are not durable approval delivery. Read [Security](https://github.com/AgiFlow/po/blob/main/docs/security.md) before granting remote or unattended access.
704
61
 
705
- ```bash
706
- pnpm install
707
- pnpm build
708
- pnpm examples:check
709
- pnpm nx build @agimon-ai/po
710
- pnpm nx test @agimon-ai/po
711
- pnpm nx typecheck @agimon-ai/po
712
- pnpm nx lint @agimon-ai/po
713
- ```
62
+ ## Contributor entry points
63
+
64
+ - [Server guides](docs/server/index.md): authenticated clients, protocol, package APIs, and lifecycle.
65
+ - [API export](docs/server/api-export.md): compiled OpenAPI/AsyncAPI contracts and strict coverage checks.
66
+ - [Contributing](https://github.com/AgiFlow/po/blob/main/CONTRIBUTING.md): repository development and verification.
67
+ - [Agent Experience](https://github.com/AgiFlow/po/blob/main/docs/agent-experience.md): why we design the agent environment and human collaboration together.
714
68
 
715
- Po is maintained by [Agimon](https://agimon.ai/about).
69
+ Shared contract packages (`po-core` and `po-hashline`) must be available before consumers such as Help and the distribution runtime. Release tooling owns changelogs and publication order; architecture checks and packed-install system tests gate release changes.
716
70
 
717
71
  ## License
718
72
 
719
73
  Business Source License 1.1: free for personal use, organisations under USD 1M revenue, non-profits and education. See [LICENSE](LICENSE) and https://agimon.ai/licensing.
720
-
721
- ## Maintainer release order
722
-
723
- Publish [`@agimon-ai/po-core`][pkg-po-core] and
724
- [`@agimon-ai/po-hashline`][pkg-po-hashline] first, then
725
- [`@agimon-ai/po-help`][pkg-po-help], and only then the
726
- [`@agimon-ai/po`][pkg-po] runtime that consumes them. Generated changelogs remain owned
727
- by the release tooling.
728
-
729
- The deploy workflow blocks publishing unless the deterministic Po architecture sweep and the
730
- packed-install system tests both pass. This keeps the shared Cordis host contract and independently
731
- loaded extension graph inside the same release boundary as the packages that consume them.
732
-
733
- [pkg-po]: https://www.npmjs.com/package/@agimon-ai/po
734
- [pkg-po-ui]: https://www.npmjs.com/package/@agimon-ai/po-ui
735
- [pkg-po-config]: https://www.npmjs.com/package/@agimon-ai/po-config
736
- [pkg-po-domain]: https://www.npmjs.com/package/@agimon-ai/po-domain
737
- [pkg-po-hashline]: https://www.npmjs.com/package/@agimon-ai/po-hashline
738
- [pkg-po-read]: https://www.npmjs.com/package/@agimon-ai/po-read
739
- [pkg-po-grep]: https://www.npmjs.com/package/@agimon-ai/po-grep
740
- [pkg-po-edit]: https://www.npmjs.com/package/@agimon-ai/po-edit
741
- [pkg-po-file-edit]: https://www.npmjs.com/package/@agimon-ai/po-file-edit
742
- [pkg-po-log]: https://www.npmjs.com/package/@agimon-ai/po-log
743
- [pkg-rmux-darwin-arm64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rmux-darwin-arm64
744
- [pkg-rmux-darwin-x64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rmux-darwin-x64
745
- [pkg-rmux-linux-arm64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rmux-linux-arm64
746
- [pkg-rmux-linux-x64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rmux-linux-x64
747
- [pkg-rtk-darwin-arm64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rtk-darwin-arm64
748
- [pkg-rtk-darwin-x64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rtk-darwin-x64
749
- [pkg-rtk-linux-arm64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rtk-linux-arm64
750
- [pkg-rtk-linux-x64]: https://www.npmjs.com/package/@agimon-ai/po-runner-rtk-linux-x64
751
- [pkg-po-team]: https://www.npmjs.com/package/@agimon-ai/po-team
752
- [pkg-po-task]: https://www.npmjs.com/package/@agimon-ai/po-task
753
- [pkg-po-runner]: https://www.npmjs.com/package/@agimon-ai/po-runner
754
- [pkg-po-autocompact]: https://www.npmjs.com/package/@agimon-ai/po-autocompact
755
- [pkg-po-help]: https://www.npmjs.com/package/@agimon-ai/po-help
756
- [pkg-po-mcp]: https://www.npmjs.com/package/@agimon-ai/po-mcp
757
- [pkg-po-user-feedback]: https://www.npmjs.com/package/@agimon-ai/po-user-feedback
758
- [pkg-po-logsink]: ../../tooling/po-logsink/README.md
759
- [pkg-po-plan]: https://www.npmjs.com/package/@agimon-ai/po-plan
760
- [pkg-po-calendar]: https://www.npmjs.com/package/@agimon-ai/po-calendar
761
- [pkg-po-goal]: https://www.npmjs.com/package/@agimon-ai/po-goal
762
- [pkg-po-workflow]: https://www.npmjs.com/package/@agimon-ai/po-workflow
763
- [pkg-po-voice]: https://www.npmjs.com/package/@agimon-ai/po-voice
764
- [pkg-po-core]: https://www.npmjs.com/package/@agimon-ai/po-core