fix(2.9.2): add AssistantRule Controller — fixes silent save_rule 404
Without Controllers/AssistantRule.php, EspoCRM responds 404 "Controller 'AssistantRule' does not exist" on every POST/GET /api/v1/AssistantRule, even though scopes/AssistantRule.json declares entity=true, object=true, acl=true. The save_rule tool in shira-hermes calls the Record endpoint directly, gets the 404, falls back to nothing (because the user_id branch of the fallback rarely matches), and the LLM tells the user "✅ כלל נשמר" without verification — yet another instance of the hallucination pattern. A one-line Controller class that extends Espo\Core\Controllers\Record exposes the standard CRUD verbs and unlocks the storage path that the rest of the stack already expected. Verified in prod: GET, POST, DELETE all return 200 after this is in place. Paired with shira-hermes 06b27e9 which teaches the LLM to actually read the tool result and never report success on a ❌ response. Refs Task Master #6 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Espo\Modules\SmartAssistant\Controllers;
|
||||
|
||||
/**
|
||||
* Exposes the AssistantRule entity over the standard REST API
|
||||
* (GET/POST/PUT/DELETE /api/v1/AssistantRule).
|
||||
*
|
||||
* Without this controller class EspoCRM responds 404 "Controller does not exist"
|
||||
* even when the entity, object, and acl flags in scopes/AssistantRule.json are
|
||||
* set. Inheriting from Record gives us the full CRUD surface — list/search,
|
||||
* read, create, update, delete — with ACL enforcement.
|
||||
*/
|
||||
class AssistantRule extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
}
|
||||
+2
-2
@@ -3,11 +3,11 @@
|
||||
"module": "SmartAssistant",
|
||||
"description": "Unified AI Assistant for Legal CRM — floating chat with case memory, office alerts, and AI Gateway integration",
|
||||
"author": "klear",
|
||||
"version": "2.9.1",
|
||||
"version": "2.9.2",
|
||||
"acceptableVersions": [
|
||||
">=8.0.0"
|
||||
],
|
||||
"releaseDate": "2026-05-26",
|
||||
"releaseDate": "2026-05-27",
|
||||
"php": [
|
||||
">=8.1"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user