ptywright 0.6.1 → 0.6.2
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/agent.mjs +1 -1
- package/dist/bin/ptywright.mjs +1 -1
- package/dist/{cli-XLR4BPhA.mjs → cli-CRGGdNy8.mjs} +2 -2
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/mcp.mjs +1 -1
- package/dist/{runner-XEimk7TO.mjs → runner-CF2ieCkx.mjs} +35 -14
- package/dist/{server-COuf3mW7.mjs → server-DpsZDVu2.mjs} +1 -1
- package/package.json +1 -1
package/dist/agent.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as formatAgentLaunchPlan, i as runAgentSpecPath, n as replayAgentRecordPath, r as runAgentSpec, t as defaultSpecNameForPath } from "./runner-
|
|
1
|
+
import { a as formatAgentLaunchPlan, i as runAgentSpecPath, n as replayAgentRecordPath, r as runAgentSpec, t as defaultSpecNameForPath } from "./runner-CF2ieCkx.mjs";
|
|
2
2
|
export { defaultSpecNameForPath, formatAgentLaunchPlan, replayAgentRecordPath, runAgentSpec, runAgentSpecPath };
|
package/dist/bin/ptywright.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as loadPtywrightConfig } from "./config-bGg636EW.mjs";
|
|
2
|
-
import { C as writeAgentManifestPath, D as escapeHtml, E as escapeAttribute, O as normalizeAgentFlowSpec, S as validateAgentManifestFiles, T as readAgentCassettePath, _ as formatArgv, b as isAgentManifestLike, c as launchAgentBrowser, d as AGENT_RUN_RECORD_SCHEMA_URL, f as agentRunModeSchema, g as writeAgentRunRecordPath, h as readAgentRunRecordPath, i as runAgentSpecPath, k as sanitizeArtifactName, l as createAgentTemplateSpec, m as isAgentRunRecordLike, n as replayAgentRecordPath, o as resolveAgentLaunchTarget, p as formatAgentArgv, s as normalizeAgentFlowSpecWithConfig, u as loadAgentSpec, v as AGENT_MANIFEST_FILE_NAME, w as isAgentCassetteLike, x as readAgentManifestPath, y as agentManifestPath } from "./runner-
|
|
2
|
+
import { C as writeAgentManifestPath, D as escapeHtml, E as escapeAttribute, O as normalizeAgentFlowSpec, S as validateAgentManifestFiles, T as readAgentCassettePath, _ as formatArgv, b as isAgentManifestLike, c as launchAgentBrowser, d as AGENT_RUN_RECORD_SCHEMA_URL, f as agentRunModeSchema, g as writeAgentRunRecordPath, h as readAgentRunRecordPath, i as runAgentSpecPath, k as sanitizeArtifactName, l as createAgentTemplateSpec, m as isAgentRunRecordLike, n as replayAgentRecordPath, o as resolveAgentLaunchTarget, p as formatAgentArgv, s as normalizeAgentFlowSpecWithConfig, u as loadAgentSpec, v as AGENT_MANIFEST_FILE_NAME, w as isAgentCassetteLike, x as readAgentManifestPath, y as agentManifestPath } from "./runner-CF2ieCkx.mjs";
|
|
3
3
|
import { a as sameArgv, i as diffCommandMaps, r as formatZodIssues } from "./manifest_files-DW80c1H7.mjs";
|
|
4
4
|
import { i as portableCliPath, n as mergeProcessEnv, o as relativeHref, s as samePath } from "./env-DPYHo-zH.mjs";
|
|
5
5
|
import { d as resolvePtyBackend, u as createDefaultPtyAdapter } from "./runner-BHXXwxYp.mjs";
|
|
6
|
-
import { a as resolveScriptManifestPath, c as relocateScriptManifestCommands, d as resolveScriptRunSummaryPath, f as runScriptPath, i as readScriptManifestPath, l as resolveManifestPrimaryPath$1, n as runAllScripts, o as validateScriptManifest, r as findScriptSummaryManifest, t as createPtywrightServer, u as readScriptRunSummaryPath } from "./server-
|
|
6
|
+
import { a as resolveScriptManifestPath, c as relocateScriptManifestCommands, d as resolveScriptRunSummaryPath, f as runScriptPath, i as readScriptManifestPath, l as resolveManifestPrimaryPath$1, n as runAllScripts, o as validateScriptManifest, r as findScriptSummaryManifest, t as createPtywrightServer, u as readScriptRunSummaryPath } from "./server-DpsZDVu2.mjs";
|
|
7
7
|
import { c as createPtyCassetteReplay, i as formatPtyCassetteInspectLines, l as readPtyCassettePath, o as inspectPtyCassettePath, r as createPtyCassetteRecorder, t as wrapPtyLike, v as validatePtyCassette } from "./pty_like-DWIlWGgA.mjs";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { basename, dirname, extname, isAbsolute, join, relative, resolve } from "node:path";
|
package/dist/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as main } from "./cli-
|
|
1
|
+
import { t as main } from "./cli-CRGGdNy8.mjs";
|
|
2
2
|
export { main };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createPtywrightServer } from "./server-
|
|
1
|
+
import { t as createPtywrightServer } from "./server-DpsZDVu2.mjs";
|
|
2
2
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
3
3
|
//#region src/index.ts
|
|
4
4
|
const { server, sessions } = createPtywrightServer();
|
package/dist/mcp.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createPtywrightServer } from "./server-
|
|
1
|
+
import { t as createPtywrightServer } from "./server-DpsZDVu2.mjs";
|
|
2
2
|
export { createPtywrightServer };
|
|
@@ -1865,29 +1865,50 @@ function renderStableFrameDom(frame, targetCols) {
|
|
|
1865
1865
|
let html = "";
|
|
1866
1866
|
let totalRows = 0;
|
|
1867
1867
|
let wideBlockId = 0;
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
const blockCols = Math.max(targetCols, lineCols);
|
|
1873
|
-
html += `<div class="term-wide-row-block" data-aitty-wide-block="true" data-aitty-wide-block-id="${wideBlockId}" data-aitty-wide-block-kind="viewport-pan" style="--aitty-wide-block-cols: ${blockCols}">`;
|
|
1874
|
-
html += renderStableFrameRow(line, blockCols, totalRows);
|
|
1875
|
-
html += "</div>";
|
|
1876
|
-
totalRows += 1;
|
|
1877
|
-
} else for (const row of wrapStableLogicalLine(line, targetCols)) {
|
|
1868
|
+
let codeRunCols = 0;
|
|
1869
|
+
let codeRunRows = [];
|
|
1870
|
+
const renderPlainRow = (line) => {
|
|
1871
|
+
for (const row of wrapStableLogicalLine(line, targetCols)) {
|
|
1878
1872
|
html += renderStableFrameRow(row, targetCols, totalRows);
|
|
1879
1873
|
totalRows += 1;
|
|
1880
1874
|
}
|
|
1875
|
+
};
|
|
1876
|
+
const flushCodeRun = () => {
|
|
1877
|
+
if (codeRunRows.length === 0) return;
|
|
1878
|
+
if (codeRunCols > targetCols) {
|
|
1879
|
+
wideBlockId += 1;
|
|
1880
|
+
const blockCols = Math.max(targetCols, codeRunCols);
|
|
1881
|
+
html += `<div class="term-wide-row-block" data-aitty-wide-block="true" data-aitty-wide-block-id="${wideBlockId}" data-aitty-wide-block-kind="guttered-code" style="--aitty-wide-block-cols: ${blockCols}">`;
|
|
1882
|
+
for (const row of codeRunRows) {
|
|
1883
|
+
html += renderStableFrameRow(row, blockCols, totalRows);
|
|
1884
|
+
totalRows += 1;
|
|
1885
|
+
}
|
|
1886
|
+
html += "</div>";
|
|
1887
|
+
} else for (const row of codeRunRows) renderPlainRow(row);
|
|
1888
|
+
codeRunCols = 0;
|
|
1889
|
+
codeRunRows = [];
|
|
1890
|
+
};
|
|
1891
|
+
for (const line of frame.lines) {
|
|
1892
|
+
const lineText = stableLineText(line);
|
|
1893
|
+
const lineCols = cellsDisplayWidth(line.cells);
|
|
1894
|
+
if (isGutteredCodeLine(lineText) || isDiffLikeLine(lineText)) {
|
|
1895
|
+
codeRunRows.push(line);
|
|
1896
|
+
codeRunCols = Math.max(codeRunCols, lineCols);
|
|
1897
|
+
continue;
|
|
1898
|
+
}
|
|
1899
|
+
flushCodeRun();
|
|
1900
|
+
renderPlainRow(line);
|
|
1881
1901
|
}
|
|
1902
|
+
flushCodeRun();
|
|
1882
1903
|
return `<div class="term-grid" data-cols="${targetCols}" data-rows="${totalRows}" style="--term-cols: ${targetCols}; --term-rows: ${totalRows};">${html}</div>`;
|
|
1883
1904
|
}
|
|
1884
|
-
function shouldRenderViewportPan(line, lineCols, targetCols) {
|
|
1885
|
-
if (lineCols <= targetCols) return false;
|
|
1886
|
-
return isDiffLikeLine(stableLineText(line));
|
|
1887
|
-
}
|
|
1888
1905
|
function stableLineText(line) {
|
|
1889
1906
|
return line.cells.map((cell) => cell.text).join("").trimEnd();
|
|
1890
1907
|
}
|
|
1908
|
+
function isGutteredCodeLine(text) {
|
|
1909
|
+
const normalized = text.replace(/[│┃┆┊▏▕]/g, " ").trimStart();
|
|
1910
|
+
return /^\d+\s+(?:[+-]|\s{2,}\S)/.test(normalized);
|
|
1911
|
+
}
|
|
1891
1912
|
function isDiffLikeLine(text) {
|
|
1892
1913
|
const normalized = text.replace(/[│┃┆┊▏▕]/g, " ").trimStart();
|
|
1893
1914
|
if (normalized === "") return false;
|