You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: Move Skyfire and call-actor constants out of src/const.ts (issue #643 phase 4)
- New file src/payments/const.ts holds all Skyfire constants:
SKYFIRE_MIN_CHARGE_USD, SKYFIRE_SELLER_ID, SKYFIRE_TOOL_INSTRUCTIONS,
SKYFIRE_PAY_ID_PROPERTY_DESCRIPTION, SKYFIRE_README_CONTENT,
SKYFIRE_ENABLED_TOOLS.
- CALL_ACTOR_MCP_MISSING_TOOL_NAME_MSG moves to its only production
consumer src/tools/core/call_actor_common.ts.
- Update consumers in src/payments/skyfire.ts, src/utils/tools.ts,
src/tools/core/call_actor_common.ts, and the unit/integration tests
that reference these constants.
Co-authored-by: Claude <noreply@anthropic.com>
exportconstSKYFIRE_TOOL_INSTRUCTIONS=`To run the Actor, you need to provide a Skyfire PAY JWT token in the \`skyfire-pay-id\` input property. You first need to create the Skyfire PAY token by calling the \`create-pay-token\` tool from the Skyfire MCP server and then provide the created JWT token in the \`skyfire-pay-id\` input property when calling Actor tool. IMPORTANT: The value you pass to \`skyfire-pay-id\` must be the JWT token string itself (it starts with "ey"), NOT an ID or UUID. The Skyfire PAY token is used for billing purposes and needs to be charged with at least ${SKYFIRE_MIN_CHARGE_USD} USD.${SKYFIRE_SELLER_ID ? ` The Skyfire seller ID for Apify MCP server is "${SKYFIRE_SELLER_ID}".` : ''} When retrieving Actor output using the \`get-actor-output\` tool, you also need to provide the same Skyfire PAY JWT token (starting with "ey") in the \`skyfire-pay-id\` input property.`;
73
-
74
-
exportconstSKYFIRE_PAY_ID_PROPERTY_DESCRIPTION=`Skyfire PAY JWT token used for billing purposes. This must be the JWT token string returned by the create-pay-token tool (starts with "ey"), NOT a token ID or UUID.`;
75
-
76
-
exportconstSKYFIRE_README_CONTENT=`The Apify MCP Server allows clients to interact with Apify Actors, storage, and documentation. Before running any Apify Actor, you need to set up a Skyfire PAY token for billing purposes. To set up the PAY token you need to use the create-pay-token tool from the Skyfire MCP server. The PAY token must be charged with a minimum of ${SKYFIRE_MIN_CHARGE_USD} USD to be valid.${SKYFIRE_SELLER_ID ? ` The Skyfire seller ID for Apify MCP server is "${SKYFIRE_SELLER_ID}".` : ''} When running an Actor using the call-actor tool, you must provide the Skyfire PAY JWT token in the \`skyfire-pay-id\` input property. IMPORTANT: The value for \`skyfire-pay-id\` must be the actual JWT token string (starting with "ey") returned by the create-pay-token tool, NOT a token ID or UUID. Similarly, when retrieving Actor output using the get-actor-output tool, you must also provide the same Skyfire PAY JWT token (starting with "ey") in the \`skyfire-pay-id\` input property.`;
77
-
78
-
/**
79
-
* Set of internal tool names that require Skyfire PAY token ID in Skyfire mode.
80
-
* These tools interact with Actor runs, datasets, or key-value stores and need billing support.
81
-
*/
82
-
exportconstSKYFIRE_ENABLED_TOOLS=newSet([
83
-
HelperTools.ACTOR_CALL,
84
-
HelperTools.ACTOR_OUTPUT_GET,
85
-
HelperTools.ACTOR_RUNS_GET,
86
-
HelperTools.ACTOR_RUNS_LOG,
87
-
HelperTools.ACTOR_RUNS_ABORT,
88
-
HelperTools.DATASET_GET,
89
-
HelperTools.DATASET_GET_ITEMS,
90
-
HelperTools.DATASET_SCHEMA_GET,
91
-
HelperTools.KEY_VALUE_STORE_GET,
92
-
HelperTools.KEY_VALUE_STORE_KEYS_GET,
93
-
HelperTools.KEY_VALUE_STORE_RECORD_GET,
94
-
]);
95
-
96
-
exportconstCALL_ACTOR_MCP_MISSING_TOOL_NAME_MSG=`When calling an MCP server Actor, you must specify the tool name in the actor parameter as "{actorName}:{toolName}" in the "actor" input property.`;
exportconstSKYFIRE_TOOL_INSTRUCTIONS=`To run the Actor, you need to provide a Skyfire PAY JWT token in the \`skyfire-pay-id\` input property. You first need to create the Skyfire PAY token by calling the \`create-pay-token\` tool from the Skyfire MCP server and then provide the created JWT token in the \`skyfire-pay-id\` input property when calling Actor tool. IMPORTANT: The value you pass to \`skyfire-pay-id\` must be the JWT token string itself (it starts with "ey"), NOT an ID or UUID. The Skyfire PAY token is used for billing purposes and needs to be charged with at least ${SKYFIRE_MIN_CHARGE_USD} USD.${SKYFIRE_SELLER_ID ? ` The Skyfire seller ID for Apify MCP server is "${SKYFIRE_SELLER_ID}".` : ''} When retrieving Actor output using the \`get-actor-output\` tool, you also need to provide the same Skyfire PAY JWT token (starting with "ey") in the \`skyfire-pay-id\` input property.`;
7
+
8
+
exportconstSKYFIRE_PAY_ID_PROPERTY_DESCRIPTION=`Skyfire PAY JWT token used for billing purposes. This must be the JWT token string returned by the create-pay-token tool (starts with "ey"), NOT a token ID or UUID.`;
9
+
10
+
exportconstSKYFIRE_README_CONTENT=`The Apify MCP Server allows clients to interact with Apify Actors, storage, and documentation. Before running any Apify Actor, you need to set up a Skyfire PAY token for billing purposes. To set up the PAY token you need to use the create-pay-token tool from the Skyfire MCP server. The PAY token must be charged with a minimum of ${SKYFIRE_MIN_CHARGE_USD} USD to be valid.${SKYFIRE_SELLER_ID ? ` The Skyfire seller ID for Apify MCP server is "${SKYFIRE_SELLER_ID}".` : ''} When running an Actor using the call-actor tool, you must provide the Skyfire PAY JWT token in the \`skyfire-pay-id\` input property. IMPORTANT: The value for \`skyfire-pay-id\` must be the actual JWT token string (starting with "ey") returned by the create-pay-token tool, NOT a token ID or UUID. Similarly, when retrieving Actor output using the get-actor-output tool, you must also provide the same Skyfire PAY JWT token (starting with "ey") in the \`skyfire-pay-id\` input property.`;
11
+
12
+
/**
13
+
* Set of internal tool names that require Skyfire PAY token ID in Skyfire mode.
14
+
* These tools interact with Actor runs, datasets, or key-value stores and need billing support.
exportconstCALL_ACTOR_MCP_MISSING_TOOL_NAME_MSG=`When calling an MCP server Actor, you must specify the tool name in the actor parameter as "{actorName}:{toolName}" in the "actor" input property.`;
34
+
34
35
/** Shared MCP server instructions — identical in both modes. */
35
36
exportconstCALL_ACTOR_MCP_SERVER_SECTION=`For MCP server Actors:
36
37
- Use fetch-actor-details with output={ mcpTools: true } to list available tools
0 commit comments