list_log_sources
List the hook runs and language servers whose logs can be read for one agent.
read-onlyidempotentMCP toolLog
Calling it#
curl -X POST http://127.0.0.1:8787/komrad.log.v1.LogService/ListLogSources \
-H 'Content-Type: application/json' \
-d '{
"agent_id": "<agent_id>"
}'komrad rpc list-log-sources \
--agent-id '<uuid>'{
"name": "list_log_sources",
"arguments": {
"agent_id": "<agent_id>"
}
}Offered by the komrad MCP server to orchestrator agents.
Request#
ListLogSourcesRequest#
| Field | Type | Description |
|---|---|---|
agent_id | uuid* | The agent whose logs to list, by id. |
Response#
ListLogSourcesResponse#
| Field | Type | Description |
|---|---|---|
agent | LogAgent | The agent. |
hook_runs | HookRun[] | The agent's hook runs that wrote a log, newest first, those of its task's moments included. |
language_servers | LanguageServerLog[] | The logs of the language servers over the checkout of the agent's task, by name. Empty when the task has no checkout. |
Types#
LogAgent#
LogAgent is the agent whose logs a read holds.
| Field | Type | Description |
|---|---|---|
id | uuid* | The agent's id. |
name | string | The agent's name. |
role | AgentRole | The agent's role. |
created_at | timestamp | When the agent was created. |
archived_at | timestamp | When the agent was archived. Unset while the agent is live. |
HookRun#
HookRun is one run of a hook's script for an agent.
| Field | Type | Description |
|---|---|---|
id | uuid* | The hook run's id, to pass as |
agent_id | uuid* | The agent the hook ran for, by id. |
number | int32 | The hook run's number among the agent's hook runs. |
trigger | Moment | The moment the script ran at. |
script | string | The hook's script, by file name in the hooks directory. |
started_at | timestamp | When the hook run started. |
finished_at | timestamp | When the hook run finished. Unset while it runs. |
failed | bool | Whether the hook run failed. |
LanguageServerLog#
LanguageServerLog is the log of one language server over a task's checkout.
| Field | Type | Description |
|---|---|---|
name | string | The language server's name, to pass as |
written_at | timestamp | When the language server last wrote to its log. |
AgentRole#
AgentRole is what an agent was launched to do.
| Value | Description |
|---|---|
reviewer | An agent on a task that reads the writer's change and gives a review. |
orchestrator | The one agent per workflow that hands work out across its tasks. |
writer | The one agent on a task that changes its checkout. |
Moment#
Moment is a point in the life of an agent or task at which komrad runs a script.
| Value | Description |
|---|---|
agent.provision | runs the provisioner before komrad creates an agent's directory |
agent.resume | reruns the provisioner before komrad resumes an agent |
agent.deprovision | runs the deprovisioner as komrad releases an agent's directory |
agent.pre-launch | runs in the agent's directory before its pane opens, and a failure abandons the create |
agent.post-launch | runs once the agent's pane opens |
agent.pre-resume | runs in the agent's directory before a dormant agent's pane opens, and a failure refuses the resume |
agent.post-resume | runs once a dormant agent is back in a pane |
agent.pre-archive | runs while the agent is still running, and a failure refuses the archive |
agent.post-archive | runs in the agent's directory after komrad closes its pane and archives it |
agent.pre-restore | runs before an archived agent's row comes back, and a failure refuses the restore |
agent.post-restore | runs when an archived agent's row comes back |
agent.pre-delete | runs in the agent's directory as komrad deletes it, before komrad releases the worktree |
agent.post-delete | runs once the agent and its worktree are gone |
task.pre-open | runs before a task's first live agent opens its pane, and a failure abandons the create or restore |
task.post-archive | runs after komrad archives a task's last live agent, and the task with it |
task.pre-delete | runs as komrad deletes a task, before it releases the worktree, and a failure keeps the task |