@volter/supercode-interchange 0.1.18 → 0.1.19

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-interchange",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "type": "module",
5
5
  "description": "Read-only harness metadata, transcript codecs and session projections for Supercode",
6
6
  "license": "MIT OR Apache-2.0",
@@ -150,12 +150,15 @@ export function pushClaudeAttachment(value, out) {
150
150
  }
151
151
  if (text == null || nativeTrim(text) === '') return;
152
152
  const message = createMessage('user', text); message.metadata.attachmentType = kind;
153
+ Object.assign(message.metadata, claudeUserProvenance(attachment));
154
+ if (field(attachment, 'humanTurn') === true) message.metadata.origin = 'human';
153
155
  const mode = stringField(attachment, 'commandMode'); if (mode != null) message.metadata.commandMode = mode;
156
+ const messageId = stringField(attachment, 'msg_id'); if (messageId != null) message.metadata.native_msg_id = messageId;
154
157
  out.push(message);
155
158
  }
156
159
 
157
160
  export function captureClaudeProvenance(value, messages, from = 0) {
158
- const facts = [['timestamp', stringField(value, 'timestamp')], ['claude_uuid', stringField(value, 'uuid')], ['model', stringField(field(value, 'message'), 'model')]];
161
+ const facts = [['timestamp', stringField(value, 'timestamp')], ['claude_uuid', stringField(value, 'uuid')], ['native_msg_id', stringField(value, 'msg_id')], ['model', stringField(field(value, 'message'), 'model')]];
159
162
  for (let index = from; index < messages.length; index++) for (const [key, fact] of facts) {
160
163
  if (fact != null && !Object.hasOwn(messages[index].metadata, key)) messages[index].metadata[key] = fact;
161
164
  }