- sentinel-summaries.ts: runCapHitSummary, insertCapHitSentinel, runDoomLoopSummary, insertDoomLoopSentinel - inference.ts → inference/turn.ts: residue is runAssistantTurn, runInference, createInferenceRunner orchestration only - inference/index.ts: re-export shim preserves the public surface (createInferenceRunner, runInference, runAssistantTurn, detectDoomLoop, DOOM_LOOP_THRESHOLD, buildMessagesPayload, plus type-side InferenceContext/InferenceFrame/StreamResult/TurnArgs/ FramePublisher) - src/index.ts + auto_name.ts + the two vitest test files updated to import from ./services/inference/index.js explicitly (NodeNext ESM doesn't honor directory-index resolution) Final tally: 11 files under services/inference/, the largest being sentinel-summaries.ts at 523 LoC (two near-clone summary paths kept side-by-side until a third sentinel justifies factoring out a shared runWrapUpSummary). turn.ts is now 326 LoC, the next-largest is stream-phase.ts at 380. Public import surface unchanged. tool-phase.ts → turn.ts back-edge for runAssistantTurn remains (cycle is safe; resolved at call time). Prepares the file structure for v1.13 AI SDK migration — streamText swap targets stream-phase.ts only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
21 lines
668 B
TypeScript
21 lines
668 B
TypeScript
// v1.12.4: re-export shim. Outside callers (apps/server/src/index.ts and the
|
|
// vitest inference tests) import from './services/inference/index.js'. The
|
|
// directory is now the public surface; turn.ts holds runAssistantTurn /
|
|
// runInference / createInferenceRunner while the other inference/*.ts files
|
|
// stay implementation-private.
|
|
|
|
export {
|
|
createInferenceRunner,
|
|
runAssistantTurn,
|
|
runInference,
|
|
} from './turn.js';
|
|
export type {
|
|
FramePublisher,
|
|
InferenceContext,
|
|
InferenceFrame,
|
|
StreamResult,
|
|
TurnArgs,
|
|
} from './turn.js';
|
|
export { detectDoomLoop, DOOM_LOOP_THRESHOLD } from './sentinels.js';
|
|
export { buildMessagesPayload } from './payload.js';
|