diff --git a/.codex/README.md b/.codex/README.md new file mode 100644 index 0000000..04735f2 --- /dev/null +++ b/.codex/README.md @@ -0,0 +1,33 @@ +# Codex Cloud Environment + +Use these repo-local scripts when configuring the Codex cloud environment for `useorgx/openclaw-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. +- Dashboard dependencies are installed separately from `dashboard/package-lock.json`. +- Setup runs typecheck, the client API compatibility test, and a full build. Run `npm run test:hooks` separately for release signoff because it is a long lifecycle suite. +- Local deployment, publishing, and live OrgX flows require scoped credentials; do not add those as plain environment variables. +- Keep internet access limited to the setup phase unless a task explicitly needs external services. + +## Verification commands + +```bash +npm run typecheck +node ./scripts/run-targeted-test.mjs tests/contracts-client-api-compat.test.mjs +npm run test:hooks +npm run build +npm run verify:repo-hygiene +``` diff --git a/.codex/cleanup-local-worktree.sh b/.codex/cleanup-local-worktree.sh new file mode 100755 index 0000000..1404250 --- /dev/null +++ b/.codex/cleanup-local-worktree.sh @@ -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 diff --git a/.codex/maintenance-cloud.sh b/.codex/maintenance-cloud.sh new file mode 100755 index 0000000..decaf17 --- /dev/null +++ b/.codex/maintenance-cloud.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +export CI=1 +export HUSKY=0 +export npm_config_audit=false +export npm_config_fund=false + +npm ci --include=dev +npm --prefix dashboard ci --include=dev diff --git a/.codex/setup-cloud.sh b/.codex/setup-cloud.sh new file mode 100755 index 0000000..6d276b2 --- /dev/null +++ b/.codex/setup-cloud.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd "$(dirname "${BASH_SOURCE[0]}")/.." + +export CI=1 +export HUSKY=0 +export npm_config_audit=false +export npm_config_fund=false + +node --version +npm --version + +npm ci --include=dev +npm --prefix dashboard ci --include=dev +npm run typecheck +node ./scripts/run-targeted-test.mjs tests/contracts-client-api-compat.test.mjs +npm run build diff --git a/.codex/setup-local-worktree.sh b/.codex/setup-local-worktree.sh new file mode 100755 index 0000000..ada8e39 --- /dev/null +++ b/.codex/setup-local-worktree.sh @@ -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 diff --git a/AGENTS.md b/AGENTS.md index e12d872..deb137f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,6 +53,26 @@ npm run qa:capture # Playwright QA evidence screenshots npm run ship # Commit all changes, open PR, and auto-merge (requires gh auth) ``` +## Codex Cloud Environment + +Use the checked-in setup scripts when configuring this repo in Codex cloud: + +```bash +bash .codex/setup-cloud.sh +``` + +Use this as the cached-environment maintenance script: + +```bash +bash .codex/maintenance-cloud.sh +``` + +The setup script installs root and dashboard dependencies from their lockfiles, +then runs `npm run typecheck`, the client API compatibility test, and +`npm run build`. Run `npm run test:hooks` separately for release signoff because +it is a long lifecycle suite. Local deployment, publishing, and live OrgX flows +require scoped credentials and are not part of baseline cloud setup. + ## Codex Slash Commands When working with Codex/Claude/Cursor chat in this repo, treat the following as "slash commands": diff --git a/src/contracts/client.ts b/src/contracts/client.ts index 442e7e5..5853a66 100644 --- a/src/contracts/client.ts +++ b/src/contracts/client.ts @@ -593,7 +593,7 @@ export class OrgXClient { limit?: number; }): Promise> { return this.executeClientTool>( - "orgx_search", + "query_org_memory", params ); } @@ -607,7 +607,7 @@ export class OrgXClient { cascade?: boolean; }): Promise> { return this.executeClientTool>( - "orgx_recommend", + "recommend_next_action", params ); }