Skip to content

refactor: Clean up src/tools structure and naming #979

@jirispilka

Description

@jirispilka

Problem

src/tools/ mixes three inconsistent organizing axes and vocabularies:

  • common/ (mode-independence) vs core/ (shared logic) — synonym names with opposite meanings.
  • default/ + apps/ encode a mode split that mostly doesn't exist: 3 of 4 default/ tools are mode-independent, and apps/call_actor.ts duplicates default/call_actor.ts except for the description.
  • File names, export names, and tool names diverge (dataset_collection.tsgetUserDatasetsListget-dataset-list); misleading helpers (build.ts fetches Actor definitions).

Proposed solution

Tracking issue. One PR per sub-issue, in order:

  1. refactor: Unify call-actor tool across default and apps modes #975 — unify call-actor across modes. The only logic change; lands first so the move PR stays pure git mv.
  2. refactor: Regroup src/tools by domain (actors/runs/storage/docs/widgets) #978 — regroup src/tools/ by domain (actors/, runs/, storage/, docs/, widgets/), dissolving common//core//default//apps/ and fixing misleading helper names in the same move. Land after in-flight storage PRs (fix: Return binary key-value store records as MCP content blocks #964, feat: Add structured output to remaining storage tools #965, feat: Surface dataset size hints to guide large-output fetches #932) merge — it conflicts with everything open.
  3. refactor: Normalize tool file and export names to match tool names #977 — normalize file and export names to wire-level tool names (optionally folds into the refactor: Regroup src/tools by domain (actors/runs/storage/docs/widgets) #978 PR).

#976 was closed as subsumed by #978 — staging the helper renames separately would have moved the same files twice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-aiIssues owned by the AI team.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions