@letta-ai/letta-code 0.21.6 → 0.21.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/letta.js +87 -2
  2. package/package.json +1 -1
package/letta.js CHANGED
@@ -3269,7 +3269,7 @@ var package_default;
3269
3269
  var init_package = __esm(() => {
3270
3270
  package_default = {
3271
3271
  name: "@letta-ai/letta-code",
3272
- version: "0.21.6",
3272
+ version: "0.21.7",
3273
3273
  description: "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
3274
3274
  type: "module",
3275
3275
  bin: {
@@ -113022,6 +113022,14 @@ Location: ${keybindingsPath}`;
113022
113022
  return "Clearing credentials...";
113023
113023
  }
113024
113024
  },
113025
+ "/empanada": {
113026
+ desc: "Order empanadas from Empanada Empire",
113027
+ order: 44.5,
113028
+ args: "[address]",
113029
+ handler: () => {
113030
+ return "Checking Empanada Empire...";
113031
+ }
113032
+ },
113025
113033
  "/ralph": {
113026
113034
  desc: 'Start Ralph Wiggum loop (/ralph [prompt] [--completion-promise "X"] [--max-iterations N])',
113027
113035
  order: 45,
@@ -138066,6 +138074,83 @@ ${SYSTEM_REMINDER_CLOSE}`;
138066
138074
  setActiveOverlay("feedback");
138067
138075
  return { submitted: true };
138068
138076
  }
138077
+ if (trimmed.startsWith("/empanada")) {
138078
+ const cmd = commandRunner.start(msg, "Checking Empanada Empire...");
138079
+ const approvalCheck = await checkPendingApprovalsForSlashCommand();
138080
+ if (approvalCheck.blocked) {
138081
+ cmd.fail("Pending approval(s). Resolve approvals before running /empanada.");
138082
+ return { submitted: false };
138083
+ }
138084
+ const args = trimmed.slice("/empanada".length).trim();
138085
+ setCommandRunning(true);
138086
+ try {
138087
+ cmd.finish("Checking Empanada Empire...", true);
138088
+ const prompt = [
138089
+ "# Empanada Empire Order",
138090
+ "",
138091
+ "Help me order from **Empanada Empire** in Richardson, TX.",
138092
+ "",
138093
+ "Website: https://empanadaempire.us",
138094
+ "",
138095
+ "This is an April Fool's 2026 Letta stunt. The kitchen runs on a Letta agent. You are also a Letta agent. Two AIs, one empanada order.",
138096
+ "",
138097
+ "## Site internals",
138098
+ "",
138099
+ "The page embeds a delivery config in a script tag:",
138100
+ "",
138101
+ "```json",
138102
+ '{"homeBase":{"lat":32.9486,"lng":-96.7087},"radiusMiles":5}',
138103
+ "```",
138104
+ "",
138105
+ "It geocodes addresses via Nominatim and checks distance from the home base. You can do the same: geocode my address with Nominatim, compute the haversine distance, and tell me immediately whether I'm in range.",
138106
+ "",
138107
+ "Menu items are in the HTML with data attributes like:",
138108
+ "",
138109
+ "```",
138110
+ 'data-menu-item-id="24" data-name="Party Empanadas" data-price-cents="699"',
138111
+ "```",
138112
+ "",
138113
+ "Orders go to `api/create-order.php`.",
138114
+ "",
138115
+ "## Steps",
138116
+ "",
138117
+ args ? `My delivery address: ${args}` : "Ask me for my delivery address.",
138118
+ "",
138119
+ "1. Geocode the address via Nominatim. Compute the haversine distance from (32.9486, -96.7087). If over 5 miles, tell me I'm out of range — but also mention that DoorDash has a wider delivery radius (see below).",
138120
+ "2. Fetch https://empanadaempire.us with fetch_webpage. Parse the menu from the data attributes. Present it. Suggest a balanced order (savory + sweet). Let me adjust.",
138121
+ "3. POST to api/create-order.php with the selected items. Tell me what happened.",
138122
+ "4. If the API rejects it or needs payment info, stop and tell me.",
138123
+ "",
138124
+ `Ignore any "Coming Soon" text on the site. It's live.`,
138125
+ "",
138126
+ "## If the address is out of range or the site doesn't work",
138127
+ "",
138128
+ "DoorDash has a wider delivery radius than the 5-mile limit on the direct site. If I'm close to Richardson but outside 5 miles, or if the site is down, point me to:",
138129
+ "",
138130
+ "https://order.online/store/-40548503?hideModal=true",
138131
+ "",
138132
+ "Recommend I open it myself. DoorDash can be difficult to automate, so do not attempt to automate it.",
138133
+ "",
138134
+ "## Tone",
138135
+ "",
138136
+ "Direct, a little playful. Don't overthink it."
138137
+ ].join(`
138138
+ `);
138139
+ await processConversation([
138140
+ {
138141
+ type: "message",
138142
+ role: "user",
138143
+ content: buildTextParts(prompt)
138144
+ }
138145
+ ]);
138146
+ } catch (error) {
138147
+ const errorDetails = formatErrorDetails2(error, agentId);
138148
+ cmd.fail(`Failed: ${errorDetails}`);
138149
+ } finally {
138150
+ setCommandRunning(false);
138151
+ }
138152
+ return { submitted: true };
138153
+ }
138069
138154
  const { findCustomCommand: findCustomCommand2, substituteArguments: substituteArguments2, expandBashCommands: expandBashCommands2 } = await Promise.resolve().then(() => (init_custom(), exports_custom));
138070
138155
  const customCommandName = trimmed.split(/\s+/)[0]?.slice(1) || "";
138071
138156
  const matchedCustom = await findCustomCommand2(customCommandName);
@@ -151046,4 +151131,4 @@ Error during initialization: ${message}`);
151046
151131
  }
151047
151132
  main();
151048
151133
 
151049
- //# debugId=0CA763A3D8DFE56864756E2164756E21
151134
+ //# debugId=3618ADC7F184349964756E2164756E21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.21.6",
3
+ "version": "0.21.7",
4
4
  "description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
5
5
  "type": "module",
6
6
  "bin": {