PhotoFresco for VS Code and Open VSX editors
Open a PNG or PSD using Open With… → PhotoFresco, click Open browser editor,
match the connection code and approve Read, Edit and Export in PhotoFresco. Edit in
that separate window; return to the VS Code tab and Save. File: Revert File
closes its browser and reloads the disk file. This local build is not published.
The custom editor also opens JPEG and WebP. Save those with Save As to .png,
.psd or native .pfd; JPEG/WebP save-back is not implemented. PSD Save displays
the editor's actual loss report and requires confirmation. Keep a .pfd copy to
preserve native features. Image Undo/Redo stays in PhotoFresco; VS Code Revert
discards the browser session. Reopening after Revert requires pairing again.
Desktop VS Code 1.102+ (or a compatible Open VSX editor), Node.js 22+ and installed
Chrome/Edge/Chromium 120+ are required. This is a desktop/local extension, not a web
extension or a remote-host browser service. Untrusted and virtual workspaces are
disabled. Extensions: Install from VSIX… installs the local file below.
The extension registers the existing PhotoFresco MCP server for agent clients that
support lm.registerMcpServerDefinitionProvider. Use MCP: List Servers and
select PhotoFresco. A fork without that API can use the custom editor, but this
extension cannot register MCP there. It does not install Copilot or any model.
photofresco.nodePath sets an absolute Node executable; otherwise the extension
searches its host's PATH, checking node --version without a shell. It never uses
the Electron executable as Node. photofresco.browserPath optionally selects an
installed Chromium executable. Both settings are application-scoped.
MCP defaults to photofresco.mcpSource: "bundled": the build copies the public
adapter's src/, vendor/ and protocol JSON from the adjacent local agent/ package into the
VSIX. There is no second MCP server and no editor build. After .39 publishes
the exact version, change that setting to "npm". It invokes npm's npx-cli.js
beside the verified Node, with --package photofresco@0.1.0 photofresco mcp.
The version comes from the bundled adapter manifest, never latest. npm mode
may fetch from npm; the custom editor continues to use the bundled connector.
The MCP server gets no folder grants by default: users open files in its window.
Save, recovery and limits
The extension stages only the opened image in a private temporary folder (0700;
file 0600) and gives the connector read-only access there. It grants no workspace
write folders. export.artifact and the existing SHA-256-checked fetchArtifact
return bytes; only VS Code's Save/Save As callbacks write the selected resource
through workspace.fs. Save checks document identity and revision, cancellation,
hashes and external disk changes before writing. A failed check leaves the file
untouched. VS Code auto-save also calls these callbacks when enabled.
Browser revisions are polled once per second (the connector's session events do
not include each content revision). This marks the VS Code tab dirty and enables
its normal close prompts, backups and auto-save. Tool/selection changes may also
mark it dirty. Dirty detection has up to a one-second delay; full crash-proof
browser-to-host journaling is not claimed. Don't close the browser before saving.
If the browser session ends first, export is unavailable; the last VS Code native
backup can be recovered. Backups are .pfd bytes at VS Code's backup destination;
they preserve layers, but not undo history, and recovery requires Save As to
avoid overwriting a disk file whose state has not been checked. Import and backup
recovery are limited to 32 MiB; exports are limited to 256 MiB. A larger native
backup fails visibly rather than writing an unrecoverable backup.
What runs, sends and fetches
The disclosure packaged as runtime/agent/DISCLOSURE.md describes the common
adapter. The extension adds a VS Code extension-host module, a local status
webview (no iframe, network requests or external scripts), the temporary input
copy, VS Code backup files, and VS Code save callbacks described above.
Only clicking Open browser editor launches the connector's dedicated visible
browser and ephemeral profile. It opens https://photofresco.com/app/?pf_ref=vscode
and uses the existing authenticated .14 pipe/page channel, pinned to the editor
origin and increasing single-use request IDs. It adds no global operation/eval
port or new bridge. Connection and capabilities still require the user's approval;
the extension never answers those dialogs. Closing the custom document stops that
browser and removes its staging folder/profile. Process crashes can leave staging
files in the OS temp directory; they contain the selected input and are not logged.
Rendering runs locally; paid AI and cloud features can send data to their services.
Connector windows disable replay; normal editor visits have replay on. Exported
previews returned through MCP go to the agent/model provider under its policies.
The extension sends no telemetry of its own. No files never leave your device
claim is made. No secret or paid capability is required by this extension.
Build and checks (no publication)
cd agent/vscode
npm ci --ignore-scripts
npm test
npm run package
npm run test:host
npm audit
Run npm run build before tests on a fresh checkout to create the adapter snapshot.
The output is dist/photofresco-0.1.0.vsix. Packaging runs the build automatically.
@vscode/vsce is pinned to 4.0.0 (2026-09-14), a security exception to N-1: 3.9.2
pulls vulnerable braces through secretlint (GHSA-vfj7-8cjw-p6xm); 4.0.0 removes
that chain. @vscode/test-electron uses N-1 stable 3.0.0 (2026-06-08). Both are
Microsoft projects; install hooks were inspected and installation skips scripts.
The lockfile records integrity hashes. There are no extension runtime dependencies.
test:host uses @vscode/test-electron and an installed desktop host or
VSCODE_EXECUTABLE. It does not download or open a host automatically when absent.
When run, it proves activation/MCP definition registration plus provider save/revert
with real workspace.fs and a connector double. It does not claim to prove Copilot
or real browser handoff. See release checks for the
remaining real-host acceptance. No host was installed on 2026-10-20, so this proof
was skipped and the bead remains open.
After .33 publisher accounts, .39 npm publication, real-host checks and owner
approval for .46, the already packaged artifact has one command per store:
npx --no-install vsce publish --packagePath dist/photofresco-0.1.0.vsix
# Open VSX: use its approved/pinned publishing CLI, then:
ovsx publish dist/photofresco-0.1.0.vsix
These are documentation only; neither command nor any publish workflow was run.
For Marketplace automation prefer Microsoft Entra workload federation instead of
a long-lived PAT (official publishing guide).
MCP provider reference: official MCP guide;
document callbacks: custom editors.