Nikolay Petrov
a9f1188785
sessions_spawn: inline attachments with redaction, lifecycle cleanup, and docs (#16761)
Add inline file attachment support for sessions_spawn (subagent runtime only):
- Schema: attachments[] (name, content, encoding, mimeType) and attachAs.mountPath hint
- Materialization: files written to .openclaw/attachments/<uuid>/ with manifest.json
- Validation: strict base64 decode, filename checks, size limits, duplicate detection
- Transcript redaction: sanitizeToolCallInputs redacts attachment content from persisted transcripts
- Lifecycle cleanup: safeRemoveAttachmentsDir with symlink-safe path containment check
- Config: tools.sessions_spawn.attachments (enabled, maxFiles, maxFileBytes, maxTotalBytes, retainOnSessionKeep)
- Registry: attachmentsDir/attachmentsRootDir/retainAttachmentsOnKeep on SubagentRunRecord
- ACP rejection: attachments rejected for runtime=acp with clear error message
- Docs: updated tools/index.md, concepts/session-tool.md, configuration-reference.md
- Tests: 85 new/updated tests across 5 test files
Fixes:
- Guard fs.rm in materialization catch block with try/catch (review concern #1)
- Remove unreachable fallback in safeRemoveAttachmentsDir (review concern #7)
- Move attachment cleanup out of retry path to avoid timing issues with announce loop
Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
Co-authored-by: napetrov <napetrov@users.noreply.github.com>
2026-03-01 21:33:51 -08:00
..
2026-03-01 23:30:39 +00:00
2026-01-31 15:04:03 -06:00
2026-02-15 03:19:27 +01:00
2026-02-06 10:00:08 -05:00
2026-02-06 22:28:44 -08:00
2026-02-24 01:52:01 +00:00
2026-02-24 04:16:08 +00:00
2026-02-02 02:26:11 -08:00
2026-02-22 20:37:02 +01:00
2026-03-02 05:07:09 +00:00
2026-02-22 22:00:08 +01:00
2026-03-02 01:12:53 +00:00
2026-03-01 20:31:06 -08:00
2026-01-31 15:04:03 -06:00
2026-03-01 21:33:51 -08:00
2026-02-06 10:00:08 -05:00
2026-02-19 14:58:13 +01:00
2026-02-22 20:45:09 +01:00
2026-02-16 03:47:10 +01:00
2026-02-26 01:14:57 -05:00
2026-01-31 15:04:03 -06:00
2026-02-26 14:47:22 +00:00
2026-02-26 14:47:22 +00:00
2026-02-27 19:09:38 +00:00
2026-03-02 02:35:48 +00:00
2026-02-22 15:26:48 +01:00
2026-03-02 01:05:20 +00:00