diff --git a/lib/mi-tool-schema.ts b/lib/mi-tool-schema.ts index 6fbff87..b540604 100644 --- a/lib/mi-tool-schema.ts +++ b/lib/mi-tool-schema.ts @@ -41,6 +41,33 @@ const TOOL_HINTS: ToolHint[] = [ { tagName: "folk-choice-rank", label: "Ranking", icon: "πŸ“Š", keywords: ["rank", "order", "priority", "sort"] }, { tagName: "folk-choice-spider", label: "Spider Chart", icon: "πŸ•ΈοΈ", keywords: ["spider", "radar", "criteria", "evaluate"] }, { tagName: "folk-spider-3d", label: "3D Spider", icon: "πŸ“Š", keywords: ["spider", "radar", "3d", "overlap", "membrane", "governance", "permeability"] }, + { tagName: "folk-choice-conviction", label: "Conviction Vote", icon: "πŸ”₯", keywords: ["conviction", "stake", "weight", "governance", "token vote"] }, + // Travel + { tagName: "folk-itinerary", label: "Itinerary", icon: "πŸ—“οΈ", keywords: ["itinerary", "trip", "travel", "plan", "schedule"] }, + { tagName: "folk-destination", label: "Destination", icon: "πŸ“", keywords: ["destination", "city", "place", "travel", "visit"] }, + { tagName: "folk-booking", label: "Booking", icon: "🎫", keywords: ["booking", "reservation", "flight", "hotel", "transport"] }, + { tagName: "folk-budget", label: "Budget", icon: "πŸ’°", keywords: ["budget", "expense", "cost", "money", "spending"] }, + { tagName: "folk-packing-list", label: "Packing List", icon: "πŸŽ’", keywords: ["packing", "list", "luggage", "gear", "pack"] }, + // Tokens + { tagName: "folk-token-mint", label: "Token Mint", icon: "πŸͺ™", keywords: ["token", "mint", "create token", "currency", "coin"] }, + { tagName: "folk-token-ledger", label: "Token Ledger", icon: "πŸ“’", keywords: ["ledger", "balance", "token", "transactions", "holdings"] }, + { tagName: "folk-transaction-builder", label: "Transaction", icon: "πŸ’Έ", keywords: ["transaction", "transfer", "send", "multisig", "safe"] }, + // Creative / CAD + { tagName: "folk-blender", label: "3D Scene", icon: "🎲", keywords: ["blender", "3d", "render", "scene", "model"] }, + { tagName: "folk-freecad", label: "CAD Part", icon: "πŸ”§", keywords: ["cad", "freecad", "part", "mechanical", "parametric"] }, + { tagName: "folk-kicad", label: "PCB Design", icon: "πŸ”Œ", keywords: ["pcb", "kicad", "circuit", "schematic", "electronics"] }, + { tagName: "folk-design-agent", label: "Print Design", icon: "πŸ–¨οΈ", keywords: ["design", "poster", "flyer", "brochure", "print", "layout", "scribus"] }, + // Zine + { tagName: "folk-zine-gen", label: "Zine", icon: "πŸ“°", keywords: ["zine", "magazine", "publication", "pamphlet", "print"] }, + // Geo + { tagName: "folk-holon", label: "Holon", icon: "🌐", keywords: ["holon", "h3", "hexagon", "geospatial", "region"] }, + { tagName: "folk-holon-browser", label: "Holon Browser", icon: "🌍", keywords: ["holon", "browse", "explore", "territory", "map"] }, + // Meta + { tagName: "folk-canvas", label: "Nested Canvas", icon: "πŸ”²", keywords: ["canvas", "nested", "subspace", "embed canvas"] }, + { tagName: "folk-wrapper", label: "Wrapper", icon: "πŸ“¦", keywords: ["wrapper", "container", "group", "frame"] }, + { tagName: "folk-image", label: "Image", icon: "πŸ–ΌοΈ", keywords: ["image", "photo", "picture", "png", "jpg"] }, + { tagName: "folk-bookmark", label: "Bookmark", icon: "πŸ”–", keywords: ["bookmark", "link", "save", "reference"] }, + { tagName: "folk-obs-note", label: "Obsidian Note", icon: "πŸ““", keywords: ["obsidian", "note", "vault", "knowledge"] }, // Module content hints (these create content in rApps, not canvas shapes) { tagName: "rcal-event", label: "Calendar Event", icon: "πŸ“…", keywords: ["event", "meeting", "schedule", "standup", "appointment"], moduleAction: { module: "rcal", contentType: "event" } }, { tagName: "rtasks-task", label: "Task", icon: "βœ…", keywords: ["task", "todo", "assign", "deadline", "backlog"], moduleAction: { module: "rtasks", contentType: "task" } }, diff --git a/lib/mi-triage-panel.ts b/lib/mi-triage-panel.ts index 5f983ed..35960a1 100644 --- a/lib/mi-triage-panel.ts +++ b/lib/mi-triage-panel.ts @@ -10,19 +10,62 @@ import type { TriageManager } from "./mi-content-triage"; /** Icon lookup by tagName β€” matches TOOL_HINTS from mi-tool-schema.ts */ const SHAPE_ICONS: Record = { + // Core "folk-markdown": { icon: "πŸ“", label: "Note" }, + "folk-wrapper": { icon: "πŸ“¦", label: "Wrapper" }, "folk-embed": { icon: "πŸ”—", label: "Embed" }, - "folk-calendar": { icon: "πŸ“…", label: "Calendar" }, - "folk-map": { icon: "πŸ—ΊοΈ", label: "Map" }, + "folk-image": { icon: "πŸ–ΌοΈ", label: "Image" }, + "folk-bookmark": { icon: "πŸ”–", label: "Bookmark" }, + "folk-slide": { icon: "πŸ–ΌοΈ", label: "Slide" }, + "folk-chat": { icon: "πŸ’¬", label: "Chat" }, + "folk-piano": { icon: "🎹", label: "Piano" }, + "folk-canvas": { icon: "πŸ”²", label: "Canvas" }, + "folk-rapp": { icon: "πŸ“¦", label: "rApp" }, + "folk-feed": { icon: "πŸ“‘", label: "Feed" }, + "folk-obs-note": { icon: "πŸ““", label: "Obsidian" }, "folk-workflow-block": { icon: "βš™οΈ", label: "Workflow" }, + "folk-google-item": { icon: "πŸ”", label: "Google" }, + // AI + "folk-prompt": { icon: "πŸ€–", label: "AI Chat" }, + "folk-image-gen": { icon: "🎨", label: "AI Image" }, + "folk-image-studio": { icon: "πŸ–ŒοΈ", label: "Studio" }, + "folk-video-gen": { icon: "🎬", label: "AI Video" }, + "folk-zine-gen": { icon: "πŸ“°", label: "Zine" }, + "folk-transcription": { icon: "πŸŽ™οΈ", label: "Transcribe" }, + // Creative + "folk-splat": { icon: "πŸ’Ž", label: "3D Splat" }, + "folk-drawfast": { icon: "✏️", label: "Drawing" }, + "folk-blender": { icon: "🎲", label: "3D Scene" }, + "folk-freecad": { icon: "πŸ”§", label: "CAD" }, + "folk-kicad": { icon: "πŸ”Œ", label: "PCB" }, + "folk-design-agent": { icon: "πŸ–¨οΈ", label: "Design" }, + // Social "folk-social-post": { icon: "πŸ“£", label: "Social Post" }, "folk-social-thread": { icon: "🧡", label: "Thread" }, "folk-social-campaign": { icon: "πŸ“’", label: "Campaign" }, "folk-social-newsletter": { icon: "πŸ“§", label: "Newsletter" }, + // Decisions "folk-choice-vote": { icon: "πŸ—³οΈ", label: "Vote" }, - "folk-prompt": { icon: "πŸ€–", label: "AI Chat" }, - "folk-image-gen": { icon: "🎨", label: "AI Image" }, - "folk-slide": { icon: "πŸ–ΌοΈ", label: "Slide" }, + "folk-choice-rank": { icon: "πŸ“Š", label: "Ranking" }, + "folk-choice-spider": { icon: "πŸ•ΈοΈ", label: "Spider" }, + "folk-choice-conviction": { icon: "πŸ”₯", label: "Conviction" }, + "folk-spider-3d": { icon: "πŸ“Š", label: "3D Spider" }, + // Travel + "folk-itinerary": { icon: "πŸ—“οΈ", label: "Itinerary" }, + "folk-destination": { icon: "πŸ“", label: "Destination" }, + "folk-booking": { icon: "🎫", label: "Booking" }, + "folk-budget": { icon: "πŸ’°", label: "Budget" }, + "folk-packing-list": { icon: "πŸŽ’", label: "Packing" }, + // Tokens + "folk-token-mint": { icon: "πŸͺ™", label: "Token Mint" }, + "folk-token-ledger": { icon: "πŸ“’", label: "Ledger" }, + "folk-transaction-builder": { icon: "πŸ’Έ", label: "Transaction" }, + // Geo + "folk-calendar": { icon: "πŸ“…", label: "Calendar" }, + "folk-map": { icon: "πŸ—ΊοΈ", label: "Map" }, + "folk-holon": { icon: "🌐", label: "Holon" }, + "folk-holon-browser": { icon: "🌍", label: "Holons" }, + "folk-video-chat": { icon: "πŸ“Ή", label: "Video Call" }, }; export class MiTriagePanel { diff --git a/server/mi-routes.ts b/server/mi-routes.ts index 0b11ad2..8c2c8d8 100644 --- a/server/mi-routes.ts +++ b/server/mi-routes.ts @@ -233,10 +233,17 @@ include action markers in your response. Each marker is on its own line: [MI_ACTION:{"type":"navigate","path":"/myspace/rspace"}] Use "$1", "$2", etc. as ref values when creating shapes, then reference them in subsequent connect actions. -Available shape types: folk-markdown, folk-wrapper, folk-image-gen, folk-video-gen, folk-prompt, -folk-embed, folk-calendar, folk-map, folk-chat, folk-slide, folk-obs-note, folk-workflow-block, -folk-social-post, folk-social-thread, folk-social-campaign, folk-social-newsletter, -folk-splat, folk-drawfast, folk-rapp, folk-feed. +Available shape types (grouped by category): + +Core: folk-markdown, folk-wrapper, folk-embed, folk-image, folk-bookmark, folk-slide, folk-chat, folk-piano, folk-canvas, folk-rapp, folk-feed, folk-obs-note, folk-workflow-block, folk-google-item. +AI: folk-prompt, folk-image-gen, folk-image-studio, folk-video-gen, folk-zine-gen, folk-transcription. +Creative: folk-splat, folk-drawfast, folk-blender, folk-freecad, folk-kicad, folk-design-agent. +Social: folk-social-post, folk-social-thread, folk-social-campaign, folk-social-newsletter. +Decisions: folk-choice-vote, folk-choice-rank, folk-choice-spider, folk-choice-conviction, folk-spider-3d. +Travel: folk-itinerary, folk-destination, folk-booking, folk-budget, folk-packing-list. +Tokens: folk-token-mint, folk-token-ledger, folk-transaction-builder. +Geo: folk-holon, folk-holon-browser, folk-map, folk-calendar. +Video: folk-video-chat. ## Transforms When the user asks to align, distribute, or arrange selected shapes: @@ -324,6 +331,25 @@ analyze it and classify each distinct piece into the most appropriate canvas sha - Marketing campaigns / content plans β†’ folk-social-campaign (set title, description, platforms props) - Newsletters / email campaigns β†’ folk-social-newsletter (set subject, listName props) - Decisions / polls / questions for voting β†’ folk-choice-vote (set question prop) +- Ranked choices / priority lists β†’ folk-choice-rank (set question prop) +- Multi-criteria evaluation β†’ folk-choice-spider (set question prop) +- Travel destinations β†’ folk-destination (set destName, country props) +- Trip itineraries β†’ folk-itinerary (set tripTitle, itemsJson props) +- Bookings / reservations β†’ folk-booking (set bookingType, provider props) +- Budget / expenses β†’ folk-budget (set budgetTotal props) +- 3D models / scenes β†’ folk-splat or folk-blender (set src prop) +- Circuit / PCB design β†’ folk-kicad (set brief prop) +- CAD / 3D parts β†’ folk-freecad (set brief prop) +- Print / layout design β†’ folk-design-agent (set brief prop) +- AI chat / assistant β†’ folk-prompt (start a conversation) +- Image generation requests β†’ folk-image-gen (set prompt prop) +- Video generation requests β†’ folk-video-gen (set prompt prop) +- Zine / publication content β†’ folk-zine-gen (set prompt prop) +- Audio / transcription β†’ folk-transcription +- Data feeds from modules β†’ folk-feed (set sourceModule, feedId props) +- Embed another rApp β†’ folk-rapp (set moduleId prop) +- Token minting β†’ folk-token-mint (set tokenName, symbol props) +- Token ledger / balances β†’ folk-token-ledger (set tokenId prop) - Everything else (prose, notes, transcripts, summaries) β†’ folk-markdown (set content prop in markdown format) ## Output Format @@ -342,11 +368,28 @@ Return a JSON object with: - If the content is too short or trivial for multiple shapes, still return at least one shape`; const KNOWN_TRIAGE_SHAPES = new Set([ - "folk-markdown", "folk-embed", "folk-image", "folk-bookmark", - "folk-calendar", "folk-map", - "folk-workflow-block", "folk-social-post", "folk-social-thread", - "folk-social-campaign", "folk-social-newsletter", "folk-choice-vote", - "folk-prompt", "folk-image-gen", "folk-slide", + // Core + "folk-markdown", "folk-wrapper", "folk-embed", "folk-image", "folk-bookmark", + "folk-slide", "folk-chat", "folk-piano", "folk-canvas", "folk-rapp", "folk-feed", + "folk-obs-note", "folk-workflow-block", "folk-google-item", + // AI + "folk-prompt", "folk-image-gen", "folk-image-studio", "folk-video-gen", + "folk-zine-gen", "folk-transcription", + // Creative + "folk-splat", "folk-drawfast", "folk-blender", "folk-freecad", "folk-kicad", + "folk-design-agent", + // Social + "folk-social-post", "folk-social-thread", "folk-social-campaign", "folk-social-newsletter", + // Decisions + "folk-choice-vote", "folk-choice-rank", "folk-choice-spider", + "folk-choice-conviction", "folk-spider-3d", + // Travel + "folk-itinerary", "folk-destination", "folk-booking", "folk-budget", "folk-packing-list", + // Tokens + "folk-token-mint", "folk-token-ledger", "folk-transaction-builder", + // Geo & Video + "folk-map", "folk-calendar", "folk-video-chat", + "folk-holon", "folk-holon-browser", ]); function sanitizeTriageResponse(raw: any): { shapes: any[]; connections: any[]; summary: string } { diff --git a/website/canvas.html b/website/canvas.html index 88f1b94..33d23ef 100644 --- a/website/canvas.html +++ b/website/canvas.html @@ -2433,6 +2433,7 @@ FolkCalendar, FolkMap, FolkImageGen, + FolkImageStudio, FolkVideoGen, FolkPrompt, FolkZineGen, @@ -2682,6 +2683,7 @@ FolkCalendar.define(); FolkMap.define(); FolkImageGen.define(); + FolkImageStudio.define(); FolkVideoGen.define(); FolkPrompt.define(); FolkTranscription.define(); @@ -2695,6 +2697,7 @@ FolkBooking.define(); FolkTokenMint.define(); FolkTokenLedger.define(); + FolkTransactionBuilder.define(); FolkChoiceVote.define(); FolkChoiceRank.define(); FolkChoiceSpider.define(); @@ -2731,6 +2734,7 @@ shapeRegistry.register("folk-calendar", FolkCalendar); shapeRegistry.register("folk-map", FolkMap); shapeRegistry.register("folk-image-gen", FolkImageGen); + shapeRegistry.register("folk-image-studio", FolkImageStudio); shapeRegistry.register("folk-video-gen", FolkVideoGen); shapeRegistry.register("folk-prompt", FolkPrompt); shapeRegistry.register("folk-zine-gen", FolkZineGen); @@ -2745,6 +2749,7 @@ shapeRegistry.register("folk-booking", FolkBooking); shapeRegistry.register("folk-token-mint", FolkTokenMint); shapeRegistry.register("folk-token-ledger", FolkTokenLedger); + shapeRegistry.register("folk-transaction-builder", FolkTransactionBuilder); shapeRegistry.register("folk-choice-vote", FolkChoiceVote); shapeRegistry.register("folk-choice-rank", FolkChoiceRank); shapeRegistry.register("folk-choice-spider", FolkChoiceSpider); @@ -3937,7 +3942,12 @@ Use real coordinates, YYYY-MM-DD dates, ISO currency codes. Ask clarifying quest "folk-choice-spider": { width: 440, height: 540 }, "folk-spider-3d": { width: 440, height: 480 }, "folk-choice-conviction": { width: 380, height: 480 }, - "folk-social-post": { width: 300, height: 380 }, + "folk-social-post": { width: 300, height: 380 }, + "folk-social-thread": { width: 280, height: 320 }, + "folk-social-campaign": { width: 300, height: 380 }, + "folk-social-newsletter": { width: 280, height: 300 }, + "folk-design-agent": { width: 450, height: 550 }, + "folk-image-studio": { width: 420, height: 520 }, "folk-multisig-email": { width: 400, height: 380 }, "folk-splat": { width: 480, height: 420 }, "folk-blender": { width: 420, height: 520 },