@tt-a1i/openpi 0.1.0

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.
Files changed (114) hide show
  1. package/README.md +643 -0
  2. package/SETUP.md +74 -0
  3. package/THIRD_PARTY_NOTICES.md +16 -0
  4. package/assets/openpi-package.png +0 -0
  5. package/assets/readme-hero-mobile.svg +72 -0
  6. package/assets/readme-hero.svg +118 -0
  7. package/assets/readme-runtime-mobile.svg +91 -0
  8. package/assets/readme-runtime.svg +111 -0
  9. package/extensions/ask-user/handoff.ts +205 -0
  10. package/extensions/ask-user/index.ts +1110 -0
  11. package/extensions/ask-user/limits.ts +89 -0
  12. package/extensions/ask-user/prompt.ts +76 -0
  13. package/extensions/background-terminals/index.ts +653 -0
  14. package/extensions/background-terminals/src/domain.ts +99 -0
  15. package/extensions/background-terminals/src/manager.ts +989 -0
  16. package/extensions/background-terminals/src/output.ts +84 -0
  17. package/extensions/background-terminals/src/prompt.ts +195 -0
  18. package/extensions/background-terminals/src/result-delivery.ts +43 -0
  19. package/extensions/background-terminals/src/runtime.ts +36 -0
  20. package/extensions/background-terminals/src/ui/output-view.ts +55 -0
  21. package/extensions/background-terminals/src/ui/ps.ts +642 -0
  22. package/extensions/background-terminals/src/ui/tool-result.ts +146 -0
  23. package/extensions/background-terminals/src/watch.ts +192 -0
  24. package/extensions/context-pivot/index.ts +222 -0
  25. package/extensions/copy-all/index.ts +65 -0
  26. package/extensions/cron/index.ts +173 -0
  27. package/extensions/cron/schedule.ts +127 -0
  28. package/extensions/file-mutation-display/index.ts +105 -0
  29. package/extensions/file-mutation-display/render.ts +107 -0
  30. package/extensions/file-search/index.ts +515 -0
  31. package/extensions/file-search/src/args.ts +129 -0
  32. package/extensions/file-search/src/binaries.ts +419 -0
  33. package/extensions/file-search/src/output.ts +142 -0
  34. package/extensions/file-search/src/process.ts +309 -0
  35. package/extensions/file-search/src/prompt.ts +53 -0
  36. package/extensions/git-info/index.ts +272 -0
  37. package/extensions/git-info/src/changed-files-view.ts +414 -0
  38. package/extensions/git-info/src/process.ts +107 -0
  39. package/extensions/git-info/src/refresh-coordinator.ts +13 -0
  40. package/extensions/git-info/src/runtime.ts +28 -0
  41. package/extensions/goal/controller.ts +794 -0
  42. package/extensions/goal/index.ts +521 -0
  43. package/extensions/goal/prompts.ts +122 -0
  44. package/extensions/goal/state.ts +763 -0
  45. package/extensions/goal/ui.ts +158 -0
  46. package/extensions/model-info/index.ts +234 -0
  47. package/extensions/plan-mode/bash-policy.ts +313 -0
  48. package/extensions/plan-mode/index.ts +539 -0
  49. package/extensions/post-edit/index.ts +129 -0
  50. package/extensions/sessions/LICENSE.upstream +21 -0
  51. package/extensions/sessions/git-stats.ts +226 -0
  52. package/extensions/sessions/index.ts +1092 -0
  53. package/extensions/sessions/sessions.ts +385 -0
  54. package/extensions/setup/index.ts +408 -0
  55. package/extensions/shared/activity-status.ts +65 -0
  56. package/extensions/shared/below-editor-navigation.ts +343 -0
  57. package/extensions/shared/child-session.ts +352 -0
  58. package/extensions/shared/context-utilization.ts +47 -0
  59. package/extensions/shared/dashboard-state.ts +102 -0
  60. package/extensions/shared/plan-mode-state.ts +65 -0
  61. package/extensions/shared/setup-config.ts +971 -0
  62. package/extensions/shared/subagent-roles.ts +22 -0
  63. package/extensions/shared/terminal-text.ts +38 -0
  64. package/extensions/shared/tool-call-timeout.ts +104 -0
  65. package/extensions/shared/worktree.ts +526 -0
  66. package/extensions/subagents/index.ts +1225 -0
  67. package/extensions/subagents/navigation.ts +121 -0
  68. package/extensions/subagents/src/agent-types.ts +543 -0
  69. package/extensions/subagents/src/backend.ts +63 -0
  70. package/extensions/subagents/src/backends/pi.ts +493 -0
  71. package/extensions/subagents/src/backends/stub.ts +296 -0
  72. package/extensions/subagents/src/by-the-way.ts +21 -0
  73. package/extensions/subagents/src/domain.ts +271 -0
  74. package/extensions/subagents/src/format.ts +48 -0
  75. package/extensions/subagents/src/manager.ts +769 -0
  76. package/extensions/subagents/src/prompt.ts +190 -0
  77. package/extensions/subagents/src/result-delivery.ts +20 -0
  78. package/extensions/subagents/src/runtime.ts +51 -0
  79. package/extensions/subagents/src/ui/takeover.ts +615 -0
  80. package/extensions/subagents/src/ui/transcript.ts +293 -0
  81. package/extensions/subagents/src/ui/wait-result.ts +89 -0
  82. package/extensions/suggestions/index.ts +172 -0
  83. package/extensions/suggestions/src/config.ts +12 -0
  84. package/extensions/suggestions/src/predictor.ts +147 -0
  85. package/extensions/suggestions/src/prompt.ts +20 -0
  86. package/extensions/suggestions/src/transcript.ts +233 -0
  87. package/extensions/suggestions/src/ui.ts +224 -0
  88. package/extensions/tasks/index.ts +512 -0
  89. package/extensions/tasks/tasks.ts +649 -0
  90. package/extensions/tasks/ui.ts +421 -0
  91. package/extensions/turn-time/index.ts +61 -0
  92. package/extensions/ui-customization/footer.ts +512 -0
  93. package/extensions/ui-customization/index.ts +217 -0
  94. package/extensions/workflows/acceptance.ts +298 -0
  95. package/extensions/workflows/artifacts.ts +225 -0
  96. package/extensions/workflows/controller.ts +210 -0
  97. package/extensions/workflows/dashboard.ts +1226 -0
  98. package/extensions/workflows/index.ts +1884 -0
  99. package/extensions/workflows/journal.ts +188 -0
  100. package/extensions/workflows/meta.ts +250 -0
  101. package/extensions/workflows/model.ts +423 -0
  102. package/extensions/workflows/navigation.ts +93 -0
  103. package/extensions/workflows/prompt.ts +212 -0
  104. package/extensions/workflows/replay-safety.ts +577 -0
  105. package/extensions/workflows/runner.ts +786 -0
  106. package/extensions/workflows/sandbox-child.cjs +402 -0
  107. package/extensions/workflows/sandbox.ts +397 -0
  108. package/extensions/workflows/serialization.ts +162 -0
  109. package/extensions/workflows/worktree-handoff.ts +216 -0
  110. package/package.json +87 -0
  111. package/scripts/prepare-effect-tsgo.mjs +16 -0
  112. package/skills/background-terminals/SKILL.md +30 -0
  113. package/skills/subagents/SKILL.md +15 -0
  114. package/themes/github-dark-default.json +89 -0
package/SETUP.md ADDED
@@ -0,0 +1,74 @@
1
+ # Setup
2
+
3
+ Use Node.js 22.19.0 or newer. Install the public Pi package:
4
+
5
+ ```sh
6
+ pi install npm:@tt-a1i/openpi
7
+ ```
8
+
9
+ To inspect the current source before loading it, install directly from GitHub instead:
10
+
11
+ ```sh
12
+ pi install git:github.com/tt-a1i/my-pi-setup
13
+ ```
14
+
15
+ Pi installs the package dependencies automatically. Restart Pi or run `/reload` after installation.
16
+
17
+ ## fd and rg tools
18
+
19
+ The `file-search` extension registers `fd` and `rg` as model tools. No setup is normally needed: at startup it silently uses a system-installed `fd` (or `fdfind` on Debian/Ubuntu) and `rg` when available, or an existing fallback binary in `~/.pi/agent/bin/`. Only when neither exists does it download an official release binary (macOS/Linux, arm64/x64, over HTTPS) into `~/.pi/agent/bin/` and show a one-time notification. If your platform is unsupported, install `fd` and `rg` with your package manager and restart pi.
20
+
21
+ ## Theme
22
+
23
+ Add the included theme to `~/.pi/agent/settings.json` while keeping your existing settings:
24
+
25
+ ```json
26
+ {
27
+ "theme": "github-dark-default"
28
+ }
29
+ ```
30
+
31
+ Pi will load the extensions, skills, and theme from their directories the next time it starts.
32
+
33
+ ## Configure this package
34
+
35
+ Use the single package-owned command. With no arguments, the current model explains the configurable areas and their impact, then uses `ask_user`: first run initializes them; later runs explain the saved state and ask whether to keep it, change one area, or review everything. With arguments, it treats the rest as a targeted natural-language request:
36
+
37
+ ```text
38
+ /my-pi-setup
39
+ /my-pi-setup 开启下一步预测,使用 seal/deepseek-v4-flash,关闭推理
40
+ /my-pi-setup 关闭下一步预测
41
+ /my-pi-setup workflow 同时跑 16 个 agent,总任务最多 256 个
42
+ /my-pi-setup 显示大标题
43
+ /my-pi-setup 切换 Footer 为 powerline
44
+ /my-pi-setup 用 mono powerline Footer
45
+ /my-pi-setup Footer 用 compact
46
+ /my-pi-setup Footer 两行:cwd flex model / context cost flex git
47
+ /my-pi-setup Footer 只显示 model、thinking、context、cache 和 git
48
+ /my-pi-setup 关闭自定义状态栏
49
+ /my-pi-setup 编辑后自动跑 npm run format
50
+ /my-pi-setup 关闭 post-edit 命令
51
+ /my-pi-setup 给 explorer 指定当前 Registry 中可用的模型
52
+ /my-pi-setup 清除 explorer 的模型,让它继承父模型
53
+ ```
54
+
55
+ Next-action suggestions default to off. Run `/my-pi-setup` to explicitly choose an available model and reasoning level. After a fully settled main-agent run, one suggestion may appear as dim inline text on the first row of an empty editor; reserved cells at the row end keep CJK IME preedit from overwriting it. `Right` accepts it into the editor without submitting, while any other editor input dismisses it. Suggestions are ephemeral and never enter session history or model context. Workflows default to 8 concurrent agents and 128 total agent calls per run; configurable hard maxima are 64 and 1024. The large decorative header defaults off and the custom dashboard footer defaults on with a one-line Powerline layout (`cwd model thinking context cache cost throughput |flex| git pr`). Footer presets are `powerline`, `powerline-mono`, and `compact`; style can also be set independently to `plain`, `powerline`, or `powerline-mono`. Custom layouts use a 2D `footerLines` array with at most one `flex` per row for left/right alignment. Nerd Font only affects powerline separator glyphs (``); metric text stays readable without it. Footer changes apply immediately in the active TUI session. Subagent results default to the existing full display; users who do not usually inspect implementation detail can select compact previews. Bash defaults to a folded one-line command with bounded output and a hidden-line count. Write/Edit defaults to an extra-short folded preview capped at three rendered lines including the operation header; its hidden-line hint remains inside the operation's status background. Select full independently for any category to keep it expanded. Compact views temporarily expand with `app.tools.expand` (`Ctrl+O` by default). An optional post-edit command is off by default: set one (for example `npm run format`, maximum 500 characters) and it runs once in the background after each interactive-TUI turn with successful Write/Edit operations, with failures reported as a notification. It deliberately does not guess whether arbitrary Bash commands changed files. Built-in Agent roles `explorer`, `implementer`, `reviewer`, and `advisor` are shared by `subagent_spawn.agent_type` and Workflow `agent(..., { agent_type })`; all inherit the parent model by default. `/my-pi-setup` may assign a currently available Registry model to any subset; clearing one returns it to inheritance and omitted roles stay unchanged. Model precedence is explicit call > selected role-file model > setup assignment > parent inheritance; effort is explicit call > selected role > parent. A trusted project `.pi/agents/<role>.md` overrides global `~/.pi/agent/agents/<role>.md`, which overrides the complete built-in role definition; overrides are diagnosed. Role-model changes apply to the next spawn or Workflow agent call without reload. Configuration is stored privately at `~/.pi/agent/my-pi-setup.json`.
56
+
57
+ ## Session Goal and Tasks
58
+
59
+ `/goal`, `/goal <objective>`, `/goal edit`, `/goal pause`, `/goal resume`, and `/goal clear` implement a branch-scoped persistent objective with the current OpenAI Codex Goal semantics. `/goal <objective>` starts immediately with no second success-condition prompt or admission judge; the objective can contain up to 4000 characters. `/goal` shows status, objective, elapsed time, consumed tokens, optional token budget, and status-specific command hints. Replacing unfinished work requires `Replace current goal` confirmation, while a complete goal is replaced silently. Editing preserves usage and the optional budget; it reactivates complete or budget-limited goals only when the preserved budget is not already exhausted.
60
+
61
+ Model callers use `get_goal`, `create_goal`, and `update_goal`. `create_goal` is only for an explicitly requested persistent autonomous goal and fails while an unfinished goal exists. `update_goal` can only mark `complete` after a strict requirement-by-requirement evidence audit, or `blocked` after the same genuine blocker repeats for at least three consecutive Goal Turns. User/system operations own pause, resume, clear, usage limits, and budget limits.
62
+
63
+ There are no normal user-facing Turn, no-progress, or wall-clock caps; a hidden 1000-continuation circuit breaker exists only to stop runaway automation. An optional `token_budget` must only be positive. Goal non-cached Assistant input-plus-output Token and elapsed-time usage are persisted; crossing the budget marks `budget_limited` and queues one wrap-up Turn. Active goals continue after reload/resume. Fork and tree navigation defer inherited active continuation until the first explicit user input; paused, blocked, and usage-limited goals remain stopped and can prompt for Resume. A v1 active/waiting goal migrates once to paused. Assistant aborts pause an active goal and Assistant errors block it. Print/json automation is inert. Footer text mirrors Codex (`Pursuing goal (…)`, resume hints, `Goal unmet`, `Goal achieved`) without showing the objective or legacy Turn counts. An achieved Footer remains visible until the next explicit interactive/RPC input, then a branch-persisted acknowledgement hides only the Footer while `/goal` retains the completed record.
64
+
65
+ Session Tasks remain advisory multi-item work intent and do not determine Goal completion. They are scoped to the current request batch: once every item is done or dropped, the batch closes and the next `tasks_add` starts again at T1. Active items persist in a polished Claude Code-style panel above the editor; `Ctrl+Shift+T` or `/tasks hide|show|toggle` controls visibility, while `/tasks` opens the full list. No `/my-pi-setup` setting or secondary judge model is required.
66
+
67
+ ## Other commands added by this fork
68
+
69
+ - `/sessions` searches and previews project sessions before switching.
70
+ - `/tasks` inspects branch-scoped advisory work items.
71
+ - `/goal ...` controls the persistent autonomous session objective.
72
+ - `/context-pivot <next phase>` deliberately compacts a long current session into a next-phase brief. It requires at least 30,000 context tokens and is rejected below that; use the separate `/handoff` skill when work should move to a genuinely new session.
73
+ - `/cron every <5m> <prompt>`, `/cron in <30s> <prompt>`, `/cron list`, and `/cron remove <id>` schedule a prompt for this session. Jobs are in-memory and session-scoped (cleared on shutdown), fire only while the session is idle, and use a duration grammar (`30s`/`5m`/`2h`, minimum 30s) rather than crontab fields, because the scheduler polls about every 30 seconds.
74
+ - `/plan [objective]` explores read-only before changing anything: while armed it blocks `edit`, `write`, mutating Bash, `subagent_send`, `workflow`, and `bg_start`, while read/grep/find/ls/fd/rg and verified read-only Git/GitHub commands stay available. It permits `subagent_spawn`, but the harness narrows every newly spawned planning child to investigation-only tools; agent types can narrow that list further, never widen it. The model must submit the complete plan through parent-only `plan_ready`; the write gate stays closed until `/plan` prepares an editable implementation prompt for the current or a fresh Session. `/plan off` cancels.
@@ -0,0 +1,16 @@
1
+ # Third-Party Notices
2
+
3
+ ## Sessions extension
4
+
5
+ `extensions/sessions/` is adapted from
6
+ [`jayshah5696/pi-agent-extensions`](https://github.com/jayshah5696/pi-agent-extensions),
7
+ version 0.5.2.
8
+
9
+ The upstream project is distributed under the MIT License. Its notice states
10
+ `Copyright (c) 2026`; the complete license text is included at
11
+ [`extensions/sessions/LICENSE.upstream`](extensions/sessions/LICENSE.upstream).
12
+
13
+ The remainder of this repository retains its upstream licensing status; no
14
+ project-wide license is asserted here. The npm package therefore declares
15
+ `UNLICENSED`; publication does not grant permission to copy, modify, or
16
+ redistribute code beyond rights supplied by an applicable upstream license.
Binary file
@@ -0,0 +1,72 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="720" height="900" viewBox="0 0 720 900" role="img" aria-labelledby="title desc">
2
+ <title id="title">OpenPI</title>
3
+ <desc id="desc">A mobile-readable overview of the Pi-native multi-agent runtime.</desc>
4
+ <defs>
5
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
6
+ <stop stop-color="#0d1117"/>
7
+ <stop offset="1" stop-color="#111827"/>
8
+ </linearGradient>
9
+ <pattern id="grid" width="48" height="48" patternUnits="userSpaceOnUse">
10
+ <path d="M48 0H0V48" fill="none" stroke="#30363d" opacity="0.3"/>
11
+ </pattern>
12
+ </defs>
13
+
14
+ <rect width="720" height="900" rx="28" fill="url(#bg)"/>
15
+ <rect width="720" height="900" rx="28" fill="url(#grid)"/>
16
+ <rect x="1" y="1" width="718" height="898" rx="27" fill="none" stroke="#30363d" stroke-width="2"/>
17
+
18
+ <g transform="translate(48 48)">
19
+ <rect width="146" height="42" rx="21" fill="#12233d" stroke="#2f81f7" stroke-width="2"/>
20
+ <circle cx="22" cy="21" r="7" fill="#3fb950"/>
21
+ <text x="42" y="28" fill="#a5d6ff" font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="18" font-weight="700" letter-spacing="1">PI NATIVE</text>
22
+
23
+ <text x="0" y="122" fill="#f0f6fc" font-family="-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-size="66" font-weight="760" letter-spacing="-2">OpenPI</text>
24
+ <text x="0" y="168" fill="#8b949e" font-family="-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-size="24">Small harness. Real runtime.</text>
25
+ </g>
26
+
27
+ <g transform="translate(48 250)" font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="23" font-weight="600">
28
+ <rect width="624" height="68" rx="14" fill="#0d1117" stroke="#238636"/>
29
+ <circle cx="28" cy="34" r="7" fill="#3fb950"/>
30
+ <text x="52" y="42" fill="#d1f7d6">background execution</text>
31
+
32
+ <rect y="82" width="624" height="68" rx="14" fill="#0d1117" stroke="#1f6feb"/>
33
+ <circle cx="28" cy="116" r="7" fill="#58a6ff"/>
34
+ <text x="52" y="124" fill="#cae8ff">isolated Pi subagents</text>
35
+
36
+ <rect y="164" width="624" height="68" rx="14" fill="#0d1117" stroke="#8957e5"/>
37
+ <circle cx="28" cy="198" r="7" fill="#bc8cff"/>
38
+ <text x="52" y="206" fill="#eadcff">dynamic workflows</text>
39
+
40
+ <rect y="246" width="624" height="68" rx="14" fill="#0d1117" stroke="#238b8f"/>
41
+ <circle cx="28" cy="280" r="7" fill="#39c5cf"/>
42
+ <text x="52" y="288" fill="#c7f5f7">clean, observable context</text>
43
+ </g>
44
+
45
+ <g transform="translate(48 610)" font-family="ui-monospace, SFMono-Regular, Menlo, monospace">
46
+ <rect width="624" height="226" rx="18" fill="#010409" stroke="#30363d" stroke-width="2"/>
47
+ <rect x="1" y="1" width="622" height="46" rx="17" fill="#161b22"/>
48
+ <circle cx="23" cy="23" r="6" fill="#f85149"/>
49
+ <circle cx="44" cy="23" r="6" fill="#d29922"/>
50
+ <circle cx="65" cy="23" r="6" fill="#3fb950"/>
51
+ <text x="312" y="30" text-anchor="middle" fill="#8b949e" font-size="18">pi · main</text>
52
+
53
+ <rect x="24" y="66" width="576" height="48" rx="10" fill="#0d1117" stroke="#30363d"/>
54
+ <circle cx="46" cy="90" r="6" fill="#58a6ff"/>
55
+ <text x="64" y="98" fill="#f0f6fc" font-size="22" font-weight="700">main agent</text>
56
+ <text x="450" y="97" fill="#8b949e" font-size="18">orchestrating</text>
57
+
58
+ <g transform="translate(24 130)" font-size="18" font-weight="700">
59
+ <rect width="176" height="48" rx="9" fill="#0d1117" stroke="#238636"/>
60
+ <text x="20" y="31" fill="#7ee787">terminal</text>
61
+ <rect x="200" width="176" height="48" rx="9" fill="#0d1117" stroke="#1f6feb"/>
62
+ <text x="220" y="31" fill="#79c0ff">subagent</text>
63
+ <rect x="400" width="176" height="48" rx="9" fill="#0d1117" stroke="#8957e5"/>
64
+ <text x="420" y="31" fill="#d2a8ff">workflow</text>
65
+ </g>
66
+
67
+ <rect x="24" y="190" width="576" height="20" rx="5" fill="#0b1720"/>
68
+ <text x="36" y="206" fill="#39c5cf" font-size="16">next: run tests and open the PR</text>
69
+ </g>
70
+
71
+ <text x="360" y="872" text-anchor="middle" fill="#7d8590" font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="18" font-weight="600">PI-NATIVE · MODEL-NEUTRAL · FAIL-CLOSED</text>
72
+ </svg>
@@ -0,0 +1,118 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="500" viewBox="0 0 1200 500" role="img" aria-labelledby="title desc">
2
+ <title id="title">OpenPI</title>
3
+ <desc id="desc">A Pi-native runtime layer for background terminals, isolated subagents, dynamic workflows, and clean context.</desc>
4
+
5
+ <defs>
6
+ <linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
7
+ <stop offset="0" stop-color="#0d1117"/>
8
+ <stop offset="0.55" stop-color="#0b1119"/>
9
+ <stop offset="1" stop-color="#111827"/>
10
+ </linearGradient>
11
+ <radialGradient id="blueGlow" cx="0" cy="0" r="1" gradientTransform="translate(820 150) rotate(115) scale(380 520)">
12
+ <stop stop-color="#1f6feb" stop-opacity="0.22"/>
13
+ <stop offset="1" stop-color="#1f6feb" stop-opacity="0"/>
14
+ </radialGradient>
15
+ <radialGradient id="violetGlow" cx="0" cy="0" r="1" gradientTransform="translate(250 480) rotate(-35) scale(420 310)">
16
+ <stop stop-color="#8957e5" stop-opacity="0.16"/>
17
+ <stop offset="1" stop-color="#8957e5" stop-opacity="0"/>
18
+ </radialGradient>
19
+ <pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse">
20
+ <path d="M40 0H0V40" fill="none" stroke="#30363d" stroke-width="1" opacity="0.33"/>
21
+ </pattern>
22
+ <filter id="shadow" x="-20%" y="-20%" width="140%" height="150%">
23
+ <feDropShadow dx="0" dy="16" stdDeviation="18" flood-color="#000" flood-opacity="0.42"/>
24
+ </filter>
25
+ </defs>
26
+
27
+ <rect width="1200" height="500" rx="28" fill="url(#bg)"/>
28
+ <rect width="1200" height="500" rx="28" fill="url(#blueGlow)"/>
29
+ <rect width="1200" height="500" rx="28" fill="url(#violetGlow)"/>
30
+ <rect width="1200" height="500" rx="28" fill="url(#grid)"/>
31
+ <rect x="1" y="1" width="1198" height="498" rx="27" fill="none" stroke="#30363d" stroke-width="2"/>
32
+
33
+ <g transform="translate(70 68)">
34
+ <g>
35
+ <rect width="112" height="34" rx="17" fill="#12233d" stroke="#2f81f7"/>
36
+ <circle cx="18" cy="17" r="5" fill="#3fb950"/>
37
+ <text x="33" y="22" fill="#a5d6ff" font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="13" font-weight="700" letter-spacing="1">PI NATIVE</text>
38
+ </g>
39
+
40
+ <text x="0" y="112" fill="#f0f6fc" font-family="-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-size="64" font-weight="760" letter-spacing="-2">OpenPI</text>
41
+ <text x="0" y="155" fill="#8b949e" font-family="-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif" font-size="21">Keep the harness small. Give it a real runtime.</text>
42
+
43
+ <g transform="translate(0 198)" font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="16">
44
+ <path d="M5 9h14M12 2l7 7-7 7" fill="none" stroke="#58a6ff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
45
+ <text x="32" y="14" fill="#c9d1d9">background execution</text>
46
+
47
+ <path d="M5 52h14M12 45l7 7-7 7" fill="none" stroke="#3fb950" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
48
+ <text x="32" y="57" fill="#c9d1d9">isolated Pi subagents</text>
49
+
50
+ <path d="M5 95h14M12 88l7 7-7 7" fill="none" stroke="#bc8cff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
51
+ <text x="32" y="100" fill="#c9d1d9">dynamic, replay-safe workflows</text>
52
+
53
+ <path d="M5 138h14M12 131l7 7-7 7" fill="none" stroke="#39c5cf" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
54
+ <text x="32" y="143" fill="#c9d1d9">clean context + observable state</text>
55
+ </g>
56
+ </g>
57
+
58
+ <g transform="translate(675 58)" filter="url(#shadow)">
59
+ <rect width="458" height="350" rx="18" fill="#010409" stroke="#30363d" stroke-width="2"/>
60
+ <rect x="1" y="1" width="456" height="43" rx="17" fill="#161b22"/>
61
+ <path d="M1 43H457" stroke="#30363d"/>
62
+ <circle cx="22" cy="22" r="5" fill="#f85149"/>
63
+ <circle cx="40" cy="22" r="5" fill="#d29922"/>
64
+ <circle cx="58" cy="22" r="5" fill="#3fb950"/>
65
+ <text x="229" y="27" text-anchor="middle" fill="#7d8590" font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="13">pi · main</text>
66
+
67
+ <g font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="14">
68
+ <text x="24" y="78" fill="#7d8590">$ pi</text>
69
+ <rect x="24" y="92" width="410" height="44" rx="9" fill="#0d1117" stroke="#21262d"/>
70
+ <circle cx="44" cy="114" r="5" fill="#58a6ff"/>
71
+ <text x="59" y="119" fill="#f0f6fc">main agent</text>
72
+ <text x="320" y="119" fill="#7d8590">orchestrating</text>
73
+
74
+ <path d="M47 136V155M47 155H379" fill="none" stroke="#30363d" stroke-width="2"/>
75
+ <path d="M90 155V169M229 155V169M379 155V169" stroke="#30363d" stroke-width="2"/>
76
+
77
+ <rect x="24" y="169" width="126" height="68" rx="10" fill="#0d1117" stroke="#238636"/>
78
+ <circle cx="42" cy="190" r="4" fill="#3fb950"/>
79
+ <text x="54" y="195" fill="#7ee787">terminal</text>
80
+ <text x="38" y="219" fill="#8b949e">dev server</text>
81
+
82
+ <rect x="166" y="169" width="126" height="68" rx="10" fill="#0d1117" stroke="#1f6feb"/>
83
+ <circle cx="184" cy="190" r="4" fill="#58a6ff"/>
84
+ <text x="196" y="195" fill="#79c0ff">subagent</text>
85
+ <text x="180" y="219" fill="#8b949e">audit auth</text>
86
+
87
+ <rect x="308" y="169" width="126" height="68" rx="10" fill="#0d1117" stroke="#8957e5"/>
88
+ <circle cx="326" cy="190" r="4" fill="#bc8cff"/>
89
+ <text x="338" y="195" fill="#d2a8ff">workflow</text>
90
+ <text x="322" y="219" fill="#8b949e">scan → verify</text>
91
+
92
+ <rect x="24" y="256" width="410" height="34" rx="8" fill="#0d1117" stroke="#21262d"/>
93
+ <text x="38" y="278" fill="#7d8590">context</text>
94
+ <rect x="104" y="268" width="166" height="10" rx="5" fill="#21262d"/>
95
+ <rect x="104" y="268" width="61" height="10" rx="5" fill="#2f81f7"/>
96
+ <text x="285" y="278" fill="#c9d1d9">37%</text>
97
+ <text x="338" y="278" fill="#3fb950">settled</text>
98
+
99
+ <path d="M24 308H434" stroke="#21262d"/>
100
+ <rect x="24" y="318" width="410" height="18" rx="4" fill="#0b1720"/>
101
+ <text x="34" y="332" fill="#39c5cf" font-size="13">run tests and open the PR</text>
102
+ </g>
103
+ </g>
104
+
105
+ <g transform="translate(70 444)" font-family="ui-monospace, SFMono-Regular, Menlo, monospace" font-size="13" font-weight="600" letter-spacing="0.4">
106
+ <text fill="#58a6ff">BACKGROUND</text>
107
+ <circle cx="110" cy="-4" r="2" fill="#30363d"/>
108
+ <text x="126" fill="#3fb950">SUBAGENTS</text>
109
+ <circle cx="230" cy="-4" r="2" fill="#30363d"/>
110
+ <text x="246" fill="#bc8cff">WORKFLOWS</text>
111
+ <circle cx="352" cy="-4" r="2" fill="#30363d"/>
112
+ <text x="368" fill="#39c5cf">CONTEXT</text>
113
+ <circle cx="449" cy="-4" r="2" fill="#30363d"/>
114
+ <text x="465" fill="#d29922">OBSERVABILITY</text>
115
+ <circle cx="598" cy="-4" r="2" fill="#30363d"/>
116
+ <text x="614" fill="#f0f6fc">FAIL-CLOSED</text>
117
+ </g>
118
+ </svg>
@@ -0,0 +1,91 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="720" height="1100" viewBox="0 0 720 1100" role="img" aria-labelledby="title desc">
2
+ <title id="title">OpenPI runtime model</title>
3
+ <desc id="desc">A mobile-readable diagram of parent control, execution paths, continuity, and observability.</desc>
4
+ <defs>
5
+ <linearGradient id="panel" x1="0" y1="0" x2="1" y2="1">
6
+ <stop stop-color="#161b22"/>
7
+ <stop offset="1" stop-color="#0d1117"/>
8
+ </linearGradient>
9
+ <marker id="arrow" markerWidth="9" markerHeight="9" refX="8" refY="4.5" orient="auto">
10
+ <path d="M0 0L9 4.5 0 9Z" fill="#484f58"/>
11
+ </marker>
12
+ </defs>
13
+
14
+ <rect width="720" height="1100" rx="28" fill="#0d1117"/>
15
+ <rect x="1" y="1" width="718" height="1098" rx="27" fill="none" stroke="#30363d" stroke-width="2"/>
16
+
17
+ <g font-family="-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">
18
+ <text x="40" y="58" fill="#f0f6fc" font-size="32" font-weight="750">One parent. Three paths.</text>
19
+ <text x="40" y="91" fill="#8b949e" font-size="21">One observable lifecycle.</text>
20
+ </g>
21
+
22
+ <g transform="translate(40 126)" font-family="ui-monospace, SFMono-Regular, Menlo, monospace">
23
+ <rect width="640" height="112" rx="16" fill="url(#panel)" stroke="#58a6ff" stroke-width="2"/>
24
+ <rect x="20" y="18" width="104" height="30" rx="15" fill="#12233d"/>
25
+ <text x="38" y="39" fill="#79c0ff" font-size="16" font-weight="700">PARENT</text>
26
+ <text x="20" y="82" fill="#f0f6fc" font-size="26" font-weight="700">Main Pi Session</text>
27
+ <text x="382" y="80" fill="#8b949e" font-size="19">plan · decide · synthesize</text>
28
+
29
+ <path d="M320 112V154" stroke="#484f58" stroke-width="2" marker-end="url(#arrow)"/>
30
+
31
+ <g transform="translate(0 176)">
32
+ <rect width="640" height="258" rx="16" fill="#090d12" stroke="#30363d"/>
33
+ <text x="22" y="34" fill="#8b949e" font-size="18" font-weight="700" letter-spacing="1">EXECUTION</text>
34
+
35
+ <rect x="22" y="56" width="596" height="54" rx="11" fill="#0d1117" stroke="#238636"/>
36
+ <circle cx="47" cy="83" r="7" fill="#3fb950"/>
37
+ <text x="68" y="91" fill="#7ee787" font-size="22" font-weight="700">Background terminal</text>
38
+
39
+ <rect x="22" y="124" width="596" height="54" rx="11" fill="#0d1117" stroke="#1f6feb"/>
40
+ <circle cx="47" cy="151" r="7" fill="#58a6ff"/>
41
+ <text x="68" y="159" fill="#79c0ff" font-size="22" font-weight="700">Pi subagent</text>
42
+
43
+ <rect x="22" y="192" width="596" height="54" rx="11" fill="#0d1117" stroke="#8957e5"/>
44
+ <circle cx="47" cy="219" r="7" fill="#bc8cff"/>
45
+ <text x="68" y="227" fill="#d2a8ff" font-size="22" font-weight="700">Dynamic workflow</text>
46
+ </g>
47
+
48
+ <path d="M320 434V474" stroke="#484f58" stroke-width="2" marker-end="url(#arrow)"/>
49
+
50
+ <g transform="translate(0 496)">
51
+ <rect width="640" height="164" rx="16" fill="url(#panel)" stroke="#30363d"/>
52
+ <text x="22" y="34" fill="#8b949e" font-size="18" font-weight="700" letter-spacing="1">CONTINUITY</text>
53
+
54
+ <g transform="translate(22 54)" font-size="20" font-weight="700">
55
+ <rect width="136" height="44" rx="9" fill="#0d1117" stroke="#30363d"/>
56
+ <text x="18" y="29" fill="#f0f6fc">Tasks</text>
57
+ <rect x="150" width="136" height="44" rx="9" fill="#0d1117" stroke="#30363d"/>
58
+ <text x="168" y="29" fill="#f0f6fc">Goal</text>
59
+ <rect x="300" width="158" height="44" rx="9" fill="#0d1117" stroke="#30363d"/>
60
+ <text x="310" y="29" fill="#f0f6fc" font-size="18">Context Pivot</text>
61
+ <rect x="472" width="124" height="44" rx="9" fill="#0d1117" stroke="#30363d"/>
62
+ <text x="490" y="29" fill="#f0f6fc">Sessions</text>
63
+ </g>
64
+ <text x="22" y="132" fill="#7d8590" font-size="18">work intent · autonomy · phase switch · resume</text>
65
+ </g>
66
+
67
+ <g transform="translate(0 682)">
68
+ <rect width="640" height="164" rx="16" fill="url(#panel)" stroke="#30363d"/>
69
+ <text x="22" y="34" fill="#8b949e" font-size="18" font-weight="700" letter-spacing="1">OBSERVE &amp; CONTROL</text>
70
+
71
+ <g transform="translate(22 54)" font-size="20" font-weight="700">
72
+ <rect width="136" height="44" rx="9" fill="#0d1117" stroke="#30363d"/>
73
+ <text x="18" y="29" fill="#f0f6fc">Footer</text>
74
+ <rect x="150" width="136" height="44" rx="9" fill="#0d1117" stroke="#30363d"/>
75
+ <text x="168" y="29" fill="#f0f6fc">Dashboards</text>
76
+ <rect x="300" width="136" height="44" rx="9" fill="#0d1117" stroke="#30363d"/>
77
+ <text x="318" y="29" fill="#f0f6fc">Artifacts</text>
78
+ <rect x="450" width="146" height="44" rx="9" fill="#0d1117" stroke="#30363d"/>
79
+ <text x="468" y="29" fill="#f0f6fc">Cleanup</text>
80
+ </g>
81
+ <text x="22" y="132" fill="#7d8590" font-size="18">inspect · stop · audit · bounded shutdown</text>
82
+ </g>
83
+
84
+ <g transform="translate(0 872)">
85
+ <rect width="640" height="78" rx="14" fill="#111820" stroke="#30363d"/>
86
+ <circle cx="28" cy="27" r="7" fill="#3fb950"/>
87
+ <text x="50" y="35" fill="#f0f6fc" font-size="21" font-weight="700">Fail closed</text>
88
+ <text x="28" y="62" fill="#8b949e" font-size="17">unknown or unsafe state → denied, never guessed</text>
89
+ </g>
90
+ </g>
91
+ </svg>
@@ -0,0 +1,111 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1200" height="520" viewBox="0 0 1200 520" role="img" aria-labelledby="title desc">
2
+ <title id="title">OpenPI runtime model</title>
3
+ <desc id="desc">The main Pi session delegates execution to background terminals, subagents, and workflows while state, context, and observability stay under parent control.</desc>
4
+ <defs>
5
+ <linearGradient id="panel" x1="0" y1="0" x2="1" y2="1">
6
+ <stop stop-color="#161b22"/>
7
+ <stop offset="1" stop-color="#0d1117"/>
8
+ </linearGradient>
9
+ <marker id="arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto" markerUnits="strokeWidth">
10
+ <path d="M0 0L8 4 0 8Z" fill="#484f58"/>
11
+ </marker>
12
+ </defs>
13
+
14
+ <rect width="1200" height="520" rx="24" fill="#0d1117"/>
15
+ <rect x="1" y="1" width="1198" height="518" rx="23" fill="none" stroke="#30363d" stroke-width="2"/>
16
+
17
+ <g font-family="-apple-system, BlinkMacSystemFont, Segoe UI, sans-serif">
18
+ <text x="52" y="56" fill="#f0f6fc" font-size="24" font-weight="700">One parent. Three execution paths. One observable lifecycle.</text>
19
+ <text x="52" y="84" fill="#8b949e" font-size="15">The parent owns user interaction, configuration, durable state, and cleanup.</text>
20
+ </g>
21
+
22
+ <g transform="translate(52 116)" font-family="ui-monospace, SFMono-Regular, Menlo, monospace">
23
+ <rect width="250" height="120" rx="14" fill="url(#panel)" stroke="#58a6ff" stroke-width="2"/>
24
+ <rect x="18" y="18" width="84" height="24" rx="12" fill="#12233d"/>
25
+ <text x="31" y="35" fill="#79c0ff" font-size="13" font-weight="700">PARENT</text>
26
+ <text x="18" y="72" fill="#f0f6fc" font-size="17" font-weight="700">Main Pi Session</text>
27
+ <text x="18" y="98" fill="#8b949e" font-size="14">plan · decide · synthesize</text>
28
+
29
+ <path d="M250 60H316" stroke="#484f58" stroke-width="2" marker-end="url(#arrow)"/>
30
+
31
+ <g transform="translate(334 0)">
32
+ <rect width="710" height="120" rx="14" fill="#090d12" stroke="#30363d"/>
33
+ <text x="20" y="26" fill="#7d8590" font-size="13" font-weight="700" letter-spacing="1">EXECUTION PLANE</text>
34
+
35
+ <g transform="translate(20 42)">
36
+ <rect width="205" height="58" rx="10" fill="#0d1117" stroke="#238636"/>
37
+ <circle cx="18" cy="20" r="4" fill="#3fb950"/>
38
+ <text x="31" y="24" fill="#7ee787" font-size="14" font-weight="700">Background terminal</text>
39
+ <text x="16" y="45" fill="#7d8590" font-size="13">server · watcher · build</text>
40
+ </g>
41
+ <g transform="translate(244 42)">
42
+ <rect width="205" height="58" rx="10" fill="#0d1117" stroke="#1f6feb"/>
43
+ <circle cx="18" cy="20" r="4" fill="#58a6ff"/>
44
+ <text x="31" y="24" fill="#79c0ff" font-size="14" font-weight="700">Pi subagent</text>
45
+ <text x="16" y="45" fill="#7d8590" font-size="13">isolated context</text>
46
+ </g>
47
+ <g transform="translate(468 42)">
48
+ <rect width="222" height="58" rx="10" fill="#0d1117" stroke="#8957e5"/>
49
+ <circle cx="18" cy="20" r="4" fill="#bc8cff"/>
50
+ <text x="31" y="24" fill="#d2a8ff" font-size="14" font-weight="700">Dynamic workflow</text>
51
+ <text x="16" y="45" fill="#7d8590" font-size="13">pipeline · schema · replay</text>
52
+ </g>
53
+ </g>
54
+
55
+ <path d="M177 120V176" stroke="#484f58" stroke-width="2" marker-end="url(#arrow)"/>
56
+ <path d="M690 120V176" stroke="#484f58" stroke-width="2" marker-end="url(#arrow)"/>
57
+
58
+ <g transform="translate(0 194)">
59
+ <rect width="514" height="126" rx="14" fill="url(#panel)" stroke="#30363d"/>
60
+ <text x="20" y="27" fill="#7d8590" font-size="13" font-weight="700" letter-spacing="1">CONTINUITY</text>
61
+
62
+ <g transform="translate(20 46)" font-size="14">
63
+ <rect width="104" height="54" rx="9" fill="#0d1117" stroke="#30363d"/>
64
+ <text x="16" y="23" fill="#f0f6fc" font-weight="700">Tasks</text>
65
+ <text x="16" y="41" fill="#7d8590">work intent</text>
66
+
67
+ <rect x="118" width="104" height="54" rx="9" fill="#0d1117" stroke="#30363d"/>
68
+ <text x="134" y="23" fill="#f0f6fc" font-weight="700">Goal</text>
69
+ <text x="134" y="41" fill="#7d8590">autonomy</text>
70
+
71
+ <rect x="236" width="120" height="54" rx="9" fill="#0d1117" stroke="#30363d"/>
72
+ <text x="252" y="23" fill="#f0f6fc" font-weight="700">Context Pivot</text>
73
+ <text x="252" y="41" fill="#7d8590">phase switch</text>
74
+
75
+ <rect x="370" width="104" height="54" rx="9" fill="#0d1117" stroke="#30363d"/>
76
+ <text x="386" y="23" fill="#f0f6fc" font-weight="700">Sessions</text>
77
+ <text x="386" y="41" fill="#7d8590">find · resume</text>
78
+ </g>
79
+ </g>
80
+
81
+ <g transform="translate(534 194)">
82
+ <rect width="510" height="126" rx="14" fill="url(#panel)" stroke="#30363d"/>
83
+ <text x="20" y="27" fill="#7d8590" font-size="13" font-weight="700" letter-spacing="1">OBSERVE &amp; CONTROL</text>
84
+
85
+ <g transform="translate(20 46)" font-size="14">
86
+ <rect width="108" height="54" rx="9" fill="#0d1117" stroke="#30363d"/>
87
+ <text x="16" y="23" fill="#f0f6fc" font-weight="700">Footer</text>
88
+ <text x="16" y="41" fill="#7d8590">live signals</text>
89
+
90
+ <rect x="122" width="108" height="54" rx="9" fill="#0d1117" stroke="#30363d"/>
91
+ <text x="138" y="23" fill="#f0f6fc" font-weight="700">Dashboards</text>
92
+ <text x="138" y="41" fill="#7d8590">inspect · stop</text>
93
+
94
+ <rect x="244" width="108" height="54" rx="9" fill="#0d1117" stroke="#30363d"/>
95
+ <text x="260" y="23" fill="#f0f6fc" font-weight="700">Artifacts</text>
96
+ <text x="260" y="41" fill="#7d8590">audit · handoff</text>
97
+
98
+ <rect x="366" width="104" height="54" rx="9" fill="#0d1117" stroke="#30363d"/>
99
+ <text x="382" y="23" fill="#f0f6fc" font-weight="700">Cleanup</text>
100
+ <text x="382" y="41" fill="#7d8590">bounded</text>
101
+ </g>
102
+ </g>
103
+
104
+ <g transform="translate(0 350)">
105
+ <rect width="1044" height="52" rx="12" fill="#111820" stroke="#30363d"/>
106
+ <circle cx="24" cy="26" r="5" fill="#3fb950"/>
107
+ <text x="40" y="31" fill="#c9d1d9" font-size="13">Fail closed:</text>
108
+ <text x="132" y="31" fill="#8b949e" font-size="13">unknown tools, unsafe replay, uncertain Git state, and child orchestration are denied — never guessed.</text>
109
+ </g>
110
+ </g>
111
+ </svg>