chore: move acp to sdk (#8556)
This commit is contained in:
@@ -92,7 +92,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build packages
|
- name: Build packages
|
||||||
run: |
|
run: |
|
||||||
cd ui/acp
|
cd ui/sdk
|
||||||
pnpm run build:ts
|
pnpm run build:ts
|
||||||
|
|
||||||
cd ../text
|
cd ../text
|
||||||
|
|||||||
@@ -210,7 +210,7 @@ check-acp-schema: generate-acp-types
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
echo "🔍 Checking ACP schema and generated types are up-to-date..."
|
echo "🔍 Checking ACP schema and generated types are up-to-date..."
|
||||||
if ! git diff --exit-code crates/goose-acp/acp-schema.json crates/goose-acp/acp-meta.json ui/acp/src/generated/; then
|
if ! git diff --exit-code crates/goose-acp/acp-schema.json crates/goose-acp/acp-meta.json ui/sdk/src/generated/; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "❌ ACP generated files are out of date!"
|
echo "❌ ACP generated files are out of date!"
|
||||||
echo ""
|
echo ""
|
||||||
@@ -228,13 +228,13 @@ generate-acp-schema:
|
|||||||
# Generate ACP TypeScript types from JSON schema (requires generate-acp-schema first)
|
# Generate ACP TypeScript types from JSON schema (requires generate-acp-schema first)
|
||||||
generate-acp-types: generate-acp-schema
|
generate-acp-types: generate-acp-schema
|
||||||
@echo "Generating ACP TypeScript types..."
|
@echo "Generating ACP TypeScript types..."
|
||||||
cd ui/acp && npx tsx generate-schema.ts
|
cd ui/sdk && npx tsx generate-schema.ts
|
||||||
@echo "ACP TypeScript types generated in ui/acp/src/generated/"
|
@echo "ACP TypeScript types generated in ui/sdk/src/generated/"
|
||||||
|
|
||||||
# Build ACP TypeScript package (schema + types + compile)
|
# Build SDK TypeScript package (schema + types + compile)
|
||||||
build-acp: generate-acp-types
|
build-sdk: generate-acp-types
|
||||||
@echo "Compiling ACP TypeScript..."
|
@echo "Compiling ACP TypeScript..."
|
||||||
cd ui/acp && pnpm run build:ts
|
cd ui/sdk && pnpm run build:ts
|
||||||
@echo "ACP package built."
|
@echo "ACP package built."
|
||||||
|
|
||||||
# Generate manpages for the CLI
|
# Generate manpages for the CLI
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ From the repository root:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build for current platform only
|
# Build for current platform only
|
||||||
cd ui/acp
|
cd ui/sdk
|
||||||
npm run build:native
|
npm run build:native
|
||||||
|
|
||||||
# Build for all platforms (requires cross-compilation toolchains)
|
# Build for all platforms (requires cross-compilation toolchains)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Builds and publishes all @aaif npm packages:
|
# Builds and publishes all @aaif npm packages:
|
||||||
# @aaif/goose-acp — ACP TypeScript SDK
|
# @aaif/goose-sdk — ACP TypeScript SDK
|
||||||
# @aaif/goose-binary-* — platform-specific goose CLI binaries
|
# @aaif/goose-binary-* — platform-specific goose CLI binaries
|
||||||
# @aaif/goose — TUI that depends on the above
|
# @aaif/goose — TUI that depends on the above
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@ set -euo pipefail
|
|||||||
|
|
||||||
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||||
NATIVE_DIR="${REPO_ROOT}/ui/goose-binary"
|
NATIVE_DIR="${REPO_ROOT}/ui/goose-binary"
|
||||||
ACP_DIR="${REPO_ROOT}/ui/acp"
|
SDK_DIR="${REPO_ROOT}/ui/sdk"
|
||||||
TEXT_DIR="${REPO_ROOT}/ui/text"
|
TEXT_DIR="${REPO_ROOT}/ui/text"
|
||||||
REGISTRY="https://registry.npmjs.org"
|
REGISTRY="https://registry.npmjs.org"
|
||||||
DOCKER_IMAGE="rust:1.92-bookworm"
|
DOCKER_IMAGE="rust:1.92-bookworm"
|
||||||
@@ -172,8 +172,8 @@ done
|
|||||||
# Step 4: Build TypeScript packages
|
# Step 4: Build TypeScript packages
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
echo ""
|
echo ""
|
||||||
echo "==> Building @aaif/goose-acp"
|
echo "==> Building @aaif/goose-sdk"
|
||||||
(cd "${ACP_DIR}" && pnpm run build:ts)
|
(cd "${SDK_DIR}" && pnpm run build:ts)
|
||||||
|
|
||||||
echo "==> Building @aaif/goose"
|
echo "==> Building @aaif/goose"
|
||||||
(cd "${TEXT_DIR}" && pnpm run build)
|
(cd "${TEXT_DIR}" && pnpm run build)
|
||||||
@@ -211,7 +211,7 @@ cleanup_npmrc() {
|
|||||||
trap cleanup_npmrc EXIT
|
trap cleanup_npmrc EXIT
|
||||||
|
|
||||||
# Publish order matters: dependencies first
|
# Publish order matters: dependencies first
|
||||||
echo "==> Publishing @aaif/goose-acp"
|
echo "==> Publishing @aaif/goose-sdk"
|
||||||
(cd "${REPO_ROOT}/ui" && pnpm publish "${PUBLISH_ARGS[@]}" acp)
|
(cd "${REPO_ROOT}/ui" && pnpm publish "${PUBLISH_ARGS[@]}" acp)
|
||||||
|
|
||||||
echo "==> Publishing native binary packages"
|
echo "==> Publishing native binary packages"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ npm run build:native:all
|
|||||||
To use this package locally in another project (e.g., `@aaif/goose`):
|
To use this package locally in another project (e.g., `@aaif/goose`):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# In ui/acp
|
# In ui/sdk
|
||||||
npm run build
|
npm run build
|
||||||
npm link
|
npm link
|
||||||
|
|
||||||
Reference in New Issue
Block a user