Skip to content

Commit bda4e3d

Browse files
committed
Removing unneeded files.
2 parents c31fa07 + 7b5d6ff commit bda4e3d

121 files changed

Lines changed: 5503 additions & 1493 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: read
11+
checks: write
12+
913
jobs:
1014
build:
1115
runs-on: ${{ matrix.os }}
@@ -16,10 +20,10 @@ jobs:
1620
steps:
1721
- uses: actions/checkout@v4
1822

19-
- name: Set up JDK 17
23+
- name: Set up JDK 21
2024
uses: actions/setup-java@v4
2125
with:
22-
java-version: '17'
26+
java-version: '21'
2327
distribution: 'temurin'
2428

2529
- name: Setup Gradle
@@ -42,26 +46,36 @@ jobs:
4246
if: success() || failure()
4347
with:
4448
name: Test Results (${{ matrix.os }})
45-
path: '**/build/test-results/test/TEST-*.xml'
49+
path: 'library/**/build/test-results/**/TEST-*.xml'
4650
reporter: java-junit
4751

4852
- name: Upload build artifacts
49-
uses: actions/upload-artifact@v3
53+
uses: actions/upload-artifact@v4
5054
if: matrix.os == 'ubuntu-latest'
5155
with:
5256
name: build-artifacts
5357
path: library/build/libs/
58+
59+
- name: Upload test reports
60+
uses: actions/upload-artifact@v4
61+
if: always() && matrix.os == 'ubuntu-latest'
62+
with:
63+
name: test-reports-${{ matrix.os }}
64+
path: |
65+
library/**/build/reports/tests/
66+
library/**/build/test-results/
67+
retention-days: 5
5468

5569
lint:
5670
runs-on: ubuntu-latest
5771

5872
steps:
5973
- uses: actions/checkout@v4
6074

61-
- name: Set up JDK 17
75+
- name: Set up JDK 21
6276
uses: actions/setup-java@v4
6377
with:
64-
java-version: '17'
78+
java-version: '21'
6579
distribution: 'temurin'
6680

6781
- name: Setup Gradle
@@ -73,7 +87,7 @@ jobs:
7387
continue-on-error: true
7488

7589
- name: Upload detekt reports
76-
uses: actions/upload-artifact@v3
90+
uses: actions/upload-artifact@v4
7791
if: always()
7892
with:
7993
name: detekt-reports
@@ -87,15 +101,18 @@ jobs:
87101
steps:
88102
- uses: actions/checkout@v4
89103

90-
- name: Set up JDK 17
104+
- name: Set up JDK 21
91105
uses: actions/setup-java@v4
92106
with:
93-
java-version: '17'
107+
java-version: '21'
94108
distribution: 'temurin'
95109

96110
- name: Setup Gradle
97111
uses: gradle/gradle-build-action@v2
98112

113+
- name: Grant execute permission for gradlew
114+
run: chmod +x library/gradlew
115+
99116
- name: Publish snapshot
100117
env:
101118
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}

.github/workflows/docs.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build-docs:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Set up JDK 21
28+
uses: actions/setup-java@v4
29+
with:
30+
java-version: '21'
31+
distribution: 'temurin'
32+
33+
- name: Setup Android SDK
34+
uses: android-actions/setup-android@v3
35+
36+
- name: Setup Gradle
37+
uses: gradle/actions/setup-gradle@v4
38+
with:
39+
gradle-version: wrapper
40+
41+
- name: Validate Gradle wrapper
42+
uses: gradle/actions/wrapper-validation@v4
43+
44+
- name: Make gradlew executable
45+
run: chmod +x ./library/gradlew
46+
47+
- name: Generate documentation
48+
run: |
49+
cd library
50+
# Ensure wrapper jar exists and is valid
51+
if [ ! -f gradle/wrapper/gradle-wrapper.jar ]; then
52+
echo "Gradle wrapper jar missing, regenerating..."
53+
gradle wrapper --gradle-version=8.14.2
54+
fi
55+
./gradlew dokkaHtmlMultiModule --no-daemon --stacktrace
56+
57+
- name: Upload documentation artifacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: documentation
61+
path: library/build/dokka/htmlMultiModule/
62+
retention-days: 30
63+
64+
deploy-docs:
65+
needs: build-docs
66+
runs-on: ubuntu-latest
67+
if: github.ref == 'refs/heads/main'
68+
69+
environment:
70+
name: github-pages
71+
url: ${{ steps.deployment.outputs.page_url }}
72+
73+
steps:
74+
- name: Download documentation artifacts
75+
uses: actions/download-artifact@v4
76+
with:
77+
name: documentation
78+
path: ./docs
79+
80+
- name: Setup Pages
81+
uses: actions/configure-pages@v4
82+
83+
- name: Upload to GitHub Pages
84+
uses: actions/upload-pages-artifact@v3
85+
with:
86+
path: ./docs
87+
88+
- name: Deploy to GitHub Pages
89+
id: deployment
90+
uses: actions/deploy-pages@v4

CONTRIBUTING.md

Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
# Contributing to ag-ui-4k
2+
3+
Thank you for your interest in contributing to ag-ui-4k! We welcome contributions from the community and are grateful for any help you can provide.
4+
5+
## Code of Conduct
6+
7+
By participating in this project, you agree to abide by our Code of Conduct:
8+
- Be respectful and inclusive
9+
- Welcome newcomers and help them get started
10+
- Focus on constructive criticism
11+
- Respect differing viewpoints and experiences
12+
13+
## How to Contribute
14+
15+
### Reporting Issues
16+
17+
Before creating an issue, please check if a similar issue already exists. When creating a new issue:
18+
19+
1. Use a clear and descriptive title
20+
2. Provide a detailed description of the issue
21+
3. Include steps to reproduce the problem
22+
4. Specify your environment (OS, Kotlin version, etc.)
23+
5. Include relevant code snippets or error messages
24+
25+
### Suggesting Enhancements
26+
27+
We welcome suggestions for new features or improvements! Please:
28+
29+
1. Check if the enhancement has already been suggested
30+
2. Create an issue with the `enhancement` label
31+
3. Clearly describe the proposed feature
32+
4. Explain why this enhancement would be useful
33+
5. Provide examples of how it would work
34+
35+
### Pull Requests
36+
37+
1. **Fork the Repository**: Create your own fork of the project
38+
39+
2. **Create a Branch**: Create a feature branch from `main`
40+
```bash
41+
git checkout -b feature/your-feature-name
42+
```
43+
44+
3. **Make Your Changes**:
45+
- Follow the existing code style
46+
- Add tests for new functionality
47+
- Update documentation as needed
48+
- Ensure all tests pass
49+
50+
4. **Commit Your Changes**: Use clear and meaningful commit messages
51+
```bash
52+
git commit -m "Add feature: description of your changes"
53+
```
54+
55+
5. **Push to Your Fork**:
56+
```bash
57+
git push origin feature/your-feature-name
58+
```
59+
60+
6. **Create a Pull Request**:
61+
- Provide a clear title and description
62+
- Reference any related issues
63+
- Include screenshots if applicable
64+
- Ensure CI checks pass
65+
66+
## Development Setup
67+
68+
### Prerequisites
69+
70+
- JDK 11 or higher (JDK 17 recommended)
71+
- Android Studio or IntelliJ IDEA
72+
- Kotlin 2.1.21 or higher (with K2 compiler)
73+
- Gradle 8.5 or higher
74+
75+
### Building the Project
76+
77+
```bash
78+
# Clone the repository
79+
git clone https://github.com/contextable/ag-ui-4k.git
80+
cd ag-ui-4k
81+
82+
# Navigate to the library directory
83+
cd library
84+
85+
# Build the project
86+
./gradlew build
87+
88+
# Run tests
89+
./gradlew test
90+
91+
# Run specific platform tests
92+
./gradlew androidTest
93+
./gradlew iosSimulatorArm64Test
94+
./gradlew jvmTest
95+
```
96+
97+
### Code Style
98+
99+
We follow the official [Kotlin Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html). Key points:
100+
101+
- Use 4 spaces for indentation (no tabs)
102+
- Maximum line length: 120 characters
103+
- Use meaningful variable and function names
104+
- Add KDoc comments for public APIs
105+
- Prefer immutability (`val` over `var`)
106+
107+
### Project Structure
108+
109+
- Main library code is in `library/src/`
110+
- Platform-specific code goes in appropriate source sets (e.g., `library/src/androidMain/`)
111+
- Tests go in `library/src/commonTest/` or platform-specific test directories
112+
113+
### Testing Guidelines
114+
115+
- Write unit tests for new functionality
116+
- Aim for high test coverage
117+
- Use descriptive test names
118+
- Test edge cases and error conditions
119+
- Use mocks for external dependencies
120+
121+
Example test structure:
122+
```kotlin
123+
@Test
124+
fun `should handle event when condition is met`() {
125+
// Given
126+
val agent = TestAgent()
127+
128+
// When
129+
val result = agent.processEvent(event)
130+
131+
// Then
132+
assertEquals(expected, result)
133+
}
134+
```
135+
136+
## Documentation
137+
138+
- Update README.md if adding new features
139+
- Add KDoc comments for public APIs
140+
- Include code examples in documentation
141+
- Update the changelog for significant changes
142+
143+
## Platform-Specific Guidelines
144+
145+
### Android
146+
- Minimum SDK: 26
147+
- Target latest stable Android version
148+
- Test on both emulators and real devices
149+
150+
### iOS
151+
- Minimum iOS version: 13.0
152+
- Test on both simulators and real devices
153+
- Ensure compatibility with both Intel and Apple Silicon
154+
155+
### JVM
156+
- Target Java 11 compatibility
157+
- Test on multiple JVM implementations if possible
158+
159+
## Release Process
160+
161+
1. Update version in `build.gradle.kts`
162+
2. Update CHANGELOG.md
163+
3. Create a release branch
164+
4. Run full test suite
165+
5. Create a pull request
166+
6. After merge, tag the release
167+
7. Publish to Maven Central
168+
169+
## Community
170+
171+
- Join our [Discord server](https://discord.gg/ag-ui-4k)
172+
- Follow us on [Twitter](https://twitter.com/agui4k)
173+
- Read our [blog](https://blog.contextable.com)
174+
175+
## License
176+
177+
By contributing, you agree that your contributions will be licensed under the MIT License.
178+
179+
## Questions?
180+
181+
If you have questions about contributing, please:
182+
- Check our [FAQ](https://github.com/contextable/ag-ui-4k/wiki/FAQ)
183+
- Ask in our [Discord server](https://discord.gg/ag-ui-4k)
184+
- Open a [discussion](https://github.com/contextable/ag-ui-4k/discussions)
185+
186+
Thank you for contributing to ag-ui-4k! 🎉

0 commit comments

Comments
 (0)