Skip to content

Commit c342504

Browse files
committed
Initial Commit
0 parents  commit c342504

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+8141
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: 🐛 Bug Report
2+
description: Create a report to help us improve
3+
title: "[BUG] "
4+
labels: ["bug", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
11+
- type: textarea
12+
id: what-happened
13+
attributes:
14+
label: What happened?
15+
description: Also tell us, what did you expect to happen?
16+
placeholder: Tell us what you see!
17+
validations:
18+
required: true
19+
20+
- type: textarea
21+
id: steps-to-reproduce
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Please provide clear steps to reproduce the issue
25+
placeholder: |
26+
1. Go to '...'
27+
2. Click on '....'
28+
3. Scroll down to '....'
29+
4. See error
30+
validations:
31+
required: true
32+
33+
- type: dropdown
34+
id: component
35+
attributes:
36+
label: Component
37+
description: Which part of the application is affected?
38+
options:
39+
- python
40+
- javascript
41+
- AI/LLM Integration
42+
- Other
43+
validations:
44+
required: true
45+
46+
- type: textarea
47+
id: environment
48+
attributes:
49+
label: Environment
50+
description: Please provide information about your environment
51+
placeholder: |
52+
- OS: [e.g. Windows 10, macOS 12.0, Ubuntu 20.04]
53+
- Node.js version: [if applicable]
54+
- Python version: [if applicable]
55+
validations:
56+
required: false
57+
58+
- type: textarea
59+
id: logs
60+
attributes:
61+
label: Relevant log output
62+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
63+
render: shell
64+
65+
- type: checkboxes
66+
id: terms
67+
attributes:
68+
label: Code of Conduct
69+
description: By submitting this issue, you agree to follow our Code of Conduct
70+
options:
71+
- label: I agree to follow this project's Code of Conduct
72+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: 💬 Discussions
4+
url: https://github.com/CaviraOSS/safeprompt/discussions
5+
about: Ask questions and discuss ideas with the community
6+
- name: 📖 Documentation
7+
url: https://github.com/safeprompt/wiki
8+
about: Check out the project documentation
9+
- name: 🔒 Security Issue
10+
url: https://github.com/CaviraOSS/safeprompt/security/advisories/new
11+
about: Report a security vulnerability privately
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: ✨ Feature Request
2+
description: Suggest an idea for this project
3+
title: "[FEATURE] "
4+
labels: ["enhancement", "triage"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for suggesting a new feature! Please provide as much detail as possible.
10+
11+
- type: textarea
12+
id: problem
13+
attributes:
14+
label: Is your feature request related to a problem?
15+
description: A clear and concise description of what the problem is
16+
placeholder: I'm always frustrated when...
17+
validations:
18+
required: false
19+
20+
- type: textarea
21+
id: solution
22+
attributes:
23+
label: Describe the solution you'd like
24+
description: A clear and concise description of what you want to happen
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
id: alternatives
30+
attributes:
31+
label: Describe alternatives you've considered
32+
description: A clear and concise description of any alternative solutions or features you've considered
33+
validations:
34+
required: false
35+
36+
- type: dropdown
37+
id: component
38+
attributes:
39+
label: Component
40+
description: Which part of the application would this feature affect?
41+
options:
42+
- python
43+
- javascript
44+
- AI/LLM Integration
45+
- Other
46+
validations:
47+
required: true
48+
49+
- type: dropdown
50+
id: priority
51+
attributes:
52+
label: Priority
53+
description: How important is this feature to you?
54+
options:
55+
- Low
56+
- Medium
57+
- High
58+
- Critical
59+
validations:
60+
required: true
61+
62+
- type: textarea
63+
id: additional-context
64+
attributes:
65+
label: Additional context
66+
description: Add any other context, screenshots, or examples about the feature request here
67+
validations:
68+
required: false
69+
70+
- type: checkboxes
71+
id: terms
72+
attributes:
73+
label: Code of Conduct
74+
description: By submitting this issue, you agree to follow our Code of Conduct
75+
options:
76+
- label: I agree to follow this project's Code of Conduct
77+
required: true

.github/banner.png

439 KB
Loading

.github/pull_request_template.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
## 📋 Description
2+
3+
<!-- Provide a brief description of the changes in this PR -->
4+
5+
## 🔄 Type of Change
6+
7+
<!-- Mark the relevant option with an "x" -->
8+
9+
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
10+
- [ ] ✨ New feature (non-breaking change which adds functionality)
11+
- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
12+
- [ ] 📚 Documentation update
13+
- [ ] ♻️ Code refactoring
14+
- [ ] ⚡ Performance improvements
15+
- [ ] 🧪 Test updates
16+
- [ ] 🔧 Build/CI changes
17+
18+
## 🧪 Testing
19+
20+
<!-- Describe the tests you ran and/or added -->
21+
22+
- [ ] I have tested this change locally
23+
- [ ] I have added tests that prove my fix is effective or that my feature works
24+
- [ ] New and existing unit tests pass locally with my changes
25+
26+
## 📱 Screenshots (if applicable)
27+
28+
<!-- Add screenshots for UI changes -->
29+
30+
## 🔍 Code Review Checklist
31+
32+
<!-- For reviewers -->
33+
34+
- [ ] Code follows the project's coding standards
35+
- [ ] Self-review of the code has been performed
36+
- [ ] Code is properly commented, particularly in hard-to-understand areas
37+
- [ ] Changes generate no new warnings
38+
- [ ] Any dependent changes have been merged and published
39+
40+
## 📚 Related Issues
41+
42+
<!-- Link any related issues using "Closes #issue_number" or "Fixes #issue_number" -->
43+
44+
## 🚀 Deployment Notes
45+
46+
<!-- Any special deployment considerations -->
47+
48+
## 📋 Additional Context
49+
50+
<!-- Add any other context about the PR here -->

.github/workflows/main.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: publish packages
2+
permissions:
3+
contents: read
4+
5+
on:
6+
push:
7+
branches: [main]
8+
paths:
9+
- "js/**"
10+
- "py/**"
11+
workflow_dispatch:
12+
13+
jobs:
14+
detect-changes:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
js_changed: ${{ steps.filter.outputs.js }}
18+
py_changed: ${{ steps.filter.outputs.py }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: dorny/paths-filter@v3
22+
id: filter
23+
with:
24+
filters: |
25+
js:
26+
- "js/**"
27+
py:
28+
- "py/**"
29+
30+
publish-js:
31+
needs: detect-changes
32+
runs-on: ubuntu-latest
33+
if: needs.detect-changes.outputs.js_changed == 'true' || github.event_name == 'workflow_dispatch'
34+
steps:
35+
- uses: actions/checkout@v4
36+
37+
- uses: actions/setup-node@v4
38+
with:
39+
node-version: "22"
40+
registry-url: "https://registry.npmjs.org"
41+
42+
- name: get version
43+
id: version
44+
run: |
45+
cd js
46+
VERSION=$(node -p "require('./package.json').version")
47+
echo "version=$VERSION" >> $GITHUB_OUTPUT
48+
echo "Publishing secuprompt@$VERSION"
49+
50+
- name: install deps
51+
run: cd js && npm ci
52+
53+
- name: build
54+
run: cd js && npm run build
55+
56+
- name: publish
57+
run: cd js && npm publish --access public
58+
env:
59+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
61+
- name: notify
62+
run: |
63+
echo "✅ Published secuprompt@${{ steps.version.outputs.version }}"
64+
65+
publish-py:
66+
needs: detect-changes
67+
runs-on: ubuntu-latest
68+
if: needs.detect-changes.outputs.py_changed == 'true' || github.event_name == 'workflow_dispatch'
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- uses: actions/setup-python@v5
73+
with:
74+
python-version: "3.11"
75+
76+
- name: get version
77+
id: version
78+
run: |
79+
VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
80+
echo "version=$VERSION" >> $GITHUB_OUTPUT
81+
echo "Publishing secuprompt@$VERSION"
82+
83+
- name: install build tools
84+
run: pip install build twine
85+
86+
- name: build
87+
run: python -m build --outdir pydist
88+
89+
- name: publish
90+
run: python -m twine upload pydist/* --skip-existing
91+
env:
92+
TWINE_USERNAME: __token__
93+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
94+
95+
- name: notify
96+
run: |
97+
echo "✅ Published secuprompt@${{ steps.version.outputs.version }}"

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
*.egg-info
4+
__pycache__
5+
pydist

LICENSE

22.2 KB
Binary file not shown.

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
recursive-include data *

0 commit comments

Comments
 (0)