port: stub omp README (omp install + source link); source README install via npm
Some checks failed
port-to-omp / port (push) Failing after 4s
Some checks failed
port-to-omp / port (push) Failing after 4s
This commit is contained in:
@@ -204,6 +204,19 @@ function transformPkg() {
|
||||
const ordered = reorder(raw, rule.order);
|
||||
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 = {
|
||||
"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." },
|
||||
@@ -244,14 +257,7 @@ const FILE_RULES = {
|
||||
},
|
||||
],
|
||||
"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_FRONTMATTER = { from: " - find", to: " - glob", label: "frontmatter tools", all: true };
|
||||
@@ -303,6 +309,8 @@ function portExtension() {
|
||||
writeFileSync(p, text);
|
||||
} else if (rel === "package.json") {
|
||||
writeFileSync(p, transformPkg());
|
||||
} else if (rel === "README.md") {
|
||||
writeFileSync(p, README_STUB);
|
||||
} else if (rel.endsWith(".md")) {
|
||||
let text = readFileSync(p, "utf8");
|
||||
if (FILE_RULES[rel]) text = applyOps(text, FILE_RULES[rel], rel);
|
||||
|
||||
Reference in New Issue
Block a user