@orq-ai/node 3.13.0-rc.13 → 3.13.0-rc.16

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 (122) hide show
  1. package/FUNCTIONS.md +19 -9
  2. package/README.md +179 -123
  3. package/bin/mcp-server.js +405 -511
  4. package/bin/mcp-server.js.map +38 -41
  5. package/docs/sdks/knowledge/README.md +12 -0
  6. package/docs/sdks/orq/README.md +0 -81
  7. package/examples/contactsCreate.example.ts +42 -0
  8. package/examples/package-lock.json +1 -1
  9. package/jsr.json +1 -1
  10. package/lib/config.d.ts +3 -3
  11. package/lib/config.js +3 -3
  12. package/mcp-server/mcp-server.js +1 -1
  13. package/mcp-server/server.d.ts.map +1 -1
  14. package/mcp-server/server.js +1 -3
  15. package/mcp-server/server.js.map +1 -1
  16. package/models/operations/createbudget.js +2 -2
  17. package/models/operations/createcontact.js +2 -2
  18. package/models/operations/createdataset.js +2 -2
  19. package/models/operations/createdatasetitem.js +2 -2
  20. package/models/operations/createdatasource.js +2 -2
  21. package/models/operations/createeval.js +28 -28
  22. package/models/operations/fileget.js +2 -2
  23. package/models/operations/filelist.js +2 -2
  24. package/models/operations/fileupload.js +2 -2
  25. package/models/operations/getagent.d.ts +65 -65
  26. package/models/operations/getagent.d.ts.map +1 -1
  27. package/models/operations/getagent.js +88 -88
  28. package/models/operations/getagent.js.map +1 -1
  29. package/models/operations/getbudget.js +2 -2
  30. package/models/operations/getevals.js +28 -28
  31. package/models/operations/index.d.ts +0 -1
  32. package/models/operations/index.d.ts.map +1 -1
  33. package/models/operations/index.js +0 -1
  34. package/models/operations/index.js.map +1 -1
  35. package/models/operations/listagents.d.ts +1 -1
  36. package/models/operations/listagents.d.ts.map +1 -1
  37. package/models/operations/listagents.js +4 -4
  38. package/models/operations/listagents.js.map +1 -1
  39. package/models/operations/listbudgets.js +2 -2
  40. package/models/operations/listcontacts.js +2 -2
  41. package/models/operations/listdatasetdatapoints.js +2 -2
  42. package/models/operations/listdatasets.js +2 -2
  43. package/models/operations/listdatasources.js +2 -2
  44. package/models/operations/retrievecontact.js +2 -2
  45. package/models/operations/retrievedatapoint.js +2 -2
  46. package/models/operations/retrievedataset.js +2 -2
  47. package/models/operations/retrievedatasource.js +2 -2
  48. package/models/operations/runagent.d.ts +152 -4
  49. package/models/operations/runagent.d.ts.map +1 -1
  50. package/models/operations/runagent.js +165 -9
  51. package/models/operations/runagent.js.map +1 -1
  52. package/models/operations/searchknowledge.d.ts +17 -246
  53. package/models/operations/searchknowledge.d.ts.map +1 -1
  54. package/models/operations/searchknowledge.js +16 -167
  55. package/models/operations/searchknowledge.js.map +1 -1
  56. package/models/operations/streamrunagent.d.ts +152 -4
  57. package/models/operations/streamrunagent.d.ts.map +1 -1
  58. package/models/operations/streamrunagent.js +163 -8
  59. package/models/operations/streamrunagent.js.map +1 -1
  60. package/models/operations/updatebudget.js +2 -2
  61. package/models/operations/updatecontact.js +2 -2
  62. package/models/operations/updatedatapoint.js +2 -2
  63. package/models/operations/updatedataset.js +2 -2
  64. package/models/operations/updatedatasource.js +2 -2
  65. package/models/operations/updateeval.js +28 -28
  66. package/package.json +1 -1
  67. package/sdk/sdk.d.ts +1 -3
  68. package/sdk/sdk.d.ts.map +1 -1
  69. package/sdk/sdk.js +0 -5
  70. package/sdk/sdk.js.map +1 -1
  71. package/src/lib/config.ts +3 -3
  72. package/src/mcp-server/mcp-server.ts +1 -1
  73. package/src/mcp-server/server.ts +1 -3
  74. package/src/models/operations/createbudget.ts +2 -2
  75. package/src/models/operations/createcontact.ts +2 -2
  76. package/src/models/operations/createdataset.ts +2 -2
  77. package/src/models/operations/createdatasetitem.ts +2 -2
  78. package/src/models/operations/createdatasource.ts +2 -2
  79. package/src/models/operations/createeval.ts +28 -28
  80. package/src/models/operations/fileget.ts +2 -2
  81. package/src/models/operations/filelist.ts +2 -2
  82. package/src/models/operations/fileupload.ts +2 -2
  83. package/src/models/operations/getagent.ts +139 -117
  84. package/src/models/operations/getbudget.ts +2 -2
  85. package/src/models/operations/getevals.ts +28 -28
  86. package/src/models/operations/index.ts +0 -1
  87. package/src/models/operations/listagents.ts +5 -5
  88. package/src/models/operations/listbudgets.ts +2 -2
  89. package/src/models/operations/listcontacts.ts +2 -2
  90. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  91. package/src/models/operations/listdatasets.ts +2 -2
  92. package/src/models/operations/listdatasources.ts +2 -2
  93. package/src/models/operations/retrievecontact.ts +2 -2
  94. package/src/models/operations/retrievedatapoint.ts +2 -2
  95. package/src/models/operations/retrievedataset.ts +2 -2
  96. package/src/models/operations/retrievedatasource.ts +2 -2
  97. package/src/models/operations/runagent.ts +296 -8
  98. package/src/models/operations/searchknowledge.ts +29 -259
  99. package/src/models/operations/streamrunagent.ts +331 -8
  100. package/src/models/operations/updatebudget.ts +2 -2
  101. package/src/models/operations/updatecontact.ts +2 -2
  102. package/src/models/operations/updatedatapoint.ts +2 -2
  103. package/src/models/operations/updatedataset.ts +2 -2
  104. package/src/models/operations/updatedatasource.ts +2 -2
  105. package/src/models/operations/updateeval.ts +28 -28
  106. package/src/sdk/sdk.ts +1 -15
  107. package/examples/postV2AgentsInternal.example.ts +0 -30
  108. package/funcs/postV2AgentsInternal.d.ts +0 -11
  109. package/funcs/postV2AgentsInternal.d.ts.map +0 -1
  110. package/funcs/postV2AgentsInternal.js +0 -112
  111. package/funcs/postV2AgentsInternal.js.map +0 -1
  112. package/mcp-server/tools/postV2AgentsInternal.d.ts +0 -8
  113. package/mcp-server/tools/postV2AgentsInternal.d.ts.map +0 -1
  114. package/mcp-server/tools/postV2AgentsInternal.js +0 -61
  115. package/mcp-server/tools/postV2AgentsInternal.js.map +0 -1
  116. package/models/operations/postv2agentsinternal.d.ts +0 -45
  117. package/models/operations/postv2agentsinternal.d.ts.map +0 -1
  118. package/models/operations/postv2agentsinternal.js +0 -88
  119. package/models/operations/postv2agentsinternal.js.map +0 -1
  120. package/src/funcs/postV2AgentsInternal.ts +0 -159
  121. package/src/mcp-server/tools/postV2AgentsInternal.ts +0 -33
  122. package/src/models/operations/postv2agentsinternal.ts +0 -103
@@ -1,30 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import dotenv from "dotenv";
6
- dotenv.config();
7
- /**
8
- * Example usage of the @orq-ai/node SDK
9
- *
10
- * To run this example from the examples directory:
11
- * npm run build && npx tsx postV2AgentsInternal.example.ts
12
- */
13
-
14
- import { Orq } from "@orq-ai/node";
15
-
16
- const orq = new Orq({
17
- apiKey: process.env["ORQ_API_KEY"] ?? "",
18
- });
19
-
20
- async function main() {
21
- await orq.postV2AgentsInternal({
22
- path: "Default",
23
- key: "<key>",
24
- description: "qua hm over irk",
25
- instructions: "<value>",
26
- model: "Model S",
27
- });
28
- }
29
-
30
- main().catch(console.error);
@@ -1,11 +0,0 @@
1
- import { OrqCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
- import { OrqError } from "../models/errors/orqerror.js";
5
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
6
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
7
- import * as operations from "../models/operations/index.js";
8
- import { APIPromise } from "../types/async.js";
9
- import { Result } from "../types/fp.js";
10
- export declare function postV2AgentsInternal(client: OrqCore, request?: operations.PostV2AgentsInternalRequestBody | undefined, options?: RequestOptions): APIPromise<Result<void, OrqError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
11
- //# sourceMappingURL=postV2AgentsInternal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postV2AgentsInternal.d.ts","sourceRoot":"","sources":["../src/funcs/postV2AgentsInternal.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,UAAU,CAAC,+BAA+B,GAAG,SAAS,EAChE,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,IAAI,EACF,QAAQ,GACR,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1,112 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.postV2AgentsInternal = postV2AgentsInternal;
40
- const z = __importStar(require("zod"));
41
- const encodings_js_1 = require("../lib/encodings.js");
42
- const M = __importStar(require("../lib/matchers.js"));
43
- const primitives_js_1 = require("../lib/primitives.js");
44
- const schemas_js_1 = require("../lib/schemas.js");
45
- const security_js_1 = require("../lib/security.js");
46
- const url_js_1 = require("../lib/url.js");
47
- const operations = __importStar(require("../models/operations/index.js"));
48
- const async_js_1 = require("../types/async.js");
49
- function postV2AgentsInternal(client, request, options) {
50
- return new async_js_1.APIPromise($do(client, request, options));
51
- }
52
- async function $do(client, request, options) {
53
- const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.PostV2AgentsInternalRequestBody$outboundSchema.optional()
54
- .parse(value), "Input validation failed");
55
- if (!parsed.ok) {
56
- return [parsed, { status: "invalid" }];
57
- }
58
- const payload = parsed.value;
59
- const body = payload === undefined
60
- ? null
61
- : (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
62
- const path = (0, url_js_1.pathToFunc)("/v2/agents/internal")();
63
- const headers = new Headers((0, primitives_js_1.compactMap)({
64
- "Content-Type": "application/json",
65
- Accept: "*/*",
66
- }));
67
- const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
68
- const securityInput = secConfig == null ? {} : { apiKey: secConfig };
69
- const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
70
- const context = {
71
- options: client._options,
72
- baseURL: options?.serverURL ?? client._baseURL ?? "",
73
- operationID: "post_/v2/agents/internal",
74
- oAuth2Scopes: [],
75
- resolvedSecurity: requestSecurity,
76
- securitySource: client._options.apiKey,
77
- retryConfig: options?.retries
78
- || client._options.retryConfig
79
- || { strategy: "none" },
80
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
81
- };
82
- const requestRes = client._createRequest(context, {
83
- security: requestSecurity,
84
- method: "POST",
85
- baseURL: options?.serverURL,
86
- path: path,
87
- headers: headers,
88
- body: body,
89
- userAgent: client._options.userAgent,
90
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
91
- }, options);
92
- if (!requestRes.ok) {
93
- return [requestRes, { status: "invalid" }];
94
- }
95
- const req = requestRes.value;
96
- const doResult = await client._do(req, {
97
- context,
98
- errorCodes: ["4XX", "5XX"],
99
- retryConfig: context.retryConfig,
100
- retryCodes: context.retryCodes,
101
- });
102
- if (!doResult.ok) {
103
- return [doResult, { status: "request-error", request: req }];
104
- }
105
- const response = doResult.value;
106
- const [result] = await M.match(M.nil(201, z.void()), M.fail("4XX"), M.fail("5XX"))(response, req);
107
- if (!result.ok) {
108
- return [result, { status: "complete", request: req, response }];
109
- }
110
- return [result, { status: "complete", request: req, response }];
111
- }
112
- //# sourceMappingURL=postV2AgentsInternal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postV2AgentsInternal.js","sourceRoot":"","sources":["../src/funcs/postV2AgentsInternal.ts"],"names":[],"mappings":"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"}
@@ -1,8 +0,0 @@
1
- import * as operations from "../../models/operations/index.js";
2
- import { ToolDefinition } from "../tools.js";
3
- declare const args: {
4
- request: import("zod").ZodOptional<import("zod").ZodType<operations.PostV2AgentsInternalRequestBody, import("zod").ZodTypeDef, unknown>>;
5
- };
6
- export declare const tool$postV2AgentsInternal: ToolDefinition<typeof args>;
7
- export {};
8
- //# sourceMappingURL=postV2AgentsInternal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postV2AgentsInternal.d.ts","sourceRoot":"","sources":["../../src/mcp-server/tools/postV2AgentsInternal.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,OAAO,IAAI,CAoBjE,CAAC"}
@@ -1,61 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tool$postV2AgentsInternal = void 0;
40
- const postV2AgentsInternal_js_1 = require("../../funcs/postV2AgentsInternal.js");
41
- const operations = __importStar(require("../../models/operations/index.js"));
42
- const tools_js_1 = require("../tools.js");
43
- const args = {
44
- request: operations.PostV2AgentsInternalRequestBody$inboundSchema.optional(),
45
- };
46
- exports.tool$postV2AgentsInternal = {
47
- name: "post-v2-agents-internal",
48
- description: ``,
49
- args,
50
- tool: async (client, args, ctx) => {
51
- const [result, apiCall] = await (0, postV2AgentsInternal_js_1.postV2AgentsInternal)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
52
- if (!result.ok) {
53
- return {
54
- content: [{ type: "text", text: result.error.message }],
55
- isError: true,
56
- };
57
- }
58
- return (0, tools_js_1.formatResult)(void 0, apiCall);
59
- },
60
- };
61
- //# sourceMappingURL=postV2AgentsInternal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postV2AgentsInternal.js","sourceRoot":"","sources":["../../src/mcp-server/tools/postV2AgentsInternal.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,iFAA2E;AAC3E,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,6CAA6C,CAAC,QAAQ,EAAE;CAC7E,CAAC;AAEW,QAAA,yBAAyB,GAAgC;IACpE,IAAI,EAAE,yBAAyB;IAC/B,WAAW,EAAE,EAAE;IACf,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,8CAAoB,EAClD,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,OAAO,IAAA,uBAAY,EAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACF,CAAC"}
@@ -1,45 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- export type PostV2AgentsInternalRequestBody = {
5
- /**
6
- * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
7
- */
8
- path: string;
9
- key: string;
10
- description: string;
11
- instructions: string;
12
- model: string;
13
- /**
14
- * Optional array of fallback model IDs to use when the primary model fails
15
- */
16
- fallbackModels?: Array<string> | undefined;
17
- };
18
- /** @internal */
19
- export declare const PostV2AgentsInternalRequestBody$inboundSchema: z.ZodType<PostV2AgentsInternalRequestBody, z.ZodTypeDef, unknown>;
20
- /** @internal */
21
- export type PostV2AgentsInternalRequestBody$Outbound = {
22
- path: string;
23
- key: string;
24
- description: string;
25
- instructions: string;
26
- model: string;
27
- fallback_models?: Array<string> | undefined;
28
- };
29
- /** @internal */
30
- export declare const PostV2AgentsInternalRequestBody$outboundSchema: z.ZodType<PostV2AgentsInternalRequestBody$Outbound, z.ZodTypeDef, PostV2AgentsInternalRequestBody>;
31
- /**
32
- * @internal
33
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
- */
35
- export declare namespace PostV2AgentsInternalRequestBody$ {
36
- /** @deprecated use `PostV2AgentsInternalRequestBody$inboundSchema` instead. */
37
- const inboundSchema: z.ZodType<PostV2AgentsInternalRequestBody, z.ZodTypeDef, unknown>;
38
- /** @deprecated use `PostV2AgentsInternalRequestBody$outboundSchema` instead. */
39
- const outboundSchema: z.ZodType<PostV2AgentsInternalRequestBody$Outbound, z.ZodTypeDef, PostV2AgentsInternalRequestBody>;
40
- /** @deprecated use `PostV2AgentsInternalRequestBody$Outbound` instead. */
41
- type Outbound = PostV2AgentsInternalRequestBody$Outbound;
42
- }
43
- export declare function postV2AgentsInternalRequestBodyToJSON(postV2AgentsInternalRequestBody: PostV2AgentsInternalRequestBody): string;
44
- export declare function postV2AgentsInternalRequestBodyFromJSON(jsonString: string): SafeParseResult<PostV2AgentsInternalRequestBody, SDKValidationError>;
45
- //# sourceMappingURL=postv2agentsinternal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postv2agentsinternal.d.ts","sourceRoot":"","sources":["../../src/models/operations/postv2agentsinternal.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CAC5C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,+BAA+B,EAC/B,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CAC7C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8CAA8C,EAAE,CAAC,CAAC,OAAO,CACpE,wCAAwC,EACxC,CAAC,CAAC,UAAU,EACZ,+BAA+B,CAY/B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,gCAAgC,CAAC;IAChD,+EAA+E;IACxE,MAAM,aAAa,mEAAgD,CAAC;IAC3E,gFAAgF;IACzE,MAAM,cAAc,oGAAiD,CAAC;IAC7E,0EAA0E;IAC1E,KAAY,QAAQ,GAAG,wCAAwC,CAAC;CACjE;AAED,wBAAgB,qCAAqC,CACnD,+BAA+B,EAAE,+BAA+B,GAC/D,MAAM,CAMR;AAED,wBAAgB,uCAAuC,CACrD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,+BAA+B,EAAE,kBAAkB,CAAC,CAMtE"}
@@ -1,88 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.PostV2AgentsInternalRequestBody$ = exports.PostV2AgentsInternalRequestBody$outboundSchema = exports.PostV2AgentsInternalRequestBody$inboundSchema = void 0;
40
- exports.postV2AgentsInternalRequestBodyToJSON = postV2AgentsInternalRequestBodyToJSON;
41
- exports.postV2AgentsInternalRequestBodyFromJSON = postV2AgentsInternalRequestBodyFromJSON;
42
- const z = __importStar(require("zod"));
43
- const primitives_js_1 = require("../../lib/primitives.js");
44
- const schemas_js_1 = require("../../lib/schemas.js");
45
- /** @internal */
46
- exports.PostV2AgentsInternalRequestBody$inboundSchema = z.object({
47
- path: z.string(),
48
- key: z.string(),
49
- description: z.string(),
50
- instructions: z.string(),
51
- model: z.string(),
52
- fallback_models: z.array(z.string()).optional(),
53
- }).transform((v) => {
54
- return (0, primitives_js_1.remap)(v, {
55
- "fallback_models": "fallbackModels",
56
- });
57
- });
58
- /** @internal */
59
- exports.PostV2AgentsInternalRequestBody$outboundSchema = z.object({
60
- path: z.string(),
61
- key: z.string(),
62
- description: z.string(),
63
- instructions: z.string(),
64
- model: z.string(),
65
- fallbackModels: z.array(z.string()).optional(),
66
- }).transform((v) => {
67
- return (0, primitives_js_1.remap)(v, {
68
- fallbackModels: "fallback_models",
69
- });
70
- });
71
- /**
72
- * @internal
73
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
74
- */
75
- var PostV2AgentsInternalRequestBody$;
76
- (function (PostV2AgentsInternalRequestBody$) {
77
- /** @deprecated use `PostV2AgentsInternalRequestBody$inboundSchema` instead. */
78
- PostV2AgentsInternalRequestBody$.inboundSchema = exports.PostV2AgentsInternalRequestBody$inboundSchema;
79
- /** @deprecated use `PostV2AgentsInternalRequestBody$outboundSchema` instead. */
80
- PostV2AgentsInternalRequestBody$.outboundSchema = exports.PostV2AgentsInternalRequestBody$outboundSchema;
81
- })(PostV2AgentsInternalRequestBody$ || (exports.PostV2AgentsInternalRequestBody$ = PostV2AgentsInternalRequestBody$ = {}));
82
- function postV2AgentsInternalRequestBodyToJSON(postV2AgentsInternalRequestBody) {
83
- return JSON.stringify(exports.PostV2AgentsInternalRequestBody$outboundSchema.parse(postV2AgentsInternalRequestBody));
84
- }
85
- function postV2AgentsInternalRequestBodyFromJSON(jsonString) {
86
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.PostV2AgentsInternalRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PostV2AgentsInternalRequestBody' from JSON`);
87
- }
88
- //# sourceMappingURL=postv2agentsinternal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"postv2agentsinternal.js","sourceRoot":"","sources":["../../src/models/operations/postv2agentsinternal.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFH,sFAQC;AAED,0FAQC;AAlGD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAmBjD,gBAAgB;AACH,QAAA,6CAA6C,GAItD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,iBAAiB,EAAE,gBAAgB;KACpC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAYH,gBAAgB;AACH,QAAA,8CAA8C,GAIvD,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,cAAc,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,cAAc,EAAE,iBAAiB;KAClC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,gCAAgC,CAOhD;AAPD,WAAiB,gCAAgC;IAC/C,+EAA+E;IAClE,8CAAa,GAAG,qDAA6C,CAAC;IAC3E,gFAAgF;IACnE,+CAAc,GAAG,sDAA8C,CAAC;AAG/E,CAAC,EAPgB,gCAAgC,gDAAhC,gCAAgC,QAOhD;AAED,SAAgB,qCAAqC,CACnD,+BAAgE;IAEhE,OAAO,IAAI,CAAC,SAAS,CACnB,sDAA8C,CAAC,KAAK,CAClD,+BAA+B,CAChC,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,uCAAuC,CACrD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qDAA6C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzE,6DAA6D,CAC9D,CAAC;AACJ,CAAC"}
@@ -1,159 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { OrqCore } from "../core.js";
7
- import { encodeJSON } from "../lib/encodings.js";
8
- import * as M from "../lib/matchers.js";
9
- import { compactMap } from "../lib/primitives.js";
10
- import { safeParse } from "../lib/schemas.js";
11
- import { RequestOptions } from "../lib/sdks.js";
12
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
- import { pathToFunc } from "../lib/url.js";
14
- import {
15
- ConnectionError,
16
- InvalidRequestError,
17
- RequestAbortedError,
18
- RequestTimeoutError,
19
- UnexpectedClientError,
20
- } from "../models/errors/httpclienterrors.js";
21
- import { OrqError } from "../models/errors/orqerror.js";
22
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
- import * as operations from "../models/operations/index.js";
25
- import { APICall, APIPromise } from "../types/async.js";
26
- import { Result } from "../types/fp.js";
27
-
28
- export function postV2AgentsInternal(
29
- client: OrqCore,
30
- request?: operations.PostV2AgentsInternalRequestBody | undefined,
31
- options?: RequestOptions,
32
- ): APIPromise<
33
- Result<
34
- void,
35
- | OrqError
36
- | ResponseValidationError
37
- | ConnectionError
38
- | RequestAbortedError
39
- | RequestTimeoutError
40
- | InvalidRequestError
41
- | UnexpectedClientError
42
- | SDKValidationError
43
- >
44
- > {
45
- return new APIPromise($do(
46
- client,
47
- request,
48
- options,
49
- ));
50
- }
51
-
52
- async function $do(
53
- client: OrqCore,
54
- request?: operations.PostV2AgentsInternalRequestBody | undefined,
55
- options?: RequestOptions,
56
- ): Promise<
57
- [
58
- Result<
59
- void,
60
- | OrqError
61
- | ResponseValidationError
62
- | ConnectionError
63
- | RequestAbortedError
64
- | RequestTimeoutError
65
- | InvalidRequestError
66
- | UnexpectedClientError
67
- | SDKValidationError
68
- >,
69
- APICall,
70
- ]
71
- > {
72
- const parsed = safeParse(
73
- request,
74
- (value) =>
75
- operations.PostV2AgentsInternalRequestBody$outboundSchema.optional()
76
- .parse(value),
77
- "Input validation failed",
78
- );
79
- if (!parsed.ok) {
80
- return [parsed, { status: "invalid" }];
81
- }
82
- const payload = parsed.value;
83
- const body = payload === undefined
84
- ? null
85
- : encodeJSON("body", payload, { explode: true });
86
-
87
- const path = pathToFunc("/v2/agents/internal")();
88
-
89
- const headers = new Headers(compactMap({
90
- "Content-Type": "application/json",
91
- Accept: "*/*",
92
- }));
93
-
94
- const secConfig = await extractSecurity(client._options.apiKey);
95
- const securityInput = secConfig == null ? {} : { apiKey: secConfig };
96
- const requestSecurity = resolveGlobalSecurity(securityInput);
97
-
98
- const context = {
99
- options: client._options,
100
- baseURL: options?.serverURL ?? client._baseURL ?? "",
101
- operationID: "post_/v2/agents/internal",
102
- oAuth2Scopes: [],
103
-
104
- resolvedSecurity: requestSecurity,
105
-
106
- securitySource: client._options.apiKey,
107
- retryConfig: options?.retries
108
- || client._options.retryConfig
109
- || { strategy: "none" },
110
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
111
- };
112
-
113
- const requestRes = client._createRequest(context, {
114
- security: requestSecurity,
115
- method: "POST",
116
- baseURL: options?.serverURL,
117
- path: path,
118
- headers: headers,
119
- body: body,
120
- userAgent: client._options.userAgent,
121
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
122
- }, options);
123
- if (!requestRes.ok) {
124
- return [requestRes, { status: "invalid" }];
125
- }
126
- const req = requestRes.value;
127
-
128
- const doResult = await client._do(req, {
129
- context,
130
- errorCodes: ["4XX", "5XX"],
131
- retryConfig: context.retryConfig,
132
- retryCodes: context.retryCodes,
133
- });
134
- if (!doResult.ok) {
135
- return [doResult, { status: "request-error", request: req }];
136
- }
137
- const response = doResult.value;
138
-
139
- const [result] = await M.match<
140
- void,
141
- | OrqError
142
- | ResponseValidationError
143
- | ConnectionError
144
- | RequestAbortedError
145
- | RequestTimeoutError
146
- | InvalidRequestError
147
- | UnexpectedClientError
148
- | SDKValidationError
149
- >(
150
- M.nil(201, z.void()),
151
- M.fail("4XX"),
152
- M.fail("5XX"),
153
- )(response, req);
154
- if (!result.ok) {
155
- return [result, { status: "complete", request: req, response }];
156
- }
157
-
158
- return [result, { status: "complete", request: req, response }];
159
- }
@@ -1,33 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { postV2AgentsInternal } from "../../funcs/postV2AgentsInternal.js";
6
- import * as operations from "../../models/operations/index.js";
7
- import { formatResult, ToolDefinition } from "../tools.js";
8
-
9
- const args = {
10
- request: operations.PostV2AgentsInternalRequestBody$inboundSchema.optional(),
11
- };
12
-
13
- export const tool$postV2AgentsInternal: ToolDefinition<typeof args> = {
14
- name: "post-v2-agents-internal",
15
- description: ``,
16
- args,
17
- tool: async (client, args, ctx) => {
18
- const [result, apiCall] = await postV2AgentsInternal(
19
- client,
20
- args.request,
21
- { fetchOptions: { signal: ctx.signal } },
22
- ).$inspect();
23
-
24
- if (!result.ok) {
25
- return {
26
- content: [{ type: "text", text: result.error.message }],
27
- isError: true,
28
- };
29
- }
30
-
31
- return formatResult(void 0, apiCall);
32
- },
33
- };