lex-detect 0.2.4 → 0.2.5
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.
- checksums.yaml +4 -4
- data/.github/workflows/detect-scan.yml +82 -0
- data/CHANGELOG.md +5 -0
- data/lib/legion/extensions/detect/catalog.rb +3 -3
- data/lib/legion/extensions/detect/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: de04c4b9c17503cc0006f82062a6a04b29be7009f24cf7774e15514b04d1b858
|
|
4
|
+
data.tar.gz: 32fce30e5c78a9ae591a45af66400e0f50c7d15f9d5e73bbccf34a8b9e61bfa1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb15b0b06cb456a64ca2055a43d894feec208ed13d7b1fb770a6b66cbfc9423383c6a69c3fec54a008392a41b77eded7d20ec164eb70af9cbdeb4a323c6c214e
|
|
7
|
+
data.tar.gz: 0bb63d8bef226afee67cb4d17675d4a3f5cbcfc33cf383676e94624de2f759725c5fe6a2deac04f9ac1e0e0938ec72850be2ad463a3b0283c94ee936be3848e9
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
name: Extension Detection Scan
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
security-events: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
issues: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
detect:
|
|
16
|
+
name: Scan environment for missing extensions
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: '3.4'
|
|
24
|
+
bundler-cache: true
|
|
25
|
+
|
|
26
|
+
- name: Run detection scan (SARIF)
|
|
27
|
+
run: |
|
|
28
|
+
bundle exec ruby -e '
|
|
29
|
+
require "legion/extensions/detect"
|
|
30
|
+
File.write("detect-results.sarif", Legion::Extensions::Detect.format_results(format: :sarif))
|
|
31
|
+
'
|
|
32
|
+
|
|
33
|
+
- name: Upload SARIF to GitHub Code Scanning
|
|
34
|
+
if: hashFiles('detect-results.sarif') != '' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
|
|
35
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
36
|
+
with:
|
|
37
|
+
sarif_file: detect-results.sarif
|
|
38
|
+
category: legion-detect
|
|
39
|
+
|
|
40
|
+
- name: Post PR comment (markdown)
|
|
41
|
+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
|
42
|
+
uses: actions/github-script@v9
|
|
43
|
+
with:
|
|
44
|
+
script: |
|
|
45
|
+
const { execSync } = require('child_process');
|
|
46
|
+
|
|
47
|
+
const md = execSync(
|
|
48
|
+
`bundle exec ruby -e 'require "legion/extensions/detect"; puts Legion::Extensions::Detect.format_results(format: :markdown)'`,
|
|
49
|
+
{ encoding: 'utf-8' }
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
if (!md.trim()) return;
|
|
53
|
+
|
|
54
|
+
// <!-- legion-detect-bot --> is a stable marker for locating our comment
|
|
55
|
+
const MARKER = '<!-- legion-detect-bot -->';
|
|
56
|
+
const body = `${MARKER}\n## Legion Extension Detection\n\n${md}`;
|
|
57
|
+
|
|
58
|
+
const comments = await github.paginate(github.rest.issues.listComments, {
|
|
59
|
+
owner: context.repo.owner,
|
|
60
|
+
repo: context.repo.repo,
|
|
61
|
+
issue_number: context.issue.number,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
const existing = comments.find(c =>
|
|
65
|
+
c.user.type === 'Bot' && c.body.includes(MARKER)
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
if (existing) {
|
|
69
|
+
await github.rest.issues.updateComment({
|
|
70
|
+
owner: context.repo.owner,
|
|
71
|
+
repo: context.repo.repo,
|
|
72
|
+
comment_id: existing.id,
|
|
73
|
+
body,
|
|
74
|
+
});
|
|
75
|
+
} else {
|
|
76
|
+
await github.rest.issues.createComment({
|
|
77
|
+
owner: context.repo.owner,
|
|
78
|
+
repo: context.repo.repo,
|
|
79
|
+
issue_number: context.issue.number,
|
|
80
|
+
body,
|
|
81
|
+
});
|
|
82
|
+
}
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.5] - 2026-05-07
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Updated detection catalog to recommend `lex-llm-anthropic`, `lex-llm-openai`, and `lex-llm-ollama` in place of the deprecated `lex-claude`, `lex-openai`, and `lex-ollama` extensions.
|
|
7
|
+
|
|
3
8
|
## [0.2.4] - 2026-03-30
|
|
4
9
|
|
|
5
10
|
### Changed
|
|
@@ -7,7 +7,7 @@ module Legion
|
|
|
7
7
|
# AI Providers
|
|
8
8
|
{
|
|
9
9
|
name: 'Claude',
|
|
10
|
-
extensions: ['lex-
|
|
10
|
+
extensions: ['lex-llm-anthropic'],
|
|
11
11
|
signals: [
|
|
12
12
|
{ type: :app, match: 'Claude.app' },
|
|
13
13
|
{ type: :brew_cask, match: 'claude' },
|
|
@@ -18,7 +18,7 @@ module Legion
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
name: 'OpenAI',
|
|
21
|
-
extensions: ['lex-openai'],
|
|
21
|
+
extensions: ['lex-llm-openai'],
|
|
22
22
|
signals: [
|
|
23
23
|
{ type: :app, match: 'ChatGPT.app' },
|
|
24
24
|
{ type: :brew_cask, match: 'chatgpt' },
|
|
@@ -28,7 +28,7 @@ module Legion
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
name: 'Ollama',
|
|
31
|
-
extensions: ['lex-
|
|
31
|
+
extensions: ['lex-llm-ollama'],
|
|
32
32
|
signals: [
|
|
33
33
|
{ type: :brew_formula, match: 'ollama' },
|
|
34
34
|
{ type: :port, match: 11_434 }
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lex-detect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Esity
|
|
@@ -117,6 +117,7 @@ files:
|
|
|
117
117
|
- ".github/CODEOWNERS"
|
|
118
118
|
- ".github/dependabot.yml"
|
|
119
119
|
- ".github/workflows/ci.yml"
|
|
120
|
+
- ".github/workflows/detect-scan.yml"
|
|
120
121
|
- ".gitignore"
|
|
121
122
|
- ".rspec"
|
|
122
123
|
- ".rubocop.yml"
|