zames_pro 2.20.0 → 2.21.1
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/agent-loop.js +20 -12
- package/dist/attachments.js +80 -17
- package/dist/browser.js +55 -12
- package/dist/commands.js +7 -2
- package/dist/config-menu.js +3 -1
- package/dist/config.js +157 -23
- package/dist/context.js +68 -13
- package/dist/extraTools.js +8 -2
- package/dist/i18n.js +745 -187
- package/dist/index.js +37 -16
- package/dist/input.js +136 -21
- package/dist/mcp.js +16 -4
- package/dist/path-token.js +4 -3
- package/dist/self-review.js +6 -6
- package/dist/spinner.js +8 -2
- package/dist/system-prompt.js +19 -5
- package/dist/tools.js +2 -6
- package/dist/web.js +1 -1
- package/dist/xml-toolcall.js +10 -5
- package/package.json +13 -2
- package/scripts/eslint-ts6.mjs +51 -0
package/dist/xml-toolcall.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
function unescapeXml(s) {
|
|
2
2
|
const A = String.fromCharCode(38); // ampersand
|
|
3
3
|
return String(s)
|
|
4
|
-
.split(A + 'lt;')
|
|
5
|
-
.
|
|
6
|
-
.split(A + '
|
|
7
|
-
.
|
|
8
|
-
.split(A + '
|
|
4
|
+
.split(A + 'lt;')
|
|
5
|
+
.join(String.fromCharCode(60))
|
|
6
|
+
.split(A + 'gt;')
|
|
7
|
+
.join(String.fromCharCode(62))
|
|
8
|
+
.split(A + 'quot;')
|
|
9
|
+
.join(String.fromCharCode(34))
|
|
10
|
+
.split(A + 'apos;')
|
|
11
|
+
.join(String.fromCharCode(39))
|
|
12
|
+
.split(A + 'amp;')
|
|
13
|
+
.join(A);
|
|
9
14
|
}
|
|
10
15
|
function readAttr(attrs, name) {
|
|
11
16
|
const Q = String.fromCharCode(34);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zames_pro",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.1",
|
|
4
4
|
"description": "Terminal coding agent over chat.deepseek.com via Playwright",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"dev": "ZAMES_NET_DEBUG=1 tsx ./src/index.ts --dev --headed",
|
|
19
19
|
"build": "tsc -p tsconfig.build.json",
|
|
20
20
|
"typecheck": "tsc --noEmit",
|
|
21
|
+
"lint": "node scripts/eslint-ts6.mjs",
|
|
22
|
+
"lint:fix": "node scripts/eslint-ts6.mjs --fix",
|
|
23
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json,md}\"",
|
|
24
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
21
25
|
"prepublishOnly": "npm run build",
|
|
22
26
|
"test": "tsx --test test/*.test.ts",
|
|
23
27
|
"test:watch": "tsx --test --watch test/*.test.ts",
|
|
@@ -56,9 +60,16 @@
|
|
|
56
60
|
"url": "https://github.com/Viqto0r/zames_pro/issues"
|
|
57
61
|
},
|
|
58
62
|
"devDependencies": {
|
|
63
|
+
"@eslint/js": "^9.39.5",
|
|
59
64
|
"@types/node": "^26.6.2",
|
|
65
|
+
"eslint": "^9.39.5",
|
|
66
|
+
"eslint-config-prettier": "^10.1.8",
|
|
67
|
+
"globals": "^17.12.0",
|
|
60
68
|
"husky": "^9.1.7",
|
|
69
|
+
"prettier": "^3.9.9",
|
|
61
70
|
"tsx": "^4.23.15",
|
|
62
|
-
"typescript": "^7.0.2"
|
|
71
|
+
"typescript": "^7.0.2",
|
|
72
|
+
"typescript-6": "npm:typescript@^6.0.0-beta",
|
|
73
|
+
"typescript-eslint": "^8.70.1"
|
|
63
74
|
}
|
|
64
75
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Run ESLint so that typescript-eslint uses the TypeScript 6 API.
|
|
2
|
+
//
|
|
3
|
+
// The project is built with TypeScript 7, but typescript-eslint (8.x) does
|
|
4
|
+
// not support the TS 7 API yet and refuses to start. Its own recommendation is
|
|
5
|
+
// to run "side by side with TypeScript 6": load the TS 6 compiler just for the
|
|
6
|
+
// linter. We do that by aliasing the `typescript` module to the `typescript-6`
|
|
7
|
+
// package for the duration of the ESLint process, without touching the
|
|
8
|
+
// compiler the project actually builds with.
|
|
9
|
+
import { createRequire } from 'module'
|
|
10
|
+
import Module from 'module'
|
|
11
|
+
import path from 'path'
|
|
12
|
+
import { fileURLToPath } from 'url'
|
|
13
|
+
|
|
14
|
+
const require = createRequire(import.meta.url)
|
|
15
|
+
const here = path.dirname(fileURLToPath(import.meta.url))
|
|
16
|
+
const ts6 = path.join(here, '..', 'node_modules', 'typescript-6')
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
require.resolve(path.join(ts6, 'lib', 'typescript.js'))
|
|
20
|
+
} catch {
|
|
21
|
+
console.error(
|
|
22
|
+
'eslint-ts6: the typescript-6 package is missing. Run: npm i -D typescript-6@npm:typescript@6',
|
|
23
|
+
)
|
|
24
|
+
process.exit(1)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// Patch Module._resolveFilename so any require('typescript') resolves to the
|
|
28
|
+
// TS 6 package instead of the TS 7 the project depends on.
|
|
29
|
+
const origResolve = Module._resolveFilename
|
|
30
|
+
Module._resolveFilename = function (request, ...rest) {
|
|
31
|
+
if (request === 'typescript') {
|
|
32
|
+
try {
|
|
33
|
+
return require.resolve(path.join(ts6, 'lib', 'typescript.js'))
|
|
34
|
+
} catch {
|
|
35
|
+
return origResolve.call(this, request, ...rest)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return origResolve.call(this, request, ...rest)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const { ESLint } = await import('eslint')
|
|
42
|
+
const eslint = new ESLint({ fix: process.argv.includes('--fix') })
|
|
43
|
+
const results = await eslint.lintFiles(['.'])
|
|
44
|
+
if (process.argv.includes('--fix')) {
|
|
45
|
+
await ESLint.outputFixes(results)
|
|
46
|
+
}
|
|
47
|
+
const formatter = await eslint.loadFormatter('stylish')
|
|
48
|
+
const out = await formatter.format(results)
|
|
49
|
+
if (out) process.stdout.write(out)
|
|
50
|
+
const errors = results.reduce((n, r) => n + r.errorCount, 0)
|
|
51
|
+
process.exit(errors > 0 ? 1 : 0)
|