@inferencesh/sdk 0.38.9 → 0.38.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/agents.d.ts +2 -2
- package/dist/api/agents.js +2 -2
- package/dist/api/mcp-servers.d.ts +2 -2
- package/dist/api/projects.d.ts +3 -3
- package/dist/api/write-bodies.d.ts +27 -15
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/api/agents.d.ts
CHANGED
|
@@ -165,8 +165,8 @@ export declare class AgentsAPI {
|
|
|
165
165
|
*/
|
|
166
166
|
createAgent(data: CreateAgentRequest): Promise<Response<AgentDTO>>;
|
|
167
167
|
/**
|
|
168
|
-
* Update an agent template: its
|
|
169
|
-
*
|
|
168
|
+
* Update an agent template: its images, and a new version when `version`
|
|
169
|
+
* is set (see AgentUpdateBody). Visibility: `updateVisibility`.
|
|
170
170
|
*/
|
|
171
171
|
update(agentId: string, data: AgentUpdateBody): Promise<Response<AgentDTO>>;
|
|
172
172
|
/**
|
package/dist/api/agents.js
CHANGED
|
@@ -445,8 +445,8 @@ export class AgentsAPI {
|
|
|
445
445
|
return this.http.request('post', '/agents', { data });
|
|
446
446
|
}
|
|
447
447
|
/**
|
|
448
|
-
* Update an agent template: its
|
|
449
|
-
*
|
|
448
|
+
* Update an agent template: its images, and a new version when `version`
|
|
449
|
+
* is set (see AgentUpdateBody). Visibility: `updateVisibility`.
|
|
450
450
|
*/
|
|
451
451
|
async update(agentId, data) {
|
|
452
452
|
return this.http.request('post', `/agents/${agentId}`, { data });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '../http/client.js';
|
|
2
2
|
import type { Response } from '../http/response.js';
|
|
3
|
-
import type { MCPServerUpdateBody } from './write-bodies.js';
|
|
3
|
+
import type { MCPServerCreateBody, MCPServerUpdateBody } from './write-bodies.js';
|
|
4
4
|
import { MCPServerDTO, CursorListRequest, CursorListResponse } from '../types.js';
|
|
5
5
|
/**
|
|
6
6
|
* MCP Servers API
|
|
@@ -35,7 +35,7 @@ export declare class MCPServersAPI {
|
|
|
35
35
|
/**
|
|
36
36
|
* Create an MCP server
|
|
37
37
|
*/
|
|
38
|
-
create(data:
|
|
38
|
+
create(data: MCPServerCreateBody): Promise<Response<MCPServerDTO>>;
|
|
39
39
|
/**
|
|
40
40
|
* Update an MCP server
|
|
41
41
|
*/
|
package/dist/api/projects.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '../http/client.js';
|
|
2
2
|
import type { Response } from '../http/response.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ProjectCreateBody, ProjectUpdateBody } from './write-bodies.js';
|
|
4
4
|
import { ProjectDTO, CursorListRequest, CursorListResponse } from '../types.js';
|
|
5
5
|
/**
|
|
6
6
|
* Projects API
|
|
@@ -19,12 +19,12 @@ export declare class ProjectsAPI {
|
|
|
19
19
|
/**
|
|
20
20
|
* Create a project
|
|
21
21
|
*/
|
|
22
|
-
create(data:
|
|
22
|
+
create(data: ProjectCreateBody): Promise<Response<ProjectDTO>>;
|
|
23
23
|
/**
|
|
24
24
|
* Update a project (PATCH): only the fields sent are written, the others
|
|
25
25
|
* keep their value.
|
|
26
26
|
*/
|
|
27
|
-
update(id: string, data:
|
|
27
|
+
update(id: string, data: ProjectUpdateBody): Promise<Response<ProjectDTO>>;
|
|
28
28
|
/**
|
|
29
29
|
* Delete a project
|
|
30
30
|
*/
|
|
@@ -1,25 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Request bodies of the generic create/update routes.
|
|
3
3
|
*
|
|
4
|
-
* Each type names exactly the fields its route writes
|
|
5
|
-
*
|
|
6
|
-
* fields
|
|
7
|
-
*
|
|
4
|
+
* Each type names exactly the fields its route writes. Send only the fields
|
|
5
|
+
* you change: the API checks every key of a write body against the route's
|
|
6
|
+
* writable fields (go/api docs/writable-fields.md), and in enforce mode it
|
|
7
|
+
* answers 400 `validation_error`, with `meta.fields` naming each field and
|
|
8
|
+
* its reason, to a body carrying an unknown key, a relation (`user`, `team`,
|
|
9
|
+
* `project`, ...) or a read-only field whose value differs from the stored
|
|
10
|
+
* one. Do not send a fetched DTO back. A field with its own endpoint is
|
|
11
|
+
* listed next to the type that cannot set it.
|
|
8
12
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* the fields sent. The SDK's update methods for projects, knowledge, skills,
|
|
13
|
+
* Both a POST /{resource}/{id} update and a PATCH write the fields sent and
|
|
14
|
+
* keep the others. The SDK's update methods for projects, knowledge, skills,
|
|
12
15
|
* chats, engines and teams send PATCH; apps.patch and flows.patch are the
|
|
13
16
|
* partial siblings of the POST updates that also edit a version.
|
|
14
17
|
*/
|
|
15
|
-
import type { AgentConfigInput, ResourceImages, AppDTO, ChatDTO, CredentialRequirements, EngineDTO, FlowDTO, FlowVersionDTO, KnowledgeDTO, ProjectDTO, TeamDTO, Visibility } from '../types.js';
|
|
18
|
+
import type { AgentConfigInput, ResourceImages, AppDTO, ChatDTO, CredentialRequirements, EngineDTO, FlowDTO, FlowVersionDTO, KnowledgeDTO, MCPServerDTO, ProjectDTO, TeamDTO, Visibility } from '../types.js';
|
|
16
19
|
/**
|
|
17
|
-
* POST /agents/{id}.
|
|
18
|
-
* `
|
|
19
|
-
* Project: `agents.moveToProject`; owner:
|
|
20
|
+
* POST /agents/{id}. Images, and a new version when `version` is set.
|
|
21
|
+
* Visibility: `agents.updateVisibility`. Name, title, harness, placement:
|
|
22
|
+
* set at creation. Project: `agents.moveToProject`; owner:
|
|
23
|
+
* `agents.transferOwnership`.
|
|
20
24
|
*/
|
|
21
25
|
export interface AgentUpdateBody {
|
|
22
|
-
visibility?: Visibility;
|
|
23
26
|
images?: ResourceImages;
|
|
24
27
|
version?: AgentConfigInput;
|
|
25
28
|
}
|
|
@@ -62,12 +65,16 @@ export interface FlowViewportBody {
|
|
|
62
65
|
zoom: number;
|
|
63
66
|
}
|
|
64
67
|
/**
|
|
65
|
-
*
|
|
66
|
-
* only; no route changes it afterwards. Parent: none.
|
|
68
|
+
* PATCH /projects/{id}. Name, description, type, color and icon. Visibility
|
|
69
|
+
* is set on create only; no route changes it afterwards. Parent: none.
|
|
67
70
|
*/
|
|
68
|
-
export type
|
|
71
|
+
export type ProjectUpdateBody = Partial<Pick<ProjectDTO, 'name' | 'description' | 'type' | 'color' | 'icon'>>;
|
|
72
|
+
/** POST /projects. The update fields, plus visibility. */
|
|
73
|
+
export type ProjectCreateBody = ProjectUpdateBody & {
|
|
69
74
|
visibility?: Visibility;
|
|
70
75
|
};
|
|
76
|
+
/** @deprecated Use ProjectCreateBody or ProjectUpdateBody. */
|
|
77
|
+
export type ProjectWriteBody = ProjectCreateBody;
|
|
71
78
|
/**
|
|
72
79
|
* PATCH /knowledge/{id} and PATCH /skills/{id}. Copy and lifecycle. Name and
|
|
73
80
|
* type: fixed at creation; content: a new version (`create` with the same
|
|
@@ -85,6 +92,11 @@ export interface KnowledgeUpdateBody {
|
|
|
85
92
|
* and does not change here.
|
|
86
93
|
*/
|
|
87
94
|
export type TeamUpdateBody = Partial<Pick<TeamDTO, 'name' | 'email' | 'avatar_url'>>;
|
|
95
|
+
/**
|
|
96
|
+
* POST /mcp-servers. The server's address, copy, auth and credentials, and
|
|
97
|
+
* its visibility. Owner and namespace come from the caller.
|
|
98
|
+
*/
|
|
99
|
+
export type MCPServerCreateBody = Partial<Pick<MCPServerDTO, 'slug' | 'name' | 'title' | 'description' | 'icon_url' | 'server_url' | 'auth_type' | 'default_scopes' | 'headers' | 'documentation_url' | 'credentials' | 'visibility'>>;
|
|
88
100
|
/**
|
|
89
101
|
* PUT /mcp-servers/{id}. A field left out keeps its value. Title,
|
|
90
102
|
* description, icon URL and documentation URL take what is sent, and ""
|
package/dist/index.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export { FlowRunsAPI } from './api/flow-runs.js';
|
|
|
18
18
|
export { EnginesAPI } from './api/engines.js';
|
|
19
19
|
export { KnowledgeAPI, SkillsAPI } from './api/knowledge.js';
|
|
20
20
|
export { ArtifactsAPI } from './api/artifacts.js';
|
|
21
|
-
export type { AgentUpdateBody, AppPatchBody, AppUpdateBody, ChatUpdateBody, EngineUpdateBody, FlowUpdateBody, FlowPatchBody, FlowViewportBody, ProjectWriteBody, KnowledgeUpdateBody, TeamUpdateBody, MCPServerUpdateBody, } from './api/write-bodies.js';
|
|
21
|
+
export type { AgentUpdateBody, AppPatchBody, AppUpdateBody, ChatUpdateBody, EngineUpdateBody, FlowUpdateBody, FlowPatchBody, FlowViewportBody, ProjectWriteBody, ProjectCreateBody, ProjectUpdateBody, KnowledgeUpdateBody, TeamUpdateBody, MCPServerCreateBody, MCPServerUpdateBody, } from './api/write-bodies.js';
|
|
22
22
|
export { TeamsAPI } from './api/teams.js';
|
|
23
23
|
export { SecretsAPI } from './api/secrets.js';
|
|
24
24
|
export { ApiKeysAPI } from './api/api-keys.js';
|