feat: add controlled codex thread archive
This commit is contained in:
@@ -485,6 +485,8 @@ export type ComputerControlIntentCategory =
|
||||
| "thread_collaboration"
|
||||
| "thread_rollback"
|
||||
| "thread_compact"
|
||||
| "thread_archive"
|
||||
| "thread_unarchive"
|
||||
| "browser_control"
|
||||
| "desktop_control";
|
||||
export type ComputerControlRuntimeKind =
|
||||
@@ -1350,6 +1352,8 @@ export interface MasterAgentTask {
|
||||
rollbackNumTurns?: number;
|
||||
rollbackReason?: string;
|
||||
compactReason?: string;
|
||||
threadLifecycleAction?: "archive" | "unarchive";
|
||||
threadLifecycleReason?: string;
|
||||
intentCategory?: ComputerControlIntentCategory;
|
||||
runtimeKind?: ComputerControlRuntimeKind;
|
||||
controlPlatform?: ComputerControlPlatform;
|
||||
@@ -4738,12 +4742,19 @@ export function migrateBossState(raw: Partial<BossState> | undefined): BossState
|
||||
: undefined,
|
||||
rollbackReason: trimToDefined(task.rollbackReason),
|
||||
compactReason: trimToDefined(task.compactReason),
|
||||
threadLifecycleAction:
|
||||
task.threadLifecycleAction === "archive" || task.threadLifecycleAction === "unarchive"
|
||||
? task.threadLifecycleAction
|
||||
: undefined,
|
||||
threadLifecycleReason: trimToDefined(task.threadLifecycleReason),
|
||||
intentCategory:
|
||||
task.intentCategory === "discussion_only" ||
|
||||
task.intentCategory === "project_development" ||
|
||||
task.intentCategory === "thread_collaboration" ||
|
||||
task.intentCategory === "thread_rollback" ||
|
||||
task.intentCategory === "thread_compact" ||
|
||||
task.intentCategory === "thread_archive" ||
|
||||
task.intentCategory === "thread_unarchive" ||
|
||||
task.intentCategory === "browser_control" ||
|
||||
task.intentCategory === "desktop_control"
|
||||
? task.intentCategory
|
||||
@@ -8811,6 +8822,8 @@ export async function queueMasterAgentTask(payload: {
|
||||
rollbackNumTurns?: number;
|
||||
rollbackReason?: string;
|
||||
compactReason?: string;
|
||||
threadLifecycleAction?: "archive" | "unarchive";
|
||||
threadLifecycleReason?: string;
|
||||
intentCategory?: ComputerControlIntentCategory;
|
||||
runtimeKind?: ComputerControlRuntimeKind;
|
||||
controlPlatform?: ComputerControlPlatform;
|
||||
@@ -8878,6 +8891,11 @@ export async function queueMasterAgentTask(payload: {
|
||||
: undefined,
|
||||
rollbackReason: trimToDefined(payload.rollbackReason),
|
||||
compactReason: trimToDefined(payload.compactReason),
|
||||
threadLifecycleAction:
|
||||
payload.threadLifecycleAction === "archive" || payload.threadLifecycleAction === "unarchive"
|
||||
? payload.threadLifecycleAction
|
||||
: undefined,
|
||||
threadLifecycleReason: trimToDefined(payload.threadLifecycleReason),
|
||||
intentCategory: payload.intentCategory,
|
||||
runtimeKind: payload.runtimeKind,
|
||||
controlPlatform: payload.controlPlatform,
|
||||
|
||||
Reference in New Issue
Block a user