gm-copilot-cli 2.0.185 → 2.0.188

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,376 +0,0 @@
1
- ---
2
- name: code-search
3
- description: Semantic code search across the codebase. Returns structured results with file paths, line numbers, and relevance scores. Use for all code exploration, finding implementations, locating files, and answering codebase questions.
4
- category: exploration
5
- allowed-tools: Bash(bun x codebasesearch*)
6
- input-schema:
7
- type: object
8
- required: [prompt]
9
- properties:
10
- prompt:
11
- type: string
12
- minLength: 3
13
- maxLength: 200
14
- description: Natural language search query describing what you're looking for
15
- context:
16
- type: object
17
- description: Optional context about search scope and restrictions
18
- properties:
19
- path:
20
- type: string
21
- description: Restrict search to this directory path (relative or absolute)
22
- file-types:
23
- type: array
24
- items: { type: string }
25
- description: Filter results by file extensions (e.g., ["js", "ts", "py"])
26
- exclude-patterns:
27
- type: array
28
- items: { type: string }
29
- description: Exclude paths matching glob patterns (e.g., ["node_modules", "*.test.js"])
30
- filter:
31
- type: object
32
- description: Output filtering and formatting options
33
- properties:
34
- max-results:
35
- type: integer
36
- minimum: 1
37
- maximum: 500
38
- default: 50
39
- description: Maximum number of results to return
40
- min-score:
41
- type: number
42
- minimum: 0
43
- maximum: 1
44
- default: 0.5
45
- description: Minimum relevance score (0-1) to include in results
46
- sort-by:
47
- type: string
48
- enum: [relevance, path, line-number]
49
- default: relevance
50
- description: Result sort order
51
- timeout:
52
- type: integer
53
- minimum: 1000
54
- maximum: 30000
55
- default: 10000
56
- description: Search timeout in milliseconds (query returns partial results if exceeded)
57
- output-schema:
58
- type: object
59
- required: [status, results, meta]
60
- properties:
61
- status:
62
- type: string
63
- enum: [success, partial, empty, timeout, error]
64
- description: Overall operation status
65
- results:
66
- type: array
67
- description: Array of matching code locations
68
- items:
69
- type: object
70
- required: [file, line, content, score]
71
- properties:
72
- file:
73
- type: string
74
- description: Absolute or relative file path to matched file
75
- line:
76
- type: integer
77
- description: Line number where match occurs (1-indexed)
78
- content:
79
- type: string
80
- description: The matched line or context snippet
81
- score:
82
- type: number
83
- minimum: 0
84
- maximum: 1
85
- description: Relevance score where 1.0 is perfect match
86
- context:
87
- type: object
88
- description: Surrounding context lines (optional)
89
- properties:
90
- before:
91
- type: array
92
- items: { type: string }
93
- description: Lines before the match
94
- after:
95
- type: array
96
- items: { type: string }
97
- description: Lines after the match
98
- metadata:
99
- type: object
100
- description: File and match metadata (optional)
101
- properties:
102
- language:
103
- type: string
104
- description: Programming language detected (js, ts, py, rs, go, etc.)
105
- size:
106
- type: integer
107
- description: File size in bytes
108
- modified:
109
- type: string
110
- format: date-time
111
- description: Last modification timestamp
112
- meta:
113
- type: object
114
- required: [query, count, duration_ms]
115
- description: Query execution metadata
116
- properties:
117
- query:
118
- type: string
119
- description: Normalized query that was executed
120
- count:
121
- type: integer
122
- description: Total matches found (before filtering)
123
- filtered:
124
- type: integer
125
- description: Results returned (after filtering and limiting)
126
- duration_ms:
127
- type: integer
128
- description: Execution time in milliseconds
129
- scanned_files:
130
- type: integer
131
- description: Total files examined during search
132
- timestamp:
133
- type: string
134
- format: date-time
135
- description: When execution completed
136
- errors:
137
- type: array
138
- description: Non-fatal errors that occurred (may appear alongside partial results)
139
- items:
140
- type: object
141
- properties:
142
- code:
143
- type: string
144
- enum: [TIMEOUT, INVALID_PATH, SCHEMA_VIOLATION, EXECUTION_FAILED]
145
- description: Error classification
146
- message:
147
- type: string
148
- description: Human-readable error description
149
- output-format: json
150
- error-handling:
151
- timeout:
152
- behavior: return-partial
153
- description: Returns results collected before timeout with status=partial
154
- invalid-input:
155
- behavior: reject
156
- description: Returns status=error with validation errors in errors array
157
- empty-results:
158
- behavior: return-empty
159
- description: Returns status=empty with count=0, filtered=0, results=[]
160
- execution-error:
161
- behavior: return-error
162
- description: Returns status=error with error details in errors array
163
- ---
164
-
165
- # Semantic Code Search
166
-
167
- Only use bun x codebasesearch for searching code, or execute some custom code if you need more than that, never use other cli tools to search the codebase. Search the codebase using natural language. Do multiple searches when looking for files, starting with fewer words and adding more if you need to refine the search. 102 file types are covered, returns results with file paths and line numbers.
168
-
169
- ## Usage
170
-
171
- ```bash
172
- bun x codebasesearch "your natural language query"
173
- ```
174
-
175
- ## Invocation Examples
176
-
177
- ### Via Skill Tool (Recommended - Structured JSON Input)
178
-
179
- **Basic search**:
180
- ```json
181
- {
182
- "prompt": "where is authentication handled"
183
- }
184
- ```
185
-
186
- **With filtering and limits**:
187
- ```json
188
- {
189
- "prompt": "database connection setup",
190
- "filter": {
191
- "max-results": 20,
192
- "min-score": 0.7,
193
- "sort-by": "path"
194
- }
195
- }
196
- ```
197
-
198
- **Scoped to directory with file type filter**:
199
- ```json
200
- {
201
- "prompt": "error logging middleware",
202
- "context": {
203
- "path": "src/middleware/",
204
- "file-types": ["js", "ts"]
205
- },
206
- "timeout": 5000
207
- }
208
- ```
209
-
210
- **Exclude patterns and narrow results**:
211
- ```json
212
- {
213
- "prompt": "rate limiter implementation",
214
- "context": {
215
- "exclude-patterns": ["*.test.js", "node_modules/*"]
216
- },
217
- "filter": {
218
- "max-results": 10,
219
- "min-score": 0.8
220
- }
221
- }
222
- ```
223
-
224
- ### Legacy CLI Invocation (Still Supported)
225
-
226
- ```bash
227
- bun x codebasesearch "where is authentication handled"
228
- bun x codebasesearch "database connection setup"
229
- bun x codebasesearch "how are errors logged"
230
- bun x codebasesearch "function that parses config files"
231
- bun x codebasesearch "where is the rate limiter"
232
- ```
233
-
234
- ## Output Examples
235
-
236
- ### Success Response (Multiple Results)
237
-
238
- ```json
239
- {
240
- "status": "success",
241
- "results": [
242
- {
243
- "file": "src/auth/handler.js",
244
- "line": 42,
245
- "content": "async function authenticateUser(credentials) {",
246
- "score": 0.95,
247
- "context": {
248
- "before": [
249
- "// Main authentication entry point",
250
- ""
251
- ],
252
- "after": [
253
- " const { username, password } = credentials;",
254
- " const user = await db.users.findOne({ username });"
255
- ]
256
- },
257
- "metadata": {
258
- "language": "javascript",
259
- "size": 2048,
260
- "modified": "2025-03-10T14:23:00Z"
261
- }
262
- },
263
- {
264
- "file": "src/middleware/auth-middleware.js",
265
- "line": 18,
266
- "content": "export const requireAuth = (req, res, next) => {",
267
- "score": 0.78,
268
- "metadata": {
269
- "language": "javascript",
270
- "size": 1024,
271
- "modified": "2025-03-10T14:20:00Z"
272
- }
273
- }
274
- ],
275
- "meta": {
276
- "query": "authentication handled",
277
- "count": 2,
278
- "filtered": 2,
279
- "duration_ms": 245,
280
- "scanned_files": 87,
281
- "timestamp": "2025-03-15T10:30:00Z"
282
- }
283
- }
284
- ```
285
-
286
- ### Empty Results Response
287
-
288
- ```json
289
- {
290
- "status": "empty",
291
- "results": [],
292
- "meta": {
293
- "query": "nonexistent pattern xyz123",
294
- "count": 0,
295
- "filtered": 0,
296
- "duration_ms": 123,
297
- "scanned_files": 87,
298
- "timestamp": "2025-03-15T10:30:00Z"
299
- }
300
- }
301
- ```
302
-
303
- ### Timeout Response (Partial Results)
304
-
305
- ```json
306
- {
307
- "status": "partial",
308
- "results": [
309
- {
310
- "file": "src/a.js",
311
- "line": 5,
312
- "content": "function init() {",
313
- "score": 0.92,
314
- "metadata": { "language": "javascript", "size": 512 }
315
- },
316
- {
317
- "file": "src/b.js",
318
- "line": 12,
319
- "content": "const setup = () => {",
320
- "score": 0.85,
321
- "metadata": { "language": "javascript", "size": 768 }
322
- }
323
- ],
324
- "meta": {
325
- "query": "expensive search pattern",
326
- "count": 1847,
327
- "filtered": 2,
328
- "duration_ms": 10000,
329
- "scanned_files": 45,
330
- "timestamp": "2025-03-15T10:30:00Z"
331
- },
332
- "errors": [
333
- {
334
- "code": "TIMEOUT",
335
- "message": "Search exceeded 10000ms limit. Returning partial results (2 of 1847 matches)."
336
- }
337
- ]
338
- }
339
- ```
340
-
341
- ### Error Response (Invalid Input)
342
-
343
- ```json
344
- {
345
- "status": "error",
346
- "results": [],
347
- "meta": {
348
- "query": null,
349
- "count": 0,
350
- "filtered": 0,
351
- "duration_ms": 50,
352
- "scanned_files": 0,
353
- "timestamp": "2025-03-15T10:30:00Z"
354
- },
355
- "errors": [
356
- {
357
- "code": "INVALID_PATH",
358
- "message": "context.path='/nonexistent' does not exist"
359
- },
360
- {
361
- "code": "SCHEMA_VIOLATION",
362
- "message": "filter.max-results must be between 1 and 500, got 1000"
363
- }
364
- ]
365
- }
366
- ```
367
-
368
- ## Rules
369
-
370
- - Always use this first before reading files — it returns file paths and line numbers
371
- - Natural language queries work best; be descriptive about what you're looking for
372
- - Structured JSON output includes relevance scores and file paths for immediate navigation
373
- - Use returned file paths and line numbers to read full file context via Read tool
374
- - Results are pre-sorted by relevance (highest scores first) unless sort-by specifies otherwise
375
- - Timeout queries return partial results with status=partial — use if time-critical
376
- - Schema validation ensures valid input before execution — invalid args return error with details
@@ -1,84 +0,0 @@
1
- ---
2
- name: process-management
3
- description: PM2 process lifecycle management. MANDATORY for all servers, workers, and daemons. Invoke when entering EXECUTE phase for any long-running process.
4
- ---
5
-
6
- # Process Management — PM2 Lifecycle
7
-
8
- You are managing long-running processes. Invoke this skill before starting any server, worker, or daemon.
9
-
10
- **GRAPH POSITION**: Sub-skill of EXECUTE phase.
11
- - **Invoke**: When `gm-execute` skill encounters any server/worker/daemon requirement → invoke `process-management` skill
12
- - **Return**: After lifecycle task complete → return to `gm-execute` skill to continue EXECUTE phase
13
-
14
- ## PRE-CHECK (mandatory before any start)
15
-
16
- Always check for running processes before starting:
17
-
18
- ```
19
- exec:bash
20
- bun x gm-exec bash pm2 list
21
- ```
22
-
23
- If process already running:
24
- - Same name → stop and delete first, then restart
25
- - Different name but same port → stop that process first
26
- - Never start a duplicate. Never stack processes.
27
-
28
- ## START A PROCESS
29
-
30
- ```
31
- exec:bash
32
- bun x gm-exec bash pm2 start <file> --name <name> --watch --no-autorestart
33
- ```
34
-
35
- - `--watch`: enables hot reload on file changes
36
- - `--no-autorestart`: prevents infinite restart loops on crash
37
- - Always name every process explicitly
38
-
39
- ## STATUS AND LOGS
40
-
41
- ```
42
- exec:bash
43
- bun x gm-exec bash pm2 list
44
- bun x gm-exec bash pm2 logs <name> --lines 50
45
- bun x gm-exec bash pm2 show <name>
46
- ```
47
-
48
- ## STOP AND CLEANUP
49
-
50
- Always clean up processes when work is done:
51
-
52
- ```
53
- exec:bash
54
- bun x gm-exec bash pm2 stop <name>
55
- bun x gm-exec bash pm2 delete <name>
56
- ```
57
-
58
- Orphaned processes = gate violation. Clean up before COMPLETE.
59
-
60
- ## ORPHAN DETECTION
61
-
62
- ```
63
- exec:bash
64
- bun x gm-exec bash pm2 list
65
- ```
66
-
67
- Any process not started in current session = orphan. Delete immediately:
68
-
69
- ```
70
- exec:bash
71
- bun x gm-exec bash pm2 delete <name>
72
- ```
73
-
74
- ## CONSTRAINTS
75
-
76
- **Never**: start without pre-check | use direct node/bun/python for servers | leave orphaned processes | skip cleanup before COMPLETE
77
-
78
- **Always**: pre-check before start | name every process | watch enabled | autorestart disabled | delete on completion
79
-
80
- **Orphaned processes = gate violation in COMPLETE phase.**
81
-
82
- ---
83
-
84
- **→ RETURN**: After lifecycle task complete → return to `gm-execute` skill to continue EXECUTE phase.