mocode-ai 1.7.2 → 1.7.4

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.
Files changed (43) hide show
  1. package/README.md +2 -2
  2. package/README.zh-CN.md +2 -2
  3. package/dist/config/index.js +1 -1
  4. package/dist/config/profiles.js +2 -2
  5. package/dist/flows/cli.js +168 -0
  6. package/dist/flows/flow.js +483 -0
  7. package/dist/flows/runner.js +259 -0
  8. package/dist/flows/trace.js +242 -0
  9. package/dist/i18n/index.js +28 -0
  10. package/dist/index.js +7 -0
  11. package/dist/llm/index.js +1 -1
  12. package/dist/permissions/computer-review.js +40 -0
  13. package/dist/permissions/flow-review.js +41 -0
  14. package/dist/permissions/index.js +47 -28
  15. package/dist/repl/commands/flow.js +210 -0
  16. package/dist/repl/commands/registry.js +2 -0
  17. package/dist/repl/commands/tool-group.js +9 -1
  18. package/dist/repl/commands.js +10 -0
  19. package/dist/repl/running-input.js +75 -14
  20. package/dist/repl/runtime.js +4 -1
  21. package/dist/runtime/input-injector.js +39 -26
  22. package/dist/runtime/shutdown.js +3 -1
  23. package/dist/runtime/uia-selector.js +324 -0
  24. package/dist/runtime/uia-service.js +510 -0
  25. package/dist/runtime/wait-until.js +199 -0
  26. package/dist/runtime/window-list.js +164 -0
  27. package/dist/session/gui-actions.js +47 -0
  28. package/dist/tools/builtins/computer.js +647 -10
  29. package/dist/tools/builtins/index.js +4 -0
  30. package/dist/tools/builtins/run-flow.js +123 -0
  31. package/dist/tools/constants.js +1 -0
  32. package/dist/tools/router.js +1 -1
  33. package/dist/tools/validation.js +57 -0
  34. package/dist/ui/composer.js +6 -2
  35. package/dist/ui/layout-internal/content-write.js +74 -6
  36. package/dist/ui/layout-internal/core.js +32 -8
  37. package/dist/ui/layout-internal/screen.js +4 -0
  38. package/dist/ui/layout-internal/scroll.js +5 -3
  39. package/dist/ui/layout-internal/state.js +6 -0
  40. package/dist/ui/layout-internal/statusbar.js +16 -1
  41. package/dist/ui/render.js +19 -11
  42. package/docs/usage.md +344 -344
  43. package/package.json +92 -92
package/package.json CHANGED
@@ -1,92 +1,92 @@
1
- {
2
- "name": "mocode-ai",
3
- "version": "1.7.2",
4
- "description": "终端编码 agent:LLM + tool-call 循环 + 流式输出(含思考)+ 27 个工具,接任意 OpenAI 兼容后端。",
5
- "type": "module",
6
- "bin": {
7
- "mocode": "bin/mocode.js",
8
- "mocode-agent-host": "bin/mocode-agent-host.js"
9
- },
10
- "files": [
11
- "dist",
12
- "bin",
13
- "README.md",
14
- "README.zh-CN.md",
15
- "docs/usage.md"
16
- ],
17
- "workspaces": [
18
- "packages/*"
19
- ],
20
- "engines": {
21
- "node": ">=18"
22
- },
23
- "scripts": {
24
- "start": "tsx src/index.ts",
25
- "build": "npm run build --workspace @mocode/protocol && npm run build --workspace @mocode/runtime && tsc -p tsconfig.build.json",
26
- "build:electron": "npm run build && npm run check:electron-boundary && npm run typecheck --workspace mocode-work && npm run build --workspace mocode-work && npm run typecheck --workspace mocode-pet-app && npm run build --workspace mocode-pet-app && npm run smoke:runtime-host",
27
- "test": "tsc -p tsconfig.test-build.json && node --test --experimental-test-isolation=none \"dist-tests/tests/*.test.js\"",
28
- "typecheck": "npm run typecheck --workspace @mocode/protocol && npm run typecheck --workspace @mocode/runtime && tsc --noEmit && tsc -p tests/tsconfig.json && tsc -p evals/tsconfig.json",
29
- "check:electron-boundary": "npm run check:electron-boundary --workspace @mocode/runtime",
30
- "smoke:runtime-host": "npm run smoke:host --workspace @mocode/runtime",
31
- "pack:win": "npm run build && npm run pack:win --workspace mocode-work",
32
- "pack:mac": "npm run build && npm run pack:mac --workspace mocode-work",
33
- "pack:linux": "npm run build && npm run pack:linux --workspace mocode-work",
34
- "pack:dir": "npm run build && npm run pack:dir --workspace mocode-work",
35
- "lint": "eslint .",
36
- "lint:check": "eslint .",
37
- "lint:fix": "eslint . --fix",
38
- "format": "prettier --write .",
39
- "format:check": "prettier --check .",
40
- "eval:smoke": "tsx evals/smoke.ts && tsx evals/coding/smoke.ts && tsx evals/quality-metrics.ts && tsx evals/work-discipline.ts",
41
- "eval:coding": "tsx evals/coding/runner.ts",
42
- "eval:coding:list": "tsx evals/coding/runner.ts --list",
43
- "prepack": "npm run build",
44
- "prepare": "node -e \"try{require('child_process').execFileSync('git',['config','core.hooksPath','.githooks'],{stdio:'ignore'})}catch(e){}\""
45
- },
46
- "dependencies": {
47
- "@vscode/ripgrep": "^1.18.0",
48
- "ajv": "8.20.0",
49
- "cli-highlight": "^2.1.11",
50
- "dotenv": "^16.0.0",
51
- "fast-glob": "^3.0.0",
52
- "openai": "^4.0.0",
53
- "playwright": "1.62.1",
54
- "playwright-core": "1.62.1",
55
- "undici": "^6.21.0",
56
- "ws": "8.21.0"
57
- },
58
- "devDependencies": {
59
- "@mocode/protocol": "0.0.0",
60
- "@types/node": "^22.0.0",
61
- "@types/ws": "8.5.13",
62
- "eslint": "^9.39.5",
63
- "fast-check": "3.23.1",
64
- "globals": "^15.15.0",
65
- "prettier": "3.6.2",
66
- "tsx": "^4.0.0",
67
- "typescript": "^5.0.0",
68
- "typescript-eslint": "^8.69.0"
69
- },
70
- "repository": {
71
- "type": "git",
72
- "url": "git+https://github.com/wanxunyang/mocode.git"
73
- },
74
- "homepage": "https://github.com/wanxunyang/mocode",
75
- "keywords": [
76
- "ai-agent",
77
- "coding-agent",
78
- "terminal",
79
- "cli",
80
- "llm",
81
- "agent",
82
- "tui",
83
- "mcp",
84
- "ollama",
85
- "deepseek",
86
- "evals",
87
- "memory",
88
- "typescript"
89
- ],
90
- "author": "wxy",
91
- "license": "MIT"
92
- }
1
+ {
2
+ "name": "mocode-ai",
3
+ "version": "1.7.4",
4
+ "description": "终端编码 agent:LLM + tool-call 循环 + 流式输出(含思考)+ 27 个工具,接任意 OpenAI 兼容后端。",
5
+ "type": "module",
6
+ "bin": {
7
+ "mocode": "bin/mocode.js",
8
+ "mocode-agent-host": "bin/mocode-agent-host.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "bin",
13
+ "README.md",
14
+ "README.zh-CN.md",
15
+ "docs/usage.md"
16
+ ],
17
+ "workspaces": [
18
+ "packages/*"
19
+ ],
20
+ "engines": {
21
+ "node": ">=18"
22
+ },
23
+ "scripts": {
24
+ "start": "tsx src/index.ts",
25
+ "build": "npm run build --workspace @mocode/protocol && npm run build --workspace @mocode/runtime && tsc -p tsconfig.build.json",
26
+ "build:electron": "npm run build && npm run check:electron-boundary && npm run typecheck --workspace mocode-work && npm run build --workspace mocode-work && npm run typecheck --workspace mocode-pet-app && npm run build --workspace mocode-pet-app && npm run smoke:runtime-host",
27
+ "test": "tsc -p tsconfig.test-build.json && node --test --experimental-test-isolation=none \"dist-tests/tests/*.test.js\"",
28
+ "typecheck": "npm run typecheck --workspace @mocode/protocol && npm run typecheck --workspace @mocode/runtime && tsc --noEmit && tsc -p tests/tsconfig.json && tsc -p evals/tsconfig.json",
29
+ "check:electron-boundary": "npm run check:electron-boundary --workspace @mocode/runtime",
30
+ "smoke:runtime-host": "npm run smoke:host --workspace @mocode/runtime",
31
+ "pack:win": "npm run build && npm run pack:win --workspace mocode-work",
32
+ "pack:mac": "npm run build && npm run pack:mac --workspace mocode-work",
33
+ "pack:linux": "npm run build && npm run pack:linux --workspace mocode-work",
34
+ "pack:dir": "npm run build && npm run pack:dir --workspace mocode-work",
35
+ "lint": "eslint .",
36
+ "lint:check": "eslint .",
37
+ "lint:fix": "eslint . --fix",
38
+ "format": "prettier --write .",
39
+ "format:check": "prettier --check .",
40
+ "eval:smoke": "tsx evals/smoke.ts && tsx evals/coding/smoke.ts && tsx evals/quality-metrics.ts && tsx evals/work-discipline.ts",
41
+ "eval:coding": "tsx evals/coding/runner.ts",
42
+ "eval:coding:list": "tsx evals/coding/runner.ts --list",
43
+ "prepack": "npm run build",
44
+ "prepare": "node -e \"try{require('child_process').execFileSync('git',['config','core.hooksPath','.githooks'],{stdio:'ignore'})}catch(e){}\""
45
+ },
46
+ "dependencies": {
47
+ "@vscode/ripgrep": "^1.18.0",
48
+ "ajv": "8.20.0",
49
+ "cli-highlight": "^2.1.11",
50
+ "dotenv": "^16.0.0",
51
+ "fast-glob": "^3.0.0",
52
+ "openai": "^4.0.0",
53
+ "playwright": "1.62.1",
54
+ "playwright-core": "1.62.1",
55
+ "undici": "^6.21.0",
56
+ "ws": "8.21.0"
57
+ },
58
+ "devDependencies": {
59
+ "@mocode/protocol": "0.0.0",
60
+ "@types/node": "^22.0.0",
61
+ "@types/ws": "8.5.13",
62
+ "eslint": "^9.39.5",
63
+ "fast-check": "3.23.1",
64
+ "globals": "^15.15.0",
65
+ "prettier": "3.6.2",
66
+ "tsx": "^4.0.0",
67
+ "typescript": "^5.0.0",
68
+ "typescript-eslint": "^8.69.0"
69
+ },
70
+ "repository": {
71
+ "type": "git",
72
+ "url": "git+https://github.com/wanxunyang/mocode.git"
73
+ },
74
+ "homepage": "https://github.com/wanxunyang/mocode",
75
+ "keywords": [
76
+ "ai-agent",
77
+ "coding-agent",
78
+ "terminal",
79
+ "cli",
80
+ "llm",
81
+ "agent",
82
+ "tui",
83
+ "mcp",
84
+ "ollama",
85
+ "deepseek",
86
+ "evals",
87
+ "memory",
88
+ "typescript"
89
+ ],
90
+ "author": "wxy",
91
+ "license": "MIT"
92
+ }