@vibe-agent-toolkit/discovery 0.1.13 → 0.1.15-rc.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/README.md +9 -9
- package/dist/detectors/format-detector.d.ts +1 -1
- package/dist/detectors/format-detector.js +2 -2
- package/dist/detectors/format-detector.js.map +1 -1
- package/dist/scanners/local-scanner.d.ts +1 -1
- package/dist/scanners/local-scanner.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ The discovery package provides tools for finding and identifying agent-related f
|
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
|
-
- **Format Detection** - Automatically identify
|
|
11
|
+
- **Format Detection** - Automatically identify Agent Skills, VAT agents, and markdown resources
|
|
12
12
|
- **Gitignore Awareness** - Skip build outputs and ignored files by default
|
|
13
13
|
- **Pattern Filtering** - Include/exclude files using glob patterns
|
|
14
14
|
- **Recursive Scanning** - Deep directory traversal with symlink control
|
|
@@ -28,7 +28,7 @@ npm install @vibe-agent-toolkit/discovery
|
|
|
28
28
|
import { detectFormat } from '@vibe-agent-toolkit/discovery';
|
|
29
29
|
|
|
30
30
|
const format = detectFormat('/path/to/SKILL.md');
|
|
31
|
-
// Returns: '
|
|
31
|
+
// Returns: 'agent-skill' | 'vat-agent' | 'markdown' | 'unknown'
|
|
32
32
|
```
|
|
33
33
|
|
|
34
34
|
### Scan Directory
|
|
@@ -42,7 +42,7 @@ const summary = await scan({
|
|
|
42
42
|
});
|
|
43
43
|
|
|
44
44
|
console.log(`Found ${summary.totalScanned} files`);
|
|
45
|
-
console.log(`
|
|
45
|
+
console.log(`Agent Skills: ${summary.byFormat['agent-skill']}`);
|
|
46
46
|
console.log(`VAT Agents: ${summary.byFormat['vat-agent']}`);
|
|
47
47
|
```
|
|
48
48
|
|
|
@@ -76,14 +76,14 @@ const filtered = summary.results.filter(result =>
|
|
|
76
76
|
Detect the format of a file based on its name and location.
|
|
77
77
|
|
|
78
78
|
**Returns:**
|
|
79
|
-
- `'
|
|
79
|
+
- `'agent-skill'` - SKILL.md file
|
|
80
80
|
- `'vat-agent'` - Directory containing agent.yaml
|
|
81
81
|
- `'markdown'` - .md file (resource)
|
|
82
82
|
- `'unknown'` - Other file types
|
|
83
83
|
|
|
84
84
|
**Example:**
|
|
85
85
|
```typescript
|
|
86
|
-
detectFormat('/path/to/SKILL.md') // '
|
|
86
|
+
detectFormat('/path/to/SKILL.md') // 'agent-skill'
|
|
87
87
|
detectFormat('/path/to/agent.yaml') // 'vat-agent'
|
|
88
88
|
detectFormat('/path/to/guide.md') // 'markdown'
|
|
89
89
|
detectFormat('/path/to/script.js') // 'unknown'
|
|
@@ -170,7 +170,7 @@ if (filter.matches('docs/guide.md')) {
|
|
|
170
170
|
|
|
171
171
|
## Usage Examples
|
|
172
172
|
|
|
173
|
-
### Find All
|
|
173
|
+
### Find All Agent Skills
|
|
174
174
|
|
|
175
175
|
```typescript
|
|
176
176
|
import { scan } from '@vibe-agent-toolkit/discovery';
|
|
@@ -181,10 +181,10 @@ const summary = await scan({
|
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
const skills = summary.results.filter(
|
|
184
|
-
result => result.format === '
|
|
184
|
+
result => result.format === 'agent-skill'
|
|
185
185
|
);
|
|
186
186
|
|
|
187
|
-
console.log(`Found ${skills.length}
|
|
187
|
+
console.log(`Found ${skills.length} Agent Skills:`);
|
|
188
188
|
for (const skill of skills) {
|
|
189
189
|
console.log(` - ${skill.relativePath}`);
|
|
190
190
|
}
|
|
@@ -297,7 +297,7 @@ The scanner automatically detects gitignored files using the `isGitIgnored` util
|
|
|
297
297
|
### 2. Format Detection
|
|
298
298
|
|
|
299
299
|
Format detection is based on conventions:
|
|
300
|
-
- **
|
|
300
|
+
- **Agent Skills** - Files named SKILL.md
|
|
301
301
|
- **VAT Agents** - Directories containing agent.yaml
|
|
302
302
|
- **Markdown** - Files with .md extension
|
|
303
303
|
- **Unknown** - Everything else
|
|
@@ -3,7 +3,7 @@ import type { DetectedFormat } from '../types.js';
|
|
|
3
3
|
* Detect file format based on filename
|
|
4
4
|
*
|
|
5
5
|
* Detection rules:
|
|
6
|
-
* - Exact match "SKILL.md" →
|
|
6
|
+
* - Exact match "SKILL.md" → agent-skill
|
|
7
7
|
* - Exact match "agent.yaml" or "agent.yml" → vat-agent
|
|
8
8
|
* - Extension ".md" → markdown
|
|
9
9
|
* - Everything else → unknown
|
|
@@ -3,7 +3,7 @@ import * as path from 'node:path';
|
|
|
3
3
|
* Detect file format based on filename
|
|
4
4
|
*
|
|
5
5
|
* Detection rules:
|
|
6
|
-
* - Exact match "SKILL.md" →
|
|
6
|
+
* - Exact match "SKILL.md" → agent-skill
|
|
7
7
|
* - Exact match "agent.yaml" or "agent.yml" → vat-agent
|
|
8
8
|
* - Extension ".md" → markdown
|
|
9
9
|
* - Everything else → unknown
|
|
@@ -15,7 +15,7 @@ export function detectFormat(filePath) {
|
|
|
15
15
|
const basename = path.basename(filePath);
|
|
16
16
|
// Exact matches (case-sensitive)
|
|
17
17
|
if (basename === 'SKILL.md') {
|
|
18
|
-
return '
|
|
18
|
+
return 'agent-skill';
|
|
19
19
|
}
|
|
20
20
|
if (basename === 'agent.yaml' || basename === 'agent.yml') {
|
|
21
21
|
return 'vat-agent';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format-detector.js","sourceRoot":"","sources":["../../src/detectors/format-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEzC,iCAAiC;IACjC,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC5B,OAAO,
|
|
1
|
+
{"version":3,"file":"format-detector.js","sourceRoot":"","sources":["../../src/detectors/format-detector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAIlC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAEzC,iCAAiC;IACjC,IAAI,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC5B,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,IAAI,QAAQ,KAAK,YAAY,IAAI,QAAQ,KAAK,WAAW,EAAE,CAAC;QAC1D,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,+CAA+C;IAC/C,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC3C,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ScanOptions, ScanSummary } from '../types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Scan local filesystem for VAT agents and
|
|
3
|
+
* Scan local filesystem for VAT agents and Agent Skills
|
|
4
4
|
*
|
|
5
5
|
* @param options - Scan options
|
|
6
6
|
* @returns Scan summary with all discovered files
|
|
@@ -14,7 +14,7 @@ const PERFORMANCE_POISON = [
|
|
|
14
14
|
'**/.test-output/**', // Test artifacts, never useful for discovery
|
|
15
15
|
];
|
|
16
16
|
/**
|
|
17
|
-
* Scan local filesystem for VAT agents and
|
|
17
|
+
* Scan local filesystem for VAT agents and Agent Skills
|
|
18
18
|
*
|
|
19
19
|
* @param options - Scan options
|
|
20
20
|
* @returns Scan summary with all discovered files
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Format types that discovery can detect
|
|
3
3
|
*/
|
|
4
|
-
export type DetectedFormat = '
|
|
4
|
+
export type DetectedFormat = 'agent-skill' | 'vat-agent' | 'markdown' | 'unknown';
|
|
5
5
|
/**
|
|
6
6
|
* Options for scanning/discovery operations
|
|
7
7
|
*/
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,aAAa,GACb,WAAW,GACX,UAAU,GACV,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IAEb,6CAA6C;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IAEnB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,sBAAsB;IACtB,MAAM,EAAE,cAAc,CAAC;IAEvB,oDAAoD;IACpD,YAAY,EAAE,OAAO,CAAC;IAEtB,mCAAmC;IACnC,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,2BAA2B;IAC3B,OAAO,EAAE,UAAU,EAAE,CAAC;IAEtB,0BAA0B;IAC1B,YAAY,EAAE,MAAM,CAAC;IAErB,sBAAsB;IACtB,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;IAEzC,oCAAoC;IACpC,WAAW,EAAE,UAAU,EAAE,CAAC;IAE1B,iCAAiC;IACjC,YAAY,EAAE,UAAU,EAAE,CAAC;CAC5B"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibe-agent-toolkit/discovery",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Intelligent file discovery for VAT agents and
|
|
3
|
+
"version": "0.1.15-rc.1",
|
|
4
|
+
"description": "Intelligent file discovery for VAT agents and Agent Skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typecheck": "tsc --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@vibe-agent-toolkit/utils": "0.1.
|
|
25
|
+
"@vibe-agent-toolkit/utils": "0.1.15-rc.1",
|
|
26
26
|
"picomatch": "^4.0.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|