harness: pin bridge conversation to local-conv-487 (CONVERSATION_ID constant, --agent omitted for pinned convs)

👾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta Code <noreply@letta.com>
This commit is contained in:
pierreandLetta Code committed 2026-09-20 13:54:15 +03:00
1 parent 65e2ee083e
commit 58a66700c6
1 file changed
+8 -1
+8 -1
View File
@@ -3,6 +3,11 @@ const Io = std.Io;
const LETTA_PATH = "/home/pierre/.bun/bin/letta"; const LETTA_PATH = "/home/pierre/.bun/bin/letta";
/// Conversation the matrix bridge routes messages into. Pinned to a specific
/// conversation ID (not "default") so a tainted/default conversation can be
/// swapped without touching the bridge.
pub const CONVERSATION_ID = "local-conv-487";
/// Runs `letta -n <agent> -p <prompt>`, captures everything it writes to /// Runs `letta -n <agent> -p <prompt>`, captures everything it writes to
/// stdout, and returns it as an owned slice (caller frees it). /// stdout, and returns it as an owned slice (caller frees it).
pub fn infer( pub fn infer(
@@ -11,8 +16,10 @@ pub fn infer(
agent: []const u8, agent: []const u8,
prompt: []const u8, prompt: []const u8,
) ![]u8 { ) ![]u8 {
_ = agent; // unused: pinned conversation implies the agent on the CLI side
var child = try std.process.spawn(io, .{ var child = try std.process.spawn(io, .{
.argv = &.{ LETTA_PATH, "--agent", agent, "-p", prompt, "--conversation", "default", "--toolset", "default" }, // Pinned conversation: --agent must be omitted for non-default conversations.
.argv = &.{ LETTA_PATH, "-p", prompt, "--conversation", CONVERSATION_ID, "--toolset", "default" },
.stdout = .pipe, .stdout = .pipe,
.stderr = .inherit, // letta's error output goes straight to your terminal .stderr = .inherit, // letta's error output goes straight to your terminal
}); });