@pygmalionjs/pygmalion 0.9.0 → 0.10.0

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
@@ -442,6 +442,40 @@ Shared edits update detailed active frames and lightweight inactive frames in
442
442
  the same render cycle. A frame does not need to be activated before it reflects
443
443
  a shared change.
444
444
 
445
+ ### Connect source adapters to SDK services
446
+
447
+ The host supplies screen declarations, source mappings, authentication or mock
448
+ setup, and build commands. Pygmalion owns reusable execution, revision caching,
449
+ source review, and cancellation. Keep SDK implementation and regression tests
450
+ in Pygmalion; host tests continue to cover the product's own behavior.
451
+
452
+ | Package subpath | Responsibility |
453
+ | --- | --- |
454
+ | `./host-runtime` | Process-group cleanup, revision catalog queues and caches, isolated source roots, and lockfile-matched dependencies. |
455
+ | `./source-service` | Source and token review receipts, apply validation, reconciliation sessions, and local JSON transport. |
456
+ | `./source-reconciler` | Reconcile draft structure with external source edits using host-supplied source identity mappings. |
457
+ | `./draft-entry` | Generate a browser entry that applies the declared draft recipe and reports readiness or failure. |
458
+ | `./source-module` | Evaluate a trusted declaration bundle using the host's bundler configuration. |
459
+
460
+ For example, declare a build command in the host and let the SDK wait for its
461
+ process group to stop before an archive can be removed:
462
+
463
+ ```js
464
+ import { executeWorkspaceDraftProcess } from '@pygmalionjs/pygmalion/host-runtime';
465
+
466
+ export function buildPreview({ cwd, signal }) {
467
+ return executeWorkspaceDraftProcess(process.execPath, ['scripts/build-preview.mjs'], {
468
+ cwd,
469
+ signal,
470
+ timeout: 120_000,
471
+ });
472
+ }
473
+ ```
474
+
475
+ Process-group cleanup supports macOS and Linux. Catalog generation callbacks
476
+ receive an isolated archive for the exact requested commit; cancelling one
477
+ catalog request does not cancel generation shared with another caller.
478
+
445
479
  ## Local development
446
480
 
447
481
  ```bash
@@ -1,5 +1,5 @@
1
1
  import { jsx as p } from "react/jsx-runtime";
2
- import { j as g, R as C, aI as P, ce as R, cf as E, U as I, cg as k, a3 as m, a0 as b } from "./runtime-Dxb-IaLN.js";
2
+ import { j as g, R as C, aI as P, cf as R, cg as E, U as I, ch as k, a3 as m, a0 as b } from "./runtime-BOfDlGPR.js";
3
3
  import { useRef as L, useLayoutEffect as h } from "react";
4
4
  function f(n) {
5
5
  return `translate(${n.panX}px, ${n.panY}px) scale(${n.zoom})`;