@caupulican/pi-adaptative 0.80.63 → 0.80.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -805,6 +805,16 @@ export class AgentSession {
805
805
  }
806
806
  return Array.from(unique);
807
807
  }
808
+ /**
809
+ * R6: the active profile's situational soul, wrapped so the model reads it as its identity for this
810
+ * situation. Empty when no active profile defines a soul.
811
+ */
812
+ _buildSituationSoulPrompt() {
813
+ const soul = this.settingsManager.getActiveProfileSoul();
814
+ if (!soul)
815
+ return undefined;
816
+ return `<situation_soul>\n${soul}\n</situation_soul>`;
817
+ }
808
818
  _buildSelfModificationPrompt() {
809
819
  const settings = this.settingsManager.getSelfModificationSettings();
810
820
  if (!settings.enabled) {
@@ -883,6 +893,9 @@ export class AgentSession {
883
893
  const loaderSystemPrompt = this._resourceLoader.getSystemPrompt();
884
894
  const loaderAppendSystemPrompt = this._resourceLoader.getAppendSystemPrompt();
885
895
  const appendSystemPromptParts = [
896
+ // R6: situational soul — the active profile's identity prefix, switched atomically with the
897
+ // profile's capabilities/model. Most prominent, so it comes first.
898
+ this._buildSituationSoulPrompt(),
886
899
  this._buildSelfModificationPrompt(),
887
900
  this._buildAutonomyPrompt(),
888
901
  // Memory subsystem: static, frozen-per-session block (e.g. file-store MEMORY.md/USER.md).