ODS V3 Pre-Release: Public testing and refinement ahead of the official V3 launch. Turn your PC, Mac, or Linux box into a private AI server.
Python ai-agentsamdcomfyuidockerllama-cppllmlocal-ain8nnvidiaopen-webuiragself-hostedspeech-to-textstrix-halotext-to-speechworkflow-automation
fix(pixel): keep the localhost preview URL out of the model's publish receipt (#8245)
Mike Bradleye7bb362ec32f
diff --git a/ods/extensions/services/pixel-agent/plugin/workspace-preview.mjs b/ods/extensions/services/pixel-agent/plugin/workspace-preview.mjsindex 554762dfe..4db4fcc7d 100644--- a/ods/extensions/services/pixel-agent/plugin/workspace-preview.mjs+++ b/ods/extensions/services/pixel-agent/plugin/workspace-preview.mjs@@ -181,7 +181,7 @@ export const EMPTY_PUBLISHED_FILES_PREFIX = "Published files that are empty (0 b// Portal's dashboard already shows this preview in its own card, so such a// directive (seen live: [embed ref="site-..." title="Dragon" height="560" /])// is at best repeated markup.-export const PREVIEW_CARD_GUIDANCE = "Portal shows this preview to the owner in a card with your reply, so do not add an [embed ...] directive for it or paste its localhost URL: that address opens only on this machine, and the card opens the preview for the owner.";+export const PREVIEW_CARD_GUIDANCE = "Portal shows this preview to the owner in a card with your reply, so do not add an [embed ...] directive or a link for it; the card opens the preview for the owner.";// Displayed with host-authoritative publication evidence, independently of model prose.export const PREVIEW_STORAGE_DISCLOSURE = "Inputs in the embedded preview may be lost on reload. Storage behavior can differ in a separate tab; publishing alone does not guarantee saved data.";@@ -332,12 +332,15 @@ export function createWorkspacePreviewTool({ request, transport = "unix" } = {})const failureCode = validatedFailureCode(raw);if (failureCode) return failedResult(failureCode, raw.artifactError);const response = validResponse(raw, normalized);+ // The verified URL stays in details for the card and the guard. In the+ // model's text it ended up pasted into replies, and that localhost+ // address opens only on the ODS machine (DGX Station, 2026-10-26).return {content: [{type: "text",text:`ODS independently published and read back ${response.files} workspace static files ` +- `(${response.bytes} bytes). Verified browser URL: ${response.url}. ` ++ `(${response.bytes} bytes). ` +PREVIEW_CARD_GUIDANCE + ' ' +`Inspection snapshot: ${JSON.stringify({siteId:response.siteId,sha256:response.sha256})}. ` +'Use pixel_ods_workspace_preview_inspect for this owned preview, not public web_fetch or shell HTTP. Copy both identifiers exactly; sha256 is the full snapshot digest, not entrySha256 or the shortened site suffix. ' +diff --git a/ods/extensions/services/pixel-agent/tests/workspace_preview.test.mjs b/ods/extensions/services/pixel-agent/tests/workspace_preview.test.mjsindex 30ed2b6e5..7c0efb65d 100644--- a/ods/extensions/services/pixel-agent/tests/workspace_preview.test.mjs+++ b/ods/extensions/services/pixel-agent/tests/workspace_preview.test.mjs@@ -199,11 +199,13 @@ test("publishes only the exact existing workspace directory", async () => {assert.match(result.content[0].text, /independently published and read back/);// RTX Spark, 2026-10-25: a dragon picture's reply ended with an embed of the// site its own preview card was showing.- assert.ok(result.content[0].text.includes(`Verified browser URL: ${result.details.url}. ${PREVIEW_CARD_GUIDANCE} Inspection snapshot:`));- assert.match(PREVIEW_CARD_GUIDANCE, /card .*do not add an \[embed \.\.\.\] directive/);- // DGX Station: replies ended with "Preview is live: http://site-….localhost:9437/…", which- // opens only on the ODS machine itself; the card is how the owner opens the preview.- assert.match(PREVIEW_CARD_GUIDANCE, /or paste its localhost URL: that address opens only on this machine/);+ assert.ok(result.content[0].text.includes(`bytes). ${PREVIEW_CARD_GUIDANCE} Inspection snapshot:`));+ assert.match(PREVIEW_CARD_GUIDANCE, /card .*do not add an \[embed \.\.\.\] directive or a link for it/);+ // DGX Station: even when told not to, the model pasted "Preview is live: http://site-….localhost:9437/…"+ // from this text; that address opens only on the ODS machine. The card and guard read details.url.+ assert.ok(!result.content[0].text.includes(result.details.url));+ assert.doesNotMatch(result.content[0].text, /localhost/);+ assert.match(result.details.url, /^http:\/\/site-[0-9a-f]+\.localhost:\d+\//);assert.match(result.content[0].text, /publication and HTTP readback only, not successful startup, interactions or durable browser storage/);// Publication renders nothing; the palette arrives with inspection.assert.match(result.content[0].text, /Publication does not render the page; the inspection result also reports its rendered colors by area\. Check them before claiming a visible color or style change\. /);@@ -399,7 +401,7 @@ test("receipt names zero-byte published files without failing publication", asynassert.equal(EMPTY_PUBLISHED_FILES_PREFIX, "Published files that are empty (0 bytes): ");assert.ok(text.includes("Published files that are empty (0 bytes): test-results.txt. "), text);assert.equal(text.split(EMPTY_PUBLISHED_FILES_PREFIX).length, 2);- assert.match(text, /Verified browser URL: http:\/\/site-/);+ assert.match(text, /^ODS independently published and read back /);});test("empty-file note lists every shown path and counts the omitted ones", async () => {