Initialize onboarding agent scaffold
This commit is contained in:
commit
4294f3c92e
57 files changed
+14388
No files matched your search
@@ -0,0 +1,44 @@
|
||||
import type { NicknameIssue } from "../types.js";
|
||||
|
||||
export type RemainingStep = "nickname" | "photo";
|
||||
|
||||
export type OnboardingPhase =
|
||||
| { kind: "fresh" }
|
||||
| { kind: "nickname-pending"; current: string }
|
||||
| { kind: "photo-pending" }
|
||||
| { kind: "both-pending" }
|
||||
| { kind: "nickname-rejected"; current: string; issues: NicknameIssue[] }
|
||||
| { kind: "photo-rejected"; reason?: string | undefined }
|
||||
| { kind: "deadline-near"; remaining: RemainingStep[] }
|
||||
| { kind: "completed" }
|
||||
| { kind: "timed-out" };
|
||||
|
||||
export type Intent =
|
||||
| { kind: "greeting" }
|
||||
| { kind: "acknowledgement" }
|
||||
| { kind: "status-question" }
|
||||
| { kind: "help-how" }
|
||||
| { kind: "help-where" }
|
||||
| { kind: "nickname-question" }
|
||||
| { kind: "photo-question" }
|
||||
| { kind: "discord-question" }
|
||||
| { kind: "age-question" }
|
||||
| { kind: "chitchat" }
|
||||
| { kind: "off-topic-to-other" }
|
||||
| { kind: "unknown" };
|
||||
|
||||
export interface DerivedState {
|
||||
phase: OnboardingPhase;
|
||||
intent: Intent;
|
||||
shouldRespond: boolean;
|
||||
responseMode: "skip" | "template" | "llm" | "llm-with-tools";
|
||||
suggestedMaxTokens: number;
|
||||
allowShortResponse: boolean;
|
||||
tier: 0 | 1 | 2;
|
||||
}
|
||||
|
||||
export interface ClassifiedIntent {
|
||||
intent: Intent;
|
||||
confidence: number;
|
||||
source: "regex" | "llm";
|
||||
}
|
||||
Reference in new issue
Block a user