soulbridge 0.0.17 → 0.0.18

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.
@@ -130,6 +130,9 @@ export class Soul {
130
130
  // a rule that already fired.
131
131
  let drafts = ruleExtract([turn]);
132
132
  let extractedBy = drafts.length > 0 ? 'rules' : 'none';
133
+ // A model that says "nothing to keep" and a model that answers garbage used
134
+ // to be indistinguishable; keep them apart for measurement.
135
+ let llmOutcome = 'off';
133
136
  if (drafts.length === 0 && turn.role === 'user' && this.llm) {
134
137
  if (turn.content.length <= this.llmMaxChars) {
135
138
  try {
@@ -137,13 +140,21 @@ export class Soul {
137
140
  if (draft) {
138
141
  drafts = [draft];
139
142
  extractedBy = 'llm';
143
+ llmOutcome = 'stored';
144
+ }
145
+ else {
146
+ llmOutcome = 'null';
140
147
  }
141
148
  }
142
149
  catch {
143
150
  // The model is an enhancement; a transport or parse failure leaves the
144
151
  // rule result (nothing) in place.
152
+ llmOutcome = 'failed';
145
153
  }
146
154
  }
155
+ else {
156
+ llmOutcome = 'skipped';
157
+ }
147
158
  }
148
159
  // Deterministic write gates: shape -> semantics -> per-turn budget. Whatever
149
160
  // they refuse is reported, so written: 0 always has a reason.
@@ -187,6 +198,7 @@ export class Soul {
187
198
  written,
188
199
  committed: written > 0,
189
200
  rejections: gated.rejected,
201
+ llmOutcome,
190
202
  emotion,
191
203
  affect,
192
204
  extractedBy: written > 0 ? extractedBy : 'none',
@@ -129,6 +129,11 @@ export interface ObserveResult {
129
129
  committed: boolean;
130
130
  /** Drafts refused before writing, with the gate that refused them. */
131
131
  rejections: DraftRejection[];
132
+ /**
133
+ * What the optional model did, kept apart from `extractedBy` because a null
134
+ * answer and a broken answer used to look identical in the logs.
135
+ */
136
+ llmOutcome: 'off' | 'skipped' | 'stored' | 'null' | 'failed';
132
137
  emotion: Emotion;
133
138
  /** Analysis of the user turn. Empty signal for assistant turns or on failure. */
134
139
  affect: AffectSignal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soulbridge",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "A personality layer for any agent: continuity, forgetting, and growth across tools.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",