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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .codex/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Codex Cloud Environment

Use these repo-local scripts when configuring the Codex cloud environment for `useorgx/orgx-opencode-plugin`.

## Setup script

```bash
bash .codex/setup-cloud.sh
```

## Maintenance script

```bash
bash .codex/maintenance-cloud.sh
```

## Environment notes

- Node 22 or newer is safe for this repository.
- The package depends on `useorgx/orgx-gateway-sdk`; dependency install needs GitHub access during setup.
- Live OpenCode daemon checks require a local OpenCode session and should not be treated as Codex cloud setup checks.
- Keep internet access limited to the setup phase unless a task explicitly needs external services.

## Verification commands

```bash
npm run type-check
npm test
npm run build
```
10 changes: 10 additions & 0 deletions .codex/cleanup-local-worktree.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail

cd "${CODEX_WORKTREE_PATH:-$(dirname "${BASH_SOURCE[0]}")/..}"

if [ -f docker-compose.yml ] || [ -f docker-compose.yaml ] || [ -f compose.yml ] || [ -f compose.yaml ]; then
docker compose down --remove-orphans 2>/dev/null || true
fi

rm -rf .cache/tmp .next/cache .turbo .vitest .wrangler/tmp node_modules/.cache tmp
10 changes: 10 additions & 0 deletions .codex/maintenance-cloud.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")/.."

export CI=1
export npm_config_audit=false
export npm_config_fund=false

npm install --package-lock=false
17 changes: 17 additions & 0 deletions .codex/setup-cloud.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -euo pipefail

cd "$(dirname "${BASH_SOURCE[0]}")/.."

export CI=1
export npm_config_audit=false
export npm_config_fund=false

node --version
npm --version

# This repo intentionally has no lockfile. Avoid creating one in Codex setup.
npm install --package-lock=false
npm run type-check
npm test
npm run build
10 changes: 10 additions & 0 deletions .codex/setup-local-worktree.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -euo pipefail

cd "${CODEX_WORKTREE_PATH:-$(dirname "${BASH_SOURCE[0]}")/..}"

if [ -x .codex/maintenance-cloud.sh ]; then
bash .codex/maintenance-cloud.sh
else
echo "No .codex/maintenance-cloud.sh found; skipping local worktree setup."
fi
31 changes: 31 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# AGENTS.md

Guidelines for Codex and other agents working in `useorgx/orgx-opencode-plugin`.

## Project

This repo is the OpenCode peer plugin for OrgX Gateway Protocol v1 and passive Work Graph reconciliation.

## Setup

For Codex cloud, use:

```bash
bash .codex/setup-cloud.sh
```

Maintenance script for cached environments:

```bash
bash .codex/maintenance-cloud.sh
```

## Verification

```bash
npm run type-check
npm test
npm run build
```

Do not treat local OpenCode daemon availability as a cloud setup requirement. Mock or isolate daemon-dependent behavior unless the task specifically asks for local integration testing.
Loading