port: stub omp README (omp install + source link); source README install via npm
Some checks failed
port-to-omp / port (push) Failing after 4s

This commit is contained in:
2026-08-10 16:07:31 -04:00
parent c8fba70d1e
commit 663b207df1
2 changed files with 18 additions and 16 deletions

View File

@@ -12,17 +12,11 @@ in a single inspectable run-state file.
## Install ## Install
Pygienium is a local pi extension under `~/.pi/agent/extensions/pygienium/`.
Pi loads it via `pi.extensions` in `package.json` (entry `./src/index.ts`).
```sh ```sh
# from the extension root pi install npm:@mikefreno/pygienium
bun install # optional: only needed for typecheck/test dev deps
bun run typecheck
bun test
``` ```
Pi auto-discovers the extension from this location via the `pi.extensions` entry in `package.json` — no settings.json config is needed. On load it emits a TUI notification `Pygienium loaded. Run /pygienium-help for available checks and flags.` (only when a dialog-capable UI is available). On load it emits a TUI notification `Pygienium loaded. Run /pygienium-help for available checks and flags.` (only when a dialog-capable UI is available).
## Configuration ## Configuration

View File

@@ -204,6 +204,19 @@ function transformPkg() {
const ordered = reorder(raw, rule.order); const ordered = reorder(raw, rule.order);
return JSON.stringify(ordered, null, 2) + "\n"; return JSON.stringify(ordered, null, 2) + "\n";
} }
const README_STUB = `# Pygienium (omp port)
Code hygiene extension for omp — isolated sub-agent checks that scan a target, apply fixes, and emit a findings+changes report.
## Install
\`\`\`sh
omp install @mikefreno/omp-pygienium
\`\`\`
This is the omp port of [Mike/pygienium](https://git.freno.me/Mike/pygienium), regenerated automatically from the source repo. See the source repo for full documentation.
`;
const FILE_RULES = { const FILE_RULES = {
"src/index.ts": [ "src/index.ts": [
{ from: " * Read the pygienium chat style from pi's settings.json.", to: " * Read the pygienium chat style from omp's settings.json." }, { from: " * Read the pygienium chat style from pi's settings.json.", to: " * Read the pygienium chat style from omp's settings.json." },
@@ -244,14 +257,7 @@ const FILE_RULES = {
}, },
], ],
"src/agents.ts": [{ from: " - find", to: " - glob", label: "frontmatter example" }], "src/agents.ts": [{ from: " - find", to: " - glob", label: "frontmatter example" }],
"README.md": [
{ from: "[pi](https://github.com/earendil-works/pi-coding-agent)", to: "[omp](https://github.com/oh-my-pi)" },
{ from: "local pi extension under `~/.pi/agent/extensions/pygienium/`.", to: "local omp extension under `~/.omp/agent/extensions/pygienium/`." },
{ from: "Pi loads it via `pi.extensions`", to: "Omp loads it via `omp.extensions`" },
{ from: "Pi auto-discovers the extension from this location via the `pi.extensions` entry", to: "Omp auto-discovers the extension from this location via the `omp.extensions` entry" },
{ from: "pi's `settings.json` (`~/.pi/agent/settings.json`)", to: "omp's `settings.json` (`~/.omp/agent/settings.json`)" },
{ from: "Reload pi (or `/reload`)", to: "Reload omp (or `/reload`)" },
],
}; };
const AGENT_MD_GLOB = { re: /`find`(?! \.)/g, to: "`glob`", label: "find token", all: true }; const AGENT_MD_GLOB = { re: /`find`(?! \.)/g, to: "`glob`", label: "find token", all: true };
const AGENT_MD_FRONTMATTER = { from: " - find", to: " - glob", label: "frontmatter tools", all: true }; const AGENT_MD_FRONTMATTER = { from: " - find", to: " - glob", label: "frontmatter tools", all: true };
@@ -303,6 +309,8 @@ function portExtension() {
writeFileSync(p, text); writeFileSync(p, text);
} else if (rel === "package.json") { } else if (rel === "package.json") {
writeFileSync(p, transformPkg()); writeFileSync(p, transformPkg());
} else if (rel === "README.md") {
writeFileSync(p, README_STUB);
} else if (rel.endsWith(".md")) { } else if (rel.endsWith(".md")) {
let text = readFileSync(p, "utf8"); let text = readFileSync(p, "utf8");
if (FILE_RULES[rel]) text = applyOps(text, FILE_RULES[rel], rel); if (FILE_RULES[rel]) text = applyOps(text, FILE_RULES[rel], rel);