diff options
| author | Adam Malczewski <[email protected]> | 2026-06-26 20:24:18 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-26 20:24:18 +0900 |
| commit | 12955cdf1d822ff395fd62d30916fbdb02d10e12 (patch) | |
| tree | c23a4b0700a08926eaf3636af7e5ca92a39fbe2f /packages/system-prompt/src/types.ts | |
| parent | c5c34ed70e0f04b7b936fa7a1d88ef807472fb96 (diff) | |
| download | dispatch-12955cdf1d822ff395fd62d30916fbdb02d10e12.tar.gz dispatch-12955cdf1d822ff395fd62d30916fbdb02d10e12.zip | |
feat(heartbeat): resolve [type:name] variables in heartbeat prompts (CR-HB-1)
Diffstat (limited to 'packages/system-prompt/src/types.ts')
| -rw-r--r-- | packages/system-prompt/src/types.ts | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/system-prompt/src/types.ts b/packages/system-prompt/src/types.ts index a9fe3ca..670430a 100644 --- a/packages/system-prompt/src/types.ts +++ b/packages/system-prompt/src/types.ts @@ -35,6 +35,28 @@ export interface SystemPromptService { }, ): Promise<string>; + /** + * Resolve an ARBITRARY template string against the current environment, + * using the SAME variable resolver + adapter set as `construct` (so a + * caller that owns its own prompt — e.g. the heartbeat extension — gets + * `[type:name]` placeholders substituted identically to the global + * template). Pure resolution: nothing is persisted (the result is the + * caller's to use). An empty template yields an empty string. + * + * Like `construct`, when `context.computerId` is set the resolver uses + * remote-backed adapters (reading the remote's OS/hostname/git via SSH). + */ + resolveText( + template: string, + cwd: string, + context?: { + readonly model?: string; + readonly conversationId?: string; + readonly workspaceId?: string; + readonly computerId?: string; + }, + ): Promise<string>; + /** Read the persisted resolved system prompt, or `null` if never constructed. */ get(conversationId: string): Promise<string | null>; |
