diff --git a/.gitignore b/.gitignore index 905e180..6763813 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ dist/ .DS_Store *.tgz package-lock.json +__pycache__/ diff --git a/bun.lock b/bun.lock index b3ffc6c..6c17645 100644 --- a/bun.lock +++ b/bun.lock @@ -36,7 +36,7 @@ }, "packages/daemon": { "name": "ework-daemon", - "version": "0.4.134", + "version": "0.4.211", "bin": { "ework-daemon": "./src/cli.ts", "ework-daemon-server": "./bin/ework-daemon-server.js", @@ -97,7 +97,7 @@ }, "packages/web": { "name": "ework-web", - "version": "0.10.163", + "version": "0.10.200", "bin": { "ework-web": "./bin/ework-web.js", }, @@ -119,57 +119,57 @@ }, }, "packages": { - "@asamuzakjp/css-color": ["@asamuzakjp/css-color@5.1.11", "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz", { "dependencies": { "@asamuzakjp/generational-cache": "^1.0.1", "@csstools/css-calc": "^3.2.0", "@csstools/css-color-parser": "^4.1.0", "@csstools/css-parser-algorithms": "^4.0.0", "@csstools/css-tokenizer": "^4.0.0" } }, "sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg=="], + "@asamuzakjp/css-color": ["@asamuzakjp/css-color@5.1.11", "", { "dependencies": { "@asamuzakjp/generational-cache": "^1.0.1", "@csstools/css-calc": "^3.2.0", "@csstools/css-color-parser": "^4.1.0", "@csstools/css-parser-algorithms": "^4.0.0", "@csstools/css-tokenizer": "^4.0.0" } }, "sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg=="], - "@asamuzakjp/dom-selector": ["@asamuzakjp/dom-selector@7.1.1", "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-7.1.1.tgz", { "dependencies": { "@asamuzakjp/generational-cache": "^1.0.1", "@asamuzakjp/nwsapi": "^2.3.9", "bidi-js": "^1.0.3", "css-tree": "^3.2.1", "is-potential-custom-element-name": "^1.0.1" } }, "sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ=="], + "@asamuzakjp/dom-selector": ["@asamuzakjp/dom-selector@7.1.1", "", { "dependencies": { "@asamuzakjp/generational-cache": "^1.0.1", "@asamuzakjp/nwsapi": "^2.3.9", "bidi-js": "^1.0.3", "css-tree": "^3.2.1", "is-potential-custom-element-name": "^1.0.1" } }, "sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ=="], - "@asamuzakjp/generational-cache": ["@asamuzakjp/generational-cache@1.0.1", "https://registry.npmjs.org/@asamuzakjp/generational-cache/-/generational-cache-1.0.1.tgz", {}, "sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg=="], + "@asamuzakjp/generational-cache": ["@asamuzakjp/generational-cache@1.0.1", "", {}, "sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg=="], - "@asamuzakjp/nwsapi": ["@asamuzakjp/nwsapi@2.3.9", "https://registry.npmjs.org/@asamuzakjp/nwsapi/-/nwsapi-2.3.9.tgz", {}, "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q=="], + "@asamuzakjp/nwsapi": ["@asamuzakjp/nwsapi@2.3.9", "", {}, "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q=="], - "@bramus/specificity": ["@bramus/specificity@2.4.2", "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.2.tgz", { "dependencies": { "css-tree": "^3.0.0" }, "bin": { "specificity": "bin/cli.js" } }, "sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw=="], + "@bramus/specificity": ["@bramus/specificity@2.4.2", "", { "dependencies": { "css-tree": "^3.0.0" }, "bin": { "specificity": "bin/cli.js" } }, "sha512-ctxtJ/eA+t+6q2++vj5j7FYX3nRu311q1wfYH3xjlLOsczhlhxAg2FWNUXhpGvAw3BWo1xBcvOV6/YLc2r5FJw=="], - "@csstools/color-helpers": ["@csstools/color-helpers@6.1.1", "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.1.tgz", {}, "sha512-gLNsunvwf3mCi5u5o46/Z/JcJMnhbHSaZ69rkgPzNM3J4s8hWwpPUQB6/tt0EDFyCiWzxANlx+2LJwpYj4zS1w=="], + "@csstools/color-helpers": ["@csstools/color-helpers@6.1.1", "", {}, "sha512-gLNsunvwf3mCi5u5o46/Z/JcJMnhbHSaZ69rkgPzNM3J4s8hWwpPUQB6/tt0EDFyCiWzxANlx+2LJwpYj4zS1w=="], - "@csstools/css-calc": ["@csstools/css-calc@3.3.0", "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.3.0.tgz", { "peerDependencies": { "@csstools/css-parser-algorithms": "^4.0.0", "@csstools/css-tokenizer": "^4.0.0" } }, "sha512-c5ihYsPkdG6JCkU2zTMm4+k6r7RXuGxtWYhu5DHMIiF1FHzrfmHL5so11AoFpUv/tu61xfcmT4AmKoFfMPoqdQ=="], + "@csstools/css-calc": ["@csstools/css-calc@3.3.0", "", { "peerDependencies": { "@csstools/css-parser-algorithms": "^4.0.0", "@csstools/css-tokenizer": "^4.0.0" } }, "sha512-c5ihYsPkdG6JCkU2zTMm4+k6r7RXuGxtWYhu5DHMIiF1FHzrfmHL5so11AoFpUv/tu61xfcmT4AmKoFfMPoqdQ=="], - "@csstools/css-color-parser": ["@csstools/css-color-parser@4.2.2", "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.2.2.tgz", { "dependencies": { "@csstools/color-helpers": "^6.1.1", "@csstools/css-calc": "^3.3.0" }, "peerDependencies": { "@csstools/css-parser-algorithms": "^4.0.0", "@csstools/css-tokenizer": "^4.0.0" } }, "sha512-3QKjR/vxyjcSXBLgb6lP0S3MGdvwbmqSsvLPbYdVORqPDc8FX1HAJ0Spk38bxaRXgvENTA47tlhhbb5Z2e8hEg=="], + "@csstools/css-color-parser": ["@csstools/css-color-parser@4.2.2", "", { "dependencies": { "@csstools/color-helpers": "^6.1.1", "@csstools/css-calc": "^3.3.0" }, "peerDependencies": { "@csstools/css-parser-algorithms": "^4.0.0", "@csstools/css-tokenizer": "^4.0.0" } }, "sha512-3QKjR/vxyjcSXBLgb6lP0S3MGdvwbmqSsvLPbYdVORqPDc8FX1HAJ0Spk38bxaRXgvENTA47tlhhbb5Z2e8hEg=="], - "@csstools/css-parser-algorithms": ["@csstools/css-parser-algorithms@4.0.0", "https://registry.npmjs.org/@csstools/css-parser-algorithms/-/css-parser-algorithms-4.0.0.tgz", { "peerDependencies": { "@csstools/css-tokenizer": "^4.0.0" } }, "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w=="], + "@csstools/css-parser-algorithms": ["@csstools/css-parser-algorithms@4.0.0", "", { "peerDependencies": { "@csstools/css-tokenizer": "^4.0.0" } }, "sha512-+B87qS7fIG3L5h3qwJ/IFbjoVoOe/bpOdh9hAjXbvx0o8ImEmUsGXN0inFOnk2ChCFgqkkGFQ+TpM5rbhkKe4w=="], - "@csstools/css-syntax-patches-for-csstree": ["@csstools/css-syntax-patches-for-csstree@1.1.13", "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.13.tgz", { "peerDependencies": { "css-tree": "^3.2.1" }, "optionalPeers": ["css-tree"] }, "sha512-i9ZylF5QNhmNfPA9l0vHAWK4kPrbIp6g9lKgaiIFsIBz2F/WNB7OLrzlNNcCOm+h42bkaSD2v1PG+IBPHhc3ZA=="], + "@csstools/css-syntax-patches-for-csstree": ["@csstools/css-syntax-patches-for-csstree@1.1.13", "", { "peerDependencies": { "css-tree": "^3.2.1" }, "optionalPeers": ["css-tree"] }, "sha512-i9ZylF5QNhmNfPA9l0vHAWK4kPrbIp6g9lKgaiIFsIBz2F/WNB7OLrzlNNcCOm+h42bkaSD2v1PG+IBPHhc3ZA=="], - "@csstools/css-tokenizer": ["@csstools/css-tokenizer@4.0.0", "https://registry.npmjs.org/@csstools/css-tokenizer/-/css-tokenizer-4.0.0.tgz", {}, "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA=="], + "@csstools/css-tokenizer": ["@csstools/css-tokenizer@4.0.0", "", {}, "sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA=="], - "@exodus/bytes": ["@exodus/bytes@1.15.1", "https://registry.npmjs.org/@exodus/bytes/-/bytes-1.15.1.tgz", { "peerDependencies": { "@noble/hashes": "^1.8.0 || ^2.0.0" }, "optionalPeers": ["@noble/hashes"] }, "sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q=="], + "@exodus/bytes": ["@exodus/bytes@1.15.1", "", { "peerDependencies": { "@noble/hashes": "^1.8.0 || ^2.0.0" }, "optionalPeers": ["@noble/hashes"] }, "sha512-S6mL0yNB/Abt9Ei4tq8gDhcczc4S3+vQ4ra7vxnAf+YHC02srtqxKKZghx2Dq6p0e66THKwR6r8N6P95wEty7Q=="], - "@types/bun": ["@types/bun@1.4.4", "https://registry.npmjs.org/@types/bun/-/bun-1.4.4.tgz", { "dependencies": { "bun-types": "1.4.4" } }, "sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ=="], + "@types/bun": ["@types/bun@1.4.4", "", { "dependencies": { "bun-types": "1.4.4" } }, "sha512-9wkRDXUXK124pEnAutE6n/l18j+i9GC5IAHK8TmX/2nlySETmky0OU6yL5U8pW1AoKh++AN9auDCr647BfurjQ=="], - "@types/dompurify": ["@types/dompurify@3.2.0", "https://registry.npmjs.org/@types/dompurify/-/dompurify-3.2.0.tgz", { "dependencies": { "dompurify": "*" } }, "sha512-Fgg31wv9QbLDA0SpTOXO3MaxySc4DKGLi8sna4/Utjo4r3ZRPdCt4UQee8BWr+Q5z21yifghREPJGYaEOEIACg=="], + "@types/dompurify": ["@types/dompurify@3.2.0", "", { "dependencies": { "dompurify": "*" } }, "sha512-Fgg31wv9QbLDA0SpTOXO3MaxySc4DKGLi8sna4/Utjo4r3ZRPdCt4UQee8BWr+Q5z21yifghREPJGYaEOEIACg=="], - "@types/jsdom": ["@types/jsdom@28.0.3", "https://registry.npmjs.org/@types/jsdom/-/jsdom-28.0.3.tgz", { "dependencies": { "@types/node": "*", "@types/tough-cookie": "*", "parse5": "^8.0.0", "undici-types": "^7.21.0" } }, "sha512-/HQ2uFoetFTXuye8vzIcHw2z6Fwi7Hi/qcgC+RoS9NCyewiqxhVGqlG+ViGB6lkax481R6dmhf1I7lIGlzJStQ=="], + "@types/jsdom": ["@types/jsdom@28.0.3", "", { "dependencies": { "@types/node": "*", "@types/tough-cookie": "*", "parse5": "^8.0.0", "undici-types": "^7.21.0" } }, "sha512-/HQ2uFoetFTXuye8vzIcHw2z6Fwi7Hi/qcgC+RoS9NCyewiqxhVGqlG+ViGB6lkax481R6dmhf1I7lIGlzJStQ=="], - "@types/node": ["@types/node@22.20.2", "https://registry.npmjs.org/@types/node/-/node-22.20.2.tgz", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-xlvWf4Vs9n1PEVYwP1n4vvG07M6y8WgvJ2t0vbrWTmijsIHp1cS+uJ2kMIRdY3nHZK0nCYKrPeD171+SzF4/zw=="], + "@types/node": ["@types/node@22.20.2", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-xlvWf4Vs9n1PEVYwP1n4vvG07M6y8WgvJ2t0vbrWTmijsIHp1cS+uJ2kMIRdY3nHZK0nCYKrPeD171+SzF4/zw=="], - "@types/tough-cookie": ["@types/tough-cookie@4.0.5", "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.5.tgz", {}, "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA=="], + "@types/tough-cookie": ["@types/tough-cookie@4.0.5", "", {}, "sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA=="], - "@types/trusted-types": ["@types/trusted-types@2.0.7", "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], + "@types/trusted-types": ["@types/trusted-types@2.0.7", "", {}, "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw=="], - "aws-ssl-profiles": ["aws-ssl-profiles@1.1.2", "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz", {}, "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g=="], + "aws-ssl-profiles": ["aws-ssl-profiles@1.1.2", "", {}, "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g=="], - "bidi-js": ["bidi-js@1.1.0", "https://registry.npmjs.org/bidi-js/-/bidi-js-1.1.0.tgz", { "dependencies": { "require-from-string": "^2.0.2" } }, "sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg=="], + "bidi-js": ["bidi-js@1.1.0", "", { "dependencies": { "require-from-string": "^2.0.2" } }, "sha512-fX1Onk0tdVPC7obPWB5EbJ1z7NVhLq4m2xZLq2YXBkxzMXIGRpNMU88n0EPgWseKl12J7zXs7qrDxPK4sRs2fg=="], - "bun-types": ["bun-types@1.4.4", "https://registry.npmjs.org/bun-types/-/bun-types-1.4.4.tgz", { "dependencies": { "@types/node": "*", "undici-types": "*" } }, "sha512-yjrJh5oGX7mMPKGd19YXyIjmEuj4G4zNC30bs7PM9Az7NQ3ndF3j6hbeRdvJTRQEhJ/FYQwW0a2moweEi2hMxQ=="], + "bun-types": ["bun-types@1.4.4", "", { "dependencies": { "@types/node": "*", "undici-types": "*" } }, "sha512-yjrJh5oGX7mMPKGd19YXyIjmEuj4G4zNC30bs7PM9Az7NQ3ndF3j6hbeRdvJTRQEhJ/FYQwW0a2moweEi2hMxQ=="], - "css-tree": ["css-tree@3.2.1", "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz", { "dependencies": { "mdn-data": "2.27.1", "source-map-js": "^1.2.1" } }, "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA=="], + "css-tree": ["css-tree@3.2.1", "", { "dependencies": { "mdn-data": "2.27.1", "source-map-js": "^1.2.1" } }, "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA=="], - "data-urls": ["data-urls@7.0.0", "https://registry.npmjs.org/data-urls/-/data-urls-7.0.0.tgz", { "dependencies": { "whatwg-mimetype": "^5.0.0", "whatwg-url": "^16.0.0" } }, "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA=="], + "data-urls": ["data-urls@7.0.0", "", { "dependencies": { "whatwg-mimetype": "^5.0.0", "whatwg-url": "^16.0.0" } }, "sha512-23XHcCF+coGYevirZceTVD7NdJOqVn+49IHyxgszm+JIiHLoB2TkmPtsYkNWT1pvRSGkc35L6NHs0yHkN2SumA=="], - "decimal.js": ["decimal.js@10.6.0", "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", {}, "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="], + "decimal.js": ["decimal.js@10.6.0", "", {}, "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg=="], - "dompurify": ["dompurify@3.4.15", "https://registry.npmjs.org/dompurify/-/dompurify-3.4.15.tgz", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-EUBjM+B+lkDE41iE82DDSCfkoPGfXx8IxFxPMjNzm/Uk4xDet77rTN9wqlxlVg71kK7XGuUMv6wUxJUwwv+Xyw=="], + "dompurify": ["dompurify@3.4.15", "", { "optionalDependencies": { "@types/trusted-types": "^2.0.7" } }, "sha512-EUBjM+B+lkDE41iE82DDSCfkoPGfXx8IxFxPMjNzm/Uk4xDet77rTN9wqlxlVg71kK7XGuUMv6wUxJUwwv+Xyw=="], - "entities": ["entities@8.1.0", "https://registry.npmjs.org/entities/-/entities-8.1.0.tgz", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], + "entities": ["entities@8.1.0", "", {}, "sha512-kxL7msIffSuh9aaFAMD7rxAIuTRMAHMeBtgHW2yUdWw732ZNh4MehkF2gdjvtdmikkaIP9bFDDJOPlsvm7avrA=="], "ework-aio": ["ework-aio@workspace:packages/aio"], @@ -185,100 +185,100 @@ "ework-web": ["ework-web@workspace:packages/web"], - "generate-function": ["generate-function@2.3.1", "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz", { "dependencies": { "is-property": "^1.0.2" } }, "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ=="], + "generate-function": ["generate-function@2.3.1", "", { "dependencies": { "is-property": "^1.0.2" } }, "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ=="], - "highlight.js": ["highlight.js@11.12.0", "https://registry.npmjs.org/highlight.js/-/highlight.js-11.12.0.tgz", {}, "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg=="], + "highlight.js": ["highlight.js@11.12.0", "", {}, "sha512-nbfWpyRMcMrPMmDwJB+dhX/eiaPKtc2RB+0QZskqJ3WjRA/FDS0e9hZrx8EC/lbEv8gXy98FcDbNa/dspAaJMg=="], - "html-encoding-sniffer": ["html-encoding-sniffer@6.0.0", "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-6.0.0.tgz", { "dependencies": { "@exodus/bytes": "^1.6.0" } }, "sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg=="], + "html-encoding-sniffer": ["html-encoding-sniffer@6.0.0", "", { "dependencies": { "@exodus/bytes": "^1.6.0" } }, "sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg=="], - "iconv-lite": ["iconv-lite@0.7.3", "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ=="], + "iconv-lite": ["iconv-lite@0.7.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ=="], - "is-potential-custom-element-name": ["is-potential-custom-element-name@1.0.1", "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", {}, "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="], + "is-potential-custom-element-name": ["is-potential-custom-element-name@1.0.1", "", {}, "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="], - "is-property": ["is-property@1.0.2", "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", {}, "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="], + "is-property": ["is-property@1.0.2", "", {}, "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g=="], - "jsdom": ["jsdom@29.1.1", "https://registry.npmjs.org/jsdom/-/jsdom-29.1.1.tgz", { "dependencies": { "@asamuzakjp/css-color": "^5.1.11", "@asamuzakjp/dom-selector": "^7.1.1", "@bramus/specificity": "^2.4.2", "@csstools/css-syntax-patches-for-csstree": "^1.1.3", "@exodus/bytes": "^1.15.0", "css-tree": "^3.2.1", "data-urls": "^7.0.0", "decimal.js": "^10.6.0", "html-encoding-sniffer": "^6.0.0", "is-potential-custom-element-name": "^1.0.1", "lru-cache": "^11.3.5", "parse5": "^8.0.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^6.0.1", "undici": "^7.25.0", "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^8.0.1", "whatwg-mimetype": "^5.0.0", "whatwg-url": "^16.0.1", "xml-name-validator": "^5.0.0" }, "peerDependencies": { "canvas": "^3.0.0" }, "optionalPeers": ["canvas"] }, "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q=="], + "jsdom": ["jsdom@29.1.1", "", { "dependencies": { "@asamuzakjp/css-color": "^5.1.11", "@asamuzakjp/dom-selector": "^7.1.1", "@bramus/specificity": "^2.4.2", "@csstools/css-syntax-patches-for-csstree": "^1.1.3", "@exodus/bytes": "^1.15.0", "css-tree": "^3.2.1", "data-urls": "^7.0.0", "decimal.js": "^10.6.0", "html-encoding-sniffer": "^6.0.0", "is-potential-custom-element-name": "^1.0.1", "lru-cache": "^11.3.5", "parse5": "^8.0.1", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", "tough-cookie": "^6.0.1", "undici": "^7.25.0", "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^8.0.1", "whatwg-mimetype": "^5.0.0", "whatwg-url": "^16.0.1", "xml-name-validator": "^5.0.0" }, "peerDependencies": { "canvas": "^3.0.0" }, "optionalPeers": ["canvas"] }, "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q=="], - "long": ["long@5.3.2", "https://registry.npmjs.org/long/-/long-5.3.2.tgz", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="], + "long": ["long@5.3.2", "", {}, "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA=="], - "lru-cache": ["lru-cache@11.5.2", "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz", {}, "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g=="], + "lru-cache": ["lru-cache@11.5.2", "", {}, "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g=="], - "lru.min": ["lru.min@1.1.5", "https://registry.npmjs.org/lru.min/-/lru.min-1.1.5.tgz", {}, "sha512-5J9ysMYUpYIg9RF2vJpy9SinEmSviFSe0GyPpCQ4L5QSkLAgeLXlTAOu2ZwWUU5m+0SBl6gUU1R1ZQB3aKypfA=="], + "lru.min": ["lru.min@1.1.5", "", {}, "sha512-5J9ysMYUpYIg9RF2vJpy9SinEmSviFSe0GyPpCQ4L5QSkLAgeLXlTAOu2ZwWUU5m+0SBl6gUU1R1ZQB3aKypfA=="], - "marked": ["marked@15.0.12", "https://registry.npmjs.org/marked/-/marked-15.0.12.tgz", { "bin": { "marked": "bin/marked.js" } }, "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA=="], + "marked": ["marked@15.0.12", "", { "bin": { "marked": "bin/marked.js" } }, "sha512-8dD6FusOQSrpv9Z1rdNMdlSgQOIP880DHqnohobOmYLElGEqAL/JvxvuxZO16r4HtjTlfPRDC1hbvxC9dPN2nA=="], - "marked-highlight": ["marked-highlight@2.2.4", "https://registry.npmjs.org/marked-highlight/-/marked-highlight-2.2.4.tgz", { "peerDependencies": { "marked": ">=4 <19" } }, "sha512-PZxisNMJDduSjc0q6uvjsnqqHCXc9s0eyzxDO9sB1eNGJnd/H1/Fu+z6g/liC1dfJdFW4SftMwMlLvsBhUPrqQ=="], + "marked-highlight": ["marked-highlight@2.2.4", "", { "peerDependencies": { "marked": ">=4 <19" } }, "sha512-PZxisNMJDduSjc0q6uvjsnqqHCXc9s0eyzxDO9sB1eNGJnd/H1/Fu+z6g/liC1dfJdFW4SftMwMlLvsBhUPrqQ=="], - "mdn-data": ["mdn-data@2.27.1", "https://registry.npmjs.org/mdn-data/-/mdn-data-2.27.1.tgz", {}, "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ=="], + "mdn-data": ["mdn-data@2.27.1", "", {}, "sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ=="], - "mysql2": ["mysql2@3.24.4", "https://registry.npmjs.org/mysql2/-/mysql2-3.24.4.tgz", { "dependencies": { "aws-ssl-profiles": "^1.1.2", "generate-function": "^2.3.1", "iconv-lite": "^0.7.3", "long": "^5.3.2", "lru.min": "^1.1.4", "named-placeholders": "^1.1.6", "sql-escaper": "^1.5.1" }, "peerDependencies": { "@types/node": ">= 8" } }, "sha512-A2olluVlj0mvgyIRRISMEzXc51m+21mRtcMVjJyIpt2GG98+XrC9m9HzsqcMsX2LcnfccJvY5NB22g8fENBnOA=="], + "mysql2": ["mysql2@3.24.4", "", { "dependencies": { "aws-ssl-profiles": "^1.1.2", "generate-function": "^2.3.1", "iconv-lite": "^0.7.3", "long": "^5.3.2", "lru.min": "^1.1.4", "named-placeholders": "^1.1.6", "sql-escaper": "^1.5.1" }, "peerDependencies": { "@types/node": ">= 8" } }, "sha512-A2olluVlj0mvgyIRRISMEzXc51m+21mRtcMVjJyIpt2GG98+XrC9m9HzsqcMsX2LcnfccJvY5NB22g8fENBnOA=="], - "named-placeholders": ["named-placeholders@1.1.6", "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.6.tgz", { "dependencies": { "lru.min": "^1.1.0" } }, "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w=="], + "named-placeholders": ["named-placeholders@1.1.6", "", { "dependencies": { "lru.min": "^1.1.0" } }, "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w=="], - "parse5": ["parse5@8.0.1", "https://registry.npmjs.org/parse5/-/parse5-8.0.1.tgz", { "dependencies": { "entities": "^8.0.0" } }, "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw=="], + "parse5": ["parse5@8.0.1", "", { "dependencies": { "entities": "^8.0.0" } }, "sha512-z1e/HMG90obSGeidlli3hj7cbocou0/wa5HacvI3ASx34PecNjNQeaHNo5WIZpWofN9kgkqV1q5YvXe3F0FoPw=="], - "punycode": ["punycode@2.3.1", "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], + "punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="], - "require-from-string": ["require-from-string@2.0.2", "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], + "require-from-string": ["require-from-string@2.0.2", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="], - "safer-buffer": ["safer-buffer@2.1.2", "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], + "safer-buffer": ["safer-buffer@2.1.2", "", {}, "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="], - "saxes": ["saxes@6.0.0", "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz", { "dependencies": { "xmlchars": "^2.2.0" } }, "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA=="], + "saxes": ["saxes@6.0.0", "", { "dependencies": { "xmlchars": "^2.2.0" } }, "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA=="], - "source-map-js": ["source-map-js@1.2.1", "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], + "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], - "sql-escaper": ["sql-escaper@1.5.1", "https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.5.1.tgz", {}, "sha512-4toX5E1fQbBrpfXidaHnF0669nkAdETeIPTs2SUjxxD7RRIs9ICG4gtpmfc68JCEKehsdwLFqBu9VlQqZ1P1gg=="], + "sql-escaper": ["sql-escaper@1.5.1", "", {}, "sha512-4toX5E1fQbBrpfXidaHnF0669nkAdETeIPTs2SUjxxD7RRIs9ICG4gtpmfc68JCEKehsdwLFqBu9VlQqZ1P1gg=="], - "symbol-tree": ["symbol-tree@3.2.4", "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", {}, "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="], + "symbol-tree": ["symbol-tree@3.2.4", "", {}, "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="], - "tldts": ["tldts@7.4.12", "https://registry.npmjs.org/tldts/-/tldts-7.4.12.tgz", { "dependencies": { "tldts-core": "^7.4.12" }, "bin": { "tldts": "bin/cli.js" } }, "sha512-WylhSDKVeYnWXL3a+vKTaOxjnOeEGw938hImY8zoRWJjRRK/Jp1K+IihBzIONpUmW4e3WmXT6q5FW6vlESVZCA=="], + "tldts": ["tldts@7.4.12", "", { "dependencies": { "tldts-core": "^7.4.12" }, "bin": { "tldts": "bin/cli.js" } }, "sha512-WylhSDKVeYnWXL3a+vKTaOxjnOeEGw938hImY8zoRWJjRRK/Jp1K+IihBzIONpUmW4e3WmXT6q5FW6vlESVZCA=="], - "tldts-core": ["tldts-core@7.4.12", "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.12.tgz", {}, "sha512-nYNzS2WRf4QJmjzFFgAxLOBjyBxAGRbCy9PVBPaglcYyYajh40VBn+v5Ngr96ZMc7oM0+aCJdtQnNejvdBnXMQ=="], + "tldts-core": ["tldts-core@7.4.12", "", {}, "sha512-nYNzS2WRf4QJmjzFFgAxLOBjyBxAGRbCy9PVBPaglcYyYajh40VBn+v5Ngr96ZMc7oM0+aCJdtQnNejvdBnXMQ=="], - "tough-cookie": ["tough-cookie@6.0.2", "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.2.tgz", { "dependencies": { "tldts": "^7.0.5" } }, "sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA=="], + "tough-cookie": ["tough-cookie@6.0.2", "", { "dependencies": { "tldts": "^7.0.5" } }, "sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA=="], - "tr46": ["tr46@6.0.0", "https://registry.npmjs.org/tr46/-/tr46-6.0.0.tgz", { "dependencies": { "punycode": "^2.3.1" } }, "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw=="], + "tr46": ["tr46@6.0.0", "", { "dependencies": { "punycode": "^2.3.1" } }, "sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw=="], - "typescript": ["typescript@5.9.3", "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], + "typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="], - "undici": ["undici@7.29.1", "https://registry.npmjs.org/undici/-/undici-7.29.1.tgz", {}, "sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q=="], + "undici": ["undici@7.29.1", "", {}, "sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q=="], - "undici-types": ["undici-types@7.29.1", "https://registry.npmjs.org/undici-types/-/undici-types-7.29.1.tgz", {}, "sha512-2xO3p6gANwOmhSFwNy2MMYISbHTtM+K3bY0bqpD1gOGpUPIe+yFXCobxbz0s2jm7E0faMxIFcZUcCKa+N6Ozlg=="], + "undici-types": ["undici-types@7.29.1", "", {}, "sha512-2xO3p6gANwOmhSFwNy2MMYISbHTtM+K3bY0bqpD1gOGpUPIe+yFXCobxbz0s2jm7E0faMxIFcZUcCKa+N6Ozlg=="], - "w3c-xmlserializer": ["w3c-xmlserializer@5.0.0", "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", { "dependencies": { "xml-name-validator": "^5.0.0" } }, "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA=="], + "w3c-xmlserializer": ["w3c-xmlserializer@5.0.0", "", { "dependencies": { "xml-name-validator": "^5.0.0" } }, "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA=="], - "webidl-conversions": ["webidl-conversions@8.0.1", "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-8.0.1.tgz", {}, "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ=="], + "webidl-conversions": ["webidl-conversions@8.0.1", "", {}, "sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ=="], - "whatwg-mimetype": ["whatwg-mimetype@5.0.0", "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-5.0.0.tgz", {}, "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw=="], + "whatwg-mimetype": ["whatwg-mimetype@5.0.0", "", {}, "sha512-sXcNcHOC51uPGF0P/D4NVtrkjSU2fNsm9iog4ZvZJsL3rjoDAzXZhkm2MWt1y+PUdggKAYVoMAIYcs78wJ51Cw=="], - "whatwg-url": ["whatwg-url@16.0.1", "https://registry.npmjs.org/whatwg-url/-/whatwg-url-16.0.1.tgz", { "dependencies": { "@exodus/bytes": "^1.11.0", "tr46": "^6.0.0", "webidl-conversions": "^8.0.1" } }, "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw=="], + "whatwg-url": ["whatwg-url@16.0.1", "", { "dependencies": { "@exodus/bytes": "^1.11.0", "tr46": "^6.0.0", "webidl-conversions": "^8.0.1" } }, "sha512-1to4zXBxmXHV3IiSSEInrreIlu02vUOvrhxJJH5vcxYTBDAx51cqZiKdyTxlecdKNSjj8EcxGBxNf6Vg+945gw=="], - "xml-name-validator": ["xml-name-validator@5.0.0", "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", {}, "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg=="], + "xml-name-validator": ["xml-name-validator@5.0.0", "", {}, "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg=="], - "xmlchars": ["xmlchars@2.2.0", "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", {}, "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="], + "xmlchars": ["xmlchars@2.2.0", "", {}, "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="], - "zod": ["zod@3.25.76", "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], + "zod": ["zod@3.25.76", "", {}, "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ=="], - "@types/node/undici-types": ["undici-types@6.21.0", "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="], + "@types/node/undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="], - "ework-chat/@types/bun": ["@types/bun@1.4.2", "https://registry.npmjs.org/@types/bun/-/bun-1.4.2.tgz", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="], + "ework-chat/@types/bun": ["@types/bun@1.4.2", "", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="], - "ework-daemon/zod": ["zod@4.6.2", "https://registry.npmjs.org/zod/-/zod-4.6.2.tgz", {}, "sha512-lh5RCAGFa1Cm2hjtNwLQhSs/AsqdWnTQaBER9fEwN/88pSh7KOtJavtBx/0VlkN/uFd61SwYmljLMDAsHlvzBQ=="], + "ework-daemon/zod": ["zod@4.6.2", "", {}, "sha512-lh5RCAGFa1Cm2hjtNwLQhSs/AsqdWnTQaBER9fEwN/88pSh7KOtJavtBx/0VlkN/uFd61SwYmljLMDAsHlvzBQ=="], - "ework-mirror/@types/bun": ["@types/bun@1.4.2", "https://registry.npmjs.org/@types/bun/-/bun-1.4.2.tgz", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="], + "ework-mirror/@types/bun": ["@types/bun@1.4.2", "", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="], - "ework-qq-bridge/@types/bun": ["@types/bun@1.4.2", "https://registry.npmjs.org/@types/bun/-/bun-1.4.2.tgz", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="], + "ework-qq-bridge/@types/bun": ["@types/bun@1.4.2", "", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="], - "ework-router/@types/bun": ["@types/bun@1.4.2", "https://registry.npmjs.org/@types/bun/-/bun-1.4.2.tgz", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="], + "ework-router/@types/bun": ["@types/bun@1.4.2", "", { "dependencies": { "bun-types": "1.4.2" } }, "sha512-GimotNn7+ZV0uVArItBbriZsR1oNf0+WTzPkdcFrzShI7k2norL0uzEaJT8T33dWr7O/c9ZDuAFQrctKCi72oQ=="], - "ework-router/zod": ["zod@4.6.2", "https://registry.npmjs.org/zod/-/zod-4.6.2.tgz", {}, "sha512-lh5RCAGFa1Cm2hjtNwLQhSs/AsqdWnTQaBER9fEwN/88pSh7KOtJavtBx/0VlkN/uFd61SwYmljLMDAsHlvzBQ=="], + "ework-router/zod": ["zod@4.6.2", "", {}, "sha512-lh5RCAGFa1Cm2hjtNwLQhSs/AsqdWnTQaBER9fEwN/88pSh7KOtJavtBx/0VlkN/uFd61SwYmljLMDAsHlvzBQ=="], - "ework-chat/@types/bun/bun-types": ["bun-types@1.4.2", "https://registry.npmjs.org/bun-types/-/bun-types-1.4.2.tgz", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], + "ework-chat/@types/bun/bun-types": ["bun-types@1.4.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], - "ework-mirror/@types/bun/bun-types": ["bun-types@1.4.2", "https://registry.npmjs.org/bun-types/-/bun-types-1.4.2.tgz", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], + "ework-mirror/@types/bun/bun-types": ["bun-types@1.4.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], - "ework-qq-bridge/@types/bun/bun-types": ["bun-types@1.4.2", "https://registry.npmjs.org/bun-types/-/bun-types-1.4.2.tgz", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], + "ework-qq-bridge/@types/bun/bun-types": ["bun-types@1.4.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], - "ework-router/@types/bun/bun-types": ["bun-types@1.4.2", "https://registry.npmjs.org/bun-types/-/bun-types-1.4.2.tgz", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], + "ework-router/@types/bun/bun-types": ["bun-types@1.4.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-bxV1FgK7yBIzjRe5zBozIM4Bem11ZJcCXSrjWRG3YWLt8yFDePu4cLjpebO8OvPeIE9trbyPF4fuj3Cia4Fj3w=="], } } diff --git a/packages/daemon/package.json b/packages/daemon/package.json index 918b76f..ab0d26f 100644 --- a/packages/daemon/package.json +++ b/packages/daemon/package.json @@ -1,6 +1,6 @@ { "name": "ework-daemon", - "version": "0.4.210", + "version": "0.4.211", "description": "Issue-driven AI development daemon. Spawns opencode subprocesses to resolve Gitea issues.", "module": "src/index.ts", "type": "module", diff --git a/packages/daemon/src/config.ts b/packages/daemon/src/config.ts index 6d5254a..9e82889 100644 --- a/packages/daemon/src/config.ts +++ b/packages/daemon/src/config.ts @@ -104,6 +104,10 @@ export const configSchema = z.object({ // analysis lane gets at most N dispatches per anchor thread per window. // 0 = lane disabled (ticks dropped); env default 3 kept in sync below. classifierMaxAttempts: z.coerce.number().int().min(0).optional(), + // Incorporated-issue suppression file (owner policy 2026-11-12): JSON written + // by the classifier board script; {issues: {: reason}}. Issues in + // the set run no bot work (their fix lives in the aggregation thread). + suppressionFile: z.string().optional(), // Transparent-repair coalesce window (owner policy 2026-11-07): while a // session for the SAME lane/thread has been running for less than this, // a new ci-fail / merge-conflict event must NOT preempt it — it stays @@ -223,6 +227,7 @@ function readWorkSection() { classifierMaxAttempts: process.env.WORK_CLASSIFIER_MAX_ATTEMPTS != null && process.env.WORK_CLASSIFIER_MAX_ATTEMPTS !== "" ? Math.max(0, Math.trunc(Number(process.env.WORK_CLASSIFIER_MAX_ATTEMPTS))) : 3, // one attempt per 4h tick with slack; 0 = lane off + suppressionFile: process.env.WORK_SUPPRESSION_FILE || undefined, ciVerifyDelayMs: process.env.WORK_CI_VERIFY_DELAY_MS != null && process.env.WORK_CI_VERIFY_DELAY_MS !== "" ? Math.max(1, Math.trunc(Number(process.env.WORK_CI_VERIFY_DELAY_MS))) : 900_000, diff --git a/packages/daemon/src/op.ts b/packages/daemon/src/op.ts index 25299d3..a41d42c 100644 --- a/packages/daemon/src/op.ts +++ b/packages/daemon/src/op.ts @@ -154,6 +154,16 @@ export class Store { return row ? rowToIssue(row) : undefined; } + /** All issues across trackers/scopes sharing a mirror (tracker) issue id — + * used by the admin stop-work endpoint, which is told mirror numbers only. */ + async findIssuesByTrackerIssueId(issueId: string): Promise { + const rows = await getDB().all( + "SELECT * FROM {{issues}} WHERE tracker_issue_id = ?", + [issueId] + ); + return rows.map(rowToIssue); + } + async findOrCreateIssue(ref: TrackerRef, scopeKey: string, title: string): Promise { const existing = await this.findIssue(ref.trackerType, scopeKey, ref.issueId); if (existing) { diff --git a/packages/daemon/src/opencode.ts b/packages/daemon/src/opencode.ts index 58742d1..6b55be0 100644 --- a/packages/daemon/src/opencode.ts +++ b/packages/daemon/src/opencode.ts @@ -1,5 +1,5 @@ import { Database } from "bun:sqlite"; -import { mkdirSync, writeFileSync, unlinkSync, rmdirSync, readdirSync, existsSync, readFileSync } from "fs"; +import { mkdirSync, writeFileSync, unlinkSync, rmdirSync, readdirSync, existsSync, readFileSync, statSync } from "fs"; import { join, dirname, resolve, isAbsolute } from "path"; import { homedir, hostname } from "os"; import { log } from "./logger"; @@ -752,6 +752,10 @@ export function spawnEnvFor( const REPLY_LANGUAGE_RULE = `Reply language (owner policy 2026-11-08): reply in the LANGUAGE THE PERSON WHO ASKED USED — a fully-English question or comment → your entire reply in English (any other non-Chinese language likewise); Chinese → 中文. Sole exception: the 8-question review checklist (8问) is ALWAYS written in Chinese — it is for human reviewers, not for the questioner.`; +/** Root-cause thread contract (owner policy 2026-11-12): [根因] threads previously answered without the 8-question checklist — the owner requires it back. */ +const RC_EIGHT_QUESTION_RULE = + `Root-cause thread contract (owner policy 2026-11-12): this is a [根因]/[Root Cause] thread — its deliverable is a VERDICT, not activity. Your FINAL reply on this thread MUST end with the 8-question checklist (8问) IN CHINESE, one numbered line each: 1. 这是啥问题(大白话+触发条件) 2. 根本原因是啥(组件+机制,知道就给 file:line) 3. 如何修复(已做的修复或建议修法) 4. 能否合并/关闭(结论+依据:测试/CI/回归分析) 5. URL(相关线程/PR 链接) 6. 影响面(哪些代码路径/用户) 7. 测试(什么钉住它) 8. 风险(还可能坏在哪)。A line you cannot answer honestly gets 「待验证:原因」 — never omit a line, never pad it.`; + export class Engine { private cfg: Config; private store: Store; @@ -1791,6 +1795,20 @@ export class Engine { this.senders.set(issueMapKey, event.sender); } + // Incorporated-issue auto-stop (owner policy 2026-11-12): issues absorbed + // into a [根因] root-cause aggregation (or classified 碎小修/tinyfix) run + // NO bot work of their own — the aggregation thread owns the fix. The + // classifier board writes the suppression set; ordinary task events for + // suppressed issues are dropped silently (lane events like CI/conflict + // still flow, so a red PR on a suppressed issue is still handled). + if (event.type === "issue_opened" || event.type === "comment_created" || event.type === "issue_boosted") { + const reason = this.suppressionReason(ref.issueId); + if (reason) { + log.info(`engine: suppressed ${event.type} on ${scopeKey}#${ref.issueId} — ${reason} (classifier incorporation; no bot work on absorbed issues)`); + return; + } + } + switch (event.type) { case "issue_opened": return this.handleOpened(ref, scopeKey, issueData, tracker, event.model); @@ -2416,7 +2434,7 @@ Check states: read the mirror cache (see AGENTS.md), do not poll gh for check st const list = classifier.batch.map((n) => `#${n}`).join(", "); const body = `[SYSTEM] Root-cause classification batch for ${scopeKey} (${classifier.firstRound ? "FIRST ROUND — full sweep" : "incremental round"}): ${classifier.batch.length} open issue(s): ${list}\n` + - `You are the issue root-cause classifier. For EACH issue: read its body, open the linked PR/diff if any, and inspect the relevant source code in this workdir BEFORE judging — deep enough to name the root cause (which component, which mechanism), not a surface label. Categories are DYNAMIC (there is no fixed list): give each root cause a stable short category string, and use the SAME string on later rounds for the same root cause (reuse what earlier rounds of this thread used when visible).\n` + + `You are the issue root-cause classifier. For EACH issue: read its body, open the linked PR/diff if any, and inspect the relevant source code in this workdir BEFORE judging — deep enough to name the root cause (which component, which mechanism), not a surface label. Categories are DYNAMIC (there is no fixed list): give each root cause a stable short category string, and use the SAME string on later rounds for the same root cause (reuse what earlier rounds of this thread used when visible). RESERVED CATEGORY (owner policy 2026-11-12): an issue that is NOT part of any systemic root cause — a single small fix, no shared mechanism, one issue ≈ one fix — gets the exact category string "tinyfix"(碎小修); do not invent tinyfix subcategories, the string is exactly tinyfix. Everything else uses dynamic root-cause categories as above.\n` + `The numbers above are MIRROR numbers, never GitHub numbers. Mirror API: TOK=$(grep ^GITEA_TOKEN= /var/lib/ework-daemon/share/ework-daemon/.env | cut -d= -f2); issue detail: curl -s -H "Authorization: token $TOK" "http://127.0.0.1:3002/api/v1/issues/"; add /comments for the thread. The upstream GitHub PR number appears in the issue body or the [PR] mirror rows — use those, and never resolve a bare #N against GitHub.\n` + `Deliverable — MANDATORY, via the reply tool, no exceptions: a reply comment on THIS thread containing one fenced classifier-json block: a JSON array with exactly one object per issue in the batch: {"number": , "title": , "category": , "root_cause": , "ci_state": "green"|"red"|"none", "merge_state": "clean"|"dirty"|"behind"|"n/a", "pr_number": , "confidence": "high"|"medium"|"low"}. If an issue is unreadable or too deep for this pass, still include it with "confidence":"low" and a best-effort category — NEVER drop an issue from the array. If you cannot finish everything, post what you have NOW with the remaining issues marked "low" — partial honest output beats silence (owner policy 2026-11-10, incident #6069).\n` + `Progress discipline (the 15-min no-output kill applies to you): first reply within 2 minutes (the plan + the category scheme you will use); for every 25 issues post a progress reply "[progress] /" carrying the classifier-json for everything classified so far.\n` + @@ -4234,6 +4252,79 @@ Check states: read the mirror cache (see AGENTS.md), do not poll gh for check st return REPLY_LANGUAGE_RULE; } + /** 8-question contract, active only on [根因]/[Root Cause] threads (owner policy 2026-11-12). */ + private rcEightQuestionRule(issueTitle?: string): string { + return /^\[(根因|Root Cause)\]/i.test(issueTitle ?? "") ? RC_EIGHT_QUESTION_RULE : ""; + } + + // Suppression set (owner policy 2026-11-12, "被纳入的机器人自动停止"): the + // classifier board script writes {issues: {: reason}} once it + // renders; the engine caches it by mtime so the per-event check is free. + private suppressionCache: { mtimeMs: number; ids: Map } = { mtimeMs: -1, ids: new Map() }; + + private suppressionFile(): string { + return this.cfg.work.suppressionFile ?? join(this.cfg.opencode.baseWorkdir, "..", "classifier", "suppressed.json"); + } + + private suppressionReason(mirrorIssueId: string): string | null { + try { + if (!this.suppressionCache) this.suppressionCache = { mtimeMs: -1, ids: new Map() }; + const path = this.suppressionFile(); + const mtimeMs = existsSync(path) ? statSync(path).mtimeMs : -1; + if (mtimeMs !== this.suppressionCache.mtimeMs) { + const ids = new Map(); + if (mtimeMs >= 0) { + const raw: unknown = JSON.parse(readFileSync(path, "utf8")); + const issues = (raw as { issues?: Record })?.issues; + if (issues && typeof issues === "object") { + for (const [k, v] of Object.entries(issues)) ids.set(String(k), typeof v === "string" ? v : "incorporated"); + } + } + this.suppressionCache = { mtimeMs, ids }; + } + return this.suppressionCache.ids.get(mirrorIssueId) ?? null; + } catch { + return null; // unreadable/invalid file = not suppressed + } + } + + /** Stop all bot work on the given mirror issues: kill live sessions, park queued + * messages as superseded, idle the sessions. Silent on purpose — no thread + * comments (owner policy 2026-11-12: the bulk-comment incident). */ + async stopIssueWork(mirrorIssueIds: string[]): Promise<{ issues: number; killed: number; superseded: number }> { + let killed = 0; + let superseded = 0; + let issues = 0; + for (const id of [...new Set(mirrorIssueIds.map((s) => String(s)))]) { + for (const issue of await this.store.findIssuesByTrackerIssueId(id)) { + issues++; + const sessions = await this.store.getSessionsForIssue(issue.id); + for (const session of sessions) { + if (session.state !== "running") { + await this.store.updateSession(session.id, { state: "idle", opencodePid: undefined }); + continue; + } + const k = this.sessionKey(session, issue); + const wasKilled = await this.killSessionProcess(session, k); + if (wasKilled) killed++; + this.clearRuntimeState(k); + const msgs = await this.store.getMessagesForSession(session.id); + for (const msg of msgs) { + if (msg.status === "pending" || msg.status === "running" || msg.status === "interrupted") { + await this.store.updateMessageStatus(msg.id, "superseded", "superseded by root-cause aggregation (stop-work)"); + superseded++; + } + } + await this.store.updateSession(session.id, { state: "idle", opencodePid: undefined }); + } + } + } + if (issues > 0) { + log.info(`engine: stop-work — ${issues} issue(s), ${killed} session(s) killed, ${superseded} message(s) superseded`); + } + return { issues, killed, superseded }; + } + private buildForwardPrompt( opName: string, commentBody: string, @@ -4276,6 +4367,7 @@ Check states: read the mirror cache (see AGENTS.md), do not poll gh for check st ``, `Reply using the \`reply\` tool.`, this.replyLanguageRule, + this.rcEightQuestionRule(issueTitle), ].filter(Boolean).join("\n"); } @@ -4293,7 +4385,8 @@ Check states: read the mirror cache (see AGENTS.md), do not poll gh for check st ``, `Every reply MUST start with \`[bot] 🏷\` prefix.`, this.replyLanguageRule, - ].join("\n"); + this.rcEightQuestionRule(issue.title), + ].filter(Boolean).join("\n"); } private buildProcessExitNudgePrompt( diff --git a/packages/daemon/src/server.ts b/packages/daemon/src/server.ts index 5ae5aaf..140fe33 100644 --- a/packages/daemon/src/server.ts +++ b/packages/daemon/src/server.ts @@ -236,6 +236,15 @@ export function createServer( engine.setMaxConcurrent(Math.floor(value)); return json({ ok: true, maxConcurrent: engine.getMaxConcurrent() }); } + if (pathname === "/api/admin/stop-work" && req.method === "POST") { + const body = await req.json().catch(() => ({} as unknown)); + const ids = (body as { issue_ids?: unknown })?.issue_ids; + if (!Array.isArray(ids) || ids.some((x) => typeof x !== "string" && typeof x !== "number")) { + return json({ error: "issue_ids must be an array of mirror issue ids" }, 400); + } + const report = await engine.stopIssueWork(ids.map(String)); + return json({ ok: true, ...report }); + } return json({ error: "not found" }, 404); } diff --git a/packages/daemon/tests/incorporated-stop.test.ts b/packages/daemon/tests/incorporated-stop.test.ts new file mode 100644 index 0000000..56d5af6 --- /dev/null +++ b/packages/daemon/tests/incorporated-stop.test.ts @@ -0,0 +1,145 @@ +import { describe, expect, test, vi } from "bun:test"; +import { mkdtempSync, writeFileSync, mkdirSync } from "fs"; +import { tmpdir } from "os"; +import { join } from "path"; + +// Incorporated-issue auto-stop + 8问 contract (owner policy 2026-11-12): +// issues absorbed into a [根因] aggregation (or classified tinyfix) run no +// bot work of their own; the classifier board writes the suppression set. +describe("incorporated-issue auto-stop (owner policy 2026-11-12)", () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const { Engine } = require("../src/opencode") as { Engine: any }; + + function makeSuppressionDir() { + const dir = mkdtempSync(join(tmpdir(), "supp-")); + return dir; + } + + function baseSelf(suppressionFile?: string) { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const self = Object.create(Engine.prototype) as Record; + self.cfg = { + work: suppressionFile ? { suppressionFile } : {}, + opencode: { baseWorkdir: "/nonexistent-base-workdir" }, + }; + return self; + } + + test("suppressionReason reads the board-written set and caches by mtime", () => { + const dir = makeSuppressionDir(); + const file = join(dir, "suppressed.json"); + const self = baseSelf(file); + expect(Engine.prototype.suppressionReason.call(self, "42")).toBeNull(); + writeFileSync(file, JSON.stringify({ issues: { "42": "incorporated:kc", 43: true } })); + expect(Engine.prototype.suppressionReason.call(self, "42")).toBe("incorporated:kc"); + expect(Engine.prototype.suppressionReason.call(self, "43")).toBe("incorporated"); + expect(Engine.prototype.suppressionReason.call(self, "44")).toBeNull(); + // mtime-unchanged second call hits the cache (no re-read needed to pass) + expect(Engine.prototype.suppressionReason.call(self, "42")).toBe("incorporated:kc"); + }); + + test("suppressionReason: invalid or unreadable file = not suppressed", () => { + const dir = makeSuppressionDir(); + const file = join(dir, "bad.json"); + const self = baseSelf(file); + writeFileSync(file, "{not json"); + expect(Engine.prototype.suppressionReason.call(self, "1")).toBeNull(); + // no file at all + const self2 = baseSelf(join(dir, "missing.json")); + expect(Engine.prototype.suppressionReason.call(self2, "1")).toBeNull(); + }); + + test("stopIssueWork kills running sessions, supersedes queued messages, keeps done, stays silent", async () => { + const self = baseSelf(); + const updateSession = vi.fn(async (_id?: unknown, _p?: unknown) => {}); + const updateMessageStatus = vi.fn(async (_id?: unknown, _s?: unknown, _e?: unknown) => {}); + const killSessionProcess = vi.fn(async () => true); + const clearRuntimeState = vi.fn(); + const running = { id: "s-run", state: "running", name: "ework-daemon" }; + const parked = { id: "s-park", state: "idle", name: "ework-daemon" }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + self.store = { + findIssuesByTrackerIssueId: vi.fn(async () => [{ id: 7, trackerType: "gitea", trackerScope: "acme/widgets" }]), + getSessionsForIssue: vi.fn(async () => [running, parked]), + getMessagesForSession: vi.fn(async (sid: string) => + sid === "s-run" + ? [ + { id: "m1", status: "pending" }, + { id: "m2", status: "running" }, + { id: "m3", status: "interrupted" }, + { id: "m4", status: "done" }, + ] + : [], + ), + updateSession, + updateMessageStatus, + }; + self.killSessionProcess = killSessionProcess; + self.clearRuntimeState = clearRuntimeState; + self.sessionKey = () => "k1"; + const report = await Engine.prototype.stopIssueWork.call(self, ["42", "42"]); + expect(report).toEqual({ issues: 1, killed: 1, superseded: 3 }); + expect(killSessionProcess).toHaveBeenCalledTimes(1); + const supersededCalls = updateMessageStatus.mock.calls.map((c) => [String(c[0]), String(c[1])]); + expect(supersededCalls).toEqual([ + ["m1", "superseded"], + ["m2", "superseded"], + ["m3", "superseded"], + ]); + // the done message must be untouched + expect(updateMessageStatus.mock.calls.every((c) => c[0] !== "m4")).toBe(true); + // both sessions end idle; dedupe: two identical ids hit the store once + expect(self.store.findIssuesByTrackerIssueId).toHaveBeenCalledTimes(1); + expect(updateSession).toHaveBeenCalledTimes(2); + }); + + test("classifier prompt carries the reserved tinyfix category", async () => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const tracker: any = { + createComment: vi.fn(async () => ({ id: "c1" })), + getTrackerInstructions: () => ({ issueRef: "acme/widgets#900" }), + }; + const self = baseSelf(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + self.cfg = { + bot: { username: "ework-daemon" }, + daemon: { wakeLogins: ["ranxianglei"], noWakeLogins: [], nonWakingAuthors: [] }, + work: { autoLaneWindowMs: 86_400_000, classifierMaxAttempts: 3 }, + opencode: { baseWorkdir: "/nonexistent-base-workdir" }, + }; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + self.store = { + findIssue: vi.fn(async () => null), + findOrCreateIssue: vi.fn(async () => ({ id: 7, state: "active" })), + countAutoLaneMessages: vi.fn(async () => 0), + }; + self.ensureOwned = vi.fn(async () => true); + self.workerSession = vi.fn(async (_i: unknown, base: string) => ({ id: "w1", name: base })); + self.sessionRef = () => "ses_link"; + self.resolveWorkdir = async () => "/w"; + self.handleLargeContent = (_wd: string, c: string) => c; + const enqueueOrRun = vi.fn(); + self.enqueueOrRun = enqueueOrRun; + await Engine.prototype.handleClassifierTick.call( + self, + { trackerType: "gitea", scope: { owner: "acme", repo: "widgets" }, issueId: "900" }, + "acme/widgets", + { title: "anchor", body: "", state: "open", author: "ranxianglei" }, + tracker, + { batch: [11, 12], firstRound: true }, + ); + const prompt = String((enqueueOrRun.mock.calls[0] as unknown[])[2]); + expect(prompt).toContain("RESERVED CATEGORY"); + expect(prompt).toContain('"tinyfix"'); + }); + + test("8问 contract applies to [根因] threads only", () => { + const self = baseSelf(); + const rc = Engine.prototype.rcEightQuestionRule.call(self, "[根因] 压缩链路三连断(6090/6091/6092)"); + expect(rc).toContain("8-question checklist"); + expect(rc).toContain("待验证"); + expect(Engine.prototype.rcEightQuestionRule.call(self, "[Root Cause] some other")).toContain("8-question checklist"); + expect(Engine.prototype.rcEightQuestionRule.call(self, "普通 issue 标题")).toBe(""); + expect(Engine.prototype.rcEightQuestionRule.call(self, undefined)).toBe(""); + }); +}); diff --git a/scripts/__pycache__/classifier-board.cpython-313.pyc b/scripts/__pycache__/classifier-board.cpython-313.pyc deleted file mode 100644 index 1388f3f..0000000 Binary files a/scripts/__pycache__/classifier-board.cpython-313.pyc and /dev/null differ diff --git a/scripts/classifier-board.py b/scripts/classifier-board.py index 1054226..f441857 100644 --- a/scripts/classifier-board.py +++ b/scripts/classifier-board.py @@ -138,6 +138,49 @@ def open_numbers(): c.close() return {n for (n,) in rows} +# Incorporated-issue auto-stop (owner policy 2026-11-12): absorbed issues run no +# bot work of their own. The daemon reads SUPPRESSION_PATH (per-event drop gate) +# and stop-work stops any live/queued work on each render (idempotent, silent). +SUPPRESSION_PATH = "/var/lib/ework-daemon/share/classifier/suppressed.json" +DAEMON_STOP_URL = "http://127.0.0.1:3101/api/admin/stop-work" + +def incorporated_numbers(merged, open_set): + """{mirror number: reason} for every open issue absorbed into a root-cause + aggregation (category with >= AGG_THRESHOLD members) or classified tinyfix.""" + by_cat = {} + for n, o in merged.items(): + if n not in open_set: + continue + cat = str(o.get("category") or "").strip() + by_cat.setdefault(cat or "?", []).append(n) + out = {} + for cat, nums in by_cat.items(): + if cat == "tinyfix" or len(nums) >= AGG_THRESHOLD: + for n in nums: + out[str(n)] = "tinyfix" if cat == "tinyfix" else f"incorporated:{cat}" + return out + +def write_suppression(merged, open_set): + nums = incorporated_numbers(merged, open_set) + payload = {"updated_at": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()), "issues": nums} + os.makedirs(os.path.dirname(SUPPRESSION_PATH), exist_ok=True) + tmp = SUPPRESSION_PATH + ".tmp" + with open(tmp, "w") as f: + json.dump(payload, f, ensure_ascii=False) + os.replace(tmp, SUPPRESSION_PATH) + try: + req = urllib.request.Request( + DAEMON_STOP_URL, + data=json.dumps({"issue_ids": list(nums)}).encode(), + headers={"Content-Type": "application/json"}, + method="POST", + ) + with urllib.request.urlopen(req, timeout=60) as r: + print(f"classifier-board: stop-work -> {r.read().decode()[:200]}") + except Exception as e: + print(f"classifier-board: stop-work POST failed (non-fatal): {e}") + print(f"classifier-board: suppression set = {len(nums)} issue(s) -> {SUPPRESSION_PATH}") + def mirror_row(n): c = sqlite3.connect(f"file:{DB}?mode=ro", uri=True) row = c.execute("""SELECT title, state, upstream_issue_number, upstream_ci_state, @@ -411,6 +454,7 @@ def main(): num = create_board() save_state(dict(st, discussion=num)) update_board(num, render(merged, open_set)) + write_suppression(merged, open_set) print(f"classifier-board: board #{num} updated ({len(merged)} classified, {len(open_set)} open)") if __name__ == "__main__":