@phren/cli
Version:
Knowledge layer for AI agents - CLI, MCP server, and data layer
21 lines (20 loc) • 1.46 kB
TypeScript
/** Whether a Codex hook callback comes from a thread that is not the pane's
* own conversation: a `codex exec` started inside the pane (a fanout worker,
* a review run) or a subagent (the guardian reviewer, a spawned thread). They
* inherit the pane's variables, so their callbacks name the pane, and each
* one used to rebind it: the pane's conversation then looked replaced, phone
* sends were refused as "conversation changed" and queued hand-offs failed.
* Read from the rollout's first row (`originator`, `source`); a rollout that
* cannot be read counts as the pane's own. */
export declare function codexForeignThread(transcriptPath: unknown): Promise<boolean>;
/** The session_meta fields come before its long instructions, so the head of
* the line is enough; no full parse. */
export declare function foreignMeta(head: string): boolean;
/** Whether a Claude hook callback comes from a headless run (`claude -p`, the
* Agent SDK) started inside the pane: it inherits HERDR_* and
* PHREN_DISPATCH_ID, so its callbacks name the pane and overwrite the parent's
* turn record. Interactive transcripts say `"entrypoint":"cli"`, headless ones
* `sdk-cli`/`sdk-ts`/`sdk-py`, on the first user row. A transcript that cannot
* be read, or has a long first prompt, counts as the pane's own. */
export declare function claudeHeadlessThread(transcriptPath: unknown): Promise<boolean>;
export declare function headlessEntrypoint(head: string): boolean;