@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,66 @@
1
+ import Anthropic from "@anthropic-ai/sdk";
2
+ import type { Page } from "playwright";
3
+ import type { Screenshotter } from "./screenshotter.js";
4
+ import type { Scenario } from "../types/index.js";
5
+ /**
6
+ * Resolves a model preset key (quick/thorough/deep) to its full model ID.
7
+ * If the input doesn't match a preset, returns it as-is.
8
+ */
9
+ export declare function resolveModel(nameOrPreset: string): string;
10
+ export declare const BROWSER_TOOLS: Anthropic.Tool[];
11
+ interface ToolContext {
12
+ runId: string;
13
+ scenarioSlug: string;
14
+ stepNumber: number;
15
+ }
16
+ interface ScreenshotResult {
17
+ filePath: string;
18
+ width: number;
19
+ height: number;
20
+ timestamp: string;
21
+ }
22
+ interface ToolExecutionResult {
23
+ result: string;
24
+ screenshot?: ScreenshotResult;
25
+ }
26
+ /**
27
+ * Executes a single browser tool action against the Playwright page.
28
+ * Returns the result string and an optional screenshot capture.
29
+ */
30
+ export declare function executeTool(page: Page, screenshotter: Screenshotter, toolName: string, toolInput: Record<string, unknown>, context: ToolContext): Promise<ToolExecutionResult>;
31
+ interface AgentLoopOptions {
32
+ client: Anthropic;
33
+ page: Page;
34
+ scenario: Scenario;
35
+ screenshotter: Screenshotter;
36
+ model: string;
37
+ runId: string;
38
+ maxTurns?: number;
39
+ }
40
+ interface AgentLoopResult {
41
+ status: "passed" | "failed" | "error";
42
+ reasoning: string;
43
+ stepsCompleted: number;
44
+ tokensUsed: number;
45
+ screenshots: Array<{
46
+ filePath: string;
47
+ width: number;
48
+ height: number;
49
+ timestamp: string;
50
+ action: string;
51
+ stepNumber: number;
52
+ }>;
53
+ }
54
+ /**
55
+ * Runs the AI agent loop: sends the scenario to Claude, processes tool calls,
56
+ * executes browser actions, and collects results until the agent reports
57
+ * a final result or the turn limit is reached.
58
+ */
59
+ export declare function runAgentLoop(options: AgentLoopOptions): Promise<AgentLoopResult>;
60
+ /**
61
+ * Creates an Anthropic client instance. Uses the provided API key,
62
+ * or falls back to the ANTHROPIC_API_KEY environment variable.
63
+ */
64
+ export declare function createClient(apiKey?: string): Anthropic;
65
+ export {};
66
+ //# sourceMappingURL=ai-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-client.d.ts","sourceRoot":"","sources":["../../src/lib/ai-client.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,KAAK,EAAe,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI/D;;;GAGG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAKzD;AAID,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,IAAI,EA0LzC,CAAC;AAIF,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,mBAAmB;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,mBAAmB,CAAC,CA2I9B;AAID,UAAU,gBAAgB;IACxB,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,aAAa,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,eAAe;IACvB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,KAAK,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;CACJ;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,eAAe,CAAC,CA6J1B;AAID;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAQvD"}
@@ -0,0 +1,64 @@
1
+ import { type Browser, type Page } from "playwright";
2
+ interface ViewportSize {
3
+ width: number;
4
+ height: number;
5
+ }
6
+ interface LaunchOptions {
7
+ headless?: boolean;
8
+ viewport?: ViewportSize;
9
+ }
10
+ interface PageOptions {
11
+ viewport?: ViewportSize;
12
+ userAgent?: string;
13
+ locale?: string;
14
+ }
15
+ /**
16
+ * Launches a Chromium browser instance via Playwright.
17
+ */
18
+ export declare function launchBrowser(options?: LaunchOptions): Promise<Browser>;
19
+ /**
20
+ * Creates a new page in the given browser with optional viewport,
21
+ * user agent, and locale settings.
22
+ */
23
+ export declare function getPage(browser: Browser, options?: PageOptions): Promise<Page>;
24
+ /**
25
+ * Closes a browser instance gracefully.
26
+ */
27
+ export declare function closeBrowser(browser: Browser): Promise<void>;
28
+ /**
29
+ * A pool of reusable browser instances to avoid the overhead of
30
+ * launching a new browser for every test scenario.
31
+ */
32
+ export declare class BrowserPool {
33
+ private readonly pool;
34
+ private readonly maxSize;
35
+ private readonly headless;
36
+ private readonly viewport;
37
+ constructor(size: number, options?: {
38
+ headless?: boolean;
39
+ viewport?: ViewportSize;
40
+ });
41
+ /**
42
+ * Acquires a browser and page from the pool. Reuses an idle browser
43
+ * if available, or launches a new one if the pool hasn't reached capacity.
44
+ * Waits and retries if the pool is fully occupied.
45
+ */
46
+ acquire(): Promise<{
47
+ browser: Browser;
48
+ page: Page;
49
+ }>;
50
+ /**
51
+ * Returns a browser to the pool, marking it as available.
52
+ */
53
+ release(browser: Browser): void;
54
+ /**
55
+ * Closes all browsers in the pool and clears it.
56
+ */
57
+ closeAll(): Promise<void>;
58
+ }
59
+ /**
60
+ * Installs Chromium for Playwright using bunx.
61
+ */
62
+ export declare function installBrowser(): Promise<void>;
63
+ export {};
64
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/lib/browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAI/D,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB;AAED,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AASD;;GAEG;AACH,wBAAsB,aAAa,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAgB7E;AAED;;;GAGG;AACH,wBAAsB,OAAO,CAC3B,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAOlE;AAED;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAmB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;gBAGtC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,YAAY,CAAA;KAAE;IAO3D;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;IAoC1D;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAO/B;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAShC;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CASpD"}
@@ -0,0 +1,18 @@
1
+ import type { TestersConfig } from "../types/index.js";
2
+ /**
3
+ * Returns the hardcoded default configuration.
4
+ */
5
+ export declare function getDefaultConfig(): TestersConfig;
6
+ /**
7
+ * Loads configuration from ~/.testers/config.json (if it exists),
8
+ * merges with defaults, and applies environment variable overrides.
9
+ */
10
+ export declare function loadConfig(): TestersConfig;
11
+ /**
12
+ * Resolves a model name or preset key to a full model identifier.
13
+ * If `nameOrId` matches a preset key (quick, thorough, deep), returns
14
+ * the corresponding model ID from MODEL_MAP. Otherwise returns the
15
+ * input string unchanged.
16
+ */
17
+ export declare function resolveModel(nameOrId: string): string;
18
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAe,MAAM,mBAAmB,CAAC;AAMpE;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAgBhD;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,aAAa,CA6C1C;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKrD"}
@@ -0,0 +1,18 @@
1
+ import type { Run, Result, Screenshot } from "../types/index.js";
2
+ export interface ReportOptions {
3
+ json?: boolean;
4
+ verbose?: boolean;
5
+ }
6
+ export declare function formatTerminal(run: Run, results: Result[]): string;
7
+ export declare function formatSummary(run: Run): string;
8
+ export declare function formatJSON(run: Run, results: Result[]): string;
9
+ export declare function getExitCode(run: Run): number;
10
+ export declare function formatRunList(runs: Run[]): string;
11
+ export declare function formatScenarioList(scenarios: Array<{
12
+ shortId: string;
13
+ name: string;
14
+ priority: string;
15
+ tags: string[];
16
+ }>): string;
17
+ export declare function formatResultDetail(result: Result, screenshots: Screenshot[]): string;
18
+ //# sourceMappingURL=reporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../../src/lib/reporter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIjE,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAmDlE;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAU9C;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAoD9D;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CAI5C;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,MAAM,CA6BjD;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,GAAG,MAAM,CA2BhI;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,CAqCpF"}
@@ -0,0 +1,36 @@
1
+ import type { Scenario, Run, Result } from "../types/index.js";
2
+ export interface RunOptions {
3
+ url: string;
4
+ model?: string;
5
+ headed?: boolean;
6
+ parallel?: number;
7
+ timeout?: number;
8
+ projectId?: string;
9
+ apiKey?: string;
10
+ screenshotDir?: string;
11
+ }
12
+ export interface RunEvent {
13
+ type: "scenario:start" | "scenario:pass" | "scenario:fail" | "scenario:error" | "screenshot:captured" | "run:complete";
14
+ scenarioId?: string;
15
+ scenarioName?: string;
16
+ resultId?: string;
17
+ runId?: string;
18
+ error?: string;
19
+ screenshotPath?: string;
20
+ }
21
+ export type RunEventHandler = (event: RunEvent) => void;
22
+ export declare function onRunEvent(handler: RunEventHandler): void;
23
+ export declare function runSingleScenario(scenario: Scenario, runId: string, options: RunOptions): Promise<Result>;
24
+ export declare function runBatch(scenarios: Scenario[], options: RunOptions): Promise<{
25
+ run: Run;
26
+ results: Result[];
27
+ }>;
28
+ export declare function runByFilter(options: RunOptions & {
29
+ tags?: string[];
30
+ priority?: string;
31
+ scenarioIds?: string[];
32
+ }): Promise<{
33
+ run: Run;
34
+ results: Result[];
35
+ }>;
36
+ //# sourceMappingURL=runner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/lib/runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAW/D,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,gBAAgB,GAAG,eAAe,GAAG,eAAe,GAAG,gBAAgB,GAAG,qBAAqB,GAAG,cAAc,CAAC;IACvH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;AAIxD,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,CAEzD;AAMD,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,MAAM,CAAC,CAiFjB;AAED,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,QAAQ,EAAE,EACrB,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CA4D1C;AAED,wBAAsB,WAAW,CAC/B,OAAO,EAAE,UAAU,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GACnF,OAAO,CAAC;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAuB1C"}
@@ -0,0 +1,60 @@
1
+ import type { Page } from "playwright";
2
+ /**
3
+ * Convert arbitrary text to a URL/filesystem-safe slug.
4
+ * Lowercases, replaces non-alphanumeric runs with a single hyphen, trims
5
+ * leading/trailing hyphens.
6
+ */
7
+ export declare function slugify(text: string): string;
8
+ /**
9
+ * Build a zero-padded screenshot filename.
10
+ * Example: stepNumber=1, action="Navigate homepage" → "001-navigate-homepage.png"
11
+ */
12
+ export declare function generateFilename(stepNumber: number, action: string): string;
13
+ /**
14
+ * Derive the directory path for a specific scenario inside a run.
15
+ * Layout: `<baseDir>/<runId>/<scenarioSlug>/`
16
+ */
17
+ export declare function getScreenshotDir(baseDir: string, runId: string, scenarioSlug: string): string;
18
+ /**
19
+ * Create `dirPath` (and any parents) if it does not already exist.
20
+ */
21
+ export declare function ensureDir(dirPath: string): void;
22
+ interface ScreenshotterOptions {
23
+ baseDir?: string;
24
+ format?: "png" | "jpeg";
25
+ quality?: number;
26
+ fullPage?: boolean;
27
+ }
28
+ interface CaptureOptions {
29
+ runId: string;
30
+ scenarioSlug: string;
31
+ stepNumber: number;
32
+ action: string;
33
+ }
34
+ interface CaptureResult {
35
+ filePath: string;
36
+ width: number;
37
+ height: number;
38
+ timestamp: string;
39
+ }
40
+ export declare class Screenshotter {
41
+ private readonly baseDir;
42
+ private readonly format;
43
+ private readonly quality;
44
+ private readonly fullPage;
45
+ constructor(options?: ScreenshotterOptions);
46
+ /**
47
+ * Capture a screenshot of the current page state.
48
+ */
49
+ capture(page: Page, options: CaptureOptions): Promise<CaptureResult>;
50
+ /**
51
+ * Capture a full-page screenshot regardless of the instance default.
52
+ */
53
+ captureFullPage(page: Page, options: CaptureOptions): Promise<CaptureResult>;
54
+ /**
55
+ * Capture a screenshot of a specific element identified by `selector`.
56
+ */
57
+ captureElement(page: Page, selector: string, options: CaptureOptions): Promise<CaptureResult>;
58
+ }
59
+ export {};
60
+ //# sourceMappingURL=screenshotter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenshotter.d.ts","sourceRoot":"","sources":["../../src/lib/screenshotter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAOvC;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK5C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,MAAM,CAIR;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,GACnB,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAI/C;AAID,UAAU,oBAAoB;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,aAAa;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;gBAEvB,OAAO,GAAE,oBAAyB;IAO9C;;OAEG;IACG,OAAO,CACX,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,aAAa,CAAC;IA4BzB;;OAEG;IACG,eAAe,CACnB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,aAAa,CAAC;IA4BzB;;OAEG;IACG,cAAc,CAClB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,aAAa,CAAC;CA0B1B"}
@@ -0,0 +1,32 @@
1
+ import { Database } from "bun:sqlite";
2
+ import type { CreateScenarioInput } from "../types/index.js";
3
+ interface TodosTask {
4
+ id: string;
5
+ short_id: string | null;
6
+ title: string;
7
+ description: string | null;
8
+ status: string;
9
+ priority: string;
10
+ tags: string;
11
+ project_id: string | null;
12
+ }
13
+ export declare function connectToTodos(): Database;
14
+ export declare function pullTasks(options?: {
15
+ projectName?: string;
16
+ tags?: string[];
17
+ priority?: string;
18
+ status?: string;
19
+ }): TodosTask[];
20
+ export declare function taskToScenarioInput(task: TodosTask, projectId?: string): CreateScenarioInput;
21
+ export declare function importFromTodos(options?: {
22
+ projectName?: string;
23
+ tags?: string[];
24
+ priority?: string;
25
+ projectId?: string;
26
+ }): {
27
+ imported: number;
28
+ skipped: number;
29
+ };
30
+ export declare function markTodoDone(taskId: string): boolean;
31
+ export {};
32
+ //# sourceMappingURL=todos-connector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"todos-connector.d.ts","sourceRoot":"","sources":["../../src/lib/todos-connector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,KAAK,EAAE,mBAAmB,EAAoB,MAAM,mBAAmB,CAAC;AAI/E,UAAU,SAAS;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAcD,wBAAgB,cAAc,IAAI,QAAQ,CAWzC;AAED,wBAAgB,SAAS,CACvB,OAAO,GAAE;IACP,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACZ,GACL,SAAS,EAAE,CA6Cb;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,mBAAmB,CA2B5F;AAED,wBAAgB,eAAe,CAC7B,OAAO,GAAE;IACP,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA8BvC;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAoBpD"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bun
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":""}