{ "name": "Peek", "version": "0.0.1", "description": "Peek is a web user agent for working with the web in a more agent-ish fashion than a browser.", "main": "dist/backend/electron/entry.js", "author": "dietrich ayala", "license": "MIT", "engines": { "node": ">=24.0.0" }, "type": "module", "repository": { "type": "git", "url": "https://github.com/autonome/peek" }, "build": { "extends": "electron-builder.yml" }, "scripts": { "postinstall": "electron-rebuild -f -w better-sqlite3", "agent-setup": "git -C .agent-workflow pull 2>/dev/null || git clone https://tangled.sh/burrito.space/multi-agent-workflow .agent-workflow && echo 'Agent workflow updated!'", "//-- Development (BACKEND=electron|tauri, defaults to electron) --//": "", "dev": "[ \"${BACKEND:-}\" = \"tauri\" ] && yarn dev:tauri || yarn dev:electron", "dev:electron": "./scripts/timed.sh sh -c 'yarn build && DEBUG=1 electron .'", "dev:tauri": "./scripts/timed.sh sh -c 'cd backend/tauri/src-tauri && cargo run'", "dev:hot": "yarn build && nodemon --exec 'yarn build && DEBUG=1 electron .'", "//-- Production --//": "", "check:native": "node scripts/check-native-modules.js", "start": "[ \"${BACKEND:-}\" = \"tauri\" ] && yarn start:tauri || yarn start:electron", "start:electron": "./scripts/timed.sh sh -c 'yarn check:native && yarn build && electron .'", "start:tauri": "./scripts/timed.sh sh -c 'cd backend/tauri/src-tauri && cargo run --release'", "start:tauri:log": "cd backend/tauri/src-tauri && ./target/release/peek-tauri 2>&1", "start:tauri:test": "pkill -INT -f peek-tauri 2>/dev/null; sleep 1; cd backend/tauri/src-tauri && ./target/release/peek-tauri &> /tmp/tauri.log & sleep 5 && tail -50 /tmp/tauri.log && pkill -INT -f peek-tauri", "//-- Build --//": "", "build": "./scripts/timed.sh sh -c 'node schema/codegen.js && tsc -p backend/tsconfig.json'", "build:watch": "tsc -p backend/tsconfig.json --watch", "build:electron": "./scripts/timed.sh electron-builder --dir", "build:electron:install": "./scripts/timed.sh sh -c 'electron-builder --dir && rm -rf /Applications/Peek.app && cp -R out/mac-arm64/Peek.app /Applications/'", "build:electron:dist": "./scripts/timed.sh electron-builder", "build:tauri": "./scripts/timed.sh sh -c 'cd backend/tauri/src-tauri && cargo tauri build'", "build:tauri:check": "./scripts/timed.sh sh -c 'cd backend/tauri/src-tauri && cargo check'", "//-- Tauri Mobile (peek-save app in backend/tauri-mobile) --//": "", "mobile:build": "cd backend/tauri-mobile && npm run build", "mobile:ios:assets": "cd backend/tauri-mobile && npm run build && rm -rf src-tauri/gen/apple/assets && cp -R dist src-tauri/gen/apple/assets", "mobile:ios:dev": "cd backend/tauri-mobile/src-tauri && cargo tauri ios dev", "mobile:ios:build": "cd backend/tauri-mobile && ./build-ios.sh", "mobile:ios:build:release": "cd backend/tauri-mobile && ./build-release.sh", "mobile:ios:xcode": "open backend/tauri-mobile/src-tauri/gen/apple/peek-save.xcodeproj", "mobile:ios:xcodebuild:list": "xcodebuild -project backend/tauri-mobile/src-tauri/gen/apple/peek-save.xcodeproj -list", "mobile:ios:xcodebuild": "rm -rf /tmp/peek-xcodebuild && cd backend/tauri-mobile/src-tauri/gen/apple && xcodebuild -scheme peek-save_iOS -configuration Debug -sdk iphonesimulator -derivedDataPath /tmp/peek-xcodebuild -destination 'platform=iOS Simulator,name=iPhone 17 Pro' clean build", "mobile:ios:xcodebuild:release": "rm -rf /tmp/peek-xcodebuild && mkdir -p backend/tauri-mobile/src-tauri/gen/apple/Externals/arm64/release && ln -sf ../Debug/libapp.a backend/tauri-mobile/src-tauri/gen/apple/Externals/arm64/release/libapp.a && cd backend/tauri-mobile/src-tauri/gen/apple && xcodebuild -scheme peek-save_iOS -configuration release -sdk iphonesimulator -derivedDataPath /tmp/peek-xcodebuild -destination 'platform=iOS Simulator,name=iPhone 17 Pro' clean build", "mobile:ios:xcodebuild:install": "xcrun simctl install booted '/tmp/peek-xcodebuild/Build/Products/debug-iphonesimulator/Peek Save.app'", "mobile:ios:xcodebuild:install:release": "xcrun simctl install booted '/tmp/peek-xcodebuild/Build/Products/release-iphonesimulator/Peek Save.app'", "mobile:ios:xcodebuild:full": "yarn mobile:ios:build && yarn mobile:ios:xcodebuild && yarn mobile:ios:xcodebuild:install", "mobile:ios:xcodebuild:release:full": "yarn mobile:ios:build && yarn mobile:ios:xcodebuild:release && yarn mobile:ios:xcodebuild:install:release", "mobile:ios:xcodebuild:device": "rm -rf /tmp/peek-xcodebuild && cd backend/tauri-mobile/src-tauri/gen/apple && xcodebuild -scheme peek-save_iOS -configuration release -sdk iphoneos -derivedDataPath /tmp/peek-xcodebuild -destination 'generic/platform=iOS' ONLY_ACTIVE_ARCH=NO clean build", "mobile:ios:device:list": "xcrun devicectl list devices", "mobile:ios:xcodebuild:device:install": "DEVICE_ID=$(xcrun devicectl list devices 2>/dev/null | grep 'iPhone' | awk '{for(i=1;i<=NF;i++)if($i~/^[0-9A-F-]{36}$/)print $i}' | head -1) && echo \"Installing to device: $DEVICE_ID\" && xcrun devicectl device install app --device \"$DEVICE_ID\" '/tmp/peek-xcodebuild/Build/Products/release-iphoneos/Peek Save.app'", "mobile:ios:xcodebuild:device:full": "yarn mobile:ios:build:release && yarn mobile:ios:xcodebuild:device && yarn mobile:ios:xcodebuild:device:install", "mobile:ios:device:launch": "DEVICE_ID=$(xcrun devicectl list devices 2>/dev/null | grep 'iPhone' | awk '{for(i=1;i<=NF;i++)if($i~/^[0-9A-F-]{36}$/)print $i}' | head -1) && xcrun devicectl device process launch --device \"$DEVICE_ID\" com.dietrich.peek-mobile", "mobile:ios:device:terminate": "DEVICE_ID=$(xcrun devicectl list devices 2>/dev/null | grep 'iPhone' | awk '{for(i=1;i<=NF;i++)if($i~/^[0-9A-F-]{36}$/)print $i}' | head -1) && xcrun devicectl device process terminate --device \"$DEVICE_ID\" --bundle-id com.dietrich.peek-mobile 2>/dev/null || echo 'App not running'", "mobile:ios:device:run": "yarn mobile:ios:device:terminate; yarn mobile:ios:xcodebuild:device:install && yarn mobile:ios:device:launch", "mobile:ios:sim:boot": "xcrun simctl boot 'iPhone 17 Pro' 2>/dev/null || echo 'Simulator already booted or not found'", "mobile:ios:sim:open": "open -a Simulator", "mobile:ios:sim:launch": "xcrun simctl launch booted com.dietrich.peek-mobile", "mobile:ios:sim:run": "yarn mobile:ios:sim:boot && yarn mobile:ios:sim:open && yarn mobile:ios:xcodebuild:release:full && yarn mobile:ios:sim:launch", "mobile:ios:sim:db:path": "find ~/Library/Developer/CoreSimulator/Devices -name 'com.dietrich.peek-mobile' -path '*/AppGroup/*' 2>/dev/null | head -1 | xargs dirname | xargs ls -la", "mobile:ios:sim:db:info": "DB=$(find ~/Library/Developer/CoreSimulator/Devices -name 'peek*.db' -path '*/AppGroup/*' 2>/dev/null | head -1) && echo \"Database: $DB\" && sqlite3 \"$DB\" 'SELECT * FROM settings; SELECT COUNT(*) as items FROM items WHERE deleted_at IS NULL; SELECT COUNT(*) as tags FROM tags; SELECT COUNT(*) as item_tags FROM item_tags;'", "mobile:ios:sim:db:schema": "DB=$(find ~/Library/Developer/CoreSimulator/Devices -name 'peek*.db' -path '*/AppGroup/*' 2>/dev/null | head -1) && sqlite3 \"$DB\" '.schema tags' '.schema item_tags'", "mobile:ios:sim:db:items": "DB=$(find ~/Library/Developer/CoreSimulator/Devices -name 'peek*.db' -path '*/AppGroup/*' 2>/dev/null | head -1) && sqlite3 \"$DB\" 'SELECT id, type, substr(url,1,50) as url, deleted_at FROM items LIMIT 20;'", "mobile:ios:sim:db:tags": "DB=$(find ~/Library/Developer/CoreSimulator/Devices -name 'peek*.db' -path '*/AppGroup/*' 2>/dev/null | head -1) && sqlite3 \"$DB\" 'SELECT * FROM tags LIMIT 20;'", "mobile:ios:sim:db:backup": "DST=/tmp/peek-sim-backup-$(date +%Y%m%d-%H%M%S) && mkdir -p $DST && APP_GROUP=$(find ~/Library/Developer/CoreSimulator/Devices -path '*/Booted/*/AppGroup/*' -name 'com.dietrich.peek-mobile' 2>/dev/null | head -1 | xargs dirname) && cp -r \"$APP_GROUP\"/* $DST/ && echo \"Backed up to: $DST\" && ls -la $DST/", "mobile:ios:sim:appgroup": "DEVICE_ID=$(xcrun simctl list devices booted -j | grep -oE '[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}' | head -1); grep -rl peek-mobile \"$HOME/Library/Developer/CoreSimulator/Devices/$DEVICE_ID/data/Containers/Shared/AppGroup/\"*/.com.apple.mobile_container_manager.metadata.plist 2>/dev/null | head -1 | xargs dirname", "mobile:ios:sim:appgroup:debug": "DEVICE_ID=$(xcrun simctl list devices booted -j | grep -oE '[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}' | head -1); echo \"Device: $DEVICE_ID\"; grep -rl peek-mobile \"$HOME/Library/Developer/CoreSimulator/Devices/$DEVICE_ID/data/Containers/Shared/AppGroup/\"*/.com.apple.mobile_container_manager.metadata.plist 2>/dev/null | head -3; echo 'Contents:'; ls \"$HOME/Library/Developer/CoreSimulator/Devices/$DEVICE_ID/data/Containers/Shared/AppGroup/\"*/ 2>/dev/null | head -20", "mobile:ios:sim:clean": "xcrun simctl terminate booted com.dietrich.peek-mobile 2>/dev/null; DEVICE_ID=$(xcrun simctl list devices booted -j | grep -oE '[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}' | head -1); APP_GROUP=$(grep -rl peek-mobile \"$HOME/Library/Developer/CoreSimulator/Devices/$DEVICE_ID/data/Containers/Shared/AppGroup/\"*/.com.apple.mobile_container_manager.metadata.plist 2>/dev/null | head -1 | xargs dirname); echo \"AppGroup: $APP_GROUP\"; find \"$APP_GROUP\" -maxdepth 1 \\( -name 'profiles.json' -o -name '*.db' -o -name '*.db-shm' -o -name '*.db-wal' \\) -delete -print; echo 'Remaining:'; ls \"$APP_GROUP/\"", "mobile:ios:sim:fresh": "yarn mobile:ios:sim:clean; xcrun simctl terminate booted com.dietrich.peek-mobile 2>/dev/null; xcrun simctl launch booted com.dietrich.peek-mobile; sleep 2; yarn mobile:ios:sim:status", "mobile:ios:sim:status": "DEVICE_ID=$(xcrun simctl list devices booted -j | grep -oE '[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}' | head -1); APP_GROUP=$(grep -rl peek-mobile \"$HOME/Library/Developer/CoreSimulator/Devices/$DEVICE_ID/data/Containers/Shared/AppGroup/\"*/.com.apple.mobile_container_manager.metadata.plist 2>/dev/null | head -1 | xargs dirname); echo \"AppGroup: $APP_GROUP\"; echo '=== profiles.json ==='; cat \"$APP_GROUP/profiles.json\" 2>/dev/null || echo '(not found)'; echo ''; echo '=== Databases ==='; ls -la \"$APP_GROUP/\"*.db 2>/dev/null || echo '(none)'", "mobile:ios:sim:build-fresh": "yarn mobile:ios:xcodebuild:full && yarn mobile:ios:sim:fresh", "mobile:ios:test": "cd backend/tauri-mobile && ./dev-setup.sh", "mobile:android:init": "cd backend/tauri-mobile/src-tauri && cargo tauri android init", "mobile:android:dev": "cd backend/tauri-mobile/src-tauri && cargo tauri android dev", "mobile:android:build": "cd backend/tauri-mobile/src-tauri && cargo tauri android build", "//-- Server (webhook API backend in backend/server) --//": "", "server:start": "cd backend/server && npm start", "server:dev": "cd backend/server && npm run dev", "server:dev:data": "./scripts/dev-server-with-data.sh", "server:test": "cd backend/server && npm test", "server:test:api": "cd backend/server && npm run test:api", "server:install": "cd backend/server && npm install", "server:healthcheck": "cd backend/server && npm run healthcheck", "server:deploy": "./scripts/deploy-server.sh", "//-- Schema Codegen --//": "", "schema:codegen": "node schema/codegen.js", "schema:test": "node --test schema/fidelity.test.js", "schema:check": "node schema/check-freshness.js", "//-- Sync Tests --//": "", "test:sync": "node backend/tests/sync-integration.test.js", "test:sync:verbose": "VERBOSE=1 node backend/tests/sync-integration.test.js", "test:sync:e2e": "node backend/tests/sync-e2e.test.js", "test:sync:e2e:verbose": "VERBOSE=1 node backend/tests/sync-e2e.test.js", "test:sync:e2e:prod": "node backend/tests/sync-e2e-prod.test.js", "test:sync:e2e:prod:verbose": "VERBOSE=1 node backend/tests/sync-e2e-prod.test.js", "test:sync:verify-logs": "node backend/tests/verify-railway-logs.js", "test:sync:desktop": "./scripts/test-sync-desktop.sh", "test:sync:three-way": "node backend/tests/sync-three-way.test.js", "test:sync:three-way:verbose": "VERBOSE=1 node backend/tests/sync-three-way.test.js", "test:sync:ios": "./scripts/ios-sync-test.sh", "test:version-compat": "node backend/tests/sync-version-compat.test.js", "test:version-compat:e2e": "./scripts/version-compat-e2e.sh", "test:e2e:version": "./scripts/e2e-version-test.sh", "test:e2e:version:phase": "./scripts/e2e-version-test.sh --phase", "test:e2e:server": "./scripts/e2e-server.sh", "interactive-test:e2e:full-sync": "./scripts/e2e-full-sync-test.sh", "interactive-test:e2e:full-sync:auto": "./scripts/e2e-full-sync-test.sh --headless --build", "test:e2e:mobile": "LOCAL_IP=localhost ./scripts/e2e-full-sync-test.sh --headless --build", "test:mobile": "cd backend/tauri-mobile && npm test", "test:extension": "node --test backend/extension/tests/*.test.js", "test:extension:e2e": "node --test backend/extension/tests/sync-e2e.test.js", "test:extension:e2e:verbose": "VERBOSE=1 node --test backend/extension/tests/sync-e2e.test.js", "test:extension:browser": "BROWSER=chrome npx playwright test tests/extension/ --project=extension-chrome", "test:extension:browser:visible": "HEADLESS=0 BROWSER=chrome npx playwright test tests/extension/ --project=extension-chrome --headed", "extension:chrome": "backend/extension/scripts/launch-chrome.sh", "extension:firefox": "web-ext run --source-dir backend/extension --firefox-profile /tmp/peek-firefox-profile --keep-profile-changes --no-reload", "//-- Packaged Electron --//": "", "kill:packaged": "pkill -f 'out/mac-arm64/Peek.app' || true", "kill:prod": "pkill -f '/Applications/Peek.app' || true", "run:packaged": "yarn kill:packaged; open out/mac-arm64/Peek.app", "run:packaged:debug": "yarn kill:packaged; DEBUG=1 out/mac-arm64/Peek.app/Contents/MacOS/Peek", "run:packaged:bg": "yarn kill:packaged; out/mac-arm64/Peek.app/Contents/MacOS/Peek > /tmp/packaged-debug.log 2>&1 &", "run:packaged:debug:bg": "yarn kill:packaged; DEBUG=1 out/mac-arm64/Peek.app/Contents/MacOS/Peek > /tmp/packaged-debug.log 2>&1 &", "run:packaged:check": "yarn kill:packaged; out/mac-arm64/Peek.app/Contents/MacOS/Peek 2>&1 | head -5; sleep 2; yarn kill:packaged", "run:prod": "yarn kill:prod; open /Applications/Peek.app", "run:prod:debug": "yarn kill:prod; /Applications/Peek.app/Contents/MacOS/Peek 2>&1", "run:prod:bg": "yarn kill:prod; /Applications/Peek.app/Contents/MacOS/Peek > /tmp/prod-debug.log 2>&1 &", "prod:log": "tail -f /tmp/prod-debug.log", "packaged:log": "tail -f /tmp/packaged-debug.log", "test:packaged": "yarn kill:packaged; HEADLESS=1 PACKAGED=1 npx playwright test tests/desktop/", "test:packaged:debug": "yarn kill:packaged; HEADLESS=1 PACKAGED=1 DEBUG=1 npx playwright test tests/desktop/", "//-- Testing --//": "", "test:unit": "./scripts/timed.sh sh -c 'yarn build && node --test dist/backend/electron/*.test.js'", "test:unit:modes": "./scripts/timed.sh sh -c 'yarn build && node --test dist/backend/electron/modes.test.js'", "test:unit:shortcuts": "./scripts/timed.sh sh -c 'yarn build && node --test dist/backend/electron/shortcuts.test.js'", "test:unit:datastore": "./scripts/timed.sh sh -c 'yarn build && node --test dist/backend/electron/datastore.test.js'", "test": "./scripts/timed.sh sh -c 'yarn build && yarn test:electron && yarn test:tauri'", "test:electron": "./scripts/timed.sh sh -c 'yarn check:native && yarn build && HEADLESS=1 BACKEND=electron npx playwright test tests/desktop/'", "test:electron:x": "./scripts/timed.sh sh -c 'yarn build && HEADLESS=1 BACKEND=electron npx playwright test tests/desktop/ -x'", "test:tauri": "./scripts/timed.sh sh -c 'yarn test:tauri:frontend; yarn test:tauri:rust'", "test:tauri:frontend": "./scripts/timed.sh sh -c 'HEADLESS=1 BACKEND=tauri npx playwright test tests/desktop/'", "test:tauri:rust": "./scripts/timed.sh sh -c 'cd backend/tauri/src-tauri && cargo test --test smoke -- --nocapture'", "test:visible": "./scripts/timed.sh sh -c 'yarn build && HEADLESS=0 BACKEND=electron npx playwright test tests/desktop/ --headed'", "test:debug": "./scripts/timed.sh sh -c 'yarn build && HEADLESS=0 npx playwright test --debug'", "test:grep": "./scripts/timed.sh sh -c 'yarn build && HEADLESS=1 npx playwright test tests/desktop/ --grep'", "test:electron:bg": "nohup yarn test:electron > /tmp/test-electron.log 2>&1 & disown; echo 'Tests running in background, see: /tmp/test-electron.log'", "test:log": "tail -f /tmp/test-electron.log", "//-- Misc (BACKEND=electron|tauri, defaults to electron) --//": "", "kill": "[ \"${BACKEND:-}\" = \"tauri\" ] && yarn kill:tauri || yarn kill:electron", "kill:electron": "pkill -f '/Users/dietrich/misc/peek/node_modules/.bin/electron' || true", "kill:tauri": "pkill -INT -f peek-tauri 2>/dev/null || true", "debug": "[ \"${BACKEND:-}\" = \"tauri\" ] && yarn debug:tauri || yarn debug:electron", "debug:headless": "./scripts/timed.sh sh -c 'yarn build && PEEK_HEADLESS=1 DEBUG=1 electron .'", "debug:electron": "./scripts/timed.sh sh -c 'yarn build && DEBUG=1 electron .'", "debug:electron:headless": "./scripts/timed.sh sh -c 'yarn build && PEEK_HEADLESS=1 DEBUG=1 electron .'", "debug:electron:log": "yarn kill:electron; sleep 1; yarn build && DEBUG=1 electron . 2>&1 | tee /tmp/electron-debug.log", "debug:electron:bg": "yarn kill:electron; sleep 1; yarn build && DEBUG=1 electron . > /tmp/electron-debug.log 2>&1 &", "electron:log": "tail -f /tmp/electron-debug.log", "debug:tauri": "cd backend/tauri/src-tauri && cargo run 2>&1", "debug:tauri:headless": "cd backend/tauri/src-tauri && PEEK_HEADLESS=1 cargo run 2>&1", "debug:tauri:log": "yarn kill:tauri; sleep 1; cd backend/tauri/src-tauri && cargo run 2>&1 | tee /tmp/tauri-debug.log", "debug:tauri:bg": "yarn kill:tauri; sleep 1; cd backend/tauri/src-tauri && cargo run > /tmp/tauri-debug.log 2>&1 &", "tauri:log": "tail -f /tmp/tauri-debug.log", "restart": "[ \"${BACKEND:-}\" = \"tauri\" ] && yarn restart:tauri || yarn restart:electron", "restart:headless": "yarn kill && yarn debug:headless", "restart:electron": "yarn kill:electron && sleep 1 && yarn debug:electron", "restart:tauri": "yarn kill:tauri && sleep 1 && yarn debug:tauri", "lint": "echo \"No linting configured\"" }, "dependencies": { "@cliqz/adblocker-electron": "^1.34.0", "@codemirror/commands": "^6.10.1", "@codemirror/lang-markdown": "^6.5.0", "@codemirror/language": "^6.12.1", "@codemirror/search": "^6.6.0", "@codemirror/state": "^6.5.4", "@codemirror/theme-one-dark": "^6.1.3", "@codemirror/view": "^6.39.11", "@replit/codemirror-vim": "^6.3.0", "archiver": "^7.0.0", "better-sqlite3": "^12.5.0", "cross-fetch": "^4.1.0", "electron-unhandled": "^5.0.0", "lit": "^3.3.2" }, "devDependencies": { "@electron/rebuild": "^4.0.2", "@playwright/test": "^1.57.0", "@types/archiver": "^6.0.0", "@types/better-sqlite3": "^7.6.13", "@types/node": "^25.0.3", "electron": "^40.0.0", "electron-builder": "26.0.12", "fake-indexeddb": "^6.2.5", "playwright": "^1.57.0", "playwright-webextext": "^0.0.4", "tslib": "^2.8.1", "typescript": "^5.9.3", "web-ext": "^9.2.0" }, "resolutions": { "tmp": "^0.2.5", "glob@^11.0.0": "^11.1.0" }, "packageManager": "yarn@4.12.0" }