openclaw-matrix-multiaccounts/src/agents/tools
Azade 3133c7c84e feat(sessions): expose label in sessions.list and support label lookup in sessions_send
- Add `label` field to session entries and expose it in `sessions.list`
- Display label column in the web UI sessions table
- Support `label` parameter in `sessions_send` for lookup by label instead of sessionKey

- `sessions.patch`: Accept and store `label` field
- `sessions.list`: Return `label` in session entries
- `sessions_spawn`: Pass label through to registry and announce flow
- `sessions_send`: Accept optional `label` param, lookup session by label if sessionKey not provided
- `agent` method: Accept `label` and `spawnedBy` params (stored in session entry)

- Add `label` column to sessions table in web UI

- Changed session store writes to merge with existing entry (`{ ...existing, ...new }`)
  to preserve fields like `label` that might be set separately

We attempted to implement label persistence "properly" by passing the label
through the `agent` call and storing it during session initialization. However,
the auto-reply flow has multiple write points that overwrite the session entry,
and making all of them merge-aware proved unreliable.

The working solution patches the label in the `finally` block of
`runSubagentAnnounceFlow`, after all other session writes complete.
This is a workaround but robust - the patch happens at the very end,
just before potential cleanup.

A future refactor could make session writes consistently merge-based,
which would allow the cleaner approach of setting label at spawn time.

```typescript
// Spawn with label
sessions_spawn({ task: "...", label: "my-worker" })

// Later, find by label
sessions_send({ label: "my-worker", message: "continue..." })

// Or use sessions_list to see labels
sessions_list() // includes label field in response
```
2026-01-09 15:32:49 +01:00
..
agent-step.ts style: lint cleanup 2026-01-08 08:40:02 +01:00
agents-list-tool.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
browser-tool.ts fix(tools): finalize Vertex schema flattening (#409) 2026-01-07 17:54:19 +00:00
canvas-tool.ts refactor: split agent tools 2026-01-04 05:07:44 +01:00
common.test.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
common.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
cron-tool.test.ts fix(heartbeat): telegram accountId + cron jobId compat (#516, thanks @YuriNachos) 2026-01-08 20:47:22 +01:00
cron-tool.ts fix(heartbeat): telegram accountId + cron jobId compat (#516, thanks @YuriNachos) 2026-01-08 20:47:22 +01:00
discord-actions-guild.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
discord-actions-messaging.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
discord-actions-moderation.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
discord-actions.test.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
discord-actions.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
discord-schema.ts refactor: share reaction schemas and notes 2026-01-07 04:24:11 +01:00
discord-tool.ts refactor: split agent tools 2026-01-04 05:07:44 +01:00
gateway-tool.ts chore: log gateway reload and signals 2026-01-09 08:13:04 +01:00
gateway.test.ts chore: changelog for #293 2026-01-06 15:32:06 +01:00
gateway.ts fix(cli): don't force localhost gateway url in remote mode 2026-01-06 14:30:45 +00:00
image-tool.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
message-tool.ts feat: finalize msteams polls + outbound parity 2026-01-09 11:07:32 +01:00
nodes-tool.ts refactor(nodes): share run parsing helpers 2026-01-08 00:24:11 +00:00
nodes-utils.ts refactor: split agent tools 2026-01-04 05:07:44 +01:00
reaction-schema.ts refactor: share reaction schemas and notes 2026-01-07 04:24:11 +01:00
sessions-announce-target.test.ts feat: multi-agent routing + multi-account providers 2026-01-06 18:33:37 +00:00
sessions-announce-target.ts feat: multi-agent routing + multi-account providers 2026-01-06 18:33:37 +00:00
sessions-helpers.ts feat: multi-agent routing + multi-account providers 2026-01-06 18:33:37 +00:00
sessions-history-tool.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
sessions-list-tool.gating.test.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
sessions-list-tool.ts feat(sessions): expose label in sessions.list and support label lookup in sessions_send 2026-01-09 15:32:49 +01:00
sessions-send-helpers.ts feat: multi-agent routing + multi-account providers 2026-01-06 18:33:37 +00:00
sessions-send-tool.gating.test.ts feat: wire multi-agent config and routing 2026-01-09 12:48:42 +00:00
sessions-send-tool.ts feat(sessions): expose label in sessions.list and support label lookup in sessions_send 2026-01-09 15:32:49 +01:00
sessions-spawn-tool.ts feat(sessions): expose label in sessions.list and support label lookup in sessions_send 2026-01-09 15:32:49 +01:00
slack-actions.test.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
slack-actions.ts feat: unify message cli and tools 2026-01-09 08:30:24 +01:00
slack-schema.ts feat: unify message cli and tools 2026-01-09 08:30:24 +01:00
slack-tool.test.ts feat: add slack multi-account routing 2026-01-08 08:49:16 +01:00
slack-tool.ts feat: add slack multi-account routing 2026-01-08 08:49:16 +01:00
telegram-actions.test.ts feat(telegram): wire replyToMode config, add forum topic support, fix messaging tool duplicates 2026-01-08 00:50:47 +00:00
telegram-actions.ts feat(telegram): wire replyToMode config, add forum topic support, fix messaging tool duplicates 2026-01-08 00:50:47 +00:00
telegram-schema.ts feat(telegram): wire replyToMode config, add forum topic support, fix messaging tool duplicates 2026-01-08 00:50:47 +00:00
telegram-tool.ts feat(telegram): wire replyToMode config, add forum topic support, fix messaging tool duplicates 2026-01-08 00:50:47 +00:00
whatsapp-actions.test.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
whatsapp-actions.ts feat: unify provider reaction tools 2026-01-07 04:16:39 +01:00
whatsapp-schema.ts refactor: share reaction schemas and notes 2026-01-07 04:24:11 +01:00
whatsapp-tool.ts Add WhatsApp reactions support 2026-01-07 04:16:39 +01:00