@hraness/slopcamera 3.9.0 → 3.9.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 CHANGED
@@ -43,11 +43,11 @@ file and a new render.
43
43
  ## Install SlopCamera
44
44
 
45
45
  Install [Bun 1.3.14 or newer](https://bun.sh), then install the
46
- [SlopCamera v3.8.1 release](https://github.com/hraness/slopcamera/releases/tag/v3.8.1)
46
+ [SlopCamera v3.9.0 release](https://github.com/hraness/slopcamera/releases/tag/v3.9.0)
47
47
  and its matching Agent Skill:
48
48
 
49
49
  ```sh
50
- bun add --global https://github.com/hraness/slopcamera/releases/download/v3.8.1/hraness-slopcamera-3.8.1.tgz
50
+ bun add --global https://github.com/hraness/slopcamera/releases/download/v3.9.0/hraness-slopcamera-3.9.0.tgz
51
51
  slopcamera skill install --target agents
52
52
  ```
53
53
 
@@ -325,11 +325,10 @@ or [Why SlopCamera](https://slopcamera.com/docs/explanation/why-slopcamera).
325
325
  identical output elsewhere.
326
326
  - **Trusted code is not sandboxed.** Native Python and your own Bun workflows
327
327
  run with the current user's access.
328
- - **MCP is a subset.** Current source has 21 fixed tools that check and render diagrams, plan and
328
+ - **MCP is a subset.** Its 21 fixed tools check and render diagrams, plan and
329
329
  audit scenes, compose icon scenes and soundtrack beat grids, and run ten
330
330
  operation codes. It does not expose every CLI command and never changes
331
- project state. The verified v3.8.1 archive has a 17-tool subset and six
332
- registered operations; icon and soundtrack composition require a later source build.
331
+ project state.
333
332
 
334
333
  ## Design and trust
335
334
 
@@ -24,7 +24,7 @@ import {
24
24
  } from "./html-overlay-browser-runtime";
25
25
 
26
26
  const Sha256Schema = z.string().regex(/^[a-f0-9]{64}$/u);
27
- const ExecutionContractVersionSchema = z.union([z.literal(1), z.literal(2)]);
27
+ const ExecutionContractVersionSchema = z.union([z.literal(1), z.literal(2), z.literal(3)]);
28
28
  export type HtmlOverlayExecutionContractVersion = z.infer<typeof ExecutionContractVersionSchema>;
29
29
 
30
30
  const IntegrityLeafSchema = z.strictObject({
@@ -207,14 +207,12 @@ function historicalHtmlOverlayRendererContract(
207
207
  });
208
208
  }
209
209
 
210
- /** Historical receipts select v1 explicitly; all new execution binds clone prevention. */
211
- export function htmlOverlayRendererContract(
210
+ /** Version 2 stays byte-identical for completed clone-prevention receipts. */
211
+ function clonePreventionHtmlOverlayRendererContract(
212
212
  profileInput?: HtmlOverlayExecutionProfile,
213
213
  resourcesInput: readonly HtmlOverlayDeclaredResource[] = [],
214
- version: HtmlOverlayExecutionContractVersion = 2,
215
214
  ) {
216
215
  const contract = historicalHtmlOverlayRendererContract(profileInput, resourcesInput);
217
- if (ExecutionContractVersionSchema.parse(version) === 1) return contract;
218
216
  return Object.freeze({
219
217
  ...contract,
220
218
  launch: Object.freeze({
@@ -226,6 +224,58 @@ export function htmlOverlayRendererContract(
226
224
  });
227
225
  }
228
226
 
227
+ // Qualified against playwright-core 1.62.0's chromiumSwitches(). Keep every
228
+ // default disabled feature when replacing this one exact default switch.
229
+ const QUALIFIED_PLAYWRIGHT_VERSION = "1.62.0";
230
+ const QUALIFIED_PLAYWRIGHT_DISABLED_FEATURES = Object.freeze([
231
+ "AvoidUnnecessaryBeforeUnloadCheckSync",
232
+ "BoundaryEventDispatchTracksNodeRemoval",
233
+ "DestroyProfileOnBrowserClose",
234
+ "DialMediaRouteProvider",
235
+ "GlobalMediaControls",
236
+ "HttpsUpgrades",
237
+ "LensOverlay",
238
+ "MediaRouter",
239
+ "PaintHolding",
240
+ "ThirdPartyStoragePartitioning",
241
+ "BlockOriginHeaderModificationOnRedirect",
242
+ "Translate",
243
+ "AutoDeElevate",
244
+ "OptimizationHints",
245
+ "msForceBrowserSignIn",
246
+ "msEdgeUpdateLaunchServicesPreferredVersion",
247
+ ]);
248
+ const QUALIFIED_PLAYWRIGHT_DISABLE_FEATURES_ARGUMENT =
249
+ `--disable-features=${QUALIFIED_PLAYWRIGHT_DISABLED_FEATURES.join(",")}`;
250
+
251
+ /** Historical versions remain immutable; new launches bind one merged switch. */
252
+ export function htmlOverlayRendererContract(
253
+ profileInput?: HtmlOverlayExecutionProfile,
254
+ resourcesInput: readonly HtmlOverlayDeclaredResource[] = [],
255
+ version: HtmlOverlayExecutionContractVersion = 3,
256
+ ) {
257
+ const parsedVersion = ExecutionContractVersionSchema.parse(version);
258
+ if (parsedVersion === 1) return historicalHtmlOverlayRendererContract(profileInput, resourcesInput);
259
+ const contract = clonePreventionHtmlOverlayRendererContract(profileInput, resourcesInput);
260
+ if (parsedVersion === 2) return contract;
261
+ if (playwrightCorePackage.version !== QUALIFIED_PLAYWRIGHT_VERSION) {
262
+ throw new Error("The merged HTML-overlay launch policy requires qualified playwright-core 1.62.0 defaults.");
263
+ }
264
+ return Object.freeze({
265
+ ...contract,
266
+ launch: Object.freeze({
267
+ ...contract.launch,
268
+ args: Object.freeze(contract.launch.args.map(argument => argument.startsWith("--disable-features=")
269
+ ? `--disable-features=${[...new Set([
270
+ ...QUALIFIED_PLAYWRIGHT_DISABLED_FEATURES,
271
+ ...argument.slice("--disable-features=".length).split(","),
272
+ ])].join(",")}` : argument)),
273
+ ignoreDefaultArgs: Object.freeze([QUALIFIED_PLAYWRIGHT_DISABLE_FEATURES_ARGUMENT]),
274
+ }),
275
+ schemaVersion: 5,
276
+ });
277
+ }
278
+
229
279
  export function assertHtmlOverlayExecutionProfileLibraries(
230
280
  libraries: readonly string[], profile?: HtmlOverlayExecutionProfile,
231
281
  ): void {
@@ -280,7 +330,7 @@ export function createHtmlOverlayExecutionBundle(
280
330
  authoringInput: HtmlOverlayAuthoringInput,
281
331
  browserRuntimeInput: HtmlOverlayBrowserRuntimeBinding,
282
332
  executionProfile?: HtmlOverlayExecutionProfile,
283
- contractVersion: HtmlOverlayExecutionContractVersion = 2,
333
+ contractVersion: HtmlOverlayExecutionContractVersion = 3,
284
334
  ): HtmlOverlayExecutionBundle {
285
335
  const authoring = HtmlOverlayAuthoringInputSchema.parse(authoringInput);
286
336
  assertHtmlOverlayExecutionProfileLibraries(authoring.libraries, executionProfile);
@@ -4,7 +4,7 @@ import type { z } from "zod";
4
4
 
5
5
  import type { ApplicationContext } from "./context";
6
6
 
7
- export const SLOPCAMERA_APPLICATION_TOOL_VERSION = "slopcamera-3.9.0" as const;
7
+ export const SLOPCAMERA_APPLICATION_TOOL_VERSION = "slopcamera-3.9.1" as const;
8
8
 
9
9
  export const OPERATION_KINDS = [
10
10
  "scene.audit",
@@ -365,7 +365,7 @@ import {
365
365
  workflowRunStore,
366
366
  } from "./workflow-runs";
367
367
 
368
- export const SLOPCAMERA_VERSION = "3.9.0";
368
+ export const SLOPCAMERA_VERSION = "3.9.1";
369
369
 
370
370
  // Legacy direct renders predate per-target output contracts. Keep them
371
371
  // bounded generously enough for long-form production while preventing one
@@ -81,18 +81,32 @@ function maximumLibraryBytes(lock: HtmlOverlayActiveLibraryLock): number {
81
81
  const DEFAULT_BROWSER_STEP_TIMEOUT_MS = 60_000;
82
82
  const MAXIMUM_BROWSER_STEP_TIMEOUT_MS = 5 * 60_000;
83
83
 
84
- export function createHtmlOverlayBrowserLaunchArgs(
84
+ export function createHtmlOverlayBrowserLaunchOptions(
85
85
  libraries: readonly HtmlOverlayLibrarySpecifier[],
86
86
  executionProfile?: HtmlOverlayExecutionProfile,
87
- ): string[] {
87
+ ): { args: string[]; ignoreDefaultArgs: string[] } {
88
88
  assertHtmlOverlayExecutionProfileLibraries(libraries, executionProfile);
89
89
  const contract = htmlOverlayRendererContract(executionProfile);
90
- return [
91
- ...contract.launch.args,
92
- ...(libraries.includes("vgpu")
93
- ? HTML_OVERLAY_RENDERER_CONTRACT.launch.libraryArgs.vgpu
94
- : []),
95
- ];
90
+ // Both the replacement and exact selective suppression are receipt-bound.
91
+ if (!("ignoreDefaultArgs" in contract.launch)) {
92
+ throw new Error("The current HTML-overlay launch contract lacks its selective default-argument policy.");
93
+ }
94
+ return {
95
+ args: [
96
+ ...contract.launch.args,
97
+ ...(libraries.includes("vgpu")
98
+ ? HTML_OVERLAY_RENDERER_CONTRACT.launch.libraryArgs.vgpu
99
+ : []),
100
+ ],
101
+ ignoreDefaultArgs: [...contract.launch.ignoreDefaultArgs],
102
+ };
103
+ }
104
+
105
+ export function createHtmlOverlayBrowserLaunchArgs(
106
+ libraries: readonly HtmlOverlayLibrarySpecifier[],
107
+ executionProfile?: HtmlOverlayExecutionProfile,
108
+ ): string[] {
109
+ return createHtmlOverlayBrowserLaunchOptions(libraries, executionProfile).args;
96
110
  }
97
111
  const BROWSER_CLEANUP_TIMEOUT_MS = 30_000;
98
112
  const BROWSER_RUNTIME_FLAGS_TIMEOUT_MS = 60_000;
@@ -2107,7 +2121,7 @@ export class PlaywrightHtmlOverlayRenderer implements HtmlOverlayRenderer {
2107
2121
  browserShutdownRequired = true;
2108
2122
  try {
2109
2123
  return await this.#launch({
2110
- args: createHtmlOverlayBrowserLaunchArgs(
2124
+ ...createHtmlOverlayBrowserLaunchOptions(
2111
2125
  request.authoring.libraries,
2112
2126
  request.executionProfile,
2113
2127
  ),