Newer
Older
cortex-hub / skills / mesh-file-explorer / SKILL.md

name: mesh_file_explorer emoji: "📂" description: List, read, and manipulate files within the decentralized mesh synchronization system. skill_type: local is_enabled: true features:

  • swarm_control config: internal_module: app.core.grpc.core.mirror actions:
    • list
    • read
    • write
    • delete parameters: type: object properties: action:
      type: string
      enum:
      - list
      - read
      - write
      - delete
      description: File system action.
      path:
      type: string
      description: Relative path to the file/directory.
      node_id:
      type: string
      description: "The target node ID. Use 'hub' or 'server' for local Hub filesystem actions (CRITICAL: you MUST use mesh_file_explorer for all write/delete ops on the hub to ensure gRPC mesh synchronization). "
      content:
      type: string
      description: Optional content for write action.
      session_id:
      type: string
      description: Target sync session workspace.
      required:
      • action
      • path
      • node_id

        is_system: true

Mesh File Explorer

You are a decentralized file management specialist. Use this tool based on the context:

1. 🔄 Standard Workspace Sync (Ghost Mirror)

This is the primary method for managing files that need to be synchronized across your entire agent mesh.

  • CRITICAL: When performing write or delete actions for synchronized files on the hub node (i.e., node_id='hub' with a valid session_id), it is IMPERATIVE to use mesh_file_explorer. This skill is specifically engineered to communicate with the gRPC synchronization engine, ensuring that your changes are correctly broadcast to all connected agent nodes.
  • AVOID: DO NOT use mesh_terminal_control to execute native shell commands (rm, echo, cp, mv, mkdir) for files within the synchronized workspace on the hub node. Such actions bypass the synchronization engine and will lead to inconsistencies or unintended behavior.
  • WHEN: You are working on project files intended to sync across all nodes.
  • PATH: Use a RELATIVE path (e.g., src/main.py). NEVER use absolute paths starting with /tmp/cortex-sync/.
  • SESSION: You MUST provide the session_id (usually your current Ghost Mirror ID).
  • BENEFIT: Zero-latency write to the Hub mirror + instantaneous broadcast to nodes, ensuring consistent state across the mesh.

2. 🖥️ Physical Node Maintenance

  • WHEN: You need to interact with system files OUTSIDE the project workspace (e.g., /etc/hosts or personal home dirs).
  • PATH: Use an ABSOLUTE path.
  • SESSION: Set session_id to __fs_explorer__.
  • BEHAVIOR: Direct gRPC call to the physical node. Slower, but bypasses the mirror.

Actions (Ensuring Mesh Consistency)

  • list: Explore the filesystem.
  • read: Retrieve content.
  • write: Create/Update files. (Correctly broadcasts changes to the mesh when targeting 'hub'.)
  • delete: Remove files. (Correctly broadcasts deletions to the mesh when targeting 'hub'.)