Skip to content

Commit fb5bc36

Browse files
committed
INIT
0 parents  commit fb5bc36

File tree

52 files changed

+5163
-0
lines changed

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

+5163
-0
lines changed

.github/workflows/release.yml

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v**'
7+
8+
# Ensure only one release workflow runs at a time
9+
concurrency:
10+
group: release-${{ github.ref }}
11+
cancel-in-progress: false
12+
13+
env:
14+
JAVA_VERSION: '21'
15+
JAVA_DISTRIBUTION: 'temurin'
16+
GRADLE_VERSION: '8.14'
17+
18+
jobs:
19+
# Run tests
20+
test:
21+
name: Test on ${{ matrix.os }}
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
os: [macos-latest, ubuntu-latest, windows-latest]
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v6
31+
32+
- name: Set up Java ${{ env.JAVA_VERSION }}
33+
uses: actions/setup-java@v5
34+
with:
35+
distribution: ${{ env.JAVA_DISTRIBUTION }}
36+
java-version: ${{ env.JAVA_VERSION }}
37+
cache: 'gradle'
38+
39+
- name: Setup Gradle
40+
uses: gradle/actions/setup-gradle@v5
41+
with:
42+
gradle-version: ${{ env.GRADLE_VERSION }}
43+
44+
- name: Run all tests
45+
run: gradle allTests --no-daemon --stacktrace
46+
47+
- name: Upload test reports (on failure)
48+
if: failure()
49+
uses: actions/upload-artifact@v5
50+
with:
51+
name: test-reports-${{ matrix.os }}
52+
path: |
53+
**/build/reports/tests/
54+
**/build/test-results/
55+
retention-days: 7
56+
57+
# Build all platform binaries and package skill bundles
58+
build:
59+
name: Build and package all platforms
60+
# needs: test
61+
runs-on: macos-latest
62+
63+
steps:
64+
- name: Checkout code
65+
uses: actions/checkout@v6
66+
67+
- name: Extract version from tag
68+
id: version
69+
run: |
70+
VERSION=${GITHUB_REF#refs/tags/v}
71+
echo "version=$VERSION" >> $GITHUB_OUTPUT
72+
echo "Extracted version: $VERSION"
73+
74+
- name: Set up Java ${{ env.JAVA_VERSION }}
75+
uses: actions/setup-java@v5
76+
with:
77+
distribution: ${{ env.JAVA_DISTRIBUTION }}
78+
java-version: ${{ env.JAVA_VERSION }}
79+
cache: 'gradle'
80+
81+
- name: Setup Gradle
82+
uses: gradle/actions/setup-gradle@v5
83+
with:
84+
gradle-version: ${{ env.GRADLE_VERSION }}
85+
86+
- name: Build all platform binaries
87+
run: gradle :codex-kkp-cli:linkReleaseExecutableMultiplatform --no-daemon --stacktrace
88+
89+
- name: Package all skill bundles
90+
run: ./gradlew :codex-kkp-cli:packageAllSkills -Pversion=${{ steps.version.outputs.version }} --no-daemon --stacktrace
91+
92+
- name: List release artifacts
93+
run: |
94+
echo "Release artifacts prepared:"
95+
ls -lh codex-kkp-cli/build/skillsReleases/
96+
97+
- name: Upload release artifacts
98+
uses: actions/upload-artifact@v5
99+
with:
100+
name: release-artifacts
101+
path: codex-kkp-cli/build/skillsReleases/*
102+
retention-days: 7
103+
104+
- name: Upload skill directories
105+
uses: actions/upload-artifact@v5
106+
with:
107+
name: skill-directories
108+
path: codex-kkp-cli/build/skills/
109+
retention-days: 7
110+
111+
outputs:
112+
version: ${{ steps.version.outputs.version }}
113+
114+
# Commit to skills branch
115+
commit-to-skills-branch:
116+
name: Update skills branch
117+
needs: build
118+
runs-on: ubuntu-latest
119+
permissions:
120+
contents: write
121+
122+
steps:
123+
- name: Checkout code
124+
uses: actions/checkout@v6
125+
126+
- name: Download skill directories
127+
uses: actions/download-artifact@v6
128+
with:
129+
name: skill-directories
130+
path: skill-temp/
131+
132+
- name: Deploy to skills branch
133+
id: deploy
134+
# uses: stefanzweifel/git-auto-commit-action@v7
135+
# with:
136+
# commit_message: 'Update Skills ${{ github.ref_name }}'
137+
# branch: skills/release
138+
# push_options: '--force'
139+
# file_pattern: 'skill-temp/*'
140+
# skip_fetch: true
141+
# skip_checkout: true
142+
# create_branch: true
143+
144+
uses: JamesIves/github-pages-deploy-action@v4
145+
with:
146+
branch: skills/release
147+
folder: skill-temp
148+
clean: true
149+
commit-message: "Release skills ${{ github.ref_name }}"
150+
single-commit: false
151+
force: true
152+
153+
- name: Get skills branch commit SHA
154+
id: get_sha
155+
run: |
156+
git fetch origin skills/release
157+
SKILLS_SHA=$(git rev-parse origin/skills/release)
158+
echo "sha=$SKILLS_SHA" >> $GITHUB_OUTPUT
159+
echo "Skills branch commit SHA: $SKILLS_SHA"
160+
161+
outputs:
162+
skills_commit_sha: ${{ steps.get_sha.outputs.sha }}
163+
164+
# Create GitHub Release
165+
create-release:
166+
name: Create GitHub Release
167+
needs: [build, commit-to-skills-branch]
168+
runs-on: ubuntu-latest
169+
permissions:
170+
contents: write
171+
172+
steps:
173+
- name: Checkout code
174+
uses: actions/checkout@v6
175+
176+
- name: Download release artifacts
177+
uses: actions/download-artifact@v6
178+
with:
179+
name: release-artifacts
180+
path: release-assets/
181+
182+
- name: List release assets
183+
run: |
184+
echo "Release assets:"
185+
ls -lh release-assets/
186+
187+
- name: Generate release notes
188+
id: release_notes
189+
run: |
190+
cat > release_notes.md << 'EOF'
191+
## Codex Agent Collaboration v${{ needs.build.outputs.version }}
192+
193+
### Installation
194+
195+
**Skills Branch Commit:** ${{ needs.commit-to-skills-branch.outputs.skills_commit_sha }}
196+
197+
Install the skill from the skills branch for platform-specific packages.
198+
199+
### Usage
200+
201+
Extract the platform-specific package and follow the instructions in `SKILL.md`.
202+
203+
For standalone executables, make them executable on Unix systems:
204+
```bash
205+
chmod +x codex-kkp-cli-<platform>.kexe
206+
./codex-kkp-cli-<platform>.kexe
207+
```
208+
EOF
209+
210+
cat release_notes.md
211+
212+
- name: Create GitHub Release
213+
uses: softprops/action-gh-release@v2
214+
with:
215+
name: Release ${{ github.ref_name }}
216+
body_path: release_notes.md
217+
files: release-assets/*
218+
draft: false
219+
prerelease: false
220+
fail_on_unmatched_files: true
221+
env:
222+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223+
224+
- name: Release summary
225+
run: |
226+
echo "✅ Release ${{ github.ref_name }} created successfully!"
227+
echo ""
228+
echo "📦 Release Assets:"
229+
ls -lh release-assets/ | tail -n +2
230+
echo ""
231+
echo "🌿 Skills Branch: ${{ needs.commit-to-skills-branch.outputs.skills_commit_sha }}"
232+
echo "🔗 Release URL: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}"

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
7+
### IntelliJ IDEA ###
8+
.idea/*
9+
*.iws
10+
*.iml
11+
*.ipr
12+
out/
13+
!**/src/main/**/out/
14+
!**/src/test/**/out/
15+
16+
### Kotlin ###
17+
.kotlin
18+
19+
### Eclipse ###
20+
.apt_generated
21+
.classpath
22+
.factorypath
23+
.project
24+
.settings
25+
.springBeans
26+
.sts4-cache
27+
bin/
28+
!**/src/main/**/bin/
29+
!**/src/test/**/bin/
30+
31+
### NetBeans ###
32+
/nbproject/private/
33+
/nbbuild/
34+
/dist/
35+
/nbdist/
36+
/.nb-gradle/
37+
38+
### VS Code ###
39+
.vscode/
40+
41+
### Mac OS ###
42+
.DS_Store
43+
44+
.claude
45+
46+
ts

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Codex KKP
2+
3+
> KKP: **K**otlin Claude Code s**K**ill **P**lugin.
4+
5+
## Overview
6+
7+
Codex KKP is a Kotlin-based Claude Code Skills Plugin that enables seamless integration with Codex AI Agent for code
8+
analysis, implementation, and collaboration tasks.
9+
10+
## Features
11+
12+
- **Multi-platform Support**: Native binaries for macOS (Intel/ARM), Linux (x64/ARM64), and Windows
13+
- **Comprehensive CLI**: Full command-line interface with extensive options
14+
- **Sandbox Modes**: Configurable security levels (read-only, workspace-write, danger-full-access)
15+
- **Event Processing**: Structured event output with filtering and JSON support
16+
- **Session Management**: Resume previous sessions and maintain context
17+

build.gradle.kts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
plugins {
2+
kotlin("jvm") version "2.2.21" apply false
3+
kotlin("multiplatform") version "2.2.21" apply false
4+
kotlin("plugin.serialization") version "2.2.21" apply false
5+
}
6+
7+
group = "love.forte.tools"
8+
version = "0.0.1"
9+
10+
allprojects {
11+
repositories {
12+
mavenCentral()
13+
}
14+
}

buildSrc/build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
repositories {
6+
mavenCentral()
7+
gradlePluginPortal()
8+
}

0 commit comments

Comments
 (0)