@hasna/testers 0.0.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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +196 -0
  3. package/dashboard/dist/assets/index-CDcHt94n.css +1 -0
  4. package/dashboard/dist/assets/index-DCNDCh61.js +49 -0
  5. package/dashboard/dist/index.html +13 -0
  6. package/dist/cli/index.d.ts +3 -0
  7. package/dist/cli/index.d.ts.map +1 -0
  8. package/dist/cli/index.js +4112 -0
  9. package/dist/db/agents.d.ts +10 -0
  10. package/dist/db/agents.d.ts.map +1 -0
  11. package/dist/db/database.d.ts +10 -0
  12. package/dist/db/database.d.ts.map +1 -0
  13. package/dist/db/projects.d.ts +11 -0
  14. package/dist/db/projects.d.ts.map +1 -0
  15. package/dist/db/results.d.ts +20 -0
  16. package/dist/db/results.d.ts.map +1 -0
  17. package/dist/db/runs.d.ts +9 -0
  18. package/dist/db/runs.d.ts.map +1 -0
  19. package/dist/db/scenarios.d.ts +8 -0
  20. package/dist/db/scenarios.d.ts.map +1 -0
  21. package/dist/db/screenshots.d.ts +13 -0
  22. package/dist/db/screenshots.d.ts.map +1 -0
  23. package/dist/index.d.ts +18 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +2515 -0
  26. package/dist/lib/ai-client.d.ts +66 -0
  27. package/dist/lib/ai-client.d.ts.map +1 -0
  28. package/dist/lib/browser.d.ts +64 -0
  29. package/dist/lib/browser.d.ts.map +1 -0
  30. package/dist/lib/config.d.ts +18 -0
  31. package/dist/lib/config.d.ts.map +1 -0
  32. package/dist/lib/reporter.d.ts +18 -0
  33. package/dist/lib/reporter.d.ts.map +1 -0
  34. package/dist/lib/runner.d.ts +36 -0
  35. package/dist/lib/runner.d.ts.map +1 -0
  36. package/dist/lib/screenshotter.d.ts +60 -0
  37. package/dist/lib/screenshotter.d.ts.map +1 -0
  38. package/dist/lib/todos-connector.d.ts +32 -0
  39. package/dist/lib/todos-connector.d.ts.map +1 -0
  40. package/dist/mcp/index.d.ts +3 -0
  41. package/dist/mcp/index.d.ts.map +1 -0
  42. package/dist/mcp/index.js +5903 -0
  43. package/dist/server/index.d.ts +3 -0
  44. package/dist/server/index.d.ts.map +1 -0
  45. package/dist/server/index.js +1654 -0
  46. package/dist/types/index.d.ts +276 -0
  47. package/dist/types/index.d.ts.map +1 -0
  48. package/package.json +78 -0
@@ -0,0 +1,10 @@
1
+ import { type Agent } from "../types/index.js";
2
+ export declare function registerAgent(input: {
3
+ name: string;
4
+ description?: string;
5
+ role?: string;
6
+ }): Agent;
7
+ export declare function getAgent(id: string): Agent | null;
8
+ export declare function getAgentByName(name: string): Agent | null;
9
+ export declare function listAgents(): Agent[];
10
+ //# sourceMappingURL=agents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/db/agents.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAGX,MAAM,mBAAmB,CAAC;AAG3B,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,KAAK,CA2BR;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAIjD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,IAAI,CAIzD;AAED,wBAAgB,UAAU,IAAI,KAAK,EAAE,CAIpC"}
@@ -0,0 +1,10 @@
1
+ import { Database } from "bun:sqlite";
2
+ declare function now(): string;
3
+ declare function uuid(): string;
4
+ declare function shortUuid(): string;
5
+ export declare function getDatabase(): Database;
6
+ export declare function closeDatabase(): void;
7
+ export declare function resetDatabase(): void;
8
+ export declare function resolvePartialId(table: string, partialId: string): string | null;
9
+ export { now, uuid, shortUuid };
10
+ //# sourceMappingURL=database.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAOtC,iBAAS,GAAG,IAAI,MAAM,CAErB;AAED,iBAAS,IAAI,IAAI,MAAM,CAEtB;AAED,iBAAS,SAAS,IAAI,MAAM,CAE3B;AA4ID,wBAAgB,WAAW,IAAI,QAAQ,CAwBtC;AAED,wBAAgB,aAAa,IAAI,IAAI,CAKpC;AAED,wBAAgB,aAAa,IAAI,IAAI,CASpC;AAED,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAOf;AAED,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { type Project } from "../types/index.js";
2
+ export declare function createProject(input: {
3
+ name: string;
4
+ path?: string;
5
+ description?: string;
6
+ }): Project;
7
+ export declare function getProject(id: string): Project | null;
8
+ export declare function getProjectByPath(path: string): Project | null;
9
+ export declare function listProjects(): Project[];
10
+ export declare function ensureProject(name: string, path: string): Project;
11
+ //# sourceMappingURL=projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/db/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EAGb,MAAM,mBAAmB,CAAC;AAG3B,wBAAgB,aAAa,CAAC,KAAK,EAAE;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,OAAO,CAkBV;AAED,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAIrD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAI7D;AAED,wBAAgB,YAAY,IAAI,OAAO,EAAE,CAIxC;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAajE"}
@@ -0,0 +1,20 @@
1
+ import { type Result, type ResultStatus } from "../types/index.js";
2
+ export declare function createResult(input: {
3
+ runId: string;
4
+ scenarioId: string;
5
+ model: string;
6
+ stepsTotal: number;
7
+ }): Result;
8
+ export declare function getResult(id: string): Result | null;
9
+ export declare function listResults(runId: string): Result[];
10
+ export declare function updateResult(id: string, updates: Partial<{
11
+ status: ResultStatus;
12
+ reasoning: string;
13
+ error: string;
14
+ stepsCompleted: number;
15
+ durationMs: number;
16
+ tokensUsed: number;
17
+ costCents: number;
18
+ }>): Result;
19
+ export declare function getResultsByRun(runId: string): Result[];
20
+ //# sourceMappingURL=results.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"results.d.ts","sourceRoot":"","sources":["../../src/db/results.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EAEX,KAAK,YAAY,EAElB,MAAM,mBAAmB,CAAC;AAG3B,wBAAgB,YAAY,CAAC,KAAK,EAAE;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAkBT;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAanD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAMnD;AAED,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC,GACD,MAAM,CA+CR;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAEvD"}
@@ -0,0 +1,9 @@
1
+ import { type Run, type RunRow, type CreateRunInput, type RunFilter } from "../types/index.js";
2
+ export declare function createRun(input: CreateRunInput & {
3
+ model: string;
4
+ }): Run;
5
+ export declare function getRun(id: string): Run | null;
6
+ export declare function listRuns(filter?: RunFilter): Run[];
7
+ export declare function updateRun(id: string, updates: Partial<RunRow>): Run;
8
+ export declare function deleteRun(id: string): boolean;
9
+ //# sourceMappingURL=runs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/db/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EACR,KAAK,MAAM,EACX,KAAK,cAAc,EACnB,KAAK,SAAS,EAEf,MAAM,mBAAmB,CAAC;AAG3B,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,GAAG,CAoBxE;AAED,wBAAgB,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,GAAG,IAAI,CAc7C;AAED,wBAAgB,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,GAAG,GAAG,EAAE,CAgClD;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,GAAG,CA+DnE;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAO7C"}
@@ -0,0 +1,8 @@
1
+ import { type Scenario, type CreateScenarioInput, type UpdateScenarioInput, type ScenarioFilter } from "../types/index.js";
2
+ export declare function createScenario(input: CreateScenarioInput): Scenario;
3
+ export declare function getScenario(id: string): Scenario | null;
4
+ export declare function getScenarioByShortId(shortId: string): Scenario | null;
5
+ export declare function listScenarios(filter?: ScenarioFilter): Scenario[];
6
+ export declare function updateScenario(id: string, input: UpdateScenarioInput, version: number): Scenario;
7
+ export declare function deleteScenario(id: string): boolean;
8
+ //# sourceMappingURL=scenarios.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scenarios.d.ts","sourceRoot":"","sources":["../../src/db/scenarios.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EAGpB,MAAM,mBAAmB,CAAC;AAsB3B,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,QAAQ,CA6BnE;AAED,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAmBvD;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAIrE;AAED,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,QAAQ,EAAE,CA6CjE;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM,GAAG,QAAQ,CAgFhG;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAOlD"}
@@ -0,0 +1,13 @@
1
+ import { type Screenshot } from "../types/index.js";
2
+ export declare function createScreenshot(input: {
3
+ resultId: string;
4
+ stepNumber: number;
5
+ action: string;
6
+ filePath: string;
7
+ width: number;
8
+ height: number;
9
+ }): Screenshot;
10
+ export declare function getScreenshot(id: string): Screenshot | null;
11
+ export declare function listScreenshots(resultId: string): Screenshot[];
12
+ export declare function getScreenshotsByResult(resultId: string): Screenshot[];
13
+ //# sourceMappingURL=screenshots.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenshots.d.ts","sourceRoot":"","sources":["../../src/db/screenshots.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,mBAAmB,CAAC;AAG3B,wBAAgB,gBAAgB,CAAC,KAAK,EAAE;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,UAAU,CAoBb;AAED,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAI3D;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,EAAE,CAM9D;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,UAAU,EAAE,CAErE"}
@@ -0,0 +1,18 @@
1
+ export type { ScenarioPriority, RunStatus, ResultStatus, ModelPreset, ProjectRow, AgentRow, ScenarioRow, RunRow, ResultRow, ScreenshotRow, Project, Agent, Scenario, Run, Result, Screenshot, CreateScenarioInput, UpdateScenarioInput, CreateRunInput, ScenarioFilter, RunFilter, AuthConfig, BrowserConfig, ScreenshotConfig, TestersConfig, } from "./types/index.js";
2
+ export { MODEL_MAP, projectFromRow, agentFromRow, scenarioFromRow, runFromRow, resultFromRow, screenshotFromRow, ScenarioNotFoundError, RunNotFoundError, ResultNotFoundError, VersionConflictError, BrowserError, AIClientError, TodosConnectionError, ProjectNotFoundError, AgentNotFoundError, } from "./types/index.js";
3
+ export { getDatabase, closeDatabase, resetDatabase, resolvePartialId, now, uuid, shortUuid, } from "./db/database.js";
4
+ export { createScenario, getScenario, getScenarioByShortId, listScenarios, updateScenario, deleteScenario, } from "./db/scenarios.js";
5
+ export { createRun, getRun, listRuns, updateRun, deleteRun, } from "./db/runs.js";
6
+ export { createResult, getResult, listResults, updateResult, getResultsByRun, } from "./db/results.js";
7
+ export { createScreenshot, getScreenshot, listScreenshots, getScreenshotsByResult, } from "./db/screenshots.js";
8
+ export { createProject, getProject, getProjectByPath, listProjects, ensureProject, } from "./db/projects.js";
9
+ export { registerAgent, getAgent, getAgentByName, listAgents, } from "./db/agents.js";
10
+ export { loadConfig, resolveModel as resolveModelConfig, getDefaultConfig, } from "./lib/config.js";
11
+ export { launchBrowser, getPage, closeBrowser, BrowserPool, installBrowser, } from "./lib/browser.js";
12
+ export { Screenshotter, slugify, generateFilename, getScreenshotDir, ensureDir, } from "./lib/screenshotter.js";
13
+ export { createClient, resolveModel, runAgentLoop, executeTool, BROWSER_TOOLS, } from "./lib/ai-client.js";
14
+ export { runSingleScenario, runBatch, runByFilter, onRunEvent, } from "./lib/runner.js";
15
+ export type { RunOptions, RunEvent, RunEventHandler } from "./lib/runner.js";
16
+ export { formatTerminal, formatJSON, formatSummary, getExitCode, formatRunList, formatScenarioList, formatResultDetail, } from "./lib/reporter.js";
17
+ export { connectToTodos, pullTasks, taskToScenarioInput, importFromTodos, markTodoDone, } from "./lib/todos-connector.js";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,WAAW,EACX,UAAU,EACV,QAAQ,EACR,WAAW,EACX,MAAM,EACN,SAAS,EACT,aAAa,EACb,OAAO,EACP,KAAK,EACL,QAAQ,EACR,GAAG,EACH,MAAM,EACN,UAAU,EACV,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,SAAS,EACT,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,SAAS,EACT,cAAc,EACd,YAAY,EACZ,eAAe,EACf,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,q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