Skip to content

Commit 98d54ef

Browse files
committed
Initial commit
0 parents  commit 98d54ef

Some content is hidden

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

65 files changed

+6563
-0
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SERVER_TOKEN=
2+
TELEGRAM_BOT_TOKEN=
3+
YAOCC_CONFIG_DIR=/app/data

.github/workflows/ci.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
tags: [ 'v*' ]
7+
pull_request:
8+
branches: [ "main" ]
9+
10+
jobs:
11+
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- os: ubuntu-latest
17+
goos: linux
18+
goarch: amd64
19+
output_name: yaocc-linux-amd64
20+
- os: ubuntu-latest
21+
goos: linux
22+
goarch: arm64
23+
output_name: yaocc-linux-arm64
24+
- os: windows-latest
25+
goos: windows
26+
goarch: amd64
27+
output_name: yaocc-windows-amd64.exe
28+
- os: macos-latest
29+
goos: darwin
30+
goarch: arm64
31+
output_name: yaocc-darwin-arm64
32+
33+
runs-on: ${{ matrix.os }}
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Set up Go
39+
uses: actions/setup-go@v4
40+
with:
41+
go-version: '1.23'
42+
43+
- name: Build CLI
44+
run: |
45+
go build -v -o build/${{ matrix.output_name }} ./cmd/yaocc
46+
env:
47+
GOOS: ${{ matrix.goos }}
48+
GOARCH: ${{ matrix.goarch }}
49+
50+
- name: Build Server
51+
# Append -server to output name before extension
52+
run: |
53+
if [ "${{ matrix.goos }}" == "windows" ]; then
54+
SERVER_OUTPUT="build/${{ matrix.output_name }}"
55+
SERVER_OUTPUT="${SERVER_OUTPUT/.exe/-server.exe}"
56+
else
57+
SERVER_OUTPUT="build/${{ matrix.output_name }}-server"
58+
fi
59+
echo "Building server to $SERVER_OUTPUT"
60+
go build -v -o $SERVER_OUTPUT ./cmd/yaocc-server
61+
env:
62+
GOOS: ${{ matrix.goos }}
63+
GOARCH: ${{ matrix.goarch }}
64+
shell: bash
65+
66+
- name: Upload Artifacts
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: ${{ matrix.output_name }}
70+
path: build/
71+
72+
release:
73+
if: startsWith(github.ref, 'refs/tags/')
74+
needs: build
75+
runs-on: ubuntu-latest
76+
permissions:
77+
contents: write
78+
steps:
79+
- name: Download all artifacts
80+
uses: actions/download-artifact@v4
81+
with:
82+
path: artifacts/
83+
84+
- name: Package archives
85+
run: |
86+
cd artifacts
87+
for dir in */; do
88+
name="${dir%/}"
89+
zip -r "../${name}.zip" "$dir"
90+
done
91+
92+
- name: Create GitHub Release
93+
uses: softprops/action-gh-release@v2
94+
with:
95+
files: '*.zip'
96+
generate_release_notes: true
97+
draft: false
98+
prerelease: false

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Ignore all .md files in root except README.md
2+
/*.md
3+
!/README.md
4+
!/AGENTS.md
5+
!/DEV.md
6+
7+
# Ignore all .json files in root
8+
/*.json
9+
10+
# Ignore all .exe files in root
11+
/*.exe*
12+
13+
# Ignore all .log files in root
14+
/*.log*
15+
16+
# Ignore the resources folder in root
17+
/build/
18+
/resources/
19+
/sessions/
20+
/temp/
21+
22+
.env

.gitlab-ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
image: golang:1.23
2+
3+
stages:
4+
- build
5+
6+
variables:
7+
GO111MODULE: "on"
8+
CGO_ENABLED: "0"
9+
10+
build-linux:
11+
stage: build
12+
script:
13+
- mkdir -p build/linux
14+
- GOOS=linux GOARCH=amd64 go build -o build/linux/yaocc ./cmd/yaocc
15+
- GOOS=linux GOARCH=amd64 go build -o build/linux/yaocc-server ./cmd/yaocc-server
16+
artifacts:
17+
name: "yaocc-linux-$CI_COMMIT_SHORT_SHA"
18+
paths:
19+
- build/linux/
20+
expire_in: 1 week
21+
22+
build-linux:arm64:
23+
stage: build
24+
script:
25+
- mkdir -p build/linux
26+
- GOOS=linux GOARCH=arm64 go build -o build/linux/yaocc-arm64 ./cmd/yaocc
27+
- GOOS=linux GOARCH=arm64 go build -o build/linux/yaocc-server-arm64 ./cmd/yaocc-server
28+
artifacts:
29+
name: "yaocc-linux-arm64-$CI_COMMIT_SHORT_SHA"
30+
paths:
31+
- build/linux/
32+
expire_in: 1 week
33+
34+
build-linux:armv7:
35+
stage: build
36+
script:
37+
- mkdir -p build/linux
38+
- GOOS=linux GOARCH=arm GOARM=7 go build -o build/linux/yaocc-armv7 ./cmd/yaocc
39+
- GOOS=linux GOARCH=arm GOARM=7 go build -o build/linux/yaocc-server-armv7 ./cmd/yaocc-server
40+
artifacts:
41+
name: "yaocc-linux-armv7-$CI_COMMIT_SHORT_SHA"
42+
paths:
43+
- build/linux/
44+
expire_in: 1 week
45+
46+
build-darwin:
47+
stage: build
48+
script:
49+
- mkdir -p build/darwin
50+
- GOOS=darwin GOARCH=arm64 go build -o build/darwin/yaocc-darwin ./cmd/yaocc
51+
- GOOS=darwin GOARCH=arm64 go build -o build/darwin/yaocc-server-darwin ./cmd/yaocc-server
52+
artifacts:
53+
name: "yaocc-darwin-$CI_COMMIT_SHORT_SHA"
54+
paths:
55+
- build/darwin/
56+
expire_in: 1 week
57+
58+
build-windows:
59+
stage: build
60+
script:
61+
- mkdir -p build/windows
62+
- GOOS=windows GOARCH=amd64 go build -o build/windows/yaocc.exe ./cmd/yaocc
63+
- GOOS=windows GOARCH=amd64 go build -o build/windows/yaocc-server.exe ./cmd/yaocc-server
64+
artifacts:
65+
name: "yaocc-windows-$CI_COMMIT_SHORT_SHA"
66+
paths:
67+
- build/windows/
68+
expire_in: 1 week

AGENTS.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Agents in YAOCC
2+
3+
An **Agent** in YAOCC is an autonomous entity powered by an LLM (Large Language Model) that can interact with the world through **Skills**.
4+
5+
## Development Guidelines
6+
7+
## General
8+
9+
after every change always update README.md and DEV.md if needed
10+
11+
### Terminal
12+
you are using windows 11 and windows powershell as terminal, any command you run you be compatible with windows powershell
13+
14+
### Build Instructions
15+
Always build binaries into the `build/` directory to keep the workspace organized.
16+
17+
```bash
18+
# Build Server
19+
go build -o build/yaocc-server.exe ./cmd/yaocc-server
20+
21+
# Build CLI
22+
go build -o build/yaocc.exe ./cmd/yaocc
23+
```
24+
25+
## API
26+
if a new API endpoint is added, always update the `openapi.yaml` file
27+
28+
## Core Components
29+
30+
Every agent in a YAOCC workspace is defined by a set of core Markdown files found in the root directory. These files form the agent's "context" or "personality":
31+
32+
### 1. SOUL.md
33+
The `SOUL.md` file defines the agent's core personality, directives, and high-level goals. It is the most important file for shaping how the agent behaves.
34+
* **Purpose**: Define who the agent is.
35+
* **Example**: "You are a helpful coding assistant..."
36+
37+
### 2. IDENTITY.md
38+
The `IDENTITY.md` file provides specific details about the agent's current identity configuration, often used for more transient or role-specific instructions.
39+
* **Purpose**: Define the current role or specific instructions for this instance.
40+
41+
### 3. USER.md
42+
The `USER.md` file contains information about the human user the agent is assisting. The agent reads this to understand preferences, contact details, or other improved context.
43+
* **Purpose**: Personalization and user context.
44+
45+
### 4. MEMORY.md
46+
The `MEMORY.md` file acts as the agent's long-term memory. The agent can read this file to recall important facts, decisions, or project context across different sessions.
47+
* **Purpose**: Long-term persistence.
48+
49+
## Skills
50+
51+
Agents extend their capabilities through **Skills**. A skill is a tool or command that the agent can execute.
52+
53+
* **Discovery**: Skills are loaded from the `skills/` directory.
54+
* **Definition**: Each skill is defined by a `SKILL.md` file containing metadata (name, description) and usage instructions.
55+
* **Execution**: The agent outputs a specific command block (e.g., `yaocc fetch <url>`) to invoke a skill.
56+
57+
### Standard Skills
58+
* **Cron**: detailed in `skills/cron/SKILL.md`. Manage scheduled tasks.
59+
* **File**: detailed in `skills/file/SKILL.md`. Manage file system operations.
60+
* **Fetch**: detailed in `skills/fetch/SKILL.md`. Retrieve web content.

0 commit comments

Comments
 (0)