@smithery/api 0.42.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/experimental/experimental.d.mts +0 -4
- package/resources/experimental/experimental.d.mts.map +1 -1
- package/resources/experimental/experimental.d.ts +0 -4
- package/resources/experimental/experimental.d.ts.map +1 -1
- package/resources/experimental/experimental.js +0 -4
- package/resources/experimental/experimental.js.map +1 -1
- package/resources/experimental/experimental.mjs +0 -4
- package/resources/experimental/experimental.mjs.map +1 -1
- package/resources/experimental/index.d.mts +0 -1
- package/resources/experimental/index.d.mts.map +1 -1
- package/resources/experimental/index.d.ts +0 -1
- package/resources/experimental/index.d.ts.map +1 -1
- package/resources/experimental/index.js +3 -5
- package/resources/experimental/index.js.map +1 -1
- package/resources/experimental/index.mjs +0 -1
- package/resources/experimental/index.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/namespaces/index.d.mts +1 -1
- package/resources/namespaces/index.d.mts.map +1 -1
- package/resources/namespaces/index.d.ts +1 -1
- package/resources/namespaces/index.d.ts.map +1 -1
- package/resources/namespaces/index.js.map +1 -1
- package/resources/namespaces/index.mjs.map +1 -1
- package/resources/namespaces/namespaces.d.mts +16 -1
- package/resources/namespaces/namespaces.d.mts.map +1 -1
- package/resources/namespaces/namespaces.d.ts +16 -1
- package/resources/namespaces/namespaces.d.ts.map +1 -1
- package/resources/namespaces/namespaces.js +13 -0
- package/resources/namespaces/namespaces.js.map +1 -1
- package/resources/namespaces/namespaces.mjs +13 -0
- package/resources/namespaces/namespaces.mjs.map +1 -1
- package/resources/servers/index.d.mts +1 -1
- package/resources/servers/index.d.mts.map +1 -1
- package/resources/servers/index.d.ts +1 -1
- package/resources/servers/index.d.ts.map +1 -1
- package/resources/servers/index.js.map +1 -1
- package/resources/servers/index.mjs.map +1 -1
- package/resources/servers/servers.d.mts +74 -2
- package/resources/servers/servers.d.mts.map +1 -1
- package/resources/servers/servers.d.ts +74 -2
- package/resources/servers/servers.d.ts.map +1 -1
- package/resources/servers/servers.js +28 -0
- package/resources/servers/servers.js.map +1 -1
- package/resources/servers/servers.mjs +28 -0
- package/resources/servers/servers.mjs.map +1 -1
- package/src/client.ts +11 -1
- package/src/core/streaming.ts +2 -2
- package/src/resources/experimental/experimental.ts +0 -38
- package/src/resources/experimental/index.ts +0 -17
- package/src/resources/index.ts +5 -0
- package/src/resources/namespaces/index.ts +1 -0
- package/src/resources/namespaces/namespaces.ts +21 -0
- package/src/resources/servers/index.ts +4 -0
- package/src/resources/servers/servers.ts +112 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/experimental/agents/agents.d.mts +0 -225
- package/resources/experimental/agents/agents.d.mts.map +0 -1
- package/resources/experimental/agents/agents.d.ts +0 -225
- package/resources/experimental/agents/agents.d.ts.map +0 -1
- package/resources/experimental/agents/agents.js +0 -17
- package/resources/experimental/agents/agents.js.map +0 -1
- package/resources/experimental/agents/agents.mjs +0 -12
- package/resources/experimental/agents/agents.mjs.map +0 -1
- package/resources/experimental/agents/index.d.mts +0 -3
- package/resources/experimental/agents/index.d.mts.map +0 -1
- package/resources/experimental/agents/index.d.ts +0 -3
- package/resources/experimental/agents/index.d.ts.map +0 -1
- package/resources/experimental/agents/index.js +0 -9
- package/resources/experimental/agents/index.js.map +0 -1
- package/resources/experimental/agents/index.mjs +0 -4
- package/resources/experimental/agents/index.mjs.map +0 -1
- package/resources/experimental/agents/responses.d.mts +0 -86
- package/resources/experimental/agents/responses.d.mts.map +0 -1
- package/resources/experimental/agents/responses.d.ts +0 -86
- package/resources/experimental/agents/responses.d.ts.map +0 -1
- package/resources/experimental/agents/responses.js +0 -38
- package/resources/experimental/agents/responses.js.map +0 -1
- package/resources/experimental/agents/responses.mjs +0 -34
- package/resources/experimental/agents/responses.mjs.map +0 -1
- package/resources/experimental/agents.d.mts +0 -2
- package/resources/experimental/agents.d.mts.map +0 -1
- package/resources/experimental/agents.d.ts +0 -2
- package/resources/experimental/agents.d.ts.map +0 -1
- package/resources/experimental/agents.js +0 -6
- package/resources/experimental/agents.js.map +0 -1
- package/resources/experimental/agents.mjs +0 -3
- package/resources/experimental/agents.mjs.map +0 -1
- package/src/resources/experimental/agents/agents.ts +0 -301
- package/src/resources/experimental/agents/index.ts +0 -20
- package/src/resources/experimental/agents/responses.ts +0 -105
- package/src/resources/experimental/agents.ts +0 -3
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../core/resource.js";
|
|
2
|
-
import * as AgentsAPI from "./agents.js";
|
|
3
|
-
import { APIPromise } from "../../../core/api-promise.js";
|
|
4
|
-
import { RequestOptions } from "../../../internal/request-options.js";
|
|
5
|
-
export declare class Responses extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Create a new agent response. Supports synchronous, streaming, and background
|
|
8
|
-
* execution modes.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const response =
|
|
13
|
-
* await client.experimental.agents.responses.create({
|
|
14
|
-
* namespace: 'namespace',
|
|
15
|
-
* });
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
create(body: ResponseCreateParams, options?: RequestOptions): APIPromise<AgentsAPI.Response>;
|
|
19
|
-
/**
|
|
20
|
-
* Get the status and result of an agent response by ID. Used to poll background
|
|
21
|
-
* responses.
|
|
22
|
-
*
|
|
23
|
-
* @example
|
|
24
|
-
* ```ts
|
|
25
|
-
* const response =
|
|
26
|
-
* await client.experimental.agents.responses.get('id');
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
get(id: string, options?: RequestOptions): APIPromise<AgentsAPI.Response>;
|
|
30
|
-
}
|
|
31
|
-
export interface ResponseCreateParams {
|
|
32
|
-
/**
|
|
33
|
-
* Smithery namespace for tool discovery
|
|
34
|
-
*/
|
|
35
|
-
namespace: string;
|
|
36
|
-
/**
|
|
37
|
-
* Run in background for long-running tasks
|
|
38
|
-
*/
|
|
39
|
-
background?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Input text or array of messages
|
|
42
|
-
*/
|
|
43
|
-
input?: string | Array<AgentsAPI.InputItem> | null;
|
|
44
|
-
/**
|
|
45
|
-
* Additional system instructions
|
|
46
|
-
*/
|
|
47
|
-
instructions?: string | null;
|
|
48
|
-
/**
|
|
49
|
-
* Maximum output tokens
|
|
50
|
-
*/
|
|
51
|
-
max_output_tokens?: number | null;
|
|
52
|
-
/**
|
|
53
|
-
* Maximum tool calls before stopping
|
|
54
|
-
*/
|
|
55
|
-
max_tool_calls?: number | null;
|
|
56
|
-
/**
|
|
57
|
-
* Request metadata
|
|
58
|
-
*/
|
|
59
|
-
metadata?: {
|
|
60
|
-
[key: string]: string;
|
|
61
|
-
} | null;
|
|
62
|
-
/**
|
|
63
|
-
* Model to use
|
|
64
|
-
*/
|
|
65
|
-
model?: string | null;
|
|
66
|
-
/**
|
|
67
|
-
* Previous response ID for multi-turn
|
|
68
|
-
*/
|
|
69
|
-
previous_response_id?: string | null;
|
|
70
|
-
/**
|
|
71
|
-
* Enable streaming response
|
|
72
|
-
*/
|
|
73
|
-
stream?: boolean;
|
|
74
|
-
/**
|
|
75
|
-
* Temperature for generation
|
|
76
|
-
*/
|
|
77
|
-
temperature?: number | null;
|
|
78
|
-
/**
|
|
79
|
-
* Top-p sampling
|
|
80
|
-
*/
|
|
81
|
-
top_p?: number | null;
|
|
82
|
-
}
|
|
83
|
-
export declare namespace Responses {
|
|
84
|
-
export { type ResponseCreateParams as ResponseCreateParams };
|
|
85
|
-
}
|
|
86
|
-
//# sourceMappingURL=responses.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../../src/resources/experimental/agents/responses.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC;IAI5F;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC;CAG1E;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IAEnD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAElC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAE5C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,CAAC;CAC9D"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Responses = void 0;
|
|
5
|
-
const resource_1 = require("../../../core/resource.js");
|
|
6
|
-
const path_1 = require("../../../internal/utils/path.js");
|
|
7
|
-
class Responses extends resource_1.APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Create a new agent response. Supports synchronous, streaming, and background
|
|
10
|
-
* execution modes.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const response =
|
|
15
|
-
* await client.experimental.agents.responses.create({
|
|
16
|
-
* namespace: 'namespace',
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
create(body, options) {
|
|
21
|
-
return this._client.post('/agents/responses', { body, ...options });
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Get the status and result of an agent response by ID. Used to poll background
|
|
25
|
-
* responses.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```ts
|
|
29
|
-
* const response =
|
|
30
|
-
* await client.experimental.agents.responses.get('id');
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
get(id, options) {
|
|
34
|
-
return this._client.get((0, path_1.path) `/agents/responses/${id}`, options);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.Responses = Responses;
|
|
38
|
-
//# sourceMappingURL=responses.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responses.js","sourceRoot":"","sources":["../../../src/resources/experimental/agents/responses.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAIrD,0DAAoD;AAEpD,MAAa,SAAU,SAAQ,sBAAW;IACxC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAU,EAAE,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF;AA9BD,8BA8BC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
-
import { path } from "../../../internal/utils/path.mjs";
|
|
4
|
-
export class Responses extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Create a new agent response. Supports synchronous, streaming, and background
|
|
7
|
-
* execution modes.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const response =
|
|
12
|
-
* await client.experimental.agents.responses.create({
|
|
13
|
-
* namespace: 'namespace',
|
|
14
|
-
* });
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
create(body, options) {
|
|
18
|
-
return this._client.post('/agents/responses', { body, ...options });
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Get the status and result of an agent response by ID. Used to poll background
|
|
22
|
-
* responses.
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```ts
|
|
26
|
-
* const response =
|
|
27
|
-
* await client.experimental.agents.responses.get('id');
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
get(id, options) {
|
|
31
|
-
return this._client.get(path `/agents/responses/${id}`, options);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=responses.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responses.mjs","sourceRoot":"","sources":["../../../src/resources/experimental/agents/responses.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,IAA0B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mBAAmB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,GAAG,CAAC,EAAU,EAAE,OAAwB;QACtC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.mts","sourceRoot":"","sources":["../../src/resources/experimental/agents.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/resources/experimental/agents.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const tslib_1 = require("../../internal/tslib.js");
|
|
5
|
-
tslib_1.__exportStar(require("./agents/index.js"), exports);
|
|
6
|
-
//# sourceMappingURL=agents.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents.js","sourceRoot":"","sources":["../../src/resources/experimental/agents.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAA+B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents.mjs","sourceRoot":"","sources":["../../src/resources/experimental/agents.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -1,301 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as ResponsesAPI from './responses';
|
|
5
|
-
import { ResponseCreateParams, Responses } from './responses';
|
|
6
|
-
|
|
7
|
-
export class Agents extends APIResource {
|
|
8
|
-
responses: ResponsesAPI.Responses = new ResponsesAPI.Responses(this._client);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface AssistantMessage {
|
|
12
|
-
/**
|
|
13
|
-
* Message ID
|
|
14
|
-
*/
|
|
15
|
-
id: string;
|
|
16
|
-
|
|
17
|
-
content: Array<OutputTextContent>;
|
|
18
|
-
|
|
19
|
-
role: 'assistant';
|
|
20
|
-
|
|
21
|
-
status: 'in_progress' | 'completed' | 'incomplete';
|
|
22
|
-
|
|
23
|
-
type: 'message';
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export interface CreateResponseRequest {
|
|
27
|
-
/**
|
|
28
|
-
* Smithery namespace for tool discovery
|
|
29
|
-
*/
|
|
30
|
-
namespace: string;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Run in background for long-running tasks
|
|
34
|
-
*/
|
|
35
|
-
background?: boolean;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Input text or array of messages
|
|
39
|
-
*/
|
|
40
|
-
input?: string | Array<InputItem> | null;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Additional system instructions
|
|
44
|
-
*/
|
|
45
|
-
instructions?: string | null;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Maximum output tokens
|
|
49
|
-
*/
|
|
50
|
-
max_output_tokens?: number | null;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Maximum tool calls before stopping
|
|
54
|
-
*/
|
|
55
|
-
max_tool_calls?: number | null;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Request metadata
|
|
59
|
-
*/
|
|
60
|
-
metadata?: { [key: string]: string } | null;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Model to use
|
|
64
|
-
*/
|
|
65
|
-
model?: string | null;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Previous response ID for multi-turn
|
|
69
|
-
*/
|
|
70
|
-
previous_response_id?: string | null;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Enable streaming response
|
|
74
|
-
*/
|
|
75
|
-
stream?: boolean;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Temperature for generation
|
|
79
|
-
*/
|
|
80
|
-
temperature?: number | null;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Top-p sampling
|
|
84
|
-
*/
|
|
85
|
-
top_p?: number | null;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export interface ErrorResponse {
|
|
89
|
-
error: ErrorResponse.Error;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export namespace ErrorResponse {
|
|
93
|
-
export interface Error {
|
|
94
|
-
/**
|
|
95
|
-
* Error code
|
|
96
|
-
*/
|
|
97
|
-
code: string;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Error message
|
|
101
|
-
*/
|
|
102
|
-
message: string;
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* Error type
|
|
106
|
-
*/
|
|
107
|
-
type?: string;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export interface FunctionCall {
|
|
112
|
-
/**
|
|
113
|
-
* Function call ID
|
|
114
|
-
*/
|
|
115
|
-
id: string;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* JSON-encoded arguments
|
|
119
|
-
*/
|
|
120
|
-
arguments: string;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Tool call ID
|
|
124
|
-
*/
|
|
125
|
-
call_id: string;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Function name
|
|
129
|
-
*/
|
|
130
|
-
name: string;
|
|
131
|
-
|
|
132
|
-
status: 'in_progress' | 'completed' | 'incomplete';
|
|
133
|
-
|
|
134
|
-
type: 'function_call';
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export type InputItem = UserMessage | SystemMessage;
|
|
138
|
-
|
|
139
|
-
export interface InputTextContent {
|
|
140
|
-
/**
|
|
141
|
-
* The text content
|
|
142
|
-
*/
|
|
143
|
-
text: string;
|
|
144
|
-
|
|
145
|
-
type: 'input_text';
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export type OutputItem = AssistantMessage | FunctionCall;
|
|
149
|
-
|
|
150
|
-
export interface OutputTextContent {
|
|
151
|
-
/**
|
|
152
|
-
* The output text
|
|
153
|
-
*/
|
|
154
|
-
text: string;
|
|
155
|
-
|
|
156
|
-
type: 'output_text';
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export interface Response {
|
|
160
|
-
/**
|
|
161
|
-
* Response ID
|
|
162
|
-
*/
|
|
163
|
-
id: string;
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Whether running in background
|
|
167
|
-
*/
|
|
168
|
-
background: boolean;
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Unix timestamp of completion
|
|
172
|
-
*/
|
|
173
|
-
completed_at: number | null;
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Unix timestamp of creation
|
|
177
|
-
*/
|
|
178
|
-
created_at: number;
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Error details if failed
|
|
182
|
-
*/
|
|
183
|
-
error: Response.Error | null;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* System instructions used
|
|
187
|
-
*/
|
|
188
|
-
instructions: string | null;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Request metadata
|
|
192
|
-
*/
|
|
193
|
-
metadata: { [key: string]: string } | null;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Model used
|
|
197
|
-
*/
|
|
198
|
-
model: string;
|
|
199
|
-
|
|
200
|
-
object: 'response';
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Output items
|
|
204
|
-
*/
|
|
205
|
-
output: Array<OutputItem>;
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Previous response ID
|
|
209
|
-
*/
|
|
210
|
-
previous_response_id: string | null;
|
|
211
|
-
|
|
212
|
-
/**
|
|
213
|
-
* Response status
|
|
214
|
-
*/
|
|
215
|
-
status: ResponseStatus;
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Token usage
|
|
219
|
-
*/
|
|
220
|
-
usage: Usage | null;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
export namespace Response {
|
|
224
|
-
/**
|
|
225
|
-
* Error details if failed
|
|
226
|
-
*/
|
|
227
|
-
export interface Error {
|
|
228
|
-
code: string;
|
|
229
|
-
|
|
230
|
-
message: string;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
export type ResponseStatus = 'queued' | 'in_progress' | 'completed' | 'failed' | 'incomplete';
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* Simple text content
|
|
238
|
-
*/
|
|
239
|
-
export type StringContent = string;
|
|
240
|
-
|
|
241
|
-
export interface SystemMessage {
|
|
242
|
-
/**
|
|
243
|
-
* Simple text content
|
|
244
|
-
*/
|
|
245
|
-
content: Array<InputTextContent> | StringContent;
|
|
246
|
-
|
|
247
|
-
role: 'system';
|
|
248
|
-
|
|
249
|
-
type: 'message';
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export interface Usage {
|
|
253
|
-
/**
|
|
254
|
-
* Input tokens used
|
|
255
|
-
*/
|
|
256
|
-
input_tokens: number;
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* Output tokens generated
|
|
260
|
-
*/
|
|
261
|
-
output_tokens: number;
|
|
262
|
-
|
|
263
|
-
/**
|
|
264
|
-
* Total tokens
|
|
265
|
-
*/
|
|
266
|
-
total_tokens: number;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
export interface UserMessage {
|
|
270
|
-
/**
|
|
271
|
-
* Simple text content
|
|
272
|
-
*/
|
|
273
|
-
content: Array<InputTextContent> | StringContent;
|
|
274
|
-
|
|
275
|
-
role: 'user';
|
|
276
|
-
|
|
277
|
-
type: 'message';
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
Agents.Responses = Responses;
|
|
281
|
-
|
|
282
|
-
export declare namespace Agents {
|
|
283
|
-
export {
|
|
284
|
-
type AssistantMessage as AssistantMessage,
|
|
285
|
-
type CreateResponseRequest as CreateResponseRequest,
|
|
286
|
-
type ErrorResponse as ErrorResponse,
|
|
287
|
-
type FunctionCall as FunctionCall,
|
|
288
|
-
type InputItem as InputItem,
|
|
289
|
-
type InputTextContent as InputTextContent,
|
|
290
|
-
type OutputItem as OutputItem,
|
|
291
|
-
type OutputTextContent as OutputTextContent,
|
|
292
|
-
type Response as Response,
|
|
293
|
-
type ResponseStatus as ResponseStatus,
|
|
294
|
-
type StringContent as StringContent,
|
|
295
|
-
type SystemMessage as SystemMessage,
|
|
296
|
-
type Usage as Usage,
|
|
297
|
-
type UserMessage as UserMessage,
|
|
298
|
-
};
|
|
299
|
-
|
|
300
|
-
export { Responses as Responses, type ResponseCreateParams as ResponseCreateParams };
|
|
301
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
export {
|
|
4
|
-
Agents,
|
|
5
|
-
type AssistantMessage,
|
|
6
|
-
type CreateResponseRequest,
|
|
7
|
-
type ErrorResponse,
|
|
8
|
-
type FunctionCall,
|
|
9
|
-
type InputItem,
|
|
10
|
-
type InputTextContent,
|
|
11
|
-
type OutputItem,
|
|
12
|
-
type OutputTextContent,
|
|
13
|
-
type Response,
|
|
14
|
-
type ResponseStatus,
|
|
15
|
-
type StringContent,
|
|
16
|
-
type SystemMessage,
|
|
17
|
-
type Usage,
|
|
18
|
-
type UserMessage,
|
|
19
|
-
} from './agents';
|
|
20
|
-
export { Responses, type ResponseCreateParams } from './responses';
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as AgentsAPI from './agents';
|
|
5
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
|
-
import { path } from '../../../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
export class Responses extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Create a new agent response. Supports synchronous, streaming, and background
|
|
12
|
-
* execution modes.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const response =
|
|
17
|
-
* await client.experimental.agents.responses.create({
|
|
18
|
-
* namespace: 'namespace',
|
|
19
|
-
* });
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
create(body: ResponseCreateParams, options?: RequestOptions): APIPromise<AgentsAPI.Response> {
|
|
23
|
-
return this._client.post('/agents/responses', { body, ...options });
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Get the status and result of an agent response by ID. Used to poll background
|
|
28
|
-
* responses.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* const response =
|
|
33
|
-
* await client.experimental.agents.responses.get('id');
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
get(id: string, options?: RequestOptions): APIPromise<AgentsAPI.Response> {
|
|
37
|
-
return this._client.get(path`/agents/responses/${id}`, options);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface ResponseCreateParams {
|
|
42
|
-
/**
|
|
43
|
-
* Smithery namespace for tool discovery
|
|
44
|
-
*/
|
|
45
|
-
namespace: string;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Run in background for long-running tasks
|
|
49
|
-
*/
|
|
50
|
-
background?: boolean;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Input text or array of messages
|
|
54
|
-
*/
|
|
55
|
-
input?: string | Array<AgentsAPI.InputItem> | null;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Additional system instructions
|
|
59
|
-
*/
|
|
60
|
-
instructions?: string | null;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Maximum output tokens
|
|
64
|
-
*/
|
|
65
|
-
max_output_tokens?: number | null;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Maximum tool calls before stopping
|
|
69
|
-
*/
|
|
70
|
-
max_tool_calls?: number | null;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Request metadata
|
|
74
|
-
*/
|
|
75
|
-
metadata?: { [key: string]: string } | null;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Model to use
|
|
79
|
-
*/
|
|
80
|
-
model?: string | null;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Previous response ID for multi-turn
|
|
84
|
-
*/
|
|
85
|
-
previous_response_id?: string | null;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Enable streaming response
|
|
89
|
-
*/
|
|
90
|
-
stream?: boolean;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Temperature for generation
|
|
94
|
-
*/
|
|
95
|
-
temperature?: number | null;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Top-p sampling
|
|
99
|
-
*/
|
|
100
|
-
top_p?: number | null;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export declare namespace Responses {
|
|
104
|
-
export { type ResponseCreateParams as ResponseCreateParams };
|
|
105
|
-
}
|