@docsxai/engine 0.2.0 → 0.3.0-rc.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.
- package/README.md +26 -6
- package/dist/address-class.d.ts +14 -0
- package/dist/address-class.js +151 -0
- package/dist/auth/api-login.js +6 -2
- package/dist/backend-client-contracts.d.ts +2 -0
- package/dist/calibrate.js +5 -0
- package/dist/cli-commands-authoring.js +23 -4
- package/dist/cli-commands-backend.js +2 -2
- package/dist/cli-commands-docpack.d.ts +5 -0
- package/dist/cli-commands-docpack.js +70 -24
- package/dist/cli-commands-pack.d.ts +2 -0
- package/dist/cli-commands-pack.js +69 -0
- package/dist/cli-commands-session.js +92 -88
- package/dist/cli-retired.d.ts +6 -0
- package/dist/cli-retired.js +12 -0
- package/dist/cli-usage.d.ts +1 -1
- package/dist/cli-usage.js +53 -5
- package/dist/cli-verify.d.ts +14 -0
- package/dist/cli-verify.js +54 -0
- package/dist/cli.js +14 -1
- package/dist/deprecation.d.ts +19 -0
- package/dist/deprecation.js +32 -0
- package/dist/diagnose.d.ts +25 -0
- package/dist/diagnose.js +69 -3
- package/dist/diff-compute.js +1 -0
- package/dist/doc-pack-io.d.ts +14 -0
- package/dist/doc-pack-io.js +121 -14
- package/dist/doc-pack.d.ts +2165 -181
- package/dist/doc-pack.js +152 -42
- package/dist/doctor-checks.d.ts +1 -1
- package/dist/doctor-checks.js +29 -5
- package/dist/driver-budget.d.ts +6 -0
- package/dist/driver-budget.js +15 -0
- package/dist/egress-guard.d.ts +58 -0
- package/dist/egress-guard.js +136 -0
- package/dist/environment-spec.d.ts +67 -0
- package/dist/environment-spec.js +38 -0
- package/dist/export/playwright-test.js +42 -10
- package/dist/flow-file.d.ts +7 -1
- package/dist/flow-file.js +21 -1
- package/dist/flow-halt.d.ts +16 -0
- package/dist/flow-halt.js +76 -0
- package/dist/flow-hidden.d.ts +9 -0
- package/dist/flow-hidden.js +20 -0
- package/dist/flow-lint.js +91 -1
- package/dist/flow-matrix-lint.d.ts +10 -0
- package/dist/flow-matrix-lint.js +40 -0
- package/dist/flow-matrix.d.ts +44 -0
- package/dist/flow-matrix.js +238 -0
- package/dist/flow-name-rules.d.ts +15 -0
- package/dist/flow-name-rules.js +39 -0
- package/dist/flow-runtime.d.ts +67 -21
- package/dist/flow-runtime.js +72 -110
- package/dist/flow-success.d.ts +3 -0
- package/dist/flow-success.js +37 -0
- package/dist/flow-tree.d.ts +2 -0
- package/dist/flow-tree.js +17 -5
- package/dist/flow-wait.d.ts +3 -0
- package/dist/flow-wait.js +22 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/matrix-spec.d.ts +145 -0
- package/dist/matrix-spec.js +120 -0
- package/dist/obstacles.d.ts +33 -0
- package/dist/obstacles.js +72 -0
- package/dist/page-hide.d.ts +10 -0
- package/dist/page-hide.js +45 -0
- package/dist/page-nearby-boxes.d.ts +9 -0
- package/dist/page-nearby-boxes.js +92 -0
- package/dist/page-settle.d.ts +39 -0
- package/dist/page-settle.js +142 -0
- package/dist/playwright-driver.d.ts +30 -8
- package/dist/playwright-driver.js +88 -18
- package/dist/run-flows.d.ts +40 -0
- package/dist/run-flows.js +129 -0
- package/dist/upload-path.d.ts +15 -0
- package/dist/upload-path.js +63 -0
- package/dist/verify-compare.d.ts +43 -0
- package/dist/verify-compare.js +237 -0
- package/dist/verify-determinism.d.ts +16 -0
- package/dist/verify-determinism.js +88 -0
- package/dist/verify-report.d.ts +53 -0
- package/dist/verify-report.js +141 -0
- package/dist/verify-tree.d.ts +27 -0
- package/dist/verify-tree.js +95 -0
- package/dist/viewer-bin.d.ts +6 -0
- package/dist/viewer-bin.js +24 -0
- package/dist/workspace.d.ts +8 -0
- package/package.json +7 -6
package/dist/viewer-bin.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
// map doesn't export its package.json. The chain is walked explicitly rather than via
|
|
11
11
|
// `require.resolve.paths()`, which test runners extend with extra lookup dirs.)
|
|
12
12
|
// 3. `docsxai-viewer` on PATH (the npm bin shim) — the legacy behavior, kept as the fallback.
|
|
13
|
+
import { spawn } from "node:child_process";
|
|
13
14
|
import { promises as fs } from "node:fs";
|
|
14
15
|
import * as path from "node:path";
|
|
15
16
|
import { fileURLToPath } from "node:url";
|
|
@@ -95,3 +96,26 @@ export function formatViewerBinFailure(resolution) {
|
|
|
95
96
|
`Install ${VIEWER_PACKAGE} next to the engine (or globally), or point ${VIEWER_BIN_ENV} at its bin script.`,
|
|
96
97
|
].join("\n");
|
|
97
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Run the viewer's CLI with `args` and resolve to its exit code. The viewer is its own package/bin;
|
|
101
|
+
* spawning it keeps the engine from depending on it at build time. `label` prefixes the failure
|
|
102
|
+
* line when the bin can't be launched.
|
|
103
|
+
*/
|
|
104
|
+
export async function runViewerBin(label, args) {
|
|
105
|
+
const viewerBin = await resolveViewerBin();
|
|
106
|
+
return new Promise((resolve) => {
|
|
107
|
+
const child = spawn(viewerBin.command, [...viewerBin.prefixArgs, ...args], {
|
|
108
|
+
stdio: "inherit",
|
|
109
|
+
});
|
|
110
|
+
child.on("error", (e) => {
|
|
111
|
+
if (e.code === "ENOENT") {
|
|
112
|
+
process.stderr.write(`${label}: ${formatViewerBinFailure(viewerBin)}\n`);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
process.stderr.write(`${label}: ${e.message}\n`);
|
|
116
|
+
}
|
|
117
|
+
resolve(1);
|
|
118
|
+
});
|
|
119
|
+
child.on("exit", (code) => resolve(code ?? 1));
|
|
120
|
+
});
|
|
121
|
+
}
|
package/dist/workspace.d.ts
CHANGED
|
@@ -22,6 +22,14 @@ export interface WorkspaceConfig {
|
|
|
22
22
|
ignore_https_errors?: boolean;
|
|
23
23
|
/** Backend stub/service URL for `push`/`pull` (e.g. `http://localhost:4477`). Optional — workspaces operate fully locally without it. */
|
|
24
24
|
backend_url?: string;
|
|
25
|
+
/** How `run` records annotations. Absent keys keep today's output. */
|
|
26
|
+
annotations?: {
|
|
27
|
+
/**
|
|
28
|
+
* Write per-annotation `obstacles` (boxes of nearby text and controls, screenshot pixels, the
|
|
29
|
+
* target excluded) so the burner keeps callouts off page content. Default false.
|
|
30
|
+
*/
|
|
31
|
+
obstacles?: boolean;
|
|
32
|
+
};
|
|
25
33
|
/** Backend workspace ID, set by `push` after first round-trip. */
|
|
26
34
|
backend_workspace_id?: string;
|
|
27
35
|
/** Backend project ID, set by `push` after first round-trip. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docsxai/engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-rc.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -41,20 +41,21 @@
|
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"fflate": "^0.8.3",
|
|
44
|
-
"playwright-core": "^1.
|
|
44
|
+
"playwright-core": "^1.63.0",
|
|
45
45
|
"pngjs": "^7.0.0",
|
|
46
|
-
"yaml": "^2.
|
|
46
|
+
"yaml": "^2.9.1",
|
|
47
47
|
"zod": "^3.23.0"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@types/node": "^20.
|
|
50
|
+
"@types/node": "^20.19.43",
|
|
51
51
|
"@types/pngjs": "^6.0.5",
|
|
52
|
+
"typescript": "^5.5.0",
|
|
52
53
|
"vitest": "^2.0.0",
|
|
53
|
-
"@docsxai/backend": "0.
|
|
54
|
+
"@docsxai/backend": "0.3.0-rc.1"
|
|
54
55
|
},
|
|
55
56
|
"author": "Kalebtec <security@kalebtec.com>",
|
|
56
57
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
58
|
+
"node": ">=26"
|
|
58
59
|
},
|
|
59
60
|
"scripts": {
|
|
60
61
|
"build": "node ../../scripts/clean-dist.mjs && tsc -b tsconfig.build.json",
|