throughline 0.10.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  import { inspectCodexPlannedRollbackRestoreSafety } from './codex-rollout-memory.mjs';
2
+ import { CLAUDE_HOST, CODEX_HOST } from './hosts/identity.mjs';
2
3
  import { buildHandoffRecord, N_RECENT_L2 } from './handoff-record.mjs';
3
4
  import { sameProjectPath } from './project-path.mjs';
4
5
  import { estimateTokens } from './token-estimator.mjs';
@@ -48,7 +49,7 @@ export function findLatestSessionIdForProject(db, projectPath) {
48
49
 
49
50
  function resolveDefaultSessionId({ sessionId, host, codexThreadId, db, projectPath }) {
50
51
  if (sessionId) return sessionId;
51
- if (host === 'codex') {
52
+ if (host === CODEX_HOST) {
52
53
  return codexThreadId ? `codex:${codexThreadId}` : null;
53
54
  }
54
55
  return findLatestSessionIdForProject(db, projectPath);
@@ -79,7 +80,7 @@ function countDistinctCapturedTurns(db, sessionId) {
79
80
  }
80
81
 
81
82
  export function describeTrimHost(host) {
82
- if (host === 'claude') {
83
+ if (host === CLAUDE_HOST) {
83
84
  return {
84
85
  host,
85
86
  automaticRollback: false,
@@ -94,7 +95,7 @@ export function describeTrimHost(host) {
94
95
  };
95
96
  }
96
97
 
97
- if (host === 'codex') {
98
+ if (host === CODEX_HOST) {
98
99
  return {
99
100
  host,
100
101
  automaticRollback: true,
@@ -123,7 +124,7 @@ export function describeTrimHost(host) {
123
124
  }
124
125
 
125
126
  function buildSafeContinuation({ host, hostIdentity }) {
126
- if (host !== 'codex') return null;
127
+ if (host !== CODEX_HOST) return null;
127
128
 
128
129
  const threadId = hostIdentity?.codexThreadId ?? '<thread-id>';
129
130
  const sessionId = threadId === '<thread-id>' ? 'codex:<thread-id>' : `codex:${threadId}`;
@@ -561,7 +562,7 @@ function buildPlanSession({ resolvedSessionId, session, trimSource, projectPath
561
562
  }
562
563
 
563
564
  function buildHostIdentity({ host, codexThreadId, codexThreadIdSource = null }) {
564
- if (host !== 'codex') {
565
+ if (host !== CODEX_HOST) {
565
566
  return {
566
567
  host,
567
568
  codexThreadId: null,