@meetkai/mka1 0.55.30 → 0.55.32

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.
Files changed (182) hide show
  1. package/bin/mcp-server.js +208 -202
  2. package/bin/mcp-server.js.map +12 -12
  3. package/dist/commonjs/funcs/{sessionsGetTenantResourcePolicy.d.ts → sandboxResourcePoliciesGet.d.ts} +6 -3
  4. package/dist/commonjs/funcs/sandboxResourcePoliciesGet.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/{sessionsGetTenantResourcePolicy.js → sandboxResourcePoliciesGet.js} +7 -4
  6. package/dist/commonjs/funcs/sandboxResourcePoliciesGet.js.map +1 -0
  7. package/dist/{esm/funcs/sessionsGetTenantResourcePolicy.d.ts → commonjs/funcs/sandboxResourcePoliciesSet.d.ts} +6 -3
  8. package/dist/commonjs/funcs/sandboxResourcePoliciesSet.d.ts.map +1 -0
  9. package/dist/commonjs/funcs/{sessionsSetTenantResourcePolicy.js → sandboxResourcePoliciesSet.js} +7 -4
  10. package/dist/commonjs/funcs/sandboxResourcePoliciesSet.js.map +1 -0
  11. package/dist/commonjs/lib/config.d.ts +2 -2
  12. package/dist/commonjs/lib/config.js +2 -2
  13. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  14. package/dist/commonjs/mcp-server/server.js +5 -5
  15. package/dist/commonjs/mcp-server/server.js.map +1 -1
  16. package/dist/commonjs/mcp-server/tools/{sessionsGetTenantResourcePolicy.d.ts → sandboxResourcePoliciesGet.d.ts} +2 -2
  17. package/dist/commonjs/mcp-server/tools/sandboxResourcePoliciesGet.d.ts.map +1 -0
  18. package/dist/commonjs/mcp-server/tools/{sessionsGetTenantResourcePolicy.js → sandboxResourcePoliciesGet.js} +9 -7
  19. package/dist/commonjs/mcp-server/tools/sandboxResourcePoliciesGet.js.map +1 -0
  20. package/dist/commonjs/mcp-server/tools/{sessionsSetTenantResourcePolicy.d.ts → sandboxResourcePoliciesSet.d.ts} +2 -2
  21. package/dist/commonjs/mcp-server/tools/sandboxResourcePoliciesSet.d.ts.map +1 -0
  22. package/dist/commonjs/mcp-server/tools/{sessionsSetTenantResourcePolicy.js → sandboxResourcePoliciesSet.js} +9 -7
  23. package/dist/commonjs/mcp-server/tools/sandboxResourcePoliciesSet.js.map +1 -0
  24. package/dist/commonjs/models/components/websearchfilters.d.ts +3 -0
  25. package/dist/commonjs/models/components/websearchfilters.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/websearchfilters.js.map +1 -1
  27. package/dist/commonjs/models/components/websearchpreviewtooldefinition.d.ts +5 -0
  28. package/dist/commonjs/models/components/websearchpreviewtooldefinition.d.ts.map +1 -1
  29. package/dist/commonjs/models/components/websearchpreviewtooldefinition.js +2 -0
  30. package/dist/commonjs/models/components/websearchpreviewtooldefinition.js.map +1 -1
  31. package/dist/commonjs/react-query/index.d.ts +2 -2
  32. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  33. package/dist/commonjs/react-query/index.js +2 -2
  34. package/dist/commonjs/react-query/index.js.map +1 -1
  35. package/dist/commonjs/react-query/sandboxResourcePoliciesGet.core.d.ts +17 -0
  36. package/dist/commonjs/react-query/sandboxResourcePoliciesGet.core.d.ts.map +1 -0
  37. package/dist/commonjs/react-query/sandboxResourcePoliciesGet.core.js +38 -0
  38. package/dist/commonjs/react-query/sandboxResourcePoliciesGet.core.js.map +1 -0
  39. package/dist/commonjs/react-query/sandboxResourcePoliciesGet.d.ts +43 -0
  40. package/dist/commonjs/react-query/sandboxResourcePoliciesGet.d.ts.map +1 -0
  41. package/dist/commonjs/react-query/sandboxResourcePoliciesGet.js +60 -0
  42. package/dist/commonjs/react-query/sandboxResourcePoliciesGet.js.map +1 -0
  43. package/dist/commonjs/react-query/sandboxResourcePoliciesSet.d.ts +30 -0
  44. package/dist/commonjs/react-query/sandboxResourcePoliciesSet.d.ts.map +1 -0
  45. package/dist/commonjs/react-query/sandboxResourcePoliciesSet.js +47 -0
  46. package/dist/commonjs/react-query/sandboxResourcePoliciesSet.js.map +1 -0
  47. package/dist/commonjs/sdk/resourcepolicies.d.ts +20 -0
  48. package/dist/commonjs/sdk/resourcepolicies.d.ts.map +1 -0
  49. package/dist/commonjs/sdk/resourcepolicies.js +32 -0
  50. package/dist/commonjs/sdk/resourcepolicies.js.map +1 -0
  51. package/dist/commonjs/sdk/sandbox.d.ts +3 -0
  52. package/dist/commonjs/sdk/sandbox.d.ts.map +1 -1
  53. package/dist/commonjs/sdk/sandbox.js +4 -0
  54. package/dist/commonjs/sdk/sandbox.js.map +1 -1
  55. package/dist/commonjs/sdk/sdk.d.ts +0 -3
  56. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  57. package/dist/commonjs/sdk/sdk.js +0 -4
  58. package/dist/commonjs/sdk/sdk.js.map +1 -1
  59. package/dist/{commonjs/funcs/sessionsSetTenantResourcePolicy.d.ts → esm/funcs/sandboxResourcePoliciesGet.d.ts} +6 -3
  60. package/dist/esm/funcs/sandboxResourcePoliciesGet.d.ts.map +1 -0
  61. package/dist/esm/funcs/{sessionsGetTenantResourcePolicy.js → sandboxResourcePoliciesGet.js} +6 -3
  62. package/dist/esm/funcs/sandboxResourcePoliciesGet.js.map +1 -0
  63. package/dist/esm/funcs/{sessionsSetTenantResourcePolicy.d.ts → sandboxResourcePoliciesSet.d.ts} +6 -3
  64. package/dist/esm/funcs/sandboxResourcePoliciesSet.d.ts.map +1 -0
  65. package/dist/esm/funcs/{sessionsSetTenantResourcePolicy.js → sandboxResourcePoliciesSet.js} +6 -3
  66. package/dist/esm/funcs/sandboxResourcePoliciesSet.js.map +1 -0
  67. package/dist/esm/lib/config.d.ts +2 -2
  68. package/dist/esm/lib/config.js +2 -2
  69. package/dist/esm/mcp-server/mcp-server.js +1 -1
  70. package/dist/esm/mcp-server/server.js +5 -5
  71. package/dist/esm/mcp-server/server.js.map +1 -1
  72. package/dist/esm/mcp-server/tools/{sessionsGetTenantResourcePolicy.d.ts → sandboxResourcePoliciesGet.d.ts} +2 -2
  73. package/dist/esm/mcp-server/tools/sandboxResourcePoliciesGet.d.ts.map +1 -0
  74. package/dist/esm/mcp-server/tools/{sessionsGetTenantResourcePolicy.js → sandboxResourcePoliciesGet.js} +8 -6
  75. package/dist/esm/mcp-server/tools/sandboxResourcePoliciesGet.js.map +1 -0
  76. package/dist/esm/mcp-server/tools/{sessionsSetTenantResourcePolicy.d.ts → sandboxResourcePoliciesSet.d.ts} +2 -2
  77. package/dist/esm/mcp-server/tools/sandboxResourcePoliciesSet.d.ts.map +1 -0
  78. package/dist/esm/mcp-server/tools/{sessionsSetTenantResourcePolicy.js → sandboxResourcePoliciesSet.js} +8 -6
  79. package/dist/esm/mcp-server/tools/sandboxResourcePoliciesSet.js.map +1 -0
  80. package/dist/esm/models/components/websearchfilters.d.ts +3 -0
  81. package/dist/esm/models/components/websearchfilters.d.ts.map +1 -1
  82. package/dist/esm/models/components/websearchfilters.js.map +1 -1
  83. package/dist/esm/models/components/websearchpreviewtooldefinition.d.ts +5 -0
  84. package/dist/esm/models/components/websearchpreviewtooldefinition.d.ts.map +1 -1
  85. package/dist/esm/models/components/websearchpreviewtooldefinition.js +2 -0
  86. package/dist/esm/models/components/websearchpreviewtooldefinition.js.map +1 -1
  87. package/dist/esm/react-query/index.d.ts +2 -2
  88. package/dist/esm/react-query/index.d.ts.map +1 -1
  89. package/dist/esm/react-query/index.js +2 -2
  90. package/dist/esm/react-query/index.js.map +1 -1
  91. package/dist/esm/react-query/sandboxResourcePoliciesGet.core.d.ts +17 -0
  92. package/dist/esm/react-query/sandboxResourcePoliciesGet.core.d.ts.map +1 -0
  93. package/dist/esm/react-query/sandboxResourcePoliciesGet.core.js +33 -0
  94. package/dist/esm/react-query/sandboxResourcePoliciesGet.core.js.map +1 -0
  95. package/dist/esm/react-query/sandboxResourcePoliciesGet.d.ts +43 -0
  96. package/dist/esm/react-query/sandboxResourcePoliciesGet.d.ts.map +1 -0
  97. package/dist/esm/react-query/sandboxResourcePoliciesGet.js +50 -0
  98. package/dist/esm/react-query/sandboxResourcePoliciesGet.js.map +1 -0
  99. package/dist/esm/react-query/sandboxResourcePoliciesSet.d.ts +30 -0
  100. package/dist/esm/react-query/sandboxResourcePoliciesSet.d.ts.map +1 -0
  101. package/dist/esm/react-query/sandboxResourcePoliciesSet.js +42 -0
  102. package/dist/esm/react-query/sandboxResourcePoliciesSet.js.map +1 -0
  103. package/dist/esm/sdk/resourcepolicies.d.ts +20 -0
  104. package/dist/esm/sdk/resourcepolicies.d.ts.map +1 -0
  105. package/dist/esm/sdk/resourcepolicies.js +28 -0
  106. package/dist/esm/sdk/resourcepolicies.js.map +1 -0
  107. package/dist/esm/sdk/sandbox.d.ts +3 -0
  108. package/dist/esm/sdk/sandbox.d.ts.map +1 -1
  109. package/dist/esm/sdk/sandbox.js +4 -0
  110. package/dist/esm/sdk/sandbox.js.map +1 -1
  111. package/dist/esm/sdk/sdk.d.ts +0 -3
  112. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  113. package/dist/esm/sdk/sdk.js +0 -4
  114. package/dist/esm/sdk/sdk.js.map +1 -1
  115. package/jsr.json +1 -1
  116. package/package.json +1 -1
  117. package/src/funcs/{sessionsGetTenantResourcePolicy.ts → sandboxResourcePoliciesGet.ts} +5 -2
  118. package/src/funcs/{sessionsSetTenantResourcePolicy.ts → sandboxResourcePoliciesSet.ts} +5 -2
  119. package/src/lib/config.ts +2 -2
  120. package/src/mcp-server/mcp-server.ts +1 -1
  121. package/src/mcp-server/server.ts +5 -5
  122. package/src/mcp-server/tools/sandboxResourcePoliciesGet.ts +37 -0
  123. package/src/mcp-server/tools/sandboxResourcePoliciesSet.ts +37 -0
  124. package/src/models/components/websearchfilters.ts +3 -0
  125. package/src/models/components/websearchpreviewtooldefinition.ts +7 -0
  126. package/src/react-query/index.ts +2 -2
  127. package/src/react-query/{sessionsGetTenantResourcePolicy.core.ts → sandboxResourcePoliciesGet.core.ts} +12 -18
  128. package/src/react-query/{sessionsGetTenantResourcePolicy.ts → sandboxResourcePoliciesGet.ts} +39 -41
  129. package/src/react-query/{sessionsSetTenantResourcePolicy.ts → sandboxResourcePoliciesSet.ts} +25 -22
  130. package/src/sdk/{sessions.ts → resourcepolicies.ts} +15 -9
  131. package/src/sdk/sandbox.ts +6 -0
  132. package/src/sdk/sdk.ts +0 -6
  133. package/dist/commonjs/funcs/sessionsGetTenantResourcePolicy.d.ts.map +0 -1
  134. package/dist/commonjs/funcs/sessionsGetTenantResourcePolicy.js.map +0 -1
  135. package/dist/commonjs/funcs/sessionsSetTenantResourcePolicy.d.ts.map +0 -1
  136. package/dist/commonjs/funcs/sessionsSetTenantResourcePolicy.js.map +0 -1
  137. package/dist/commonjs/mcp-server/tools/sessionsGetTenantResourcePolicy.d.ts.map +0 -1
  138. package/dist/commonjs/mcp-server/tools/sessionsGetTenantResourcePolicy.js.map +0 -1
  139. package/dist/commonjs/mcp-server/tools/sessionsSetTenantResourcePolicy.d.ts.map +0 -1
  140. package/dist/commonjs/mcp-server/tools/sessionsSetTenantResourcePolicy.js.map +0 -1
  141. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.core.d.ts +0 -17
  142. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.core.d.ts.map +0 -1
  143. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.core.js +0 -44
  144. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.core.js.map +0 -1
  145. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.d.ts +0 -37
  146. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.d.ts.map +0 -1
  147. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.js +0 -59
  148. package/dist/commonjs/react-query/sessionsGetTenantResourcePolicy.js.map +0 -1
  149. package/dist/commonjs/react-query/sessionsSetTenantResourcePolicy.d.ts +0 -27
  150. package/dist/commonjs/react-query/sessionsSetTenantResourcePolicy.d.ts.map +0 -1
  151. package/dist/commonjs/react-query/sessionsSetTenantResourcePolicy.js +0 -44
  152. package/dist/commonjs/react-query/sessionsSetTenantResourcePolicy.js.map +0 -1
  153. package/dist/commonjs/sdk/sessions.d.ts +0 -14
  154. package/dist/commonjs/sdk/sessions.d.ts.map +0 -1
  155. package/dist/commonjs/sdk/sessions.js +0 -26
  156. package/dist/commonjs/sdk/sessions.js.map +0 -1
  157. package/dist/esm/funcs/sessionsGetTenantResourcePolicy.d.ts.map +0 -1
  158. package/dist/esm/funcs/sessionsGetTenantResourcePolicy.js.map +0 -1
  159. package/dist/esm/funcs/sessionsSetTenantResourcePolicy.d.ts.map +0 -1
  160. package/dist/esm/funcs/sessionsSetTenantResourcePolicy.js.map +0 -1
  161. package/dist/esm/mcp-server/tools/sessionsGetTenantResourcePolicy.d.ts.map +0 -1
  162. package/dist/esm/mcp-server/tools/sessionsGetTenantResourcePolicy.js.map +0 -1
  163. package/dist/esm/mcp-server/tools/sessionsSetTenantResourcePolicy.d.ts.map +0 -1
  164. package/dist/esm/mcp-server/tools/sessionsSetTenantResourcePolicy.js.map +0 -1
  165. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.core.d.ts +0 -17
  166. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.core.d.ts.map +0 -1
  167. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.core.js +0 -39
  168. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.core.js.map +0 -1
  169. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.d.ts +0 -37
  170. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.d.ts.map +0 -1
  171. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.js +0 -49
  172. package/dist/esm/react-query/sessionsGetTenantResourcePolicy.js.map +0 -1
  173. package/dist/esm/react-query/sessionsSetTenantResourcePolicy.d.ts +0 -27
  174. package/dist/esm/react-query/sessionsSetTenantResourcePolicy.d.ts.map +0 -1
  175. package/dist/esm/react-query/sessionsSetTenantResourcePolicy.js +0 -39
  176. package/dist/esm/react-query/sessionsSetTenantResourcePolicy.js.map +0 -1
  177. package/dist/esm/sdk/sessions.d.ts +0 -14
  178. package/dist/esm/sdk/sessions.d.ts.map +0 -1
  179. package/dist/esm/sdk/sessions.js +0 -22
  180. package/dist/esm/sdk/sessions.js.map +0 -1
  181. package/src/mcp-server/tools/sessionsGetTenantResourcePolicy.ts +0 -36
  182. package/src/mcp-server/tools/sessionsSetTenantResourcePolicy.ts +0 -36
package/bin/mcp-server.js CHANGED
@@ -72094,9 +72094,9 @@ var init_config = __esm(() => {
72094
72094
  SDK_METADATA = {
72095
72095
  language: "typescript",
72096
72096
  openapiDocVersion: "1.1.0",
72097
- sdkVersion: "0.55.30",
72097
+ sdkVersion: "0.55.32",
72098
72098
  genVersion: "2.950.2",
72099
- userAgent: "speakeasy-sdk/typescript 0.55.30 2.950.2 1.1.0 @meetkai/mka1"
72099
+ userAgent: "speakeasy-sdk/typescript 0.55.32 2.950.2 1.1.0 @meetkai/mka1"
72100
72100
  };
72101
72101
  });
72102
72102
 
@@ -100622,7 +100622,8 @@ var init_websearchpreviewtooldefinition = __esm(() => {
100622
100622
  WebSearchPreviewToolDefinition$inboundSchema = objectType({
100623
100623
  type: WebSearchPreviewToolDefinitionType$inboundSchema,
100624
100624
  search_context_size: WebSearchPreviewToolDefinitionSearchContextSize$inboundSchema.optional(),
100625
- user_location: UserLocation$inboundSchema.optional()
100625
+ user_location: UserLocation$inboundSchema.optional(),
100626
+ filters: anyType().optional()
100626
100627
  }).transform((v2) => {
100627
100628
  return remap(v2, {
100628
100629
  search_context_size: "searchContextSize",
@@ -100632,7 +100633,8 @@ var init_websearchpreviewtooldefinition = __esm(() => {
100632
100633
  WebSearchPreviewToolDefinition$outboundSchema = objectType({
100633
100634
  type: WebSearchPreviewToolDefinitionType$outboundSchema,
100634
100635
  searchContextSize: WebSearchPreviewToolDefinitionSearchContextSize$outboundSchema.optional(),
100635
- userLocation: UserLocation$outboundSchema.optional()
100636
+ userLocation: UserLocation$outboundSchema.optional(),
100637
+ filters: anyType().optional()
100636
100638
  }).transform((v2) => {
100637
100639
  return remap(v2, {
100638
100640
  searchContextSize: "search_context_size",
@@ -205745,26 +205747,29 @@ Proxy an HTTP request to an exposed browser-session port through the gateway. Us
205745
205747
  };
205746
205748
  });
205747
205749
 
205748
- // src/funcs/sandboxRunCode.ts
205749
- function sandboxRunCode(client, request, options) {
205750
+ // src/funcs/sandboxResourcePoliciesGet.ts
205751
+ function sandboxResourcePoliciesGet(client, request, options) {
205750
205752
  return new APIPromise($do473(client, request, options));
205751
205753
  }
205752
205754
  async function $do473(client, request, options) {
205753
- const parsed = safeParse6(request, (value) => RunCodeRequest$outboundSchema.parse(value), "Input validation failed");
205755
+ const parsed = safeParse6(request, (value) => GetTenantResourcePolicyRequest$outboundSchema.parse(value), "Input validation failed");
205754
205756
  if (!parsed.ok) {
205755
205757
  return [parsed, { status: "invalid" }];
205756
205758
  }
205757
205759
  const payload = parsed.value;
205758
- const body = encodeJSON("body", payload.CodeRequest, { explode: true });
205760
+ const body = null;
205759
205761
  const pathParams = {
205760
- session_id: encodeSimple("session_id", payload.session_id, {
205762
+ scope: encodeSimple("scope", payload.scope, {
205761
205763
  explode: false,
205762
205764
  charEncoding: "percent"
205763
205765
  })
205764
205766
  };
205765
- const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/code")(pathParams);
205767
+ const path = pathToFunc("/api/v1/sandbox/resource-policy/{scope}")(pathParams);
205768
+ const query = encodeFormQuery({
205769
+ expected_organization_id: payload.expected_organization_id,
205770
+ expected_team_id: payload.expected_team_id
205771
+ });
205766
205772
  const headers = new Headers(compactMap({
205767
- "Content-Type": "application/json",
205768
205773
  Accept: "application/json",
205769
205774
  "X-On-Behalf-Of": encodeSimple("X-On-Behalf-Of", payload["X-On-Behalf-Of"], { explode: false, charEncoding: "none" })
205770
205775
  }));
@@ -205774,7 +205779,7 @@ async function $do473(client, request, options) {
205774
205779
  const context = {
205775
205780
  options: client._options,
205776
205781
  baseURL: options?.serverURL ?? client._baseURL ?? "",
205777
- operationID: "runCode",
205782
+ operationID: "getTenantResourcePolicy",
205778
205783
  oAuth2Scopes: null,
205779
205784
  resolvedSecurity: requestSecurity,
205780
205785
  securitySource: client._options.bearerAuth,
@@ -205792,10 +205797,11 @@ async function $do473(client, request, options) {
205792
205797
  };
205793
205798
  const requestRes = client._createRequest(context, {
205794
205799
  security: requestSecurity,
205795
- method: "POST",
205800
+ method: "GET",
205796
205801
  baseURL: options?.serverURL,
205797
205802
  path,
205798
205803
  headers,
205804
+ query,
205799
205805
  body,
205800
205806
  userAgent: client._options.userAgent,
205801
205807
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
@@ -205817,13 +205823,13 @@ async function $do473(client, request, options) {
205817
205823
  const responseFields = {
205818
205824
  HttpMeta: { Response: response, Request: req }
205819
205825
  };
205820
- const [result] = await match(json(200, CodeResult$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
205826
+ const [result] = await match(json(200, TenantResourcePolicy$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
205821
205827
  if (!result.ok) {
205822
205828
  return [result, { status: "complete", request: req, response }];
205823
205829
  }
205824
205830
  return [result, { status: "complete", request: req, response }];
205825
205831
  }
205826
- var init_sandboxRunCode = __esm(() => {
205832
+ var init_sandboxResourcePoliciesGet = __esm(() => {
205827
205833
  init_encodings();
205828
205834
  init_http();
205829
205835
  init_matchers();
@@ -205837,23 +205843,23 @@ var init_sandboxRunCode = __esm(() => {
205837
205843
  init_async();
205838
205844
  });
205839
205845
 
205840
- // src/mcp-server/tools/sandboxRunCode.ts
205841
- var args461, tool$sandboxRunCode;
205842
- var init_sandboxRunCode2 = __esm(() => {
205843
- init_sandboxRunCode();
205846
+ // src/mcp-server/tools/sandboxResourcePoliciesGet.ts
205847
+ var args461, tool$sandboxResourcePoliciesGet;
205848
+ var init_sandboxResourcePoliciesGet2 = __esm(() => {
205849
+ init_sandboxResourcePoliciesGet();
205844
205850
  init_operations();
205845
205851
  init_tools();
205846
205852
  args461 = {
205847
- request: RunCodeRequest$inboundSchema
205853
+ request: GetTenantResourcePolicyRequest$inboundSchema
205848
205854
  };
205849
- tool$sandboxRunCode = {
205850
- name: "sandbox-run-code",
205851
- description: `Run Code
205855
+ tool$sandboxResourcePoliciesGet = {
205856
+ name: "sandbox-resource-policies-get",
205857
+ description: `Get Tenant Resource Policy
205852
205858
 
205853
- Execute source code in the session workspace using a supported runtime and return the execution result.`,
205859
+ Read organization or team resource limits for standard sandbox sessions.`,
205854
205860
  args: args461,
205855
205861
  tool: async (client, args462, ctx) => {
205856
- const [result, apiCall] = await sandboxRunCode(client, args462.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
205862
+ const [result, apiCall] = await sandboxResourcePoliciesGet(client, args462.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
205857
205863
  if (!result.ok) {
205858
205864
  return {
205859
205865
  content: [{ type: "text", text: result.error.message }],
@@ -205866,24 +205872,30 @@ Execute source code in the session workspace using a supported runtime and retur
205866
205872
  };
205867
205873
  });
205868
205874
 
205869
- // src/funcs/sandboxRunCommand.ts
205870
- function sandboxRunCommand(client, request, options) {
205875
+ // src/funcs/sandboxResourcePoliciesSet.ts
205876
+ function sandboxResourcePoliciesSet(client, request, options) {
205871
205877
  return new APIPromise($do474(client, request, options));
205872
205878
  }
205873
205879
  async function $do474(client, request, options) {
205874
- const parsed = safeParse6(request, (value) => RunCommandRequest$outboundSchema.parse(value), "Input validation failed");
205880
+ const parsed = safeParse6(request, (value) => SetTenantResourcePolicyRequest$outboundSchema.parse(value), "Input validation failed");
205875
205881
  if (!parsed.ok) {
205876
205882
  return [parsed, { status: "invalid" }];
205877
205883
  }
205878
205884
  const payload = parsed.value;
205879
- const body = encodeJSON("body", payload.CommandRequest, { explode: true });
205885
+ const body = encodeJSON("body", payload.SaveTenantResourcePolicy, {
205886
+ explode: true
205887
+ });
205880
205888
  const pathParams = {
205881
- session_id: encodeSimple("session_id", payload.session_id, {
205889
+ scope: encodeSimple("scope", payload.scope, {
205882
205890
  explode: false,
205883
205891
  charEncoding: "percent"
205884
205892
  })
205885
205893
  };
205886
- const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/commands")(pathParams);
205894
+ const path = pathToFunc("/api/v1/sandbox/resource-policy/{scope}")(pathParams);
205895
+ const query = encodeFormQuery({
205896
+ expected_organization_id: payload.expected_organization_id,
205897
+ expected_team_id: payload.expected_team_id
205898
+ });
205887
205899
  const headers = new Headers(compactMap({
205888
205900
  "Content-Type": "application/json",
205889
205901
  Accept: "application/json",
@@ -205895,7 +205907,7 @@ async function $do474(client, request, options) {
205895
205907
  const context = {
205896
205908
  options: client._options,
205897
205909
  baseURL: options?.serverURL ?? client._baseURL ?? "",
205898
- operationID: "runCommand",
205910
+ operationID: "setTenantResourcePolicy",
205899
205911
  oAuth2Scopes: null,
205900
205912
  resolvedSecurity: requestSecurity,
205901
205913
  securitySource: client._options.bearerAuth,
@@ -205913,10 +205925,11 @@ async function $do474(client, request, options) {
205913
205925
  };
205914
205926
  const requestRes = client._createRequest(context, {
205915
205927
  security: requestSecurity,
205916
- method: "POST",
205928
+ method: "PUT",
205917
205929
  baseURL: options?.serverURL,
205918
205930
  path,
205919
205931
  headers,
205932
+ query,
205920
205933
  body,
205921
205934
  userAgent: client._options.userAgent,
205922
205935
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
@@ -205938,13 +205951,13 @@ async function $do474(client, request, options) {
205938
205951
  const responseFields = {
205939
205952
  HttpMeta: { Response: response, Request: req }
205940
205953
  };
205941
- const [result] = await match(json(200, CommandResult$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
205954
+ const [result] = await match(json(200, TenantResourcePolicy$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
205942
205955
  if (!result.ok) {
205943
205956
  return [result, { status: "complete", request: req, response }];
205944
205957
  }
205945
205958
  return [result, { status: "complete", request: req, response }];
205946
205959
  }
205947
- var init_sandboxRunCommand = __esm(() => {
205960
+ var init_sandboxResourcePoliciesSet = __esm(() => {
205948
205961
  init_encodings();
205949
205962
  init_http();
205950
205963
  init_matchers();
@@ -205958,23 +205971,23 @@ var init_sandboxRunCommand = __esm(() => {
205958
205971
  init_async();
205959
205972
  });
205960
205973
 
205961
- // src/mcp-server/tools/sandboxRunCommand.ts
205962
- var args462, tool$sandboxRunCommand;
205963
- var init_sandboxRunCommand2 = __esm(() => {
205964
- init_sandboxRunCommand();
205974
+ // src/mcp-server/tools/sandboxResourcePoliciesSet.ts
205975
+ var args462, tool$sandboxResourcePoliciesSet;
205976
+ var init_sandboxResourcePoliciesSet2 = __esm(() => {
205977
+ init_sandboxResourcePoliciesSet();
205965
205978
  init_operations();
205966
205979
  init_tools();
205967
205980
  args462 = {
205968
- request: RunCommandRequest$inboundSchema
205981
+ request: SetTenantResourcePolicyRequest$inboundSchema
205969
205982
  };
205970
- tool$sandboxRunCommand = {
205971
- name: "sandbox-run-command",
205972
- description: `Run Command
205983
+ tool$sandboxResourcePoliciesSet = {
205984
+ name: "sandbox-resource-policies-set",
205985
+ description: `Set Tenant Resource Policy
205973
205986
 
205974
- Run a command in the session workspace and return stdout, stderr, exit code, and changed files.`,
205987
+ Update organization or team resource limits for standard sandbox sessions. The expected revision rejects stale writes.`,
205975
205988
  args: args462,
205976
205989
  tool: async (client, args463, ctx) => {
205977
- const [result, apiCall] = await sandboxRunCommand(client, args463.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
205990
+ const [result, apiCall] = await sandboxResourcePoliciesSet(client, args463.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
205978
205991
  if (!result.ok) {
205979
205992
  return {
205980
205993
  content: [{ type: "text", text: result.error.message }],
@@ -205987,21 +206000,28 @@ Run a command in the session workspace and return stdout, stderr, exit code, and
205987
206000
  };
205988
206001
  });
205989
206002
 
205990
- // src/funcs/sandboxSetPricing.ts
205991
- function sandboxSetPricing(client, request, options) {
206003
+ // src/funcs/sandboxRunCode.ts
206004
+ function sandboxRunCode(client, request, options) {
205992
206005
  return new APIPromise($do475(client, request, options));
205993
206006
  }
205994
206007
  async function $do475(client, request, options) {
205995
- const parsed = safeParse6(request, (value) => SandboxPricingUpdate$outboundSchema.parse(value), "Input validation failed");
206008
+ const parsed = safeParse6(request, (value) => RunCodeRequest$outboundSchema.parse(value), "Input validation failed");
205996
206009
  if (!parsed.ok) {
205997
206010
  return [parsed, { status: "invalid" }];
205998
206011
  }
205999
206012
  const payload = parsed.value;
206000
- const body = encodeJSON("body", payload, { explode: true });
206001
- const path = pathToFunc("/api/v1/sandbox/pricing")();
206013
+ const body = encodeJSON("body", payload.CodeRequest, { explode: true });
206014
+ const pathParams = {
206015
+ session_id: encodeSimple("session_id", payload.session_id, {
206016
+ explode: false,
206017
+ charEncoding: "percent"
206018
+ })
206019
+ };
206020
+ const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/code")(pathParams);
206002
206021
  const headers = new Headers(compactMap({
206003
206022
  "Content-Type": "application/json",
206004
- Accept: "application/json"
206023
+ Accept: "application/json",
206024
+ "X-On-Behalf-Of": encodeSimple("X-On-Behalf-Of", payload["X-On-Behalf-Of"], { explode: false, charEncoding: "none" })
206005
206025
  }));
206006
206026
  const secConfig = await extractSecurity(client._options.bearerAuth);
206007
206027
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
@@ -206009,7 +206029,7 @@ async function $do475(client, request, options) {
206009
206029
  const context = {
206010
206030
  options: client._options,
206011
206031
  baseURL: options?.serverURL ?? client._baseURL ?? "",
206012
- operationID: "setSandboxPricing",
206032
+ operationID: "runCode",
206013
206033
  oAuth2Scopes: null,
206014
206034
  resolvedSecurity: requestSecurity,
206015
206035
  securitySource: client._options.bearerAuth,
@@ -206027,7 +206047,7 @@ async function $do475(client, request, options) {
206027
206047
  };
206028
206048
  const requestRes = client._createRequest(context, {
206029
206049
  security: requestSecurity,
206030
- method: "PUT",
206050
+ method: "POST",
206031
206051
  baseURL: options?.serverURL,
206032
206052
  path,
206033
206053
  headers,
@@ -206052,13 +206072,13 @@ async function $do475(client, request, options) {
206052
206072
  const responseFields = {
206053
206073
  HttpMeta: { Response: response, Request: req }
206054
206074
  };
206055
- const [result] = await match(json(200, SandboxPricingCard$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206075
+ const [result] = await match(json(200, CodeResult$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206056
206076
  if (!result.ok) {
206057
206077
  return [result, { status: "complete", request: req, response }];
206058
206078
  }
206059
206079
  return [result, { status: "complete", request: req, response }];
206060
206080
  }
206061
- var init_sandboxSetPricing = __esm(() => {
206081
+ var init_sandboxRunCode = __esm(() => {
206062
206082
  init_encodings();
206063
206083
  init_http();
206064
206084
  init_matchers();
@@ -206068,26 +206088,27 @@ var init_sandboxSetPricing = __esm(() => {
206068
206088
  init_url();
206069
206089
  init_components();
206070
206090
  init_errors10();
206091
+ init_operations();
206071
206092
  init_async();
206072
206093
  });
206073
206094
 
206074
- // src/mcp-server/tools/sandboxSetPricing.ts
206075
- var args463, tool$sandboxSetPricing;
206076
- var init_sandboxSetPricing2 = __esm(() => {
206077
- init_sandboxSetPricing();
206078
- init_components();
206095
+ // src/mcp-server/tools/sandboxRunCode.ts
206096
+ var args463, tool$sandboxRunCode;
206097
+ var init_sandboxRunCode2 = __esm(() => {
206098
+ init_sandboxRunCode();
206099
+ init_operations();
206079
206100
  init_tools();
206080
206101
  args463 = {
206081
- request: SandboxPricingUpdate$inboundSchema
206102
+ request: RunCodeRequest$inboundSchema
206082
206103
  };
206083
- tool$sandboxSetPricing = {
206084
- name: "sandbox-set-pricing",
206085
- description: `Set Sandbox Pricing
206104
+ tool$sandboxRunCode = {
206105
+ name: "sandbox-run-code",
206106
+ description: `Run Code
206086
206107
 
206087
- Replace the sandbox pricing rate card. Full-replace semantics. Omitting a SKU that currently has a price is refused with 422 unless \`allow_unpriced\` is true: an unpriced SKU accrues no spend and its usage cannot be billed. A \`currency\` that differs from the stored one is saved only after the budgeting service accepts it as the cluster's billing currency (409 when it conflicts, 503 when it cannot be verified). Takes effect on the next meter window without a restart. Cluster admins only.`,
206108
+ Execute source code in the session workspace using a supported runtime and return the execution result.`,
206088
206109
  args: args463,
206089
206110
  tool: async (client, args464, ctx) => {
206090
- const [result, apiCall] = await sandboxSetPricing(client, args464.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206111
+ const [result, apiCall] = await sandboxRunCode(client, args464.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206091
206112
  if (!result.ok) {
206092
206113
  return {
206093
206114
  content: [{ type: "text", text: result.error.message }],
@@ -206100,26 +206121,24 @@ Replace the sandbox pricing rate card. Full-replace semantics. Omitting a SKU th
206100
206121
  };
206101
206122
  });
206102
206123
 
206103
- // src/funcs/sandboxTerminate.ts
206104
- function sandboxTerminate(client, request, options) {
206124
+ // src/funcs/sandboxRunCommand.ts
206125
+ function sandboxRunCommand(client, request, options) {
206105
206126
  return new APIPromise($do476(client, request, options));
206106
206127
  }
206107
206128
  async function $do476(client, request, options) {
206108
- const parsed = safeParse6(request, (value) => TerminateSessionRequest$outboundSchema2.parse(value), "Input validation failed");
206129
+ const parsed = safeParse6(request, (value) => RunCommandRequest$outboundSchema.parse(value), "Input validation failed");
206109
206130
  if (!parsed.ok) {
206110
206131
  return [parsed, { status: "invalid" }];
206111
206132
  }
206112
206133
  const payload = parsed.value;
206113
- const body = encodeJSON("body", payload.TerminateSessionRequest, {
206114
- explode: true
206115
- });
206134
+ const body = encodeJSON("body", payload.CommandRequest, { explode: true });
206116
206135
  const pathParams = {
206117
206136
  session_id: encodeSimple("session_id", payload.session_id, {
206118
206137
  explode: false,
206119
206138
  charEncoding: "percent"
206120
206139
  })
206121
206140
  };
206122
- const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/terminate")(pathParams);
206141
+ const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/commands")(pathParams);
206123
206142
  const headers = new Headers(compactMap({
206124
206143
  "Content-Type": "application/json",
206125
206144
  Accept: "application/json",
@@ -206131,7 +206150,7 @@ async function $do476(client, request, options) {
206131
206150
  const context = {
206132
206151
  options: client._options,
206133
206152
  baseURL: options?.serverURL ?? client._baseURL ?? "",
206134
- operationID: "terminateSession",
206153
+ operationID: "runCommand",
206135
206154
  oAuth2Scopes: null,
206136
206155
  resolvedSecurity: requestSecurity,
206137
206156
  securitySource: client._options.bearerAuth,
@@ -206174,13 +206193,13 @@ async function $do476(client, request, options) {
206174
206193
  const responseFields = {
206175
206194
  HttpMeta: { Response: response, Request: req }
206176
206195
  };
206177
- const [result] = await match(json(200, TerminateSessionResponse$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206196
+ const [result] = await match(json(200, CommandResult$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206178
206197
  if (!result.ok) {
206179
206198
  return [result, { status: "complete", request: req, response }];
206180
206199
  }
206181
206200
  return [result, { status: "complete", request: req, response }];
206182
206201
  }
206183
- var init_sandboxTerminate = __esm(() => {
206202
+ var init_sandboxRunCommand = __esm(() => {
206184
206203
  init_encodings();
206185
206204
  init_http();
206186
206205
  init_matchers();
@@ -206194,23 +206213,23 @@ var init_sandboxTerminate = __esm(() => {
206194
206213
  init_async();
206195
206214
  });
206196
206215
 
206197
- // src/mcp-server/tools/sandboxTerminate.ts
206198
- var args464, tool$sandboxTerminate;
206199
- var init_sandboxTerminate2 = __esm(() => {
206200
- init_sandboxTerminate();
206216
+ // src/mcp-server/tools/sandboxRunCommand.ts
206217
+ var args464, tool$sandboxRunCommand;
206218
+ var init_sandboxRunCommand2 = __esm(() => {
206219
+ init_sandboxRunCommand();
206201
206220
  init_operations();
206202
206221
  init_tools();
206203
206222
  args464 = {
206204
- request: TerminateSessionRequest$inboundSchema2
206223
+ request: RunCommandRequest$inboundSchema
206205
206224
  };
206206
- tool$sandboxTerminate = {
206207
- name: "sandbox-terminate",
206208
- description: `Terminate Session
206225
+ tool$sandboxRunCommand = {
206226
+ name: "sandbox-run-command",
206227
+ description: `Run Command
206209
206228
 
206210
- Stop a sandbox session and release the backing sandbox resources.`,
206229
+ Run a command in the session workspace and return stdout, stderr, exit code, and changed files.`,
206211
206230
  args: args464,
206212
206231
  tool: async (client, args465, ctx) => {
206213
- const [result, apiCall] = await sandboxTerminate(client, args465.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206232
+ const [result, apiCall] = await sandboxRunCommand(client, args465.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206214
206233
  if (!result.ok) {
206215
206234
  return {
206216
206235
  content: [{ type: "text", text: result.error.message }],
@@ -206223,31 +206242,21 @@ Stop a sandbox session and release the backing sandbox resources.`,
206223
206242
  };
206224
206243
  });
206225
206244
 
206226
- // src/funcs/sandboxUploadArchive.ts
206227
- function sandboxUploadArchive(client, request, options) {
206245
+ // src/funcs/sandboxSetPricing.ts
206246
+ function sandboxSetPricing(client, request, options) {
206228
206247
  return new APIPromise($do477(client, request, options));
206229
206248
  }
206230
206249
  async function $do477(client, request, options) {
206231
- const parsed = safeParse6(request, (value) => UploadWorkspaceArchiveRequest$outboundSchema.parse(value), "Input validation failed");
206250
+ const parsed = safeParse6(request, (value) => SandboxPricingUpdate$outboundSchema.parse(value), "Input validation failed");
206232
206251
  if (!parsed.ok) {
206233
206252
  return [parsed, { status: "invalid" }];
206234
206253
  }
206235
206254
  const payload = parsed.value;
206236
- const body = payload.RequestBody instanceof Uint8Array ? new Uint8Array(payload.RequestBody).buffer : payload.RequestBody;
206237
- const pathParams = {
206238
- session_id: encodeSimple("session_id", payload.session_id, {
206239
- explode: false,
206240
- charEncoding: "percent"
206241
- })
206242
- };
206243
- const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/workspace/archive")(pathParams);
206244
- const query = encodeFormQuery({
206245
- session_token: payload.session_token
206246
- });
206255
+ const body = encodeJSON("body", payload, { explode: true });
206256
+ const path = pathToFunc("/api/v1/sandbox/pricing")();
206247
206257
  const headers = new Headers(compactMap({
206248
- "Content-Type": "application/zip",
206249
- Accept: "application/json",
206250
- "X-On-Behalf-Of": encodeSimple("X-On-Behalf-Of", payload["X-On-Behalf-Of"], { explode: false, charEncoding: "none" })
206258
+ "Content-Type": "application/json",
206259
+ Accept: "application/json"
206251
206260
  }));
206252
206261
  const secConfig = await extractSecurity(client._options.bearerAuth);
206253
206262
  const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
@@ -206255,7 +206264,7 @@ async function $do477(client, request, options) {
206255
206264
  const context = {
206256
206265
  options: client._options,
206257
206266
  baseURL: options?.serverURL ?? client._baseURL ?? "",
206258
- operationID: "uploadWorkspaceArchive",
206267
+ operationID: "setSandboxPricing",
206259
206268
  oAuth2Scopes: null,
206260
206269
  resolvedSecurity: requestSecurity,
206261
206270
  securitySource: client._options.bearerAuth,
@@ -206277,7 +206286,6 @@ async function $do477(client, request, options) {
206277
206286
  baseURL: options?.serverURL,
206278
206287
  path,
206279
206288
  headers,
206280
- query,
206281
206289
  body,
206282
206290
  userAgent: client._options.userAgent,
206283
206291
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
@@ -206299,14 +206307,13 @@ async function $do477(client, request, options) {
206299
206307
  const responseFields = {
206300
206308
  HttpMeta: { Response: response, Request: req }
206301
206309
  };
206302
- const [result] = await match(json(200, recordType(stringType())), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206310
+ const [result] = await match(json(200, SandboxPricingCard$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206303
206311
  if (!result.ok) {
206304
206312
  return [result, { status: "complete", request: req, response }];
206305
206313
  }
206306
206314
  return [result, { status: "complete", request: req, response }];
206307
206315
  }
206308
- var init_sandboxUploadArchive = __esm(() => {
206309
- init_v3();
206316
+ var init_sandboxSetPricing = __esm(() => {
206310
206317
  init_encodings();
206311
206318
  init_http();
206312
206319
  init_matchers();
@@ -206314,28 +206321,28 @@ var init_sandboxUploadArchive = __esm(() => {
206314
206321
  init_schemas9();
206315
206322
  init_security();
206316
206323
  init_url();
206324
+ init_components();
206317
206325
  init_errors10();
206318
- init_operations();
206319
206326
  init_async();
206320
206327
  });
206321
206328
 
206322
- // src/mcp-server/tools/sandboxUploadArchive.ts
206323
- var args465, tool$sandboxUploadArchive;
206324
- var init_sandboxUploadArchive2 = __esm(() => {
206325
- init_sandboxUploadArchive();
206326
- init_operations();
206329
+ // src/mcp-server/tools/sandboxSetPricing.ts
206330
+ var args465, tool$sandboxSetPricing;
206331
+ var init_sandboxSetPricing2 = __esm(() => {
206332
+ init_sandboxSetPricing();
206333
+ init_components();
206327
206334
  init_tools();
206328
206335
  args465 = {
206329
- request: UploadWorkspaceArchiveRequest$inboundSchema
206336
+ request: SandboxPricingUpdate$inboundSchema
206330
206337
  };
206331
- tool$sandboxUploadArchive = {
206332
- name: "sandbox-upload-archive",
206333
- description: `Upload Workspace Archive
206338
+ tool$sandboxSetPricing = {
206339
+ name: "sandbox-set-pricing",
206340
+ description: `Set Sandbox Pricing
206334
206341
 
206335
- Upload a zip archive and extract its files into the session workspace.`,
206342
+ Replace the sandbox pricing rate card. Full-replace semantics. Omitting a SKU that currently has a price is refused with 422 unless \`allow_unpriced\` is true: an unpriced SKU accrues no spend and its usage cannot be billed. A \`currency\` that differs from the stored one is saved only after the budgeting service accepts it as the cluster's billing currency (409 when it conflicts, 503 when it cannot be verified). Takes effect on the next meter window without a restart. Cluster admins only.`,
206336
206343
  args: args465,
206337
206344
  tool: async (client, args466, ctx) => {
206338
- const [result, apiCall] = await sandboxUploadArchive(client, args466.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206345
+ const [result, apiCall] = await sandboxSetPricing(client, args466.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206339
206346
  if (!result.ok) {
206340
206347
  return {
206341
206348
  content: [{ type: "text", text: result.error.message }],
@@ -206348,33 +206355,28 @@ Upload a zip archive and extract its files into the session workspace.`,
206348
206355
  };
206349
206356
  });
206350
206357
 
206351
- // src/funcs/sandboxUploadFile.ts
206352
- function sandboxUploadFile(client, request, options) {
206358
+ // src/funcs/sandboxTerminate.ts
206359
+ function sandboxTerminate(client, request, options) {
206353
206360
  return new APIPromise($do478(client, request, options));
206354
206361
  }
206355
206362
  async function $do478(client, request, options) {
206356
- const parsed = safeParse6(request, (value) => UploadWorkspaceFileRequest$outboundSchema.parse(value), "Input validation failed");
206363
+ const parsed = safeParse6(request, (value) => TerminateSessionRequest$outboundSchema2.parse(value), "Input validation failed");
206357
206364
  if (!parsed.ok) {
206358
206365
  return [parsed, { status: "invalid" }];
206359
206366
  }
206360
206367
  const payload = parsed.value;
206361
- const body = payload.RequestBody instanceof Uint8Array ? new Uint8Array(payload.RequestBody).buffer : payload.RequestBody;
206368
+ const body = encodeJSON("body", payload.TerminateSessionRequest, {
206369
+ explode: true
206370
+ });
206362
206371
  const pathParams = {
206363
- file_path: encodeSimple("file_path", payload.file_path, {
206364
- explode: false,
206365
- charEncoding: "percent"
206366
- }),
206367
206372
  session_id: encodeSimple("session_id", payload.session_id, {
206368
206373
  explode: false,
206369
206374
  charEncoding: "percent"
206370
206375
  })
206371
206376
  };
206372
- const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/workspace/files/{file_path}")(pathParams);
206373
- const query = encodeFormQuery({
206374
- session_token: payload.session_token
206375
- });
206377
+ const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/terminate")(pathParams);
206376
206378
  const headers = new Headers(compactMap({
206377
- "Content-Type": "application/octet-stream",
206379
+ "Content-Type": "application/json",
206378
206380
  Accept: "application/json",
206379
206381
  "X-On-Behalf-Of": encodeSimple("X-On-Behalf-Of", payload["X-On-Behalf-Of"], { explode: false, charEncoding: "none" })
206380
206382
  }));
@@ -206384,7 +206386,7 @@ async function $do478(client, request, options) {
206384
206386
  const context = {
206385
206387
  options: client._options,
206386
206388
  baseURL: options?.serverURL ?? client._baseURL ?? "",
206387
- operationID: "uploadWorkspaceFile",
206389
+ operationID: "terminateSession",
206388
206390
  oAuth2Scopes: null,
206389
206391
  resolvedSecurity: requestSecurity,
206390
206392
  securitySource: client._options.bearerAuth,
@@ -206402,11 +206404,10 @@ async function $do478(client, request, options) {
206402
206404
  };
206403
206405
  const requestRes = client._createRequest(context, {
206404
206406
  security: requestSecurity,
206405
- method: "PUT",
206407
+ method: "POST",
206406
206408
  baseURL: options?.serverURL,
206407
206409
  path,
206408
206410
  headers,
206409
- query,
206410
206411
  body,
206411
206412
  userAgent: client._options.userAgent,
206412
206413
  timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
@@ -206428,14 +206429,13 @@ async function $do478(client, request, options) {
206428
206429
  const responseFields = {
206429
206430
  HttpMeta: { Response: response, Request: req }
206430
206431
  };
206431
- const [result] = await match(json(200, recordType(stringType())), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206432
+ const [result] = await match(json(200, TerminateSessionResponse$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206432
206433
  if (!result.ok) {
206433
206434
  return [result, { status: "complete", request: req, response }];
206434
206435
  }
206435
206436
  return [result, { status: "complete", request: req, response }];
206436
206437
  }
206437
- var init_sandboxUploadFile = __esm(() => {
206438
- init_v3();
206438
+ var init_sandboxTerminate = __esm(() => {
206439
206439
  init_encodings();
206440
206440
  init_http();
206441
206441
  init_matchers();
@@ -206443,28 +206443,29 @@ var init_sandboxUploadFile = __esm(() => {
206443
206443
  init_schemas9();
206444
206444
  init_security();
206445
206445
  init_url();
206446
+ init_components();
206446
206447
  init_errors10();
206447
206448
  init_operations();
206448
206449
  init_async();
206449
206450
  });
206450
206451
 
206451
- // src/mcp-server/tools/sandboxUploadFile.ts
206452
- var args466, tool$sandboxUploadFile;
206453
- var init_sandboxUploadFile2 = __esm(() => {
206454
- init_sandboxUploadFile();
206452
+ // src/mcp-server/tools/sandboxTerminate.ts
206453
+ var args466, tool$sandboxTerminate;
206454
+ var init_sandboxTerminate2 = __esm(() => {
206455
+ init_sandboxTerminate();
206455
206456
  init_operations();
206456
206457
  init_tools();
206457
206458
  args466 = {
206458
- request: UploadWorkspaceFileRequest$inboundSchema
206459
+ request: TerminateSessionRequest$inboundSchema2
206459
206460
  };
206460
- tool$sandboxUploadFile = {
206461
- name: "sandbox-upload-file",
206462
- description: `Upload Workspace File
206461
+ tool$sandboxTerminate = {
206462
+ name: "sandbox-terminate",
206463
+ description: `Terminate Session
206463
206464
 
206464
- Upload raw bytes into the session workspace at the given path.`,
206465
+ Stop a sandbox session and release the backing sandbox resources.`,
206465
206466
  args: args466,
206466
206467
  tool: async (client, args467, ctx) => {
206467
- const [result, apiCall] = await sandboxUploadFile(client, args467.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206468
+ const [result, apiCall] = await sandboxTerminate(client, args467.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206468
206469
  if (!result.ok) {
206469
206470
  return {
206470
206471
  content: [{ type: "text", text: result.error.message }],
@@ -206477,29 +206478,29 @@ Upload raw bytes into the session workspace at the given path.`,
206477
206478
  };
206478
206479
  });
206479
206480
 
206480
- // src/funcs/sessionsGetTenantResourcePolicy.ts
206481
- function sessionsGetTenantResourcePolicy(client, request, options) {
206481
+ // src/funcs/sandboxUploadArchive.ts
206482
+ function sandboxUploadArchive(client, request, options) {
206482
206483
  return new APIPromise($do479(client, request, options));
206483
206484
  }
206484
206485
  async function $do479(client, request, options) {
206485
- const parsed = safeParse6(request, (value) => GetTenantResourcePolicyRequest$outboundSchema.parse(value), "Input validation failed");
206486
+ const parsed = safeParse6(request, (value) => UploadWorkspaceArchiveRequest$outboundSchema.parse(value), "Input validation failed");
206486
206487
  if (!parsed.ok) {
206487
206488
  return [parsed, { status: "invalid" }];
206488
206489
  }
206489
206490
  const payload = parsed.value;
206490
- const body = null;
206491
+ const body = payload.RequestBody instanceof Uint8Array ? new Uint8Array(payload.RequestBody).buffer : payload.RequestBody;
206491
206492
  const pathParams = {
206492
- scope: encodeSimple("scope", payload.scope, {
206493
+ session_id: encodeSimple("session_id", payload.session_id, {
206493
206494
  explode: false,
206494
206495
  charEncoding: "percent"
206495
206496
  })
206496
206497
  };
206497
- const path = pathToFunc("/api/v1/sandbox/resource-policy/{scope}")(pathParams);
206498
+ const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/workspace/archive")(pathParams);
206498
206499
  const query = encodeFormQuery({
206499
- expected_organization_id: payload.expected_organization_id,
206500
- expected_team_id: payload.expected_team_id
206500
+ session_token: payload.session_token
206501
206501
  });
206502
206502
  const headers = new Headers(compactMap({
206503
+ "Content-Type": "application/zip",
206503
206504
  Accept: "application/json",
206504
206505
  "X-On-Behalf-Of": encodeSimple("X-On-Behalf-Of", payload["X-On-Behalf-Of"], { explode: false, charEncoding: "none" })
206505
206506
  }));
@@ -206509,7 +206510,7 @@ async function $do479(client, request, options) {
206509
206510
  const context = {
206510
206511
  options: client._options,
206511
206512
  baseURL: options?.serverURL ?? client._baseURL ?? "",
206512
- operationID: "getTenantResourcePolicy",
206513
+ operationID: "uploadWorkspaceArchive",
206513
206514
  oAuth2Scopes: null,
206514
206515
  resolvedSecurity: requestSecurity,
206515
206516
  securitySource: client._options.bearerAuth,
@@ -206527,7 +206528,7 @@ async function $do479(client, request, options) {
206527
206528
  };
206528
206529
  const requestRes = client._createRequest(context, {
206529
206530
  security: requestSecurity,
206530
- method: "GET",
206531
+ method: "PUT",
206531
206532
  baseURL: options?.serverURL,
206532
206533
  path,
206533
206534
  headers,
@@ -206553,13 +206554,14 @@ async function $do479(client, request, options) {
206553
206554
  const responseFields = {
206554
206555
  HttpMeta: { Response: response, Request: req }
206555
206556
  };
206556
- const [result] = await match(json(200, TenantResourcePolicy$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206557
+ const [result] = await match(json(200, recordType(stringType())), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206557
206558
  if (!result.ok) {
206558
206559
  return [result, { status: "complete", request: req, response }];
206559
206560
  }
206560
206561
  return [result, { status: "complete", request: req, response }];
206561
206562
  }
206562
- var init_sessionsGetTenantResourcePolicy = __esm(() => {
206563
+ var init_sandboxUploadArchive = __esm(() => {
206564
+ init_v3();
206563
206565
  init_encodings();
206564
206566
  init_http();
206565
206567
  init_matchers();
@@ -206567,27 +206569,28 @@ var init_sessionsGetTenantResourcePolicy = __esm(() => {
206567
206569
  init_schemas9();
206568
206570
  init_security();
206569
206571
  init_url();
206570
- init_components();
206571
206572
  init_errors10();
206572
206573
  init_operations();
206573
206574
  init_async();
206574
206575
  });
206575
206576
 
206576
- // src/mcp-server/tools/sessionsGetTenantResourcePolicy.ts
206577
- var args467, tool$sessionsGetTenantResourcePolicy;
206578
- var init_sessionsGetTenantResourcePolicy2 = __esm(() => {
206579
- init_sessionsGetTenantResourcePolicy();
206577
+ // src/mcp-server/tools/sandboxUploadArchive.ts
206578
+ var args467, tool$sandboxUploadArchive;
206579
+ var init_sandboxUploadArchive2 = __esm(() => {
206580
+ init_sandboxUploadArchive();
206580
206581
  init_operations();
206581
206582
  init_tools();
206582
206583
  args467 = {
206583
- request: GetTenantResourcePolicyRequest$inboundSchema
206584
+ request: UploadWorkspaceArchiveRequest$inboundSchema
206584
206585
  };
206585
- tool$sessionsGetTenantResourcePolicy = {
206586
- name: "sessions-get-tenant-resource-policy",
206587
- description: `Get`,
206586
+ tool$sandboxUploadArchive = {
206587
+ name: "sandbox-upload-archive",
206588
+ description: `Upload Workspace Archive
206589
+
206590
+ Upload a zip archive and extract its files into the session workspace.`,
206588
206591
  args: args467,
206589
206592
  tool: async (client, args468, ctx) => {
206590
- const [result, apiCall] = await sessionsGetTenantResourcePolicy(client, args468.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206593
+ const [result, apiCall] = await sandboxUploadArchive(client, args468.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206591
206594
  if (!result.ok) {
206592
206595
  return {
206593
206596
  content: [{ type: "text", text: result.error.message }],
@@ -206600,32 +206603,33 @@ var init_sessionsGetTenantResourcePolicy2 = __esm(() => {
206600
206603
  };
206601
206604
  });
206602
206605
 
206603
- // src/funcs/sessionsSetTenantResourcePolicy.ts
206604
- function sessionsSetTenantResourcePolicy(client, request, options) {
206606
+ // src/funcs/sandboxUploadFile.ts
206607
+ function sandboxUploadFile(client, request, options) {
206605
206608
  return new APIPromise($do480(client, request, options));
206606
206609
  }
206607
206610
  async function $do480(client, request, options) {
206608
- const parsed = safeParse6(request, (value) => SetTenantResourcePolicyRequest$outboundSchema.parse(value), "Input validation failed");
206611
+ const parsed = safeParse6(request, (value) => UploadWorkspaceFileRequest$outboundSchema.parse(value), "Input validation failed");
206609
206612
  if (!parsed.ok) {
206610
206613
  return [parsed, { status: "invalid" }];
206611
206614
  }
206612
206615
  const payload = parsed.value;
206613
- const body = encodeJSON("body", payload.SaveTenantResourcePolicy, {
206614
- explode: true
206615
- });
206616
+ const body = payload.RequestBody instanceof Uint8Array ? new Uint8Array(payload.RequestBody).buffer : payload.RequestBody;
206616
206617
  const pathParams = {
206617
- scope: encodeSimple("scope", payload.scope, {
206618
+ file_path: encodeSimple("file_path", payload.file_path, {
206619
+ explode: false,
206620
+ charEncoding: "percent"
206621
+ }),
206622
+ session_id: encodeSimple("session_id", payload.session_id, {
206618
206623
  explode: false,
206619
206624
  charEncoding: "percent"
206620
206625
  })
206621
206626
  };
206622
- const path = pathToFunc("/api/v1/sandbox/resource-policy/{scope}")(pathParams);
206627
+ const path = pathToFunc("/api/v1/sandbox/sessions/{session_id}/workspace/files/{file_path}")(pathParams);
206623
206628
  const query = encodeFormQuery({
206624
- expected_organization_id: payload.expected_organization_id,
206625
- expected_team_id: payload.expected_team_id
206629
+ session_token: payload.session_token
206626
206630
  });
206627
206631
  const headers = new Headers(compactMap({
206628
- "Content-Type": "application/json",
206632
+ "Content-Type": "application/octet-stream",
206629
206633
  Accept: "application/json",
206630
206634
  "X-On-Behalf-Of": encodeSimple("X-On-Behalf-Of", payload["X-On-Behalf-Of"], { explode: false, charEncoding: "none" })
206631
206635
  }));
@@ -206635,7 +206639,7 @@ async function $do480(client, request, options) {
206635
206639
  const context = {
206636
206640
  options: client._options,
206637
206641
  baseURL: options?.serverURL ?? client._baseURL ?? "",
206638
- operationID: "setTenantResourcePolicy",
206642
+ operationID: "uploadWorkspaceFile",
206639
206643
  oAuth2Scopes: null,
206640
206644
  resolvedSecurity: requestSecurity,
206641
206645
  securitySource: client._options.bearerAuth,
@@ -206679,13 +206683,14 @@ async function $do480(client, request, options) {
206679
206683
  const responseFields = {
206680
206684
  HttpMeta: { Response: response, Request: req }
206681
206685
  };
206682
- const [result] = await match(json(200, TenantResourcePolicy$inboundSchema), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206686
+ const [result] = await match(json(200, recordType(stringType())), jsonErr(422, HTTPValidationError$inboundSchema), fail("4XX"), fail("5XX"))(response, req, { extraFields: responseFields });
206683
206687
  if (!result.ok) {
206684
206688
  return [result, { status: "complete", request: req, response }];
206685
206689
  }
206686
206690
  return [result, { status: "complete", request: req, response }];
206687
206691
  }
206688
- var init_sessionsSetTenantResourcePolicy = __esm(() => {
206692
+ var init_sandboxUploadFile = __esm(() => {
206693
+ init_v3();
206689
206694
  init_encodings();
206690
206695
  init_http();
206691
206696
  init_matchers();
@@ -206693,27 +206698,28 @@ var init_sessionsSetTenantResourcePolicy = __esm(() => {
206693
206698
  init_schemas9();
206694
206699
  init_security();
206695
206700
  init_url();
206696
- init_components();
206697
206701
  init_errors10();
206698
206702
  init_operations();
206699
206703
  init_async();
206700
206704
  });
206701
206705
 
206702
- // src/mcp-server/tools/sessionsSetTenantResourcePolicy.ts
206703
- var args468, tool$sessionsSetTenantResourcePolicy;
206704
- var init_sessionsSetTenantResourcePolicy2 = __esm(() => {
206705
- init_sessionsSetTenantResourcePolicy();
206706
+ // src/mcp-server/tools/sandboxUploadFile.ts
206707
+ var args468, tool$sandboxUploadFile;
206708
+ var init_sandboxUploadFile2 = __esm(() => {
206709
+ init_sandboxUploadFile();
206706
206710
  init_operations();
206707
206711
  init_tools();
206708
206712
  args468 = {
206709
- request: SetTenantResourcePolicyRequest$inboundSchema
206713
+ request: UploadWorkspaceFileRequest$inboundSchema
206710
206714
  };
206711
- tool$sessionsSetTenantResourcePolicy = {
206712
- name: "sessions-set-tenant-resource-policy",
206713
- description: `Save`,
206715
+ tool$sandboxUploadFile = {
206716
+ name: "sandbox-upload-file",
206717
+ description: `Upload Workspace File
206718
+
206719
+ Upload raw bytes into the session workspace at the given path.`,
206714
206720
  args: args468,
206715
206721
  tool: async (client, args469, ctx) => {
206716
- const [result, apiCall] = await sessionsSetTenantResourcePolicy(client, args469.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206722
+ const [result, apiCall] = await sandboxUploadFile(client, args469.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
206717
206723
  if (!result.ok) {
206718
206724
  return {
206719
206725
  content: [{ type: "text", text: result.error.message }],
@@ -208963,7 +208969,7 @@ Aggregate sandbox usage (session lifecycle, execution, and workspace operations)
208963
208969
  function createMCPServer(deps) {
208964
208970
  const server = new McpServer({
208965
208971
  name: "SDK",
208966
- version: "0.55.30"
208972
+ version: "0.55.32"
208967
208973
  });
208968
208974
  const client = new SDKCore({
208969
208975
  bearerAuth: deps.bearerAuth,
@@ -209002,8 +209008,6 @@ function createMCPServer(deps) {
209002
209008
  tool(tool$sandboxUploadFile);
209003
209009
  tool(tool$sandboxDownloadArchive);
209004
209010
  tool(tool$sandboxUploadArchive);
209005
- tool(tool$sessionsGetTenantResourcePolicy);
209006
- tool(tool$sessionsSetTenantResourcePolicy);
209007
209011
  tool(tool$usageSandbox);
209008
209012
  tool(tool$usageCosts);
209009
209013
  tool(tool$agentsListFunctionTools);
@@ -209422,6 +209426,8 @@ function createMCPServer(deps) {
209422
209426
  tool(tool$sandboxNetworkPoliciesEffective);
209423
209427
  tool(tool$sandboxNetworkPoliciesGet);
209424
209428
  tool(tool$sandboxNetworkPoliciesSet);
209429
+ tool(tool$sandboxResourcePoliciesGet);
209430
+ tool(tool$sandboxResourcePoliciesSet);
209425
209431
  tool(tool$sandboxEnvironmentsList);
209426
209432
  tool(tool$sandboxEnvironmentsCreate);
209427
209433
  tool(tool$sandboxEnvironmentsGet);
@@ -209957,14 +209963,14 @@ var init_server = __esm(() => {
209957
209963
  init_sandboxNetworkPoliciesGet2();
209958
209964
  init_sandboxNetworkPoliciesSet2();
209959
209965
  init_sandboxProxyBrowserPortRequest2();
209966
+ init_sandboxResourcePoliciesGet2();
209967
+ init_sandboxResourcePoliciesSet2();
209960
209968
  init_sandboxRunCode2();
209961
209969
  init_sandboxRunCommand2();
209962
209970
  init_sandboxSetPricing2();
209963
209971
  init_sandboxTerminate2();
209964
209972
  init_sandboxUploadArchive2();
209965
209973
  init_sandboxUploadFile2();
209966
- init_sessionsGetTenantResourcePolicy2();
209967
- init_sessionsSetTenantResourcePolicy2();
209968
209974
  init_trackingExperimentsCreate2();
209969
209975
  init_trackingExperimentsDelete2();
209970
209976
  init_trackingExperimentsGet2();
@@ -211164,7 +211170,7 @@ var routes = rn({
211164
211170
  var app = Ve(routes, {
211165
211171
  name: "mcp",
211166
211172
  versionInfo: {
211167
- currentVersion: "0.55.30"
211173
+ currentVersion: "0.55.32"
211168
211174
  }
211169
211175
  });
211170
211176
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -211172,5 +211178,5 @@ export {
211172
211178
  app
211173
211179
  };
211174
211180
 
211175
- //# debugId=A7A8A0171BA94E9864756E2164756E21
211181
+ //# debugId=1A298CF5E5B7729464756E2164756E21
211176
211182
  //# sourceMappingURL=mcp-server.js.map