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:
1 parent
65e2ee083e
commit
58a66700c6
1 file changed
+8
-1
+8
-1
@@ -3,6 +3,11 @@ const Io = std.Io;
|
||||
|
||||
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
|
||||
/// stdout, and returns it as an owned slice (caller frees it).
|
||||
pub fn infer(
|
||||
@@ -11,8 +16,10 @@ pub fn infer(
|
||||
agent: []const u8,
|
||||
prompt: []const u8,
|
||||
) ![]u8 {
|
||||
_ = agent; // unused: pinned conversation implies the agent on the CLI side
|
||||
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,
|
||||
.stderr = .inherit, // letta's error output goes straight to your terminal
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user