Commit Graph

40 Commits (4329d94de3a71803db177ee50af68eb75d7ea06b)

Author SHA1 Message Date
Peter Steinberger bc910942e2
docs: refresh history sanitization tag mirrors 8 months ago
Peter Steinberger f14f7b9fde
docs: refresh silent token guidance mirrors 8 months ago
Peter Steinberger 291afbbb95
docs: refresh transcript sanitization mirrors 8 months ago
Peter Steinberger 4453b51e2c
docs: refresh session tool inventory refs 8 months ago
Peter Steinberger d0d57ea435
docs: refresh session recall sanitization mirrors 8 months ago
Peter Steinberger f94645dfe5
docs: refresh session recall sanitization refs 8 months ago
Peter Steinberger e42deea653
docs: refresh sessions_history safety refs 8 months ago
Peter Steinberger de001d0e07
docs: refresh subagent completion delivery refs 8 months ago
Vincent Koc 143b4c54ba docs: simplify sessions/memory concept pages and fix QMD experimental label 8 months ago
Vincent Koc 2880b3d3ff docs: rewrite session management, session pruning, and session tools pages 8 months ago
Peter Steinberger 97abc6db55
docs: clarify sessions_spawn ACP vs subagent policies 8 months ago
clay-datacurve 7b61ca1b06
Session management improvements and dashboard API (#50101)
* fix: make cleanup "keep" persist subagent sessions indefinitely

* feat: expose subagent session metadata in sessions list

* fix: include status and timing in sessions_list tool

* fix: hide injected timestamp prefixes in chat ui

* feat: push session list updates over websocket

* feat: expose child subagent sessions in subagents list

* feat: add admin http endpoint to kill sessions

* Emit session.message websocket events for transcript updates

* Estimate session costs in sessions list

* Add direct session history HTTP and SSE endpoints

* Harden dashboard session events and history APIs

* Add session lifecycle gateway methods

* Add dashboard session API improvements

* Add dashboard session model and parent linkage support

* fix: tighten dashboard session API metadata

* Fix dashboard session cost metadata

* Persist accumulated session cost

* fix: stop followup queue drain cfg crash

* Fix dashboard session create and model metadata

* fix: stop guessing session model costs

* Gateway: cache OpenRouter pricing for configured models

* Gateway: add timeout session status

* Fix subagent spawn test config loading

* Gateway: preserve operator scopes without device identity

* Emit user message transcript events and deduplicate plugin warnings

* feat: emit sessions.changed lifecycle event on subagent spawn

Adds a session-lifecycle-events module (similar to transcript-events)
that emits create events when subagents are spawned. The gateway
server.impl.ts listens for these events and broadcasts sessions.changed
with reason=create to SSE subscribers, so dashboards can pick up new
subagent sessions without polling.

* Gateway: allow persistent dashboard orchestrator sessions

* fix: preserve operator scopes for token-authenticated backend clients

Backend clients (like agent-dashboard) that authenticate with a valid gateway
token but don't present a device identity were getting their scopes stripped.
The scope-clearing logic ran before checking the device identity decision,
so even when evaluateMissingDeviceIdentity returned 'allow' (because
roleCanSkipDeviceIdentity passed for token-authed operators), scopes were
already cleared.

Fix: also check decision.kind before clearing scopes, so token-authenticated
operators keep their requested scopes.

* Gateway: allow operator-token session kills

* Fix stale active subagent status after follow-up runs

* Fix dashboard image attachments in sessions send

* Fix completed session follow-up status updates

* feat: stream session tool events to operator UIs

* Add sessions.steer gateway coverage

* Persist subagent timing in session store

* Fix subagent session transcript event keys

* Fix active subagent session status in gateway

* bump session label max to 512

* Fix gateway send session reactivation

* fix: publish terminal session lifecycle state

* feat: change default session reset to effectively never

- Change DEFAULT_RESET_MODE from "daily" to "idle"
- Change DEFAULT_IDLE_MINUTES from 60 to 0 (0 = disabled/never)
- Allow idleMinutes=0 through normalization (don't clamp to 1)
- Treat idleMinutes=0 as "no idle expiry" in evaluateSessionFreshness
- Default behavior: mode "idle" + idleMinutes 0 = sessions never auto-reset
- Update test assertion for new default mode

* fix: prep session management followups (#50101) (thanks @clay-datacurve)

---------

Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
8 months ago
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>
9 months ago
Peter Steinberger bfeadb80b6 feat(agents): add sessions_spawn sandbox require mode 9 months ago
Peter Steinberger b9aa2d436b fix(security): enforce sandbox inheritance for sessions_spawn 9 months ago
Peter Steinberger 8c5cf2d5b2 docs(subagents): document default runTimeoutSeconds config (#24594) (thanks @mitchmcalister) 9 months ago
Peter Steinberger 817905f3a0 docs: document thread-bound subagent sessions and remove plan 9 months ago
Shadow f555835b09
Channels: add thread-aware model overrides 9 months ago
Tyler Yust fe57bea088
Subagents: restore announce chain + fix nested retry/drop regressions (#22223)
* Subagents: restore announce flow and fix nested delivery retries

* fix: prep subagent announce + docs alignment (#22223) (thanks @tyler6204)
9 months ago
Peter Steinberger fa4f66255c fix(subagents): return completion message for manual session spawns 9 months ago
Peter Steinberger c6c53437f7 fix(security): scope session tools and webhook secret fallback 9 months ago
Peter Steinberger 85409e401b fix: preserve inter-session input provenance (thanks @anbecker) 9 months ago
Seb Slight abcaa8c7a9
Docs: add nav titles across docs (#5689) 10 months ago
cpojer 8cab78abbc
chore: Run `pnpm format:fix`. 10 months ago
Peter Steinberger 9a7160786a refactor: rename to openclaw 10 months ago
Peter Steinberger 6d16a658e5 refactor: rename clawdbot to moltbot with legacy compat 10 months ago
Peter Steinberger ab000398be fix: resolve session ids in session tools 10 months ago
Peter Steinberger 96f1846c2c docs: align node transport with gateway ws 10 months ago
Peter Steinberger a85ddf258c fix: expose deliveryContext in sessions_list
Co-authored-by: Adam Holt <mail@adamholt.co.nz>
10 months ago
Roshan Singh 1baa55c145
Structured subagent announce output + include run outcome (#835)
* docs: clarify subagent announce status

* Make subagent announce structured and include run outcome

* fix: stabilize sub-agent announce status (#835) (thanks @roshanasingh4)

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
10 months ago
Peter Steinberger 3eb48cbea7 docs: complete channels rename sweep 10 months ago
Peter Steinberger 5a443dfa53 docs: fix session key examples 10 months ago
Peter Steinberger a25922a21f fix: clarify sessions_send delivery semantics 10 months ago
Peter Steinberger 7b81d97ec2 feat: wire multi-agent config and routing
Co-authored-by: Mark Pors <1078320+pors@users.noreply.github.com>
10 months ago
Peter Steinberger a6c309824e docs: refresh and simplify docs 10 months ago
Peter Steinberger 2b29b86ab5 feat: add agents_list tool 10 months ago
Peter Steinberger 0ba72477de feat: allow sessions_spawn cross-agent 10 months ago
Peter Steinberger 77024cf776 fix(agents): make sessions_spawn non-blocking 10 months ago
Peter Steinberger 75c66acfd8 feat: update subagent announce + archive 11 months ago
Peter Steinberger db4d0b8e75 docs: reorganize documentation structure 11 months ago