@apify/actors-mcp-server 0.1.22 → 0.1.24-beta.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.
Files changed (121) hide show
  1. package/README.md +58 -2
  2. package/dist/actor/const.d.ts +12 -0
  3. package/dist/actor/const.d.ts.map +1 -0
  4. package/dist/actor/const.js +18 -0
  5. package/dist/actor/const.js.map +1 -0
  6. package/dist/actor/server.d.ts +4 -0
  7. package/dist/actor/server.d.ts.map +1 -0
  8. package/dist/actor/server.js +158 -0
  9. package/dist/actor/server.js.map +1 -0
  10. package/dist/actor/types.d.ts +23 -0
  11. package/dist/actor/types.d.ts.map +1 -0
  12. package/dist/actor/types.js +2 -0
  13. package/dist/actor/types.js.map +1 -0
  14. package/dist/actor/utils.d.ts +3 -0
  15. package/dist/actor/utils.d.ts.map +1 -0
  16. package/dist/actor/utils.js +26 -0
  17. package/dist/actor/utils.js.map +1 -0
  18. package/dist/apify-client.d.ts +7 -0
  19. package/dist/apify-client.d.ts.map +1 -0
  20. package/dist/apify-client.js +30 -0
  21. package/dist/apify-client.js.map +1 -0
  22. package/dist/const.d.ts +15 -19
  23. package/dist/const.d.ts.map +1 -1
  24. package/dist/const.js +23 -23
  25. package/dist/const.js.map +1 -1
  26. package/dist/examples/clientSse.d.ts +11 -1
  27. package/dist/examples/clientSse.d.ts.map +1 -1
  28. package/dist/examples/clientSse.js +13 -10
  29. package/dist/examples/clientSse.js.map +1 -1
  30. package/dist/examples/clientStdio.js +6 -6
  31. package/dist/examples/clientStdio.js.map +1 -1
  32. package/dist/examples/clientStdioChat.js +31 -16
  33. package/dist/examples/clientStdioChat.js.map +1 -1
  34. package/dist/examples/clientStreamableHttp.d.ts +2 -0
  35. package/dist/examples/clientStreamableHttp.d.ts.map +1 -0
  36. package/dist/examples/clientStreamableHttp.js +93 -0
  37. package/dist/examples/clientStreamableHttp.js.map +1 -0
  38. package/dist/index.d.ts +2 -14
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +6 -51
  41. package/dist/index.js.map +1 -1
  42. package/dist/input.d.ts +1 -1
  43. package/dist/input.d.ts.map +1 -1
  44. package/dist/input.js +15 -7
  45. package/dist/input.js.map +1 -1
  46. package/dist/main.d.ts +4 -0
  47. package/dist/main.d.ts.map +1 -1
  48. package/dist/main.js +22 -120
  49. package/dist/main.js.map +1 -1
  50. package/dist/mcp/actors.d.ts +22 -0
  51. package/dist/mcp/actors.d.ts.map +1 -0
  52. package/dist/mcp/actors.js +76 -0
  53. package/dist/mcp/actors.js.map +1 -0
  54. package/dist/mcp/client.d.ts +6 -0
  55. package/dist/mcp/client.d.ts.map +1 -0
  56. package/dist/mcp/client.js +33 -0
  57. package/dist/mcp/client.js.map +1 -0
  58. package/dist/mcp/const.d.ts +3 -0
  59. package/dist/mcp/const.d.ts.map +1 -0
  60. package/dist/mcp/const.js +3 -0
  61. package/dist/mcp/const.js.map +1 -0
  62. package/dist/mcp/proxy.d.ts +4 -0
  63. package/dist/mcp/proxy.d.ts.map +1 -0
  64. package/dist/mcp/proxy.js +29 -0
  65. package/dist/mcp/proxy.js.map +1 -0
  66. package/dist/mcp/server.d.ts +41 -0
  67. package/dist/mcp/server.d.ts.map +1 -0
  68. package/dist/mcp/server.js +187 -0
  69. package/dist/mcp/server.js.map +1 -0
  70. package/dist/mcp/utils.d.ts +26 -0
  71. package/dist/mcp/utils.d.ts.map +1 -0
  72. package/dist/mcp/utils.js +53 -0
  73. package/dist/mcp/utils.js.map +1 -0
  74. package/dist/stdio.d.ts +15 -0
  75. package/dist/stdio.d.ts.map +1 -0
  76. package/dist/stdio.js +57 -0
  77. package/dist/stdio.js.map +1 -0
  78. package/dist/tools/actor.d.ts +40 -0
  79. package/dist/tools/actor.d.ts.map +1 -0
  80. package/dist/tools/actor.js +138 -0
  81. package/dist/tools/actor.js.map +1 -0
  82. package/dist/tools/build.d.ts +13 -0
  83. package/dist/tools/build.d.ts.map +1 -0
  84. package/dist/tools/build.js +122 -0
  85. package/dist/tools/build.js.map +1 -0
  86. package/dist/tools/helpers.d.ts +19 -0
  87. package/dist/tools/helpers.d.ts.map +1 -0
  88. package/dist/tools/helpers.js +62 -0
  89. package/dist/tools/helpers.js.map +1 -0
  90. package/dist/tools/index.d.ts +6 -0
  91. package/dist/tools/index.d.ts.map +1 -0
  92. package/dist/tools/index.js +8 -0
  93. package/dist/tools/index.js.map +1 -0
  94. package/dist/tools/store_collection.d.ts +21 -0
  95. package/dist/tools/store_collection.d.ts.map +1 -0
  96. package/dist/tools/store_collection.js +82 -0
  97. package/dist/tools/store_collection.js.map +1 -0
  98. package/dist/tools/utils.d.ts +77 -0
  99. package/dist/tools/utils.d.ts.map +1 -0
  100. package/dist/tools/utils.js +202 -0
  101. package/dist/tools/utils.js.map +1 -0
  102. package/dist/tsconfig.tsbuildinfo +1 -1
  103. package/dist/types.d.ts +97 -10
  104. package/dist/types.d.ts.map +1 -1
  105. package/package.json +17 -14
  106. package/dist/actors.d.ts +0 -74
  107. package/dist/actors.d.ts.map +0 -1
  108. package/dist/actors.js +0 -327
  109. package/dist/actors.js.map +0 -1
  110. package/dist/logger.d.ts +0 -3
  111. package/dist/logger.d.ts.map +0 -1
  112. package/dist/logger.js +0 -4
  113. package/dist/logger.js.map +0 -1
  114. package/dist/server.d.ts +0 -43
  115. package/dist/server.d.ts.map +0 -1
  116. package/dist/server.js +0 -178
  117. package/dist/server.js.map +0 -1
  118. package/dist/tools.d.ts +0 -46
  119. package/dist/tools.d.ts.map +0 -1
  120. package/dist/tools.js +0 -128
  121. package/dist/tools.js.map +0 -1
@@ -0,0 +1,77 @@
1
+ import type { IActorInputSchema, ISchemaProperties } from '../types.js';
2
+ export declare function actorNameToToolName(actorName: string): string;
3
+ /**
4
+ * Builds nested properties for object types in the schema.
5
+ *
6
+ * Specifically handles special cases like proxy configuration and request list sources
7
+ * by adding predefined nested properties to these object types.
8
+ * This is necessary for the agent to correctly infer how to structure object inputs
9
+ * when passing arguments to the Actor.
10
+ *
11
+ * For proxy objects (type='object', editor='proxy'), adds 'useApifyProxy' property.
12
+ * For request list sources (type='array', editor='requestListSources'), adds URL structure to items.
13
+ *
14
+ * @param {Record<string, ISchemaProperties>} properties - The input schema properties
15
+ * @returns {Record<string, ISchemaProperties>} Modified properties with nested properties
16
+ */
17
+ export declare function buildNestedProperties(properties: Record<string, ISchemaProperties>): Record<string, ISchemaProperties>;
18
+ /**
19
+ * Filters schema properties to include only the necessary fields.
20
+ *
21
+ * This is done to reduce the size of the input schema and to make it more readable.
22
+ *
23
+ * @param properties
24
+ */
25
+ export declare function filterSchemaProperties(properties: {
26
+ [key: string]: ISchemaProperties;
27
+ }): {
28
+ [key: string]: ISchemaProperties;
29
+ };
30
+ /**
31
+ * Marks input properties as required by adding a "REQUIRED" prefix to their descriptions.
32
+ * Takes an IActorInput object and returns a modified Record of SchemaProperties.
33
+ *
34
+ * This is done for maximum compatibility in case where library or agent framework does not consider
35
+ * required fields and does not handle the JSON schema properly: we are prepending this to the description
36
+ * as a preventive measure.
37
+ * @param {IActorInputSchema} input - Actor input object containing properties and required fields
38
+ * @returns {Record<string, ISchemaProperties>} - Modified properties with required fields marked
39
+ */
40
+ export declare function markInputPropertiesAsRequired(input: IActorInputSchema): Record<string, ISchemaProperties>;
41
+ /**
42
+ * Helps determine the type of items in an array schema property.
43
+ * Priority order: explicit type in items > prefill type > default value type > editor type.
44
+ *
45
+ * Based on JSON schema, the array needs a type, and most of the time Actor input schema does not have this, so we need to infer that.
46
+ *
47
+ */
48
+ export declare function inferArrayItemType(property: ISchemaProperties): string | null;
49
+ /**
50
+ * Add enum values as string to property descriptions.
51
+ *
52
+ * This is done as a preventive measure to prevent cases where library or agent framework
53
+ * does not handle enums or examples based on JSON schema definition.
54
+ *
55
+ * https://json-schema.org/understanding-json-schema/reference/enum
56
+ * https://json-schema.org/understanding-json-schema/reference/annotations
57
+ *
58
+ * @param properties
59
+ */
60
+ export declare function addEnumsToDescriptionsWithExamples(properties: Record<string, ISchemaProperties>): Record<string, ISchemaProperties>;
61
+ /**
62
+ * Helper function to shorten the enum list if it is too long.
63
+ *
64
+ * @param {string[]} enumList - The list of enum values to be shortened.
65
+ * @returns {string[] | undefined} - The shortened enum list or undefined if the list is too long.
66
+ */
67
+ export declare function shortenEnum(enumList: string[]): string[] | undefined;
68
+ /**
69
+ * Shortens the description, enum, and items.enum properties of the schema properties.
70
+ * @param properties
71
+ */
72
+ export declare function shortenProperties(properties: {
73
+ [key: string]: ISchemaProperties;
74
+ }): {
75
+ [key: string]: ISchemaProperties;
76
+ };
77
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/tools/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAExE,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAK7D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAwCtH;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAE,GAAG;IACtF,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CACnC,CA2BA;AAED;;;;;;;;;GASG;AACH,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAazG;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAgB7E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kCAAkC,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAYnI;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,SAAS,CAQpE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CAAE,GAAG;IACjF,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAAA;CACnC,CAgBA"}
@@ -0,0 +1,202 @@
1
+ import { ACTOR_ENUM_MAX_LENGTH, ACTOR_MAX_DESCRIPTION_LENGTH } from '../const.js';
2
+ export function actorNameToToolName(actorName) {
3
+ return actorName
4
+ .replace(/\//g, '-slash-')
5
+ .replace(/\./g, '-dot-')
6
+ .slice(0, 64);
7
+ }
8
+ /**
9
+ * Builds nested properties for object types in the schema.
10
+ *
11
+ * Specifically handles special cases like proxy configuration and request list sources
12
+ * by adding predefined nested properties to these object types.
13
+ * This is necessary for the agent to correctly infer how to structure object inputs
14
+ * when passing arguments to the Actor.
15
+ *
16
+ * For proxy objects (type='object', editor='proxy'), adds 'useApifyProxy' property.
17
+ * For request list sources (type='array', editor='requestListSources'), adds URL structure to items.
18
+ *
19
+ * @param {Record<string, ISchemaProperties>} properties - The input schema properties
20
+ * @returns {Record<string, ISchemaProperties>} Modified properties with nested properties
21
+ */
22
+ export function buildNestedProperties(properties) {
23
+ const clonedProperties = { ...properties };
24
+ for (const [propertyName, property] of Object.entries(clonedProperties)) {
25
+ if (property.type === 'object' && property.editor === 'proxy') {
26
+ clonedProperties[propertyName] = {
27
+ ...property,
28
+ properties: {
29
+ ...property.properties,
30
+ useApifyProxy: {
31
+ title: 'Use Apify Proxy',
32
+ type: 'boolean',
33
+ description: 'Whether to use Apify Proxy - ALWAYS SET TO TRUE.',
34
+ default: true,
35
+ examples: [true],
36
+ },
37
+ },
38
+ required: ['useApifyProxy'],
39
+ };
40
+ }
41
+ else if (property.type === 'array' && property.editor === 'requestListSources') {
42
+ clonedProperties[propertyName] = {
43
+ ...property,
44
+ items: {
45
+ ...property.items,
46
+ type: 'object',
47
+ title: 'Request list source',
48
+ description: 'Request list source',
49
+ properties: {
50
+ url: {
51
+ title: 'URL',
52
+ type: 'string',
53
+ description: 'URL of the request list source',
54
+ },
55
+ },
56
+ },
57
+ };
58
+ }
59
+ }
60
+ return clonedProperties;
61
+ }
62
+ /**
63
+ * Filters schema properties to include only the necessary fields.
64
+ *
65
+ * This is done to reduce the size of the input schema and to make it more readable.
66
+ *
67
+ * @param properties
68
+ */
69
+ export function filterSchemaProperties(properties) {
70
+ var _a, _b, _c;
71
+ const filteredProperties = {};
72
+ for (const [key, property] of Object.entries(properties)) {
73
+ filteredProperties[key] = {
74
+ title: property.title,
75
+ description: property.description,
76
+ enum: property.enum,
77
+ type: property.type,
78
+ default: property.default,
79
+ prefill: property.prefill,
80
+ properties: property.properties,
81
+ items: property.items,
82
+ required: property.required,
83
+ };
84
+ if (property.type === 'array' && !((_a = property.items) === null || _a === void 0 ? void 0 : _a.type)) {
85
+ const itemsType = inferArrayItemType(property);
86
+ if (itemsType) {
87
+ filteredProperties[key].items = {
88
+ ...filteredProperties[key].items,
89
+ title: (_b = filteredProperties[key].title) !== null && _b !== void 0 ? _b : 'Item',
90
+ description: (_c = filteredProperties[key].description) !== null && _c !== void 0 ? _c : 'Item',
91
+ type: itemsType,
92
+ };
93
+ }
94
+ }
95
+ }
96
+ return filteredProperties;
97
+ }
98
+ /**
99
+ * Marks input properties as required by adding a "REQUIRED" prefix to their descriptions.
100
+ * Takes an IActorInput object and returns a modified Record of SchemaProperties.
101
+ *
102
+ * This is done for maximum compatibility in case where library or agent framework does not consider
103
+ * required fields and does not handle the JSON schema properly: we are prepending this to the description
104
+ * as a preventive measure.
105
+ * @param {IActorInputSchema} input - Actor input object containing properties and required fields
106
+ * @returns {Record<string, ISchemaProperties>} - Modified properties with required fields marked
107
+ */
108
+ export function markInputPropertiesAsRequired(input) {
109
+ const { required = [], properties } = input;
110
+ for (const property of Object.keys(properties)) {
111
+ if (required.includes(property)) {
112
+ properties[property] = {
113
+ ...properties[property],
114
+ description: `**REQUIRED** ${properties[property].description}`,
115
+ };
116
+ }
117
+ }
118
+ return properties;
119
+ }
120
+ /**
121
+ * Helps determine the type of items in an array schema property.
122
+ * Priority order: explicit type in items > prefill type > default value type > editor type.
123
+ *
124
+ * Based on JSON schema, the array needs a type, and most of the time Actor input schema does not have this, so we need to infer that.
125
+ *
126
+ */
127
+ export function inferArrayItemType(property) {
128
+ var _a;
129
+ return ((_a = property.items) === null || _a === void 0 ? void 0 : _a.type)
130
+ || (Array.isArray(property.prefill) && property.prefill.length > 0 && typeof property.prefill[0])
131
+ || (Array.isArray(property.default) && property.default.length > 0 && typeof property.default[0])
132
+ || (property.editor && getEditorItemType(property.editor))
133
+ || null;
134
+ function getEditorItemType(editor) {
135
+ const editorTypeMap = {
136
+ requestListSources: 'object',
137
+ stringList: 'string',
138
+ json: 'object',
139
+ globs: 'object',
140
+ };
141
+ return editorTypeMap[editor] || null;
142
+ }
143
+ }
144
+ /**
145
+ * Add enum values as string to property descriptions.
146
+ *
147
+ * This is done as a preventive measure to prevent cases where library or agent framework
148
+ * does not handle enums or examples based on JSON schema definition.
149
+ *
150
+ * https://json-schema.org/understanding-json-schema/reference/enum
151
+ * https://json-schema.org/understanding-json-schema/reference/annotations
152
+ *
153
+ * @param properties
154
+ */
155
+ export function addEnumsToDescriptionsWithExamples(properties) {
156
+ var _a;
157
+ for (const property of Object.values(properties)) {
158
+ if (property.enum && property.enum.length > 0) {
159
+ property.description = `${property.description}\nPossible values: ${property.enum.slice(0, 20).join(',')}`;
160
+ }
161
+ const value = (_a = property.prefill) !== null && _a !== void 0 ? _a : property.default;
162
+ if (value && !(Array.isArray(value) && value.length === 0)) {
163
+ property.examples = Array.isArray(value) ? value : [value];
164
+ property.description = `${property.description}\nExample values: ${JSON.stringify(value)}`;
165
+ }
166
+ }
167
+ return properties;
168
+ }
169
+ /**
170
+ * Helper function to shorten the enum list if it is too long.
171
+ *
172
+ * @param {string[]} enumList - The list of enum values to be shortened.
173
+ * @returns {string[] | undefined} - The shortened enum list or undefined if the list is too long.
174
+ */
175
+ export function shortenEnum(enumList) {
176
+ let charCount = 0;
177
+ const resultEnumList = enumList.filter((enumValue) => {
178
+ charCount += enumValue.length;
179
+ return charCount <= ACTOR_ENUM_MAX_LENGTH;
180
+ });
181
+ return resultEnumList.length > 0 ? resultEnumList : undefined;
182
+ }
183
+ /**
184
+ * Shortens the description, enum, and items.enum properties of the schema properties.
185
+ * @param properties
186
+ */
187
+ export function shortenProperties(properties) {
188
+ var _a, _b;
189
+ for (const property of Object.values(properties)) {
190
+ if (property.description.length > ACTOR_MAX_DESCRIPTION_LENGTH) {
191
+ property.description = `${property.description.slice(0, ACTOR_MAX_DESCRIPTION_LENGTH)}...`;
192
+ }
193
+ if (property.enum && ((_a = property.enum) === null || _a === void 0 ? void 0 : _a.length) > 0) {
194
+ property.enum = shortenEnum(property.enum);
195
+ }
196
+ if (((_b = property.items) === null || _b === void 0 ? void 0 : _b.enum) && property.items.enum.length > 0) {
197
+ property.items.enum = shortenEnum(property.items.enum);
198
+ }
199
+ }
200
+ return properties;
201
+ }
202
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/tools/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAGlF,MAAM,UAAU,mBAAmB,CAAC,SAAiB;IACjD,OAAO,SAAS;SACX,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC;SACzB,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC;SACvB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACtB,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAA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