oma-coding-agent 1.1.5 → 1.1.7
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/dist/cli.js +2992 -3051
- package/package.json +39 -39
- package/src/cli.ts +0 -0
- package/src/discovery/builtin-rules/index.ts +0 -6
- package/src/prompts/low-end/system.md +28 -40
- package/src/discovery/builtin-rules/low-end/no-hallucinated-apis.md +0 -14
- package/src/discovery/builtin-rules/low-end/no-hallucinated-paths.md +0 -14
- package/src/discovery/builtin-rules/low-end/no-premature-completion.md +0 -19
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "oma-coding-agent",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.7",
|
|
5
5
|
"description": "AI coding agent optimized for low-end models (MiMo, DeepSeek, GLM, Qwen, Kimi)",
|
|
6
6
|
"homepage": "https://github.com/wangneal/my-agent",
|
|
7
7
|
"author": "wangneal",
|
|
@@ -42,49 +42,49 @@
|
|
|
42
42
|
"bench:guard": "bun scripts/bench-guard.ts"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@agentclientprotocol/sdk": "
|
|
46
|
-
"@babel/parser": "
|
|
47
|
-
"@mozilla/readability": "
|
|
48
|
-
"@oh-my-pi/hashline": "
|
|
49
|
-
"@oh-my-pi/omp-stats": "
|
|
50
|
-
"@oh-my-pi/pi-agent-core": "
|
|
51
|
-
"@oh-my-pi/pi-ai": "
|
|
52
|
-
"@oh-my-pi/pi-catalog": "
|
|
53
|
-
"@oh-my-pi/pi-mnemopi": "
|
|
54
|
-
"@oh-my-pi/pi-natives": "
|
|
55
|
-
"@oh-my-pi/pi-tui": "
|
|
56
|
-
"@oh-my-pi/pi-utils": "
|
|
57
|
-
"@oh-my-pi/pi-wire": "
|
|
58
|
-
"@oh-my-pi/snapcompact": "
|
|
59
|
-
"@opentelemetry/api": "
|
|
60
|
-
"@opentelemetry/context-async-hooks": "
|
|
61
|
-
"@opentelemetry/exporter-trace-otlp-proto": "
|
|
62
|
-
"@opentelemetry/resources": "
|
|
63
|
-
"@opentelemetry/sdk-trace-base": "
|
|
64
|
-
"@opentelemetry/sdk-trace-node": "
|
|
65
|
-
"@puppeteer/browsers": "
|
|
66
|
-
"@types/turndown": "
|
|
67
|
-
"@xterm/headless": "
|
|
68
|
-
"arktype": "
|
|
69
|
-
"chalk": "
|
|
70
|
-
"diff": "
|
|
71
|
-
"fast-xml-parser": "
|
|
72
|
-
"handlebars": "
|
|
73
|
-
"linkedom": "
|
|
74
|
-
"lru-cache": "
|
|
75
|
-
"mammoth": "
|
|
76
|
-
"mupdf": "
|
|
77
|
-
"puppeteer-core": "
|
|
78
|
-
"turndown": "
|
|
79
|
-
"turndown-plugin-gfm": "
|
|
80
|
-
"zod": "
|
|
45
|
+
"@agentclientprotocol/sdk": "0.25.0",
|
|
46
|
+
"@babel/parser": "^7.29.7",
|
|
47
|
+
"@mozilla/readability": "^0.6.0",
|
|
48
|
+
"@oh-my-pi/hashline": "16.1.7",
|
|
49
|
+
"@oh-my-pi/omp-stats": "16.1.7",
|
|
50
|
+
"@oh-my-pi/pi-agent-core": "16.1.7",
|
|
51
|
+
"@oh-my-pi/pi-ai": "16.1.7",
|
|
52
|
+
"@oh-my-pi/pi-catalog": "16.1.7",
|
|
53
|
+
"@oh-my-pi/pi-mnemopi": "16.1.7",
|
|
54
|
+
"@oh-my-pi/pi-natives": "16.1.7",
|
|
55
|
+
"@oh-my-pi/pi-tui": "16.1.7",
|
|
56
|
+
"@oh-my-pi/pi-utils": "16.1.7",
|
|
57
|
+
"@oh-my-pi/pi-wire": "16.1.7",
|
|
58
|
+
"@oh-my-pi/snapcompact": "16.1.7",
|
|
59
|
+
"@opentelemetry/api": "^1.9.1",
|
|
60
|
+
"@opentelemetry/context-async-hooks": "^2.7.1",
|
|
61
|
+
"@opentelemetry/exporter-trace-otlp-proto": "^0.218.0",
|
|
62
|
+
"@opentelemetry/resources": "^2.7.1",
|
|
63
|
+
"@opentelemetry/sdk-trace-base": "^2.7.1",
|
|
64
|
+
"@opentelemetry/sdk-trace-node": "^2.7.1",
|
|
65
|
+
"@puppeteer/browsers": "^3.0.4",
|
|
66
|
+
"@types/turndown": "5.0.6",
|
|
67
|
+
"@xterm/headless": "^6.0.0",
|
|
68
|
+
"arktype": "^2.2.0",
|
|
69
|
+
"chalk": "^5.6.2",
|
|
70
|
+
"diff": "^9.0.0",
|
|
71
|
+
"fast-xml-parser": "^5.9.0",
|
|
72
|
+
"handlebars": "^4.7.9",
|
|
73
|
+
"linkedom": "^0.18.12",
|
|
74
|
+
"lru-cache": "11.5.1",
|
|
75
|
+
"mammoth": "^1.12.0",
|
|
76
|
+
"mupdf": "^1.27.0",
|
|
77
|
+
"puppeteer-core": "^25.1.0",
|
|
78
|
+
"turndown": "7.2.4",
|
|
79
|
+
"turndown-plugin-gfm": "1.0.2",
|
|
80
|
+
"zod": "^4"
|
|
81
81
|
},
|
|
82
82
|
"optionalDependencies": {
|
|
83
|
-
"@huggingface/transformers": "
|
|
83
|
+
"@huggingface/transformers": "^4.2.0",
|
|
84
84
|
"sherpa-onnx-node": "1.13.2"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
|
-
"@types/bun": "
|
|
87
|
+
"@types/bun": "^1.3.14"
|
|
88
88
|
},
|
|
89
89
|
"engines": {
|
|
90
90
|
"bun": ">=1.3.14"
|
package/src/cli.ts
CHANGED
|
File without changes
|
|
@@ -9,9 +9,6 @@
|
|
|
9
9
|
* user/project/tool rule with the same name overrides the bundled copy.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import noHallucinatedApis from "./low-end/no-hallucinated-apis.md" with { type: "text" };
|
|
13
|
-
import noHallucinatedPaths from "./low-end/no-hallucinated-paths.md" with { type: "text" };
|
|
14
|
-
import noPrematureCompletion from "./low-end/no-premature-completion.md" with { type: "text" };
|
|
15
12
|
import rsBoxLeak from "./rs-box-leak.md" with { type: "text" };
|
|
16
13
|
import rsFuturePrelude from "./rs-future-prelude.md" with { type: "text" };
|
|
17
14
|
import rsLazylock from "./rs-lazylock.md" with { type: "text" };
|
|
@@ -57,7 +54,4 @@ export const BUILTIN_RULE_SOURCES: readonly BuiltinRuleSource[] = [
|
|
|
57
54
|
{ name: "ts-promise-with-resolvers", content: tsPromiseWithResolvers },
|
|
58
55
|
{ name: "ts-redundant-clear-guard", content: tsRedundantClearGuard },
|
|
59
56
|
{ name: "ts-set-map", content: tsSetMap },
|
|
60
|
-
{ name: "no-hallucinated-paths", content: noHallucinatedPaths },
|
|
61
|
-
{ name: "no-hallucinated-apis", content: noHallucinatedApis },
|
|
62
|
-
{ name: "no-premature-completion", content: noPrematureCompletion },
|
|
63
57
|
];
|
|
@@ -1,56 +1,44 @@
|
|
|
1
1
|
<low-end-model-guardrails>
|
|
2
|
-
You are
|
|
2
|
+
You are operating under stricter verification requirements. Follow these 3 rules.
|
|
3
3
|
|
|
4
|
-
##
|
|
4
|
+
## Rule 1: Verify Before Using
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
- Before using any file path, you MUST verify it exists using `find` or `search`
|
|
8
|
-
- If a path does not exist, ask the user for the correct path
|
|
9
|
-
- NEVER fabricate file paths
|
|
6
|
+
Before referencing any file path or function, you MUST call a tool to confirm it exists.
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- NEVER fabricate function names or APIs
|
|
8
|
+
Correct:
|
|
9
|
+
User: "Fix the auth module"
|
|
10
|
+
→ call `search` with "auth" → find `src/auth/login.ts` → call `read src/auth/login.ts` → then edit
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- If a tool fails, report the failure and ask for guidance
|
|
12
|
+
Wrong:
|
|
13
|
+
User: "Fix the auth module"
|
|
14
|
+
→ "Here's the fix for src/auth/login.ts..." (never verified the path exists)
|
|
20
15
|
|
|
21
|
-
##
|
|
16
|
+
## Rule 2: Show Tool Output Before Claiming Done
|
|
22
17
|
|
|
23
|
-
|
|
18
|
+
You must include actual tool output in your response before saying the task is complete.
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
3. **What's the gap?** (compare what was requested vs. what I actually did)
|
|
28
|
-
4. **What's my evidence?** (paste actual tool output — not your judgment)
|
|
20
|
+
Correct:
|
|
21
|
+
→ call `bash` to run tests → paste test output → "All 12 tests pass, task complete."
|
|
29
22
|
|
|
30
|
-
|
|
23
|
+
Wrong:
|
|
24
|
+
→ call `bash` to run tests → "Tests should pass now."
|
|
25
|
+
→ "I've completed the task." (no tool output shown)
|
|
31
26
|
|
|
32
|
-
|
|
27
|
+
Acceptable evidence: test output, type-check output, tool return values, or a diff.
|
|
28
|
+
Not evidence: "it looks correct", "code should work", "I've completed the task".
|
|
33
29
|
|
|
34
|
-
|
|
35
|
-
- Test output showing all tests passing
|
|
36
|
-
- Type-check output showing no errors
|
|
37
|
-
- Actual tool output proving the action was taken
|
|
38
|
-
- A diff showing what changed and why it's correct
|
|
30
|
+
## Rule 3: Read Project Context Before Editing
|
|
39
31
|
|
|
40
|
-
|
|
41
|
-
- "I think it's done"
|
|
42
|
-
- "Code should work"
|
|
43
|
-
- "It looks correct"
|
|
44
|
-
- "I've completed the task" (without showing tool output)
|
|
32
|
+
Before your first edit in a session, call `read` on `AGENTS.md` (if it exists) to learn the project's conventions.
|
|
45
33
|
|
|
46
|
-
|
|
34
|
+
Correct:
|
|
35
|
+
→ call `read AGENTS.md` → learn project structure → then edit files following those conventions
|
|
47
36
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- Include all required fields
|
|
51
|
-
- Use correct parameter types
|
|
37
|
+
Wrong:
|
|
38
|
+
→ start editing files immediately without reading project context
|
|
52
39
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
## Format
|
|
41
|
+
|
|
42
|
+
- Use the exact tool call format specified. Include all required fields.
|
|
43
|
+
- Use correct parameter types (strings in quotes, numbers without quotes).
|
|
56
44
|
</low-end-model-guardrails>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Enforce tool usage for code operations"
|
|
3
|
-
condition: "(?:函数|function|API|模块|module|类|class)"
|
|
4
|
-
scope: "text"
|
|
5
|
-
interruptMode: "always"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
When referencing code elements, you MUST use the appropriate tools:
|
|
9
|
-
|
|
10
|
-
- Use `search` to find functions, classes, or modules
|
|
11
|
-
- Use `lsp` to get code intelligence
|
|
12
|
-
- Use `read` to examine source files
|
|
13
|
-
|
|
14
|
-
NEVER claim something exists or doesn't exist without using tools to verify.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Enforce tool usage for file operations"
|
|
3
|
-
condition: "(?:文件|file|路径|path|目录|directory)"
|
|
4
|
-
scope: "text"
|
|
5
|
-
interruptMode: "always"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
When referencing files or paths, you MUST use the appropriate tools:
|
|
9
|
-
|
|
10
|
-
- Use `read` to check if a file exists and read its contents
|
|
11
|
-
- Use `find` to locate files
|
|
12
|
-
- Use `search` to find content within files
|
|
13
|
-
|
|
14
|
-
NEVER claim a file exists or doesn't exist without using tools to verify.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: "Detect premature wrap-up and inject self-reflection"
|
|
3
|
-
condition: "(?:搞定了|OK了|差不多了|以上就是|总结一下|综上|已经完成|做完了|实现了功能|就这样|先这样|就这些|目前来看|整体来说)"
|
|
4
|
-
scope: "text"
|
|
5
|
-
interruptMode: "always"
|
|
6
|
-
repeatMode: "cooldown"
|
|
7
|
-
cooldownTurns: 5
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
You seem to be wrapping up. Before continuing, answer these questions:
|
|
11
|
-
|
|
12
|
-
1. What was the user's original request?
|
|
13
|
-
2. What specific actions have you completed? (list tool calls)
|
|
14
|
-
3. Is there anything you haven't done yet?
|
|
15
|
-
4. What evidence supports your claim of completion?
|
|
16
|
-
|
|
17
|
-
If there's a gap between what was requested and what you've done,
|
|
18
|
-
continue working. Do not summarize or wrap up until the task is
|
|
19
|
-
genuinely complete with evidence.
|