Skip to content

🀯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

2.1 KB
Raw Blame
/**
 * Work registration service β€” turns what an agent run produced into durable
 * Work rows (`works` / `work_versions`) and stamps the display anchor that
 * makes the cards render.
 *
 * - `registerWorksForOperation` β€” completion-time scan of a server operation
 *   tree: entity `file` Works (sandbox export pipeline) + the shell Work scan
 *   (gh CLI runs from codex / claude-code / device `lobe-local-system`).
 * - `registerShellWorksForLocalRun` β€” the same shell scan replayed for
 *   desktop-LOCAL hetero runs, which have no `agent_operations` row and are
 *   reported by the client executor instead.
 * - `stateHasEntityFileEdits` β€” pure per-step predicate over the in-memory
 *   runtime state, used to suppress the early `visible_output_end` when
 *   completion will export files.
 *
 * - `resolveAgentWorkRun` / `resolveAgentWorkFile` β€” resolve the running
 *   operation and uploaded file behind an agent's own `lh work create|update`.
 *
 * Execution-time registrations (skill structured tools, task / document
 * works) live with their owning features β€” see `WorkModel` and the agent-work
 * skill's file map.
 */
export {
  type AgentWorkRun,
  AgentWorkRunError,
  parseCollectionImageRef,
  resolveAgentWorkCollectionItems,
  resolveAgentWorkFile,
  resolveAgentWorkRun,
} from './agentWork';
export {
  type LocalRunShellWorksResult,
  registerShellWorksForLocalRun,
} from './localRunWorkRegistration';
export { createShellPullRequestLinking, type ShellPullRequestLinking } from './pullRequestLinking';
export {
  registerWorksForOperation,
  type RegisterWorksForOperationParams,
  type WorksRegistrationOutcome,
} from './registerWorksForOperation';
export { resolveRunWorkAccessScope, type ShareVisitorWorkIdentity } from './shareWorkScope';
export { stateHasEntityFileEdits } from './stateHasEntityFileEdits';
export {
  linkTopicPullRequest,
  parsePullRequestUrl,
  setTopicPullRequestDismissed,
} from './topicPullRequestLinks';
export {
  type DeviceReportedPullRequest,
  linkPushedPullRequests,
  type LinkPushedPullRequestsResult,
  listTopicPullRequestsWithStatus,
  listTopicsPullRequestsWithStatus,
} from './topicPullRequests';