Commit bc8aebd
fix: skyfire parameter injection and missing tool registration (#393)
* fix: skyfire parameter injection and missing tool registration
Fixed critical bug where 8 out of 11 skyfire-enabled tools were missing
the required `skyfire-pay-id` parameter in their input schemas. Refactored
Skyfire integration to eliminate ~180 lines of duplicated code.
Critical fixes:
- Schema injection now uses SKYFIRE_ENABLED_TOOLS Set instead of hardcoded list
- Added missing abortActorRun tool to runs category
Changes:
- Created src/utils/skyfire.ts with reusable helper functions
- Refactored 13 code locations to use helpers
- Added skyfire mode detection via ?payment=skyfire query parameter
- Added integration test for schema injection
- Updated test helpers and documentation
Tools affected: call-actor, get-actor-output, get-actor-run, get-actor-log,
abort-actor-run, get-dataset, get-dataset-items, get-dataset-schema,
get-key-value-store, get-key-value-store-keys, get-key-value-store-record
Files: 13 files changed, 286 insertions(+), 92 deletions(-)
* Centralize skyfire pay ID validation in tool dispatcher (#395)
* Initial plan
* Centralize skyfire validation in MCP server dispatcher
Co-authored-by: MQ37 <29043708+MQ37@users.noreply.github.com>
* fix: enable task mode support for internal tools with taskSupport
Previously, task mode execution (executeToolAndUpdateTask) rejected all
internal tools, only allowing actor tools. This was inconsistent with
tools like call-actor that declare taskSupport: 'optional'.
Changes:
- Remove hard rejection of internal tools in task mode
- Add execution path for internal tools in task mode
- Pass userRentedActorIds to task execution context
- Add integration test for call-actor in task mode
This fixes the architectural issue identified in PR #396 review where
centralized skyfire validation worked but internal tools couldn't reach
that code path due to early rejection.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MQ37 <29043708+MQ37@users.noreply.github.com>
Co-authored-by: MQ37 <themq37@gmail.com>
* refactor: move createApifyClientWithSkyfireSupport to apify-clients.ts
* fix compiler and lint issues after merge
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MQ37 <29043708+MQ37@users.noreply.github.com>1 parent e69f74f commit bc8aebd
16 files changed
Lines changed: 376 additions & 133 deletions
File tree
- src
- actor
- mcp
- tools
- utils
- tests
- integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
127 | 156 | | |
128 | 157 | | |
129 | 158 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
| 108 | + | |
104 | 109 | | |
105 | 110 | | |
106 | 111 | | |
| |||
221 | 226 | | |
222 | 227 | | |
223 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
224 | 233 | | |
225 | 234 | | |
226 | 235 | | |
| |||
230 | 239 | | |
231 | 240 | | |
232 | 241 | | |
| 242 | + | |
233 | 243 | | |
234 | 244 | | |
235 | 245 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
76 | 94 | | |
77 | 95 | | |
78 | 96 | | |
| |||
0 commit comments