/** * Pointers for a handover file: what is still open, which artifacts hold the * facts, and which skills to call first. The facts themselves stay in those * artifacts (WorkItems, PRs, tickets); the handover only points at them. * * Also the one place a handover passes through secret redaction. * * @module services/agent/handover-pointers */ /** One open WorkItem of the agent. */ export interface HandoverOpenWork { id: string; title: string; status: string; } /** * Mask secrets (keys, tokens, bearer headers, `NAME=value` secrets) in text * that is about to be written to a handover file. * * @param text - Handover text * @returns The text with secrets masked (idempotent) */ export declare function redactHandoverText(text: string): string; /** * The agent's open WorkItems, read synchronously from the pool file (handover * writers are synchronous). Open = targeted at the agent (or actively claimed * by it) and still in flight. * * @param sessionName - Agent session * @param crewlyHome - CREWLY_HOME (tests) * @returns Up to {@link HANDOVER_POINTERS_CONSTANTS.MAX_OPEN_WORK} items, or [] when the pool is unreadable */ export declare function readOpenWorkSync(sessionName: string, crewlyHome?: string): HandoverOpenWork[]; /** * PR / issue / ticket references found in text. * * @param text - Transcript tail * @returns Distinct GitHub PR/issue URLs and `TKT-n` ids, in order of appearance (capped) */ export declare function findArtifactLinks(text: string): string[]; /** * Skills the next conversation should call first, by role. * * @param role - Agent role (optional) * @returns Skill names */ export declare function suggestedSkillsFor(role?: string): string[]; /** * Prepend the pointer header to a handover body. Does nothing when the body * already starts with one (chained handovers carry no second copy). * * Work the restart interrupted (a sub-agent or background command the body's * "Interrupted by the restart" section lists, crewly#1361) is repeated under * "Open work": it is the agent's to restart or report, not background. * * @param body - Handover body (the transcript tail) * @param opts - Session, optional role, optional CREWLY_HOME and open work override (tests) * @returns Header plus body, redacted */ export declare function withHandoverPointers(body: string, opts: { sessionName: string; role?: string; crewlyHome?: string; openWork?: HandoverOpenWork[]; }): string; /** * Remove a pointer header from an earlier handover's text, so carrying it * forward does not duplicate the section. * * @param text - Earlier handover text * @returns Text without the header block */ export declare function stripHandoverPointers(text: string): string; //# sourceMappingURL=handover-pointers.d.ts.map