omni-pi 0.9.0 → 0.10.1
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/CHANGELOG.md +21 -0
- package/README.md +6 -1
- package/extensions/omni-core/index.ts +14 -7
- package/package.json +9 -3
- package/src/prompt-template-sync.ts +63 -0
- package/templates/managed-prompts/commit.md +23 -0
- package/templates/managed-prompts/push.md +30 -0
- package/vendor/pi-diff-review/README.md +39 -0
- package/vendor/pi-diff-review/package-lock.json +4369 -0
- package/vendor/pi-diff-review/package.json +26 -0
- package/vendor/pi-diff-review/src/git.ts +366 -0
- package/vendor/pi-diff-review/src/index.ts +283 -0
- package/vendor/pi-diff-review/src/prompt.ts +58 -0
- package/vendor/pi-diff-review/src/types.ts +83 -0
- package/vendor/pi-diff-review/src/ui.ts +20 -0
- package/vendor/pi-diff-review/tsconfig.json +14 -0
- package/vendor/pi-diff-review/types/glimpseui.d.ts +89 -0
- package/vendor/pi-diff-review/web/app.js +1110 -0
- package/vendor/pi-diff-review/web/index.html +186 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.1 - 2026-04-24
|
|
4
|
+
|
|
5
|
+
### Release follow-up
|
|
6
|
+
|
|
7
|
+
- republished the previous 0.10.0 release work under a new patch version because npm will not republish a previously published version number
|
|
8
|
+
- kept the bundled `pi-diff-review` and `pi-prompt-template-model` integration changes intact
|
|
9
|
+
|
|
10
|
+
## 0.10.0 - 2026-04-24
|
|
11
|
+
|
|
12
|
+
### Runtime and integrations
|
|
13
|
+
|
|
14
|
+
- upgraded `@mariozechner/pi-coding-agent` to `0.70.0`
|
|
15
|
+
- bundled `pi-diff-review` as a packaged Omni-Pi dependency so `/diff-review` is available out of the box
|
|
16
|
+
- vendored `pi-diff-review` locally so global installs no longer fail on the extension's git prepare hook
|
|
17
|
+
- bundled `pi-prompt-template-model` so packaged prompt templates can register smarter slash commands
|
|
18
|
+
|
|
19
|
+
### Commands
|
|
20
|
+
|
|
21
|
+
- added `/commit` to review local changes and create a descriptive conventional commit
|
|
22
|
+
- added `/push` with a deterministic first `git push` attempt that only hands off to the model when the push fails
|
|
23
|
+
|
|
3
24
|
## 0.8.3 - 2026-04-17
|
|
4
25
|
|
|
5
26
|
### Model refresh flow
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Requires Node.js 22 or newer.
|
|
|
15
15
|
- Keeps durable standards and project context in `.omni/`, even when Omni mode is off.
|
|
16
16
|
- Writes specs, tasks, and progress into `.omni/` once Omni mode is enabled.
|
|
17
17
|
- Adds a repo map that indexes supported source files, ranks them by structure plus recent activity, and injects a compact codebase-awareness block into Omni prompts.
|
|
18
|
-
- Bundles web search, guided interviews, themed UI, native micro-UI via Glimpse, a task viewer, a powerbar, custom provider/model management, and automatic updates out of the box.
|
|
18
|
+
- Bundles web search, guided interviews, themed UI, native micro-UI via Glimpse, native git diff review, prompt-template-powered workflow commands, a task viewer, a powerbar, custom provider/model management, and automatic updates out of the box.
|
|
19
19
|
|
|
20
20
|
## Install
|
|
21
21
|
|
|
@@ -71,6 +71,8 @@ Current deferred roadmap items remain intentional and visible in docs rather tha
|
|
|
71
71
|
| **glimpseui** | Native micro-UI windows and the optional floating companion widget |
|
|
72
72
|
| **pi-web-access** | Web search and fetch tools for the agent |
|
|
73
73
|
| **pi-interview** | Guided Q&A when the agent needs clarification |
|
|
74
|
+
| **pi-diff-review** | Native git diff review window that inserts structured review feedback into the editor |
|
|
75
|
+
| **pi-prompt-template-model** | Prompt templates can set thinking/model behavior and back commands like `/commit` and `/push` |
|
|
74
76
|
| **pi-powerbar** | Powerline-style status bar with segments |
|
|
75
77
|
| **pi-extension-settings** | Settings persistence for extensions |
|
|
76
78
|
|
|
@@ -90,6 +92,9 @@ Omni-Pi now bundles [Glimpse](https://github.com/HazAT/glimpse) for native micro
|
|
|
90
92
|
| `/manage-providers` | Remove stored auth for bundled providers |
|
|
91
93
|
| `/omni-mode` | Toggle persistent Omni mode on or off for this project |
|
|
92
94
|
| `/companion` | Toggle the Glimpse floating companion widget |
|
|
95
|
+
| `/diff-review` | Open a native git diff review window and insert feedback into the editor |
|
|
96
|
+
| `/commit` | Review local changes and create a descriptive conventional commit |
|
|
97
|
+
| `/push` | Push the current branch, with automatic recovery flow if the first push fails |
|
|
93
98
|
| `/theme` | Switch between color presets (lavender, ember, ocean, mint, rose, gold, arctic, neon, copper, slate) |
|
|
94
99
|
| `/update` | Check for Omni-Pi updates |
|
|
95
100
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { fileURLToPath } from "node:url";
|
|
2
|
+
|
|
1
3
|
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
4
|
|
|
3
5
|
import {
|
|
@@ -12,6 +14,7 @@ import {
|
|
|
12
14
|
registerOmniMessageRenderer,
|
|
13
15
|
registerPiCommands,
|
|
14
16
|
} from "../../src/pi.js";
|
|
17
|
+
import { ensureBundledPromptTemplates } from "../../src/prompt-template-sync.js";
|
|
15
18
|
import { registerProviderAuthCommand } from "../../src/provider-auth-command.js";
|
|
16
19
|
import {
|
|
17
20
|
buildRepoMapPromptSuffix,
|
|
@@ -49,6 +52,11 @@ export default function omniCoreExtension(api: ExtensionAPI): void {
|
|
|
49
52
|
|
|
50
53
|
api.on("session_start", async (_event, ctx) => {
|
|
51
54
|
await ensurePiSettings(ctx.cwd);
|
|
55
|
+
ensureBundledPromptTemplates(
|
|
56
|
+
fileURLToPath(
|
|
57
|
+
new URL("../../templates/managed-prompts", import.meta.url),
|
|
58
|
+
),
|
|
59
|
+
);
|
|
52
60
|
loadSavedTheme(ctx.cwd);
|
|
53
61
|
const omniMode = readOmniMode(ctx.cwd);
|
|
54
62
|
ctx.ui.setTitle("Omni-Pi");
|
|
@@ -57,17 +65,19 @@ export default function omniCoreExtension(api: ExtensionAPI): void {
|
|
|
57
65
|
ctx.ui.setStatus("omni", formatOmniModeStatus(omniMode));
|
|
58
66
|
ctx.ui.setStatus("rtk", formatRtkModeStatus(readRtkMode(ctx.cwd), false));
|
|
59
67
|
await refreshRtkStatusIndicator(ctx);
|
|
60
|
-
|
|
61
|
-
void warmRepoMap(ctx.cwd);
|
|
62
|
-
}
|
|
68
|
+
void warmRepoMap(ctx.cwd);
|
|
63
69
|
});
|
|
64
70
|
|
|
65
71
|
api.on("before_agent_start", async (event, ctx) => {
|
|
66
72
|
const omniMode = readOmniMode(ctx.cwd);
|
|
67
73
|
const passivePrompt = await buildPassiveOmniPromptSuffix(ctx.cwd);
|
|
74
|
+
const repoMapPrompt = await buildRepoMapPromptSuffix(ctx.cwd, {
|
|
75
|
+
prompt: typeof event.prompt === "string" ? event.prompt : "",
|
|
76
|
+
maxTokens: omniMode ? undefined : 120,
|
|
77
|
+
});
|
|
68
78
|
if (!omniMode) {
|
|
69
79
|
return {
|
|
70
|
-
systemPrompt: [event.systemPrompt, passivePrompt]
|
|
80
|
+
systemPrompt: [event.systemPrompt, passivePrompt, repoMapPrompt]
|
|
71
81
|
.filter(Boolean)
|
|
72
82
|
.join("\n\n"),
|
|
73
83
|
};
|
|
@@ -80,9 +90,6 @@ export default function omniCoreExtension(api: ExtensionAPI): void {
|
|
|
80
90
|
const onboardingKickoff = init.initResult?.onboardingInterviewNeeded
|
|
81
91
|
? buildOnboardingInterviewKickoff(init.initResult)
|
|
82
92
|
: "";
|
|
83
|
-
const repoMapPrompt = await buildRepoMapPromptSuffix(ctx.cwd, {
|
|
84
|
-
prompt: typeof event.prompt === "string" ? event.prompt : "",
|
|
85
|
-
});
|
|
86
93
|
const prompt = [
|
|
87
94
|
event.systemPrompt,
|
|
88
95
|
passivePrompt,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omni-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Single-agent Pi package that interviews the user, documents the spec, and implements work in bounded slices.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"skills",
|
|
37
37
|
"src",
|
|
38
38
|
"templates",
|
|
39
|
+
"vendor/pi-diff-review",
|
|
39
40
|
"README.md",
|
|
40
41
|
"PROVIDERS.md",
|
|
41
42
|
"CREDITS.md"
|
|
@@ -64,13 +65,16 @@
|
|
|
64
65
|
"./node_modules/glimpseui/pi-extension/index.ts",
|
|
65
66
|
"./node_modules/pi-web-access/index.ts",
|
|
66
67
|
"./node_modules/pi-interview/index.ts",
|
|
68
|
+
"./node_modules/pi-diff-review/src/index.ts",
|
|
69
|
+
"./node_modules/pi-prompt-template-model/index.ts",
|
|
67
70
|
"./node_modules/@juanibiapina/pi-extension-settings/dist/index.js",
|
|
68
71
|
"./node_modules/@juanibiapina/pi-powerbar/dist"
|
|
69
72
|
],
|
|
70
73
|
"skills": [
|
|
71
74
|
"./skills",
|
|
72
75
|
"./node_modules/glimpseui/skills",
|
|
73
|
-
"./node_modules/pi-web-access/skills"
|
|
76
|
+
"./node_modules/pi-web-access/skills",
|
|
77
|
+
"./node_modules/pi-prompt-template-model/skills"
|
|
74
78
|
],
|
|
75
79
|
"prompts": [
|
|
76
80
|
"./prompts"
|
|
@@ -80,9 +84,11 @@
|
|
|
80
84
|
"@anthropic-ai/claude-agent-sdk": "0.2.84",
|
|
81
85
|
"@juanibiapina/pi-extension-settings": "^0.6.1",
|
|
82
86
|
"@juanibiapina/pi-powerbar": "^0.8.0",
|
|
83
|
-
"@mariozechner/pi-coding-agent": "^0.
|
|
87
|
+
"@mariozechner/pi-coding-agent": "^0.70.0",
|
|
84
88
|
"glimpseui": "^0.7.0",
|
|
89
|
+
"pi-diff-review": "file:./vendor/pi-diff-review",
|
|
85
90
|
"pi-interview": "^0.6.2",
|
|
91
|
+
"pi-prompt-template-model": "^0.8.2",
|
|
86
92
|
"pi-web-access": "^0.10.6",
|
|
87
93
|
"zod": "^4.3.6"
|
|
88
94
|
},
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
existsSync,
|
|
3
|
+
mkdirSync,
|
|
4
|
+
readFileSync,
|
|
5
|
+
rmSync,
|
|
6
|
+
writeFileSync,
|
|
7
|
+
} from "node:fs";
|
|
8
|
+
import os from "node:os";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
|
|
11
|
+
const MANAGED_PROMPT_FILES = ["commit.md", "push.md"] as const;
|
|
12
|
+
const MANAGED_SUBDIR = "omni-pi";
|
|
13
|
+
const LEGACY_MANAGED_SUBDIRS = ["zz-omni-pi"] as const;
|
|
14
|
+
|
|
15
|
+
export function ensureBundledPromptTemplates(
|
|
16
|
+
sourceDir: string,
|
|
17
|
+
options?: {
|
|
18
|
+
homeDir?: string;
|
|
19
|
+
targetSubdir?: string;
|
|
20
|
+
promptFiles?: readonly string[];
|
|
21
|
+
legacySubdirs?: readonly string[];
|
|
22
|
+
},
|
|
23
|
+
): string[] {
|
|
24
|
+
const homeDir = options?.homeDir ?? os.homedir();
|
|
25
|
+
const targetSubdir = options?.targetSubdir ?? MANAGED_SUBDIR;
|
|
26
|
+
const promptFiles = options?.promptFiles ?? MANAGED_PROMPT_FILES;
|
|
27
|
+
const legacySubdirs = options?.legacySubdirs ?? LEGACY_MANAGED_SUBDIRS;
|
|
28
|
+
const promptsRoot = path.join(homeDir, ".pi", "agent", "prompts");
|
|
29
|
+
const targetDir = path.join(promptsRoot, targetSubdir);
|
|
30
|
+
|
|
31
|
+
for (const legacySubdir of legacySubdirs) {
|
|
32
|
+
const legacyDir = path.join(promptsRoot, legacySubdir);
|
|
33
|
+
if (legacyDir === targetDir || !existsSync(legacyDir)) {
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
rmSync(legacyDir, { recursive: true, force: true });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
mkdirSync(targetDir, { recursive: true });
|
|
40
|
+
|
|
41
|
+
const written: string[] = [];
|
|
42
|
+
for (const file of promptFiles) {
|
|
43
|
+
const sourcePath = path.join(sourceDir, file);
|
|
44
|
+
const targetPath = path.join(targetDir, file);
|
|
45
|
+
const nextContent = readFileSync(sourcePath, "utf8");
|
|
46
|
+
|
|
47
|
+
let currentContent: string | null = null;
|
|
48
|
+
try {
|
|
49
|
+
currentContent = readFileSync(targetPath, "utf8");
|
|
50
|
+
} catch {
|
|
51
|
+
currentContent = null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (currentContent === nextContent) {
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
writeFileSync(targetPath, nextContent, "utf8");
|
|
59
|
+
written.push(targetPath);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return written;
|
|
63
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review local changes, stage them, and create a descriptive conventional commit
|
|
3
|
+
thinking: high
|
|
4
|
+
---
|
|
5
|
+
Review the current repository changes and commit whatever is ready to be committed.
|
|
6
|
+
|
|
7
|
+
Requirements:
|
|
8
|
+
- Inspect the working tree first so you understand what changed.
|
|
9
|
+
- Stage the files that belong in this commit.
|
|
10
|
+
- Run relevant lightweight verification when needed before committing.
|
|
11
|
+
- Write a descriptive conventional commit message that explains the real user-facing or developer-facing change.
|
|
12
|
+
- Prefer a single well-scoped commit for the current work.
|
|
13
|
+
- Do not push.
|
|
14
|
+
|
|
15
|
+
Commit message guidance:
|
|
16
|
+
- Use conventional commit style such as `feat:`, `fix:`, `refactor:`, `docs:`, `test:`, or `chore:`.
|
|
17
|
+
- Make the summary line specific and useful, not generic.
|
|
18
|
+
- Add a body when it helps explain important details, grouped changes, or verification.
|
|
19
|
+
|
|
20
|
+
When done, report:
|
|
21
|
+
- the commit hash
|
|
22
|
+
- the commit message
|
|
23
|
+
- any checks you ran
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Push the current branch; only involve the model if push fails
|
|
3
|
+
thinking: high
|
|
4
|
+
run:
|
|
5
|
+
command: git
|
|
6
|
+
args:
|
|
7
|
+
- push
|
|
8
|
+
shell: false
|
|
9
|
+
handoff: on-failure
|
|
10
|
+
timeout: 120000
|
|
11
|
+
---
|
|
12
|
+
The initial `git push` failed.
|
|
13
|
+
|
|
14
|
+
Your job:
|
|
15
|
+
- diagnose exactly why the push failed
|
|
16
|
+
- make the minimum safe changes needed to fix the problem
|
|
17
|
+
- if the fix requires local commits, create them with clear conventional commit messages
|
|
18
|
+
- retry `git push`
|
|
19
|
+
- continue until the branch is pushed successfully, or stop only if the issue cannot be resolved safely from inside the repo
|
|
20
|
+
|
|
21
|
+
Rules:
|
|
22
|
+
- prefer fixing local repository issues first
|
|
23
|
+
- do not rewrite history unless it is clearly necessary and safe
|
|
24
|
+
- do not use force-push unless there is a strong explicit reason from the repo state
|
|
25
|
+
- explain the root cause and what you changed before the final push result
|
|
26
|
+
|
|
27
|
+
When done, report:
|
|
28
|
+
- whether push succeeded
|
|
29
|
+
- the root cause
|
|
30
|
+
- any commits or fixes you made
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# pi-diff-review
|
|
2
|
+
|
|
3
|
+
This is pure slop, see: https://pi.dev/session/#d4ce533cedbd60040f2622dc3db950e2
|
|
4
|
+
|
|
5
|
+
It is my hope, that someone takes this idea and makes it gud.
|
|
6
|
+
|
|
7
|
+
Native diff review window for pi, powered by [Glimpse](https://github.com/hazat/glimpse) and Monaco.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
pi install git:https://github.com/badlogic/pi-diff-review
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
Adds a `/diff-review` command to pi.
|
|
16
|
+
|
|
17
|
+
The command:
|
|
18
|
+
|
|
19
|
+
1. opens a native review window
|
|
20
|
+
2. lets you switch between `git diff`, `last commit`, and `all files` scopes
|
|
21
|
+
3. shows a collapsible sidebar with fuzzy file search
|
|
22
|
+
4. shows git status markers in the sidebar for changed files and untracked files
|
|
23
|
+
5. lazy-loads file contents on demand as you switch files and scopes
|
|
24
|
+
6. lets you draft comments on the original side, modified side, or whole file
|
|
25
|
+
7. inserts the resulting feedback prompt into the pi editor when you submit
|
|
26
|
+
|
|
27
|
+
## Requirements
|
|
28
|
+
|
|
29
|
+
- macOS, Linux, or Windows
|
|
30
|
+
- Node.js 20+
|
|
31
|
+
- `pi` installed
|
|
32
|
+
- internet access for the Tailwind and Monaco CDNs used by the review window
|
|
33
|
+
|
|
34
|
+
### Windows notes
|
|
35
|
+
|
|
36
|
+
Glimpse now supports Windows. To build the native host during install you need:
|
|
37
|
+
|
|
38
|
+
- .NET 8 SDK
|
|
39
|
+
- Microsoft Edge WebView2 Runtime
|