feat: app conversations through the memory_id query parameter (#12025)

* feat: app conversations through the memory_id query parameter, chat-mode flows included

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: regenerate the mcp session instructions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: type backendAsync's memoryId option in the eval diagnostics

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: pin git-sync hub scripts to windmill-cli 1.849.0

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat: memoryId option on the sync backend call too

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: bump the ui builder artifact for the memoryId option

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: shared-utils 1.0.14

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore: cli takes shared-utils 1.0.14 for the memoryId option

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: pin the app conversation scoping and the memoryId signatures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: assert the ownership refusal, not any refusal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: match the memoryId option in the cli wmill.ts signature tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix: file an app's turns as the deployed flow's conversation, preview included

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-10-27 23:51:35 +01:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 003a6a9fd6
commit 07d4f7fe61
29 changed files with 263 additions and 131 deletions
+5 -5
View File
@@ -2,19 +2,19 @@ import { turnRunningError } from './api'
import type { ChatOptions } from './types'
/**
* `run` and `follow` over a raw app's agent runnable (a path runnable of type `agent`, naming
* a saved AI agent), behind the `runnable` option. `memory_id` is the conversation id, the
* agent's memory key.
* `run` and `follow` over a raw app's chat runnable (a saved AI agent, or a flow in chat mode),
* behind the `runnable` option. The conversation id goes as `memoryId`, the run's `memory_id`
* query parameter, which keys the conversation and its memory.
*/
export function rawAppRunnable(
// The generated signature is the runnable's own.
start: (args: any) => Promise<string>,
start: (args: any, opts: { memoryId: string }) => Promise<string>,
streamJob: (jobId: string, onUpdate?: (update: { new_result_stream?: string }) => void) => Promise<unknown>
): Required<Pick<ChatOptions, 'run' | 'follow'>> {
return {
run: async (args, { conversationId }) => {
try {
return String(await start({ ...args, memory_id: conversationId }))
return String(await start(args, { memoryId: conversationId }))
} catch (e) {
// The host relays the server's refusal as the error's text, possibly behind a stack.
const text = e instanceof Error ? e.message : String(e)