glitch-javascript-sdk 3.1.6 → 3.2.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.
package/dist/cjs/index.js CHANGED
@@ -30880,6 +30880,153 @@ var ServerOperations = /** @class */ (function () {
30880
30880
  return ServerOperations;
30881
30881
  }());
30882
30882
 
30883
+ var AgentsRoute = /** @class */ (function () {
30884
+ function AgentsRoute() {
30885
+ }
30886
+ AgentsRoute.routes = {
30887
+ listTitles: { url: "/agents/titles", method: HTTP_METHODS.GET },
30888
+ routeCatalog: { url: "/agents/routes/catalog", method: HTTP_METHODS.GET },
30889
+ workspace: { url: "/agents/titles/{title_id}/workspace", method: HTTP_METHODS.GET },
30890
+ listAgents: { url: "/agents/titles/{title_id}/agents", method: HTTP_METHODS.GET },
30891
+ createAgent: { url: "/agents/titles/{title_id}/agents", method: HTTP_METHODS.POST },
30892
+ viewAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}", method: HTTP_METHODS.GET },
30893
+ updateAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}", method: HTTP_METHODS.PUT },
30894
+ deleteAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}", method: HTTP_METHODS.DELETE },
30895
+ runAgent: { url: "/agents/titles/{title_id}/agents/{agent_id}/run", method: HTTP_METHODS.POST },
30896
+ listRuns: { url: "/agents/titles/{title_id}/runs", method: HTTP_METHODS.GET },
30897
+ listActions: { url: "/agents/titles/{title_id}/actions", method: HTTP_METHODS.GET },
30898
+ approveAction: { url: "/agents/titles/{title_id}/actions/{action_id}/approve", method: HTTP_METHODS.POST },
30899
+ rejectAction: { url: "/agents/titles/{title_id}/actions/{action_id}/reject", method: HTTP_METHODS.POST },
30900
+ executeAction: { url: "/agents/titles/{title_id}/actions/{action_id}/execute", method: HTTP_METHODS.POST },
30901
+ listGuidance: { url: "/agents/titles/{title_id}/guidance", method: HTTP_METHODS.GET },
30902
+ answerGuidance: { url: "/agents/titles/{title_id}/guidance/{guidance_id}/answer", method: HTTP_METHODS.POST },
30903
+ listMemories: { url: "/agents/titles/{title_id}/memories", method: HTTP_METHODS.GET },
30904
+ results: { url: "/agents/titles/{title_id}/results", method: HTTP_METHODS.GET },
30905
+ startTrial: { url: "/agents/titles/{title_id}/subscription/trial", method: HTTP_METHODS.POST },
30906
+ };
30907
+ return AgentsRoute;
30908
+ }());
30909
+
30910
+ var Agents = /** @class */ (function () {
30911
+ function Agents() {
30912
+ }
30913
+ /**
30914
+ * List game titles that can be managed in the Agents section.
30915
+ */
30916
+ Agents.listTitles = function (params) {
30917
+ return Requests.processRoute(AgentsRoute.routes.listTitles, {}, {}, params);
30918
+ };
30919
+ /**
30920
+ * Return the full Laravel API route catalog agents use for route-aware planning.
30921
+ */
30922
+ Agents.routeCatalog = function (params) {
30923
+ return Requests.processRoute(AgentsRoute.routes.routeCatalog, {}, {}, params);
30924
+ };
30925
+ /**
30926
+ * Get a title-scoped agent workspace with setup, billing, counts, and route summary.
30927
+ */
30928
+ Agents.workspace = function (title_id, params) {
30929
+ return Requests.processRoute(AgentsRoute.routes.workspace, {}, { title_id: title_id }, params);
30930
+ };
30931
+ /**
30932
+ * List agents for a title.
30933
+ */
30934
+ Agents.listAgents = function (title_id, params) {
30935
+ return Requests.processRoute(AgentsRoute.routes.listAgents, {}, { title_id: title_id }, params);
30936
+ };
30937
+ /**
30938
+ * Create an agent before payment. Runs/results remain gated until trial/subscription.
30939
+ */
30940
+ Agents.createAgent = function (title_id, data, params) {
30941
+ return Requests.processRoute(AgentsRoute.routes.createAgent, data, { title_id: title_id }, params);
30942
+ };
30943
+ /**
30944
+ * View one agent.
30945
+ */
30946
+ Agents.viewAgent = function (title_id, agent_id, params) {
30947
+ return Requests.processRoute(AgentsRoute.routes.viewAgent, {}, { title_id: title_id, agent_id: agent_id }, params);
30948
+ };
30949
+ /**
30950
+ * Update an agent's setup, policies, and guidance stop rules.
30951
+ */
30952
+ Agents.updateAgent = function (title_id, agent_id, data, params) {
30953
+ return Requests.processRoute(AgentsRoute.routes.updateAgent, data, { title_id: title_id, agent_id: agent_id }, params);
30954
+ };
30955
+ /**
30956
+ * Archive an agent.
30957
+ */
30958
+ Agents.deleteAgent = function (title_id, agent_id, params) {
30959
+ return Requests.processRoute(AgentsRoute.routes.deleteAgent, {}, { title_id: title_id, agent_id: agent_id }, params);
30960
+ };
30961
+ /**
30962
+ * Run an agent planning cycle. Returns 402 when trial/subscription is required.
30963
+ */
30964
+ Agents.runAgent = function (title_id, agent_id, data, params) {
30965
+ return Requests.processRoute(AgentsRoute.routes.runAgent, data, { title_id: title_id, agent_id: agent_id }, params);
30966
+ };
30967
+ /**
30968
+ * List agent runs for a title.
30969
+ */
30970
+ Agents.listRuns = function (title_id, params) {
30971
+ return Requests.processRoute(AgentsRoute.routes.listRuns, {}, { title_id: title_id }, params);
30972
+ };
30973
+ /**
30974
+ * List agent actions/approval queue for a title.
30975
+ */
30976
+ Agents.listActions = function (title_id, params) {
30977
+ return Requests.processRoute(AgentsRoute.routes.listActions, {}, { title_id: title_id }, params);
30978
+ };
30979
+ /**
30980
+ * Approve an agent action.
30981
+ */
30982
+ Agents.approveAction = function (title_id, action_id, data, params) {
30983
+ return Requests.processRoute(AgentsRoute.routes.approveAction, data || {}, { title_id: title_id, action_id: action_id }, params);
30984
+ };
30985
+ /**
30986
+ * Reject an agent action.
30987
+ */
30988
+ Agents.rejectAction = function (title_id, action_id, data, params) {
30989
+ return Requests.processRoute(AgentsRoute.routes.rejectAction, data || {}, { title_id: title_id, action_id: action_id }, params);
30990
+ };
30991
+ /**
30992
+ * Execute an approved safe action.
30993
+ */
30994
+ Agents.executeAction = function (title_id, action_id, data, params) {
30995
+ return Requests.processRoute(AgentsRoute.routes.executeAction, data || {}, { title_id: title_id, action_id: action_id }, params);
30996
+ };
30997
+ /**
30998
+ * List guidance requests where agents have stopped for developer direction.
30999
+ */
31000
+ Agents.listGuidance = function (title_id, params) {
31001
+ return Requests.processRoute(AgentsRoute.routes.listGuidance, {}, { title_id: title_id }, params);
31002
+ };
31003
+ /**
31004
+ * Answer a guidance request and write structured agent memory.
31005
+ */
31006
+ Agents.answerGuidance = function (title_id, guidance_id, data, params) {
31007
+ return Requests.processRoute(AgentsRoute.routes.answerGuidance, data, { title_id: title_id, guidance_id: guidance_id }, params);
31008
+ };
31009
+ /**
31010
+ * List structured agent memories for a title.
31011
+ */
31012
+ Agents.listMemories = function (title_id, params) {
31013
+ return Requests.processRoute(AgentsRoute.routes.listMemories, {}, { title_id: title_id }, params);
31014
+ };
31015
+ /**
31016
+ * Get results and outcome summary for title agents. Returns 402 until trial/subscription is active.
31017
+ */
31018
+ Agents.results = function (title_id, params) {
31019
+ return Requests.processRoute(AgentsRoute.routes.results, {}, { title_id: title_id }, params);
31020
+ };
31021
+ /**
31022
+ * Start a Stripe-backed agent trial/subscription after setup.
31023
+ */
31024
+ Agents.startTrial = function (title_id, data, params) {
31025
+ return Requests.processRoute(AgentsRoute.routes.startTrial, data, { title_id: title_id }, params);
31026
+ };
31027
+ return Agents;
31028
+ }());
31029
+
30883
31030
  var Parser = /** @class */ (function () {
30884
31031
  function Parser() {
30885
31032
  }
@@ -31423,6 +31570,7 @@ var Glitch = /** @class */ (function () {
31423
31570
  Crm: Crm,
31424
31571
  Multiplayer: Multiplayer,
31425
31572
  ServerOperations: ServerOperations,
31573
+ Agents: Agents,
31426
31574
  };
31427
31575
  Glitch.util = {
31428
31576
  Requests: Requests,