glitch-javascript-sdk 3.2.2 → 3.2.3
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 +44 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/api/Agents.d.ts +25 -1
- package/dist/esm/index.js +44 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +24 -0
- package/package.json +1 -1
- package/src/api/Agents.ts +61 -1
- package/src/routes/AgentsRoute.ts +5 -0
package/dist/cjs/index.js
CHANGED
|
@@ -30893,7 +30893,12 @@ 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
|
+
cancelRun: { url: "/agents/titles/{title_id}/runs/{run_id}/cancel", method: HTTP_METHODS.POST },
|
|
30901
|
+
interjectRun: { url: "/agents/titles/{title_id}/runs/{run_id}/interject", method: HTTP_METHODS.POST },
|
|
30897
30902
|
listActions: { url: "/agents/titles/{title_id}/actions", method: HTTP_METHODS.GET },
|
|
30898
30903
|
approveAction: { url: "/agents/titles/{title_id}/actions/{action_id}/approve", method: HTTP_METHODS.POST },
|
|
30899
30904
|
rejectAction: { url: "/agents/titles/{title_id}/actions/{action_id}/reject", method: HTTP_METHODS.POST },
|
|
@@ -30969,12 +30974,51 @@ var Agents = /** @class */ (function () {
|
|
|
30969
30974
|
Agents.runAgent = function (title_id, agent_id, data, params) {
|
|
30970
30975
|
return Requests.processRoute(AgentsRoute.routes.runAgent, data, { title_id: title_id, agent_id: agent_id }, params);
|
|
30971
30976
|
};
|
|
30977
|
+
/**
|
|
30978
|
+
* Upload one file for an agent run. data can include { agent_run_id }.
|
|
30979
|
+
*/
|
|
30980
|
+
Agents.uploadAgentFile = function (title_id, agent_id, file, data, params, onUploadProgress) {
|
|
30981
|
+
var url = AgentsRoute.routes.uploadAgentFiles.url
|
|
30982
|
+
.replace("{title_id}", title_id)
|
|
30983
|
+
.replace("{agent_id}", agent_id);
|
|
30984
|
+
return Requests.uploadFile(url, "file", file, data, params, onUploadProgress);
|
|
30985
|
+
};
|
|
30986
|
+
/**
|
|
30987
|
+
* Alias for callers that use plural naming while uploading one file at a time.
|
|
30988
|
+
*/
|
|
30989
|
+
Agents.uploadAgentFiles = function (title_id, agent_id, file, data, params, onUploadProgress) {
|
|
30990
|
+
return Agents.uploadAgentFile(title_id, agent_id, file, data, params, onUploadProgress);
|
|
30991
|
+
};
|
|
30972
30992
|
/**
|
|
30973
30993
|
* List agent runs for a title.
|
|
30974
30994
|
*/
|
|
30975
30995
|
Agents.listRuns = function (title_id, params) {
|
|
30976
30996
|
return Requests.processRoute(AgentsRoute.routes.listRuns, {}, { title_id: title_id }, params);
|
|
30977
30997
|
};
|
|
30998
|
+
/**
|
|
30999
|
+
* View one durable agent run, including events, files, actions, and guidance when loaded by the API.
|
|
31000
|
+
*/
|
|
31001
|
+
Agents.viewRun = function (title_id, run_id, params) {
|
|
31002
|
+
return Requests.processRoute(AgentsRoute.routes.viewRun, {}, { title_id: title_id, run_id: run_id }, params);
|
|
31003
|
+
};
|
|
31004
|
+
/**
|
|
31005
|
+
* List real-time user-visible events for an agent run.
|
|
31006
|
+
*/
|
|
31007
|
+
Agents.listRunEvents = function (title_id, run_id, params) {
|
|
31008
|
+
return Requests.processRoute(AgentsRoute.routes.listRunEvents, {}, { title_id: title_id, run_id: run_id }, params);
|
|
31009
|
+
};
|
|
31010
|
+
/**
|
|
31011
|
+
* Request cancellation for a queued or running agent run.
|
|
31012
|
+
*/
|
|
31013
|
+
Agents.cancelRun = function (title_id, run_id, data, params) {
|
|
31014
|
+
return Requests.processRoute(AgentsRoute.routes.cancelRun, data || {}, { title_id: title_id, run_id: run_id }, params);
|
|
31015
|
+
};
|
|
31016
|
+
/**
|
|
31017
|
+
* Send a course correction to a queued or running agent run.
|
|
31018
|
+
*/
|
|
31019
|
+
Agents.interjectRun = function (title_id, run_id, data, params) {
|
|
31020
|
+
return Requests.processRoute(AgentsRoute.routes.interjectRun, data || {}, { title_id: title_id, run_id: run_id }, params);
|
|
31021
|
+
};
|
|
30978
31022
|
/**
|
|
30979
31023
|
* List agent actions/approval queue for a title.
|
|
30980
31024
|
*/
|