Skip to content

feat: artifact incremental tools Phase 2 (FC-2 LoadArtifact, FC-3 PatchArtifact) #35

Closed

Description

@dahai80

Phase 2 of #32 — Upstream unblocked

Upstream fusion-artifacts-engine v0.3.0 now provides:

  • artifact.patch RPC (AE-1): replace_section/append/prepend/delete_section with anchor matching
  • artifact.get_content RPC: load artifact content + token count

Tasks

  • FC-2: LoadArtifactTool — call artifact.get_content RPC
    • Input: artifact_id, optional version
    • Output: content, token_count, version
    • Preview truncation at 2000 chars in tool result
  • FC-3: PatchArtifactTool — call artifact.patch RPC
    • 4 operations: replace_section, append, prepend, delete_section
    • Anchor matching (markdown headings, code function names)
    • Optimistic lock via expected_version
  • Bug fix: ArtifactCreateTool field mapping (result.id → result.artifact.id)
  • Bug fix: ArtifactUpdateTool field mapping (result.version → result.version.version_num)
  • Extract shared artifactsRPC helper
  • Register new tools in tools.ts + FULL_TOOLS
  • Update prompts to reference new tools

Remaining blocked (Phase 3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions