@bian-womp/spark-workbench 0.3.78 → 0.3.80

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.
@@ -1 +1 @@
1
- {"version":3,"file":"LocalGraphRunner.d.ts","sourceRoot":"","sources":["../../../../src/runtime/LocalGraphRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EAER,WAAW,EAKZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,aAAa,EAEb,eAAe,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAK5D,qBAAa,gBAAiB,SAAQ,mBAAmB;IACvD,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAS,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;IAC/B,OAAO,CAAC,OAAO,CAA+B;gBAElC,QAAQ,CAAC,EAAE,QAAQ;IAW/B,KAAK,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;IAenE,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;IAY/D,MAAM,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI;cAoBvC,qBAAqB,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBpE,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,mBAAmB,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvF,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD,cAAc,CAAC,OAAO,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AAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxD,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAejF,YAAY;;;;;;;IA6BZ,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE;IAYhG,eAAe,CAAC,eAAe,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAQ5G,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAK7B,OAAO,CAAC,OAAO;IAgCf,OAAO,IAAI,IAAI;CAKhB"}
@@ -14,25 +14,19 @@ export declare class RemoteGraphRunner extends AbstractGraphRunner {
14
14
  private valueCache;
15
15
  private listenersBound;
16
16
  private registryFetched;
17
- private registryFetchPromise?;
18
- private readonly MAX_REGISTRY_FETCH_ATTEMPTS;
19
- private readonly INITIAL_RETRY_DELAY_MS;
20
- private readonly REGISTRY_FETCH_TIMEOUT_MS;
17
+ private registryBootstrapPromise?;
18
+ private registryBootstrapResolve?;
19
+ private registryBootstrapReject?;
20
+ private readonly REGISTRY_BOOTSTRAP_TIMEOUT_MS;
21
21
  /**
22
22
  * Generate cache key that includes io type to prevent collisions
23
23
  * between input and output handles with the same name
24
24
  */
25
25
  private getCacheKey;
26
- /**
27
- * Fetch full registry description from remote and register it locally.
28
- * Simplified with straightforward retry loop.
29
- * Ensures only one fetch happens at a time, even with concurrent calls.
30
- */
31
- private fetchRegistry;
32
- /**
33
- * Internal method that performs the actual registry fetch.
34
- */
35
- private _doFetchRegistry;
26
+ private applyRegistryDescriptor;
27
+ private isRecord;
28
+ private isRegistryDescriptorEvent;
29
+ private waitForRegistryBootstrap;
36
30
  /**
37
31
  * Build RemoteRuntimeClient config from RemoteExecutionBackend config.
38
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteGraphRunner.d.ts","sourceRoot":"","sources":["../../../../src/runtime/RemoteGraphRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,eAAe,EACf,OAAO,EACP,eAAe,EAChB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,EACZ,mBAAmB,EAGpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,sBAAsB,EAGtB,eAAe,EACf,mBAAmB,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAM5D,qBAAa,iBAAkB,SAAQ,mBAAmB;IACxD,SAAS,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC;IACpC,SAAS,CAAC,MAAM,CAAC,EAAE,mBAAmB,CAAC;IACvC,SAAS,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IAChC,OAAO,CAAC,aAAa,CAAC,CAA+B;IACrD,OAAO,CAAC,0BAA0B,CAAC,CAAa;IAChD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,sBAAsB,CAAkB;IAChD,SAAgB,QAAQ,EAAE,MAAM,CAAC;IAEjC,OAAO,CAAC,UAAU,CAAiE;IAEnF,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,oBAAoB,CAAC,CAAgB;IAC7C,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAK;IACjD,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAQ;IAC/C,OAAO,CAAC,QAAQ,CAAC,yBAAyB,CAAQ;IAElD;;;OAGG;IACH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AoBzE,SAAS,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAyBlE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAwC9B;;;OAGG;IACH,EAAE,CAAC,CAAC,SAAS,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;CAerF"}
package/lib/esm/index.js CHANGED
@@ -1423,10 +1423,7 @@ class LocalGraphRunner extends AbstractGraphRunner {
1423
1423
  const snapshot = await this.snapshotFull();
1424
1424
  const converter = buildValueConverter(converterConfig);
1425
1425
  const converted = convertSnapshot(snapshot, converter);
1426
- await this.applySnapshotFull(converted, {
1427
- skipBuild: true,
1428
- dry: options?.dry,
1429
- });
1426
+ await this.applySnapshotFull(converted, { skipBuild: true, dry: options?.dry });
1430
1427
  return converted;
1431
1428
  }
1432
1429
  async pause() {
@@ -1504,139 +1501,101 @@ class RemoteGraphRunner extends AbstractGraphRunner {
1504
1501
  getCacheKey(nodeId, handle, io) {
1505
1502
  return `${nodeId}.${io}.${handle}`;
1506
1503
  }
1507
- /**
1508
- * Fetch full registry description from remote and register it locally.
1509
- * Simplified with straightforward retry loop.
1510
- * Ensures only one fetch happens at a time, even with concurrent calls.
1511
- */
1512
- async fetchRegistry(client) {
1513
- if (this.registryFetched) {
1514
- return;
1515
- }
1516
- // If already fetching, wait for that fetch to complete
1517
- if (this.registryFetchPromise) {
1518
- return this.registryFetchPromise;
1519
- }
1520
- // Create promise wrapper and assign atomically to prevent race conditions
1521
- // This ensures concurrent calls will see the promise and wait for it
1522
- let promise;
1523
- this.registryFetchPromise = promise = (async () => {
1524
- try {
1525
- await this._doFetchRegistry(client);
1504
+ applyRegistryDescriptor(desc) {
1505
+ for (const t of desc.types) {
1506
+ if (t.options) {
1507
+ this.registry.registerEnum({
1508
+ id: t.id,
1509
+ options: t.options,
1510
+ bakeTarget: t.bakeTarget,
1511
+ });
1526
1512
  }
1527
- finally {
1528
- // Clear the promise after completion (success or failure)
1529
- this.registryFetchPromise = undefined;
1513
+ else if (!this.registry.types.has(t.id)) {
1514
+ this.registry.registerType({
1515
+ id: t.id,
1516
+ displayName: t.displayName,
1517
+ validate: (_v) => true,
1518
+ bakeTarget: t.bakeTarget,
1519
+ });
1530
1520
  }
1531
- })();
1532
- return promise;
1533
- }
1534
- /**
1535
- * Internal method that performs the actual registry fetch.
1536
- */
1537
- async _doFetchRegistry(client) {
1538
- let lastError;
1539
- for (let attempt = 1; attempt <= this.MAX_REGISTRY_FETCH_ATTEMPTS; attempt++) {
1540
- try {
1541
- // Add timeout to registry fetch - if it exceeds 3s, retry
1542
- let timeoutId;
1543
- const timeoutPromise = new Promise((_, reject) => {
1544
- timeoutId = setTimeout(() => reject(new Error("Registry fetch timeout (3s exceeded)")), this.REGISTRY_FETCH_TIMEOUT_MS);
1521
+ }
1522
+ for (const c of desc.categories || []) {
1523
+ if (!this.registry.categories.has(c.id)) {
1524
+ const category = {
1525
+ id: c.id,
1526
+ displayName: c.displayName,
1527
+ createRuntime: () => ({
1528
+ async onInputsChanged() { },
1529
+ }),
1530
+ policy: { asyncConcurrency: "switch" },
1531
+ };
1532
+ this.registry.categories.register(category);
1533
+ }
1534
+ }
1535
+ for (const c of desc.coercions) {
1536
+ if (c.async) {
1537
+ this.registry.registerAsyncCoercion(c.from, c.to, async (v) => v, {
1538
+ nonTransitive: c.nonTransitive,
1545
1539
  });
1546
- const fetchPromise = client.api.describeRegistry().finally(() => {
1547
- // Clear timeout if request completes first
1548
- if (timeoutId) {
1549
- clearTimeout(timeoutId);
1550
- timeoutId = undefined;
1551
- }
1540
+ }
1541
+ else {
1542
+ this.registry.registerCoercion(c.from, c.to, (v) => v, {
1543
+ nonTransitive: c.nonTransitive,
1552
1544
  });
1553
- const desc = await Promise.race([fetchPromise, timeoutPromise]);
1554
- // Register types
1555
- for (const t of desc.types) {
1556
- if (t.options) {
1557
- this.registry.registerEnum({
1558
- id: t.id,
1559
- options: t.options,
1560
- bakeTarget: t.bakeTarget,
1561
- });
1562
- }
1563
- else {
1564
- if (!this.registry.types.has(t.id)) {
1565
- this.registry.registerType({
1566
- id: t.id,
1567
- displayName: t.displayName,
1568
- validate: (_v) => true,
1569
- bakeTarget: t.bakeTarget,
1570
- });
1571
- }
1572
- }
1573
- }
1574
- // Register categories
1575
- for (const c of desc.categories || []) {
1576
- if (!this.registry.categories.has(c.id)) {
1577
- // Create placeholder category descriptor
1578
- const category = {
1579
- id: c.id,
1580
- displayName: c.displayName,
1581
- createRuntime: () => ({
1582
- async onInputsChanged() { },
1583
- }),
1584
- policy: { asyncConcurrency: "switch" },
1585
- };
1586
- this.registry.categories.register(category);
1587
- }
1588
- }
1589
- // Register coercions
1590
- for (const c of desc.coercions) {
1591
- if (c.async) {
1592
- this.registry.registerAsyncCoercion(c.from, c.to, async (v) => v, {
1593
- nonTransitive: c.nonTransitive,
1594
- });
1595
- }
1596
- else {
1597
- this.registry.registerCoercion(c.from, c.to, (v) => v, {
1598
- nonTransitive: c.nonTransitive,
1599
- });
1600
- }
1601
- }
1602
- // Register nodes
1603
- for (const n of desc.nodes) {
1604
- if (!this.registry.nodes.has(n.id)) {
1605
- this.registry.registerNode({
1606
- id: n.id,
1607
- categoryId: n.categoryId,
1608
- displayName: n.displayName,
1609
- inputs: n.inputs || {},
1610
- outputs: n.outputs || {},
1611
- policy: n.policy || {},
1612
- impl: () => { },
1613
- });
1614
- }
1615
- }
1616
- this.registryFetched = true;
1617
- this.emit("registry", this.registry);
1618
- return;
1619
1545
  }
1620
- catch (err) {
1621
- lastError = err instanceof Error ? err : new Error(String(err));
1622
- if (attempt < this.MAX_REGISTRY_FETCH_ATTEMPTS) {
1623
- const delayMs = this.INITIAL_RETRY_DELAY_MS * Math.pow(2, attempt - 1);
1624
- console.warn(`Failed to fetch registry (attempt ${attempt}/${this.MAX_REGISTRY_FETCH_ATTEMPTS}), retrying in ${delayMs}ms...`, lastError);
1625
- // Wait before retrying
1626
- await new Promise((resolve) => setTimeout(resolve, delayMs));
1627
- }
1546
+ }
1547
+ for (const n of desc.nodes) {
1548
+ if (!this.registry.nodes.has(n.id)) {
1549
+ this.registry.registerNode({
1550
+ id: n.id,
1551
+ categoryId: n.categoryId,
1552
+ displayName: n.displayName,
1553
+ inputs: n.inputs || {},
1554
+ outputs: n.outputs || {},
1555
+ policy: n.policy || {},
1556
+ impl: () => { },
1557
+ });
1628
1558
  }
1629
1559
  }
1630
- // Max attempts reached, emit final error and throw
1631
- console.error(`Failed to fetch registry after ${this.MAX_REGISTRY_FETCH_ATTEMPTS} attempts:`, lastError);
1632
- this.emit("error", {
1633
- kind: "registry",
1634
- message: `Failed to fetch registry after ${this.MAX_REGISTRY_FETCH_ATTEMPTS} attempts. Please check your connection and try refreshing.`,
1635
- err: lastError,
1636
- attempt: this.MAX_REGISTRY_FETCH_ATTEMPTS,
1637
- maxAttempts: this.MAX_REGISTRY_FETCH_ATTEMPTS,
1560
+ this.registryFetched = true;
1561
+ if (this.registryBootstrapResolve) {
1562
+ this.registryBootstrapResolve();
1563
+ this.registryBootstrapResolve = undefined;
1564
+ this.registryBootstrapReject = undefined;
1565
+ }
1566
+ this.emit("registry", this.registry);
1567
+ }
1568
+ isRecord(value) {
1569
+ return typeof value === "object" && value !== null;
1570
+ }
1571
+ isRegistryDescriptorEvent(message) {
1572
+ if (!this.isRecord(message))
1573
+ return false;
1574
+ if (message.type !== "registry-descriptor")
1575
+ return false;
1576
+ if (!this.isRecord(message.payload))
1577
+ return false;
1578
+ return "registry" in message.payload;
1579
+ }
1580
+ waitForRegistryBootstrap() {
1581
+ if (this.registryFetched)
1582
+ return Promise.resolve();
1583
+ if (this.registryBootstrapPromise)
1584
+ return this.registryBootstrapPromise;
1585
+ this.registryBootstrapPromise = new Promise((resolve, reject) => {
1586
+ this.registryBootstrapResolve = resolve;
1587
+ this.registryBootstrapReject = reject;
1588
+ setTimeout(() => {
1589
+ if (!this.registryFetched && this.registryBootstrapReject) {
1590
+ this.registryBootstrapReject(new Error(`Registry bootstrap timeout (${this.REGISTRY_BOOTSTRAP_TIMEOUT_MS}ms exceeded)`));
1591
+ this.registryBootstrapResolve = undefined;
1592
+ this.registryBootstrapReject = undefined;
1593
+ }
1594
+ }, this.REGISTRY_BOOTSTRAP_TIMEOUT_MS);
1595
+ }).finally(() => {
1596
+ this.registryBootstrapPromise = undefined;
1638
1597
  });
1639
- throw lastError;
1598
+ return this.registryBootstrapPromise;
1640
1599
  }
1641
1600
  /**
1642
1601
  * Build RemoteRuntimeClient config from RemoteExecutionBackend config.
@@ -1698,13 +1657,27 @@ class RemoteGraphRunner extends AbstractGraphRunner {
1698
1657
  const clientConfig = this.buildClientConfig(backend);
1699
1658
  // Wrap custom event handler to intercept viewport events and emit viewport event
1700
1659
  const wrappedOnCustomEvent = (event) => {
1701
- const msg = event?.message;
1702
- if (msg && typeof msg === "object" && "type" in msg && msg.type === "viewport") {
1703
- const viewport = msg.payload?.viewport;
1660
+ const msg = event.message;
1661
+ if (this.isRecord(msg) && msg.type === "viewport" && this.isRecord(msg.payload)) {
1662
+ const viewport = msg.payload.viewport;
1704
1663
  if (isValidViewport(viewport)) {
1705
1664
  this.emit("viewport", { viewport });
1706
1665
  }
1707
1666
  }
1667
+ else if (this.isRecord(msg) && msg.type === "flow-opened" && this.isRecord(msg.payload)) {
1668
+ const sessionId = msg.payload.sessionId;
1669
+ const resumed = msg.payload.resumed;
1670
+ if (typeof sessionId === "number") {
1671
+ console.info(`[RemoteGraphRunner] Flow opened (runner=${this.runnerId}, sessionId=${sessionId}, resumed=${Boolean(resumed)})`);
1672
+ }
1673
+ }
1674
+ else if (this.isRecord(msg) && msg.type === "flow-closed" && this.isRecord(msg.payload)) {
1675
+ const reason = msg.payload.reason;
1676
+ console.warn(`[RemoteGraphRunner] Flow closed (runner=${this.runnerId}, reason=${typeof reason === "string" ? reason : "unknown"})`);
1677
+ }
1678
+ else if (this.isRegistryDescriptorEvent(msg)) {
1679
+ this.applyRegistryDescriptor(msg.payload.registry);
1680
+ }
1708
1681
  // Call original handler if provided
1709
1682
  if (backend.onCustomEvent) {
1710
1683
  backend.onCustomEvent(event);
@@ -1722,12 +1695,11 @@ class RemoteGraphRunner extends AbstractGraphRunner {
1722
1695
  this.client = client;
1723
1696
  this.valueCache.clear();
1724
1697
  this.listenersBound = false;
1725
- // Fetch registry before returning (wait for it to complete)
1726
- // Only fetch if not already fetched (handles concurrent calls)
1698
+ // Wait for registry descriptor pushed by backend on flow-open.
1727
1699
  if (!this.registryFetched) {
1728
- console.info("[RemoteGraphRunner] Loading registry from remote...");
1729
- await this.fetchRegistry(client);
1730
- console.info("[RemoteGraphRunner] Loaded registry from remote");
1700
+ console.info("[RemoteGraphRunner] Waiting for registry bootstrap event...");
1701
+ await this.waitForRegistryBootstrap();
1702
+ console.info("[RemoteGraphRunner] Received registry bootstrap event");
1731
1703
  }
1732
1704
  // Clear promise on success
1733
1705
  this.clientPromise = undefined;
@@ -1741,9 +1713,7 @@ class RemoteGraphRunner extends AbstractGraphRunner {
1741
1713
  this.valueCache = new Map();
1742
1714
  this.listenersBound = false;
1743
1715
  this.registryFetched = false;
1744
- this.MAX_REGISTRY_FETCH_ATTEMPTS = 3;
1745
- this.INITIAL_RETRY_DELAY_MS = 1000; // 1 second
1746
- this.REGISTRY_FETCH_TIMEOUT_MS = 3000; // 3 seconds
1716
+ this.REGISTRY_BOOTSTRAP_TIMEOUT_MS = 15000; // 15 seconds
1747
1717
  // Generate readable ID for this runner instance (e.g., remote-001, remote-002)
1748
1718
  remoteRunnerCounter++;
1749
1719
  this.runnerId = `remote-${String(remoteRunnerCounter).padStart(3, "0")}`;
@@ -2030,9 +2000,7 @@ class RemoteGraphRunner extends AbstractGraphRunner {
2030
2000
  this.hydrateValueCache(payload, { dry: options?.dry });
2031
2001
  // Then sync with backend
2032
2002
  const client = await this.ensureClient();
2033
- await client.api.applySnapshotFull(payload, {
2034
- skipBuild: options?.skipBuild,
2035
- });
2003
+ await client.api.applySnapshotFull(payload, { skipBuild: options?.skipBuild });
2036
2004
  }
2037
2005
  async convertSnapshot(converterConfig, options) {
2038
2006
  const client = await this.ensureClient();