chore: rename project to clawdbot
This commit is contained in:
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
cd "$(dirname "$0")/../apps/macos"
|
||||
|
||||
BUILD_PATH=".build-local"
|
||||
PRODUCT="Clawdis"
|
||||
PRODUCT="Clawdbot"
|
||||
BIN="$BUILD_PATH/debug/$PRODUCT"
|
||||
|
||||
printf "\n▶️ Building $PRODUCT (debug, build path: $BUILD_PATH)\n"
|
||||
@@ -13,6 +13,6 @@ printf "\n⏹ Stopping existing $PRODUCT...\n"
|
||||
killall -q "$PRODUCT" 2>/dev/null || true
|
||||
|
||||
printf "\n🚀 Launching $BIN ...\n"
|
||||
nohup "$BIN" >/tmp/clawdis.log 2>&1 &
|
||||
nohup "$BIN" >/tmp/clawdbot.log 2>&1 &
|
||||
PID=$!
|
||||
printf "Started $PRODUCT (PID $PID). Logs: /tmp/clawdis.log\n"
|
||||
printf "Started $PRODUCT (PID $PID). Logs: /tmp/clawdbot.log\n"
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
set -euo pipefail
|
||||
|
||||
# Render the macOS .icon bundle to a padded .icns like Trimmy's pipeline.
|
||||
# Defaults target the Clawdis assets so you can just run the script from repo root.
|
||||
# Defaults target the Clawdbot assets so you can just run the script from repo root.
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
ICON_FILE=${1:-"$ROOT_DIR/apps/macos/Icon.icon"}
|
||||
BASENAME=${2:-Clawdis}
|
||||
BASENAME=${2:-Clawdbot}
|
||||
OUT_ROOT=${3:-"$ROOT_DIR/apps/macos/build/icon"}
|
||||
XCODE_APP=${XCODE_APP:-/Applications/Xcode.app}
|
||||
# Where the final .icns should live; override DEST_ICNS to change.
|
||||
DEST_ICNS=${DEST_ICNS:-"$ROOT_DIR/apps/macos/Sources/Clawdis/Resources/Clawdis.icns"}
|
||||
DEST_ICNS=${DEST_ICNS:-"$ROOT_DIR/apps/macos/Sources/Clawdbot/Resources/Clawdbot.icns"}
|
||||
|
||||
ICTOOL="$XCODE_APP/Contents/Applications/Icon Composer.app/Contents/Executables/ictool"
|
||||
if [[ ! -x "$ICTOOL" ]]; then
|
||||
|
||||
@@ -8,7 +8,7 @@ INPUT_PATHS=(
|
||||
"$ROOT_DIR/package.json"
|
||||
"$ROOT_DIR/pnpm-lock.yaml"
|
||||
"$ROOT_DIR/vendor/a2ui/renderers/lit"
|
||||
"$ROOT_DIR/apps/shared/ClawdisKit/Tools/CanvasA2UI"
|
||||
"$ROOT_DIR/apps/shared/ClawdbotKit/Tools/CanvasA2UI"
|
||||
)
|
||||
|
||||
collect_files() {
|
||||
@@ -40,6 +40,6 @@ if [[ -f "$HASH_FILE" ]]; then
|
||||
fi
|
||||
|
||||
pnpm -s exec tsc -p vendor/a2ui/renderers/lit/tsconfig.json
|
||||
rolldown -c apps/shared/ClawdisKit/Tools/CanvasA2UI/rolldown.config.mjs
|
||||
rolldown -c apps/shared/ClawdbotKit/Tools/CanvasA2UI/rolldown.config.mjs
|
||||
|
||||
echo "$current_hash" > "$HASH_FILE"
|
||||
|
||||
@@ -55,13 +55,13 @@ markdown_to_html() {
|
||||
|
||||
version_content=$(extract_version_section "$VERSION" "$CHANGELOG_FILE")
|
||||
if [[ -z "$version_content" ]]; then
|
||||
echo "<h2>Clawdis $VERSION</h2>"
|
||||
echo "<p>Latest Clawdis update.</p>"
|
||||
echo "<p><a href=\"https://github.com/steipete/clawdis/blob/main/CHANGELOG.md\">View full changelog</a></p>"
|
||||
echo "<h2>Clawdbot $VERSION</h2>"
|
||||
echo "<p>Latest Clawdbot update.</p>"
|
||||
echo "<p><a href=\"https://github.com/clawdbot/clawdbot/blob/main/CHANGELOG.md\">View full changelog</a></p>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "<h2>Clawdis $VERSION</h2>"
|
||||
echo "<h2>Clawdbot $VERSION</h2>"
|
||||
|
||||
in_list=false
|
||||
while IFS= read -r line; do
|
||||
@@ -86,4 +86,4 @@ if [[ "$in_list" == true ]]; then
|
||||
echo "</ul>"
|
||||
fi
|
||||
|
||||
echo "<p><a href=\"https://github.com/steipete/clawdis/blob/main/CHANGELOG.md\">View full changelog</a></p>"
|
||||
echo "<p><a href=\"https://github.com/clawdbot/clawdbot/blob/main/CHANGELOG.md\">View full changelog</a></p>"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
# Configuration
|
||||
SUBSYSTEM="com.clawdis"
|
||||
SUBSYSTEM="com.clawdbot"
|
||||
DEFAULT_LEVEL="info"
|
||||
|
||||
# Colors for output
|
||||
@@ -48,17 +48,17 @@ SHOW_HELP=false
|
||||
# Function to show usage
|
||||
show_usage() {
|
||||
cat << EOF
|
||||
clawlog - Clawdis Logging Utility
|
||||
clawlog - Clawdbot Logging Utility
|
||||
|
||||
USAGE:
|
||||
vtlog [OPTIONS]
|
||||
|
||||
DESCRIPTION:
|
||||
View Clawdis logs with full details (bypasses Apple's privacy redaction).
|
||||
View Clawdbot logs with full details (bypasses Apple's privacy redaction).
|
||||
Requires sudo access configured for /usr/bin/log command.
|
||||
|
||||
LOG FLOW ARCHITECTURE:
|
||||
Clawdis logs flow through the macOS unified log (subsystem: com.clawdis).
|
||||
Clawdbot logs flow through the macOS unified log (subsystem: com.clawdbot).
|
||||
|
||||
LOG CATEGORIES (examples):
|
||||
• voicewake - Voice wake detection/test harness
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
APP_BUNDLE="${1:-dist/Clawdis.app}"
|
||||
APP_BUNDLE="${1:-dist/Clawdbot.app}"
|
||||
IDENTITY="${SIGN_IDENTITY:-}"
|
||||
TIMESTAMP_MODE="${CODESIGN_TIMESTAMP:-auto}"
|
||||
ENT_TMP_BASE=$(mktemp -t clawdis-entitlements-base.XXXXXX)
|
||||
ENT_TMP_APP=$(mktemp -t clawdis-entitlements-app.XXXXXX)
|
||||
ENT_TMP_APP_BASE=$(mktemp -t clawdis-entitlements-app-base.XXXXXX)
|
||||
ENT_TMP_BUN=$(mktemp -t clawdis-entitlements-bun.XXXXXX)
|
||||
ENT_TMP_BASE=$(mktemp -t clawdbot-entitlements-base.XXXXXX)
|
||||
ENT_TMP_APP=$(mktemp -t clawdbot-entitlements-app.XXXXXX)
|
||||
ENT_TMP_APP_BASE=$(mktemp -t clawdbot-entitlements-app-base.XXXXXX)
|
||||
ENT_TMP_BUN=$(mktemp -t clawdbot-entitlements-bun.XXXXXX)
|
||||
|
||||
if [ ! -d "$APP_BUNDLE" ]; then
|
||||
echo "App bundle not found: $APP_BUNDLE" >&2
|
||||
@@ -206,8 +206,8 @@ sign_plain_item() {
|
||||
}
|
||||
|
||||
# Sign main binary
|
||||
if [ -f "$APP_BUNDLE/Contents/MacOS/Clawdis" ]; then
|
||||
echo "Signing main binary"; sign_item "$APP_BUNDLE/Contents/MacOS/Clawdis" "$APP_ENTITLEMENTS"
|
||||
if [ -f "$APP_BUNDLE/Contents/MacOS/Clawdbot" ]; then
|
||||
echo "Signing main binary"; sign_item "$APP_BUNDLE/Contents/MacOS/Clawdbot" "$APP_ENTITLEMENTS"
|
||||
fi
|
||||
|
||||
# Sign bundled gateway payload (native addons, libvips dylibs)
|
||||
@@ -215,8 +215,8 @@ if [ -d "$APP_BUNDLE/Contents/Resources/Relay" ]; then
|
||||
find "$APP_BUNDLE/Contents/Resources/Relay" -type f \( -name "*.node" -o -name "*.dylib" \) -print0 | while IFS= read -r -d '' f; do
|
||||
echo "Signing gateway payload: $f"; sign_item "$f" "$ENT_TMP_BASE"
|
||||
done
|
||||
if [ -f "$APP_BUNDLE/Contents/Resources/Relay/clawdis" ]; then
|
||||
echo "Signing embedded relay"; sign_item "$APP_BUNDLE/Contents/Resources/Relay/clawdis" "$ENT_TMP_BUN"
|
||||
if [ -f "$APP_BUNDLE/Contents/Resources/Relay/clawdbot" ]; then
|
||||
echo "Signing embedded relay"; sign_item "$APP_BUNDLE/Contents/Resources/Relay/clawdbot" "$ENT_TMP_BUN"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ set -euo pipefail
|
||||
# scripts/create-dmg.sh <app_path> [output_dmg]
|
||||
#
|
||||
# Env:
|
||||
# DMG_VOLUME_NAME default: CFBundleName (or "Clawdis")
|
||||
# DMG_VOLUME_NAME default: CFBundleName (or "Clawdbot")
|
||||
# DMG_BACKGROUND_PATH default: assets/dmg-background.png
|
||||
# DMG_BACKGROUND_SMALL default: assets/dmg-background-small.png (recommended)
|
||||
# DMG_WINDOW_BOUNDS default: "400 100 900 420" (500x320)
|
||||
@@ -33,7 +33,7 @@ ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
BUILD_DIR="$ROOT_DIR/dist"
|
||||
mkdir -p "$BUILD_DIR"
|
||||
|
||||
APP_NAME=$(/usr/libexec/PlistBuddy -c "Print CFBundleName" "$APP_PATH/Contents/Info.plist" 2>/dev/null || echo "Clawdis")
|
||||
APP_NAME=$(/usr/libexec/PlistBuddy -c "Print CFBundleName" "$APP_PATH/Contents/Info.plist" 2>/dev/null || echo "Clawdbot")
|
||||
VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$APP_PATH/Contents/Info.plist" 2>/dev/null || echo "0.0.0")
|
||||
|
||||
DMG_NAME="${APP_NAME}-${VERSION}.dmg"
|
||||
@@ -71,7 +71,7 @@ for vol in "/Volumes/$DMG_VOLUME_NAME"* "/Volumes/$APP_NAME"*; do
|
||||
fi
|
||||
done
|
||||
|
||||
DMG_TEMP="$(mktemp -d /tmp/clawdis-dmg.XXXXXX)"
|
||||
DMG_TEMP="$(mktemp -d /tmp/clawdbot-dmg.XXXXXX)"
|
||||
trap 'hdiutil detach "/Volumes/'"$DMG_VOLUME_NAME"'" -force 2>/dev/null || true; rm -rf "$DMG_TEMP" 2>/dev/null || true' EXIT
|
||||
|
||||
cp -R "$APP_PATH" "$DMG_TEMP/"
|
||||
@@ -109,7 +109,7 @@ if [[ "${SKIP_DMG_STYLE:-0}" != "1" ]]; then
|
||||
fi
|
||||
|
||||
# Volume icon: reuse the app icon if available.
|
||||
ICON_SRC="$ROOT_DIR/apps/macos/Sources/Clawdis/Resources/Clawdis.icns"
|
||||
ICON_SRC="$ROOT_DIR/apps/macos/Sources/Clawdbot/Resources/Clawdbot.icns"
|
||||
if [[ -f "$ICON_SRC" ]]; then
|
||||
cp "$ICON_SRC" "$MOUNT_POINT/.VolumeIcon.icns"
|
||||
if command -v SetFile >/dev/null 2>&1; then
|
||||
@@ -160,9 +160,9 @@ for i in {1..5}; do
|
||||
sleep 2
|
||||
done
|
||||
|
||||
hdiutil resize -limits "$DMG_RW_PATH" >/tmp/clawdis-dmg-limits.txt 2>/dev/null || true
|
||||
MIN_SECTORS="$(tail -n 1 /tmp/clawdis-dmg-limits.txt 2>/dev/null | awk '{print $1}')"
|
||||
rm -f /tmp/clawdis-dmg-limits.txt
|
||||
hdiutil resize -limits "$DMG_RW_PATH" >/tmp/clawdbot-dmg-limits.txt 2>/dev/null || true
|
||||
MIN_SECTORS="$(tail -n 1 /tmp/clawdbot-dmg-limits.txt 2>/dev/null | awk '{print $1}')"
|
||||
rm -f /tmp/clawdbot-dmg-limits.txt
|
||||
if [[ "$MIN_SECTORS" =~ ^[0-9]+$ ]] && [[ "$DMG_EXTRA_SECTORS" =~ ^[0-9]+$ ]]; then
|
||||
TARGET_SECTORS=$((MIN_SECTORS + DMG_EXTRA_SECTORS))
|
||||
echo "Shrinking RW image: min sectors=$MIN_SECTORS (+$DMG_EXTRA_SECTORS) -> $TARGET_SECTORS"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
IMAGE_NAME="clawdis-onboard-e2e"
|
||||
IMAGE_NAME="clawdbot-onboard-e2e"
|
||||
|
||||
echo "Building Docker image..."
|
||||
docker build -t "$IMAGE_NAME" -f "$ROOT_DIR/scripts/e2e/Dockerfile" "$ROOT_DIR"
|
||||
@@ -13,9 +13,9 @@ docker run --rm -t "$IMAGE_NAME" bash -lc '
|
||||
export TERM=xterm-256color
|
||||
|
||||
# Provide a minimal trash shim to avoid noisy "missing trash" logs in containers.
|
||||
export PATH="/tmp/clawdis-bin:$PATH"
|
||||
mkdir -p /tmp/clawdis-bin
|
||||
cat > /tmp/clawdis-bin/trash <<'"'"'TRASH'"'"'
|
||||
export PATH="/tmp/clawdbot-bin:$PATH"
|
||||
mkdir -p /tmp/clawdbot-bin
|
||||
cat > /tmp/clawdbot-bin/trash <<'"'"'TRASH'"'"'
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
trash_dir="$HOME/.Trash"
|
||||
@@ -30,7 +30,7 @@ for target in "$@"; do
|
||||
mv "$target" "$dest"
|
||||
done
|
||||
TRASH
|
||||
chmod +x /tmp/clawdis-bin/trash
|
||||
chmod +x /tmp/clawdbot-bin/trash
|
||||
|
||||
send() {
|
||||
local payload="$1"
|
||||
@@ -75,7 +75,7 @@ TRASH
|
||||
export HOME="$home_dir"
|
||||
mkdir -p "$HOME"
|
||||
|
||||
input_fifo="$(mktemp -u "/tmp/clawdis-onboard-${case_name}.XXXXXX")"
|
||||
input_fifo="$(mktemp -u "/tmp/clawdbot-onboard-${case_name}.XXXXXX")"
|
||||
mkfifo "$input_fifo"
|
||||
# Run under script to keep an interactive TTY for clack prompts.
|
||||
script -q -c "$command" /dev/null < "$input_fifo" &
|
||||
@@ -107,7 +107,7 @@ TRASH
|
||||
}
|
||||
|
||||
make_home() {
|
||||
mktemp -d "/tmp/clawdis-e2e-$1.XXXXXX"
|
||||
mktemp -d "/tmp/clawdbot-e2e-$1.XXXXXX"
|
||||
}
|
||||
|
||||
assert_file() {
|
||||
@@ -208,8 +208,8 @@ TRASH
|
||||
|
||||
# Assert config + workspace scaffolding.
|
||||
workspace_dir="$HOME/clawd"
|
||||
config_path="$HOME/.clawdis/clawdis.json"
|
||||
sessions_dir="$HOME/.clawdis/sessions"
|
||||
config_path="$HOME/.clawdbot/clawdbot.json"
|
||||
sessions_dir="$HOME/.clawdbot/sessions"
|
||||
|
||||
assert_file "$config_path"
|
||||
assert_dir "$sessions_dir"
|
||||
@@ -296,7 +296,7 @@ NODE
|
||||
--skip-skills \
|
||||
--skip-health
|
||||
|
||||
config_path="$HOME/.clawdis/clawdis.json"
|
||||
config_path="$HOME/.clawdbot/clawdbot.json"
|
||||
assert_file "$config_path"
|
||||
|
||||
CONFIG_PATH="$config_path" node --input-type=module - <<'"'"'NODE'"'"'
|
||||
@@ -330,9 +330,9 @@ NODE
|
||||
local home_dir
|
||||
home_dir="$(make_home reset-config)"
|
||||
export HOME="$home_dir"
|
||||
mkdir -p "$HOME/.clawdis"
|
||||
mkdir -p "$HOME/.clawdbot"
|
||||
# Seed a remote config to exercise reset path.
|
||||
cat > "$HOME/.clawdis/clawdis.json" <<'"'"'JSON'"'"'
|
||||
cat > "$HOME/.clawdbot/clawdbot.json" <<'"'"'JSON'"'"'
|
||||
{
|
||||
"agent": { "workspace": "/root/old" },
|
||||
"gateway": {
|
||||
@@ -344,7 +344,7 @@ JSON
|
||||
|
||||
run_wizard reset-config "$home_dir" send_reset_config_only
|
||||
|
||||
config_path="$HOME/.clawdis/clawdis.json"
|
||||
config_path="$HOME/.clawdbot/clawdbot.json"
|
||||
assert_file "$config_path"
|
||||
|
||||
CONFIG_PATH="$config_path" node --input-type=module - <<'"'"'NODE'"'"'
|
||||
@@ -377,7 +377,7 @@ NODE
|
||||
# Providers-only configure flow.
|
||||
run_wizard_cmd providers "$home_dir" "node dist/index.js configure" send_providers_flow
|
||||
|
||||
config_path="$HOME/.clawdis/clawdis.json"
|
||||
config_path="$HOME/.clawdbot/clawdbot.json"
|
||||
assert_file "$config_path"
|
||||
|
||||
CONFIG_PATH="$config_path" node --input-type=module - <<'"'"'NODE'"'"'
|
||||
@@ -414,9 +414,9 @@ NODE
|
||||
local home_dir
|
||||
home_dir="$(make_home skills)"
|
||||
export HOME="$home_dir"
|
||||
mkdir -p "$HOME/.clawdis"
|
||||
mkdir -p "$HOME/.clawdbot"
|
||||
# Seed skills config to ensure it survives the wizard.
|
||||
cat > "$HOME/.clawdis/clawdis.json" <<'"'"'JSON'"'"'
|
||||
cat > "$HOME/.clawdbot/clawdbot.json" <<'"'"'JSON'"'"'
|
||||
{
|
||||
"skills": {
|
||||
"allowBundled": ["__none__"],
|
||||
@@ -427,7 +427,7 @@ JSON
|
||||
|
||||
run_wizard_cmd skills "$home_dir" "node dist/index.js configure" send_skills_flow
|
||||
|
||||
config_path="$HOME/.clawdis/clawdis.json"
|
||||
config_path="$HOME/.clawdbot/clawdbot.json"
|
||||
assert_file "$config_path"
|
||||
|
||||
CONFIG_PATH="$config_path" node --input-type=module - <<'"'"'NODE'"'"'
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
set -euo pipefail
|
||||
|
||||
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
||||
ZIP=${1:?"Usage: $0 Clawdis-<ver>.zip"}
|
||||
FEED_URL=${2:-"https://raw.githubusercontent.com/steipete/clawdis/main/appcast.xml"}
|
||||
ZIP=${1:?"Usage: $0 Clawdbot-<ver>.zip"}
|
||||
FEED_URL=${2:-"https://raw.githubusercontent.com/clawdbot/clawdbot/main/appcast.xml"}
|
||||
PRIVATE_KEY_FILE=${SPARKLE_PRIVATE_KEY_FILE:-}
|
||||
if [[ -z "$PRIVATE_KEY_FILE" ]]; then
|
||||
echo "Set SPARKLE_PRIVATE_KEY_FILE to your ed25519 private key (Sparkle)." >&2
|
||||
@@ -19,7 +19,7 @@ ZIP_NAME=$(basename "$ZIP")
|
||||
ZIP_BASE="${ZIP_NAME%.zip}"
|
||||
VERSION=${SPARKLE_RELEASE_VERSION:-}
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
if [[ "$ZIP_NAME" =~ ^Clawdis-([0-9]+(\.[0-9]+){1,2}([-.][^.]*)?)\.zip$ ]]; then
|
||||
if [[ "$ZIP_NAME" =~ ^Clawdbot-([0-9]+(\.[0-9]+){1,2}([-.][^.]*)?)\.zip$ ]]; then
|
||||
VERSION="${BASH_REMATCH[1]}"
|
||||
else
|
||||
echo "Could not infer version from $ZIP_NAME; set SPARKLE_RELEASE_VERSION." >&2
|
||||
@@ -39,7 +39,7 @@ if [[ "$KEEP_NOTES" != "1" ]]; then
|
||||
trap 'rm -f "$NOTES_HTML"' EXIT
|
||||
fi
|
||||
|
||||
DOWNLOAD_URL_PREFIX=${SPARKLE_DOWNLOAD_URL_PREFIX:-"https://github.com/steipete/clawdis/releases/download/v${VERSION}/"}
|
||||
DOWNLOAD_URL_PREFIX=${SPARKLE_DOWNLOAD_URL_PREFIX:-"https://github.com/clawdbot/clawdbot/releases/download/v${VERSION}/"}
|
||||
|
||||
export PATH="$ROOT/apps/macos/.build/artifacts/sparkle/Sparkle/bin:$PATH"
|
||||
if ! command -v generate_appcast >/dev/null; then
|
||||
|
||||
@@ -4,7 +4,7 @@ set -euo pipefail
|
||||
# Notarize a macOS artifact (zip/dmg/pkg) and optionally staple the app bundle.
|
||||
#
|
||||
# Usage:
|
||||
# STAPLE_APP_PATH=dist/Clawdis.app scripts/notarize-mac-artifact.sh <artifact>
|
||||
# STAPLE_APP_PATH=dist/Clawdbot.app scripts/notarize-mac-artifact.sh <artifact>
|
||||
#
|
||||
# Auth (pick one):
|
||||
# NOTARYTOOL_PROFILE keychain profile created via `xcrun notarytool store-credentials`
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Build and bundle Clawdis into a minimal .app we can open.
|
||||
# Outputs to dist/Clawdis.app
|
||||
# Build and bundle Clawdbot into a minimal .app we can open.
|
||||
# Outputs to dist/Clawdbot.app
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
APP_ROOT="$ROOT_DIR/dist/Clawdis.app"
|
||||
APP_ROOT="$ROOT_DIR/dist/Clawdbot.app"
|
||||
BUILD_ROOT="$ROOT_DIR/apps/macos/.build"
|
||||
PRODUCT="Clawdis"
|
||||
BUNDLE_ID="${BUNDLE_ID:-com.clawdis.mac.debug}"
|
||||
PRODUCT="Clawdbot"
|
||||
BUNDLE_ID="${BUNDLE_ID:-com.clawdbot.mac.debug}"
|
||||
PKG_VERSION="$(cd "$ROOT_DIR" && node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0")"
|
||||
BUILD_TS=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
||||
GIT_COMMIT=$(cd "$ROOT_DIR" && git rev-parse --short HEAD 2>/dev/null || echo "unknown")
|
||||
@@ -20,7 +20,7 @@ BUILD_ARCHS_VALUE="${BUILD_ARCHS:-arm64 x86_64}"
|
||||
IFS=' ' read -r -a BUILD_ARCHS <<< "$BUILD_ARCHS_VALUE"
|
||||
PRIMARY_ARCH="${BUILD_ARCHS[0]}"
|
||||
SPARKLE_PUBLIC_ED_KEY="${SPARKLE_PUBLIC_ED_KEY:-AGCY8w5vHirVfGGDGc8Szc5iuOqupZSh9pMj/Qs67XI=}"
|
||||
SPARKLE_FEED_URL="${SPARKLE_FEED_URL:-https://raw.githubusercontent.com/steipete/clawdis/main/appcast.xml}"
|
||||
SPARKLE_FEED_URL="${SPARKLE_FEED_URL:-https://raw.githubusercontent.com/clawdbot/clawdbot/main/appcast.xml}"
|
||||
AUTO_CHECKS=true
|
||||
if [[ "$BUNDLE_ID" == *.debug ]]; then
|
||||
SPARKLE_FEED_URL=""
|
||||
@@ -107,7 +107,7 @@ merge_framework_machos() {
|
||||
build_relay_binary() {
|
||||
local arch="$1"
|
||||
local out="$2"
|
||||
local define_arg="__CLAWDIS_VERSION__=\\\"$PKG_VERSION\\\""
|
||||
local define_arg="__CLAWDBOT_VERSION__=\\\"$PKG_VERSION\\\""
|
||||
local bun_bin="bun"
|
||||
local -a cmd=("$bun_bin" build "$ROOT_DIR/dist/macos/relay.js" --compile --bytecode --outfile "$out" -e electron --define "$define_arg")
|
||||
if [[ "$arch" == "x86_64" ]]; then
|
||||
@@ -167,7 +167,7 @@ mkdir -p "$APP_ROOT/Contents/Resources/Relay"
|
||||
mkdir -p "$APP_ROOT/Contents/Frameworks"
|
||||
|
||||
echo "📄 Copying Info.plist template"
|
||||
INFO_PLIST_SRC="$ROOT_DIR/apps/macos/Sources/Clawdis/Resources/Info.plist"
|
||||
INFO_PLIST_SRC="$ROOT_DIR/apps/macos/Sources/Clawdbot/Resources/Info.plist"
|
||||
if [ ! -f "$INFO_PLIST_SRC" ]; then
|
||||
echo "ERROR: Info.plist template missing at $INFO_PLIST_SRC" >&2
|
||||
exit 1
|
||||
@@ -176,8 +176,8 @@ cp "$INFO_PLIST_SRC" "$APP_ROOT/Contents/Info.plist"
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleIdentifier ${BUNDLE_ID}" "$APP_ROOT/Contents/Info.plist" || true
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${APP_VERSION}" "$APP_ROOT/Contents/Info.plist" || true
|
||||
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion ${APP_BUILD}" "$APP_ROOT/Contents/Info.plist" || true
|
||||
/usr/libexec/PlistBuddy -c "Set :ClawdisBuildTimestamp ${BUILD_TS}" "$APP_ROOT/Contents/Info.plist" || true
|
||||
/usr/libexec/PlistBuddy -c "Set :ClawdisGitCommit ${GIT_COMMIT}" "$APP_ROOT/Contents/Info.plist" || true
|
||||
/usr/libexec/PlistBuddy -c "Set :ClawdbotBuildTimestamp ${BUILD_TS}" "$APP_ROOT/Contents/Info.plist" || true
|
||||
/usr/libexec/PlistBuddy -c "Set :ClawdbotGitCommit ${GIT_COMMIT}" "$APP_ROOT/Contents/Info.plist" || true
|
||||
/usr/libexec/PlistBuddy -c "Set :SUFeedURL ${SPARKLE_FEED_URL}" "$APP_ROOT/Contents/Info.plist" \
|
||||
|| /usr/libexec/PlistBuddy -c "Add :SUFeedURL string ${SPARKLE_FEED_URL}" "$APP_ROOT/Contents/Info.plist" || true
|
||||
/usr/libexec/PlistBuddy -c "Set :SUPublicEDKey ${SPARKLE_PUBLIC_ED_KEY}" "$APP_ROOT/Contents/Info.plist" \
|
||||
@@ -189,17 +189,17 @@ else
|
||||
fi
|
||||
|
||||
echo "🚚 Copying binary"
|
||||
cp "$BIN_PRIMARY" "$APP_ROOT/Contents/MacOS/Clawdis"
|
||||
cp "$BIN_PRIMARY" "$APP_ROOT/Contents/MacOS/Clawdbot"
|
||||
if [[ "${#BUILD_ARCHS[@]}" -gt 1 ]]; then
|
||||
BIN_INPUTS=()
|
||||
for arch in "${BUILD_ARCHS[@]}"; do
|
||||
BIN_INPUTS+=("$(bin_for_arch "$arch")")
|
||||
done
|
||||
/usr/bin/lipo -create "${BIN_INPUTS[@]}" -output "$APP_ROOT/Contents/MacOS/Clawdis"
|
||||
/usr/bin/lipo -create "${BIN_INPUTS[@]}" -output "$APP_ROOT/Contents/MacOS/Clawdbot"
|
||||
fi
|
||||
chmod +x "$APP_ROOT/Contents/MacOS/Clawdis"
|
||||
chmod +x "$APP_ROOT/Contents/MacOS/Clawdbot"
|
||||
# SwiftPM outputs ad-hoc signed binaries; strip the signature before install_name_tool to avoid warnings.
|
||||
/usr/bin/codesign --remove-signature "$APP_ROOT/Contents/MacOS/Clawdis" 2>/dev/null || true
|
||||
/usr/bin/codesign --remove-signature "$APP_ROOT/Contents/MacOS/Clawdbot" 2>/dev/null || true
|
||||
|
||||
SPARKLE_FRAMEWORK_PRIMARY="$(sparkle_framework_for_arch "$PRIMARY_ARCH")"
|
||||
if [ -d "$SPARKLE_FRAMEWORK_PRIMARY" ]; then
|
||||
@@ -219,11 +219,11 @@ if [ -d "$SPARKLE_FRAMEWORK_PRIMARY" ]; then
|
||||
fi
|
||||
|
||||
echo "🖼 Copying app icon"
|
||||
cp "$ROOT_DIR/apps/macos/Sources/Clawdis/Resources/Clawdis.icns" "$APP_ROOT/Contents/Resources/Clawdis.icns"
|
||||
cp "$ROOT_DIR/apps/macos/Sources/Clawdbot/Resources/Clawdbot.icns" "$APP_ROOT/Contents/Resources/Clawdbot.icns"
|
||||
|
||||
echo "📦 Copying device model resources"
|
||||
rm -rf "$APP_ROOT/Contents/Resources/DeviceModels"
|
||||
cp -R "$ROOT_DIR/apps/macos/Sources/Clawdis/Resources/DeviceModels" "$APP_ROOT/Contents/Resources/DeviceModels"
|
||||
cp -R "$ROOT_DIR/apps/macos/Sources/Clawdbot/Resources/DeviceModels" "$APP_ROOT/Contents/Resources/DeviceModels"
|
||||
|
||||
RELAY_DIR="$APP_ROOT/Contents/Resources/Relay"
|
||||
|
||||
@@ -235,19 +235,19 @@ if [[ "${SKIP_GATEWAY_PACKAGE:-0}" != "1" ]]; then
|
||||
|
||||
echo "🧰 Building bundled relay (bun --compile)"
|
||||
mkdir -p "$RELAY_DIR"
|
||||
RELAY_OUT="$RELAY_DIR/clawdis"
|
||||
RELAY_OUT="$RELAY_DIR/clawdbot"
|
||||
RELAY_BUILD_DIR="$RELAY_DIR/.relay-build"
|
||||
rm -rf "$RELAY_BUILD_DIR"
|
||||
mkdir -p "$RELAY_BUILD_DIR"
|
||||
for arch in "${BUILD_ARCHS[@]}"; do
|
||||
RELAY_ARCH_OUT="$RELAY_BUILD_DIR/clawdis-$arch"
|
||||
RELAY_ARCH_OUT="$RELAY_BUILD_DIR/clawdbot-$arch"
|
||||
build_relay_binary "$arch" "$RELAY_ARCH_OUT"
|
||||
chmod +x "$RELAY_ARCH_OUT"
|
||||
done
|
||||
if [[ "${#BUILD_ARCHS[@]}" -gt 1 ]]; then
|
||||
/usr/bin/lipo -create "$RELAY_BUILD_DIR"/clawdis-* -output "$RELAY_OUT"
|
||||
/usr/bin/lipo -create "$RELAY_BUILD_DIR"/clawdbot-* -output "$RELAY_OUT"
|
||||
else
|
||||
cp "$RELAY_BUILD_DIR/clawdis-${BUILD_ARCHS[0]}" "$RELAY_OUT"
|
||||
cp "$RELAY_BUILD_DIR/clawdbot-${BUILD_ARCHS[0]}" "$RELAY_OUT"
|
||||
fi
|
||||
rm -rf "$RELAY_BUILD_DIR"
|
||||
|
||||
@@ -266,7 +266,7 @@ if [[ "${SKIP_GATEWAY_PACKAGE:-0}" != "1" ]]; then
|
||||
echo "📄 Writing embedded runtime package.json (Pi compatibility)"
|
||||
cat > "$RELAY_DIR/package.json" <<JSON
|
||||
{
|
||||
"name": "clawdis-embedded",
|
||||
"name": "clawdbot-embedded",
|
||||
"version": "$PKG_VERSION",
|
||||
"piConfig": {
|
||||
"name": "pi",
|
||||
@@ -290,8 +290,8 @@ else
|
||||
echo "🧰 Skipping gateway payload packaging (SKIP_GATEWAY_PACKAGE=1)"
|
||||
fi
|
||||
|
||||
echo "⏹ Stopping any running Clawdis"
|
||||
killall -q Clawdis 2>/dev/null || true
|
||||
echo "⏹ Stopping any running Clawdbot"
|
||||
killall -q Clawdbot 2>/dev/null || true
|
||||
|
||||
echo "🔏 Signing bundle (auto-selects signing identity if SIGN_IDENTITY is unset)"
|
||||
"$ROOT_DIR/scripts/codesign-mac-app.sh" "$APP_ROOT"
|
||||
|
||||
@@ -4,24 +4,24 @@ set -euo pipefail
|
||||
# Build the mac app bundle, then create a zip (Sparkle) + styled DMG (humans).
|
||||
#
|
||||
# Output:
|
||||
# - dist/Clawdis.app
|
||||
# - dist/Clawdis-<version>.zip
|
||||
# - dist/Clawdis-<version>.dmg
|
||||
# - dist/Clawdbot.app
|
||||
# - dist/Clawdbot-<version>.zip
|
||||
# - dist/Clawdbot-<version>.dmg
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
"$ROOT_DIR/scripts/package-mac-app.sh"
|
||||
|
||||
APP="$ROOT_DIR/dist/Clawdis.app"
|
||||
APP="$ROOT_DIR/dist/Clawdbot.app"
|
||||
if [[ ! -d "$APP" ]]; then
|
||||
echo "Error: missing app bundle at $APP" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VERSION=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$APP/Contents/Info.plist" 2>/dev/null || echo "0.0.0")
|
||||
ZIP="$ROOT_DIR/dist/Clawdis-$VERSION.zip"
|
||||
DMG="$ROOT_DIR/dist/Clawdis-$VERSION.dmg"
|
||||
NOTARY_ZIP="$ROOT_DIR/dist/Clawdis-$VERSION.notary.zip"
|
||||
ZIP="$ROOT_DIR/dist/Clawdbot-$VERSION.zip"
|
||||
DMG="$ROOT_DIR/dist/Clawdbot-$VERSION.dmg"
|
||||
NOTARY_ZIP="$ROOT_DIR/dist/Clawdbot-$VERSION.notary.zip"
|
||||
NOTARIZE="${NOTARIZE:-0}"
|
||||
|
||||
if [[ "$NOTARIZE" == "1" ]]; then
|
||||
|
||||
@@ -23,7 +23,7 @@ const outPath = path.join(
|
||||
"apps",
|
||||
"macos",
|
||||
"Sources",
|
||||
"ClawdisProtocol",
|
||||
"ClawdbotProtocol",
|
||||
"GatewayModels.swift",
|
||||
);
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ async function writeJsonSchema() {
|
||||
|
||||
const rootSchema = {
|
||||
$schema: "http://json-schema.org/draft-07/schema#",
|
||||
$id: "https://clawdis.dev/protocol.schema.json",
|
||||
title: "Clawdis Gateway Protocol",
|
||||
$id: "https://clawdbot.dev/protocol.schema.json",
|
||||
title: "Clawdbot Gateway Protocol",
|
||||
description: "Handshake, request/response, and event frames for the Gateway WebSocket.",
|
||||
oneOf: [
|
||||
{ $ref: "#/definitions/RequestFrame" },
|
||||
|
||||
@@ -6,7 +6,7 @@ type PackFile = { path: string };
|
||||
type PackResult = { files?: PackFile[] };
|
||||
|
||||
const requiredPaths = ["dist/discord/send.js", "dist/hooks/gmail.js"];
|
||||
const forbiddenPrefixes = ["dist/Clawdis.app/"];
|
||||
const forbiddenPrefixes = ["dist/Clawdbot.app/"];
|
||||
|
||||
function runPackDry(): PackResult[] {
|
||||
const raw = execSync("npm pack --dry-run --json", {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
# Reset Clawdis like Trimmy: kill running instances, rebuild, repackage, relaunch, verify.
|
||||
# Reset Clawdbot like Trimmy: kill running instances, rebuild, repackage, relaunch, verify.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
APP_BUNDLE="${CLAWDIS_APP_BUNDLE:-}"
|
||||
APP_PROCESS_PATTERN="Clawdis.app/Contents/MacOS/Clawdis"
|
||||
DEBUG_PROCESS_PATTERN="${ROOT_DIR}/apps/macos/.build/debug/Clawdis"
|
||||
LOCAL_PROCESS_PATTERN="${ROOT_DIR}/apps/macos/.build-local/debug/Clawdis"
|
||||
RELEASE_PROCESS_PATTERN="${ROOT_DIR}/apps/macos/.build/release/Clawdis"
|
||||
LAUNCH_AGENT="${HOME}/Library/LaunchAgents/com.clawdis.mac.plist"
|
||||
APP_BUNDLE="${CLAWDBOT_APP_BUNDLE:-}"
|
||||
APP_PROCESS_PATTERN="Clawdbot.app/Contents/MacOS/Clawdbot"
|
||||
DEBUG_PROCESS_PATTERN="${ROOT_DIR}/apps/macos/.build/debug/Clawdbot"
|
||||
LOCAL_PROCESS_PATTERN="${ROOT_DIR}/apps/macos/.build-local/debug/Clawdbot"
|
||||
RELEASE_PROCESS_PATTERN="${ROOT_DIR}/apps/macos/.build/release/Clawdbot"
|
||||
LAUNCH_AGENT="${HOME}/Library/LaunchAgents/com.clawdbot.mac.plist"
|
||||
LOCK_KEY="$(printf '%s' "${ROOT_DIR}" | shasum -a 256 | cut -c1-8)"
|
||||
LOCK_DIR="${TMPDIR:-/tmp}/clawdis-restart-${LOCK_KEY}"
|
||||
LOCK_DIR="${TMPDIR:-/tmp}/clawdbot-restart-${LOCK_KEY}"
|
||||
LOCK_PID_FILE="${LOCK_DIR}/pid"
|
||||
WAIT_FOR_LOCK=0
|
||||
LOG_PATH="${CLAWDIS_RESTART_LOG:-/tmp/clawdis-restart.log}"
|
||||
LOG_PATH="${CLAWDBOT_RESTART_LOG:-/tmp/clawdbot-restart.log}"
|
||||
|
||||
log() { printf '%s\n' "$*"; }
|
||||
fail() { printf 'ERROR: %s\n' "$*" >&2; exit 1; }
|
||||
@@ -84,18 +84,18 @@ log "==> Log: ${LOG_PATH}"
|
||||
|
||||
acquire_lock
|
||||
|
||||
kill_all_clawdis() {
|
||||
kill_all_clawdbot() {
|
||||
for _ in {1..10}; do
|
||||
pkill -f "${APP_PROCESS_PATTERN}" 2>/dev/null || true
|
||||
pkill -f "${DEBUG_PROCESS_PATTERN}" 2>/dev/null || true
|
||||
pkill -f "${LOCAL_PROCESS_PATTERN}" 2>/dev/null || true
|
||||
pkill -f "${RELEASE_PROCESS_PATTERN}" 2>/dev/null || true
|
||||
pkill -x "Clawdis" 2>/dev/null || true
|
||||
pkill -x "Clawdbot" 2>/dev/null || true
|
||||
if ! pgrep -f "${APP_PROCESS_PATTERN}" >/dev/null 2>&1 \
|
||||
&& ! pgrep -f "${DEBUG_PROCESS_PATTERN}" >/dev/null 2>&1 \
|
||||
&& ! pgrep -f "${LOCAL_PROCESS_PATTERN}" >/dev/null 2>&1 \
|
||||
&& ! pgrep -f "${RELEASE_PROCESS_PATTERN}" >/dev/null 2>&1 \
|
||||
&& ! pgrep -x "Clawdis" >/dev/null 2>&1; then
|
||||
&& ! pgrep -x "Clawdbot" >/dev/null 2>&1; then
|
||||
return 0
|
||||
fi
|
||||
sleep 0.3
|
||||
@@ -103,12 +103,12 @@ kill_all_clawdis() {
|
||||
}
|
||||
|
||||
stop_launch_agent() {
|
||||
launchctl bootout gui/"$UID"/com.clawdis.mac 2>/dev/null || true
|
||||
launchctl bootout gui/"$UID"/com.clawdbot.mac 2>/dev/null || true
|
||||
}
|
||||
|
||||
# 1) Kill all running instances first.
|
||||
log "==> Killing existing Clawdis instances"
|
||||
kill_all_clawdis
|
||||
log "==> Killing existing Clawdbot instances"
|
||||
kill_all_clawdbot
|
||||
stop_launch_agent
|
||||
|
||||
# Bundle Gateway-hosted Canvas A2UI assets.
|
||||
@@ -116,7 +116,7 @@ run_step "bundle canvas a2ui" bash -lc "cd '${ROOT_DIR}' && pnpm canvas:a2ui:bun
|
||||
|
||||
# 2) Rebuild into the same path the packager consumes (.build).
|
||||
run_step "clean build cache" bash -lc "cd '${ROOT_DIR}/apps/macos' && rm -rf .build .build-swift .swiftpm 2>/dev/null || true"
|
||||
run_step "swift build" bash -lc "cd '${ROOT_DIR}/apps/macos' && swift build -q --product Clawdis"
|
||||
run_step "swift build" bash -lc "cd '${ROOT_DIR}/apps/macos' && swift build -q --product Clawdbot"
|
||||
|
||||
# 3) Package app (default to bundling the embedded gateway + CLI).
|
||||
run_step "package app" bash -lc "cd '${ROOT_DIR}' && SKIP_TSC=${SKIP_TSC:-1} SKIP_GATEWAY_PACKAGE=${SKIP_GATEWAY_PACKAGE:-0} '${ROOT_DIR}/scripts/package-mac-app.sh'"
|
||||
@@ -126,20 +126,20 @@ choose_app_bundle() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -d "/Applications/Clawdis.app" ]]; then
|
||||
APP_BUNDLE="/Applications/Clawdis.app"
|
||||
if [[ -d "/Applications/Clawdbot.app" ]]; then
|
||||
APP_BUNDLE="/Applications/Clawdbot.app"
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [[ -d "${ROOT_DIR}/dist/Clawdis.app" ]]; then
|
||||
APP_BUNDLE="${ROOT_DIR}/dist/Clawdis.app"
|
||||
if [[ -d "${ROOT_DIR}/dist/Clawdbot.app" ]]; then
|
||||
APP_BUNDLE="${ROOT_DIR}/dist/Clawdbot.app"
|
||||
if [[ ! -d "${APP_BUNDLE}/Contents/Frameworks/Sparkle.framework" ]]; then
|
||||
fail "dist/Clawdis.app missing Sparkle after packaging"
|
||||
fail "dist/Clawdbot.app missing Sparkle after packaging"
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
fail "App bundle not found. Set CLAWDIS_APP_BUNDLE to your installed Clawdis.app"
|
||||
fail "App bundle not found. Set CLAWDBOT_APP_BUNDLE to your installed Clawdbot.app"
|
||||
}
|
||||
|
||||
choose_app_bundle
|
||||
@@ -159,7 +159,7 @@ run_step "launch app" env -i \
|
||||
# 5) Verify the app is alive.
|
||||
sleep 1.5
|
||||
if pgrep -f "${APP_PROCESS_PATTERN}" >/dev/null 2>&1; then
|
||||
log "OK: Clawdis is running."
|
||||
log "OK: Clawdbot is running."
|
||||
else
|
||||
fail "App exited immediately. Check ${LOG_PATH} or Console.app (User Reports)."
|
||||
fi
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
set -euo pipefail
|
||||
|
||||
export DISPLAY=:1
|
||||
export HOME=/tmp/clawdis-home
|
||||
export HOME=/tmp/clawdbot-home
|
||||
export XDG_CONFIG_HOME="${HOME}/.config"
|
||||
export XDG_CACHE_HOME="${HOME}/.cache"
|
||||
|
||||
CDP_PORT="${CLAWDIS_BROWSER_CDP_PORT:-9222}"
|
||||
VNC_PORT="${CLAWDIS_BROWSER_VNC_PORT:-5900}"
|
||||
NOVNC_PORT="${CLAWDIS_BROWSER_NOVNC_PORT:-6080}"
|
||||
ENABLE_NOVNC="${CLAWDIS_BROWSER_ENABLE_NOVNC:-1}"
|
||||
HEADLESS="${CLAWDIS_BROWSER_HEADLESS:-0}"
|
||||
CDP_PORT="${CLAWDBOT_BROWSER_CDP_PORT:-9222}"
|
||||
VNC_PORT="${CLAWDBOT_BROWSER_VNC_PORT:-5900}"
|
||||
NOVNC_PORT="${CLAWDBOT_BROWSER_NOVNC_PORT:-6080}"
|
||||
ENABLE_NOVNC="${CLAWDBOT_BROWSER_ENABLE_NOVNC:-1}"
|
||||
HEADLESS="${CLAWDBOT_BROWSER_HEADLESS:-0}"
|
||||
|
||||
mkdir -p "${HOME}" "${HOME}/.chrome" "${XDG_CONFIG_HOME}" "${XDG_CACHE_HOME}"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
IMAGE_NAME="clawdis-sandbox-browser:bookworm-slim"
|
||||
IMAGE_NAME="clawdbot-sandbox-browser:bookworm-slim"
|
||||
|
||||
docker build -t "${IMAGE_NAME}" -f Dockerfile.sandbox-browser .
|
||||
echo "Built ${IMAGE_NAME}"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
BASE_IMAGE="${BASE_IMAGE:-clawdis-sandbox:bookworm-slim}"
|
||||
TARGET_IMAGE="${TARGET_IMAGE:-clawdis-sandbox-common:bookworm-slim}"
|
||||
BASE_IMAGE="${BASE_IMAGE:-clawdbot-sandbox:bookworm-slim}"
|
||||
TARGET_IMAGE="${TARGET_IMAGE:-clawdbot-sandbox-common:bookworm-slim}"
|
||||
PACKAGES="${PACKAGES:-curl wget jq coreutils grep nodejs npm python3 git ca-certificates golang-go rustc cargo unzip pkg-config libasound2-dev build-essential file}"
|
||||
INSTALL_PNPM="${INSTALL_PNPM:-1}"
|
||||
INSTALL_BUN="${INSTALL_BUN:-1}"
|
||||
@@ -61,5 +61,5 @@ cat <<NOTE
|
||||
Built ${TARGET_IMAGE}.
|
||||
To use it, set agent.sandbox.docker.image to "${TARGET_IMAGE}" and restart.
|
||||
If you want a clean re-create, remove old sandbox containers:
|
||||
docker rm -f \$(docker ps -aq --filter label=clawdis.sandbox=1)
|
||||
docker rm -f \$(docker ps -aq --filter label=clawdbot.sandbox=1)
|
||||
NOTE
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
IMAGE_NAME="clawdis-sandbox:bookworm-slim"
|
||||
IMAGE_NAME="clawdbot-sandbox:bookworm-slim"
|
||||
|
||||
docker build -t "${IMAGE_NAME}" -f Dockerfile.sandbox .
|
||||
echo "Built ${IMAGE_NAME}"
|
||||
|
||||
@@ -27,13 +27,13 @@ function killGatewayListeners(port: number): PortProcess[] {
|
||||
|
||||
function runTests() {
|
||||
const isolatedLock =
|
||||
process.env.CLAWDIS_GATEWAY_LOCK ??
|
||||
path.join(os.tmpdir(), `clawdis-gateway.lock.test.${Date.now()}`);
|
||||
process.env.CLAWDBOT_GATEWAY_LOCK ??
|
||||
path.join(os.tmpdir(), `clawdbot-gateway.lock.test.${Date.now()}`);
|
||||
const result = spawnSync("pnpm", ["vitest", "run"], {
|
||||
stdio: "inherit",
|
||||
env: {
|
||||
...process.env,
|
||||
CLAWDIS_GATEWAY_LOCK: isolatedLock,
|
||||
CLAWDBOT_GATEWAY_LOCK: isolatedLock,
|
||||
},
|
||||
});
|
||||
if (result.error) {
|
||||
@@ -45,7 +45,7 @@ function runTests() {
|
||||
|
||||
function main() {
|
||||
const port = Number.parseInt(
|
||||
process.env.CLAWDIS_GATEWAY_PORT ?? `${DEFAULT_PORT}`,
|
||||
process.env.CLAWDBOT_GATEWAY_PORT ?? `${DEFAULT_PORT}`,
|
||||
10,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user