feat(hermes): add async Gemini handoff jobs

This commit is contained in:
Yahya Alhinai
2026-06-28 08:33:52 +00:00
parent 5ac66c0a02
commit 277cee8a7e
12 changed files with 883 additions and 25 deletions
+79
View File
@@ -0,0 +1,79 @@
export type HermesJobStatus =
| 'queued'
| 'running'
| 'waiting_for_confirmation'
| 'aborting'
| 'aborted'
| 'failed'
| 'completed';
export type HermesJobEventType =
| 'accepted'
| 'heartbeat'
| 'step_started'
| 'step_output'
| 'needs_confirmation'
| 'step_completed'
| 'aborted'
| 'failed'
| 'completed';
export type HermesContextScope =
| 'current_pod'
| 'current_repo'
| 'current_file'
| 'github'
| 'mongodb'
| 'terminal'
| 'full_workspace';
export type HermesRiskLevel = 'read_only' | 'safe_write' | 'commit_allowed' | 'deploy_allowed';
export interface HermesJobInput {
prompt: string;
contextScope: HermesContextScope;
targetRepository?: string;
riskLevel: HermesRiskLevel;
requiresConfirmation?: boolean;
successCriteria: string[];
podId: string;
identity: string;
sessionId: string;
conversationRoom?: string;
parentJobId?: string;
}
export interface HermesJob {
id: string;
podId: string;
identity: string;
sessionId: string;
conversationRoom?: string;
prompt: string;
contextScope: HermesContextScope;
targetRepository: string;
riskLevel: HermesRiskLevel;
requiresConfirmation: boolean;
successCriteria: string[];
parentJobId?: string;
status: HermesJobStatus;
finalSummary?: string;
error?: string;
createdAt: string;
updatedAt: string;
startedAt?: string;
completedAt?: string;
lastHeartbeatAt?: string;
abortRequestedAt?: string;
}
export interface HermesJobEvent {
id: string;
jobId: string;
podId: string;
sessionId: string;
type: HermesJobEventType;
message: string;
data?: Record<string, unknown>;
createdAt: string;
}
+9
View File
@@ -16,6 +16,15 @@ export type {
} from './intervention.js';
export * from './messages.js';
export type { HermesMessage, LiveConversationEvent } from './messages.js';
export type {
HermesContextScope,
HermesJob,
HermesJobEvent,
HermesJobEventType,
HermesJobInput,
HermesJobStatus,
HermesRiskLevel,
} from './hermes-job.js';
export type {
PodGraph,
PodGraphNode,
+2
View File
@@ -1,4 +1,5 @@
import type { Collision } from './collision.js';
import type { HermesJobEvent } from './hermes-job.js';
import type { Intervention, InterventionStatus } from './intervention.js';
/** Topics multiplexed over the LiveKit data channel. */
@@ -10,6 +11,7 @@ export type DataMessage =
| { type: 'HERMES_MESSAGE'; message: HermesMessage }
| { type: 'VOICE_CUE'; text: string }
| { type: 'LIVE_CONVERSATION_EVENT'; event: LiveConversationEvent }
| { type: 'HERMES_JOB_EVENT'; event: HermesJobEvent }
| { type: 'ACK'; interventionId: string; status: InterventionStatus; note?: string }
| { type: 'GIT_REPORT'; report: LocalGitReport }
/** Any participant → the current test-audio owner: stop publishing the shared beat. */