@apify/actors-mcp-server 0.11.6-beta.1 → 0.11.6-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.
Files changed (53) hide show
  1. package/dist/mcp/actors.d.ts +0 -4
  2. package/dist/mcp/actors.d.ts.map +1 -1
  3. package/dist/mcp/actors.js +1 -7
  4. package/dist/mcp/actors.js.map +1 -1
  5. package/dist/resources/resource_service.d.ts.map +1 -1
  6. package/dist/resources/resource_service.js +2 -2
  7. package/dist/resources/resource_service.js.map +1 -1
  8. package/dist/resources/widgets.d.ts.map +1 -1
  9. package/dist/resources/widgets.js +5 -5
  10. package/dist/resources/widgets.js.map +1 -1
  11. package/dist/tools/runs/get_actor_run_list.d.ts.map +1 -1
  12. package/dist/tools/runs/get_actor_run_list.js +1 -2
  13. package/dist/tools/runs/get_actor_run_list.js.map +1 -1
  14. package/dist/tools/storage/get_dataset_items.js +1 -1
  15. package/dist/tools/storage/get_dataset_items.js.map +1 -1
  16. package/dist/tools/storage/get_dataset_list.d.ts.map +1 -1
  17. package/dist/tools/storage/get_dataset_list.js +0 -1
  18. package/dist/tools/storage/get_dataset_list.js.map +1 -1
  19. package/dist/tools/storage/get_key_value_store_keys.d.ts.map +1 -1
  20. package/dist/tools/storage/get_key_value_store_keys.js +0 -1
  21. package/dist/tools/storage/get_key_value_store_keys.js.map +1 -1
  22. package/dist/tools/storage/get_key_value_store_list.d.ts.map +1 -1
  23. package/dist/tools/storage/get_key_value_store_list.js +0 -1
  24. package/dist/tools/storage/get_key_value_store_list.js.map +1 -1
  25. package/dist/tools/storage/storage_helpers.d.ts +3 -7
  26. package/dist/tools/storage/storage_helpers.d.ts.map +1 -1
  27. package/dist/tools/storage/storage_helpers.js +5 -10
  28. package/dist/tools/storage/storage_helpers.js.map +1 -1
  29. package/dist/tsconfig.tsbuildinfo +1 -1
  30. package/dist/utils/actor.d.ts +1 -15
  31. package/dist/utils/actor.d.ts.map +1 -1
  32. package/dist/utils/actor.js +0 -62
  33. package/dist/utils/actor.js.map +1 -1
  34. package/dist/utils/encode_text.d.ts +0 -30
  35. package/dist/utils/encode_text.d.ts.map +1 -1
  36. package/dist/utils/encode_text.js +1 -79
  37. package/dist/utils/encode_text.js.map +1 -1
  38. package/dist/utils/generic.d.ts +0 -17
  39. package/dist/utils/generic.d.ts.map +1 -1
  40. package/dist/utils/generic.js +0 -49
  41. package/dist/utils/generic.js.map +1 -1
  42. package/dist/utils/tools.d.ts +0 -10
  43. package/dist/utils/tools.d.ts.map +1 -1
  44. package/dist/utils/tools.js +0 -35
  45. package/dist/utils/tools.js.map +1 -1
  46. package/dist/web/dist/actor-detail-widget.js +171 -462
  47. package/dist/web/dist/actor-run-widget.js +189 -480
  48. package/dist/web/dist/search-actors-widget.js +168 -459
  49. package/package.json +1 -3
  50. package/dist/utils/mcp_clients.d.ts +0 -6
  51. package/dist/utils/mcp_clients.d.ts.map +0 -1
  52. package/dist/utils/mcp_clients.js +0 -21
  53. package/dist/utils/mcp_clients.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import type { ApifyClient } from '../apify_client.js';
2
- import type { ActorDefinitionStorage, ActorDefinitionWithInfo, DatasetItem } from '../types.js';
2
+ import type { ActorDefinitionWithInfo } from '../types.js';
3
3
  /**
4
4
  * Returns the cached Actor definition + info, fetching from the platform on miss
5
5
  * and populating the cache on the way back.
@@ -14,18 +14,4 @@ export declare function getActorDefinitionCached(actorIdOrName: string, apifyCli
14
14
  * `getActorDefinitionCached` instead of a separate cache that would leak a private Actor's URL across tenants.
15
15
  */
16
16
  export declare function getActorMcpUrlCached(actorIdOrName: string, apifyClient: ApifyClient): Promise<string | false>;
17
- /**
18
- * Returns an array of all field names mentioned in the display.properties
19
- * of all views in the given ActorDefinitionStorage object.
20
- */
21
- export declare function getActorDefinitionStorageFieldNames(storage: ActorDefinitionStorage | object): string[];
22
- /**
23
- * Ensures the Actor output items are within the character limit.
24
- *
25
- * First checks if all items fit into the limit, then tries only the important fields and as a last resort
26
- * starts removing items until within the limit. In worst scenario return empty array.
27
- *
28
- * This is primarily used to ensure the tool output does not exceed the LLM context length or tool output limit.
29
- */
30
- export declare function ensureOutputWithinCharLimit(items: DatasetItem[], importantFields: string[], charLimit: number): DatasetItem[];
31
17
  //# sourceMappingURL=actor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../../src/utils/actor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAwBhG;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC1C,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,WAAW,GACzB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAMzC;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAKnH;AAED;;;GAGG;AACH,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,GAAG,MAAM,EAAE,CAiBtG;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACvC,KAAK,EAAE,WAAW,EAAE,EACpB,eAAe,EAAE,MAAM,EAAE,EACzB,SAAS,EAAE,MAAM,GAClB,WAAW,EAAE,CA+Bf"}
1
+ {"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../../src/utils/actor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAItD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAuB3D;;;;;;GAMG;AACH,wBAAsB,wBAAwB,CAC1C,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,WAAW,GACzB,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAMzC;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAKnH"}
@@ -1,7 +1,6 @@
1
1
  import { getActorMCPServerPath, getActorMCPServerURL } from '../mcp/actors.js';
2
2
  import { actorDefinitionCache } from '../state.js';
3
3
  import { getActorDefinition } from '../tools/actors/actor_definition.js';
4
- import { getValuesByDotKeys } from './generic.js';
5
4
  import { getUserInfoCached } from './userid_cache.js';
6
5
  /**
7
6
  * `actorDefinitionCache` is process-wide, so a private Actor's definition must never be served from it to
@@ -52,65 +51,4 @@ export async function getActorMcpUrlCached(actorIdOrName, apifyClient) {
52
51
  return false;
53
52
  return getActorMCPServerURL(definition.id, mcpPath);
54
53
  }
55
- /**
56
- * Returns an array of all field names mentioned in the display.properties
57
- * of all views in the given ActorDefinitionStorage object.
58
- */
59
- export function getActorDefinitionStorageFieldNames(storage) {
60
- const fieldSet = new Set();
61
- if ('views' in storage && typeof storage.views === 'object' && storage.views !== null) {
62
- for (const view of Object.values(storage.views)) {
63
- // Collect from display.properties
64
- if (view.display && view.display.properties) {
65
- Object.keys(view.display.properties).forEach((field) => fieldSet.add(field));
66
- }
67
- // Collect from transformation.fields
68
- if (view.transformation && Array.isArray(view.transformation.fields)) {
69
- view.transformation.fields.forEach((field) => {
70
- if (typeof field === 'string')
71
- fieldSet.add(field);
72
- });
73
- }
74
- }
75
- }
76
- return Array.from(fieldSet);
77
- }
78
- /**
79
- * Ensures the Actor output items are within the character limit.
80
- *
81
- * First checks if all items fit into the limit, then tries only the important fields and as a last resort
82
- * starts removing items until within the limit. In worst scenario return empty array.
83
- *
84
- * This is primarily used to ensure the tool output does not exceed the LLM context length or tool output limit.
85
- */
86
- export function ensureOutputWithinCharLimit(items, importantFields, charLimit) {
87
- // Check if all items fit into the limit
88
- const allItemsString = JSON.stringify(items);
89
- if (allItemsString.length <= charLimit) {
90
- return items;
91
- }
92
- /**
93
- * Items used for the final fallback - removing items until within the limit.
94
- * If important fields are defined, use only those fields for that fallback step.
95
- */
96
- let sourceItems = items;
97
- // Try keeping only the important fields
98
- if (importantFields.length > 0) {
99
- const importantItems = items.map((item) => getValuesByDotKeys(item, importantFields));
100
- const importantItemsString = JSON.stringify(importantItems);
101
- if (importantItemsString.length <= charLimit) {
102
- return importantItems;
103
- }
104
- sourceItems = importantItems;
105
- }
106
- // Start removing items until within the limit
107
- const result = [];
108
- for (const item of sourceItems) {
109
- if (JSON.stringify(result.concat(item)).length > charLimit) {
110
- break;
111
- }
112
- result.push(item);
113
- }
114
- return result;
115
- }
116
54
  //# sourceMappingURL=actor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"actor.js","sourceRoot":"","sources":["../../src/utils/actor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AACH,KAAK,UAAU,uBAAuB,CAAC,MAA+B,EAAE,WAAwB;IAC5F,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,iBAAiB,CAAC,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC3E,OAAO,MAAM,KAAK,IAAI,IAAI,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;AAC5D,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB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,OAAO,MAAM,CAAC;IAClF,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IACrE,IAAI,OAAO;QAAE,oBAAoB,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IAC9D,OAAO,OAAO,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,aAAqB,EAAE,WAAwB;;IACtF,MAAM,UAAU,GAAG,MAAA,CAAC,MAAM,wBAAwB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC,0CAAE,UAAU,CAAC;IAC5F,MAAM,OAAO,GAAG,UAAU,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAChE,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,OAAO,oBAAoB,CAAC,UAAU,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;AACxD,CAAC"}
@@ -1,36 +1,6 @@
1
- /** Markdown code fences keyed by encoding. Labels are ASCII, so char length == byte length. */
2
- export declare const FENCES: {
3
- readonly json: {
4
- readonly prefix: "```json\n";
5
- readonly suffix: "\n```";
6
- };
7
- readonly toon: {
8
- readonly prefix: "```toon\n";
9
- readonly suffix: "\n```";
10
- };
11
- };
12
- /**
13
- * Lifts nested-object keys into dot-joined top-level keys so arrays of uniform objects qualify
14
- * for TOON's tabular form. Arrays are preserved (each object element flattened individually);
15
- * scalars, null, and inline scalar arrays are unchanged. Throws `RangeError` on depth overflow
16
- * or a normalisation collision — the caller drops the TOON candidate and ships JSON.
17
- *
18
- * Lossy w.r.t. the original key names only when a source key contains a literal `.`
19
- * (normalised to `_`); `structuredContent` preserves the originals for programmatic consumers.
20
- */
21
- export declare function dotFlatten(value: unknown): unknown;
22
1
  /**
23
2
  * Wrap a JSON-serialisable value in a ```json code fence. Used by single-object tools, which have
24
3
  * no `structuredContent` fallback, so this can never emit anything but JSON.
25
4
  */
26
5
  export declare function wrapJsonText(value: unknown): string;
27
- /**
28
- * Encodes a JSON-serialisable value as a dot-flattened ```toon code fence for the LLM, falling back
29
- * to a ```json fence only if `dotFlatten`/`encode` throws (depth overflow or a normalisation key
30
- * collision). TOON is the stable shape; JSON is the error path, not a byte-driven alternative.
31
- *
32
- * The text may be TOON — programmatic JSON consumers must read `structuredContent` instead. Only
33
- * wire this on tools that ship `structuredContent` as the JSON fallback.
34
- */
35
- export declare function encodeToon(value: unknown): string;
36
6
  //# sourceMappingURL=encode_text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"encode_text.d.ts","sourceRoot":"","sources":["../../src/utils/encode_text.ts"],"names":[],"mappings":"AAWA,+FAA+F;AAC/F,eAAO,MAAM,MAAM;;;;;;;;;CAGT,CAAC;AAsCX;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAElD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAajD"}
1
+ {"version":3,"file":"encode_text.d.ts","sourceRoot":"","sources":["../../src/utils/encode_text.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD"}
@@ -1,66 +1,11 @@
1
- import { encode } from '@toon-format/toon';
2
- import log from '@apify/log';
3
- /**
4
- * Recursion guard for {@link dotFlatten}. The deepest real Apify-API fixture measured is
5
- * depth 9 (a user-declared dataset schema), so 20 leaves a comfortable margin while still
6
- * stopping runaway recursion on pathological input.
7
- */
8
- const MAX_DEPTH = 20;
9
1
  /** Markdown code fences keyed by encoding. Labels are ASCII, so char length == byte length. */
10
- export const FENCES = {
2
+ const FENCES = {
11
3
  json: { prefix: '```json\n', suffix: '\n```' },
12
- toon: { prefix: '```toon\n', suffix: '\n```' },
13
4
  };
14
5
  /** Wrap an already-encoded body in the Markdown code fence for its format. */
15
6
  function fence(format, body) {
16
7
  return `${FENCES[format].prefix}${body}${FENCES[format].suffix}`;
17
8
  }
18
- function flattenValue(value, depth) {
19
- if (depth > MAX_DEPTH)
20
- throw new RangeError('dotFlatten: max depth exceeded');
21
- if (Array.isArray(value))
22
- return value.map((item) => flattenValue(item, depth + 1));
23
- if (value !== null && typeof value === 'object') {
24
- // Null prototype so `key in out` (below) tests own keys only: source keys named like an
25
- // `Object.prototype` member (`constructor`, `__proto__`, `toString`, …) neither trip a
26
- // false-positive collision nor reach the prototype setter.
27
- const out = Object.create(null);
28
- flattenInto(value, '', depth, out);
29
- return out;
30
- }
31
- return value; // scalar or null — unchanged
32
- }
33
- function flattenInto(obj, prefix, depth, out) {
34
- if (depth > MAX_DEPTH)
35
- throw new RangeError('dotFlatten: max depth exceeded');
36
- for (const [rawKey, v] of Object.entries(obj)) {
37
- // `.` is the nesting separator, so normalise any literal dot in a source key to avoid
38
- // ambiguity. The collision guard below catches the case where this would overwrite a key.
39
- const key = prefix ? `${prefix}.${rawKey.replaceAll('.', '_')}` : rawKey.replaceAll('.', '_');
40
- if (v !== null && typeof v === 'object' && !Array.isArray(v)) {
41
- flattenInto(v, key, depth + 1, out); // lift nested object into dotted keys
42
- }
43
- else {
44
- // Only a genuine normalisation clash remains (`a.b` and `a_b` both map to `a_b`); fail
45
- // loud so the caller drops TOON and ships lossless JSON instead of overwriting silently.
46
- if (key in out)
47
- throw new RangeError(`dotFlatten: key collision on "${key}"`);
48
- out[key] = flattenValue(v, depth + 1); // scalars unchanged; arrays recursed into
49
- }
50
- }
51
- }
52
- /**
53
- * Lifts nested-object keys into dot-joined top-level keys so arrays of uniform objects qualify
54
- * for TOON's tabular form. Arrays are preserved (each object element flattened individually);
55
- * scalars, null, and inline scalar arrays are unchanged. Throws `RangeError` on depth overflow
56
- * or a normalisation collision — the caller drops the TOON candidate and ships JSON.
57
- *
58
- * Lossy w.r.t. the original key names only when a source key contains a literal `.`
59
- * (normalised to `_`); `structuredContent` preserves the originals for programmatic consumers.
60
- */
61
- export function dotFlatten(value) {
62
- return flattenValue(value, 0);
63
- }
64
9
  /**
65
10
  * Wrap a JSON-serialisable value in a ```json code fence. Used by single-object tools, which have
66
11
  * no `structuredContent` fallback, so this can never emit anything but JSON.
@@ -68,27 +13,4 @@ export function dotFlatten(value) {
68
13
  export function wrapJsonText(value) {
69
14
  return fence('json', JSON.stringify(value));
70
15
  }
71
- /**
72
- * Encodes a JSON-serialisable value as a dot-flattened ```toon code fence for the LLM, falling back
73
- * to a ```json fence only if `dotFlatten`/`encode` throws (depth overflow or a normalisation key
74
- * collision). TOON is the stable shape; JSON is the error path, not a byte-driven alternative.
75
- *
76
- * The text may be TOON — programmatic JSON consumers must read `structuredContent` instead. Only
77
- * wire this on tools that ship `structuredContent` as the JSON fallback.
78
- */
79
- export function encodeToon(value) {
80
- // `value` is serialised through JSON so `dotFlatten` works on the JSON data model only: a `Date`
81
- // (or any `toJSON` carrier) becomes its ISO string here, not an empty object. A non-serialisable
82
- // value (circular, BigInt) throws here; API payloads are always JSON, so let it crash.
83
- const jsonStr = JSON.stringify(value);
84
- try {
85
- return fence('toon', encode(dotFlatten(JSON.parse(jsonStr))));
86
- }
87
- catch (err) {
88
- // dotFlatten threw (depth overflow or key collision) or encode failed — ship JSON instead.
89
- // Log it: the fallback is lossless, but a recurring failure means TOON is silently disabled.
90
- log.debug('encodeToon: TOON encoding failed, shipping JSON', { err });
91
- return fence('json', jsonStr);
92
- }
93
- }
94
16
  //# sourceMappingURL=encode_text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"encode_text.js","sourceRoot":"","sources":["../../src/utils/encode_text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,GAAG,MAAM,YAAY,CAAC;AAE7B;;;;GAIG;AACH,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,+FAA+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C;QACD,OAAO,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,2FAA2F;QAC3F,6FAA6F;QAC7F,GAAG,CAAC,KAAK,CAAC,iDAAiD,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACtE,OAAO,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"encode_text.js","sourceRoot":"","sources":["../../src/utils/encode_text.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,MAAM,MAAM,GAAG;IACX,IAAI,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE;CACxC,CAAC;AAEX,8EAA8E;AAC9E,SAAS,KAAK,CAAC,MAA2B,EAAE,IAAY;IACpD,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC;AACrE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAc;IACvC,OAAO,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AAChD,CAAC"}
@@ -32,17 +32,6 @@ export declare function parseCommaSeparatedList(input?: string): string[];
32
32
  * parseQueryParamList(undefined); // []
33
33
  */
34
34
  export declare function parseQueryParamList(param?: string | string[]): string[];
35
- /**
36
- * Recursively gets the value in a nested object for each key in the keys array.
37
- * Each key can be a dot-separated path (e.g. 'a.b.c').
38
- * Returns an object mapping each key to its resolved value (or undefined if not found).
39
- *
40
- * @example
41
- * const obj = { a: { b: { c: 42 } }, nested: { d: 100 } };
42
- * const value = getValuesByDotKeys(obj, ['a.b.c', 'a.b.d', 'nested']);
43
- * value; // { 'a.b.c': 42, 'a.b.d': undefined, 'nested': { d: 100 } }
44
- */
45
- export declare function getValuesByDotKeys(obj: Record<string, unknown>, keys: string[]): Record<string, unknown>;
46
35
  /**
47
36
  * Backtick + straight & smart double-quote chars LLMs wrap user inputs in.
48
37
  * Shared between `stripQuoteWrappers` (which also strips apostrophes from ids)
@@ -53,10 +42,4 @@ export declare const QUOTE_WRAPPER_CHARS = "`\"\u201C\u201D\u2018\u2019";
53
42
  export declare function stripQuoteWrappers(s: string): string;
54
43
  /** Best-effort byte size of a value for summaries. */
55
44
  export declare function computeValueBytes(value: unknown): number | undefined;
56
- /**
57
- * Validates whether a given string is a well-formed URL.
58
- *
59
- * Allows only valid HTTP or HTTPS URLs.
60
- */
61
- export declare function isValidHttpUrl(urlString: string): boolean;
62
45
  //# sourceMappingURL=generic.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../src/utils/generic.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC,CAGxF;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAQhE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAQvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqBxG;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gCAAW,CAAC;AAW5C,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,sDAAsD;AACtD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAQpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAWzD"}
1
+ {"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../src/utils/generic.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,CAAC,GAAG,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC,CAGxF;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAQhE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAQvE;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gCAAW,CAAC;AAW5C,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED,sDAAsD;AACtD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAQpE"}
@@ -54,37 +54,6 @@ export function parseQueryParamList(param) {
54
54
  }
55
55
  return parseCommaSeparatedList(param);
56
56
  }
57
- /**
58
- * Recursively gets the value in a nested object for each key in the keys array.
59
- * Each key can be a dot-separated path (e.g. 'a.b.c').
60
- * Returns an object mapping each key to its resolved value (or undefined if not found).
61
- *
62
- * @example
63
- * const obj = { a: { b: { c: 42 } }, nested: { d: 100 } };
64
- * const value = getValuesByDotKeys(obj, ['a.b.c', 'a.b.d', 'nested']);
65
- * value; // { 'a.b.c': 42, 'a.b.d': undefined, 'nested': { d: 100 } }
66
- */
67
- export function getValuesByDotKeys(obj, keys) {
68
- const result = {};
69
- for (const key of keys) {
70
- const path = key.split('.');
71
- let current = obj;
72
- for (const segment of path) {
73
- if (current !== null &&
74
- typeof current === 'object' &&
75
- Object.prototype.hasOwnProperty.call(current, segment)) {
76
- // Use index signature to avoid 'any' and type errors
77
- current = current[segment];
78
- }
79
- else {
80
- current = undefined;
81
- break;
82
- }
83
- }
84
- result[key] = current;
85
- }
86
- return result;
87
- }
88
57
  /**
89
58
  * Backtick + straight & smart double-quote chars LLMs wrap user inputs in.
90
59
  * Shared between `stripQuoteWrappers` (which also strips apostrophes from ids)
@@ -117,22 +86,4 @@ export function computeValueBytes(value) {
117
86
  return undefined;
118
87
  }
119
88
  }
120
- /**
121
- * Validates whether a given string is a well-formed URL.
122
- *
123
- * Allows only valid HTTP or HTTPS URLs.
124
- */
125
- export function isValidHttpUrl(urlString) {
126
- if (!urlString.startsWith('http://') && !urlString.startsWith('https://')) {
127
- return false;
128
- }
129
- try {
130
- /* eslint-disable no-new */
131
- new URL(urlString);
132
- return true;
133
- }
134
- catch {
135
- return false;
136
- }
137
- }
138
89
  //# sourceMappingURL=generic.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generic.js","sourceRoot":"","sources":["../../src/utils/generic.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAAc,aAAqB,EAAE,YAAoB;IACjF,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC;IAC9E,OAAO,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAM,CAAC;AAC5D,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAA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,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,0BAA0B,GAAG,IAAI,MAAM,CAAC,KAAK,mBAAmB,QAAQ,mBAAmB,MAAM,EAAE,GAAG,CAAC,CAAC;AAC9G,MAAM,UAAU,kBAAkB,CAAC,CAAS;IACxC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,0BAA0B,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;AACnE,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC5C,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,MAAM,CAAC;IAChD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC/D,IAAI,CAAC;QACD,OAAO,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,SAAS,CAAC;IACrB,CAAC;AACL,CAAC"}
@@ -68,15 +68,5 @@ export declare function getToolPublicFieldOnly(tool: ToolBase, options?: ToolPub
68
68
  * while cloning all other properties to avoid shared state mutations.
69
69
  */
70
70
  export declare function cloneToolEntry(toolEntry: ToolEntry): ToolEntry;
71
- /**
72
- * Applies Skyfire augmentation to a tool entry.
73
- * Clones the tool and, if eligible, appends Skyfire instructions to the description
74
- * and adds a `skyfire-pay-id` property to the input schema.
75
- *
76
- * Returns the (possibly augmented) clone if the tool is eligible,
77
- * or the original tool reference if it is not eligible.
78
- * Augmentation is idempotent — calling this on an already-augmented clone is safe.
79
- */
80
- export declare function applySkyfireAugmentation(tool: ToolEntry): ToolEntry;
81
71
  export {};
82
72
  //# sourceMappingURL=tools.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAc,QAAQ,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACrG,OAAO,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AAGrD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAUvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAGlE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC5B,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACjB,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,UAAU,CAAC,CAKlD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAUpG;AAED,KAAK,sBAAsB,GAAG;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA2BF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe1F;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAoB9D;AAUD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS,CAsBnE"}
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAc,QAAQ,EAAE,SAAS,EAAmB,MAAM,aAAa,CAAC;AACrG,OAAO,EAAE,WAAW,EAAa,MAAM,aAAa,CAAC;AAGrD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,CAUvD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAGlE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC5B,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,MAAM,GACjB,IAAI,CAAC,eAAe,EAAE,YAAY,GAAG,UAAU,CAAC,CAKlD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAUpG;AAED,KAAK,sBAAsB,GAAG;IAC1B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AA2BF;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,GAAE,sBAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe1F;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAoB9D"}
@@ -1,4 +1,3 @@
1
- import { SKYFIRE_ENABLED_TOOLS, SKYFIRE_PAY_ID_PROPERTY_DESCRIPTION, SKYFIRE_TOOL_INSTRUCTIONS, } from '../payments/const.js';
2
1
  import { SERVER_MODE, TOOL_TYPE } from '../types.js';
3
2
  import { fixZodSchemaRequired } from './ajv.js';
4
3
  /**
@@ -115,38 +114,4 @@ export function cloneToolEntry(toolEntry) {
115
114
  }
116
115
  return cloned;
117
116
  }
118
- /** Returns true if the tool is eligible for Skyfire augmentation. */
119
- function isSkyfireEligible(tool) {
120
- return (tool.type === TOOL_TYPE.ACTOR ||
121
- (tool.type === TOOL_TYPE.INTERNAL && SKYFIRE_ENABLED_TOOLS.has(tool.name)));
122
- }
123
- /**
124
- * Applies Skyfire augmentation to a tool entry.
125
- * Clones the tool and, if eligible, appends Skyfire instructions to the description
126
- * and adds a `skyfire-pay-id` property to the input schema.
127
- *
128
- * Returns the (possibly augmented) clone if the tool is eligible,
129
- * or the original tool reference if it is not eligible.
130
- * Augmentation is idempotent — calling this on an already-augmented clone is safe.
131
- */
132
- export function applySkyfireAugmentation(tool) {
133
- if (!isSkyfireEligible(tool))
134
- return tool;
135
- const cloned = cloneToolEntry(tool);
136
- // Append Skyfire instructions to description (idempotent)
137
- if (cloned.description && !cloned.description.includes(SKYFIRE_TOOL_INSTRUCTIONS)) {
138
- cloned.description += `\n\n${SKYFIRE_TOOL_INSTRUCTIONS}`;
139
- }
140
- // Add skyfire-pay-id property to inputSchema (idempotent)
141
- if (cloned.inputSchema && 'properties' in cloned.inputSchema) {
142
- const props = cloned.inputSchema.properties;
143
- if (!props['skyfire-pay-id']) {
144
- props['skyfire-pay-id'] = {
145
- type: 'string',
146
- description: SKYFIRE_PAY_ID_PROPERTY_DESCRIPTION,
147
- };
148
- }
149
- }
150
- return Object.freeze(cloned);
151
- }
152
117
  //# sourceMappingURL=tools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/utils/tools.ts"],"names":[],"mappings":"AACA,OAAO,EACH,qBAAqB,EACrB,mCAAmC,EACnC,yBAAyB,GAC5B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAEhD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAe;IAC3C,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAChB,KAAK,SAAS,CAAC,KAAK;YAChB,OAAO,IAAI,C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