Skip to content

Commit b40ff5d

Browse files
committed
Initial commit
0 parents  commit b40ff5d

139 files changed

Lines changed: 13611 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/cordierite

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../skills/cordierite

.github/workflows/ci.yml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-and-lint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Bun
21+
uses: oven-sh/setup-bun@v2
22+
with:
23+
bun-version: 1.3.11
24+
25+
- name: Install dependencies
26+
run: bun install --frozen-lockfile
27+
28+
- name: Build
29+
run: bun run build
30+
31+
- name: Lint
32+
run: bun run lint
33+
34+
playground-build-android:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v4
39+
40+
- name: Setup Bun
41+
uses: oven-sh/setup-bun@v2
42+
with:
43+
bun-version: 1.3.11
44+
45+
- name: Setup Java
46+
uses: actions/setup-java@v4
47+
with:
48+
distribution: temurin
49+
java-version: 17
50+
51+
- name: Setup Android SDK
52+
uses: android-actions/setup-android@v3
53+
with:
54+
packages: |
55+
platform-tools
56+
platforms;android-36
57+
build-tools;36.0.0
58+
ndk;27.1.12297006
59+
cache: true
60+
61+
- name: Install dependencies
62+
run: bun install --frozen-lockfile
63+
64+
- name: Build workspace packages
65+
run: bun run build
66+
67+
- name: Prebuild Android (Expo)
68+
working-directory: playground
69+
env:
70+
CI: "true"
71+
EXPO_NO_TELEMETRY: "1"
72+
run: bunx expo prebuild --platform android --no-install
73+
74+
- name: Setup Gradle (wrapper + dependency cache)
75+
uses: gradle/actions/setup-gradle@v4
76+
with:
77+
build-root-directory: playground/android
78+
79+
- name: Assemble debug APK
80+
working-directory: playground/android
81+
run: ./gradlew assembleDebug --no-daemon
82+
83+
playground-build-ios:
84+
runs-on: macos-14
85+
steps:
86+
- name: Checkout
87+
uses: actions/checkout@v4
88+
89+
- name: ccache
90+
uses: hendrikmuhs/ccache-action@v1.2
91+
with:
92+
key: playground-ios-${{ hashFiles('bun.lock', 'playground/package.json', 'playground/app.json') }}
93+
append-timestamp: false
94+
max-size: 2G
95+
96+
- name: Use ccache with Apple Clang (Xcode)
97+
run: |
98+
echo "CC=ccache $(xcrun -find clang)" >> "$GITHUB_ENV"
99+
echo "CXX=ccache $(xcrun -find clang++)" >> "$GITHUB_ENV"
100+
echo "CCACHE_BASEDIR=${{ github.workspace }}" >> "$GITHUB_ENV"
101+
echo "CCACHE_COMPILERCHECK=content" >> "$GITHUB_ENV"
102+
echo "CCACHE_SLOPPINESS=clang_index_store,file_macro,time_macros,include_file_mtime,include_file_ctime" >> "$GITHUB_ENV"
103+
104+
- name: Setup Bun
105+
uses: oven-sh/setup-bun@v2
106+
with:
107+
bun-version: 1.3.11
108+
109+
- name: Install dependencies
110+
run: bun install --frozen-lockfile
111+
112+
- name: Build workspace packages
113+
run: bun run build
114+
115+
- name: Prebuild iOS (Expo)
116+
working-directory: playground
117+
env:
118+
CI: "true"
119+
EXPO_NO_TELEMETRY: "1"
120+
LANG: en_US.UTF-8
121+
run: bunx expo prebuild --platform ios
122+
123+
- name: Build for iOS Simulator
124+
working-directory: playground/ios
125+
run: |
126+
xcodebuild \
127+
-workspace playground.xcworkspace \
128+
-scheme playground \
129+
-configuration Debug \
130+
-sdk iphonesimulator \
131+
-destination 'generic/platform=iOS Simulator' \
132+
build \
133+
CODE_SIGNING_ALLOWED=NO

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# dependencies (bun install)
2+
node_modules
3+
4+
# output
5+
out
6+
dist
7+
*.tgz
8+
9+
# code coverage
10+
coverage
11+
*.lcov
12+
13+
# logs
14+
logs
15+
_.log
16+
report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
17+
18+
# dotenv environment variable files
19+
.env
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
.env.local
24+
25+
# caches
26+
.turbo
27+
.eslintcache
28+
.cache
29+
*.tsbuildinfo
30+
31+
# IntelliJ based IDEs
32+
.idea
33+
34+
# Finder (MacOS) folder config
35+
.DS_Store

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Szymon Chmal and Callstack
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[![Cordierite][cordierite-banner]][repo]
2+
3+
### Expose app tools securely—no debug menus in the binary
4+
5+
[![MIT license][license-badge]][license] [![npm downloads][npm-downloads-badge]][npm-downloads] [![PRs Welcome][prs-welcome-badge]][prs-welcome]
6+
7+
Cordierite exists so **developers, QA, and automation** can drive **registered tools** and influence **in-app state** from a **CLI or agent host**—without shipping hidden **debug screens**, secret gestures, or admin panels inside the app. The app exposes only the **tool surface you define** in code; control stays on the **other end of a pinned `wss://` session** you initiate when it makes sense (local desk, CI, VPN, or a host on the internet).
8+
9+
## Why it exists
10+
11+
Shipping ad-hoc debug UIs in production builds is risky: they leak intent, widen attack surface, and are hard to gate consistently. Cordierite inverts that: **production-capable** builds can still participate in Cordierite **when a trusted host is available**, because trust is **not** “anyone on Wi‑Fi” or “whoever crafted a link”—it is **TLS + SPKI pinning** to identities you embed, plus **short-lived session bootstrap** so deep links are hints, not proof of authority. The same channel works for **human operators** (CLI), **test automation**, and **agents**.
12+
13+
## Security
14+
15+
- **No backdoor UI**: nothing extra in the app UI for attackers to discover; capability is **tool APIs + transport**, not mystery menus.
16+
- **Encrypted transport**: `wss://` end-to-end; no cleartext control traffic on the wire.
17+
- **Pinned server identity**: the native client matches your host’s public key (SPKI); IP, DNS, and deep-link origin are not enough to impersonate the host.
18+
- **Session bootstrap**: one-time, session-bound channel after claim—appropriate for production when pins and provisioning match your threat model.
19+
20+
21+
## Monorepo layout
22+
23+
| Package | Role |
24+
| --- | --- |
25+
| [`cordierite`](packages/cordierite/README.md) | CLI and host tooling |
26+
| [`cordierite-shared`](packages/cordierite-shared/README.md) | Shared library (CLI + React Native) |
27+
| [`react-native-cordierite`](packages/react-native-cordierite/README.md) | TurboModule client + optional Expo config plugin |
28+
29+
Clone the repo and install with your usual workspace workflow. The [playground](playground/README.md) is the reference dev app; [playground/certs](playground/certs/README.md) explains dev TLS and pin rotation.
30+
31+
## Platform compatibility
32+
33+
- **CLI / host**: any modern **JavaScript runtime** that can run the published package and open TLS sockets.
34+
- **React Native**: iOS and Android with **New Architecture**; web is a safe stub only.
35+
36+
## Made with ❤️ at Callstack
37+
38+
`cordierite` is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Callstack][callstack-readme-with-love] is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!
39+
40+
Like the project? ⚛️ [Join the team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥
41+
42+
[cordierite-banner]: https://img.shields.io/badge/Cordierite-callstack%2Fincubator-111827?style=for-the-badge&logo=github&logoColor=white
43+
[repo]: https://github.com/callstackincubator/cordierite
44+
[callstack-readme-with-love]: https://callstack.com/?utm_source=github.com&utm_medium=referral&utm_campaign=cordierite&utm_term=readme-with-love
45+
[license-badge]: https://img.shields.io/npm/l/cordierite?style=for-the-badge
46+
[license]: https://github.com/callstackincubator/cordierite/blob/main/LICENSE
47+
[npm-downloads-badge]: https://img.shields.io/npm/dm/cordierite?style=for-the-badge
48+
[npm-downloads]: https://www.npmjs.com/package/cordierite
49+
[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
50+
[prs-welcome]: ./CONTRIBUTING.md
51+
[chat-badge]: https://img.shields.io/discord/426714625279524876.svg?style=for-the-badge
52+
[chat]: https://discord.gg/xgGt7KAjxv

0 commit comments

Comments
 (0)