@kkeve/suite 0.0.4 → 0.0.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/commands/init.d.ts +1 -1
- package/dist/commands/init.js +4 -4
- package/dist/commands/vitest.js +3 -3
- package/dist/core/keve-report.d.ts +1 -1
- package/dist/core/keve-report.js +1 -1
- package/dist/core/keve-test.d.ts +1 -1
- package/dist/core/keve-test.js +1 -1
- package/dist/core/pw-config.js +2 -2
- package/dist/page-agent/agent.d.ts +1 -1
- package/dist/page-agent/agent.js +1 -1
- package/package.json +1 -1
package/dist/commands/init.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Creates the .keve/ workspace, Playwright infrastructure,
|
|
5
5
|
* and copies keve skills into .codeflicker/skills/.
|
|
6
6
|
*
|
|
7
|
-
* Note: keveAssert is exported directly from @
|
|
7
|
+
* Note: keveAssert is exported directly from @kkeve/suite (import { keveAssert } from '@kkeve/suite')
|
|
8
8
|
* — no file needs to be written to the project.
|
|
9
9
|
*/
|
|
10
10
|
export interface InitOptions {
|
package/dist/commands/init.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Creates the .keve/ workspace, Playwright infrastructure,
|
|
6
6
|
* and copies keve skills into .codeflicker/skills/.
|
|
7
7
|
*
|
|
8
|
-
* Note: keveAssert is exported directly from @
|
|
8
|
+
* Note: keveAssert is exported directly from @kkeve/suite (import { keveAssert } from '@kkeve/suite')
|
|
9
9
|
* — no file needs to be written to the project.
|
|
10
10
|
*/
|
|
11
11
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -278,10 +278,10 @@ async function init(options) {
|
|
|
278
278
|
else {
|
|
279
279
|
console.log(chalk_1.default.gray(' Exists: vitest.config.ts (preserved)'));
|
|
280
280
|
}
|
|
281
|
-
// Note: keveAssert is exported from @
|
|
281
|
+
// Note: keveAssert is exported from @kkeve/suite directly
|
|
282
282
|
// No file needs to be written — users import it:
|
|
283
|
-
// import { keveAssert } from '@
|
|
284
|
-
console.log(chalk_1.default.gray(' ⓘ keveAssert available via: import { keveAssert } from "@
|
|
283
|
+
// import { keveAssert } from '@kkeve/suite';
|
|
284
|
+
console.log(chalk_1.default.gray(' ⓘ keveAssert available via: import { keveAssert } from "@kkeve/suite"'));
|
|
285
285
|
console.log(chalk_1.default.green('\n ✓ keve init complete'));
|
|
286
286
|
console.log(chalk_1.default.gray('\n Next steps:'));
|
|
287
287
|
console.log(chalk_1.default.gray(' 1. keve dev-test — 静态分析 + 单测 + 组件测试(开发阶段)'));
|
package/dist/commands/vitest.js
CHANGED
|
@@ -52,12 +52,12 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
52
52
|
*
|
|
53
53
|
* pnpm structure:
|
|
54
54
|
* node_modules/.pnpm/@ks-data+keve-agent@.../node_modules/
|
|
55
|
-
* ├── @
|
|
55
|
+
* ├── @kkeve/suite/ ← __dirname is in dist/commands/ here
|
|
56
56
|
* └── vitest/ ← sibling dep, walk up to find
|
|
57
57
|
*
|
|
58
58
|
* npm/node structure:
|
|
59
59
|
* node_modules/
|
|
60
|
-
* ├── @
|
|
60
|
+
* ├── @kkeve/suite/ ← __dirname is in dist/commands/ here
|
|
61
61
|
* └── vitest/ ← sibling dep, walk up to find
|
|
62
62
|
*/
|
|
63
63
|
function findVitestBinary() {
|
|
@@ -133,7 +133,7 @@ async function vitest(options) {
|
|
|
133
133
|
const vitestInfo = findVitestBinary();
|
|
134
134
|
if (!vitestInfo) {
|
|
135
135
|
console.error(chalk_1.default.red(' ✗ Vitest not found'));
|
|
136
|
-
console.error(chalk_1.default.yellow(' Install: pnpm add -D @
|
|
136
|
+
console.error(chalk_1.default.yellow(' Install: pnpm add -D @kkeve/suite (includes vitest)'));
|
|
137
137
|
process.exit(1);
|
|
138
138
|
}
|
|
139
139
|
const { bin: vitestBin, nodeModules: vitestNodeModules } = vitestInfo;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Usage in playwright config:
|
|
12
12
|
* reporter: [
|
|
13
13
|
* ['list'],
|
|
14
|
-
* ['@
|
|
14
|
+
* ['@kkeve/suite/keve-report'],
|
|
15
15
|
* ]
|
|
16
16
|
*/
|
|
17
17
|
import type { Reporter, TestCase, TestResult, FullResult, FullConfig, Suite } from '@playwright/test/reporter';
|
package/dist/core/keve-report.js
CHANGED
package/dist/core/keve-test.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* keveAssert 已被吸收:keveGoal 的 expected 即断言语义
|
|
11
11
|
*
|
|
12
12
|
* Usage:
|
|
13
|
-
* import { test, expect } from '@
|
|
13
|
+
* import { test, expect } from '@kkeve/suite/keve-test';
|
|
14
14
|
*
|
|
15
15
|
* test('my test', async ({ page, keveGoal }) => {
|
|
16
16
|
* await keveGoal({ step: '导航到列表页', expected: '页面加载完成' }, async () => {
|
package/dist/core/keve-test.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* keveAssert 已被吸收:keveGoal 的 expected 即断言语义
|
|
12
12
|
*
|
|
13
13
|
* Usage:
|
|
14
|
-
* import { test, expect } from '@
|
|
14
|
+
* import { test, expect } from '@kkeve/suite/keve-test';
|
|
15
15
|
*
|
|
16
16
|
* test('my test', async ({ page, keveGoal }) => {
|
|
17
17
|
* await keveGoal({ step: '导航到列表页', expected: '页面加载完成' }, async () => {
|
package/dist/core/pw-config.js
CHANGED
|
@@ -73,7 +73,7 @@ const round = process.env.KEVE_ROUND || 'latest';
|
|
|
73
73
|
const resultDir = path.join(taskDir, 'test-artifacts', \`round-\${round}\`);
|
|
74
74
|
|
|
75
75
|
export default defineConfig({
|
|
76
|
-
globalSetup: require.resolve('@
|
|
76
|
+
globalSetup: require.resolve('@kkeve/suite/global-setup'),
|
|
77
77
|
testDir: path.join(taskDir, 'keve_test_spec'),
|
|
78
78
|
fullyParallel: true,
|
|
79
79
|
workers: ${workers},
|
|
@@ -83,7 +83,7 @@ export default defineConfig({
|
|
|
83
83
|
reporter: [
|
|
84
84
|
['list'],
|
|
85
85
|
['json', { outputFile: path.join(resultDir, 'test-results.json') }],
|
|
86
|
-
[require.resolve('@
|
|
86
|
+
[require.resolve('@kkeve/suite/keve-report')],
|
|
87
87
|
],
|
|
88
88
|
use: {
|
|
89
89
|
baseURL: ${baseURLLine},${cdp ? `\n // CDP mode: login state preserved via connected Chrome` : `\n storageState: path.resolve(projectRoot, '.auth/storage-state.json'),`}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* const result = await agent.execute(step, expected, { learnedActionsHint, fnResult });
|
|
15
15
|
*/
|
|
16
16
|
import type { Page } from '@playwright/test';
|
|
17
|
-
import { LLM } from '@
|
|
17
|
+
import { LLM } from '@kkeve/core/llm';
|
|
18
18
|
export interface AgentStepEvent {
|
|
19
19
|
type: 'step';
|
|
20
20
|
stepIndex: number;
|
package/dist/page-agent/agent.js
CHANGED
|
@@ -50,7 +50,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
50
50
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
51
|
exports.KevePageAgent = void 0;
|
|
52
52
|
exports.reactLoop = reactLoop;
|
|
53
|
-
const llm_1 = require("@
|
|
53
|
+
const llm_1 = require("@kkeve/core/llm");
|
|
54
54
|
const zod_1 = require("zod");
|
|
55
55
|
const fs = __importStar(require("node:fs"));
|
|
56
56
|
const path = __importStar(require("node:path"));
|
package/package.json
CHANGED