@charlie.act7/gemini-notebook-mcp 2.3.3 → 2.3.5

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 CHANGED
@@ -494,3 +494,4 @@ v2 changes the following defaults — adjust if you depended on v1 behaviour:
494
494
  ## License
495
495
 
496
496
  MIT. See [LICENSE](./LICENSE).
497
+ - Browser provisioning: `browser install --json` instala el Chromium hermético de Patchright y `browser status --json` informa su estado. Chrome estable sigue siendo el navegador preferido; Chromium se usa como fallback. La instalación no se realiza automáticamente.
@@ -0,0 +1,7 @@
1
+ export declare function resolvePatchrightBin(manifest: {
2
+ bin?: string | Record<string, string>;
3
+ }, packageDir: string): string;
4
+ export declare function patchrightNodeModulesRoot(): string;
5
+ export declare function isPathInside(root: string, candidate: string): boolean;
6
+ export declare function runBrowserCli(args: string[]): Promise<void>;
7
+ //# sourceMappingURL=browser-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-cli.d.ts","sourceRoot":"","sources":["../../src/browser/browser-cli.ts"],"names":[],"mappings":"AASA,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EACnD,UAAU,EAAE,MAAM,GACjB,MAAM,CAgBR;AAED,wBAAgB,yBAAyB,IAAI,MAAM,CAElD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAKrE;AA0CD,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAMjE"}
@@ -0,0 +1,73 @@
1
+ import { createRequire } from "node:module";
2
+ import { existsSync } from "node:fs";
3
+ import { dirname, isAbsolute, relative, resolve } from "node:path";
4
+ import { realpathSync } from "node:fs";
5
+ import { spawn } from "node:child_process";
6
+ import { chromium } from "patchright";
7
+ const require = createRequire(import.meta.url);
8
+ export function resolvePatchrightBin(manifest, packageDir) {
9
+ const bin = typeof manifest.bin === "string"
10
+ ? manifest.bin
11
+ : (manifest.bin?.["patchright"] ?? Object.values(manifest.bin ?? {})[0]);
12
+ if (!bin || isAbsolute(bin) || bin.includes(".."))
13
+ throw new Error("Patchright no expone un bin seguro.");
14
+ const cli = resolve(packageDir, bin);
15
+ if (!relative(packageDir, cli) ||
16
+ relative(packageDir, cli).startsWith("..") ||
17
+ !existsSync(cli)) {
18
+ throw new Error("El bin de Patchright no existe dentro de su paquete.");
19
+ }
20
+ return cli;
21
+ }
22
+ export function patchrightNodeModulesRoot() {
23
+ return resolve(dirname(require.resolve("patchright/package.json")), "..");
24
+ }
25
+ export function isPathInside(root, candidate) {
26
+ const realRoot = realpathSync.native(root);
27
+ const realCandidate = realpathSync.native(candidate);
28
+ const suffix = relative(realRoot, realCandidate);
29
+ return suffix !== "" && !isAbsolute(suffix) && !suffix.startsWith("..");
30
+ }
31
+ function patchrightCli() {
32
+ const packageFile = require.resolve("patchright/package.json");
33
+ const packageDir = dirname(packageFile);
34
+ const manifest = require(packageFile);
35
+ return resolvePatchrightBin(manifest, packageDir);
36
+ }
37
+ function status() {
38
+ const executablePath = chromium.executablePath();
39
+ const installed = Boolean(executablePath && existsSync(executablePath));
40
+ const hermetic = !installed || isPathInside(patchrightNodeModulesRoot(), executablePath);
41
+ return {
42
+ browser: "chromium",
43
+ installed: installed && hermetic,
44
+ hermetic,
45
+ executablePath: installed && hermetic ? executablePath : null,
46
+ patchrightVersion: require("patchright/package.json").version,
47
+ };
48
+ }
49
+ async function install() {
50
+ const cli = patchrightCli();
51
+ await new Promise((resolvePromise, reject) => {
52
+ const child = spawn(process.execPath, [cli, "install", "chromium"], {
53
+ stdio: ["inherit", "pipe", "pipe"],
54
+ env: { ...process.env, PLAYWRIGHT_BROWSERS_PATH: "0" },
55
+ });
56
+ child.stdout?.on("data", (chunk) => process.stderr.write(chunk));
57
+ child.stderr?.on("data", (chunk) => process.stderr.write(chunk));
58
+ child.once("error", reject);
59
+ child.once("exit", (code) => code === 0 ? resolvePromise() : reject(new Error(`Patchright terminó con código ${code}`)));
60
+ });
61
+ const result = status();
62
+ if (!result.installed || !result.executablePath)
63
+ throw new Error("Chromium no quedó instalado en el entorno hermético.");
64
+ return result;
65
+ }
66
+ export async function runBrowserCli(args) {
67
+ if ((args[0] !== "status" && args[0] !== "install") || args[1] !== "--json") {
68
+ throw new Error("Uso: browser status --json | browser install --json");
69
+ }
70
+ const result = args[0] === "install" ? await install() : status();
71
+ process.stdout.write(`${JSON.stringify(result)}\n`);
72
+ }
73
+ //# sourceMappingURL=browser-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-cli.js","sourceRoot":"","sources":["../../src/browser/browser-cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,UAAU,oBAAoB,CAClC,QAAmD,EACnD,UAAkB;IAElB,MAAM,GAAG,GACP,OAAO,QAAQ,CAAC,GAAG,KAAK,QAAQ;QAC9B,CAAC,CAAC,QAAQ,CAAC,GAAG;QACd,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,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
package/dist/cli.js ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ process.env.PLAYWRIGHT_BROWSERS_PATH = "0";
3
+ const args = process.argv.slice(2);
4
+ if (args[0] === "browser") {
5
+ const { runBrowserCli } = await import("./browser/browser-cli.js");
6
+ await runBrowserCli(args.slice(1));
7
+ }
8
+ else {
9
+ await import("./index.js");
10
+ }
11
+ export {};
12
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,CAAC,GAAG,CAAC,wBAAwB,GAAG,GAAG,CAAC;AAE3C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;IAC1B,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;IACnE,MAAM,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACrC,CAAC;KAAM,CAAC;IACN,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;AAC7B,CAAC"}
@@ -165,7 +165,9 @@ Delivered in this release:
165
165
 
166
166
  ## 2.3.3 — Trusted npm publication
167
167
 
168
- Status: implementation in progress.
168
+ Status: implemented and published. The first OIDC release exposed a Bash `errexit`
169
+ interaction in the registry propagation loop; the poll now handles an unavailable
170
+ version as a retryable state.
169
171
 
170
172
  Scope:
171
173
 
@@ -10,9 +10,8 @@ and still-pending work.
10
10
 
11
11
  | Surface | Version | State |
12
12
  | --- | --- | --- |
13
- | GitHub `main` | 2.3.2 | Merged through PR #16 (`c168145`) |
14
- | Current branch | 2.3.3 | Trusted npm publication candidate |
15
- | npm registry | 2.3.2 | Published under the `latest` tag |
13
+ | GitHub `main` | 2.3.3 | Release implementation merged through PR #19 (`fe7373e`) |
14
+ | npm registry | 2.3.3 | Published under `latest` with OIDC provenance |
16
15
 
17
16
  ## Completed work
18
17
 
@@ -123,14 +122,23 @@ Version 2.3.2 is complete: the implementation is merged, CI and CodeQL pass, npm
123
122
  `latest` resolves to 2.3.2, and the remote 177-entry tarball exposes valid SHA-512
124
123
  integrity metadata. No release-specific activity remains open.
125
124
 
126
- ## 2.3.3 release candidate
125
+ ## 2.3.3 completion status
127
126
 
128
- Version 2.3.3 automates npm publication from a GitHub Release using trusted
129
- publishing/OIDC and provenance. It adds release metadata and default-branch gates,
130
- runs the complete local verification suite before publication, and installs the
131
- result back from npm for a packaged MCP smoke test. Before the first release, an npm
132
- package owner must register `publish.yml` as the package's GitHub Actions trusted
133
- publisher; no `NPM_TOKEN` is used.
127
+ Version 2.3.3 was published from GitHub Release `v2.3.3` through npm trusted
128
+ publishing/OIDC without an `NPM_TOKEN`. npm exposes SHA-512 integrity and SLSA
129
+ provenance for the package. The publish operation succeeded on the first automated
130
+ run; its post-publication polling step exposed a Bash `errexit` interaction and has
131
+ been corrected so an initially unavailable registry version is retried as intended.
132
+
133
+ Validation completed for 2.3.3:
134
+
135
+ - `npm run check`: 53/53 tests passed; format, lint, and TypeScript build passed.
136
+ - `npm run test:live:preflight`: passed as version 2.3.3.
137
+ - `npm audit --json`: zero known vulnerabilities.
138
+ - `npm run package:smoke`: passed with version 2.3.3 and 31 tools.
139
+ - `npm pack --dry-run --json`: valid local 2.3.3 tarball with 178 entries.
140
+ - GitHub CI and CodeQL passed before PR #19 was merged.
141
+ - npm `latest` resolves to 2.3.3 and exposes SHA-512 integrity plus SLSA provenance.
134
142
 
135
143
  ## Remaining product roadmap
136
144
 
@@ -183,9 +191,7 @@ publisher; no `NPM_TOKEN` is used.
183
191
 
184
192
  ### Release operations
185
193
 
186
- - Complete the one-time npm trusted-publisher registration for `publish.yml`, merge
187
- 2.3.3, and create the matching non-prerelease GitHub Release.
188
- - Confirm that npm records provenance and that the workflow's clean registry install
189
- passes its MCP startup, version, and tool-count verification.
194
+ - Monitor the next release's corrected post-publication registry install and MCP
195
+ smoke verification end to end.
190
196
  - Remove merged remote branches after each release and keep `main` as the only
191
197
  long-lived branch unless a maintenance branch is explicitly required.