Structured sales-agent config, version spine and outreach state

Featurekamo-shared-library
Expediere
19 iulie 2026 la 01:25 UTC
Autor
Kamo
Comite
6cf49b2

Replaces the single training-context blob with a structured, versionable agent model, and adds the per-contact spine an agent needs before it may initiate contact rather than only reply. - SalesAgent gains configJson (jsonb-as-String, matching WebChatIntegration .designConfig), hasConfig, publishedVersionId, audience and outboundEnabled. trainingContext is retained as the COMPILED OUTPUT so every existing consumer keeps working untouched. hasConfig is explicit rather than inferred from trainingContext being blank, because once it is compiled output it is never blank and any blankness test would be unreachable. - SalesAgentVersion freezes {configJson, compiledPrompt, compiledHash, modelId, providerId} per publish. The model is pinned alongside the prompt: freezing instructions while the model auto-routes would make the artifact a half-truth. - AiChatSession/AiUsageRecord gain salesAgentId + salesAgentVersionId. Previously "which agent handled this?" could only be answered by walking the mutable, nullable, non-FK WebChatIntegration.salesAgentId hop, so reassigning a channel silently re-attributed all history. - AiOrgSettings gains forcedPreamble/forcedFooter as NEW nullable columns rather than reusing defaultSystemPrompt, so concatenation is a no-op until an admin fills one in. Reusing the existing field would have changed behaviour for every org that already had one populated, on deploy day. - AgentContactState + AgentOutboundTouch: per-contact cross-channel suppression, explicit per-channel opt-out columns and timestamped consent. Opt-out is stored as real columns rather than JSON because "prove this number was suppressed on that date" must not depend on JSON path extraction. The touch log records REFUSALS as well as sends - a log of sends proves what you did, a log of decisions proves what you would not do. - Rights 168-173 split **************** off MANAGE_AI_SETTINGS(53), which previously gated none of this.

Toate modificările

Ca ceea ce vezi de transport maritim?

Fiecare dintre aceste actualizări aterizează automat în spațiul de lucru. Începe gratuit și urmăriți-l crească săptămână după săptămână.

Pornește gratuit pentru totdeaunaVezi prețurile