commit 5b384c5baa3239c77a8ded34817b05ccf8994ba3 Author: CxAI Ops Date: Sat May 16 10:52:05 2026 -0500 chore: initial commit (Phase 3 scaffold) diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..5ef197b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true +indent_style = space +indent_size = 4 + +[*.{yml,yaml,json,md}] +indent_size = 2 + +[Makefile] +indent_style = tab diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..2a804da --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,36 @@ +name: ci +on: + push: + branches: [main, master] + pull_request: {} + workflow_dispatch: {} + +# We run a Linux runner; macOS xcodebuild is not available here. +# This workflow validates structure (yaml, file presence) and basic Swift. +jobs: + validate: + runs-on: cxai-hostinger + container: debian:bookworm + steps: + - name: Install deps + run: | + apt-get update -qq + apt-get install -y --no-install-recommends git ca-certificates curl python3-yaml >/dev/null + - uses: actions/checkout@v4 + - name: Lint workflow YAML + run: | + python3 - <<'PY' + import sys, yaml, glob + for f in glob.glob('.gitea/workflows/*.yml') + glob.glob('.github/workflows/*.yml'): + try: + yaml.safe_load(open(f)) + except Exception as e: + print(f'YAML ERROR {f}: {e}'); sys.exit(1) + print('workflows ok') + PY + - name: Project sanity + run: | + test -f README.md || (echo "missing README" && exit 1) + test -f Makefile || (echo "missing Makefile" && exit 1) + ls *.xcodeproj >/dev/null 2>&1 && echo "xcodeproj: $(ls -d *.xcodeproj)" || true + [ -f Package.swift ] && echo "Package.swift present" || true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..39d201f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: ci +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: build (${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [macos-14] + steps: + - uses: actions/checkout@v4 + - name: Show toolchain + run: | + xcodebuild -version || true + swift --version || true + - name: Build + run: make build + - name: Test + run: make test + - name: Lint + run: make lint diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f4ca831 --- /dev/null +++ b/.gitignore @@ -0,0 +1,54 @@ +# macOS +.DS_Store +.AppleDouble +.LSOverride +Icon? + +# Xcode +build/ +DerivedData/ +*.xcworkspace/xcuserdata/ +*.xcodeproj/xcuserdata/ +*.xcodeproj/project.xcworkspace/xcuserdata/ +*.xcuserstate +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +# SwiftPM +.build/ +.swiftpm/xcode/ +.swiftpm/configuration/ +Package.resolved + +# CocoaPods / Carthage +Pods/ +Carthage/Build/ + +# fastlane +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output/ + +# Coverage +*.gcno +*.gcda +*.profdata +*.profraw +coverage/ + +# Editors +.vscode/ +.idea/ +*.swp + +# Local +*.local +secrets.env diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..62600d0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,16 @@ +# Changelog + +All notable changes to this project will be documented here. +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) +and this project adheres to [Semantic Versioning](https://semver.org/). + +## [Unreleased] + +### Added +- Repository scaffolding: README, LICENSE (MIT), .gitignore, Makefile, + CONTRIBUTING, SECURITY, CODEOWNERS, .editorconfig, CI workflow. + +## [0.1.0] - 2026-04-22 + +### Added +- Initial safari-extension scaffold for CxLLM-SAFARI. diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..7e6dfca --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,6 @@ +# Default owners for everything in this repo. +* @CxAI-LLM/maintainers + +# Build & CI +/.github/ @CxAI-LLM/devops +/Makefile @CxAI-LLM/devops diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ae93e93 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,23 @@ +# Contributing to CxLLM-SAFARI + +Thanks for taking the time to contribute! + +## Workflow + +1. Open an issue describing the change before sending a PR for non-trivial work. +2. Fork / branch off `main`. Use a descriptive branch name (`feat/...`, `fix/...`). +3. Keep commits scoped and use **Conventional Commits** (`feat:`, `fix:`, + `docs:`, `refactor:`, `test:`, `chore:`). +4. Run `make lint` and `make test` before pushing. +5. Open a PR — CI must pass before review. + +## Coding style + +- Swift: `swiftformat` defaults + `swiftlint` rules from the umbrella repo. +- Objective-C / C / C++: clang-format `-style=Google`. +- No tabs in Swift; 4-space indent in C/C++. + +## Code of conduct + +By contributing you agree to abide by the project's Code of Conduct +(see the umbrella `cxllm-code` repo). diff --git a/CxLLM-SAFARI.xcodeproj/project.pbxproj b/CxLLM-SAFARI.xcodeproj/project.pbxproj new file mode 100644 index 0000000..61d559e --- /dev/null +++ b/CxLLM-SAFARI.xcodeproj/project.pbxproj @@ -0,0 +1,909 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 77; + objects = { + +/* Begin PBXBuildFile section */ + 20F2B0CE2F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 20F2B0CD2F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + 20F2B0D82F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 20F2B0D72F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 20F2B0CF2F99764000E7D2D9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 20F2B08B2F99763E00E7D2D9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 20F2B0CC2F99764000E7D2D9; + remoteInfo = "CxLLM-SAFARI Extension (iOS)"; + }; + 20F2B0D92F99764000E7D2D9 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 20F2B08B2F99763E00E7D2D9 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 20F2B0D62F99764000E7D2D9; + remoteInfo = "CxLLM-SAFARI Extension (macOS)"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 20F2B1002F99764000E7D2D9 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 20F2B0CE2F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B10A2F99764000E7D2D9 /* Embed Foundation Extensions */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 13; + files = ( + 20F2B0D82F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex in Embed Foundation Extensions */, + ); + name = "Embed Foundation Extensions"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 20F2B0A92F99764000E7D2D9 /* CxLLM-SAFARI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CxLLM-SAFARI.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 20F2B0BF2F99764000E7D2D9 /* CxLLM-SAFARI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CxLLM-SAFARI.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 20F2B0CD2F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "CxLLM-SAFARI Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 20F2B0D72F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "CxLLM-SAFARI Extension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ + 20F2B0FB2F99764000E7D2D9 /* Exceptions for "Shared (App)" folder in "CxLLM-SAFARI (iOS)" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + "/Localized: Resources/Main.html", + Assets.xcassets, + Resources/Icon.png, + Resources/Script.js, + Resources/Style.css, + ViewController.m, + ); + target = 20F2B0A82F99764000E7D2D9 /* CxLLM-SAFARI (iOS) */; + }; + 20F2B0FF2F99764000E7D2D9 /* Exceptions for "iOS (Extension)" folder in "CxLLM-SAFARI Extension (iOS)" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 20F2B0CC2F99764000E7D2D9 /* CxLLM-SAFARI Extension (iOS) */; + }; + 20F2B1042F99764000E7D2D9 /* Exceptions for "iOS (App)" folder in "CxLLM-SAFARI (iOS)" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 20F2B0A82F99764000E7D2D9 /* CxLLM-SAFARI (iOS) */; + }; + 20F2B1052F99764000E7D2D9 /* Exceptions for "Shared (App)" folder in "CxLLM-SAFARI (macOS)" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + "/Localized: Resources/Main.html", + Assets.xcassets, + Resources/Icon.png, + Resources/Script.js, + Resources/Style.css, + ViewController.m, + ); + target = 20F2B0BE2F99764000E7D2D9 /* CxLLM-SAFARI (macOS) */; + }; + 20F2B1092F99764000E7D2D9 /* Exceptions for "macOS (Extension)" folder in "CxLLM-SAFARI Extension (macOS)" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Info.plist, + ); + target = 20F2B0D62F99764000E7D2D9 /* CxLLM-SAFARI Extension (macOS) */; + }; + 20F2B10E2F99764000E7D2D9 /* Exceptions for "Shared (Extension)" folder in "CxLLM-SAFARI Extension (iOS)" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Resources/_locales, + Resources/background.js, + Resources/content.js, + Resources/images, + Resources/manifest.json, + Resources/popup.css, + Resources/popup.html, + Resources/popup.js, + SafariWebExtensionHandler.m, + ); + target = 20F2B0CC2F99764000E7D2D9 /* CxLLM-SAFARI Extension (iOS) */; + }; + 20F2B10F2F99764000E7D2D9 /* Exceptions for "Shared (Extension)" folder in "CxLLM-SAFARI Extension (macOS)" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Resources/_locales, + Resources/background.js, + Resources/content.js, + Resources/images, + Resources/manifest.json, + Resources/popup.css, + Resources/popup.html, + Resources/popup.js, + SafariWebExtensionHandler.m, + ); + target = 20F2B0D62F99764000E7D2D9 /* CxLLM-SAFARI Extension (macOS) */; + }; +/* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ + +/* Begin PBXFileSystemSynchronizedRootGroup section */ + 20F2B08F2F99763E00E7D2D9 /* Shared (App) */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 20F2B0FB2F99764000E7D2D9 /* Exceptions for "Shared (App)" folder in "CxLLM-SAFARI (iOS)" target */, + 20F2B1052F99764000E7D2D9 /* Exceptions for "Shared (App)" folder in "CxLLM-SAFARI (macOS)" target */, + ); + path = "Shared (App)"; + sourceTree = ""; + }; + 20F2B0992F99764000E7D2D9 /* Shared (Extension) */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 20F2B10E2F99764000E7D2D9 /* Exceptions for "Shared (Extension)" folder in "CxLLM-SAFARI Extension (iOS)" target */, + 20F2B10F2F99764000E7D2D9 /* Exceptions for "Shared (Extension)" folder in "CxLLM-SAFARI Extension (macOS)" target */, + ); + explicitFolders = ( + Resources/_locales, + Resources/images, + ); + path = "Shared (Extension)"; + sourceTree = ""; + }; + 20F2B0AB2F99764000E7D2D9 /* iOS (App) */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 20F2B1042F99764000E7D2D9 /* Exceptions for "iOS (App)" folder in "CxLLM-SAFARI (iOS)" target */, + ); + path = "iOS (App)"; + sourceTree = ""; + }; + 20F2B0C02F99764000E7D2D9 /* macOS (App) */ = { + isa = PBXFileSystemSynchronizedRootGroup; + path = "macOS (App)"; + sourceTree = ""; + }; + 20F2B0D12F99764000E7D2D9 /* iOS (Extension) */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 20F2B0FF2F99764000E7D2D9 /* Exceptions for "iOS (Extension)" folder in "CxLLM-SAFARI Extension (iOS)" target */, + ); + path = "iOS (Extension)"; + sourceTree = ""; + }; + 20F2B0DB2F99764000E7D2D9 /* macOS (Extension) */ = { + isa = PBXFileSystemSynchronizedRootGroup; + exceptions = ( + 20F2B1092F99764000E7D2D9 /* Exceptions for "macOS (Extension)" folder in "CxLLM-SAFARI Extension (macOS)" target */, + ); + path = "macOS (Extension)"; + sourceTree = ""; + }; +/* End PBXFileSystemSynchronizedRootGroup section */ + +/* Begin PBXFrameworksBuildPhase section */ + 20F2B0A62F99764000E7D2D9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0BC2F99764000E7D2D9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0CA2F99764000E7D2D9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0D42F99764000E7D2D9 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 20F2B08A2F99763E00E7D2D9 = { + isa = PBXGroup; + children = ( + 20F2B08F2F99763E00E7D2D9 /* Shared (App) */, + 20F2B0992F99764000E7D2D9 /* Shared (Extension) */, + 20F2B0AB2F99764000E7D2D9 /* iOS (App) */, + 20F2B0C02F99764000E7D2D9 /* macOS (App) */, + 20F2B0D12F99764000E7D2D9 /* iOS (Extension) */, + 20F2B0DB2F99764000E7D2D9 /* macOS (Extension) */, + 20F2B0AA2F99764000E7D2D9 /* Products */, + ); + sourceTree = ""; + }; + 20F2B0AA2F99764000E7D2D9 /* Products */ = { + isa = PBXGroup; + children = ( + 20F2B0A92F99764000E7D2D9 /* CxLLM-SAFARI.app */, + 20F2B0BF2F99764000E7D2D9 /* CxLLM-SAFARI.app */, + 20F2B0CD2F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex */, + 20F2B0D72F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 20F2B0A82F99764000E7D2D9 /* CxLLM-SAFARI (iOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = 20F2B1012F99764000E7D2D9 /* Build configuration list for PBXNativeTarget "CxLLM-SAFARI (iOS)" */; + buildPhases = ( + 20F2B0A52F99764000E7D2D9 /* Sources */, + 20F2B0A62F99764000E7D2D9 /* Frameworks */, + 20F2B0A72F99764000E7D2D9 /* Resources */, + 20F2B1002F99764000E7D2D9 /* Embed Foundation Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 20F2B0D02F99764000E7D2D9 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 20F2B0AB2F99764000E7D2D9 /* iOS (App) */, + ); + name = "CxLLM-SAFARI (iOS)"; + packageProductDependencies = ( + ); + productName = "CxLLM-SAFARI (iOS)"; + productReference = 20F2B0A92F99764000E7D2D9 /* CxLLM-SAFARI.app */; + productType = "com.apple.product-type.application"; + }; + 20F2B0BE2F99764000E7D2D9 /* CxLLM-SAFARI (macOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = 20F2B10B2F99764000E7D2D9 /* Build configuration list for PBXNativeTarget "CxLLM-SAFARI (macOS)" */; + buildPhases = ( + 20F2B0BB2F99764000E7D2D9 /* Sources */, + 20F2B0BC2F99764000E7D2D9 /* Frameworks */, + 20F2B0BD2F99764000E7D2D9 /* Resources */, + 20F2B10A2F99764000E7D2D9 /* Embed Foundation Extensions */, + ); + buildRules = ( + ); + dependencies = ( + 20F2B0DA2F99764000E7D2D9 /* PBXTargetDependency */, + ); + fileSystemSynchronizedGroups = ( + 20F2B0C02F99764000E7D2D9 /* macOS (App) */, + ); + name = "CxLLM-SAFARI (macOS)"; + packageProductDependencies = ( + ); + productName = "CxLLM-SAFARI (macOS)"; + productReference = 20F2B0BF2F99764000E7D2D9 /* CxLLM-SAFARI.app */; + productType = "com.apple.product-type.application"; + }; + 20F2B0CC2F99764000E7D2D9 /* CxLLM-SAFARI Extension (iOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = 20F2B0FC2F99764000E7D2D9 /* Build configuration list for PBXNativeTarget "CxLLM-SAFARI Extension (iOS)" */; + buildPhases = ( + 20F2B0C92F99764000E7D2D9 /* Sources */, + 20F2B0CA2F99764000E7D2D9 /* Frameworks */, + 20F2B0CB2F99764000E7D2D9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 20F2B0D12F99764000E7D2D9 /* iOS (Extension) */, + ); + name = "CxLLM-SAFARI Extension (iOS)"; + packageProductDependencies = ( + ); + productName = "CxLLM-SAFARI Extension (iOS)"; + productReference = 20F2B0CD2F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex */; + productType = "com.apple.product-type.app-extension"; + }; + 20F2B0D62F99764000E7D2D9 /* CxLLM-SAFARI Extension (macOS) */ = { + isa = PBXNativeTarget; + buildConfigurationList = 20F2B1062F99764000E7D2D9 /* Build configuration list for PBXNativeTarget "CxLLM-SAFARI Extension (macOS)" */; + buildPhases = ( + 20F2B0D32F99764000E7D2D9 /* Sources */, + 20F2B0D42F99764000E7D2D9 /* Frameworks */, + 20F2B0D52F99764000E7D2D9 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 20F2B0DB2F99764000E7D2D9 /* macOS (Extension) */, + ); + name = "CxLLM-SAFARI Extension (macOS)"; + packageProductDependencies = ( + ); + productName = "CxLLM-SAFARI Extension (macOS)"; + productReference = 20F2B0D72F99764000E7D2D9 /* CxLLM-SAFARI Extension.appex */; + productType = "com.apple.product-type.app-extension"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 20F2B08B2F99763E00E7D2D9 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 2630; + TargetAttributes = { + 20F2B0A82F99764000E7D2D9 = { + CreatedOnToolsVersion = 26.3; + }; + 20F2B0BE2F99764000E7D2D9 = { + CreatedOnToolsVersion = 26.3; + }; + 20F2B0CC2F99764000E7D2D9 = { + CreatedOnToolsVersion = 26.3; + }; + 20F2B0D62F99764000E7D2D9 = { + CreatedOnToolsVersion = 26.3; + }; + }; + }; + buildConfigurationList = 20F2B08E2F99763E00E7D2D9 /* Build configuration list for PBXProject "CxLLM-SAFARI" */; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 20F2B08A2F99763E00E7D2D9; + minimizedProjectReferenceProxies = 1; + preferredProjectObjectVersion = 77; + productRefGroup = 20F2B0AA2F99764000E7D2D9 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 20F2B0A82F99764000E7D2D9 /* CxLLM-SAFARI (iOS) */, + 20F2B0BE2F99764000E7D2D9 /* CxLLM-SAFARI (macOS) */, + 20F2B0CC2F99764000E7D2D9 /* CxLLM-SAFARI Extension (iOS) */, + 20F2B0D62F99764000E7D2D9 /* CxLLM-SAFARI Extension (macOS) */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 20F2B0A72F99764000E7D2D9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0BD2F99764000E7D2D9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0CB2F99764000E7D2D9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0D52F99764000E7D2D9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 20F2B0A52F99764000E7D2D9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0BB2F99764000E7D2D9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0C92F99764000E7D2D9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 20F2B0D32F99764000E7D2D9 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 20F2B0D02F99764000E7D2D9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 20F2B0CC2F99764000E7D2D9 /* CxLLM-SAFARI Extension (iOS) */; + targetProxy = 20F2B0CF2F99764000E7D2D9 /* PBXContainerItemProxy */; + }; + 20F2B0DA2F99764000E7D2D9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 20F2B0D62F99764000E7D2D9 /* CxLLM-SAFARI Extension (macOS) */; + targetProxy = 20F2B0D92F99764000E7D2D9 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 20F2B0FD2F99764000E7D2D9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = DKWVC9FQJY; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "iOS (Extension)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "CxLLM-SAFARI Extension"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + ); + PRODUCT_BUNDLE_IDENTIFIER = "cxai-studio.CxLLM-SAFARI.Extension"; + PRODUCT_NAME = "CxLLM-SAFARI Extension"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 20F2B0FE2F99764000E7D2D9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = DKWVC9FQJY; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "iOS (Extension)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "CxLLM-SAFARI Extension"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@executable_path/../../Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + ); + PRODUCT_BUNDLE_IDENTIFIER = "cxai-studio.CxLLM-SAFARI.Extension"; + PRODUCT_NAME = "CxLLM-SAFARI Extension"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 20F2B1022F99764000E7D2D9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = DKWVC9FQJY; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "iOS (App)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "CxLLM-SAFARI"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + "-framework", + WebKit, + ); + PRODUCT_BUNDLE_IDENTIFIER = "cxai-studio.CxLLM-SAFARI"; + PRODUCT_NAME = "CxLLM-SAFARI"; + SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 20F2B1032F99764000E7D2D9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = DKWVC9FQJY; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "iOS (App)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "CxLLM-SAFARI"; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; + INFOPLIST_KEY_UIMainStoryboardFile = Main; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + IPHONEOS_DEPLOYMENT_TARGET = 15.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + "-framework", + WebKit, + ); + PRODUCT_BUNDLE_IDENTIFIER = "cxai-studio.CxLLM-SAFARI"; + PRODUCT_NAME = "CxLLM-SAFARI"; + SDKROOT = iphoneos; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 20F2B1072F99764000E7D2D9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = DKWVC9FQJY; + ENABLE_APP_SANDBOX = YES; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_USER_SELECTED_FILES = readonly; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "macOS (Extension)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "CxLLM-SAFARI Extension"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@executable_path/../../../../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + ); + PRODUCT_BUNDLE_IDENTIFIER = "cxai-studio.CxLLM-SAFARI.Extension"; + PRODUCT_NAME = "CxLLM-SAFARI Extension"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + }; + name = Debug; + }; + 20F2B1082F99764000E7D2D9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = DKWVC9FQJY; + ENABLE_APP_SANDBOX = YES; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_USER_SELECTED_FILES = readonly; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "macOS (Extension)/Info.plist"; + INFOPLIST_KEY_CFBundleDisplayName = "CxLLM-SAFARI Extension"; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@executable_path/../../../../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + ); + PRODUCT_BUNDLE_IDENTIFIER = "cxai-studio.CxLLM-SAFARI.Extension"; + PRODUCT_NAME = "CxLLM-SAFARI Extension"; + SDKROOT = macosx; + SKIP_INSTALL = YES; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + }; + name = Release; + }; + 20F2B10C2F99764000E7D2D9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = DKWVC9FQJY; + ENABLE_APP_SANDBOX = YES; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES; + ENABLE_USER_SELECTED_FILES = readonly; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "CxLLM-SAFARI"; + INFOPLIST_KEY_NSMainStoryboardFile = Main; + INFOPLIST_KEY_NSPrincipalClass = NSApplication; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + "-framework", + WebKit, + ); + PRODUCT_BUNDLE_IDENTIFIER = "cxai-studio.CxLLM-SAFARI"; + PRODUCT_NAME = "CxLLM-SAFARI"; + REGISTER_APP_GROUPS = YES; + SDKROOT = macosx; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + }; + name = Debug; + }; + 20F2B10D2F99764000E7D2D9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_TEAM = DKWVC9FQJY; + ENABLE_APP_SANDBOX = YES; + ENABLE_HARDENED_RUNTIME = YES; + ENABLE_OUTGOING_NETWORK_CONNECTIONS = YES; + ENABLE_USER_SELECTED_FILES = readonly; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "CxLLM-SAFARI"; + INFOPLIST_KEY_NSMainStoryboardFile = Main; + INFOPLIST_KEY_NSPrincipalClass = NSApplication; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.14; + MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "-framework", + SafariServices, + "-framework", + WebKit, + ); + PRODUCT_BUNDLE_IDENTIFIER = "cxai-studio.CxLLM-SAFARI"; + PRODUCT_NAME = "CxLLM-SAFARI"; + REGISTER_APP_GROUPS = YES; + SDKROOT = macosx; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + }; + name = Release; + }; + 20F2B1102F99764000E7D2D9 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = DKWVC9FQJY; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + }; + name = Debug; + }; + 20F2B1112F99764000E7D2D9 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = DKWVC9FQJY; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = YES; + GCC_C_LANGUAGE_STANDARD = gnu17; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + LOCALIZATION_PREFERS_STRING_CATALOGS = YES; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 20F2B08E2F99763E00E7D2D9 /* Build configuration list for PBXProject "CxLLM-SAFARI" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20F2B1102F99764000E7D2D9 /* Debug */, + 20F2B1112F99764000E7D2D9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 20F2B0FC2F99764000E7D2D9 /* Build configuration list for PBXNativeTarget "CxLLM-SAFARI Extension (iOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20F2B0FD2F99764000E7D2D9 /* Debug */, + 20F2B0FE2F99764000E7D2D9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 20F2B1012F99764000E7D2D9 /* Build configuration list for PBXNativeTarget "CxLLM-SAFARI (iOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20F2B1022F99764000E7D2D9 /* Debug */, + 20F2B1032F99764000E7D2D9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 20F2B1062F99764000E7D2D9 /* Build configuration list for PBXNativeTarget "CxLLM-SAFARI Extension (macOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20F2B1072F99764000E7D2D9 /* Debug */, + 20F2B1082F99764000E7D2D9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 20F2B10B2F99764000E7D2D9 /* Build configuration list for PBXNativeTarget "CxLLM-SAFARI (macOS)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 20F2B10C2F99764000E7D2D9 /* Debug */, + 20F2B10D2F99764000E7D2D9 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 20F2B08B2F99763E00E7D2D9 /* Project object */; +} diff --git a/CxLLM-SAFARI.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/CxLLM-SAFARI.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/CxLLM-SAFARI.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..114f83a --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 CxAI-LLM + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3f0d888 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +# Makefile — common entry points for CxLLM-SAFARI +SHELL := /bin/bash +.DEFAULT_GOAL := help + +PROJECT := CxLLM-SAFARI +SCHEME ?= $(PROJECT) +CONFIG ?= Debug +DERIVED ?= build + +.PHONY: help build test lint clean fmt info + +help: ## show this help + @grep -E '^[a-zA-Z_-]+:.*## ' $(MAKEFILE_LIST) | awk -F':.*## ' '{printf " %-12s %s\n", $$1, $$2}' + +info: ## show project info + @echo "project : $(PROJECT)" + @echo "scheme : $(SCHEME)" + @echo "config : $(CONFIG)" + @echo "derived : $(DERIVED)" + +build: ## xcodebuild build (skip if no .xcodeproj) + @if ls *.xcodeproj 1>/dev/null 2>&1; then \ + xcodebuild -project "$(PROJECT).xcodeproj" -scheme "$(SCHEME)" -configuration "$(CONFIG)" -derivedDataPath "$(DERIVED)" build | xcbeautify || true ; \ + elif [ -f Package.swift ]; then \ + swift build -c $(shell echo "$(CONFIG)" | tr '[:upper:]' '[:lower:]') ; \ + else echo "no buildable target" ; fi + +test: ## xcodebuild test + @if ls *.xcodeproj 1>/dev/null 2>&1; then \ + xcodebuild -project "$(PROJECT).xcodeproj" -scheme "$(SCHEME)" -configuration "$(CONFIG)" -derivedDataPath "$(DERIVED)" test | xcbeautify || true ; \ + elif [ -f Package.swift ]; then \ + swift test ; \ + else echo "no testable target" ; fi + +lint: ## swiftlint + swiftformat (no-op if missing) + @command -v swiftlint >/dev/null && swiftlint --quiet || echo "swiftlint not installed" + @command -v swiftformat >/dev/null && swiftformat --lint . || echo "swiftformat not installed" + +fmt: ## swiftformat in-place + @command -v swiftformat >/dev/null && swiftformat . || echo "swiftformat not installed" + +clean: ## remove build artifacts + rm -rf "$(DERIVED)" .build DerivedData diff --git a/README.md b/README.md new file mode 100644 index 0000000..2a274e6 --- /dev/null +++ b/README.md @@ -0,0 +1,53 @@ +# CxLLM-SAFARI + +> CxLLM Safari Web Extension + +Safari Web Extension (iOS + macOS shared) that injects the CxLLM assistant overlay into web pages and forwards selections to the runtime. + +[![ci](https://git.cxllm-studio.com/CxAI-LLM/CxLLM-SAFARI/actions/workflows/ci.yml/badge.svg)](https://git.cxllm-studio.com/CxAI-LLM/CxLLM-SAFARI/actions) +[![license](https://img.shields.io/badge/license-MIT-7C3AED)](LICENSE) +[![category](https://img.shields.io/badge/category-safari-extension-1F6FEB)](#) + +## Overview + +`CxLLM-SAFARI` is part of the **CxLLM** product family — a layered runtime that +spans Apple kernel extensions, user-space frameworks, host applications, and +spatial / web surfaces. This module focuses on **safari-extension** concerns and is +intentionally narrow so that the CxLLM monorepo can compose targets without +pulling in unrelated dependencies. + +## Repository layout + +- `CxLLM-SAFARI/` — primary source folder (matches the Xcode group / SwiftPM root). +- `CxLLM-SAFARI.xcodeproj` — Xcode project (where applicable). +- `Makefile` — common entry points (`build`, `test`, `lint`, `clean`). +- `.github/workflows/ci.yml` — CI pipeline (Xcode build + lint). +- `docs/` — architecture notes and ADRs. + +## Quick start + +```bash +# Build (defaults to Debug for the host platform): +make build + +# Run the full test suite (unit + UI where applicable): +make test + +# Static analysis + format check: +make lint +``` + +## Versioning + +This module follows [Semantic Versioning 2.0](https://semver.org/) and is +released in lock-step with the umbrella **CxLLM** product line. See +[`CHANGELOG.md`](CHANGELOG.md) for the user-facing change log. + +## Security + +Please report security issues per [`SECURITY.md`](SECURITY.md). Do **not** +open public issues for vulnerabilities. + +## License + +Released under the [MIT License](LICENSE) © 2026 CxAI-LLM. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..8146f22 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,19 @@ +# Security policy for CxLLM-SAFARI + +## Reporting a vulnerability + +Please email **security@cxllm-studio.com** with: + +- A description of the vulnerability and its impact. +- Steps to reproduce, ideally with a minimal proof-of-concept. +- The affected version(s) / commit SHAs. + +We aim to acknowledge within **2 business days** and to publish a fix or +mitigation within **30 days** for high-severity issues. + +Do **not** open a public Gitea / GitHub issue for vulnerabilities. + +## Supported versions + +Only the `main` branch and the most recent tagged release receive security +updates. diff --git a/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json b/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Shared (App)/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json b/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..ffdfe15 --- /dev/null +++ b/Shared (App)/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,85 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Shared (App)/Assets.xcassets/Contents.json b/Shared (App)/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Shared (App)/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json b/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json new file mode 100644 index 0000000..a19a549 --- /dev/null +++ b/Shared (App)/Assets.xcassets/LargeIcon.imageset/Contents.json @@ -0,0 +1,20 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Shared (App)/Resources/Base.lproj/Main.html b/Shared (App)/Resources/Base.lproj/Main.html new file mode 100644 index 0000000..7a203e1 --- /dev/null +++ b/Shared (App)/Resources/Base.lproj/Main.html @@ -0,0 +1,20 @@ + + + + + + + + + + + + + CxLLM-SAFARI Icon +

You can turn on CxLLM-SAFARI’s Safari extension in Settings.

+

You can turn on CxLLM-SAFARI’s extension in Safari Extensions preferences.

+

CxLLM-SAFARI’s extension is currently on. You can turn it off in Safari Extensions preferences.

+

CxLLM-SAFARI’s extension is currently off. You can turn it on in Safari Extensions preferences.

+ + + diff --git a/Shared (App)/Resources/Icon.png b/Shared (App)/Resources/Icon.png new file mode 100644 index 0000000..423b491 Binary files /dev/null and b/Shared (App)/Resources/Icon.png differ diff --git a/Shared (App)/Resources/Script.js b/Shared (App)/Resources/Script.js new file mode 100644 index 0000000..654b400 --- /dev/null +++ b/Shared (App)/Resources/Script.js @@ -0,0 +1,24 @@ +function show(platform, enabled, useSettingsInsteadOfPreferences) { + document.body.classList.add(`platform-${platform}`); + + if (useSettingsInsteadOfPreferences) { + document.getElementsByClassName('platform-mac state-on')[0].innerText = "CxLLM-SAFARI’s extension is currently on. You can turn it off in the Extensions section of Safari Settings."; + document.getElementsByClassName('platform-mac state-off')[0].innerText = "CxLLM-SAFARI’s extension is currently off. You can turn it on in the Extensions section of Safari Settings."; + document.getElementsByClassName('platform-mac state-unknown')[0].innerText = "You can turn on CxLLM-SAFARI’s extension in the Extensions section of Safari Settings."; + document.getElementsByClassName('platform-mac open-preferences')[0].innerText = "Quit and Open Safari Settings…"; + } + + if (typeof enabled === "boolean") { + document.body.classList.toggle(`state-on`, enabled); + document.body.classList.toggle(`state-off`, !enabled); + } else { + document.body.classList.remove(`state-on`); + document.body.classList.remove(`state-off`); + } +} + +function openPreferences() { + webkit.messageHandlers.controller.postMessage("open-preferences"); +} + +document.querySelector("button.open-preferences").addEventListener("click", openPreferences); diff --git a/Shared (App)/Resources/Style.css b/Shared (App)/Resources/Style.css new file mode 100644 index 0000000..b6d0608 --- /dev/null +++ b/Shared (App)/Resources/Style.css @@ -0,0 +1,61 @@ +* { + -webkit-user-select: none; + -webkit-user-drag: none; + cursor: default; +} + +:root { + color-scheme: light dark; + + --spacing: 20px; +} + +html { + height: 100%; +} + +body { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + + gap: var(--spacing); + margin: 0 calc(var(--spacing) * 2); + height: 100%; + + font: -apple-system-short-body; + text-align: center; +} + +body:not(.platform-mac, .platform-ios) :is(.platform-mac, .platform-ios) { + display: none; +} + +body.platform-ios .platform-mac { + display: none; +} + +body.platform-mac .platform-ios { + display: none; +} + +body.platform-ios .platform-mac { + display: none; +} + +body:not(.state-on, .state-off) :is(.state-on, .state-off) { + display: none; +} + +body.state-on :is(.state-off, .state-unknown) { + display: none; +} + +body.state-off :is(.state-on, .state-unknown) { + display: none; +} + +button { + font-size: 1em; +} diff --git a/Shared (App)/ViewController.h b/Shared (App)/ViewController.h new file mode 100644 index 0000000..76e7a50 --- /dev/null +++ b/Shared (App)/ViewController.h @@ -0,0 +1,26 @@ +// +// ViewController.h +// Shared (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import + +#if TARGET_OS_IOS + +#import + +typedef UIViewController PlatformViewController; + +#elif TARGET_OS_OSX + +#import + +typedef NSViewController PlatformViewController; + +#endif + +@interface ViewController : PlatformViewController + +@end diff --git a/Shared (App)/ViewController.m b/Shared (App)/ViewController.m new file mode 100644 index 0000000..495bd05 --- /dev/null +++ b/Shared (App)/ViewController.m @@ -0,0 +1,76 @@ +// +// ViewController.m +// Shared (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import "ViewController.h" + +#import + +#if TARGET_OS_OSX +#import +#endif + +static NSString * const extensionBundleIdentifier = @"cxai-studio.CxLLM-SAFARI.Extension"; + +@interface ViewController () + +@property (nonatomic) IBOutlet WKWebView *webView; + +@end + +@implementation ViewController + +- (void)viewDidLoad { + [super viewDidLoad]; + + _webView.navigationDelegate = self; + +#if TARGET_OS_IOS + _webView.scrollView.scrollEnabled = NO; +#endif + + [_webView.configuration.userContentController addScriptMessageHandler:self name:@"controller"]; + + [_webView loadFileURL:[NSBundle.mainBundle URLForResource:@"Main" withExtension:@"html"] allowingReadAccessToURL:NSBundle.mainBundle.resourceURL]; +} + +- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation { +#if TARGET_OS_IOS + [webView evaluateJavaScript:@"show('ios')" completionHandler:nil]; +#elif TARGET_OS_OSX + [webView evaluateJavaScript:@"show('mac')" completionHandler:nil]; + + [SFSafariExtensionManager getStateOfSafariExtensionWithIdentifier:extensionBundleIdentifier completionHandler:^(SFSafariExtensionState *state, NSError *error) { + dispatch_async(dispatch_get_main_queue(), ^{ + if (!state) { + // Insert code to inform the user something went wrong. + return; + } + + NSString *isExtensionEnabledAsString = state.isEnabled ? @"true" : @"false"; + if (@available(macOS 13, *)) + [webView evaluateJavaScript:[NSString stringWithFormat:@"show('mac', %@, true)", isExtensionEnabledAsString] completionHandler:nil]; + else + [webView evaluateJavaScript:[NSString stringWithFormat:@"show('mac', %@, false)", isExtensionEnabledAsString] completionHandler:nil]; + }); + }]; +#endif +} + +- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message { +#if TARGET_OS_OSX + if (![message.body isEqualToString:@"open-preferences"]) + return; + + [SFSafariApplication showPreferencesForExtensionWithIdentifier:extensionBundleIdentifier completionHandler:^(NSError *error) { + dispatch_async(dispatch_get_main_queue(), ^{ + [NSApp terminate:self]; + }); + }]; +#endif +} + +@end diff --git a/Shared (Extension)/Resources/_locales/en/messages.json b/Shared (Extension)/Resources/_locales/en/messages.json new file mode 100644 index 0000000..d911954 --- /dev/null +++ b/Shared (Extension)/Resources/_locales/en/messages.json @@ -0,0 +1,10 @@ +{ + "extension_name": { + "message": "CxLLM-SAFARI", + "description": "The display name for the extension." + }, + "extension_description": { + "message": "This is CxLLM-SAFARI. You should tell us what your extension does here.", + "description": "Description of what the extension does." + } +} diff --git a/Shared (Extension)/Resources/background.js b/Shared (Extension)/Resources/background.js new file mode 100644 index 0000000..56cb3fc --- /dev/null +++ b/Shared (Extension)/Resources/background.js @@ -0,0 +1,6 @@ +browser.runtime.onMessage.addListener((request, sender, sendResponse) => { + console.log("Received request: ", request); + + if (request.greeting === "hello") + return Promise.resolve({ farewell: "goodbye" }); +}); diff --git a/Shared (Extension)/Resources/content.js b/Shared (Extension)/Resources/content.js new file mode 100644 index 0000000..d4c3f2b --- /dev/null +++ b/Shared (Extension)/Resources/content.js @@ -0,0 +1,7 @@ +browser.runtime.sendMessage({ greeting: "hello" }).then((response) => { + console.log("Received response: ", response); +}); + +browser.runtime.onMessage.addListener((request, sender, sendResponse) => { + console.log("Received request: ", request); +}); diff --git a/Shared (Extension)/Resources/images/icon-128.png b/Shared (Extension)/Resources/images/icon-128.png new file mode 100644 index 0000000..c919eb0 Binary files /dev/null and b/Shared (Extension)/Resources/images/icon-128.png differ diff --git a/Shared (Extension)/Resources/images/icon-256.png b/Shared (Extension)/Resources/images/icon-256.png new file mode 100644 index 0000000..6bd3d20 Binary files /dev/null and b/Shared (Extension)/Resources/images/icon-256.png differ diff --git a/Shared (Extension)/Resources/images/icon-48.png b/Shared (Extension)/Resources/images/icon-48.png new file mode 100644 index 0000000..353e8fb Binary files /dev/null and b/Shared (Extension)/Resources/images/icon-48.png differ diff --git a/Shared (Extension)/Resources/images/icon-512.png b/Shared (Extension)/Resources/images/icon-512.png new file mode 100644 index 0000000..2200828 Binary files /dev/null and b/Shared (Extension)/Resources/images/icon-512.png differ diff --git a/Shared (Extension)/Resources/images/icon-64.png b/Shared (Extension)/Resources/images/icon-64.png new file mode 100644 index 0000000..995689f Binary files /dev/null and b/Shared (Extension)/Resources/images/icon-64.png differ diff --git a/Shared (Extension)/Resources/images/icon-96.png b/Shared (Extension)/Resources/images/icon-96.png new file mode 100644 index 0000000..cb079d2 Binary files /dev/null and b/Shared (Extension)/Resources/images/icon-96.png differ diff --git a/Shared (Extension)/Resources/images/toolbar-icon.svg b/Shared (Extension)/Resources/images/toolbar-icon.svg new file mode 100644 index 0000000..133b0d9 --- /dev/null +++ b/Shared (Extension)/Resources/images/toolbar-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Shared (Extension)/Resources/manifest.json b/Shared (Extension)/Resources/manifest.json new file mode 100644 index 0000000..2af3f2b --- /dev/null +++ b/Shared (Extension)/Resources/manifest.json @@ -0,0 +1,33 @@ +{ + "manifest_version": 3, + "default_locale": "en", + + "name": "__MSG_extension_name__", + "description": "__MSG_extension_description__", + "version": "1.0", + + "icons": { + "48": "images/icon-48.png", + "96": "images/icon-96.png", + "128": "images/icon-128.png", + "256": "images/icon-256.png", + "512": "images/icon-512.png" + }, + + "background": { + "scripts": [ "background.js" ], + "type": "module" + }, + + "content_scripts": [{ + "js": [ "content.js" ], + "matches": [ "*://example.com/*" ] + }], + + "action": { + "default_popup": "popup.html", + "default_icon": "images/toolbar-icon.svg" + }, + + "permissions": [ ] +} diff --git a/Shared (Extension)/Resources/popup.css b/Shared (Extension)/Resources/popup.css new file mode 100644 index 0000000..5b149b9 --- /dev/null +++ b/Shared (Extension)/Resources/popup.css @@ -0,0 +1,15 @@ +:root { + color-scheme: light dark; +} + +body { + width: 100px; + padding: 10px; + + font-family: system-ui; + text-align: center; +} + +@media (prefers-color-scheme: dark) { + /* Dark Mode styles go here. */ +} diff --git a/Shared (Extension)/Resources/popup.html b/Shared (Extension)/Resources/popup.html new file mode 100644 index 0000000..ac52319 --- /dev/null +++ b/Shared (Extension)/Resources/popup.html @@ -0,0 +1,11 @@ + + + + + + + + + Hello World! + + diff --git a/Shared (Extension)/Resources/popup.js b/Shared (Extension)/Resources/popup.js new file mode 100644 index 0000000..5c1aa86 --- /dev/null +++ b/Shared (Extension)/Resources/popup.js @@ -0,0 +1 @@ +console.log("Hello World!", browser); diff --git a/Shared (Extension)/SafariWebExtensionHandler.h b/Shared (Extension)/SafariWebExtensionHandler.h new file mode 100644 index 0000000..d12017d --- /dev/null +++ b/Shared (Extension)/SafariWebExtensionHandler.h @@ -0,0 +1,12 @@ +// +// SafariWebExtensionHandler.h +// Shared (Extension) +// +// Created by Stephen Carter on 4/22/26. +// + +#import + +@interface SafariWebExtensionHandler : NSObject + +@end diff --git a/Shared (Extension)/SafariWebExtensionHandler.m b/Shared (Extension)/SafariWebExtensionHandler.m new file mode 100644 index 0000000..e2bb172 --- /dev/null +++ b/Shared (Extension)/SafariWebExtensionHandler.m @@ -0,0 +1,43 @@ +// +// SafariWebExtensionHandler.m +// Shared (Extension) +// +// Created by Stephen Carter on 4/22/26. +// + +#import "SafariWebExtensionHandler.h" + +#import + +@implementation SafariWebExtensionHandler + +- (void)beginRequestWithExtensionContext:(NSExtensionContext *)context { + NSExtensionItem *request = context.inputItems.firstObject; + + NSUUID *profile; + if (@available(iOS 17.0, macOS 14.0, *)) { + profile = request.userInfo[SFExtensionProfileKey]; + } else { + profile = request.userInfo[@"profile"]; + } + + id message; + if (@available(iOS 15.0, macOS 11.0, *)) { + message = request.userInfo[SFExtensionMessageKey]; + } else { + message = request.userInfo[@"message"]; + } + + NSLog(@"Received message from browser.runtime.sendNativeMessage: %@ (profile: %@)", message, profile.UUIDString ?: @"none"); + + NSExtensionItem *response = [[NSExtensionItem alloc] init]; + if (@available(iOS 15.0, macOS 11.0, *)) { + response.userInfo = @{ SFExtensionMessageKey: @{ @"echo": message } }; + } else { + response.userInfo = @{ @"message": @{ @"echo": message } }; + } + + [context completeRequestReturningItems:@[ response ] completionHandler:nil]; +} + +@end diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md new file mode 100644 index 0000000..ef463db --- /dev/null +++ b/docs/ARCHITECTURE.md @@ -0,0 +1,24 @@ +# Architecture — CxLLM-SAFARI + +> CxLLM Safari Web Extension + +## Goals + +- Provide a focused, well-tested safari-extension surface for the CxLLM family. +- Stay deployable on its own (no monorepo coupling). +- Keep the public ABI small and explicitly versioned. + +## Boundaries + +```text + +----------------------+ + client --> | CxLLM-SAFARI | + +----------+-----------+ + | + v + CxLLM runtime / kernel +``` + +## Decisions + +- See `docs/adr/` for Architecture Decision Records. diff --git a/docs/adr/0001-record-architecture-decisions.md b/docs/adr/0001-record-architecture-decisions.md new file mode 100644 index 0000000..4fc033a --- /dev/null +++ b/docs/adr/0001-record-architecture-decisions.md @@ -0,0 +1,13 @@ +# 1. Record architecture decisions + +## Status +Accepted + +## Context +We need a lightweight, append-only log of architectural choices. + +## Decision +Use Markdown ADRs in `docs/adr/`, numbered sequentially. + +## Consequences +Future maintainers can read the chain of decisions without spelunking PR history. diff --git a/iOS (App)/AppDelegate.h b/iOS (App)/AppDelegate.h new file mode 100644 index 0000000..6601ab0 --- /dev/null +++ b/iOS (App)/AppDelegate.h @@ -0,0 +1,12 @@ +// +// AppDelegate.h +// iOS (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import + +@interface AppDelegate : UIResponder + +@end diff --git a/iOS (App)/AppDelegate.m b/iOS (App)/AppDelegate.m new file mode 100644 index 0000000..48cc14b --- /dev/null +++ b/iOS (App)/AppDelegate.m @@ -0,0 +1,21 @@ +// +// AppDelegate.m +// iOS (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import "AppDelegate.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + return YES; +} + +- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options { + return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role]; +} + +@end diff --git a/iOS (App)/Base.lproj/LaunchScreen.storyboard b/iOS (App)/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..620a70c --- /dev/null +++ b/iOS (App)/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS (App)/Base.lproj/Main.storyboard b/iOS (App)/Base.lproj/Main.storyboard new file mode 100644 index 0000000..0eda8ca --- /dev/null +++ b/iOS (App)/Base.lproj/Main.storyboard @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iOS (App)/Info.plist b/iOS (App)/Info.plist new file mode 100644 index 0000000..81ed29b --- /dev/null +++ b/iOS (App)/Info.plist @@ -0,0 +1,25 @@ + + + + + UIApplicationSceneManifest + + UIApplicationSupportsMultipleScenes + + UISceneConfigurations + + UIWindowSceneSessionRoleApplication + + + UISceneConfigurationName + Default Configuration + UISceneDelegateClassName + SceneDelegate + UISceneStoryboardFile + Main + + + + + + diff --git a/iOS (App)/SceneDelegate.h b/iOS (App)/SceneDelegate.h new file mode 100644 index 0000000..fd75e95 --- /dev/null +++ b/iOS (App)/SceneDelegate.h @@ -0,0 +1,14 @@ +// +// SceneDelegate.h +// iOS (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import + +@interface SceneDelegate : UIResponder + +@property (strong, nonatomic) UIWindow * window; + +@end diff --git a/iOS (App)/SceneDelegate.m b/iOS (App)/SceneDelegate.m new file mode 100644 index 0000000..34442f3 --- /dev/null +++ b/iOS (App)/SceneDelegate.m @@ -0,0 +1,12 @@ +// +// SceneDelegate.m +// iOS (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import "SceneDelegate.h" + +@implementation SceneDelegate + +@end diff --git a/iOS (App)/main.m b/iOS (App)/main.m new file mode 100644 index 0000000..031ca6d --- /dev/null +++ b/iOS (App)/main.m @@ -0,0 +1,18 @@ +// +// main.m +// iOS (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + NSString *appDelegateClassName; + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + appDelegateClassName = NSStringFromClass([AppDelegate class]); + } + return UIApplicationMain(argc, argv, nil, appDelegateClassName); +} diff --git a/iOS (Extension)/Info.plist b/iOS (Extension)/Info.plist new file mode 100644 index 0000000..3302434 --- /dev/null +++ b/iOS (Extension)/Info.plist @@ -0,0 +1,13 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.Safari.web-extension + NSExtensionPrincipalClass + SafariWebExtensionHandler + + + diff --git a/macOS (App)/AppDelegate.h b/macOS (App)/AppDelegate.h new file mode 100644 index 0000000..42c42f6 --- /dev/null +++ b/macOS (App)/AppDelegate.h @@ -0,0 +1,12 @@ +// +// AppDelegate.h +// macOS (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import + +@interface AppDelegate : NSObject + +@end diff --git a/macOS (App)/AppDelegate.m b/macOS (App)/AppDelegate.m new file mode 100644 index 0000000..d1b77db --- /dev/null +++ b/macOS (App)/AppDelegate.m @@ -0,0 +1,20 @@ +// +// AppDelegate.m +// macOS (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import "AppDelegate.h" + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)notification { + // Override point for customization after application launch. +} + +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return YES; +} + +@end diff --git a/macOS (App)/Base.lproj/Main.storyboard b/macOS (App)/Base.lproj/Main.storyboard new file mode 100644 index 0000000..77e89f5 --- /dev/null +++ b/macOS (App)/Base.lproj/Main.storyboard @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/macOS (App)/main.m b/macOS (App)/main.m new file mode 100644 index 0000000..d13cb37 --- /dev/null +++ b/macOS (App)/main.m @@ -0,0 +1,15 @@ +// +// main.m +// macOS (App) +// +// Created by Stephen Carter on 4/22/26. +// + +#import + +int main(int argc, const char * argv[]) { + @autoreleasepool { + // Setup code that might create autoreleased objects goes here. + } + return NSApplicationMain(argc, argv); +} diff --git a/macOS (Extension)/Info.plist b/macOS (Extension)/Info.plist new file mode 100644 index 0000000..3302434 --- /dev/null +++ b/macOS (Extension)/Info.plist @@ -0,0 +1,13 @@ + + + + + NSExtension + + NSExtensionPointIdentifier + com.apple.Safari.web-extension + NSExtensionPrincipalClass + SafariWebExtensionHandler + + +