@apify/actors-mcp-server 0.20.1-beta.2 → 0.20.1-beta.3

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/const.d.ts CHANGED
@@ -80,11 +80,11 @@ export declare const HELPER_TOOLS: {
80
80
  };
81
81
  export type HelperToolName = (typeof HELPER_TOOLS)[keyof typeof HELPER_TOOLS];
82
82
  /**
83
- * Retired tool selectors: `add-actor` and `experimental` (add-actor was deleted in the stateless
84
- * migration), the deprecated `preview` pseudo-category, `get-actor-log` (renamed to
85
- * `get-actor-run-log`), and the `source` category (renamed to `versions`). They name neither a
86
- * registry category nor a real tool anymore, so they resolve to nothing — never loaded, never
87
- * treated as an Actor ID, never requiring a token by themselves.
83
+ * Tool selectors that no longer name a category or a tool: `add-actor` and `experimental` went with
84
+ * the stateless migration, `preview` was deprecated, `get-actor-log` became `get-actor-run-log` and
85
+ * `source` became `versions`. Old configs still send them, so they are dropped before selection and
86
+ * never read as Actor IDs. The token gate drops them before its emptiness check, so `docs,add-actor`
87
+ * needs no token while an all-retired list needs one, like an empty list.
88
88
  */
89
89
  export declare const RETIRED_SELECTOR_NAMES: ReadonlySet<string>;
90
90
  /**
package/dist/const.js CHANGED
@@ -90,11 +90,11 @@ export const HELPER_TOOLS = {
90
90
  PROBLEM_REPORT: 'report-problem',
91
91
  };
92
92
  /**
93
- * Retired tool selectors: `add-actor` and `experimental` (add-actor was deleted in the stateless
94
- * migration), the deprecated `preview` pseudo-category, `get-actor-log` (renamed to
95
- * `get-actor-run-log`), and the `source` category (renamed to `versions`). They name neither a
96
- * registry category nor a real tool anymore, so they resolve to nothing — never loaded, never
97
- * treated as an Actor ID, never requiring a token by themselves.
93
+ * Tool selectors that no longer name a category or a tool: `add-actor` and `experimental` went with
94
+ * the stateless migration, `preview` was deprecated, `get-actor-log` became `get-actor-run-log` and
95
+ * `source` became `versions`. Old configs still send them, so they are dropped before selection and
96
+ * never read as Actor IDs. The token gate drops them before its emptiness check, so `docs,add-actor`
97
+ * needs no token while an all-retired list needs one, like an empty list.
98
98
  */
99
99
  export const RETIRED_SELECTOR_NAMES = new Set([
100
100
  'add-actor',
package/dist/input.d.ts CHANGED
@@ -1,14 +1,8 @@
1
1
  import type { Input } from './types.js';
2
2
  export declare function normalizeList(value: string | unknown[] | undefined): string[] | undefined;
3
3
  /**
4
- * Normalize user-provided input into a canonical `Input`.
5
- *
6
- * Responsibilities:
7
- * - Coerce `actors`, `tools` from string/array into trimmed arrays ('' → []).
8
- * - Merge `actors` into `tools` so selection lives in one place.
9
- *
10
- * Semantics passed to the loader:
11
- * - `undefined` → use defaults; `[]` → explicitly none.
4
+ * Canonicalize `actors` and `tools` into trimmed arrays and merge `actors` into `tools`, so the
5
+ * loader reads one selector list. `undefined` keeps the defaults, `[]` means explicitly none.
12
6
  */
13
7
  export declare function processInput(originalInput: Partial<Input>): Input;
14
8
  //# sourceMappingURL=input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAgB,MAAM,YAAY,CAAC;AAGtD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CASzF;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CA2BjE"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAGxC,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,SAAS,CASzF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAcjE"}
package/dist/input.js CHANGED
@@ -13,36 +13,19 @@ export function normalizeList(value) {
13
13
  .filter((s) => s !== '');
14
14
  }
15
15
  /**
16
- * Normalize user-provided input into a canonical `Input`.
17
- *
18
- * Responsibilities:
19
- * - Coerce `actors`, `tools` from string/array into trimmed arrays ('' → []).
20
- * - Merge `actors` into `tools` so selection lives in one place.
21
- *
22
- * Semantics passed to the loader:
23
- * - `undefined` → use defaults; `[]` → explicitly none.
16
+ * Canonicalize `actors` and `tools` into trimmed arrays and merge `actors` into `tools`, so the
17
+ * loader reads one selector list. `undefined` keeps the defaults, `[]` means explicitly none.
24
18
  */
25
19
  export function processInput(originalInput) {
26
- // Normalize actors (strings and arrays) to a clean array or undefined
27
20
  const actors = normalizeList(originalInput.actors);
28
- // Normalize tools (strings/arrays) to a clean array or undefined
29
21
  let tools = normalizeList(originalInput.tools);
30
- // Merge actors into tools. If tools undefined → tools = actors, then remove actors;
31
- // otherwise append actors to tools.
32
- // NOTE (future): Actor names contain '/', unlike internal tool names or categories. We could use that to differentiate between the two.
22
+ // Actor names contain '/', unlike categories and internal tool names, so the loader can tell them apart.
33
23
  if (Array.isArray(actors) && actors.length > 0) {
34
- if (tools === undefined) {
35
- tools = [...actors];
36
- }
37
- else {
38
- const currentTools = Array.isArray(tools) ? tools : [tools];
39
- tools = [...currentTools, ...actors];
40
- }
24
+ tools = tools === undefined ? [...actors] : [...tools, ...actors];
41
25
  }
42
- // Return a new object with all properties explicitly defined
43
26
  return {
44
27
  ...originalInput,
45
- actors: Array.isArray(actors) && actors.length > 0 && tools !== undefined ? undefined : actors,
28
+ actors: Array.isArray(actors) && actors.length > 0 ? undefined : actors,
46
29
  tools,
47
30
  };
48
31
  }
package/dist/input.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../src/input.ts"],"names":[],"mappings":"AASA,0DAA0D;AAC1D,MAAM,UAAU,aAAa,CAAC,KAAqC;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