Add member work history and learning docs
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
export type AgentRunStatus =
|
||||
| 'running'
|
||||
| 'succeeded'
|
||||
| 'failed'
|
||||
| 'improved'
|
||||
| 'regressed'
|
||||
| 'abandoned';
|
||||
|
||||
export interface AgentRun {
|
||||
runId: string;
|
||||
podId: string;
|
||||
goal: string;
|
||||
trigger: string;
|
||||
strategyVersionId: string;
|
||||
status: AgentRunStatus;
|
||||
startedAt: string;
|
||||
completedAt?: string;
|
||||
score?: number;
|
||||
verifierSummary?: string;
|
||||
inputRefs?: string[];
|
||||
outputRefs?: string[];
|
||||
}
|
||||
|
||||
export interface AgentTraceEvent {
|
||||
runId: string;
|
||||
podId: string;
|
||||
step: number;
|
||||
phase: string;
|
||||
eventType: string;
|
||||
inputSummary?: string;
|
||||
outputSummary?: string;
|
||||
toolName?: string;
|
||||
error?: string;
|
||||
metrics?: Record<string, number | string | boolean>;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
export type StrategyVersionKind = 'prompt' | 'policy' | 'detector' | 'verifier' | 'routing';
|
||||
|
||||
export type StrategyVersionStatus = 'candidate' | 'active' | 'retired' | 'rejected';
|
||||
|
||||
export interface StrategyVersion {
|
||||
strategyVersionId: string;
|
||||
podId: string;
|
||||
kind: StrategyVersionKind;
|
||||
name: string;
|
||||
parentVersionId?: string;
|
||||
status: StrategyVersionStatus;
|
||||
summary: string;
|
||||
promptText?: string;
|
||||
policy?: Record<string, unknown>;
|
||||
verifier?: Record<string, unknown>;
|
||||
metrics?: Record<string, number | string | boolean>;
|
||||
createdAt: string;
|
||||
promotedAt?: string;
|
||||
}
|
||||
|
||||
export type LearningProposalStatus = 'open' | 'accepted' | 'rejected' | 'superseded';
|
||||
|
||||
export interface LearningProposal {
|
||||
proposalId: string;
|
||||
podId: string;
|
||||
sourceRunId: string;
|
||||
targetKind: StrategyVersionKind;
|
||||
parentVersionId: string;
|
||||
proposedChange: string;
|
||||
rationale: string;
|
||||
verifierPlan: string;
|
||||
status: LearningProposalStatus;
|
||||
createdAt: string;
|
||||
resolvedAt?: string;
|
||||
}
|
||||
@@ -48,6 +48,41 @@ export interface PodGraphMetric {
|
||||
detail: string;
|
||||
}
|
||||
|
||||
export type PodLearningLoopStepKey = 'observe' | 'store' | 'predict' | 'outcome' | 'adapt';
|
||||
|
||||
export type PodLearningLoopStepStatus = 'quiet' | 'active' | 'complete' | 'planned';
|
||||
|
||||
export interface PodLearningLoopStep {
|
||||
key: PodLearningLoopStepKey;
|
||||
label: string;
|
||||
value: string;
|
||||
detail: string;
|
||||
status: PodLearningLoopStepStatus;
|
||||
}
|
||||
|
||||
export interface PodLearningLoop {
|
||||
activeStep: PodLearningLoopStepKey;
|
||||
steps: PodLearningLoopStep[];
|
||||
}
|
||||
|
||||
export type PodGraphActivityKind =
|
||||
| 'editing'
|
||||
| 'collision'
|
||||
| 'intervention'
|
||||
| 'outcome'
|
||||
| 'learned'
|
||||
| 'agent';
|
||||
|
||||
export interface PodGraphActivity {
|
||||
id: string;
|
||||
at: string;
|
||||
kind: PodGraphActivityKind;
|
||||
title: string;
|
||||
detail: string;
|
||||
nodeId?: string;
|
||||
edgeId?: string;
|
||||
}
|
||||
|
||||
/** A point-in-time render of a pod's team_model. */
|
||||
export interface PodGraph {
|
||||
podId: string;
|
||||
@@ -56,6 +91,8 @@ export interface PodGraph {
|
||||
nodes: PodGraphNode[];
|
||||
edges: PodGraphEdge[];
|
||||
metrics: PodGraphMetric[];
|
||||
loop?: PodLearningLoop;
|
||||
activity?: PodGraphActivity[];
|
||||
}
|
||||
|
||||
/** One node as a standalone document in the `graph_nodes` collection. */
|
||||
|
||||
+23
-1
@@ -15,15 +15,37 @@ export type {
|
||||
SuggestedActionKind,
|
||||
} from './intervention.js';
|
||||
export * from './messages.js';
|
||||
export type { HermesMessage } from './messages.js';
|
||||
export type { HermesMessage, LiveConversationEvent } from './messages.js';
|
||||
export type {
|
||||
PodGraph,
|
||||
PodGraphNode,
|
||||
PodGraphEdge,
|
||||
PodGraphMetric,
|
||||
PodLearningLoop,
|
||||
PodLearningLoopStep,
|
||||
PodLearningLoopStepKey,
|
||||
PodLearningLoopStepStatus,
|
||||
PodGraphActivity,
|
||||
PodGraphActivityKind,
|
||||
PodGraphNodeKind,
|
||||
PodGraphEdgeKind,
|
||||
PodGraphNodeStatus,
|
||||
GraphNodeDoc,
|
||||
GraphEdgeDoc,
|
||||
} from './graph.js';
|
||||
export type {
|
||||
AgentRun,
|
||||
AgentRunStatus,
|
||||
AgentTraceEvent,
|
||||
StrategyVersion,
|
||||
StrategyVersionKind,
|
||||
StrategyVersionStatus,
|
||||
LearningProposal,
|
||||
LearningProposalStatus,
|
||||
} from './agent-learning.js';
|
||||
export type {
|
||||
MemberWorkHistory,
|
||||
MemberWorkHistoryEvent,
|
||||
MemberWorkHistoryFile,
|
||||
MemberWorkHistorySource,
|
||||
} from './member-history.js';
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
export type MemberWorkHistorySource = 'vision' | 'git';
|
||||
|
||||
export interface MemberWorkHistoryFile {
|
||||
file: string;
|
||||
observations: number;
|
||||
gitChanges: number;
|
||||
firstSeenAt: string;
|
||||
lastSeenAt: string;
|
||||
confidenceAvg: number | null;
|
||||
activities: string[];
|
||||
current: boolean;
|
||||
}
|
||||
|
||||
export interface MemberWorkHistoryEvent {
|
||||
id: string;
|
||||
at: string;
|
||||
source: MemberWorkHistorySource;
|
||||
file: string;
|
||||
title: string;
|
||||
detail?: string;
|
||||
confidence?: number;
|
||||
}
|
||||
|
||||
export interface MemberWorkHistory {
|
||||
podId: string;
|
||||
member: string;
|
||||
generatedAt: string;
|
||||
windowHours: number;
|
||||
totals: {
|
||||
files: number;
|
||||
observations: number;
|
||||
gitChanges: number;
|
||||
};
|
||||
files: MemberWorkHistoryFile[];
|
||||
timeline: MemberWorkHistoryEvent[];
|
||||
}
|
||||
@@ -9,6 +9,7 @@ export type DataMessage =
|
||||
| { type: 'COLLISION'; collision: Collision; intervention: Intervention }
|
||||
| { type: 'HERMES_MESSAGE'; message: HermesMessage }
|
||||
| { type: 'VOICE_CUE'; text: string }
|
||||
| { type: 'LIVE_CONVERSATION_EVENT'; event: LiveConversationEvent }
|
||||
| { 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. */
|
||||
@@ -25,6 +26,20 @@ export interface HermesMessage {
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
/** Private-room event that lets PodMan interrupt a 1:1 live conversation. */
|
||||
export interface LiveConversationEvent {
|
||||
id: string;
|
||||
podId: string;
|
||||
sessionId: string;
|
||||
kind: 'critical_collision' | 'context_refresh';
|
||||
severity: 'info' | 'warn' | 'critical';
|
||||
summary: string;
|
||||
interrupt: boolean;
|
||||
createdAt: string;
|
||||
collisionId?: string;
|
||||
interventionId?: string;
|
||||
}
|
||||
|
||||
/** Outcome of an intervention — the supervision signal for policy learning. */
|
||||
export interface InterventionOutcome {
|
||||
interventionId: string;
|
||||
|
||||
Reference in New Issue
Block a user