@dassi_ai/cli 0.5.0 → 0.7.0

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.
@@ -1,93 +0,0 @@
1
- ---
2
- name: pick-tabs
3
- description: Use when a task requires acting on one or more Chrome tabs but the
4
- target tab(s) cannot be determined from the user message. Lists open tabs and
5
- tab groups via the dassi CLI and asks the user to pick. Returns the resolved
6
- tab IDs.
7
- ---
8
-
9
- # dassi:pick-tabs
10
-
11
- Reusable tab/group picker for the Dassi Chrome extension. Other skills (notably `dassi:operate`) compose with this; users can also invoke it directly to see what's open.
12
-
13
- ## When to invoke
14
-
15
- - User asked for a browser action but did not name a specific tab or URL
16
- - User referenced "these tabs," "all my tabs," "those tabs," or similar plural language
17
- - User named a group title that returns 0 or >1 matches from `dassi list-groups`
18
- - Another skill (e.g. `dassi:operate`) explicitly delegates to the picker
19
- - User explicitly says "let me pick" / "show tabs" / "pick again"
20
-
21
- ## Skip when
22
-
23
- - User explicitly named a tab by URL, title, or tab id
24
- - User said "this tab" / "current tab" / "active tab" — use the active tab without asking
25
- - A prior turn in this conversation already resolved a selection AND the user's new message does not reference a different tab/group
26
-
27
- ## Process
28
-
29
- 1. **Call the CLI sequentially** (parallel startup would race the daemon bootstrap):
30
-
31
- ```bash
32
- dassi list-tabs --json
33
- dassi list-groups --json
34
- ```
35
-
36
- First call spawns the daemon if needed; second reuses it. Total latency is dominated by daemon startup (~1s first run, instant after).
37
-
38
- 2. **Render a markdown list:**
39
-
40
- For each group, list its name + color + member tabs (indented, using the real Chrome `tabId` in brackets). Then list ungrouped tabs.
41
-
42
- ```
43
- Open browser:
44
-
45
- Research (blue, 3 tabs)
46
- [1847] MacBook Air — apple.com/macbook-air
47
- [1853] AirPods — apple.com/airpods
48
- [1861] iPad Pro — apple.com/ipad-pro
49
- Reading (orange, 2 tabs)
50
- [1872] Gmail Inbox
51
- [1899] NYTimes
52
- (ungrouped)
53
- [1923] Twitter
54
- [1978] ChatGPT
55
- [2014] Settings
56
-
57
- Reply with: comma-separated tab IDs ("1847,1853"), a group name ("Research"),
58
- a description ("the Apple ones"), or "all".
59
- ```
60
-
61
- 3. **Ask the user with free-text input** (do NOT use `AskUserQuestion` — it caps at 4 options, and users routinely have more open tabs).
62
-
63
- 4. **Parse the reply:**
64
-
65
- | Pattern | Action |
66
- |---|---|
67
- | Comma- or space-separated integers (e.g. `1847,1853,1861`) | Treat as Chrome tab IDs directly; cross-check each against `list-tabs --json`. If any supplied IDs are NOT present, surface a one-line warning to the user before returning (e.g., "Note: tab IDs 9999, 8888 were not found and will be skipped."), and proceed with the verified set. If ALL supplied IDs are missing, stop and ask the user to re-pick. |
68
- | Range like `1847-1861` | NOT supported — Chrome tab IDs are not sequential. If the user uses range syntax, ask them to switch to comma-separated. |
69
- | Exact group name (case-insensitive) | Return all tab IDs in that group from `list-groups --json` + `list-tabs --json`. |
70
- | Substring match against tab titles/URLs ("Apple ones") | Match against `list-tabs --json` data; confirm matches with the user before returning. |
71
- | "all" | Return every tab ID. |
72
-
73
- 5. **Return** the resolved tab ID list. If invoked standalone (not by another skill), also print a confirmation line: `Picked: <n> tabs from <source>.`
74
-
75
- ## Errors
76
-
77
- - **Extension not installed**: The CLI exits 1 with the Chrome Web Store link. Surface it; do not retry.
78
- - **Not signed in**: The CLI opens the options page and polls (internal 5-minute timeout). Tell the user to sign in and wait. If the CLI returns a login-timeout error, surface it and let the user retry — do not auto-retry.
79
- - **No tabs match a description**: Show the list again and ask for a different reference.
80
-
81
- ## Output contract
82
-
83
- When invoked by another skill, return:
84
-
85
- ```json
86
- { "tabIds": [1847, 1853, 1861], "source": "group", "groupTitle": "Research" }
87
- ```
88
-
89
- Where `source` is one of:
90
- - `"explicit"` — user typed tab IDs directly
91
- - `"group"` — user named a group
92
- - `"matched"` — description matched titles
93
- - `"all"` — user replied "all" (every open tab returned)