/** * Server-level instructions sent to clients on connection. * Provides top-level workflow routing so the agent picks the right tool chain. * Specific parameter details and constraints live in each tool's description. */ export declare const MESHY_INSTRUCTIONS = "\n# Meshy AI \u2014 Workflow Guide\n\n## Rule 1: Cost Confirmation\nBefore calling ANY tool that costs credits, present the cost and wait for user confirmation.\n\n| Tool | Credits |\n|------|---------|\n| meshy_text_to_3d | 5\u201320 |\n| meshy_text_to_3d_refine | 10 |\n| meshy_image_to_3d / meshy_multi_image_to_3d | 5\u201330 |\n| meshy_retexture | 10 |\n| meshy_remesh | 5 |\n| meshy_rig | 5 (includes walking + running) |\n| meshy_animate | 3 |\n| meshy_process_multicolor | 10 |\n| meshy_convert | 1 |\n| meshy_resize | 1 |\n| meshy_uv_unwrap | 5 |\n| meshy_creative_lab | 36 (prototype 6 + build 30, run end-to-end) |\n| meshy_text_to_image / meshy_image_to_image | nano-banana 3 / nano-banana-2 6 / nano-banana-pro 9 / gpt-image-2: text 9, image 12 |\n\n## Rule 2: Determine Output Format BEFORE Generating\nThe API parameter target_formats controls which formats are produced. Decide the output format before calling any generation tool, because target_formats must be set at creation time. Ask user about their intended use first.\n\n## Rule 3: Identify the Use Case, Then Confirm with User\nDetermine which scenario below best matches, present a suggested plan to the user, and confirm before executing. Do not mix steps across scenarios.\n\n---\n\nEach scenario below is a recommended workflow. Discuss with the user to confirm the plan before executing.\n\n## Scenario A: 3D Printing (white model)\nTrigger: user mentions print, slicer, figurine, miniature, statue, physical model \u2014 single-color.\nSuggested flow:\n1. Detect installed slicers (meshy_send_to_slicer, slicer_type:\"auto\") \u2014 present list, save for later\n2. Generate untextured model (text-to-3d or image-to-3d) with target_formats:[\"obj\"]\n3. Wait for completion\n4. Download OBJ with print_ready=true (auto coordinate fix for slicer)\n5. Present slicer list from step 1, ask user which to use, execute launch_command via Bash\n\n## Scenario B: 3D Printing (multicolor)\nTrigger: user wants multicolor/color print.\nSuggested flow:\n1. Detect multicolor-capable slicers (meshy_send_to_slicer, is_multicolor:true) \u2014 present list, save for later\n2. Generate a textured model \u2014 via text-to-3d (preview + refine) or image-to-3d with textures\n3. Multi-color processing (meshy_process_multicolor) with input_task_id from the textured task \u2014 10 credits, outputs 3MF\n4. Wait for completion (task_type:\"multi-color-print\")\n5. Download 3MF\n6. Present slicer list from step 1, ask user which to use, execute launch_command via Bash\n\n## Scenario C: Game Engine (Unity/Unreal/Godot)\nTrigger: user mentions game, Unity, Unreal, Godot, game-ready.\nSuggested flow:\n1. Generate model with target_formats:[\"fbx\"]\n2. Add textures (refine or retexture)\n3. Remesh for game-ready topology (meshy_remesh, topology:\"quad\", appropriate polycount)\n4. Download FBX\n\n## Scenario D: Character Animation\nTrigger: user mentions rig, animate, walking, running, character animation.\nSuggested flow:\n1. Generate model with pose_mode:\"t-pose\"\n2. Add textures (refine or retexture)\n3. Rig the model (meshy_rig, \u2264300K faces; if over, remesh to reduce polycount first)\n4. Download \u2014 rigging includes walking+running free. Only use meshy_animate for custom animations.\n\n## Scenario E: AR / Apple\nTrigger: user mentions AR, USDZ, Vision Pro, Quick Look.\nSuggested flow:\n1. Generate model with target_formats:[\"usdz\"]\n2. Add textures (refine or retexture)\n3. Remesh for USDZ format conversion (meshy_remesh, target_formats:[\"usdz\"])\n4. Download USDZ\n\n## Scenario F: Retexture\nTrigger: user wants to change textures/style of existing model.\nSuggested flow:\n1. Ask user for text_style_prompt OR image_style_url (one required, image takes precedence)\n2. Apply retexture (meshy_retexture)\n\n## Scenario H: Cheap Format Conversion / Resize\nTrigger: user has an existing model (task or URL) and only needs another file format, or wants it scaled to real-world dimensions \u2014 no re-generation.\nSuggested flow:\n1. Format only \u2192 meshy_convert with target_formats (1 credit). Cheaper than remesh for format-only changes; supports 3mf.\n2. Real-world size \u2192 meshy_resize (1 credit) with exactly one of resize_height / resize_longest_side / auto_size.\n3. Wait for completion (task_type \"convert\" / \"resize\"), then meshy_download_model.\n\n## Scenario I: UV Unwrap (before external texturing)\nTrigger: user wants to texture a model in Blender / Substance Painter / Unreal, or needs a clean UV layout / \"UV white model\".\nSuggested flow:\n1. Ensure the source is a GLB with \u226440,000 faces \u2014 if denser, run meshy_remesh with a lower target_polycount first.\n2. meshy_uv_unwrap (5 credits) with input_task_id or model_url.\n3. Wait for completion (task_type \"uv-unwrap\"), then meshy_download_model (format \"glb\"). The output is a single GLB with fresh UVs and a placeholder material.\n\n## Scenario J: Creative Lab Consumer Products (figure / keychain / fridge-magnet / lamp)\nTrigger: user wants a stylized physical-product model \u2014 chibi figure, keychain, fridge magnet, or lamp \u2014 from a photo (or, for lamp, a text prompt).\nSuggested flow:\n1. Confirm the 36-credit cost with the user.\n2. Call meshy_creative_lab once with product + a source (file_path / image_url, or text for lamp). It runs the full prototype\u2192build pipeline internally and returns the final 3D model \u2014 the intermediate concept image is internal and is NOT shown to the user.\n3. Download the result with meshy_download_model (task_type \"creative-lab-{product}-build\"); for lamp this saves all parts (lamp + base STLs).\n\n## Scenario G: General 3D Model (default)\nTrigger: none of the above.\nSuggested flow:\n1. Ask user about intended use to determine format\n2. Generate model\n3. Ask: add textures (refine)?\n4. Download in chosen format\n";