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-02-17 02:23:41 +01:00
2026-02-27 23:27:27 +01:00
2026-03-01 06:58:03 -06:00
2026-03-02 04:03:46 +00:00
2026-03-01 20:49:45 -08:00
2026-03-01 21:33:51 -08:00
2026-02-06 10:08:59 -05:00
2026-02-23 23:29:27 +00:00
2026-01-31 15:04:03 -06:00
2026-02-27 10:02:39 +01:00
2026-03-01 21:33:51 -08:00
2026-03-01 20:31:06 -08:00
2026-02-17 09:15:55 +01:00
2026-03-01 20:52:14 -08:00
2026-03-01 15:09:35 -08:00
2026-03-02 00:15:34 +00:00
2026-03-02 04:55:53 +00:00
2026-02-24 08:41:28 -06:00
2026-03-01 22:45:03 +00:00
2026-02-22 21:28:08 +01:00
2026-03-02 05:33:07 +00:00
2026-02-22 20:45:09 +01:00
2026-02-27 08:00:29 +05:30
2026-03-01 21:33:51 -08:00
2026-03-01 20:31:06 -08:00
2026-02-18 02:52:35 +01:00
2026-02-06 10:08:59 -05:00
2026-02-22 20:37:02 +01:00
2026-01-30 03:16:21 +01:00
2026-01-31 15:04:03 -06:00
2026-03-01 15:09:35 -08:00
2026-02-06 10:08:59 -05:00
2026-02-22 11:15:13 +01:00
2026-02-20 09:33:46 -05:00
2026-02-07 15:40:35 -05:00
2026-02-06 10:08:59 -05:00
2026-02-22 21:07:34 +01:00
2026-02-26 16:38:20 +01:00
2026-02-07 15:40:35 -05:00
2026-02-20 16:28:47 +00:00
2026-02-21 13:16:07 +01:00
2026-03-01 14:23:46 -08:00
2026-02-02 18:35:01 +01:00
2026-01-30 03:16:21 +01:00