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-22 08:22:58 +00:00
2026-02-26 11:00:09 +01:00
2026-02-27 17:25:59 -08:00
2026-02-27 17:25:59 -08:00
2026-02-27 17:25:59 -08:00
2026-02-20 16:06:07 -06:00
2026-02-23 10:25:14 -05:00
2026-02-20 21:17:04 -06:00
2026-02-23 10:25:14 -05:00
2026-02-22 08:22:58 +00:00
2026-03-01 19:50:51 -06:00
2026-03-01 19:50:51 -06:00
2026-02-20 21:17:04 -06:00
2026-03-02 02:05:11 +00:00
2026-02-19 15:39:56 +01:00
2026-02-19 15:39:56 +01:00
2026-02-19 15:39:56 +01:00
2026-02-22 11:17:47 +00:00
2026-02-22 22:24:27 +01:00
2026-02-22 22:24:27 +01:00
2026-02-21 17:11:47 -05:00
2026-02-22 18:55:44 +01:00
2026-02-22 18:55:44 +01:00
2026-02-23 03:18:55 -05:00
2026-02-24 02:32:01 +00:00
2026-03-02 01:04:01 +00:00
2026-02-22 20:04:51 +00:00
2026-02-22 07:44:57 +00:00
2026-02-20 20:30:52 -08:00
2026-03-01 23:37:55 +00:00
2026-03-02 02:05:11 +00:00
2026-03-02 02:54:45 +00:00
2026-03-02 01:53:20 +00:00
2026-02-26 21:26:54 +00:00
2026-02-26 22:18:57 +01:00
2026-02-23 19:19:45 +00:00
2026-02-17 14:33:26 +09:00
2026-02-16 03:56:49 +01:00
2026-02-18 01:34:35 +00:00
2026-02-22 21:19:09 +00:00
2026-03-02 05:20:19 +00:00
2026-03-01 09:41:06 -06:00
2026-02-22 21:19:09 +00:00
2026-02-22 21:19:09 +00:00
2026-02-18 01:34:35 +00:00
2026-02-18 01:34:35 +00:00
2026-02-22 21:19:09 +00:00
2026-03-01 21:33:51 -08:00
2026-03-01 21:33:51 -08:00
2026-03-01 09:41:06 -06:00
2026-03-02 02:23:22 +00:00
2026-03-02 02:23:22 +00:00
2026-02-21 16:14:55 +01:00
2026-02-23 10:25:14 -05:00
2026-02-23 10:25:14 -05:00
2026-02-16 08:20:24 -05:00
2026-02-18 01:34:35 +00:00
2026-02-22 18:10:26 -05:00
2026-02-22 18:10:26 -05:00
2026-02-22 18:10:26 -05:00
2026-02-17 09:02:39 -05:00
2026-02-22 10:41:29 +00:00
2026-02-16 14:59:30 +00:00
2026-02-16 14:59:30 +00:00
2026-02-26 12:44:18 +01:00
2026-03-02 03:43:25 +00:00
2026-03-02 03:43:25 +00:00
2026-03-02 01:14:06 +00:00
2026-03-02 01:05:20 +00:00
2026-02-25 04:59:38 +00:00
2026-03-02 01:14:06 +00:00
2026-02-16 21:13:48 -05:00
2026-02-26 12:44:18 +01:00
2026-02-26 11:32:43 +00:00
2026-02-22 10:41:29 +00:00
2026-02-22 11:17:47 +00:00
2026-02-21 14:31:01 +01:00
2026-02-21 14:31:01 +01:00