Espone API JSON e MCP HTTP per far lavorare gli agenti sul CRM.

Gli agenti autenticati con token Bearer possono leggere today/pipeline e annotare attività, con host MCP allineati a quelli di produzione.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-02 22:43:46 +02:00
co-authored by Cursor
parent 1f946f63ba
commit 936930e691
44 changed files with 1693 additions and 4 deletions
Generated
+16 -1
View File
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.1].define(version: 2026_08_24_190000) do
ActiveRecord::Schema[8.1].define(version: 2026_09_02_220000) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"
@@ -64,6 +64,20 @@ ActiveRecord::Schema[8.1].define(version: 2026_08_24_190000) do
t.index ["user_id"], name: "index_activities_on_user_id"
end
create_table "api_tokens", force: :cascade do |t|
t.datetime "created_at", null: false
t.datetime "last_used_at"
t.string "name", null: false
t.datetime "revoked_at"
t.string "token_digest", null: false
t.string "token_prefix", null: false
t.datetime "updated_at", null: false
t.bigint "user_id", null: false
t.index ["revoked_at"], name: "index_api_tokens_on_revoked_at"
t.index ["token_digest"], name: "index_api_tokens_on_token_digest", unique: true
t.index ["user_id"], name: "index_api_tokens_on_user_id"
end
create_table "contacts", force: :cascade do |t|
t.datetime "created_at", null: false
t.bigint "created_by_id"
@@ -384,6 +398,7 @@ ActiveRecord::Schema[8.1].define(version: 2026_08_24_190000) do
add_foreign_key "activities", "opportunities"
add_foreign_key "activities", "organizations"
add_foreign_key "activities", "users"
add_foreign_key "api_tokens", "users"
add_foreign_key "contacts", "organizations"
add_foreign_key "mail_templates", "projects"
add_foreign_key "mailing_recipients", "contacts"