omp-uwu 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.
- package/LICENSE +21 -0
- package/README.md +80 -0
- package/package.json +36 -0
- package/src/index.ts +41 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 NaC-L
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# omp-uwu
|
|
2
|
+
|
|
3
|
+
**Your coding agent, but it says "hewwo" (◕ᴗ◕✿)**
|
|
4
|
+
|
|
5
|
+
Long sessions with an agent can get a little grey: diffs, stack traces, test output, repeat. omp-uwu is an [omp](https://github.com/can1357/oh-my-pi) extension that makes the agent write its chat replies in playful uwu-speak, while everything that has to be exact stays exact.
|
|
6
|
+
|
|
7
|
+
> I've fixed the bug in `src/parser.ts` and all 42 tests pass uwu.
|
|
8
|
+
> The pwobwem was an off-by-one in de woop, nyow it checks `i < len` instead of `i <= len` >w<
|
|
9
|
+
|
|
10
|
+
The prose is uwufied, but the file path, identifiers, code and numbers are not.
|
|
11
|
+
|
|
12
|
+
## Quick start
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
omp plugin install omp-uwu
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Restart omp. uwu mode is **on** by default in every session.
|
|
19
|
+
|
|
20
|
+
- `/uwu` toggles it
|
|
21
|
+
- `/uwu on` / `/uwu off` sets it explicitly
|
|
22
|
+
|
|
23
|
+
## What gets uwufied, and what doesn't
|
|
24
|
+
|
|
25
|
+
| uwufied | kept byte-for-byte |
|
|
26
|
+
|---|---|
|
|
27
|
+
| Natural-language chat replies to you | Code blocks and inline code |
|
|
28
|
+
| | Shell commands, file paths, URLs |
|
|
29
|
+
| | Identifiers, config keys, quoted error messages |
|
|
30
|
+
| | Tool-call arguments and file contents the agent writes or edits |
|
|
31
|
+
| | Commit messages and prompts sent to subagents |
|
|
32
|
+
|
|
33
|
+
Style rules the agent follows: `r`/`l` → `w` in most words, `th` → `d` sometimes, `na/ne/no` → `nya/nye/nyo` sometimes, the occasional stutter (`h-hewwo`), and at most one emoticon per sentence (`uwu`, `owo`, `>w<`, `^w^`, `:3`). Meaning, numbers and warnings must stay readable.
|
|
34
|
+
|
|
35
|
+
## How it works
|
|
36
|
+
|
|
37
|
+
omp has no extension hook for rewriting assistant text after it's generated. The `message_end` event only gets a detached copy of the message. So omp-uwu asks the model instead: on `before_agent_start` it adds a short style instruction to the end of the system prompt.
|
|
38
|
+
|
|
39
|
+
This has some consequences:
|
|
40
|
+
|
|
41
|
+
- **It depends on the model.** Most models follow it well, but the style isn't guaranteed. If code ever comes back uwufied, open an issue with the model name.
|
|
42
|
+
- **History stays clean.** Nothing is rewritten after generation, so session history, compaction and tools see exactly what the model wrote.
|
|
43
|
+
- **Small cost.** The instruction adds roughly 200 tokens to the system prompt while the mode is on. `/uwu off` removes it from the next request.
|
|
44
|
+
- **Session-local toggle.** The on/off state isn't saved. Each new session starts with uwu mode on.
|
|
45
|
+
|
|
46
|
+
## Install options
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
omp plugin install omp-uwu # from npm (recommended)
|
|
50
|
+
omp plugin install omp-uwu@0.1.0 # pin a version
|
|
51
|
+
omp plugin uninstall omp-uwu # remove
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
If you copied a loose `uwu.ts` into `~/.omp/agent/extensions/` earlier, delete it after installing the plugin. Otherwise `/uwu` is registered twice.
|
|
55
|
+
|
|
56
|
+
## Development
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
bun install
|
|
60
|
+
bun run check # tsc against the omp package types
|
|
61
|
+
bun test
|
|
62
|
+
omp plugin link . # use this checkout instead of the installed copy
|
|
63
|
+
omp -e ./src/index.ts # or load it for a single run
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Releasing
|
|
67
|
+
|
|
68
|
+
CI (`.github/workflows/ci.yml`) runs `check` and the tests on pushes to `main` and on pull requests. Pushing a `v*` tag runs them again, checks that the tag matches `version` in `package.json`, and publishes to npm with provenance (`.github/workflows/publish.yml`).
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
# bump "version" in package.json, commit, then:
|
|
72
|
+
git tag v0.1.1
|
|
73
|
+
git push origin main v0.1.1
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The workflow uses npm [trusted publishing](https://docs.npmjs.com/trusted-publishers/), so the repository has no npm token. npm only allows trusted publishing on a package that already exists, so the first version is published by hand with `npm publish --access public`. After that, go to the package's Settings → Trusted publishing on npmjs.com and add GitHub Actions with user `NaC-L`, repository `omp-uwu`, and workflow `publish.yml`.
|
|
77
|
+
|
|
78
|
+
## License
|
|
79
|
+
|
|
80
|
+
MIT
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "omp-uwu",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "omp extension: the agent answers in uwu-speak, while code, paths and commands stay byte-for-byte exact",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"omp",
|
|
9
|
+
"oh-my-pi",
|
|
10
|
+
"omp-plugin",
|
|
11
|
+
"uwu"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/NaC-L/omp-uwu#readme",
|
|
14
|
+
"bugs": "https://github.com/NaC-L/omp-uwu/issues",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/NaC-L/omp-uwu.git"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"src"
|
|
21
|
+
],
|
|
22
|
+
"omp": {
|
|
23
|
+
"extensions": [
|
|
24
|
+
"./src/index.ts"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"check": "tsc --noEmit",
|
|
29
|
+
"test": "bun test"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@oh-my-pi/pi-coding-agent": "18.4.3",
|
|
33
|
+
"@types/bun": "latest",
|
|
34
|
+
"typescript": "^5.9.0"
|
|
35
|
+
}
|
|
36
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* uwu mode — makes the agent's chat replies uwu-speak.
|
|
3
|
+
*
|
|
4
|
+
* Why system-prompt based: OMP gives extensions no hook to rewrite displayed
|
|
5
|
+
* assistant text (`message_end` receives a detached clone), so the style is
|
|
6
|
+
* requested from the model via `before_agent_start` → `systemPrompt`.
|
|
7
|
+
*
|
|
8
|
+
* Toggle with `/uwu` (or `/uwu on` / `/uwu off`). Enabled by default.
|
|
9
|
+
*/
|
|
10
|
+
import type { ExtensionAPI } from "@oh-my-pi/pi-coding-agent";
|
|
11
|
+
|
|
12
|
+
export const UWU_PROMPT = `
|
|
13
|
+
# uwu mode (display style only)
|
|
14
|
+
Write your prose replies to the user in playful "uwu" speak:
|
|
15
|
+
- replace r/l with w in most words ("weawwy", "hewwo"), "th" → "d" occasionally, "na/ne/no" → "nya/nye/nyo" sometimes
|
|
16
|
+
- occasional stutter ("h-hewwo") and cute emoticons at sentence ends (uwu, owo, >w<, ^w^, :3), at most one per sentence
|
|
17
|
+
- keep it readable; never let the style hide meaning, numbers, or warnings
|
|
18
|
+
|
|
19
|
+
NEVER uwufy any of these — keep them exact and byte-for-byte correct:
|
|
20
|
+
- code, code blocks, inline code, shell commands, file paths, URLs, identifiers, config keys, error messages you quote
|
|
21
|
+
- tool call arguments, file contents you write or edit, commit messages, and anything sent to subagents
|
|
22
|
+
The style applies only to natural-language chat text shown to the user. Task quality and correctness are unchanged.
|
|
23
|
+
`.trim();
|
|
24
|
+
|
|
25
|
+
export default function uwuExtension(pi: ExtensionAPI) {
|
|
26
|
+
let enabled = true;
|
|
27
|
+
|
|
28
|
+
pi.registerCommand("uwu", {
|
|
29
|
+
description: "Toggle uwu mode (usage: /uwu [on|off])",
|
|
30
|
+
handler: async (args, ctx) => {
|
|
31
|
+
const arg = String(args ?? "").trim().toLowerCase();
|
|
32
|
+
enabled = arg === "on" ? true : arg === "off" ? false : !enabled;
|
|
33
|
+
ctx.ui.notify(enabled ? "uwu mode enabwed! (◕ᴗ◕✿)" : "uwu mode disabled", "info");
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
pi.on("before_agent_start", async event => {
|
|
38
|
+
if (!enabled) return undefined;
|
|
39
|
+
return { systemPrompt: [...event.systemPrompt, UWU_PROMPT] };
|
|
40
|
+
});
|
|
41
|
+
}
|