stigmergy 1.3.1-beta → 1.3.1
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 +146 -146
- package/skills/resumesession/INDEPENDENT_SKILL.md +403 -171
- package/skills/resumesession/README.md +381 -0
- package/skills/resumesession/SKILL.md +211 -127
- package/skills/resumesession/__init__.py +33 -33
- package/skills/resumesession/implementations/simple-resume.js +13 -13
- package/skills/resumesession/independent-resume.js +750 -0
- package/skills/resumesession/package.json +1 -0
- package/skills/resumesession/skill.json +1 -0
- package/src/cli/commands/stigmergy-resume.js +774 -774
- package/src/core/cli_help_analyzer.js +1236 -1236
- package/src/core/enhanced_cli_parameter_handler.js +402 -402
- package/src/core/smart_router.js +550 -550
|
@@ -1,127 +1,211 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: resumesession
|
|
3
|
-
description: Cross-CLI session recovery and history management skill
|
|
4
|
-
author: stigmergy
|
|
5
|
-
version: 2.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# ResumeSession Skill
|
|
9
|
-
|
|
10
|
-
Cross-CLI session recovery and history management skill for all CLI tools.
|
|
11
|
-
|
|
12
|
-
## Description
|
|
13
|
-
|
|
14
|
-
This skill enables
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
###
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
stigmergy
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
##
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
**
|
|
126
|
-
|
|
127
|
-
**
|
|
1
|
+
---
|
|
2
|
+
name: resumesession
|
|
3
|
+
description: Cross-CLI session recovery and history management skill
|
|
4
|
+
author: stigmergy
|
|
5
|
+
version: 2.1.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# ResumeSession Skill
|
|
9
|
+
|
|
10
|
+
Cross-CLI session recovery and history management skill for all CLI tools.
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
This skill enables Claude CLI and other AI assistants to recover and manage sessions across different CLI tools. When users ask to "恢复上次对话" (recover last conversation) or "查看历史会话" (view session history), this skill provides intelligent project-based filtering and context recovery.
|
|
15
|
+
|
|
16
|
+
**Configuration**: CLI paths and detection are managed by stigmergy. The skill reads configuration from `~/.stigmergy/config.json`.
|
|
17
|
+
|
|
18
|
+
## When to Use This Skill
|
|
19
|
+
|
|
20
|
+
Use this skill when users request:
|
|
21
|
+
- 恢复上次对话 (recover last conversation)
|
|
22
|
+
- 查看历史会话 (view session history)
|
|
23
|
+
- 继续之前的讨论 (continue previous discussion)
|
|
24
|
+
- 找到之前的某个会话 (find a previous session)
|
|
25
|
+
- 查看某个 CLI 的会话 (view sessions from a specific CLI)
|
|
26
|
+
|
|
27
|
+
## How It Works
|
|
28
|
+
|
|
29
|
+
### 1. Identify User Intent
|
|
30
|
+
|
|
31
|
+
Analyze the user's request to determine:
|
|
32
|
+
- Whether they want to recover the latest session or browse multiple sessions
|
|
33
|
+
- Whether they want sessions from a specific CLI or all CLIs
|
|
34
|
+
- Whether they want sessions from current project or all projects
|
|
35
|
+
|
|
36
|
+
### 2. Execute Recovery Tool
|
|
37
|
+
|
|
38
|
+
Call the `independent-resume.js` script with appropriate parameters:
|
|
39
|
+
|
|
40
|
+
```javascript
|
|
41
|
+
// Default: recover latest session from current project
|
|
42
|
+
Bash("node independent-resume.js")
|
|
43
|
+
|
|
44
|
+
// Show 5 recent sessions from current project
|
|
45
|
+
Bash("node independent-resume.js 5")
|
|
46
|
+
|
|
47
|
+
// Show iFlow sessions from current project
|
|
48
|
+
Bash("node independent-resume.js iflow")
|
|
49
|
+
|
|
50
|
+
// Show all CLI sessions from current project
|
|
51
|
+
Bash("node independent-resume.js --all")
|
|
52
|
+
|
|
53
|
+
// Show all sessions from all projects
|
|
54
|
+
Bash("node independent-resume.js --complete")
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 3. Analyze and Present Results
|
|
58
|
+
|
|
59
|
+
The tool returns session data in a structured format. Use LLM intelligence to:
|
|
60
|
+
- Summarize the session content
|
|
61
|
+
- Highlight key information
|
|
62
|
+
- Provide context for continuation
|
|
63
|
+
- Help user select the right session if multiple are shown
|
|
64
|
+
|
|
65
|
+
### 4. Continue Conversation
|
|
66
|
+
|
|
67
|
+
After displaying the session content, ask the user:
|
|
68
|
+
- "是否要继续这个会话?" (Do you want to continue this session?)
|
|
69
|
+
- "需要查看其他会话吗?" (Do you need to view other sessions?)
|
|
70
|
+
- "需要我帮你做什么?" (What would you like me to do?)
|
|
71
|
+
|
|
72
|
+
## Configuration
|
|
73
|
+
|
|
74
|
+
**No manual configuration required!** The tool automatically detects installed CLI tools using a two-tier strategy:
|
|
75
|
+
|
|
76
|
+
### Priority 1: Stigmergy Configuration (if available)
|
|
77
|
+
|
|
78
|
+
If stigmergy is installed and configured, the tool uses its CLI configuration:
|
|
79
|
+
- Reads from `~/.stigmergy/config.json`
|
|
80
|
+
- Uses stigmergy's scan results for CLI paths
|
|
81
|
+
- Supports custom CLI paths and multiple instances
|
|
82
|
+
- Provides the most accurate CLI detection
|
|
83
|
+
|
|
84
|
+
### Priority 2: Automatic Detection (fallback)
|
|
85
|
+
|
|
86
|
+
If stigmergy is not available or has no configuration, the tool automatically scans common installation locations:
|
|
87
|
+
- Scans multiple common paths for each CLI
|
|
88
|
+
- Supports both Linux/Mac and Windows paths
|
|
89
|
+
- Detects CLI tools without user intervention
|
|
90
|
+
- Works out of the box for most installations
|
|
91
|
+
|
|
92
|
+
**Scanned Locations** (for each CLI):
|
|
93
|
+
- `~/.cli-name/projects/` (Linux/Mac)
|
|
94
|
+
- `~/.config/cli-name/projects/` (Linux/Mac)
|
|
95
|
+
- `~/AppData/Roaming/cli-name/projects/` (Windows)
|
|
96
|
+
|
|
97
|
+
**Supported CLI Tools**:
|
|
98
|
+
- Claude
|
|
99
|
+
- Gemini
|
|
100
|
+
- Qwen
|
|
101
|
+
- iFlow
|
|
102
|
+
- CodeBuddy
|
|
103
|
+
- Codex
|
|
104
|
+
- QoderCLI
|
|
105
|
+
- Kode
|
|
106
|
+
|
|
107
|
+
**Custom Installation Support**:
|
|
108
|
+
If a CLI is installed in a custom location:
|
|
109
|
+
- With stigmergy: Configure in stigmergy for best results
|
|
110
|
+
- Without stigmergy: The tool scans multiple candidate paths automatically
|
|
111
|
+
|
|
112
|
+
## Usage Examples
|
|
113
|
+
|
|
114
|
+
### Example 1: Quick Recovery
|
|
115
|
+
|
|
116
|
+
**User**: "恢复上次对话"
|
|
117
|
+
|
|
118
|
+
**AI Response**:
|
|
119
|
+
1. Execute: `node independent-resume.js`
|
|
120
|
+
2. Display the latest session content
|
|
121
|
+
3. Ask: "已恢复上次对话。是否要继续?"
|
|
122
|
+
|
|
123
|
+
### Example 2: Browse Recent Sessions
|
|
124
|
+
|
|
125
|
+
**User**: "查看最近几次会话"
|
|
126
|
+
|
|
127
|
+
**AI Response**:
|
|
128
|
+
1. Execute: `node independent-resume.js 5`
|
|
129
|
+
2. Display the 5 most recent sessions with summaries
|
|
130
|
+
3. Ask: "找到了 5 个会话。你想继续哪个?"
|
|
131
|
+
|
|
132
|
+
### Example 3: Filter by CLI
|
|
133
|
+
|
|
134
|
+
**User**: "看看 iFlow 的会话"
|
|
135
|
+
|
|
136
|
+
**AI Response**:
|
|
137
|
+
1. Execute: `node independent-resume.js iflow`
|
|
138
|
+
2. Display all iFlow sessions from current project
|
|
139
|
+
3. Ask: "找到了 X 个 iFlow 会话。你想继续哪个?"
|
|
140
|
+
|
|
141
|
+
### Example 4: View All Projects
|
|
142
|
+
|
|
143
|
+
**User**: "查看所有项目的会话"
|
|
144
|
+
|
|
145
|
+
**AI Response**:
|
|
146
|
+
1. Execute: `node independent-resume.js --complete`
|
|
147
|
+
2. Display sessions grouped by project
|
|
148
|
+
3. Ask: "你想查看哪个项目的会话?"
|
|
149
|
+
|
|
150
|
+
## Features
|
|
151
|
+
|
|
152
|
+
- ✅ **Project-Aware**: Automatically filters sessions by current working directory
|
|
153
|
+
- ✅ **Default Context Recovery**: Shows latest session content by default
|
|
154
|
+
- ✅ **Number-Based Control**: Use numbers to show multiple sessions
|
|
155
|
+
- ✅ **CLI Filtering**: Filter sessions by specific CLI tool
|
|
156
|
+
- ✅ **All CLI View**: Show all CLI sessions for current project
|
|
157
|
+
- ✅ **Complete View**: Show all projects' sessions grouped by project
|
|
158
|
+
- ✅ **Cross-CLI Support**: Works with Claude, Gemini, Qwen, iFlow, CodeBuddy, Codex, QoderCLI, Kode
|
|
159
|
+
- ✅ **Smart Project Recognition**: Automatically matches sessions to current project
|
|
160
|
+
- ✅ **Relative Time Display**: Shows relative time (e.g., "5 minutes ago")
|
|
161
|
+
|
|
162
|
+
## Tool Parameters
|
|
163
|
+
|
|
164
|
+
| Parameter | Description |
|
|
165
|
+
|-----------|-------------|
|
|
166
|
+
| (none) | Recover latest session from current project |
|
|
167
|
+
| `[number]` | Show N most recent sessions from current project |
|
|
168
|
+
| `[cli-name]` | Show sessions from specific CLI (current project) |
|
|
169
|
+
| `[cli-name] [number]` | Show N sessions from specific CLI |
|
|
170
|
+
| `--all` | Show all CLI sessions from current project |
|
|
171
|
+
| `--complete` | Show all sessions from all projects |
|
|
172
|
+
|
|
173
|
+
## Supported CLIs
|
|
174
|
+
|
|
175
|
+
This skill supports any CLI tool that:
|
|
176
|
+
- Stores sessions in files (typically JSON)
|
|
177
|
+
- Can be configured in stigmergy
|
|
178
|
+
- Has extractable project and session information
|
|
179
|
+
|
|
180
|
+
**Common CLI Tools** (examples, not limited to):
|
|
181
|
+
- Claude
|
|
182
|
+
- Gemini
|
|
183
|
+
- Qwen
|
|
184
|
+
- iFlow
|
|
185
|
+
- CodeBuddy
|
|
186
|
+
- Codex
|
|
187
|
+
- QoderCLI
|
|
188
|
+
- Kode
|
|
189
|
+
|
|
190
|
+
**Custom CLI Support**:
|
|
191
|
+
- Add any CLI to stigmergy configuration
|
|
192
|
+
- Support multiple instances of the same CLI
|
|
193
|
+
- Support custom installation paths
|
|
194
|
+
- Support custom session formats
|
|
195
|
+
|
|
196
|
+
## Notes
|
|
197
|
+
|
|
198
|
+
**Configuration Strategy**:
|
|
199
|
+
- **Priority 1**: Uses stigmergy configuration if available (most accurate)
|
|
200
|
+
- **Priority 2**: Falls back to automatic detection (works out of the box)
|
|
201
|
+
- No manual configuration required in either case
|
|
202
|
+
- Seamlessly switches between strategies based on environment
|
|
203
|
+
|
|
204
|
+
**Context Loading**: When recovering a session, load the conversation history as context for the LLM to understand the previous discussion.
|
|
205
|
+
|
|
206
|
+
**Project Awareness**: The tool automatically identifies the current project based on the working directory. Ensure users are in the correct project directory.
|
|
207
|
+
|
|
208
|
+
**Error Handling**:
|
|
209
|
+
- If no sessions are found, inform the user and suggest they check if CLI tools have created sessions
|
|
210
|
+
- The tool automatically detects installed CLI tools (with or without stigmergy)
|
|
211
|
+
- If CLI is installed in a custom location, ensure the session directory is accessible
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "resumesession",
|
|
3
|
-
"displayName": "ResumeSession",
|
|
4
|
-
"version": "2.0.0",
|
|
5
|
-
"description": "Cross-CLI session recovery and history management with project-aware filtering",
|
|
6
|
-
"capabilities": [
|
|
7
|
-
"Recover latest session from current project",
|
|
8
|
-
"Check session content and skip empty sessions",
|
|
9
|
-
"Show multiple sessions from current project",
|
|
10
|
-
"Filter sessions by specific CLI",
|
|
11
|
-
"Search sessions by content keywords",
|
|
12
|
-
"Filter sessions by date range (today, week, month)",
|
|
13
|
-
"Show sessions from all projects with --all flag",
|
|
14
|
-
"Multiple view formats: summary, timeline, detailed, context",
|
|
15
|
-
"Cross-CLI support: Claude, Gemini, Qwen, iFlow, CodeBuddy, Codex, QoderCLI, Kode"
|
|
16
|
-
],
|
|
17
|
-
"protocols": ["chinese", "english"],
|
|
18
|
-
"hooks": [],
|
|
19
|
-
"enabled": true,
|
|
20
|
-
"category": "session-management",
|
|
21
|
-
"author": "stigmergy",
|
|
22
|
-
"dependencies": [],
|
|
23
|
-
"implementations": [
|
|
24
|
-
{
|
|
25
|
-
"name": "stigmergy-resume",
|
|
26
|
-
"version": "2.0.0",
|
|
27
|
-
"language": "javascript",
|
|
28
|
-
"description": "Project-aware session recovery tool",
|
|
29
|
-
"runtime": "node",
|
|
30
|
-
"entry_point": "src/cli/commands/stigmergy-resume.js"
|
|
31
|
-
}
|
|
32
|
-
]
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "resumesession",
|
|
3
|
+
"displayName": "ResumeSession",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"description": "Cross-CLI session recovery and history management with project-aware filtering",
|
|
6
|
+
"capabilities": [
|
|
7
|
+
"Recover latest session from current project",
|
|
8
|
+
"Check session content and skip empty sessions",
|
|
9
|
+
"Show multiple sessions from current project",
|
|
10
|
+
"Filter sessions by specific CLI",
|
|
11
|
+
"Search sessions by content keywords",
|
|
12
|
+
"Filter sessions by date range (today, week, month)",
|
|
13
|
+
"Show sessions from all projects with --all flag",
|
|
14
|
+
"Multiple view formats: summary, timeline, detailed, context",
|
|
15
|
+
"Cross-CLI support: Claude, Gemini, Qwen, iFlow, CodeBuddy, Codex, QoderCLI, Kode"
|
|
16
|
+
],
|
|
17
|
+
"protocols": ["chinese", "english"],
|
|
18
|
+
"hooks": [],
|
|
19
|
+
"enabled": true,
|
|
20
|
+
"category": "session-management",
|
|
21
|
+
"author": "stigmergy",
|
|
22
|
+
"dependencies": [],
|
|
23
|
+
"implementations": [
|
|
24
|
+
{
|
|
25
|
+
"name": "stigmergy-resume",
|
|
26
|
+
"version": "2.0.0",
|
|
27
|
+
"language": "javascript",
|
|
28
|
+
"description": "Project-aware session recovery tool",
|
|
29
|
+
"runtime": "node",
|
|
30
|
+
"entry_point": "src/cli/commands/stigmergy-resume.js"
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "simple-resume",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "Simple cross-CLI session recovery tool",
|
|
5
|
-
"language": "javascript",
|
|
6
|
-
"runtime": "node",
|
|
7
|
-
"entry_point": "src/cli/commands/simple-resume.js",
|
|
8
|
-
"metadata": {
|
|
9
|
-
"cli_type": "cross-cli",
|
|
10
|
-
"session_scope": "all",
|
|
11
|
-
"output_format": "full"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "simple-resume",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Simple cross-CLI session recovery tool",
|
|
5
|
+
"language": "javascript",
|
|
6
|
+
"runtime": "node",
|
|
7
|
+
"entry_point": "src/cli/commands/simple-resume.js",
|
|
8
|
+
"metadata": {
|
|
9
|
+
"cli_type": "cross-cli",
|
|
10
|
+
"session_scope": "all",
|
|
11
|
+
"output_format": "full"
|
|
12
|
+
}
|
|
13
|
+
}
|