@inkeep/agents-manage-mcp 0.0.0-chat-to-edit-20251119155821 → 0.0.0-chat-to-edit-20251119164038
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/esm/funcs/conversationsGetConversation.d.ts +17 -0
- package/esm/funcs/conversationsGetConversation.d.ts.map +1 -0
- package/esm/funcs/conversationsGetConversation.js +111 -0
- package/esm/funcs/conversationsGetConversation.js.map +1 -0
- package/esm/hooks/auth-hook.d.ts +9 -0
- package/esm/hooks/auth-hook.d.ts.map +1 -0
- package/esm/hooks/auth-hook.js +28 -0
- package/esm/hooks/auth-hook.js.map +1 -0
- package/esm/hooks/registration.d.ts.map +1 -1
- package/esm/hooks/registration.js +3 -4
- package/esm/hooks/registration.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +3 -1
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/conversationsGetConversation.d.ts +7 -0
- package/esm/mcp-server/tools/conversationsGetConversation.d.ts.map +1 -0
- package/esm/mcp-server/tools/conversationsGetConversation.js +35 -0
- package/esm/mcp-server/tools/conversationsGetConversation.js.map +1 -0
- package/esm/models/conversationwithformattedmessagesresponse.d.ts +15 -0
- package/esm/models/conversationwithformattedmessagesresponse.d.ts.map +1 -0
- package/esm/models/conversationwithformattedmessagesresponse.js +15 -0
- package/esm/models/conversationwithformattedmessagesresponse.js.map +1 -0
- package/esm/models/getconversationop.d.ts +30 -0
- package/esm/models/getconversationop.d.ts.map +1 -0
- package/esm/models/getconversationop.js +31 -0
- package/esm/models/getconversationop.js.map +1 -0
- package/esm/models/mcptool.d.ts +1 -0
- package/esm/models/mcptool.d.ts.map +1 -1
- package/esm/models/mcptool.js +1 -0
- package/esm/models/mcptool.js.map +1 -1
- package/manifest.json +5 -1
- package/openapi.json +173 -0
- package/package.json +1 -1
- package/src/funcs/conversationsGetConversation.ts +201 -0
- package/src/hooks/auth-hook.ts +32 -0
- package/src/hooks/registration.ts +3 -4
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/conversationsGetConversation.ts +40 -0
- package/src/models/conversationwithformattedmessagesresponse.ts +37 -0
- package/src/models/getconversationop.ts +66 -0
- package/src/models/mcptool.ts +2 -0
package/openapi.json
CHANGED
|
@@ -3636,6 +3636,40 @@
|
|
|
3636
3636
|
}
|
|
3637
3637
|
}
|
|
3638
3638
|
},
|
|
3639
|
+
"ConversationWithFormattedMessagesResponse": {
|
|
3640
|
+
"type": "object",
|
|
3641
|
+
"properties": {
|
|
3642
|
+
"data": {
|
|
3643
|
+
"type": "object",
|
|
3644
|
+
"properties": {
|
|
3645
|
+
"messages": {
|
|
3646
|
+
"type": "array",
|
|
3647
|
+
"items": {
|
|
3648
|
+
"nullable": true
|
|
3649
|
+
}
|
|
3650
|
+
},
|
|
3651
|
+
"formatted": {
|
|
3652
|
+
"type": "object",
|
|
3653
|
+
"properties": {
|
|
3654
|
+
"llmContext": {
|
|
3655
|
+
"type": "string"
|
|
3656
|
+
}
|
|
3657
|
+
},
|
|
3658
|
+
"required": [
|
|
3659
|
+
"llmContext"
|
|
3660
|
+
]
|
|
3661
|
+
}
|
|
3662
|
+
},
|
|
3663
|
+
"required": [
|
|
3664
|
+
"messages",
|
|
3665
|
+
"formatted"
|
|
3666
|
+
]
|
|
3667
|
+
}
|
|
3668
|
+
},
|
|
3669
|
+
"required": [
|
|
3670
|
+
"data"
|
|
3671
|
+
]
|
|
3672
|
+
},
|
|
3639
3673
|
"CredentialReference": {
|
|
3640
3674
|
"type": "object",
|
|
3641
3675
|
"properties": {
|
|
@@ -4946,6 +4980,9 @@
|
|
|
4946
4980
|
"version": {
|
|
4947
4981
|
"type": "string"
|
|
4948
4982
|
},
|
|
4983
|
+
"expiresAt": {
|
|
4984
|
+
"type": "string"
|
|
4985
|
+
},
|
|
4949
4986
|
"relationshipId": {
|
|
4950
4987
|
"type": "string"
|
|
4951
4988
|
}
|
|
@@ -12330,6 +12367,142 @@
|
|
|
12330
12367
|
}
|
|
12331
12368
|
}
|
|
12332
12369
|
},
|
|
12370
|
+
"/tenants/{tenantId}/projects/{projectId}/conversations/{id}": {
|
|
12371
|
+
"get": {
|
|
12372
|
+
"summary": "Get Conversation",
|
|
12373
|
+
"operationId": "get-conversation",
|
|
12374
|
+
"tags": [
|
|
12375
|
+
"Conversations"
|
|
12376
|
+
],
|
|
12377
|
+
"parameters": [
|
|
12378
|
+
{
|
|
12379
|
+
"schema": {
|
|
12380
|
+
"$ref": "#/components/schemas/TenantIdPathParam"
|
|
12381
|
+
},
|
|
12382
|
+
"required": true,
|
|
12383
|
+
"description": "Tenant identifier",
|
|
12384
|
+
"name": "tenantId",
|
|
12385
|
+
"in": "path"
|
|
12386
|
+
},
|
|
12387
|
+
{
|
|
12388
|
+
"schema": {
|
|
12389
|
+
"$ref": "#/components/schemas/ProjectIdPathParam"
|
|
12390
|
+
},
|
|
12391
|
+
"required": true,
|
|
12392
|
+
"description": "Project identifier",
|
|
12393
|
+
"name": "projectId",
|
|
12394
|
+
"in": "path"
|
|
12395
|
+
},
|
|
12396
|
+
{
|
|
12397
|
+
"schema": {
|
|
12398
|
+
"type": "string",
|
|
12399
|
+
"minLength": 1,
|
|
12400
|
+
"maxLength": 255,
|
|
12401
|
+
"pattern": "^[a-zA-Z0-9\\-_.]+$",
|
|
12402
|
+
"description": "Resource identifier",
|
|
12403
|
+
"example": "resource_789"
|
|
12404
|
+
},
|
|
12405
|
+
"required": true,
|
|
12406
|
+
"description": "Resource identifier",
|
|
12407
|
+
"name": "id",
|
|
12408
|
+
"in": "path"
|
|
12409
|
+
},
|
|
12410
|
+
{
|
|
12411
|
+
"schema": {
|
|
12412
|
+
"type": "number",
|
|
12413
|
+
"minimum": 1,
|
|
12414
|
+
"maximum": 200,
|
|
12415
|
+
"default": 20
|
|
12416
|
+
},
|
|
12417
|
+
"required": false,
|
|
12418
|
+
"name": "limit",
|
|
12419
|
+
"in": "query"
|
|
12420
|
+
},
|
|
12421
|
+
{
|
|
12422
|
+
"schema": {
|
|
12423
|
+
"type": "boolean",
|
|
12424
|
+
"nullable": true,
|
|
12425
|
+
"default": false
|
|
12426
|
+
},
|
|
12427
|
+
"required": false,
|
|
12428
|
+
"name": "includeInternal",
|
|
12429
|
+
"in": "query"
|
|
12430
|
+
}
|
|
12431
|
+
],
|
|
12432
|
+
"responses": {
|
|
12433
|
+
"200": {
|
|
12434
|
+
"description": "Conversation found with formatted messages for LLM use",
|
|
12435
|
+
"content": {
|
|
12436
|
+
"application/json": {
|
|
12437
|
+
"schema": {
|
|
12438
|
+
"$ref": "#/components/schemas/ConversationWithFormattedMessagesResponse"
|
|
12439
|
+
}
|
|
12440
|
+
}
|
|
12441
|
+
}
|
|
12442
|
+
},
|
|
12443
|
+
"400": {
|
|
12444
|
+
"description": "Bad Request",
|
|
12445
|
+
"content": {
|
|
12446
|
+
"application/problem+json": {
|
|
12447
|
+
"schema": {
|
|
12448
|
+
"$ref": "#/components/schemas/BadRequest"
|
|
12449
|
+
}
|
|
12450
|
+
}
|
|
12451
|
+
}
|
|
12452
|
+
},
|
|
12453
|
+
"401": {
|
|
12454
|
+
"description": "Unauthorized",
|
|
12455
|
+
"content": {
|
|
12456
|
+
"application/problem+json": {
|
|
12457
|
+
"schema": {
|
|
12458
|
+
"$ref": "#/components/schemas/Unauthorized"
|
|
12459
|
+
}
|
|
12460
|
+
}
|
|
12461
|
+
}
|
|
12462
|
+
},
|
|
12463
|
+
"403": {
|
|
12464
|
+
"description": "Forbidden",
|
|
12465
|
+
"content": {
|
|
12466
|
+
"application/problem+json": {
|
|
12467
|
+
"schema": {
|
|
12468
|
+
"$ref": "#/components/schemas/Forbidden"
|
|
12469
|
+
}
|
|
12470
|
+
}
|
|
12471
|
+
}
|
|
12472
|
+
},
|
|
12473
|
+
"404": {
|
|
12474
|
+
"description": "Not Found",
|
|
12475
|
+
"content": {
|
|
12476
|
+
"application/problem+json": {
|
|
12477
|
+
"schema": {
|
|
12478
|
+
"$ref": "#/components/schemas/NotFound"
|
|
12479
|
+
}
|
|
12480
|
+
}
|
|
12481
|
+
}
|
|
12482
|
+
},
|
|
12483
|
+
"422": {
|
|
12484
|
+
"description": "Unprocessable Entity",
|
|
12485
|
+
"content": {
|
|
12486
|
+
"application/problem+json": {
|
|
12487
|
+
"schema": {
|
|
12488
|
+
"$ref": "#/components/schemas/UnprocessableEntity"
|
|
12489
|
+
}
|
|
12490
|
+
}
|
|
12491
|
+
}
|
|
12492
|
+
},
|
|
12493
|
+
"500": {
|
|
12494
|
+
"description": "Internal Server Error",
|
|
12495
|
+
"content": {
|
|
12496
|
+
"application/problem+json": {
|
|
12497
|
+
"schema": {
|
|
12498
|
+
"$ref": "#/components/schemas/InternalServerError"
|
|
12499
|
+
}
|
|
12500
|
+
}
|
|
12501
|
+
}
|
|
12502
|
+
}
|
|
12503
|
+
}
|
|
12504
|
+
}
|
|
12505
|
+
},
|
|
12333
12506
|
"/tenants/{tenantId}/projects/{projectId}/credentials": {
|
|
12334
12507
|
"get": {
|
|
12335
12508
|
"summary": "List Credentials",
|
package/package.json
CHANGED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { InkeepAgentsCore } from '../core.js';
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from '../lib/encodings.js';
|
|
7
|
+
import * as M from '../lib/matchers.js';
|
|
8
|
+
import { compactMap } from '../lib/primitives.js';
|
|
9
|
+
import { safeParse } from '../lib/schemas.js';
|
|
10
|
+
import { RequestOptions } from '../lib/sdks.js';
|
|
11
|
+
import { pathToFunc } from '../lib/url.js';
|
|
12
|
+
import { APIError } from '../models/errors/apierror.js';
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from '../models/errors/httpclienterrors.js';
|
|
20
|
+
import { SDKValidationError } from '../models/errors/sdkvalidationerror.js';
|
|
21
|
+
import {
|
|
22
|
+
GetConversationRequest,
|
|
23
|
+
GetConversationRequest$zodSchema,
|
|
24
|
+
GetConversationResponse,
|
|
25
|
+
GetConversationResponse$zodSchema,
|
|
26
|
+
} from '../models/getconversationop.js';
|
|
27
|
+
import { APICall, APIPromise } from '../types/async.js';
|
|
28
|
+
import { Result } from '../types/fp.js';
|
|
29
|
+
|
|
30
|
+
export enum GetConversationAcceptEnum {
|
|
31
|
+
applicationJsonAccept = 'application/json',
|
|
32
|
+
applicationProblemPlusJsonAccept = 'application/problem+json',
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get Conversation
|
|
37
|
+
*/
|
|
38
|
+
export function conversationsGetConversation(
|
|
39
|
+
client$: InkeepAgentsCore,
|
|
40
|
+
request: GetConversationRequest,
|
|
41
|
+
options?: RequestOptions
|
|
42
|
+
): APIPromise<
|
|
43
|
+
Result<
|
|
44
|
+
GetConversationResponse,
|
|
45
|
+
| APIError
|
|
46
|
+
| SDKValidationError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| InvalidRequestError
|
|
49
|
+
| RequestAbortedError
|
|
50
|
+
| RequestTimeoutError
|
|
51
|
+
| ConnectionError
|
|
52
|
+
>
|
|
53
|
+
> {
|
|
54
|
+
return new APIPromise($do(client$, request, options));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function $do(
|
|
58
|
+
client$: InkeepAgentsCore,
|
|
59
|
+
request: GetConversationRequest,
|
|
60
|
+
options?: RequestOptions & {
|
|
61
|
+
acceptHeaderOverride?: GetConversationAcceptEnum;
|
|
62
|
+
}
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
GetConversationResponse,
|
|
67
|
+
| APIError
|
|
68
|
+
| SDKValidationError
|
|
69
|
+
| UnexpectedClientError
|
|
70
|
+
| InvalidRequestError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| ConnectionError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed$ = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value$) => GetConversationRequest$zodSchema.parse(value$),
|
|
81
|
+
'Input validation failed'
|
|
82
|
+
);
|
|
83
|
+
if (!parsed$.ok) {
|
|
84
|
+
return [parsed$, { status: 'invalid' }];
|
|
85
|
+
}
|
|
86
|
+
const payload$ = parsed$.value;
|
|
87
|
+
const body$ = null;
|
|
88
|
+
|
|
89
|
+
const pathParams$ = {
|
|
90
|
+
id: encodeSimple('id', payload$.id, {
|
|
91
|
+
explode: false,
|
|
92
|
+
charEncoding: 'percent',
|
|
93
|
+
}),
|
|
94
|
+
projectId: encodeSimple('projectId', payload$.projectId, {
|
|
95
|
+
explode: false,
|
|
96
|
+
charEncoding: 'percent',
|
|
97
|
+
}),
|
|
98
|
+
tenantId: encodeSimple('tenantId', payload$.tenantId, {
|
|
99
|
+
explode: false,
|
|
100
|
+
charEncoding: 'percent',
|
|
101
|
+
}),
|
|
102
|
+
};
|
|
103
|
+
const path$ = pathToFunc('/tenants/{tenantId}/projects/{projectId}/conversations/{id}')(
|
|
104
|
+
pathParams$
|
|
105
|
+
);
|
|
106
|
+
const query$ = encodeFormQuery({
|
|
107
|
+
includeInternal: payload$.includeInternal,
|
|
108
|
+
limit: payload$.limit,
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
const headers$ = new Headers(
|
|
112
|
+
compactMap({
|
|
113
|
+
Accept: options?.acceptHeaderOverride || 'application/json;q=1, application/problem+json;q=0',
|
|
114
|
+
})
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
const context = {
|
|
118
|
+
options: client$._options,
|
|
119
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? '',
|
|
120
|
+
operationID: 'get-conversation',
|
|
121
|
+
oAuth2Scopes: null,
|
|
122
|
+
resolvedSecurity: null,
|
|
123
|
+
securitySource: null,
|
|
124
|
+
retryConfig: options?.retries || client$._options.retryConfig || { strategy: 'none' },
|
|
125
|
+
retryCodes: options?.retryCodes || ['429', '500', '502', '503', '504'],
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
const requestRes = client$._createRequest(
|
|
129
|
+
context,
|
|
130
|
+
{
|
|
131
|
+
method: 'GET',
|
|
132
|
+
baseURL: options?.serverURL,
|
|
133
|
+
path: path$,
|
|
134
|
+
headers: headers$,
|
|
135
|
+
query: query$,
|
|
136
|
+
body: body$,
|
|
137
|
+
userAgent: client$._options.userAgent,
|
|
138
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1,
|
|
139
|
+
},
|
|
140
|
+
options
|
|
141
|
+
);
|
|
142
|
+
if (!requestRes.ok) {
|
|
143
|
+
return [requestRes, { status: 'invalid' }];
|
|
144
|
+
}
|
|
145
|
+
const req$ = requestRes.value;
|
|
146
|
+
|
|
147
|
+
const doResult = await client$._do(req$, {
|
|
148
|
+
context,
|
|
149
|
+
errorCodes: [],
|
|
150
|
+
retryConfig: context.retryConfig,
|
|
151
|
+
retryCodes: context.retryCodes,
|
|
152
|
+
});
|
|
153
|
+
if (!doResult.ok) {
|
|
154
|
+
return [doResult, { status: 'request-error', request: req$ }];
|
|
155
|
+
}
|
|
156
|
+
const response = doResult.value;
|
|
157
|
+
const responseFields$ = {
|
|
158
|
+
HttpMeta: { Response: response, Request: req$ },
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const [result$] = await M.match<
|
|
162
|
+
GetConversationResponse,
|
|
163
|
+
| APIError
|
|
164
|
+
| SDKValidationError
|
|
165
|
+
| UnexpectedClientError
|
|
166
|
+
| InvalidRequestError
|
|
167
|
+
| RequestAbortedError
|
|
168
|
+
| RequestTimeoutError
|
|
169
|
+
| ConnectionError
|
|
170
|
+
>(
|
|
171
|
+
M.json(200, GetConversationResponse$zodSchema, {
|
|
172
|
+
key: 'ConversationWithFormattedMessagesResponse',
|
|
173
|
+
}),
|
|
174
|
+
M.json(400, GetConversationResponse$zodSchema, {
|
|
175
|
+
ctype: 'application/problem+json',
|
|
176
|
+
key: 'BadRequest',
|
|
177
|
+
}),
|
|
178
|
+
M.json(401, GetConversationResponse$zodSchema, {
|
|
179
|
+
ctype: 'application/problem+json',
|
|
180
|
+
key: 'Unauthorized',
|
|
181
|
+
}),
|
|
182
|
+
M.json(403, GetConversationResponse$zodSchema, {
|
|
183
|
+
ctype: 'application/problem+json',
|
|
184
|
+
key: 'Forbidden',
|
|
185
|
+
}),
|
|
186
|
+
M.json(404, GetConversationResponse$zodSchema, {
|
|
187
|
+
ctype: 'application/problem+json',
|
|
188
|
+
key: 'NotFound',
|
|
189
|
+
}),
|
|
190
|
+
M.json(422, GetConversationResponse$zodSchema, {
|
|
191
|
+
ctype: 'application/problem+json',
|
|
192
|
+
key: 'UnprocessableEntity',
|
|
193
|
+
}),
|
|
194
|
+
M.json(500, GetConversationResponse$zodSchema, {
|
|
195
|
+
ctype: 'application/problem+json',
|
|
196
|
+
key: 'InternalServerError',
|
|
197
|
+
})
|
|
198
|
+
)(response, req$, { extraFields: responseFields$ });
|
|
199
|
+
|
|
200
|
+
return [result$, { status: 'complete', request: req$, response }];
|
|
201
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { BeforeRequestContext, BeforeRequestHook } from './types.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* AuthHook adds bypass authentication to all SDK requests.
|
|
5
|
+
* This hook injects the Authorization header from SDK options into every outgoing request.
|
|
6
|
+
*/
|
|
7
|
+
export class AuthHook implements BeforeRequestHook {
|
|
8
|
+
async beforeRequest(_hookCtx: BeforeRequestContext, request: Request): Promise<Request> {
|
|
9
|
+
// Inject bypass secret if configured, regardless of environment
|
|
10
|
+
const bypassSecret = process.env['INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET'];
|
|
11
|
+
|
|
12
|
+
if (bypassSecret) {
|
|
13
|
+
// Log that we're injecting auth (console.log since this is in the MCP package without a logger)
|
|
14
|
+
if (process.env['LOG_LEVEL'] === 'debug' || process.env['LOG_LEVEL'] === 'trace') {
|
|
15
|
+
console.log('[AuthHook] Injecting bypass auth for request:', {
|
|
16
|
+
method: request.method,
|
|
17
|
+
url: request.url,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const newRequest = new Request(request, {
|
|
22
|
+
headers: {
|
|
23
|
+
...Object.fromEntries(request.headers.entries()),
|
|
24
|
+
Authorization: `Bearer ${bypassSecret}`,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
return newRequest;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return request;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AuthHook } from './auth-hook.js';
|
|
1
2
|
import type { Hooks } from './types.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
@@ -6,9 +7,7 @@ import type { Hooks } from './types.js';
|
|
|
6
7
|
* in this file or in separate files in the hooks folder.
|
|
7
8
|
*/
|
|
8
9
|
|
|
9
|
-
// @ts-expect-error remove this line when you add your first hook and hooks is used
|
|
10
10
|
export function initHooks(hooks: Hooks) {
|
|
11
|
-
//
|
|
12
|
-
|
|
13
|
-
// Hooks are registered per SDK instance, and are valid for the lifetime of the SDK instance
|
|
11
|
+
// Register the authentication hook to inject bypass secret into all requests
|
|
12
|
+
hooks.registerBeforeRequestHook(new AuthHook());
|
|
14
13
|
}
|
package/src/lib/config.ts
CHANGED
|
@@ -59,7 +59,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
59
59
|
export const SDK_METADATA = {
|
|
60
60
|
language: 'typescript',
|
|
61
61
|
openapiDocVersion: '1.0.0',
|
|
62
|
-
sdkVersion: '0.0.
|
|
62
|
+
sdkVersion: '0.0.12',
|
|
63
63
|
genVersion: '2.755.9',
|
|
64
|
-
userAgent: 'speakeasy-sdk/mcp-typescript 0.0.
|
|
64
|
+
userAgent: 'speakeasy-sdk/mcp-typescript 0.0.12 2.755.9 1.0.0 @inkeep/agents-manage-mcp',
|
|
65
65
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -42,6 +42,7 @@ import { tool$contextConfigDeleteContextConfig } from './tools/contextConfigDele
|
|
|
42
42
|
import { tool$contextConfigGetContextConfigById } from './tools/contextConfigGetContextConfigById.js';
|
|
43
43
|
import { tool$contextConfigListContextConfigs } from './tools/contextConfigListContextConfigs.js';
|
|
44
44
|
import { tool$contextConfigUpdateContextConfig } from './tools/contextConfigUpdateContextConfig.js';
|
|
45
|
+
import { tool$conversationsGetConversation } from './tools/conversationsGetConversation.js';
|
|
45
46
|
import { tool$credentialCreateCredential } from './tools/credentialCreateCredential.js';
|
|
46
47
|
import { tool$credentialDeleteCredential } from './tools/credentialDeleteCredential.js';
|
|
47
48
|
import { tool$credentialGetCredentialById } from './tools/credentialGetCredentialById.js';
|
|
@@ -129,7 +130,7 @@ export function createMCPServer(deps: {
|
|
|
129
130
|
}) {
|
|
130
131
|
const server = new McpServer({
|
|
131
132
|
name: 'InkeepAgents',
|
|
132
|
-
version: '0.0.
|
|
133
|
+
version: '0.0.12',
|
|
133
134
|
});
|
|
134
135
|
|
|
135
136
|
const getClient =
|
|
@@ -217,6 +218,7 @@ export function createMCPServer(deps: {
|
|
|
217
218
|
tool(tool$contextConfigGetContextConfigById);
|
|
218
219
|
tool(tool$contextConfigUpdateContextConfig);
|
|
219
220
|
tool(tool$contextConfigDeleteContextConfig);
|
|
221
|
+
tool(tool$conversationsGetConversation);
|
|
220
222
|
tool(tool$credentialListCredentials);
|
|
221
223
|
tool(tool$credentialCreateCredential);
|
|
222
224
|
tool(tool$credentialGetCredentialById);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { conversationsGetConversation } from '../../funcs/conversationsGetConversation.js';
|
|
6
|
+
import { GetConversationRequest$zodSchema } from '../../models/getconversationop.js';
|
|
7
|
+
import { formatResult, ToolDefinition } from '../tools.js';
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: GetConversationRequest$zodSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$conversationsGetConversation: ToolDefinition<typeof args> = {
|
|
14
|
+
name: 'conversations-get-conversation',
|
|
15
|
+
description: `Get Conversation`,
|
|
16
|
+
annotations: {
|
|
17
|
+
title: '',
|
|
18
|
+
destructiveHint: false,
|
|
19
|
+
idempotentHint: false,
|
|
20
|
+
openWorldHint: false,
|
|
21
|
+
readOnlyHint: true,
|
|
22
|
+
},
|
|
23
|
+
args,
|
|
24
|
+
tool: async (client, args, ctx) => {
|
|
25
|
+
const [result, apiCall] = await conversationsGetConversation(client, args.request, {
|
|
26
|
+
fetchOptions: { signal: ctx.signal },
|
|
27
|
+
}).$inspect();
|
|
28
|
+
|
|
29
|
+
if (!result.ok) {
|
|
30
|
+
return {
|
|
31
|
+
content: [{ type: 'text', text: result.error.message }],
|
|
32
|
+
isError: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const value = result.value;
|
|
37
|
+
|
|
38
|
+
return formatResult(value, apiCall);
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from 'zod';
|
|
6
|
+
|
|
7
|
+
export type Formatted = { llmContext: string };
|
|
8
|
+
|
|
9
|
+
export const Formatted$zodSchema: z.ZodType<Formatted, z.ZodTypeDef, unknown> = z.object({
|
|
10
|
+
llmContext: z.string(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type ConversationWithFormattedMessagesResponseData = {
|
|
14
|
+
messages: Array<any | null>;
|
|
15
|
+
formatted: Formatted;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const ConversationWithFormattedMessagesResponseData$zodSchema: z.ZodType<
|
|
19
|
+
ConversationWithFormattedMessagesResponseData,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
formatted: z.lazy(() => Formatted$zodSchema),
|
|
24
|
+
messages: z.array(z.any().nullable()),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type ConversationWithFormattedMessagesResponse = {
|
|
28
|
+
data: ConversationWithFormattedMessagesResponseData;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const ConversationWithFormattedMessagesResponse$zodSchema: z.ZodType<
|
|
32
|
+
ConversationWithFormattedMessagesResponse,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
data: z.lazy(() => ConversationWithFormattedMessagesResponseData$zodSchema),
|
|
37
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from 'zod';
|
|
6
|
+
import { BadRequest, BadRequest$zodSchema } from './badrequest.js';
|
|
7
|
+
import {
|
|
8
|
+
ConversationWithFormattedMessagesResponse,
|
|
9
|
+
ConversationWithFormattedMessagesResponse$zodSchema,
|
|
10
|
+
} from './conversationwithformattedmessagesresponse.js';
|
|
11
|
+
import { Forbidden, Forbidden$zodSchema } from './forbidden.js';
|
|
12
|
+
import { InternalServerError, InternalServerError$zodSchema } from './internalservererror.js';
|
|
13
|
+
import { NotFound, NotFound$zodSchema } from './notfound.js';
|
|
14
|
+
import { Unauthorized, Unauthorized$zodSchema } from './unauthorized.js';
|
|
15
|
+
import { UnprocessableEntity, UnprocessableEntity$zodSchema } from './unprocessableentity.js';
|
|
16
|
+
|
|
17
|
+
export type GetConversationRequest = {
|
|
18
|
+
tenantId: string;
|
|
19
|
+
projectId: string;
|
|
20
|
+
id: string;
|
|
21
|
+
limit?: number | undefined;
|
|
22
|
+
includeInternal?: boolean | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const GetConversationRequest$zodSchema: z.ZodType<
|
|
26
|
+
GetConversationRequest,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
id: z.string().describe('Resource identifier'),
|
|
31
|
+
includeInternal: z.boolean().default(false).nullable(),
|
|
32
|
+
limit: z.number().default(20),
|
|
33
|
+
projectId: z.string().describe('Project identifier'),
|
|
34
|
+
tenantId: z.string().describe('Tenant identifier'),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export type GetConversationResponse = {
|
|
38
|
+
ContentType: string;
|
|
39
|
+
StatusCode: number;
|
|
40
|
+
RawResponse: Response;
|
|
41
|
+
ConversationWithFormattedMessagesResponse?: ConversationWithFormattedMessagesResponse | undefined;
|
|
42
|
+
BadRequest?: BadRequest | undefined;
|
|
43
|
+
Unauthorized?: Unauthorized | undefined;
|
|
44
|
+
Forbidden?: Forbidden | undefined;
|
|
45
|
+
NotFound?: NotFound | undefined;
|
|
46
|
+
UnprocessableEntity?: UnprocessableEntity | undefined;
|
|
47
|
+
InternalServerError?: InternalServerError | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const GetConversationResponse$zodSchema: z.ZodType<
|
|
51
|
+
GetConversationResponse,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
BadRequest: BadRequest$zodSchema.optional(),
|
|
56
|
+
ContentType: z.string(),
|
|
57
|
+
ConversationWithFormattedMessagesResponse:
|
|
58
|
+
ConversationWithFormattedMessagesResponse$zodSchema.optional(),
|
|
59
|
+
Forbidden: Forbidden$zodSchema.optional(),
|
|
60
|
+
InternalServerError: InternalServerError$zodSchema.optional(),
|
|
61
|
+
NotFound: NotFound$zodSchema.optional(),
|
|
62
|
+
RawResponse: z.instanceof(Response),
|
|
63
|
+
StatusCode: z.number().int(),
|
|
64
|
+
Unauthorized: Unauthorized$zodSchema.optional(),
|
|
65
|
+
UnprocessableEntity: UnprocessableEntity$zodSchema.optional(),
|
|
66
|
+
});
|
package/src/models/mcptool.ts
CHANGED
|
@@ -98,6 +98,7 @@ export type McpTool = {
|
|
|
98
98
|
availableTools?: Array<AvailableTool> | undefined;
|
|
99
99
|
status?: Status | undefined;
|
|
100
100
|
version?: string | undefined;
|
|
101
|
+
expiresAt?: string | undefined;
|
|
101
102
|
relationshipId?: string | undefined;
|
|
102
103
|
};
|
|
103
104
|
|
|
@@ -108,6 +109,7 @@ export const McpTool$zodSchema: z.ZodType<McpTool, z.ZodTypeDef, unknown> = z.ob
|
|
|
108
109
|
createdAt: z.string().optional(),
|
|
109
110
|
credentialReferenceId: z.string().nullable().optional(),
|
|
110
111
|
description: z.string().nullable().optional(),
|
|
112
|
+
expiresAt: z.string().optional(),
|
|
111
113
|
headers: z.any().nullable().optional(),
|
|
112
114
|
id: z.string(),
|
|
113
115
|
imageUrl: z.string().optional(),
|