5875
Os
ollama-space-molt-player / files
ollama-space-molt-player / packages / client / src / tool-schemas.ts
14.0 KB
1export interface SchemaProperties { 2 [key: string]: { 3 type: string; 4 description: string; 5 enum?: string[]; 6 }; 7} 8 9export interface SchemaPatch { 10 properties: SchemaProperties; 11 required: string[]; 12} 13 14export const TOOL_SCHEMA_PATCHES: Record<string, SchemaPatch> = { 15 register: { 16 properties: { 17 username: { type: "string", description: "Username (3-20 chars, alphanumeric)" }, 18 empire: { 19 type: "string", 20 description: "Empire to join", 21 enum: ["solarian", "voidborn", "crimson", "nebula", "outerrim"], 22 }, 23 }, 24 required: ["username", "empire"], 25 }, 26 login: { 27 properties: { 28 username: { type: "string", description: "Your username" }, 29 password: { type: "string", description: "Your 256-bit hex password" }, 30 }, 31 required: ["username", "password"], 32 }, 33 34 travel: { 35 properties: { 36 target_poi: { type: "string", description: "POI ID to travel to (e.g., 'sol_belt')" }, 37 }, 38 required: ["target_poi"], 39 }, 40 jump: { 41 properties: { 42 target_system: { type: "string", description: "System ID to jump to" }, 43 }, 44 required: ["target_system"], 45 }, 46 47 attack: { 48 properties: { 49 target_id: { type: "string", description: "Player ID to attack" }, 50 weapon_idx: { type: "number", description: "Weapon module index (0-based, optional)" }, 51 }, 52 required: ["target_id"], 53 }, 54 scan: { 55 properties: { 56 target_id: { type: "string", description: "Player ID to scan" }, 57 }, 58 required: ["target_id"], 59 }, 60 cloak: { 61 properties: { 62 enable: { type: "boolean", description: "Enable or disable cloaking" }, 63 }, 64 required: ["enable"], 65 }, 66 67 buy: { 68 properties: { 69 listing_id: { type: "string", description: "Market listing ID" }, 70 quantity: { type: "number", description: "Amount to buy" }, 71 }, 72 required: ["listing_id", "quantity"], 73 }, 74 sell: { 75 properties: { 76 item_id: { type: "string", description: "Item ID to sell" }, 77 quantity: { type: "number", description: "Amount to sell" }, 78 }, 79 required: ["item_id", "quantity"], 80 }, 81 list_item: { 82 properties: { 83 item_id: { type: "string", description: "Item ID to list" }, 84 quantity: { type: "number", description: "Amount to list" }, 85 price_each: { type: "number", description: "Price per unit" }, 86 }, 87 required: ["item_id", "quantity", "price_each"], 88 }, 89 cancel_list: { 90 properties: { 91 listing_id: { type: "string", description: "Listing ID to cancel" }, 92 }, 93 required: ["listing_id"], 94 }, 95 buy_listing: { 96 properties: { 97 listing_id: { type: "string", description: "Player listing ID" }, 98 quantity: { type: "number", description: "Amount to buy" }, 99 }, 100 required: ["listing_id", "quantity"], 101 }, 102 103 trade_offer: { 104 properties: { 105 target_id: { type: "string", description: "Target player ID" }, 106 offer_items: { type: "array", description: "Items to offer [{item_id, quantity}]" }, 107 offer_credits: { type: "number", description: "Credits to offer" }, 108 request_items: { type: "array", description: "Items to request [{item_id, quantity}]" }, 109 request_credits: { type: "number", description: "Credits to request" }, 110 }, 111 required: ["target_id"], 112 }, 113 trade_accept: { 114 properties: { 115 trade_id: { type: "string", description: "Trade ID to accept" }, 116 }, 117 required: ["trade_id"], 118 }, 119 trade_decline: { 120 properties: { 121 trade_id: { type: "string", description: "Trade ID to decline" }, 122 }, 123 required: ["trade_id"], 124 }, 125 trade_cancel: { 126 properties: { 127 trade_id: { type: "string", description: "Trade ID to cancel" }, 128 }, 129 required: ["trade_id"], 130 }, 131 132 loot_wreck: { 133 properties: { 134 wreck_id: { type: "string", description: "Wreck ID" }, 135 item_id: { type: "string", description: "Item ID to loot" }, 136 quantity: { type: "number", description: "Amount to loot" }, 137 }, 138 required: ["wreck_id"], 139 }, 140 salvage_wreck: { 141 properties: { 142 wreck_id: { type: "string", description: "Wreck ID to salvage" }, 143 }, 144 required: ["wreck_id"], 145 }, 146 147 buy_ship: { 148 properties: { 149 ship_class: { type: "string", description: "Ship class ID to purchase" }, 150 }, 151 required: ["ship_class"], 152 }, 153 install_mod: { 154 properties: { 155 module_id: { type: "string", description: "Module ID to install" }, 156 slot_idx: { type: "number", description: "Slot index" }, 157 }, 158 required: ["module_id", "slot_idx"], 159 }, 160 uninstall_mod: { 161 properties: { 162 slot_idx: { type: "number", description: "Slot index to uninstall from" }, 163 }, 164 required: ["slot_idx"], 165 }, 166 167 craft: { 168 properties: { 169 recipe_id: { type: "string", description: "Recipe ID to craft" }, 170 }, 171 required: ["recipe_id"], 172 }, 173 174 chat: { 175 properties: { 176 channel: { 177 type: "string", 178 description: "Chat channel", 179 enum: ["local", "system", "faction", "private"], 180 }, 181 content: { type: "string", description: "Message content" }, 182 target_id: { type: "string", description: "Target player ID (for private channel)" }, 183 }, 184 required: ["channel", "content"], 185 }, 186 187 create_faction: { 188 properties: { 189 name: { type: "string", description: "Faction name" }, 190 tag: { type: "string", description: "Faction tag (4 chars)" }, 191 }, 192 required: ["name", "tag"], 193 }, 194 join_faction: { 195 properties: { 196 faction_id: { type: "string", description: "Faction ID to join" }, 197 }, 198 required: ["faction_id"], 199 }, 200 faction_invite: { 201 properties: { 202 player_id: { type: "string", description: "Player ID to invite" }, 203 }, 204 required: ["player_id"], 205 }, 206 faction_kick: { 207 properties: { 208 player_id: { type: "string", description: "Player ID to kick" }, 209 }, 210 required: ["player_id"], 211 }, 212 faction_promote: { 213 properties: { 214 player_id: { type: "string", description: "Player ID to promote" }, 215 role_id: { type: "string", description: "New role ID" }, 216 }, 217 required: ["player_id", "role_id"], 218 }, 219 faction_info: { 220 properties: { 221 faction_id: { 222 type: "string", 223 description: "Faction ID (optional, defaults to your faction)", 224 }, 225 }, 226 required: [], 227 }, 228 faction_list: { 229 properties: { 230 limit: { type: "number", description: "Max results (default 50)" }, 231 offset: { type: "number", description: "Pagination offset" }, 232 }, 233 required: [], 234 }, 235 faction_decline_invite: { 236 properties: { 237 faction_id: { type: "string", description: "Faction ID to decline" }, 238 }, 239 required: ["faction_id"], 240 }, 241 242 faction_set_ally: { 243 properties: { 244 target_faction_id: { type: "string", description: "Faction ID to ally with" }, 245 }, 246 required: ["target_faction_id"], 247 }, 248 faction_set_enemy: { 249 properties: { 250 target_faction_id: { type: "string", description: "Faction ID to mark as enemy" }, 251 }, 252 required: ["target_faction_id"], 253 }, 254 faction_declare_war: { 255 properties: { 256 target_faction_id: { type: "string", description: "Faction ID to declare war on" }, 257 reason: { type: "string", description: "Reason for war (optional)" }, 258 }, 259 required: ["target_faction_id"], 260 }, 261 faction_propose_peace: { 262 properties: { 263 target_faction_id: { type: "string", description: "Faction ID to propose peace to" }, 264 terms: { type: "string", description: "Peace terms (optional)" }, 265 }, 266 required: ["target_faction_id"], 267 }, 268 faction_accept_peace: { 269 properties: { 270 target_faction_id: { type: "string", description: "Faction ID to accept peace from" }, 271 }, 272 required: ["target_faction_id"], 273 }, 274 275 buy_insurance: { 276 properties: { 277 coverage_percent: { type: "number", description: "Coverage percentage (50-100)" }, 278 }, 279 required: ["coverage_percent"], 280 }, 281 282 set_status: { 283 properties: { 284 status_message: { type: "string", description: "Status message" }, 285 clan_tag: { type: "string", description: "Clan tag (4 chars)" }, 286 }, 287 required: [], 288 }, 289 set_colors: { 290 properties: { 291 primary_color: { type: "string", description: "Primary color (#RRGGBB)" }, 292 secondary_color: { type: "string", description: "Secondary color (#RRGGBB)" }, 293 }, 294 required: [], 295 }, 296 set_anonymous: { 297 properties: { 298 anonymous: { type: "boolean", description: "Enable anonymous mode" }, 299 }, 300 required: ["anonymous"], 301 }, 302 303 get_system: { 304 properties: { 305 system_id: { type: "string", description: "System ID (optional, defaults to current)" }, 306 }, 307 required: [], 308 }, 309 get_map: { 310 properties: { 311 system_id: { type: "string", description: "System ID for details (optional)" }, 312 }, 313 required: [], 314 }, 315 help: { 316 properties: { 317 topic: { type: "string", description: "Command name to get help for" }, 318 }, 319 required: [], 320 }, 321 322 create_map: { 323 properties: { 324 name: { type: "string", description: "Map document name" }, 325 description: { type: "string", description: "Map description" }, 326 systems: { type: "array", description: "System IDs to include (empty = all)" }, 327 }, 328 required: ["name"], 329 }, 330 use_map: { 331 properties: { 332 map_item_id: { type: "string", description: "Map item ID to use" }, 333 }, 334 required: ["map_item_id"], 335 }, 336 337 create_note: { 338 properties: { 339 title: { type: "string", description: "Note title (max 100 chars)" }, 340 content: { type: "string", description: "Note content (max 10000 chars)" }, 341 }, 342 required: ["title", "content"], 343 }, 344 write_note: { 345 properties: { 346 note_id: { type: "string", description: "Note ID to edit" }, 347 content: { type: "string", description: "New content" }, 348 }, 349 required: ["note_id", "content"], 350 }, 351 read_note: { 352 properties: { 353 note_id: { type: "string", description: "Note ID to read" }, 354 }, 355 required: ["note_id"], 356 }, 357 358 build_base: { 359 properties: { 360 name: { type: "string", description: "Base name (max 32 chars)" }, 361 description: { type: "string", description: "Base description" }, 362 type: { 363 type: "string", 364 description: "Station type", 365 enum: ["outpost", "station", "fortress"], 366 }, 367 services: { type: "array", description: "Services to enable" }, 368 faction_base: { type: "boolean", description: "Build as faction base" }, 369 }, 370 required: ["name"], 371 }, 372 373 attack_base: { 374 properties: { 375 base_id: { type: "string", description: "Base ID to attack" }, 376 }, 377 required: ["base_id"], 378 }, 379 loot_base_wreck: { 380 properties: { 381 wreck_id: { type: "string", description: "Base wreck ID" }, 382 item_id: { type: "string", description: "Item ID to loot" }, 383 quantity: { type: "number", description: "Amount to loot" }, 384 credits: { type: "boolean", description: "Loot credits instead of items" }, 385 }, 386 required: ["wreck_id"], 387 }, 388 salvage_base_wreck: { 389 properties: { 390 wreck_id: { type: "string", description: "Base wreck ID to salvage" }, 391 }, 392 required: ["wreck_id"], 393 }, 394 395 deploy_drone: { 396 properties: { 397 drone_item_id: { 398 type: "string", 399 description: "Drone type", 400 enum: ["combat_drone", "mining_drone", "repair_drone"], 401 }, 402 target_id: { type: "string", description: "Immediate attack target (combat only)" }, 403 }, 404 required: ["drone_item_id"], 405 }, 406 recall_drone: { 407 properties: { 408 all: { type: "boolean", description: "Recall all drones" }, 409 drone_id: { type: "string", description: "Specific drone ID to recall" }, 410 }, 411 required: [], 412 }, 413 order_drone: { 414 properties: { 415 command: { 416 type: "string", 417 description: "Drone command", 418 enum: ["attack", "stop", "assist", "mine"], 419 }, 420 target_id: { type: "string", description: "Target for attack/assist commands" }, 421 }, 422 required: ["command"], 423 }, 424 425 forum_list: { 426 properties: { 427 page: { type: "number", description: "Page number" }, 428 category: { type: "string", description: "Category filter" }, 429 }, 430 required: [], 431 }, 432 forum_get_thread: { 433 properties: { 434 thread_id: { type: "string", description: "Thread ID" }, 435 }, 436 required: ["thread_id"], 437 }, 438 forum_create_thread: { 439 properties: { 440 title: { type: "string", description: "Thread title" }, 441 content: { type: "string", description: "Thread content" }, 442 category: { type: "string", description: "Category" }, 443 }, 444 required: ["title", "content", "category"], 445 }, 446 forum_reply: { 447 properties: { 448 thread_id: { type: "string", description: "Thread ID to reply to" }, 449 content: { type: "string", description: "Reply content" }, 450 }, 451 required: ["thread_id", "content"], 452 }, 453 forum_upvote: { 454 properties: { 455 thread_id: { type: "string", description: "Thread ID to upvote" }, 456 reply_id: { type: "string", description: "Reply ID to upvote" }, 457 }, 458 required: [], 459 }, 460 forum_delete_thread: { 461 properties: { 462 thread_id: { type: "string", description: "Thread ID to delete" }, 463 }, 464 required: ["thread_id"], 465 }, 466 forum_delete_reply: { 467 properties: { 468 reply_id: { type: "string", description: "Reply ID to delete" }, 469 }, 470 required: ["reply_id"], 471 }, 472 473 captains_log_add: { 474 properties: { 475 entry: { type: "string", description: "Log entry text (max 1KB)" }, 476 }, 477 required: ["entry"], 478 }, 479 captains_log_get: { 480 properties: { 481 index: { type: "number", description: "Entry index (0 = newest)" }, 482 }, 483 required: ["index"], 484 }, 485 486 get_notifications: { 487 properties: { 488 limit: { type: "number", description: "Max notifications (default 50)" }, 489 types: { 490 type: "array", 491 description: "Filter by types: chat, combat, trade, faction, friend, forum, system", 492 }, 493 clear: { type: "boolean", description: "Clear notifications after reading (default true)" }, 494 }, 495 required: [], 496 }, 497 498 jettison: { 499 properties: { 500 item_id: { type: "string", description: "Item ID to jettison" }, 501 quantity: { type: "number", description: "Amount to jettison" }, 502 }, 503 required: ["item_id", "quantity"], 504 }, 505 506 add_friend: { 507 properties: { 508 player_id: { type: "string", description: "Player ID to add as friend" }, 509 }, 510 required: ["player_id"], 511 }, 512 remove_friend: { 513 properties: { 514 player_id: { type: "string", description: "Player ID to remove" }, 515 }, 516 required: ["player_id"], 517 }, 518 accept_friend_request: { 519 properties: { 520 player_id: { type: "string", description: "Player ID to accept" }, 521 }, 522 required: ["player_id"], 523 }, 524 decline_friend_request: { 525 properties: { 526 player_id: { type: "string", description: "Player ID to decline" }, 527 }, 528 required: ["player_id"], 529 }, 530 531 accept_mission: { 532 properties: { 533 mission_id: { type: "string", description: "Mission ID to accept" }, 534 }, 535 required: ["mission_id"], 536 }, 537 complete_mission: { 538 properties: { 539 mission_id: { type: "string", description: "Mission ID to complete" }, 540 }, 541 required: ["mission_id"], 542 }, 543 abandon_mission: { 544 properties: { 545 mission_id: { type: "string", description: "Mission ID to abandon" }, 546 }, 547 required: ["mission_id"], 548 }, 549};