a tool to help your Letta AI agents navigate bluesky

Replace Project Name with Project ID in Letta Agent Context

Changed files
+8 -23
utils
+8 -23
utils/agentContext.ts
··· 47 47 return value; 48 48 }; 49 49 50 - export const getLettaProjectName = (): string => { 51 - const value = Deno.env.get("LETTA_PROJECT_NAME")?.trim(); 50 + const getLettaProjectID = (): string => { 51 + const value = Deno.env.get("LETTA_PROJECT_ID")?.trim(); 52 52 53 53 if (!value?.length) { 54 54 throw Error( 55 - "Letta Project Name not provided in `.env`. add variable `LETTA_PROJECT_NAME=`.", 55 + "Letta Project ID not provided in `.env`. add variable `LETTA_PROJECT_ID=`.", 56 + ); 57 + } else if (!value.includes("-")) { 58 + throw Error( 59 + "Letta Project ID is not formed correctly, check variable `LETTA_PROJECT_ID`", 56 60 ); 57 61 } 58 62 59 63 return value; 60 64 }; 61 - 62 - // 63 - // temporarily commenting out until switch to letta SDK 1.0 64 - // 65 - // const getLettaProjectID = (): string => { 66 - // const value = Deno.env.get("LETTA_PROJECT_ID")?.trim(); 67 - 68 - // if (!value?.length) { 69 - // throw Error( 70 - // "Letta Project ID not provided in `.env`. add variable `LETTA_PROJECT_ID=`.", 71 - // ); 72 - // } else if (!value.includes("-")) { 73 - // throw Error( 74 - // "Letta Project ID is not formed correctly, check variable `LETTA_PROJECT_ID`", 75 - // ); 76 - // } 77 - 78 - // return value; 79 - // }; 80 65 81 66 const getAgentBskyHandle = (): string => { 82 67 const value = Deno.env.get("BSKY_USERNAME")?.trim(); ··· 568 553 replyCount: 0, 569 554 quoteCount: 0, 570 555 // required with manual variables 571 - lettaProjectIdentifier: getLettaProjectName(), 556 + lettaProjectIdentifier: getLettaProjectID(), 572 557 agentBskyHandle: getAgentBskyHandle(), 573 558 agentBskyName: await getAgentBskyName(), 574 559 agentBskyDID: setAgentBskyDID(),