Skip to content

refactor: Move Skyfire constants to src/payments/ (issue #643 phase 4) - #807

Merged
jirispilka merged 2 commits into
masterfrom
claude/issue-643-phase-4-1iWa5
May 11, 2026
Merged

refactor: Move Skyfire constants to src/payments/ (issue #643 phase 4)#807
jirispilka merged 2 commits into
masterfrom
claude/issue-643-phase-4-1iWa5

Conversation

@jirispilka

Copy link
Copy Markdown
Collaborator

Phase 4 of #643 — move Skyfire and call-actor constants out of src/const.ts.

New file

src/payments/const.ts holding the full Skyfire cluster:

  • SKYFIRE_MIN_CHARGE_USD (private)
  • SKYFIRE_SELLER_ID (private)
  • SKYFIRE_TOOL_INSTRUCTIONS
  • SKYFIRE_PAY_ID_PROPERTY_DESCRIPTION
  • SKYFIRE_README_CONTENT
  • SKYFIRE_ENABLED_TOOLS

The two private constants stay private (their only references are inside the same file via template literals).

Move

CALL_ACTOR_MCP_MISSING_TOOL_NAME_MSGsrc/tools/core/call_actor_common.ts (its sole production consumer; integration test import updated).

Consumers updated

  • src/payments/skyfire.ts → import from ./const.js
  • src/utils/tools.ts → import Skyfire consts from ../payments/const.js
  • src/tools/core/call_actor_common.ts → declares CALL_ACTOR_MCP_MISSING_TOOL_NAME_MSG locally
  • tests/unit/tools.skyfire.test.ts → Skyfire consts from src/payments/const.js
  • tests/unit/mcp.utils.test.tsSKYFIRE_README_CONTENT from src/payments/const.js
  • tests/integration/suite.ts → splits imports across src/payments/const.js and src/tools/core/call_actor_common.js

Spec verification

Spec matched current code. Phase 1 already un-exported SKYFIRE_MIN_CHARGE_USD / SKYFIRE_SELLER_ID — preserved here.

Verification

  • npm run type-check passes
  • npm run lint passes
  • npm run test:unit passes (613 passed, 4 skipped)

Related: #643


Generated by Claude Code

…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.
@github-actions github-actions Bot added t-ai Issues owned by the AI team. tested Temporary label used only programatically for some analytics. labels May 7, 2026
@jirispilka
jirispilka requested a review from MQ37 May 7, 2026 19:21
@jirispilka
jirispilka marked this pull request as ready for review May 7, 2026 19:21
…ase-4-1iWa5

# Conflicts:
#	src/const.ts
#	tests/unit/mcp.utils.test.ts
@jirispilka
jirispilka merged commit 4e3e77e into master May 11, 2026
12 checks passed
@jirispilka
jirispilka deleted the claude/issue-643-phase-4-1iWa5 branch May 11, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-ai Issues owned by the AI team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants