@residue/cli 0.0.2 → 0.0.4
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/CHANGELOG.md +14 -0
- package/README.md +25 -1
- package/dist/index.js +551 -32
- package/package.json +1 -1
- package/src/commands/clear.ts +42 -0
- package/src/commands/search.ts +266 -0
- package/src/commands/status.ts +180 -0
- package/src/commands/sync.ts +85 -1
- package/src/index.ts +28 -1
- package/src/lib/search-text.ts +257 -0
- package/test/lib/search-text.test.ts +366 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @residue/cli
|
|
2
2
|
|
|
3
|
+
## 0.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ca5ad11: Add `residue clear` command to remove stuck pending sessions from the local queue. Clears all sessions by default, or a specific one with `--id`.
|
|
8
|
+
- ca5ad11: Add `residue search <query>` command to search session history from the terminal, with `--ai` flag for AI-powered answers. Results include clickable worker URLs to view full conversations.
|
|
9
|
+
- ca5ad11: Generate lightweight search text files at sync time and upload to R2 `search/` prefix for Cloudflare AI Search indexing. Add `/api/search` and `/api/search/ai` endpoints.
|
|
10
|
+
|
|
11
|
+
## 0.0.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Add status command, common workflows docs, versioning policy.
|
|
16
|
+
|
|
3
17
|
## 0.0.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -35,10 +35,34 @@ After setup, conversations are captured automatically. Commit and push as usual.
|
|
|
35
35
|
| `residue setup <agent>` | Configure an agent adapter |
|
|
36
36
|
| `residue push` | Manually upload pending sessions |
|
|
37
37
|
| `residue capture` | Tag pending sessions with current commit (hook) |
|
|
38
|
-
| `residue sync` | Upload sessions to worker (hook) |
|
|
38
|
+
| `residue sync` | Upload sessions + search text to worker (hook) |
|
|
39
39
|
| `residue session start` | Register a new session (adapter) |
|
|
40
40
|
| `residue session end` | Mark a session as ended (adapter) |
|
|
41
41
|
|
|
42
|
+
## Search Text Generation
|
|
43
|
+
|
|
44
|
+
During `residue sync`, the CLI generates a lightweight `.txt` summary of each session alongside the raw data upload. These text files are stored in R2 under `search/<session-id>.txt` and indexed by Cloudflare AI Search.
|
|
45
|
+
|
|
46
|
+
The text extractor is agent-specific (`packages/cli/src/lib/search-text.ts`) and produces a simple format:
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Session: <id>
|
|
50
|
+
Agent: claude-code
|
|
51
|
+
Commits: abc1234, def5678
|
|
52
|
+
Branch: feature-auth
|
|
53
|
+
Repo: my-team/my-app
|
|
54
|
+
|
|
55
|
+
[human] how do we fix the auth redirect
|
|
56
|
+
[assistant] I'll update the middleware...
|
|
57
|
+
[tool] edit packages/worker/src/middleware/auth.ts
|
|
58
|
+
[tool] bash git diff --staged
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Kept: human messages, assistant text, tool names with file paths/commands.
|
|
62
|
+
Stripped: thinking blocks, tool output, token metadata, signatures, sidechain entries.
|
|
63
|
+
|
|
64
|
+
Search upload failure is non-fatal and does not block the sync.
|
|
65
|
+
|
|
42
66
|
## License
|
|
43
67
|
|
|
44
68
|
MIT
|