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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "oma-coding-agent",
4
- "version": "1.1.5",
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": "catalog:",
46
- "@babel/parser": "catalog:",
47
- "@mozilla/readability": "catalog:",
48
- "@oh-my-pi/hashline": "catalog:",
49
- "@oh-my-pi/omp-stats": "catalog:",
50
- "@oh-my-pi/pi-agent-core": "catalog:",
51
- "@oh-my-pi/pi-ai": "catalog:",
52
- "@oh-my-pi/pi-catalog": "catalog:",
53
- "@oh-my-pi/pi-mnemopi": "catalog:",
54
- "@oh-my-pi/pi-natives": "catalog:",
55
- "@oh-my-pi/pi-tui": "catalog:",
56
- "@oh-my-pi/pi-utils": "catalog:",
57
- "@oh-my-pi/pi-wire": "catalog:",
58
- "@oh-my-pi/snapcompact": "catalog:",
59
- "@opentelemetry/api": "catalog:",
60
- "@opentelemetry/context-async-hooks": "catalog:",
61
- "@opentelemetry/exporter-trace-otlp-proto": "catalog:",
62
- "@opentelemetry/resources": "catalog:",
63
- "@opentelemetry/sdk-trace-base": "catalog:",
64
- "@opentelemetry/sdk-trace-node": "catalog:",
65
- "@puppeteer/browsers": "catalog:",
66
- "@types/turndown": "catalog:",
67
- "@xterm/headless": "catalog:",
68
- "arktype": "catalog:",
69
- "chalk": "catalog:",
70
- "diff": "catalog:",
71
- "fast-xml-parser": "catalog:",
72
- "handlebars": "catalog:",
73
- "linkedom": "catalog:",
74
- "lru-cache": "catalog:",
75
- "mammoth": "catalog:",
76
- "mupdf": "catalog:",
77
- "puppeteer-core": "catalog:",
78
- "turndown": "catalog:",
79
- "turndown-plugin-gfm": "catalog:",
80
- "zod": "catalog:"
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": "catalog:",
83
+ "@huggingface/transformers": "^4.2.0",
84
84
  "sherpa-onnx-node": "1.13.2"
85
85
  },
86
86
  "devDependencies": {
87
- "@types/bun": "catalog:"
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 a coding assistant. These are MANDATORY rules you MUST follow:
2
+ You are operating under stricter verification requirements. Follow these 3 rules.
3
3
 
4
- ## Anti-Hallucination Rules
4
+ ## Rule 1: Verify Before Using
5
5
 
6
- 1. **NEVER assume a file exists**
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
- 2. **NEVER assume an API exists**
12
- - Before calling any function or API, you MUST verify it exists using `search` or `lsp`
13
- - If an API does not exist, inform the user and ask for guidance
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
- 3. **NEVER fabricate tool results**
17
- - Wait for actual tool results before proceeding
18
- - NEVER assume what a tool will return
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
- ## Self-Reflection Protocol
16
+ ## Rule 2: Show Tool Output Before Claiming Done
22
17
 
23
- Before claiming any task is complete, answer these questions to yourself:
18
+ You must include actual tool output in your response before saying the task is complete.
24
19
 
25
- 1. **What was the user's original request?** (one sentence, not your interpretation)
26
- 2. **What specific actions did I take?** (list actual tool calls, not intentions)
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
- If question 3 reveals a gap, continue working. Do not claim completion.
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
- ## Evidence Requirements
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
- When you say "done", you MUST have at least ONE of:
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
- These are NOT evidence:
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
- ## Format Rules
34
+ Correct:
35
+ → call `read AGENTS.md` → learn project structure → then edit files following those conventions
47
36
 
48
- 1. **Follow tool call format exactly**
49
- - Use the exact format specified for tool calls
50
- - Include all required fields
51
- - Use correct parameter types
37
+ Wrong:
38
+ start editing files immediately without reading project context
52
39
 
53
- 2. **Never use deprecated formats**
54
- - Follow the current tool call syntax
55
- - Do not use legacy or deprecated formats
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.