|
282 | 282 | } |
283 | 283 | } |
284 | 284 | }, |
285 | | - "HintSetRequest": { |
| 285 | + "RoleSetRequest": { |
286 | 286 | "type": "object", |
287 | | - "required": ["level", "role"], |
| 287 | + "required": ["role"], |
288 | 288 | "properties": { |
289 | | - "level": { |
290 | | - "type": "string", |
291 | | - "enum": ["prefer", "exclude", "fixed"], |
292 | | - "description": "Hint strength: prefer (soft), exclude (medium), fixed (hard)." |
293 | | - }, |
294 | 289 | "role": { |
295 | 290 | "type": "string", |
296 | 291 | "enum": ["entry", "exit", "relay"], |
297 | | - "description": "Role to apply the hint to." |
| 292 | + "description": "Target role." |
| 293 | + }, |
| 294 | + "level": { |
| 295 | + "type": "string", |
| 296 | + "enum": ["prefer", "exclude", "fixed"], |
| 297 | + "default": "fixed", |
| 298 | + "description": "How to apply: fixed (default, force), prefer (soft), exclude (avoid)." |
298 | 299 | } |
299 | 300 | } |
300 | 301 | } |
|
623 | 624 | } |
624 | 625 | } |
625 | 626 | }, |
626 | | - "/hints": { |
| 627 | + "/role": { |
627 | 628 | "put": { |
628 | | - "summary": "Set role hint", |
629 | | - "description": "Configures a negotiation hint to influence auto-role resolution.", |
630 | | - "operationId": "hintSet", |
| 629 | + "summary": "Set role", |
| 630 | + "description": "Set this node's role preference: fixed (force), prefer (soft), or exclude (avoid).", |
| 631 | + "operationId": "roleSet", |
631 | 632 | "security": [{ "basicAuth": [] }], |
632 | 633 | "requestBody": { |
633 | 634 | "required": true, |
634 | 635 | "content": { |
635 | 636 | "application/json": { |
636 | | - "schema": { "$ref": "#/components/schemas/HintSetRequest" } |
| 637 | + "schema": { "$ref": "#/components/schemas/RoleSetRequest" } |
637 | 638 | } |
638 | 639 | } |
639 | 640 | }, |
640 | 641 | "responses": { |
641 | 642 | "200": { |
642 | | - "description": "Hint applied.", |
| 643 | + "description": "Role preference applied.", |
643 | 644 | "content": { |
644 | 645 | "application/json": { |
645 | 646 | "schema": { "$ref": "#/components/schemas/SuccessResponse" } |
646 | 647 | } |
647 | 648 | } |
648 | 649 | }, |
649 | | - "400": { "description": "Invalid hint level or role." }, |
| 650 | + "400": { "description": "Invalid level or role." }, |
650 | 651 | "401": { "description": "Unauthorized." } |
651 | 652 | } |
652 | 653 | }, |
653 | 654 | "delete": { |
654 | 655 | "summary": "Auto-negotiate", |
655 | | - "description": "Returns to pure capability-based negotiation by removing all role hints.", |
656 | | - "operationId": "hintSetAuto", |
| 656 | + "description": "Clear all role preferences and return to capability-based negotiation.", |
| 657 | + "operationId": "roleAuto", |
657 | 658 | "security": [{ "basicAuth": [] }], |
658 | 659 | "responses": { |
659 | 660 | "200": { |
660 | | - "description": "Hints cleared.", |
| 661 | + "description": "Role preferences cleared.", |
661 | 662 | "content": { |
662 | 663 | "application/json": { |
663 | 664 | "schema": { "$ref": "#/components/schemas/SuccessResponse" } |
|
0 commit comments