glitch-javascript-sdk 3.2.2 → 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/cjs/index.js CHANGED
@@ -30893,7 +30893,13 @@ var AgentsRoute = /** @class */ (function () {
30893
30893
  updateAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}", method: HTTP_METHODS.PUT },
30894
30894
  deleteAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}", method: HTTP_METHODS.DELETE },
30895
30895
  runAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}/run", method: HTTP_METHODS.POST },
30896
+ uploadAgentFiles: { url: "/agents/titles/{title_id}/agents/{agent_id}/files", method: HTTP_METHODS.POST },
30896
30897
  listRuns: { url: "/agents/titles/{title_id}/runs", method: HTTP_METHODS.GET },
30898
+ viewRun: { url: "/agents/titles/{title_id}/runs/{run_id}", method: HTTP_METHODS.GET },
30899
+ listRunEvents: { url: "/agents/titles/{title_id}/runs/{run_id}/events", method: HTTP_METHODS.GET },
30900
+ heartbeatRun: { url: "/agents/titles/{title_id}/runs/{run_id}/heartbeat", method: HTTP_METHODS.POST },
30901
+ cancelRun: { url: "/agents/titles/{title_id}/runs/{run_id}/cancel", method: HTTP_METHODS.POST },
30902
+ interjectRun: { url: "/agents/titles/{title_id}/runs/{run_id}/interject", method: HTTP_METHODS.POST },
30897
30903
  listActions: { url: "/agents/titles/{title_id}/actions", method: HTTP_METHODS.GET },
30898
30904
  approveAction: { url: "/agents/titles/{title_id}/actions/{action_id}/approve", method: HTTP_METHODS.POST },
30899
30905
  rejectAction: { url: "/agents/titles/{title_id}/actions/{action_id}/reject", method: HTTP_METHODS.POST },
@@ -30906,6 +30912,8 @@ var AgentsRoute = /** @class */ (function () {
30906
30912
  credits: { url: "/agents/titles/{title_id}/credits", method: HTTP_METHODS.GET },
30907
30913
  purchaseCredits: { url: "/agents/titles/{title_id}/credits/purchase", method: HTTP_METHODS.POST },
30908
30914
  startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
30915
+ listSchedulers: { url: "/schedulers", method: HTTP_METHODS.GET },
30916
+ createScheduler: { url: "/schedulers", method: HTTP_METHODS.POST },
30909
30917
  agencyOverview: { url: "/agents/agency/overview", method: HTTP_METHODS.GET },
30910
30918
  agencyInbox: { url: "/agents/agency/inbox", method: HTTP_METHODS.GET },
30911
30919
  };
@@ -30969,12 +30977,58 @@ var Agents = /** @class */ (function () {
30969
30977
  Agents.runAgent = function (title_id, agent_id, data, params) {
30970
30978
  return Requests.processRoute(AgentsRoute.routes.runAgent, data, { title_id: title_id, agent_id: agent_id }, params);
30971
30979
  };
30980
+ /**
30981
+ * Upload one file for an agent run. data can include { agent_run_id }.
30982
+ */
30983
+ Agents.uploadAgentFile = function (title_id, agent_id, file, data, params, onUploadProgress) {
30984
+ var url = AgentsRoute.routes.uploadAgentFiles.url
30985
+ .replace("{title_id}", title_id)
30986
+ .replace("{agent_id}", agent_id);
30987
+ return Requests.uploadFile(url, "file", file, data, params, onUploadProgress);
30988
+ };
30989
+ /**
30990
+ * Alias for callers that use plural naming while uploading one file at a time.
30991
+ */
30992
+ Agents.uploadAgentFiles = function (title_id, agent_id, file, data, params, onUploadProgress) {
30993
+ return Agents.uploadAgentFile(title_id, agent_id, file, data, params, onUploadProgress);
30994
+ };
30972
30995
  /**
30973
30996
  * List agent runs for a title.
30974
30997
  */
30975
30998
  Agents.listRuns = function (title_id, params) {
30976
30999
  return Requests.processRoute(AgentsRoute.routes.listRuns, {}, { title_id: title_id }, params);
30977
31000
  };
31001
+ /**
31002
+ * View one durable agent run, including events, files, actions, and guidance when loaded by the API.
31003
+ */
31004
+ Agents.viewRun = function (title_id, run_id, params) {
31005
+ return Requests.processRoute(AgentsRoute.routes.viewRun, {}, { title_id: title_id, run_id: run_id }, params);
31006
+ };
31007
+ /**
31008
+ * List real-time user-visible events for an agent run.
31009
+ */
31010
+ Agents.listRunEvents = function (title_id, run_id, params) {
31011
+ return Requests.processRoute(AgentsRoute.routes.listRunEvents, {}, { title_id: title_id, run_id: run_id }, params);
31012
+ };
31013
+ /**
31014
+ * Mark a queued or running agent run as being watched live so the UI can stream the loop
31015
+ * and the backend can avoid sending delayed background summaries to active viewers.
31016
+ */
31017
+ Agents.heartbeatRun = function (title_id, run_id, data, params) {
31018
+ return Requests.processRoute(AgentsRoute.routes.heartbeatRun, data || {}, { title_id: title_id, run_id: run_id }, params);
31019
+ };
31020
+ /**
31021
+ * Request cancellation for a queued or running agent run.
31022
+ */
31023
+ Agents.cancelRun = function (title_id, run_id, data, params) {
31024
+ return Requests.processRoute(AgentsRoute.routes.cancelRun, data || {}, { title_id: title_id, run_id: run_id }, params);
31025
+ };
31026
+ /**
31027
+ * Send a course correction to a queued or running agent run.
31028
+ */
31029
+ Agents.interjectRun = function (title_id, run_id, data, params) {
31030
+ return Requests.processRoute(AgentsRoute.routes.interjectRun, data || {}, { title_id: title_id, run_id: run_id }, params);
31031
+ };
30978
31032
  /**
30979
31033
  * List agent actions/approval queue for a title.
30980
31034
  */
@@ -31049,6 +31103,18 @@ var Agents = /** @class */ (function () {
31049
31103
  Agents.startTrial = function (title_id, data, params) {
31050
31104
  return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id: title_id }, params);
31051
31105
  };
31106
+ /**
31107
+ * List social/ad schedulers. Useful when agent setup needs to attach to an existing workflow.
31108
+ */
31109
+ Agents.listSchedulers = function (params) {
31110
+ return Requests.processRoute(AgentsRoute.routes.listSchedulers, {}, {}, params);
31111
+ };
31112
+ /**
31113
+ * Create a scheduler inline from an agent setup flow.
31114
+ */
31115
+ Agents.createScheduler = function (data, params) {
31116
+ return Requests.processRoute(AgentsRoute.routes.createScheduler, data || {}, {}, params);
31117
+ };
31052
31118
  /**
31053
31119
  * Cross-title agency cockpit: per-title agent status, billing/credits, and portfolio totals.
31054
31120
  */