@wopr-network/platform-core 1.42.2 → 1.43.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.
@@ -59,6 +59,22 @@ export class Instance {
59
59
  this.botMetricsTracker = deps.botMetricsTracker;
60
60
  }
61
61
 
62
+ /** Serialize to a plain object safe for JSON.stringify / tRPC responses. */
63
+ toJSON(): Record<string, unknown> {
64
+ return {
65
+ id: this.id,
66
+ containerId: this.containerId,
67
+ containerName: this.containerName,
68
+ url: this.url,
69
+ name: this.profile.name,
70
+ image: this.profile.image,
71
+ tenantId: this.profile.tenantId,
72
+ env: this.profile.env,
73
+ restartPolicy: this.profile.restartPolicy,
74
+ nodeId: this.profile.nodeId,
75
+ };
76
+ }
77
+
62
78
  /**
63
79
  * Remote instances have containerId like "remote:node-3".
64
80
  * Local Docker operations are not supported — callers (e.g. wopr-platform)