@letta-ai/letta-code 0.16.0 → 0.16.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letta-ai/letta-code",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
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": {
@@ -717,4 +717,4 @@ git push
717
717
  | Subagent exits with code `null`, 0 tool uses | `letta.js` not built | Run `bun run build` |
718
718
  | Subagent hangs on "Tool requires approval" | Wrong subagent type | Use `subagent_type: "history-analyzer"` (workers) or `"memory"` (synthesis) |
719
719
  | Merge conflict during synthesis | Workers touched overlapping files | Resolve by checking `git log` for context |
720
- | Auth fails on push ("repository not found") | Credential helper broken | Use `http.extraHeader` (see syncing-memory-filesystem skill) |
720
+ | Auth fails on push ("repository not found") | Credential helper broken or global helper conflict | Reconfigure **repo-local** helper and check/clear conflicting global `credential.<host>.helper` entries (see syncing-memory-filesystem skill) |
@@ -26,26 +26,40 @@ When memfs is enabled, the Letta Code CLI automatically:
26
26
 
27
27
  If any of these steps fail, you can replicate them manually using the sections below.
28
28
 
29
- ## Authentication
29
+ ## Authentication (Preferred: Repo-Local)
30
30
 
31
- The harness configures a per-repo credential helper during clone. To verify or reconfigure:
31
+ The harness configures a **per-repo** credential helper during clone and refreshes it on pull/startup.
32
+ This local setup is the default and recommended approach.
33
+
34
+ Why this matters: host-level **global** credential helpers (e.g. installed by other tooling) can conflict with memfs auth and cause confusing failures.
35
+
36
+ **Important:** Always use **single-line** format for credential helpers. Multi-line helpers can break tools that parse `git config --list` line-by-line.
32
37
 
33
38
  ```bash
34
39
  cd ~/.letta/agents/<agent-id>/memory
35
40
 
36
- # Check if configured
37
- git config --get credential.$LETTA_BASE_URL.helper
41
+ # Check local helper(s)
42
+ git config --local --get-regexp '^credential\..*\.helper$'
43
+
44
+ # Reconfigure local helper (e.g. after API key rotation) - SINGLE LINE
45
+ git config --local credential.$LETTA_BASE_URL.helper '!f() { echo "username=letta"; echo "password=$LETTA_API_KEY"; }; f'
46
+ ```
47
+
48
+ If you suspect global helper conflicts, inspect and clear host-specific global entries:
49
+
50
+ ```bash
51
+ # Inspect Letta-related global helpers
52
+ git config --global --get-regexp '^credential\..*letta\.com.*\.helper$'
38
53
 
39
- # Reconfigure (e.g. after API key rotation)
40
- git config credential.$LETTA_BASE_URL.helper \
41
- '!f() { echo "username=letta"; echo "password=$LETTA_API_KEY"; }; f'
54
+ # Example: clear a conflicting host-specific helper
55
+ git config --global --unset-all credential.https://api.letta.com.helper
42
56
  ```
43
57
 
44
- For cloning a *different* agent's repo (e.g. during memory migration), set up a global helper:
58
+ For cloning a *different* agent's repo, prefer a one-off auth header over global credential changes:
45
59
 
46
60
  ```bash
47
- git config --global credential.$LETTA_BASE_URL.helper \
48
- '!f() { echo "username=letta"; echo "password=$LETTA_API_KEY"; }; f'
61
+ AUTH_HEADER="Authorization: Basic $(printf 'letta:%s' "$LETTA_API_KEY" | base64 | tr -d '\n')"
62
+ git -c "http.extraHeader=$AUTH_HEADER" clone "$LETTA_BASE_URL/v1/git/<agent-id>/state.git" ~/my-agent-memory
49
63
  ```
50
64
 
51
65
  ## Pre-Commit Hook (Frontmatter Validation)
@@ -102,10 +116,9 @@ curl -X PATCH "$LETTA_BASE_URL/v1/agents/$AGENT_ID" \
102
116
  mkdir -p "$MEMORY_REPO_DIR"
103
117
  git clone "$LETTA_BASE_URL/v1/git/$AGENT_ID/state.git" "$MEMORY_REPO_DIR"
104
118
 
105
- # 3. Configure local credential helper
119
+ # 3. Configure local credential helper (single-line format required)
106
120
  cd "$MEMORY_REPO_DIR"
107
- git config credential.$LETTA_BASE_URL.helper \
108
- '!f() { echo "username=letta"; echo "password=$LETTA_API_KEY"; }; f'
121
+ git config --local credential.$LETTA_BASE_URL.helper '!f() { echo "username=letta"; echo "password=$LETTA_API_KEY"; }; f'
109
122
  ```
110
123
 
111
124
  ## Bidirectional Sync
@@ -216,8 +229,9 @@ git push
216
229
  ## Troubleshooting
217
230
 
218
231
  **Clone fails with "Authentication failed":**
219
- - Check credential helper: `git config --get credential.$LETTA_BASE_URL.helper`
220
- - Reconfigure: see Authentication section above
232
+ - Check local helper(s): `git -C ~/.letta/agents/<agent-id>/memory config --local --get-regexp '^credential\..*\.helper$'`
233
+ - Check for conflicting global helper(s): `git config --global --get-regexp '^credential\..*letta\.com.*\.helper$'`
234
+ - Reconfigure local helper: see Authentication section above
221
235
  - Verify the endpoint is reachable: `curl -u letta:$LETTA_API_KEY $LETTA_BASE_URL/v1/git/<agent-id>/state.git/info/refs?service=git-upload-pack`
222
236
 
223
237
  **Push/pull doesn't update API:**