mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-19 10:02:16 +00:00
* fix(photon): preserve text in mixed iMessage attachments
When an iMessage bubble carried both text and an attachment, spectrum-ts'
inbound mapper returned only buildAttachmentMessage(...), dropping the user's
typed text before Hermes could see it. The Photon adapter then had no 'group'
content path, so the text was lost entirely.
- adapter.py: handle a new 'group' content type that flattens text + attachment
items, preserving the typed text alongside cached media (extracted shared
_normalize_binary_payload helper).
- sidecar: emit 'group' content in normalizeContent, and ship
patch-spectrum-mixed-attachments.mjs which patches spectrum-ts' pinned mapper
(at npm postinstall AND at sidecar startup, so existing installs self-heal).
Windows robustness fixes on top of the original PR:
- The patcher's CLI guard used 'import.meta.url === file://${argv[1]}', which
never matches on Windows (file:/// + drive letter) — it silently no-opped.
Switched to pathToFileURL(argv[1]).href.
- The patcher matched \n-joined strings, so a CRLF checkout (Windows git
autocrlf) defeated every replacement. It now normalizes CRLF->LF for matching
and restores the original EOL style on write.
Co-authored-by: Yuhang Lin <yuhanglin@YuhangdeMac-mini.local>
* chore: map YuhangLin contributor email for attribution (#46513)
---------
Co-authored-by: Yuhang Lin <yuhanglin@YuhangdeMac-mini.local>
Co-authored-by: Teknium <127238744+teknium1@users.noreply.github.com>
25 lines
686 B
JSON
25 lines
686 B
JSON
{
|
|
"name": "@hermes-agent/photon-sidecar",
|
|
"private": true,
|
|
"version": "0.3.0",
|
|
"description": "Spectrum-ts bridge for the Hermes Agent Photon platform plugin.",
|
|
"type": "module",
|
|
"main": "index.mjs",
|
|
"scripts": {
|
|
"start": "node index.mjs",
|
|
"postinstall": "node patch-spectrum-mixed-attachments.mjs"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.17"
|
|
},
|
|
"dependencies": {
|
|
"spectrum-ts": "3.1.0"
|
|
},
|
|
"overrides": {
|
|
"protobufjs": "8.6.1",
|
|
"@opentelemetry/otlp-transformer": "0.218.0",
|
|
"@opentelemetry/otlp-exporter-base": "0.218.0",
|
|
"@opentelemetry/exporter-trace-otlp-http": "0.218.0",
|
|
"@opentelemetry/exporter-logs-otlp-http": "0.218.0"
|
|
}
|
|
}
|