Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
38 changes: 38 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

# The CI of the CI. Every workflow YAML in this directory is itself
# code — a malformed `if` expression, a typo in `needs:`, or a matrix
# value that does not exist will pass `yaml.safe_load` but blow up at
# runtime, sometimes hours after merge. actionlint catches that class
# of mistake locally-equivalent on every PR that touches workflows.
#
# Version pinned (no `main`, no `@latest`): actionlint occasionally
# tightens rules between releases, so a silent upgrade could turn a
# green PR red overnight. Bump in a dedicated PR.
name: actionlint

on:
push:
branches: [main]
paths:
- '.github/workflows/**'
pull_request:
paths:
- '.github/workflows/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
actionlint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v7
- name: Download actionlint
run: bash <(curl -sSf https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.7.12
- name: Run actionlint
run: ./actionlint -color
93 changes: 93 additions & 0 deletions .github/workflows/agents-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: agents-api

on:
push:
branches: [main]
paths:
- 'services/agents-api/**'
- 'contracts/agents-api/**'
- 'packages/agents-client/**'
- 'internal/**'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- 'scripts/build-agents-api.sh'
- 'scripts/build-agents-api-image.sh'
- '.github/workflows/agents-api.yml'
pull_request:
paths:
- 'services/agents-api/**'
- 'contracts/agents-api/**'
- 'packages/agents-client/**'
- 'internal/**'
- 'go.mod'
- 'go.sum'
- 'Makefile'
- 'scripts/build-agents-api.sh'
- 'scripts/build-agents-api-image.sh'
- '.github/workflows/agents-api.yml'

permissions:
contents: read

concurrency:
group: agents-api-${{ github.ref }}
cancel-in-progress: true

jobs:
sessions:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: parsar_agents_api_ci_tests
POSTGRES_USER: agents_api
POSTGRES_PASSWORD: agents_api_test_only
ports:
- 5432/tcp
options: >-
--health-cmd "pg_isready -U agents_api -d parsar_agents_api_ci_tests"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: true
- name: Verify dedicated execution persistence
env:
PARSAR_AGENTS_API_TEST_DATABASE_URL: postgres://agents_api:agents_api_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/parsar_agents_api_ci_tests?sslmode=disable
run: |
AGENTS_API_BUILD_DIR="$RUNNER_TEMP/agents-api-build" make check-agents-api
AGENTS_API_DATABASE_URL="$PARSAR_AGENTS_API_TEST_DATABASE_URL" "$RUNNER_TEMP/agents-api-build/agents-api-migrate"
"$RUNNER_TEMP/agents-api-build/agents-api-device" --help
"$RUNNER_TEMP/agents-api-build/agents-api-environment-key" --help
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install pinned official client
run: |
python - <<'PY'
import json, subprocess, sys
pin = json.load(open('contracts/agents-api/upstream.json'))
subprocess.run([sys.executable, '-m', 'pip', 'install', '-r', 'services/agents-api/tests/requirements.txt',
'openai @ git+https://github.com/openai/openai-python@' + pin['commit']], check=True)
PY
- name: Verify official-client HTTP compatibility
env:
PARSAR_AGENTS_API_TEST_DATABASE_URL: postgres://agents_api:agents_api_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/parsar_agents_api_ci_tests?sslmode=disable
AGENTS_API_SERVER_BIN: ${{ runner.temp }}/agents-api-build/agents-api
PARSAR_OFFICIAL_SDK_PYTHON: python
run: |
python services/agents-api/tests/official_client.py
go test ./services/agents-api/internal/store -run '^(TestFunctionStateOfficialClientReadsAndLiveEvents|TestSavedReferenceRetryOfficialClient|TestAgentUpdateOfficialClient|TestAgentDeletionOfficialClient|TestSessionAgentFilterOfficialClient|TestSessionDeletionOfficialClient|TestEnvironmentInitialFailureOfficialClient|TestSelfHostedInitialCreationOfficialClient|TestSelfHostedCancellationOfficialClient|TestSelfHostedFunctionsOfficialClient|TestSelfHostedSteeringOfficialClient)$' -count=1
- name: Verify standalone container distribution
env:
PARSAR_AGENTS_API_TEST_DATABASE_URL: postgres://agents_api:agents_api_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/parsar_agents_api_ci_tests?sslmode=disable
AGENTS_API_IMAGE: agents-api:ci
PARSAR_OFFICIAL_SDK_PYTHON: python
run: make check-agents-api-container
51 changes: 51 additions & 0 deletions .github/workflows/agents-executor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: agents-executor

on:
push:
branches: [main]
paths:
- 'packages/codex-executor/**'
- 'scripts/*agents-executor.sh'
- '.github/workflows/agents-executor.yml'
- 'Makefile'
pull_request:
paths:
- 'packages/codex-executor/**'
- 'scripts/*agents-executor.sh'
- '.github/workflows/agents-executor.yml'
- 'Makefile'

permissions:
contents: read

concurrency:
group: agents-executor-${{ github.ref }}
cancel-in-progress: true

jobs:
native-build:
runs-on: ubuntu-22.04
timeout-minutes: 30
env:
CARGO_HOME: /home/runner/.parsar/cache/executor-cargo
CARGO_TARGET_DIR: /home/runner/.parsar/cache/executor-target
CARGO_BUILD_JOBS: 4
steps:
- uses: actions/checkout@v7
- name: Install native build prerequisites
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev
rustup toolchain install 1.95.0 --profile minimal --component rustfmt --component clippy
- uses: actions/cache@v6
with:
path: |
~/.parsar/cache/executor-cargo
~/.parsar/cache/executor-target
key: agents-executor-${{ runner.os }}-1.95.0-${{ hashFiles('packages/codex-executor/Cargo.lock') }}
- name: Check native launcher and independent release build
run: |
make check-agents-executor
make build-agents-executor
~/.parsar/build/agents-executor/agents-api-codex-executor --version
~/.parsar/build/agents-executor/agents-api-codex-executor --help
60 changes: 60 additions & 0 deletions .github/workflows/agents-harness.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: agents-harness

on:
push:
branches: [main]
paths:
- 'packages/codex-harness/**'
- 'scripts/*agents-harness.sh'
- 'services/agents-api/tests/native/*/source.json'
- '.github/workflows/agents-harness.yml'
- 'Makefile'
pull_request:
paths:
- 'packages/codex-harness/**'
- 'scripts/*agents-harness.sh'
- 'services/agents-api/tests/native/*/source.json'
- '.github/workflows/agents-harness.yml'
- 'Makefile'

permissions:
contents: read

concurrency:
group: agents-harness-${{ github.ref }}
cancel-in-progress: true

jobs:
native-build:
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
CARGO_HOME: /home/runner/.parsar/cache/agents-harness-cargo
CARGO_TARGET_DIR: /home/runner/.parsar/cache/agents-harness-target
AGENTS_HARNESS_NATIVE_SOURCE: /home/runner/.parsar/references/codex-native
CARGO_BUILD_JOBS: 4
CARGO_PROFILE_DEV_DEBUG: 0
steps:
- uses: actions/checkout@v7
- name: Check packaging
run: make check-agents-harness
- name: Install native build prerequisites
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev
rustup toolchain install 1.95.0 --profile minimal --component rustfmt --component clippy
- name: Fetch the pinned upstream source
run: |
revision="$(python3 -c 'import json; print(json.load(open("packages/codex-harness/source.json"))["revision"])')"
git init "$AGENTS_HARNESS_NATIVE_SOURCE"
git -C "$AGENTS_HARNESS_NATIVE_SOURCE" fetch --depth 1 https://github.com/openai/codex "$revision"
- uses: actions/cache@v6
with:
path: |
~/.parsar/cache/agents-harness-cargo
~/.parsar/cache/agents-harness-target
key: agents-harness-${{ runner.os }}-1.95.0-${{ hashFiles('packages/codex-harness/source.json') }}
- name: Check native harness and independent release build
run: |
make check-agents-harness-native
make build-agents-harness
62 changes: 62 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: core-check

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

concurrency:
group: core-check-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
runs-on: ubuntu-22.04
timeout-minutes: 40
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: parsar_agents_api_core_ci_tests
POSTGRES_USER: agents_api
POSTGRES_PASSWORD: core_test_only
ports:
- 5432/tcp
options: >-
--health-cmd "pg_isready -U agents_api -d parsar_agents_api_core_ci_tests"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
CARGO_HOME: /home/runner/.parsar/cache/executor-cargo
CARGO_TARGET_DIR: /home/runner/.parsar/cache/executor-target
CARGO_BUILD_JOBS: 4
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
- uses: actions/setup-node@v6
with:
node-version: '22'
- name: Install pinned check prerequisites
run: |
npm install --global pnpm@10.30.3
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev
rustup toolchain install 1.95.0 --profile minimal --component rustfmt --component clippy
- uses: actions/cache@v6
with:
path: |
~/.parsar/cache/executor-cargo
~/.parsar/cache/executor-target
key: core-executor-${{ runner.os }}-${{ hashFiles('packages/codex-executor/Cargo.lock') }}
- name: Check standalone repository
env:
PARSAR_AGENTS_API_TEST_DATABASE_URL: postgres://agents_api:core_test_only@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/parsar_agents_api_core_ci_tests?sslmode=disable
run: make check
- name: Build execution daemon
run: make build-daemon
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.DS_Store
node_modules/
dist/
build/
coverage/
*.log
.env
.env.*
!.env.example
.worktrees/
go.work.sum
__pycache__/
*.pyc
/.parsar/
/config/
/logs/
/state/
/cache/
/target/
14 changes: 14 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Parsar Core development

Read [CONTRIBUTING.md](CONTRIBUTING.md) before changing code. Work in an isolated
Git worktree and submit a PR. Keep product business code in the Parsar repository.

Preserve the pinned public Agent API and documented extensions. Do not add product
database dependencies or bypass Core execution ownership. Update architecture and
generated contracts with changes. Run `make check` before reporting completion.

After implementation and verification, request an independent blind review with
only requirements, acceptance criteria, boundaries, repository path and baseline.
Fix in-scope blockers and review again. Never use `codex exec` for this review.

Documentation and code comments are English; user-facing copy may be bilingual.
Loading
Loading