mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-15 18:30:39 +09:00
Implement agent runtime services and WebSocket realtime
Expand heartbeat service with full run executor, wakeup coordinator, and adapter lifecycle. Add run-log-store for pluggable log persistence. Add live-events service and WebSocket handler for realtime updates. Expand agent and issue routes with runtime operations. Add ws dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2583bf4c43
commit
c9c75bbc0a
11 changed files with 1746 additions and 156 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import type { Db } from "@paperclip/db";
|
||||
import { activityLog } from "@paperclip/db";
|
||||
import { publishLiveEvent } from "./live-events.js";
|
||||
|
||||
export interface LogActivityInput {
|
||||
companyId: string;
|
||||
|
|
@ -23,4 +24,18 @@ export async function logActivity(db: Db, input: LogActivityInput) {
|
|||
agentId: input.agentId ?? null,
|
||||
details: input.details ?? null,
|
||||
});
|
||||
|
||||
publishLiveEvent({
|
||||
companyId: input.companyId,
|
||||
type: "activity.logged",
|
||||
payload: {
|
||||
actorType: input.actorType,
|
||||
actorId: input.actorId,
|
||||
action: input.action,
|
||||
entityType: input.entityType,
|
||||
entityId: input.entityId,
|
||||
agentId: input.agentId ?? null,
|
||||
details: input.details ?? null,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue