mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
* fix(native-chat): validate saved next-fence floors before use * WIP: separate saved conversation observations from runtime proof * Consolidate duplicate imports for WIP compiler checkpoint * Preserve saved conversation observations with strict runtime authority * Consolidate session admission and catalog imports * fix: align conversation observation contracts and fixtures * test: update conversation observation and writer fixtures * test: use checked host fixtures for structured workers * fix(native-chat): bound conversation projection work per request * test(native-chat): consolidate scale fixture imports * test(native-chat): use checked scale fixture types * test(native-chat): bound unreadable inventory traversal * Test native CLI admission and durable reference reads * test: bound cold conversation name subscription work * test: distinguish native receipt probes from terminal identity * test: retain exact mutation refusal recovery identity * fix: explain agent conversation preparation refusals * test: adapt remaining conversation readers and document CLI timeout * fix: register preparation refusal English message * test: align conversation fixtures with checked read APIs * test(native-chat): use checked conversation in Codex fixture
22 lines
875 B
TypeScript
22 lines
875 B
TypeScript
import type { AgentSessionRecord } from '../../shared/agent-session-record'
|
|
import { isFloatingWorkspaceId } from '../../shared/floating-workspace-worktree'
|
|
|
|
/** First pin wins: resolving workspace settings again must not silently move an existing conversation. */
|
|
export function pinAgentSessionRecordLaunchDirectory(
|
|
record: AgentSessionRecord,
|
|
launchDirectory: string,
|
|
now: number
|
|
): AgentSessionRecord {
|
|
if (record.launchDirectory !== undefined) {
|
|
return record
|
|
}
|
|
return { ...record, launchDirectory, updatedAt: now }
|
|
}
|
|
|
|
/** Only floating ids need pinned paths; worktree/folder ids already name durable places. */
|
|
export function agentSessionPinnedLaunchDirectory(
|
|
record: Pick<AgentSessionRecord, 'launchDirectory' | 'location'>
|
|
): string | undefined {
|
|
return isFloatingWorkspaceId(record.location.workspaceId) ? record.launchDirectory : undefined
|
|
}
|