syllable-sdk 1.0.8-rc.2 → 1.0.8

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 (41) hide show
  1. package/bin/mcp-server.js +135 -59
  2. package/bin/mcp-server.js.map +13 -12
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/lib/config.js.map +1 -1
  8. package/mcp-server/mcp-server.js +1 -1
  9. package/mcp-server/mcp-server.js.map +1 -1
  10. package/mcp-server/server.js +1 -1
  11. package/mcp-server/server.js.map +1 -1
  12. package/models/components/daotoolresponse.d.ts +80 -0
  13. package/models/components/daotoolresponse.d.ts.map +1 -0
  14. package/models/components/daotoolresponse.js +111 -0
  15. package/models/components/daotoolresponse.js.map +1 -0
  16. package/models/components/index.d.ts +1 -0
  17. package/models/components/index.d.ts.map +1 -1
  18. package/models/components/index.js +1 -0
  19. package/models/components/index.js.map +1 -1
  20. package/models/components/promptcreaterequest.d.ts +5 -0
  21. package/models/components/promptcreaterequest.d.ts.map +1 -1
  22. package/models/components/promptcreaterequest.js +4 -0
  23. package/models/components/promptcreaterequest.js.map +1 -1
  24. package/models/components/promptresponse.d.ts +11 -0
  25. package/models/components/promptresponse.d.ts.map +1 -1
  26. package/models/components/promptresponse.js +9 -0
  27. package/models/components/promptresponse.js.map +1 -1
  28. package/models/components/promptupdaterequest.d.ts +5 -0
  29. package/models/components/promptupdaterequest.d.ts.map +1 -1
  30. package/models/components/promptupdaterequest.js +4 -0
  31. package/models/components/promptupdaterequest.js.map +1 -1
  32. package/openapi.json +243 -33
  33. package/package.json +1 -1
  34. package/src/lib/config.ts +3 -3
  35. package/src/mcp-server/mcp-server.ts +1 -1
  36. package/src/mcp-server/server.ts +1 -1
  37. package/src/models/components/daotoolresponse.ts +171 -0
  38. package/src/models/components/index.ts +1 -0
  39. package/src/models/components/promptcreaterequest.ts +9 -0
  40. package/src/models/components/promptresponse.ts +24 -0
  41. package/src/models/components/promptupdaterequest.ts +9 -0
@@ -0,0 +1,171 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ ToolAgentInfo,
12
+ ToolAgentInfo$inboundSchema,
13
+ ToolAgentInfo$Outbound,
14
+ ToolAgentInfo$outboundSchema,
15
+ } from "./toolagentinfo.js";
16
+ import {
17
+ ToolDefinition,
18
+ ToolDefinition$inboundSchema,
19
+ ToolDefinition$Outbound,
20
+ ToolDefinition$outboundSchema,
21
+ } from "./tooldefinition.js";
22
+ import {
23
+ ToolPromptInfo,
24
+ ToolPromptInfo$inboundSchema,
25
+ ToolPromptInfo$Outbound,
26
+ ToolPromptInfo$outboundSchema,
27
+ } from "./toolpromptinfo.js";
28
+
29
+ export type DaoToolResponse = {
30
+ /**
31
+ * The name of the tool
32
+ */
33
+ name: string;
34
+ /**
35
+ * A tool that can be called from an LLM during the conversation. See https://docs.syllable.ai/Resources/Tools.
36
+ */
37
+ definition: ToolDefinition;
38
+ /**
39
+ * Internal ID of the service to which the tool belongs
40
+ */
41
+ serviceId: number;
42
+ /**
43
+ * The internal ID of the tool
44
+ */
45
+ id: number;
46
+ /**
47
+ * Comments for the most recent edit to the tool.
48
+ */
49
+ lastUpdatedComments?: string | null | undefined;
50
+ /**
51
+ * The name of the service to which the tool belongs
52
+ */
53
+ serviceName?: string | null | undefined;
54
+ /**
55
+ * IDs and names of the prompts linked to the tool
56
+ */
57
+ promptsInfo?: Array<ToolPromptInfo> | null | undefined;
58
+ /**
59
+ * IDs and names of the agents linked to the tool via a prompt
60
+ */
61
+ agentsInfo?: Array<ToolAgentInfo> | null | undefined;
62
+ /**
63
+ * The timestamp of the most recent update to the tool
64
+ */
65
+ lastUpdated: Date;
66
+ /**
67
+ * The email of the user who last updated the tool
68
+ */
69
+ lastUpdatedBy: string;
70
+ };
71
+
72
+ /** @internal */
73
+ export const DaoToolResponse$inboundSchema: z.ZodType<
74
+ DaoToolResponse,
75
+ z.ZodTypeDef,
76
+ unknown
77
+ > = z.object({
78
+ name: z.string(),
79
+ definition: ToolDefinition$inboundSchema,
80
+ service_id: z.number().int(),
81
+ id: z.number().int(),
82
+ last_updated_comments: z.nullable(z.string()).optional(),
83
+ service_name: z.nullable(z.string()).optional(),
84
+ prompts_info: z.nullable(z.array(ToolPromptInfo$inboundSchema)).optional(),
85
+ agents_info: z.nullable(z.array(ToolAgentInfo$inboundSchema)).optional(),
86
+ last_updated: z.string().datetime({ offset: true }).transform(v =>
87
+ new Date(v)
88
+ ),
89
+ last_updated_by: z.string(),
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ "service_id": "serviceId",
93
+ "last_updated_comments": "lastUpdatedComments",
94
+ "service_name": "serviceName",
95
+ "prompts_info": "promptsInfo",
96
+ "agents_info": "agentsInfo",
97
+ "last_updated": "lastUpdated",
98
+ "last_updated_by": "lastUpdatedBy",
99
+ });
100
+ });
101
+
102
+ /** @internal */
103
+ export type DaoToolResponse$Outbound = {
104
+ name: string;
105
+ definition: ToolDefinition$Outbound;
106
+ service_id: number;
107
+ id: number;
108
+ last_updated_comments?: string | null | undefined;
109
+ service_name?: string | null | undefined;
110
+ prompts_info?: Array<ToolPromptInfo$Outbound> | null | undefined;
111
+ agents_info?: Array<ToolAgentInfo$Outbound> | null | undefined;
112
+ last_updated: string;
113
+ last_updated_by: string;
114
+ };
115
+
116
+ /** @internal */
117
+ export const DaoToolResponse$outboundSchema: z.ZodType<
118
+ DaoToolResponse$Outbound,
119
+ z.ZodTypeDef,
120
+ DaoToolResponse
121
+ > = z.object({
122
+ name: z.string(),
123
+ definition: ToolDefinition$outboundSchema,
124
+ serviceId: z.number().int(),
125
+ id: z.number().int(),
126
+ lastUpdatedComments: z.nullable(z.string()).optional(),
127
+ serviceName: z.nullable(z.string()).optional(),
128
+ promptsInfo: z.nullable(z.array(ToolPromptInfo$outboundSchema)).optional(),
129
+ agentsInfo: z.nullable(z.array(ToolAgentInfo$outboundSchema)).optional(),
130
+ lastUpdated: z.date().transform(v => v.toISOString()),
131
+ lastUpdatedBy: z.string(),
132
+ }).transform((v) => {
133
+ return remap$(v, {
134
+ serviceId: "service_id",
135
+ lastUpdatedComments: "last_updated_comments",
136
+ serviceName: "service_name",
137
+ promptsInfo: "prompts_info",
138
+ agentsInfo: "agents_info",
139
+ lastUpdated: "last_updated",
140
+ lastUpdatedBy: "last_updated_by",
141
+ });
142
+ });
143
+
144
+ /**
145
+ * @internal
146
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
147
+ */
148
+ export namespace DaoToolResponse$ {
149
+ /** @deprecated use `DaoToolResponse$inboundSchema` instead. */
150
+ export const inboundSchema = DaoToolResponse$inboundSchema;
151
+ /** @deprecated use `DaoToolResponse$outboundSchema` instead. */
152
+ export const outboundSchema = DaoToolResponse$outboundSchema;
153
+ /** @deprecated use `DaoToolResponse$Outbound` instead. */
154
+ export type Outbound = DaoToolResponse$Outbound;
155
+ }
156
+
157
+ export function daoToolResponseToJSON(
158
+ daoToolResponse: DaoToolResponse,
159
+ ): string {
160
+ return JSON.stringify(DaoToolResponse$outboundSchema.parse(daoToolResponse));
161
+ }
162
+
163
+ export function daoToolResponseFromJSON(
164
+ jsonString: string,
165
+ ): SafeParseResult<DaoToolResponse, SDKValidationError> {
166
+ return safeParse(
167
+ jsonString,
168
+ (x) => DaoToolResponse$inboundSchema.parse(JSON.parse(x)),
169
+ `Failed to parse 'DaoToolResponse' from JSON`,
170
+ );
171
+ }
@@ -51,6 +51,7 @@ export * from "./custommessageproperties.js";
51
51
  export * from "./custommessageresponse.js";
52
52
  export * from "./custommessagerule.js";
53
53
  export * from "./custommessageupdaterequest.js";
54
+ export * from "./daotoolresponse.js";
54
55
  export * from "./dashboard.js";
55
56
  export * from "./dashboardproperties.js";
56
57
  export * from "./dashboardresponse.js";
@@ -46,6 +46,10 @@ export type PromptCreateRequest = {
46
46
  * Whether session end functionality is enabled for this prompt
47
47
  */
48
48
  sessionEndEnabled?: boolean | undefined;
49
+ /**
50
+ * ID of the optional session end tool associated with the prompt
51
+ */
52
+ sessionEndToolId?: number | null | undefined;
49
53
  /**
50
54
  * The comments for the most recent edit to the prompt
51
55
  */
@@ -69,12 +73,14 @@ export const PromptCreateRequest$inboundSchema: z.ZodType<
69
73
  tools: z.array(z.string()).optional(),
70
74
  llm_config: PromptLlmConfig$inboundSchema,
71
75
  session_end_enabled: z.boolean().default(false),
76
+ session_end_tool_id: z.nullable(z.number().int()).optional(),
72
77
  edit_comments: z.nullable(z.string()).optional(),
73
78
  include_default_tools: z.boolean().default(true),
74
79
  }).transform((v) => {
75
80
  return remap$(v, {
76
81
  "llm_config": "llmConfig",
77
82
  "session_end_enabled": "sessionEndEnabled",
83
+ "session_end_tool_id": "sessionEndToolId",
78
84
  "edit_comments": "editComments",
79
85
  "include_default_tools": "includeDefaultTools",
80
86
  });
@@ -89,6 +95,7 @@ export type PromptCreateRequest$Outbound = {
89
95
  tools?: Array<string> | undefined;
90
96
  llm_config: PromptLlmConfig$Outbound;
91
97
  session_end_enabled: boolean;
98
+ session_end_tool_id?: number | null | undefined;
92
99
  edit_comments?: string | null | undefined;
93
100
  include_default_tools: boolean;
94
101
  };
@@ -106,12 +113,14 @@ export const PromptCreateRequest$outboundSchema: z.ZodType<
106
113
  tools: z.array(z.string()).optional(),
107
114
  llmConfig: PromptLlmConfig$outboundSchema,
108
115
  sessionEndEnabled: z.boolean().default(false),
116
+ sessionEndToolId: z.nullable(z.number().int()).optional(),
109
117
  editComments: z.nullable(z.string()).optional(),
110
118
  includeDefaultTools: z.boolean().default(true),
111
119
  }).transform((v) => {
112
120
  return remap$(v, {
113
121
  llmConfig: "llm_config",
114
122
  sessionEndEnabled: "session_end_enabled",
123
+ sessionEndToolId: "session_end_tool_id",
115
124
  editComments: "edit_comments",
116
125
  includeDefaultTools: "include_default_tools",
117
126
  });
@@ -7,6 +7,12 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ DaoToolResponse,
12
+ DaoToolResponse$inboundSchema,
13
+ DaoToolResponse$Outbound,
14
+ DaoToolResponse$outboundSchema,
15
+ } from "./daotoolresponse.js";
10
16
  import {
11
17
  PromptLlmConfig,
12
18
  PromptLlmConfig$inboundSchema,
@@ -60,6 +66,10 @@ export type PromptResponse = {
60
66
  * Whether session end functionality is enabled for this prompt
61
67
  */
62
68
  sessionEndEnabled?: boolean | undefined;
69
+ /**
70
+ * ID of the optional session end tool associated with the prompt
71
+ */
72
+ sessionEndToolId?: number | null | undefined;
63
73
  /**
64
74
  * The comments for the most recent edit to the prompt
65
75
  */
@@ -76,6 +86,10 @@ export type PromptResponse = {
76
86
  * Email address of the user who most recently updated the prompt
77
87
  */
78
88
  lastUpdatedBy?: string | null | undefined;
89
+ /**
90
+ * The session end tool associated with the prompt
91
+ */
92
+ sessionEndTool?: DaoToolResponse | null | undefined;
79
93
  /**
80
94
  * The number of agents using the prompt
81
95
  */
@@ -103,10 +117,12 @@ export const PromptResponse$inboundSchema: z.ZodType<
103
117
  tools: z.array(z.string()).optional(),
104
118
  llm_config: PromptLlmConfig$inboundSchema,
105
119
  session_end_enabled: z.boolean().default(false),
120
+ session_end_tool_id: z.nullable(z.number().int()).optional(),
106
121
  edit_comments: z.nullable(z.string()).optional(),
107
122
  id: z.number().int(),
108
123
  last_updated: z.nullable(z.string()),
109
124
  last_updated_by: z.nullable(z.string()).optional(),
125
+ session_end_tool: z.nullable(DaoToolResponse$inboundSchema).optional(),
110
126
  agent_count: z.nullable(z.number().int()).optional(),
111
127
  version_number: z.nullable(z.number().int()).optional(),
112
128
  tools_full: z.nullable(z.array(ToolResponse$inboundSchema)).optional(),
@@ -114,9 +130,11 @@ export const PromptResponse$inboundSchema: z.ZodType<
114
130
  return remap$(v, {
115
131
  "llm_config": "llmConfig",
116
132
  "session_end_enabled": "sessionEndEnabled",
133
+ "session_end_tool_id": "sessionEndToolId",
117
134
  "edit_comments": "editComments",
118
135
  "last_updated": "lastUpdated",
119
136
  "last_updated_by": "lastUpdatedBy",
137
+ "session_end_tool": "sessionEndTool",
120
138
  "agent_count": "agentCount",
121
139
  "version_number": "versionNumber",
122
140
  "tools_full": "toolsFull",
@@ -132,10 +150,12 @@ export type PromptResponse$Outbound = {
132
150
  tools?: Array<string> | undefined;
133
151
  llm_config: PromptLlmConfig$Outbound;
134
152
  session_end_enabled: boolean;
153
+ session_end_tool_id?: number | null | undefined;
135
154
  edit_comments?: string | null | undefined;
136
155
  id: number;
137
156
  last_updated: string | null;
138
157
  last_updated_by?: string | null | undefined;
158
+ session_end_tool?: DaoToolResponse$Outbound | null | undefined;
139
159
  agent_count?: number | null | undefined;
140
160
  version_number?: number | null | undefined;
141
161
  tools_full?: Array<ToolResponse$Outbound> | null | undefined;
@@ -154,10 +174,12 @@ export const PromptResponse$outboundSchema: z.ZodType<
154
174
  tools: z.array(z.string()).optional(),
155
175
  llmConfig: PromptLlmConfig$outboundSchema,
156
176
  sessionEndEnabled: z.boolean().default(false),
177
+ sessionEndToolId: z.nullable(z.number().int()).optional(),
157
178
  editComments: z.nullable(z.string()).optional(),
158
179
  id: z.number().int(),
159
180
  lastUpdated: z.nullable(z.string()),
160
181
  lastUpdatedBy: z.nullable(z.string()).optional(),
182
+ sessionEndTool: z.nullable(DaoToolResponse$outboundSchema).optional(),
161
183
  agentCount: z.nullable(z.number().int()).optional(),
162
184
  versionNumber: z.nullable(z.number().int()).optional(),
163
185
  toolsFull: z.nullable(z.array(ToolResponse$outboundSchema)).optional(),
@@ -165,9 +187,11 @@ export const PromptResponse$outboundSchema: z.ZodType<
165
187
  return remap$(v, {
166
188
  llmConfig: "llm_config",
167
189
  sessionEndEnabled: "session_end_enabled",
190
+ sessionEndToolId: "session_end_tool_id",
168
191
  editComments: "edit_comments",
169
192
  lastUpdated: "last_updated",
170
193
  lastUpdatedBy: "last_updated_by",
194
+ sessionEndTool: "session_end_tool",
171
195
  agentCount: "agent_count",
172
196
  versionNumber: "version_number",
173
197
  toolsFull: "tools_full",
@@ -46,6 +46,10 @@ export type PromptUpdateRequest = {
46
46
  * Whether session end functionality is enabled for this prompt
47
47
  */
48
48
  sessionEndEnabled?: boolean | undefined;
49
+ /**
50
+ * ID of the optional session end tool associated with the prompt
51
+ */
52
+ sessionEndToolId?: number | null | undefined;
49
53
  /**
50
54
  * The comments for the most recent edit to the prompt
51
55
  */
@@ -73,6 +77,7 @@ export const PromptUpdateRequest$inboundSchema: z.ZodType<
73
77
  tools: z.array(z.string()).optional(),
74
78
  llm_config: PromptLlmConfig$inboundSchema,
75
79
  session_end_enabled: z.boolean().default(false),
80
+ session_end_tool_id: z.nullable(z.number().int()).optional(),
76
81
  edit_comments: z.nullable(z.string()).optional(),
77
82
  id: z.number().int(),
78
83
  include_default_tools: z.boolean().default(true),
@@ -80,6 +85,7 @@ export const PromptUpdateRequest$inboundSchema: z.ZodType<
80
85
  return remap$(v, {
81
86
  "llm_config": "llmConfig",
82
87
  "session_end_enabled": "sessionEndEnabled",
88
+ "session_end_tool_id": "sessionEndToolId",
83
89
  "edit_comments": "editComments",
84
90
  "include_default_tools": "includeDefaultTools",
85
91
  });
@@ -94,6 +100,7 @@ export type PromptUpdateRequest$Outbound = {
94
100
  tools?: Array<string> | undefined;
95
101
  llm_config: PromptLlmConfig$Outbound;
96
102
  session_end_enabled: boolean;
103
+ session_end_tool_id?: number | null | undefined;
97
104
  edit_comments?: string | null | undefined;
98
105
  id: number;
99
106
  include_default_tools: boolean;
@@ -112,6 +119,7 @@ export const PromptUpdateRequest$outboundSchema: z.ZodType<
112
119
  tools: z.array(z.string()).optional(),
113
120
  llmConfig: PromptLlmConfig$outboundSchema,
114
121
  sessionEndEnabled: z.boolean().default(false),
122
+ sessionEndToolId: z.nullable(z.number().int()).optional(),
115
123
  editComments: z.nullable(z.string()).optional(),
116
124
  id: z.number().int(),
117
125
  includeDefaultTools: z.boolean().default(true),
@@ -119,6 +127,7 @@ export const PromptUpdateRequest$outboundSchema: z.ZodType<
119
127
  return remap$(v, {
120
128
  llmConfig: "llm_config",
121
129
  sessionEndEnabled: "session_end_enabled",
130
+ sessionEndToolId: "session_end_tool_id",
122
131
  editComments: "edit_comments",
123
132
  includeDefaultTools: "include_default_tools",
124
133
  });