@jini-ai/diagnostics 0.5.4 → 0.6.11
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @jini-ai/diagnostics
|
|
2
2
|
|
|
3
|
+
## 0.6.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Tool inputs apply a sole near-miss and declared input aliases; plugin-load outcomes are reported; `web_fetch` reads SVG/JS as text; `content_read` suggests its resource first; the browser falls back to system Chrome.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
- @jini-ai/core@0.6.11
|
|
11
|
+
|
|
12
|
+
## 0.6.10
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [22f0619]
|
|
17
|
+
- Updated dependencies [82ed2d3]
|
|
18
|
+
- Updated dependencies [5a3de86]
|
|
19
|
+
- @jini-ai/core@0.6.10
|
|
20
|
+
|
|
3
21
|
## 0.5.4 — 2026-10-22
|
|
4
22
|
|
|
5
23
|
- 2026-10-22: Security queue fixes, complexity refactors, coverage.
|
|
@@ -45,7 +63,6 @@
|
|
|
45
63
|
- Share the eleven byte-pinned credential patterns with core while retaining all redaction/scanner export names and diagnostics-specific policy. Bundle text and JSON redaction also mask standalone provider credential shapes; ordinary IDs, hashes and paths stay readable.
|
|
46
64
|
- Off-origin evidence copy now says "the inspected origin".
|
|
47
65
|
|
|
48
|
-
|
|
49
66
|
- **BREAKING:** All 12 existing root functions now take a required-argument object and, when applicable, a separate optional-settings object. Filesystem, clock, machine snapshot and archive creation use injected ports. `createNodeDiagnosticsPorts({})` supplies the Node/JSZip adapter. Previous positional signatures have no compatibility wrappers; export names and the package version remain unchanged.
|
|
50
67
|
- Complete publication metadata for `./redaction/secrets-only`, `./observability`, `./web-evidence`, `./web-evidence/playwright` and `./domain-dns`, with per-entry runtime declarations. The first three subpaths are universal; the root, browser adapter and DNS checks require Node. Existing exports are retained.
|
|
51
68
|
- Add current API migration documentation and package-wide source-neutrality and export/barrel contract tests. Application-key redaction rules, telemetry SDK adapters, authorization and transport policy remain caller-owned. The earlier integration step required no new dependency; shared kernel adoption above adds core.
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* Why the import is dynamic, and why the module's types are declared here
|
|
7
7
|
* ---------------------------------------------------------------------------
|
|
8
8
|
* The host may optionally install `playwright`; this package adds no browser dependency. The BROWSER
|
|
9
|
-
* BINARY it drives needs a separate `playwright install chromium` step
|
|
10
|
-
* Installing the module alone does not supply
|
|
9
|
+
* BINARY it drives needs a separate `playwright install chromium` step or an installed system
|
|
10
|
+
* Chrome. Installing the module alone does not supply either binary. So both halves can
|
|
11
11
|
* legitimately be missing at runtime, independently:
|
|
12
12
|
*
|
|
13
13
|
* - the module itself, on a deployment that pruned it;
|
|
14
|
-
* -
|
|
14
|
+
* - both browser binaries, on a deployment that installed the module but neither browser.
|
|
15
15
|
*
|
|
16
16
|
* Both are caught here and converted into `{ available: false, reason }`, never a thrown error and
|
|
17
17
|
* never a boot failure. The tool then reports "no browser in this deployment" and the compliance
|
|
@@ -51,6 +51,7 @@ export interface PlaywrightLike {
|
|
|
51
51
|
headless?: boolean;
|
|
52
52
|
args?: readonly string[];
|
|
53
53
|
chromiumSandbox?: boolean;
|
|
54
|
+
channel?: "chrome";
|
|
54
55
|
}): Promise<RenderBrowser>;
|
|
55
56
|
};
|
|
56
57
|
}
|
|
@@ -59,9 +60,9 @@ export interface PlaywrightLike {
|
|
|
59
60
|
* deployment cannot.
|
|
60
61
|
*
|
|
61
62
|
* @returns `{ available: true, browser }` on success; `{ available: false, reason }` when the
|
|
62
|
-
* `playwright` module or
|
|
63
|
+
* `playwright` module or both Chromium and system Chrome are unavailable. Never throws for either case — see
|
|
63
64
|
* this file's header for why an absent browser must be a reportable state rather than an error.
|
|
64
|
-
* @complexity
|
|
65
|
+
* @complexity At most two process launch attempts. The caller is responsible for calling `close()`, which
|
|
65
66
|
* `collectPageEvidence` does in a `finally`.
|
|
66
67
|
*/
|
|
67
68
|
export interface PlaywrightAdapterOptions {
|
|
@@ -84,7 +85,9 @@ export interface PlaywrightAdapterOptions {
|
|
|
84
85
|
/** Default {@link PlaywrightAdapterOptions.moduleLoader}: a real dynamic import by module name, wired
|
|
85
86
|
* here at the composition edge so the optional `playwright` dependency is only resolved on use. */
|
|
86
87
|
export declare const nodeModuleLoader: NonNullable<PlaywrightAdapterOptions["moduleLoader"]>;
|
|
87
|
-
/** Opens
|
|
88
|
+
/** Opens bundled Chromium, then system Chrome; import/launch failures become availability results.
|
|
89
|
+
* Launch policy is retained on both attempts; successful process ownership transfers to the caller.
|
|
90
|
+
* @complexity At most two launches, O(1) retained state. */
|
|
88
91
|
export declare function openPlaywrightRenderBrowser(_required: Record<string, never>, options?: PlaywrightAdapterOptions): Promise<{
|
|
89
92
|
available: true;
|
|
90
93
|
browser: RenderBrowser;
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
export const nodeModuleLoader = {
|
|
4
4
|
load: async ({ moduleName }) => (await import(moduleName)),
|
|
5
5
|
};
|
|
6
|
-
/** Opens
|
|
6
|
+
/** Opens bundled Chromium, then system Chrome; import/launch failures become availability results.
|
|
7
|
+
* Launch policy is retained on both attempts; successful process ownership transfers to the caller.
|
|
8
|
+
* @complexity At most two launches, O(1) retained state. */
|
|
7
9
|
// A successful launch transfers process ownership to the caller; close the browser in a finally
|
|
8
10
|
// block so an unreachable or unstable page cannot leak the browser process.
|
|
9
11
|
export async function openPlaywrightRenderBrowser(_required, options = {}) {
|
|
@@ -21,13 +23,19 @@ export async function openPlaywrightRenderBrowser(_required, options = {}) {
|
|
|
21
23
|
}
|
|
22
24
|
let browser;
|
|
23
25
|
try {
|
|
24
|
-
|
|
26
|
+
try {
|
|
27
|
+
browser = await playwright.chromium.launch({ headless: true, ...options.launchOptions });
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// Desktop retains the driver but omits browser downloads. Keep the same sandbox/network policy.
|
|
31
|
+
browser = await playwright.chromium.launch({ headless: true, ...options.launchOptions, channel: "chrome" });
|
|
32
|
+
}
|
|
25
33
|
}
|
|
26
34
|
catch (error) {
|
|
27
35
|
return {
|
|
28
36
|
available: false,
|
|
29
|
-
reason: "Chromium could
|
|
30
|
-
`browser
|
|
37
|
+
reason: "Neither bundled Chromium nor system Chrome could be launched in this deployment — the 'playwright' package is present but the " +
|
|
38
|
+
`browser binaries may be missing or the host may not support the configured sandbox (install Chrome or run 'npx playwright install --with-deps chromium'). Underlying error: ${error instanceof Error ? error.message : String(error)}`,
|
|
31
39
|
};
|
|
32
40
|
}
|
|
33
41
|
return { available: true, browser };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/diagnostics",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.11",
|
|
4
4
|
"description": "Diagnostics-bundle tooling: JSON/text secret redaction, log-source collection, manifest building, and zip packaging for support exports.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@vitest/coverage-v8": "^2.1.9",
|
|
84
84
|
"jszip": "^3.10.1",
|
|
85
|
-
"@jini-ai/core": "^0.
|
|
85
|
+
"@jini-ai/core": "^0.6.11"
|
|
86
86
|
},
|
|
87
87
|
"dependencies": {
|
|
88
88
|
"js-tokens": "^9.0.1",
|
|
89
|
-
"@jini-ai/core": "^0.
|
|
89
|
+
"@jini-ai/core": "^0.6.11"
|
|
90
90
|
},
|
|
91
91
|
"peerDependencies": {
|
|
92
92
|
"jszip": "^3.10.1"
|