UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

40 lines (39 loc) • 4.22 kB
/** * Internal boundary to the engine's harness layer (design/33; de-vendored by design/118). Everything * in `src/` (outside `src/internal/`) imports these symbols from HERE, never via a deep * `../engine/...` path — one auditable coupling point (CI-guarded by test/vendor-insulation.test.ts). * The vendored tree this facade used to front is fully retired (design/118 ⓪-⑤); the facade stays so * consumers never notice which module a symbol lives in. * * Pure-type re-exports live in ./harness-types.js (S1, design/157) — split out to break an * engine-import SCC for type-only consumers. Re-exported here too so existing `harness.js` imports * keep working unchanged. */ export * from "./harness-types.js"; export { AgentHarness, turnContextOptions } from "../engine/harness/agent-harness.js"; export type { AnsweredInputSeed, HaltConsumption, PromptCommittedCallback, SeatCutSource, StopRequestSource, TrailingToolBatchOptions, TurnCutVerdict } from "../engine/harness/agent-harness.js"; export { CompactionError, ExecutionError, FileError, isTimeCutCode, NothingQueuedError, ok, err } from "../engine/harness/types.js"; export { DEFAULT_CHARS_PER_TOKEN, DEFAULT_COMPACTION_SETTINGS, calculateContextTokens, compact, computeFileLists, estimateContextTokens, estimateTokens, lastUsageReport, prepareCompaction, refusalShortfall, shouldCompact, summaryOutputBudgetTokens, } from "../engine/compaction/compaction.js"; export { SKILL_RETENTION_PER_SKILL_MAX_CHARS, SKILL_RETENTION_TOTAL_MAX_CHARS, SKILL_RETENTION_TRUNCATION_MARKER, formatFileOperations, formatPersistedOutputRefs, readCompactionActiveTools, readRetainedInvokedSkills, renderInvokedSkillsRetention, } from "../engine/compaction/utils.js"; export { NodeExecutionEnv } from "../engine/execution-env/node-execution-env.js"; export { StoredSession, buildSessionContext, entryRendersIntoContext } from "../engine/session/session.js"; export { assertForkTarget, compareOccupants, forkRowCells, forkTargetTaken, frozenRow, getEntriesToFork, importRowCells, incarnationCell, ownerCell, placementCellToWrite, readIncarnationCell, readOwnerCell, readPlacementCell, readRowExpectation, recordedOwnerCells, recordedOwnerName, rowExpectationMissed, sessionHeadOf, sessionRowMatches } from "../engine/session/repo-utils.js"; export { validateEntriesForImport, StreamingImportValidator } from "../engine/session/import-validate.js"; export { BaseSessionStorage, entryParentLinks, leafIdAfterEntry, resolveLeafId, sessionLogMarkOf, storageBuiltWithJudge } from "../engine/session/storage-base.js"; export { InMemorySessionStorage } from "../engine/session/memory-storage.js"; export { InMemorySessionRepo } from "../engine/session/memory-repo.js"; export { heldRowCells, heldRowMatches, readSessionRepoRowCells, type SessionRepoRowCells } from "../engine/session/row-cells.js"; export { uuidv7 } from "../engine/session/uuid.js"; export { ParentChainGuard } from "../engine/session/parent-chain-guard.js"; export type { ForkPoint, ReplayLoss } from "../engine/session/path-to-root.js"; export { LineageBreak, pathToRoot, replayLossText } from "../engine/session/path-to-root.js"; export { findUnansweredToolBatch, readToolCallArguments } from "../engine/loop/agent-loop.js"; export { SessionError } from "../engine/harness/types.js"; export { CORRUPT_SESSION_DELETE_DOORS, CORRUPT_SESSION_FORMS, CORRUPT_SESSION_WAYS, CORRUPT_SESSION_WAYS_OUT, corruptSessionWayOutSentence, isCorruptSessionForm } from "../core/corrupt-session-form.js"; export type { CorruptSessionDeleteDoor, CorruptSessionDetail, CorruptSessionForm, CorruptSessionWay, CorruptSessionWayOut } from "../core/corrupt-session-form.js"; export type { AnnouncedAdvisorState, AnnouncedLanguageState, AnnouncedSandboxFrameState, AnnouncedListingSnapshot, AnnouncedListingSnapshotInput, AnnouncedMcpFailure } from "../engine/harness/types.js"; export { ANNOUNCED_LANGUAGE_MAX_CHARS } from "../engine/harness/types.js"; export { normalizeGitAnnouncement } from "../engine/harness/types.js"; export { gitFrameContextVisible } from "../engine/session/session.js"; export { isSyntheticApiErrorMessage } from "../engine/harness/types.js"; export { convertToLlm } from "../engine/harness/messages.js";