@syrin/iris 0.4.0

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/next.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ /** Wrap a Next.js config to add dev-only source-file mapping (data-iris-source), keeping SWC. */
2
+ declare function withIris<T = unknown>(nextConfig?: T): T;
3
+
4
+ export { withIris };
package/dist/next.js ADDED
@@ -0,0 +1,64 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
+ });
13
+ var __commonJS = (cb, mod) => function __require2() {
14
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
15
+ };
16
+ var __copyProps = (to, from, except, desc) => {
17
+ if (from && typeof from === "object" || typeof from === "function") {
18
+ for (let key of __getOwnPropNames(from))
19
+ if (!__hasOwnProp.call(to, key) && key !== except)
20
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
21
+ }
22
+ return to;
23
+ };
24
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
25
+ // If the importer is in node compatibility mode or this is not an ESM
26
+ // file that has been converted to a CommonJS file using a Babel-
27
+ // compatible transform (i.e. "__esModule" has not been set), then set
28
+ // "default" to the CommonJS "module.exports" for node compatibility.
29
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
30
+ mod
31
+ ));
32
+
33
+ // ../next/index.cjs
34
+ var require_next = __commonJS({
35
+ "../next/index.cjs"(exports, module) {
36
+ "use strict";
37
+ function withIris2(nextConfig = {}) {
38
+ if (process.env.NODE_ENV === "production") return nextConfig;
39
+ const userWebpack = nextConfig.webpack;
40
+ return {
41
+ ...nextConfig,
42
+ webpack(config, ctx) {
43
+ config.module = config.module || { rules: [] };
44
+ config.module.rules = config.module.rules || [];
45
+ config.module.rules.push({
46
+ test: /\.(t|j)sx$/,
47
+ exclude: /node_modules/,
48
+ enforce: "pre",
49
+ use: [{ loader: __require.resolve("./loader.cjs") }]
50
+ });
51
+ return typeof userWebpack === "function" ? userWebpack(config, ctx) : config;
52
+ }
53
+ };
54
+ }
55
+ module.exports = { withIris: withIris2 };
56
+ }
57
+ });
58
+
59
+ // src/next.ts
60
+ var import_iris_next = __toESM(require_next(), 1);
61
+ var export_withIris = import_iris_next.withIris;
62
+ export {
63
+ export_withIris as withIris
64
+ };
@@ -0,0 +1,59 @@
1
+ import { Bridge } from './bridge.js';
2
+ export { Bridge } from './bridge.js';
3
+ import { RealInputProvider, OwnedRealInputProvider } from './input/real-input.js';
4
+ export { CdpRealInputProvider, DriveError, ElementBox, LaunchFn, LaunchedProviderOptions, LaunchedRealInputProvider, OwnedRealInputProvider, RealInputArgs, RealInputProvider, boxCenter, isPointerAction, performGesture } from './input/real-input.js';
5
+ export { AnnotationStore } from './flows/annotation-store.js';
6
+ export { BaselineStore, diffLines, normalizeLines } from './project/baselines.js';
7
+ export { CORE_TOOL_NAMES, TOOL_PROFILE, TOOL_PROFILE_ENV, ToolProfile, filterTools, resolveToolProfile } from './tools/profiles.js';
8
+ export { Clock, FlowResult, FlowStore, recordedStepToFlowStep } from './flows/flows.js';
9
+ export { CompiledProgram, RecordedStep, RecordingStore } from './flows/recordings.js';
10
+ export { CrawlAnomaly, CrawlOptions, CrawlReport, CrawlSession, crawl } from './crawl/crawl.js';
11
+ export { DiffOptions, VisualDiffResult, VisualRect, diffPng } from './visual/visual-diff.js';
12
+ export { EvalResult, Predicate, PredicateSchema, evaluatePredicate, waitForPredicate } from './events/predicate.js';
13
+ export { FileSystemPort, createNodeFileSystem } from './project/fs-port.js';
14
+ export { FlowReplaySession, WaitForSignal, nearestTestid, replayFlow } from './flows/flow-replay.js';
15
+ export { IrisDirPaths, ReadContractResult, baselinePath, ensureIrisDir, flowPath, irisDirPaths, readContract, writeContract } from './project/iris-dir.js';
16
+ export { IrisTool } from './tools/tool-names.js';
17
+ export { ProjectStore, ReadProjectResult } from './project/project-store.js';
18
+ export { RecommendationInputs, buildSessionRecommendation } from './session/session-recommendation.js';
19
+ export { RingBuffer } from './events/ring-buffer.js';
20
+ export { SESSION_BOUND_TOOLS, SESSION_EXEMPT_TOOLS, runTool } from './tools/invoke-tool.js';
21
+ export { ScrollFindQuery, ScrollFindResult, ScrollFindSession, scrollToFind } from './input/scroll-find.js';
22
+ export { Session, SessionHealth, SessionInfo, SessionManager } from './session/session.js';
23
+ export { TOOLS, ToolDef, ToolDeps } from './tools/tools.js';
24
+ export { ToolInvoker, UNKNOWN_TOOL_ERROR, createToolInvoker } from './tools/tool-invoker.js';
25
+ export { VisualStore } from './visual/visual-store.js';
26
+ export { buildReactionReport } from './events/reaction.js';
27
+
28
+ interface StartOptions {
29
+ port?: number;
30
+ /** When false, skip the MCP stdio transport (used in tests). */
31
+ mcp?: boolean;
32
+ /** CDP endpoint for native real-input mode. Defaults to env IRIS_CDP_URL. No-op if unset. */
33
+ cdpUrl?: string;
34
+ /** launch+own a Playwright Chromium at this url and route pointer actions through it. */
35
+ driveUrl?: string;
36
+ /** launch headless (default true; CLI `--headed` sets false). */
37
+ headless?: boolean;
38
+ /** injected so tests swap in a fake launched provider instead of real Playwright. */
39
+ realInputFactory?: (opts: {
40
+ driveUrl: string;
41
+ headless: boolean;
42
+ }) => OwnedRealInputProvider;
43
+ /** absolute .iris root. Defaults to process.cwd()/.iris. Injectable for tests. */
44
+ irisRoot?: string;
45
+ /** injectable clock for contract.json's generatedAt stamp. Defaults to Date.now. */
46
+ now?: () => number;
47
+ /** 'core' exposes the lean tool surface. Defaults to env IRIS_TOOL_PROFILE, else 'full'. */
48
+ toolProfile?: string;
49
+ }
50
+ interface RunningServer {
51
+ bridge: Bridge;
52
+ /** the active real-input provider (launched/CDP), if any. */
53
+ realInput?: RealInputProvider;
54
+ close: () => Promise<void>;
55
+ }
56
+ /** Start the Iris bridge (browser WS endpoint) and, by default, the MCP stdio server. */
57
+ declare function start(options?: StartOptions): Promise<RunningServer>;
58
+
59
+ export { type RunningServer, type StartOptions, start };