glitch-javascript-sdk 3.2.3 → 3.2.4

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/dist/index.d.ts CHANGED
@@ -9155,6 +9155,11 @@ declare class Agents {
9155
9155
  * List real-time user-visible events for an agent run.
9156
9156
  */
9157
9157
  static listRunEvents<T>(title_id: string, run_id: string, params?: Record<string, any>): AxiosPromise<Response<T>>;
9158
+ /**
9159
+ * Mark a queued or running agent run as being watched live so the UI can stream the loop
9160
+ * and the backend can avoid sending delayed background summaries to active viewers.
9161
+ */
9162
+ static heartbeatRun<T>(title_id: string, run_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
9158
9163
  /**
9159
9164
  * Request cancellation for a queued or running agent run.
9160
9165
  */
@@ -9213,6 +9218,14 @@ declare class Agents {
9213
9218
  * Start a Stripe-backed agent trial/subscription after setup.
9214
9219
  */
9215
9220
  static startTrial<T>(title_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
9221
+ /**
9222
+ * List social/ad schedulers. Useful when agent setup needs to attach to an existing workflow.
9223
+ */
9224
+ static listSchedulers<T>(params?: Record<string, any>): AxiosPromise<Response<T>>;
9225
+ /**
9226
+ * Create a scheduler inline from an agent setup flow.
9227
+ */
9228
+ static createScheduler<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>>;
9216
9229
  /**
9217
9230
  * Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
9218
9231
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "glitch-javascript-sdk",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "description": "Javascript SDK for Glitch",
5
5
  "publishConfig": {
6
6
  "access": "public"
package/src/api/Agents.ts CHANGED
@@ -120,6 +120,14 @@ class Agents {
120
120
  return Requests.processRoute(AgentsRoute.routes.listRunEvents, {}, { title_id, run_id }, params);
121
121
  }
122
122
 
123
+ /**
124
+ * Mark a queued or running agent run as being watched live so the UI can stream the loop
125
+ * and the backend can avoid sending delayed background summaries to active viewers.
126
+ */
127
+ public static heartbeatRun<T>(title_id: string, run_id: string, data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
128
+ return Requests.processRoute(AgentsRoute.routes.heartbeatRun, data || {}, { title_id, run_id }, params);
129
+ }
130
+
123
131
  /**
124
132
  * Request cancellation for a queued or running agent run.
125
133
  */
@@ -220,6 +228,20 @@ class Agents {
220
228
  return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id }, params);
221
229
  }
222
230
 
231
+ /**
232
+ * List social/ad schedulers. Useful when agent setup needs to attach to an existing workflow.
233
+ */
234
+ public static listSchedulers<T>(params?: Record<string, any>): AxiosPromise<Response<T>> {
235
+ return Requests.processRoute(AgentsRoute.routes.listSchedulers, {}, {}, params);
236
+ }
237
+
238
+ /**
239
+ * Create a scheduler inline from an agent setup flow.
240
+ */
241
+ public static createScheduler<T>(data?: object, params?: Record<string, any>): AxiosPromise<Response<T>> {
242
+ return Requests.processRoute(AgentsRoute.routes.createScheduler, data || {}, {}, params);
243
+ }
244
+
223
245
  /**
224
246
  * Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
225
247
  */
@@ -16,6 +16,7 @@ class AgentsRoute {
16
16
  listRuns: { url: "/agents/titles/{title_id}/runs", method: HTTP_METHODS.GET },
17
17
  viewRun: { url: "/agents/titles/{title_id}/runs/{run_id}", method: HTTP_METHODS.GET },
18
18
  listRunEvents: { url: "/agents/titles/{title_id}/runs/{run_id}/events", method: HTTP_METHODS.GET },
19
+ heartbeatRun: { url: "/agents/titles/{title_id}/runs/{run_id}/heartbeat", method: HTTP_METHODS.POST },
19
20
  cancelRun: { url: "/agents/titles/{title_id}/runs/{run_id}/cancel", method: HTTP_METHODS.POST },
20
21
  interjectRun: { url: "/agents/titles/{title_id}/runs/{run_id}/interject", method: HTTP_METHODS.POST },
21
22
  listActions: { url: "/agents/titles/{title_id}/actions", method: HTTP_METHODS.GET },
@@ -30,6 +31,8 @@ class AgentsRoute {
30
31
  credits: { url: "/agents/titles/{title_id}/credits", method: HTTP_METHODS.GET },
31
32
  purchaseCredits: { url: "/agents/titles/{title_id}/credits/purchase", method: HTTP_METHODS.POST },
32
33
  startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
34
+ listSchedulers: { url: "/schedulers", method: HTTP_METHODS.GET },
35
+ createScheduler: { url: "/schedulers", method: HTTP_METHODS.POST },
33
36
  agencyOverview: { url: "/agents/agency/overview", method: HTTP_METHODS.GET },
34
37
  agencyInbox: { url: "/agents/agency/inbox", method: HTTP_METHODS.GET },
35
38
  };