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 return value; 48 }; 49 50 - export const getLettaProjectName = (): string => { 51 - const value = Deno.env.get("LETTA_PROJECT_NAME")?.trim(); 52 53 if (!value?.length) { 54 throw Error( 55 - "Letta Project Name not provided in `.env`. add variable `LETTA_PROJECT_NAME=`.", 56 ); 57 } 58 59 return value; 60 }; 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 81 const getAgentBskyHandle = (): string => { 82 const value = Deno.env.get("BSKY_USERNAME")?.trim(); ··· 568 replyCount: 0, 569 quoteCount: 0, 570 // required with manual variables 571 - lettaProjectIdentifier: getLettaProjectName(), 572 agentBskyHandle: getAgentBskyHandle(), 573 agentBskyName: await getAgentBskyName(), 574 agentBskyDID: setAgentBskyDID(),
··· 47 return value; 48 }; 49 50 + const getLettaProjectID = (): string => { 51 + const value = Deno.env.get("LETTA_PROJECT_ID")?.trim(); 52 53 if (!value?.length) { 54 throw Error( 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`", 60 ); 61 } 62 63 return value; 64 }; 65 66 const getAgentBskyHandle = (): string => { 67 const value = Deno.env.get("BSKY_USERNAME")?.trim(); ··· 553 replyCount: 0, 554 quoteCount: 0, 555 // required with manual variables 556 + lettaProjectIdentifier: getLettaProjectID(), 557 agentBskyHandle: getAgentBskyHandle(), 558 agentBskyName: await getAgentBskyName(), 559 agentBskyDID: setAgentBskyDID(),