vybekiit 0.7.32 → 0.7.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +5 -2
- package/dist/global-skills/aws-serverless/SKILL.md +168 -32
- package/dist/global-skills/aws-serverless/references/api-gateway.md +17 -0
- package/dist/global-skills/aws-serverless/references/architecture.md +9 -13
- package/dist/global-skills/aws-serverless/references/lambda.md +3 -3
- package/dist/global-skills/aws-serverless/references/orchestration.md +46 -20
- package/dist/global-skills/aws-serverless/references/production.md +1 -1
- package/dist/global-skills/eas-simulator/SKILL.md +15 -15
- package/dist/global-skills/eas-simulator/references/controllers.md +11 -7
- package/dist/global-skills/eas-simulator/references/run-your-app.md +8 -8
- package/dist/global-skills/eas-simulator/references/troubleshooting.md +10 -6
- package/dist/global-skills/email-best-practices/references/sending-reliability.md +17 -22
- package/dist/global-skills/extension-to-functions-codebase/SKILL.md +1 -0
- package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +161 -76
- package/dist/global-skills/firebase-ai-logic-basics/references/flutter_setup.md +37 -0
- package/dist/global-skills/firebase-ai-logic-basics/references/ios_setup.md +97 -3
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_android.md +88 -3
- package/dist/global-skills/firebase-ai-logic-basics/references/usage_patterns_web.md +91 -3
- package/dist/global-skills/firebase-app-hosting-basics/SKILL.md +5 -1
- package/dist/global-skills/firebase-auth-basics/SKILL.md +1 -0
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_android.md +9 -9
- package/dist/global-skills/firebase-auth-basics/references/client_sdk_web.md +3 -3
- package/dist/global-skills/firebase-auth-basics/references/flutter_setup.md +22 -19
- package/dist/global-skills/firebase-auth-basics/references/security_rules.md +2 -2
- package/dist/global-skills/firebase-basics/SKILL.md +6 -2
- package/dist/global-skills/firebase-basics/references/android_setup.md +101 -37
- package/dist/global-skills/firebase-basics/references/ios_setup.md +57 -0
- package/dist/global-skills/firebase-basics/references/web_setup.md +52 -0
- package/dist/global-skills/firebase-crashlytics/SKILL.md +1 -0
- package/dist/global-skills/firebase-crashlytics/references/android_setup.md +84 -84
- package/dist/global-skills/firebase-crashlytics/references/ios_setup.md +1 -0
- package/dist/global-skills/firebase-data-connect/SKILL.md +1 -0
- package/dist/global-skills/firebase-data-connect/reference/config.md +8 -8
- package/dist/global-skills/firebase-data-connect/reference/realtime.md +4 -1
- package/dist/global-skills/firebase-data-connect/reference/sdk_android.md +33 -34
- package/dist/global-skills/firebase-data-connect/reference/sdk_web.md +8 -3
- package/dist/global-skills/firebase-data-connect/reference/security.md +13 -13
- package/dist/global-skills/firebase-firestore/SKILL.md +17 -7
- package/dist/global-skills/firebase-firestore/references/enterprise/android_sdk_usage.md +32 -32
- package/dist/global-skills/firebase-firestore/references/enterprise/indexes.md +2 -1
- package/dist/global-skills/firebase-firestore/references/standard/android_sdk_usage.md +14 -14
- package/dist/global-skills/firebase-firestore/references/standard/indexes.md +2 -1
- package/dist/global-skills/firebase-hosting-basics/SKILL.md +1 -0
- package/dist/global-skills/firebase-remote-config-basics/SKILL.md +2 -1
- package/dist/global-skills/firebase-remote-config-basics/references/android_setup.md +36 -37
- package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +7 -6
- package/dist/global-skills/firestore-rules-creation/SKILL.md +22 -10
- package/dist/global-skills/neon/SKILL.md +16 -0
- package/dist/global-skills/neon-ai-gateway/SKILL.md +43 -14
- package/dist/global-skills/neon-postgres/SKILL.md +1 -1
- package/dist/global-skills/neon-postgres/references/full-text-search.md +27 -17
- package/dist/global-skills/neon-postgres/references/hybrid-search.md +19 -15
- package/dist/global-skills/neon-postgres/references/lakebase-search-drizzle.md +99 -14
- package/dist/global-skills/neon-postgres/references/vector-search.md +93 -10
- package/dist/global-skills/resend/SKILL.md +4 -15
- package/dist/global-skills/resend/references/domains.md +1 -1
- package/dist/global-skills/resend/references/installation.md +3 -3
- package/dist/global-skills/resend/references/sending/best-practices.md +3 -3
- package/dist/global-skills/resend/references/sending/single-email-examples.md +3 -3
- package/dist/global-skills/stripe-best-practices/SKILL.md +18 -18
- package/dist/global-skills/stripe-best-practices/references/tax.md +26 -14
- package/dist/global-skills/use-railway/SKILL.md +6 -6
- package/dist/global-skills/use-railway/references/iac.md +2 -1
- package/dist/global-skills/use-railway/references/tracing.md +13 -5
- package/dist/global-skills/workers-best-practices/SKILL.md +1 -1
- package/dist/global-skills/wrangler/SKILL.md +3 -3
- package/dist/global-skills/xcode-project-setup/SKILL.md +1 -0
- package/package.json +8 -8
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Firebase Crashlytics - Android Setup Guide (Kotlin)
|
|
2
2
|
|
|
3
|
-
This guide describes the SDK setup and basic usage patterns for
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This guide describes the SDK setup and basic usage patterns for Firebase
|
|
4
|
+
Crashlytics in an Android app using Kotlin DSL (`build.gradle.kts`) and Kotlin
|
|
5
|
+
code.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
9
|
-
IMPORTANT: Before specifically working with Firebase Crashlytics, make sure
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
IMPORTANT: Before specifically working with Firebase Crashlytics, make sure to
|
|
10
|
+
use the skill and reference `firebase_basics/references/android_setup` to ensure
|
|
11
|
+
the following is done.
|
|
12
12
|
|
|
13
13
|
- The Firebase CLI is available and authenticated.
|
|
14
14
|
- An Android project exists and is registered with a Firebase Project.
|
|
@@ -20,9 +20,9 @@ ______________________________________________________________________
|
|
|
20
20
|
## 1. Add dependencies to Gradle build files
|
|
21
21
|
|
|
22
22
|
> [!IMPORTANT] **[AGENT] RESOLVING THE SDK & PLUGIN VERSIONS DETERMINISTICALLY**
|
|
23
|
-
> Never guess or hardcode a memorized out-of-date SDK or plugin version.
|
|
24
|
-
>
|
|
25
|
-
>
|
|
23
|
+
> Never guess or hardcode a memorized out-of-date SDK or plugin version. Before
|
|
24
|
+
> adding dependencies, you MUST query the latest available versions directly
|
|
25
|
+
> from the Google Maven Repository:
|
|
26
26
|
>
|
|
27
27
|
> ```bash
|
|
28
28
|
> # Find the latest Firebase Android BoM version
|
|
@@ -62,30 +62,30 @@ plugins {
|
|
|
62
62
|
|
|
63
63
|
### Module (app-level) `build.gradle.kts` (`<project>/<app-module>/build.gradle.kts`)
|
|
64
64
|
|
|
65
|
-
1.
|
|
65
|
+
1. Add the Crashlytics Gradle plugin to the `plugins` block:
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
```kotlin
|
|
68
|
+
plugins {
|
|
69
|
+
// ... other plugins
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
id("com.google.firebase.crashlytics")
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
1. Add the Firebase Crashlytics dependency to the `dependencies` block:
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
```kotlin
|
|
78
|
+
dependencies {
|
|
79
|
+
// ... other dependencies
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
// [AGENT] Fetch the latest resolved version using the Gradle command above
|
|
82
|
+
implementation(platform("com.google.firebase:firebase-bom:<latest_bom_version>"))
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
// Add the dependency for the Firebase Crashlytics library
|
|
85
|
+
// When using the BoM, don't specify versions in Firebase library dependencies
|
|
86
|
+
implementation("com.google.firebase:firebase-crashlytics")
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
89
|
|
|
90
90
|
______________________________________________________________________
|
|
91
91
|
|
|
@@ -96,38 +96,38 @@ native code, configure Crashlytics to report native crashes.
|
|
|
96
96
|
|
|
97
97
|
App-level `build.gradle.kts` (`<project>/<app-module>/build.gradle.kts`)
|
|
98
98
|
|
|
99
|
-
1.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
99
|
+
1. Add the `firebase-crashlytics-ndk` dependency:
|
|
100
|
+
|
|
101
|
+
```kotlin
|
|
102
|
+
dependencies {
|
|
103
|
+
// ... other dependencies
|
|
104
|
+
|
|
105
|
+
// [AGENT] Fetch the latest resolved version using the Gradle command above
|
|
106
|
+
implementation(platform("com.google.firebase:firebase-bom:<latest_bom_version>"))
|
|
107
|
+
|
|
108
|
+
// Add the dependency for the Firebase Crashlytics NDK library
|
|
109
|
+
// When using the BoM, don't specify versions in Firebase library dependencies
|
|
110
|
+
implementation("com.google.firebase:firebase-crashlytics-ndk")
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
1. Enable the `nativeSymbolUpload` flag in the `buildTypes` configuration. This
|
|
115
|
+
will automatically upload symbol files for the native code, which are
|
|
116
|
+
required to symbolicate native crash reports.
|
|
117
|
+
|
|
118
|
+
```kotlin
|
|
119
|
+
android {
|
|
120
|
+
// ... other config
|
|
121
|
+
buildTypes {
|
|
122
|
+
getByName("release") {
|
|
123
|
+
// ...
|
|
124
|
+
firebaseCrashlytics {
|
|
125
|
+
nativeSymbolUploadEnabled = true
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
131
|
|
|
132
132
|
After these changes, Crashlytics will automatically report crashes in the app's
|
|
133
133
|
native code.
|
|
@@ -139,38 +139,38 @@ ______________________________________________________________________
|
|
|
139
139
|
To verify that Crashlytics is correctly set up in the Android project, force a
|
|
140
140
|
test crash in the app.
|
|
141
141
|
|
|
142
|
-
1.
|
|
143
|
-
|
|
142
|
+
1. Add code to the main activity (e.g., in `onCreate`) to trigger a crash a few
|
|
143
|
+
seconds after app startup:
|
|
144
144
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
```kotlin
|
|
146
|
+
import android.os.Handler
|
|
147
|
+
import android.os.Looper
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
// ... in the Activity's onCreate method or similar startup logic
|
|
150
|
+
Handler(Looper.getMainLooper()).postDelayed({
|
|
151
|
+
throw RuntimeException("Test Crash") // Force a crash after 3 seconds
|
|
152
|
+
}, 3000)
|
|
153
|
+
```
|
|
154
154
|
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
1. Run the app on a device or emulator. The app should crash after a short
|
|
156
|
+
delay.
|
|
157
157
|
|
|
158
|
-
|
|
159
|
-
|
|
158
|
+
1. Restart the app. The Crashlytics SDK will send the crash report to Firebase
|
|
159
|
+
on the next app launch.
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
1. After a few minutes, the crash should be available in Firebase.
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
163
|
+
- If the Firebase MCP server is installed, use the `get_report` tool to
|
|
164
|
+
verify that a crash was received.
|
|
165
|
+
- As a fallback, tell the human user to go to the Crashlytics dashboard in
|
|
166
|
+
the Firebase console to verify the new crash report. Provide the human user
|
|
167
|
+
with a constructed Firebase console URL using the Firebase PROJECT_ID and
|
|
168
|
+
the PACKAGE_NAME:
|
|
169
|
+
`https://console.firebase.google.com/u/0/project/PROJECT_ID/crashlytics/app/android:PACKAGE_NAME/issues`
|
|
170
170
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
1. After verifying that Firebase has received the crash report -- either using
|
|
172
|
+
the `get_report` tool or manually viewing it in the Firebase console --
|
|
173
|
+
remove the code that triggers the test crash.
|
|
174
174
|
|
|
175
175
|
______________________________________________________________________
|
|
176
176
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: firebase-data-connect
|
|
3
3
|
description: Builds and deploys Firebase SQL Connect (aka Firebase Data Connect) backends with PostgreSQL securely. Use when designing schemas with tables and relations, writing authorized queries and mutations, configuring real-time data updates, or generating type-safe SDKs. Use when you need a relational database with Firebase, or when the user mentions SQL Connect or Data Connect.
|
|
4
4
|
metadata:
|
|
5
|
+
author: Google LLC
|
|
5
6
|
category: Databases
|
|
6
7
|
disable-model-invocation: true
|
|
7
8
|
---
|
|
@@ -47,15 +47,15 @@ schema:
|
|
|
47
47
|
connectorDirs: ["./connector"]
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
| Field
|
|
51
|
-
|
|
|
52
|
-
| `specVersion`
|
|
53
|
-
| `serviceId`
|
|
54
|
-
| `location`
|
|
50
|
+
| Field | Description |
|
|
51
|
+
| ----------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
52
|
+
| `specVersion` | Always `"v1"` |
|
|
53
|
+
| `serviceId` | Unique identifier for the service |
|
|
54
|
+
| `location` | GCP region (us-central1, us-east4, europe-west1, etc.) |
|
|
55
55
|
| `schema.datasource.postgresql.schemaValidation` | Deployment mode: `"STRICT"` (must match exactly) or `"COMPATIBLE"` (backward compatible) |
|
|
56
|
-
| `schema.source`
|
|
57
|
-
| `schema.datasource`
|
|
58
|
-
| `connectorDirs`
|
|
56
|
+
| `schema.source` | Path to schema directory |
|
|
57
|
+
| `schema.datasource` | PostgreSQL connection config |
|
|
58
|
+
| `connectorDirs` | List of connector directories |
|
|
59
59
|
|
|
60
60
|
### Cloud SQL Configuration
|
|
61
61
|
|
|
@@ -23,7 +23,10 @@ based on what you're querying:
|
|
|
23
23
|
List queries require explicit `@refresh` to tell SQL Connect which mutations
|
|
24
24
|
affect the result set.
|
|
25
25
|
|
|
26
|
-
Clients consume all three using `subscribe()` instead of `execute()`. See
|
|
26
|
+
Clients consume all three using `subscribe()` instead of `execute()`. See
|
|
27
|
+
[sdk_web.md](sdk_web.md), [sdk_android.md](sdk_android.md),
|
|
28
|
+
[sdk_ios.md](sdk_ios.md), and [sdk_flutter.md](sdk_flutter.md) for per-platform
|
|
29
|
+
subscribe patterns.
|
|
27
30
|
|
|
28
31
|
______________________________________________________________________
|
|
29
32
|
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# Firebase SQL Connect - Android Setup Guide (Kotlin)
|
|
2
2
|
|
|
3
|
-
This guide describes the SDK setup and basic usage patterns for
|
|
4
|
-
|
|
5
|
-
Kotlin DSL (`build.gradle.kts`) and Kotlin code.
|
|
3
|
+
This guide describes the SDK setup and basic usage patterns for Firebase SQL
|
|
4
|
+
Connect in an Android app using Kotlin DSL (`build.gradle.kts`) and Kotlin code.
|
|
6
5
|
|
|
7
6
|
## Prerequisites
|
|
8
7
|
|
|
9
|
-
IMPORTANT: Before specifically working with Firebase SQL Connect, make sure
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
IMPORTANT: Before specifically working with Firebase SQL Connect, make sure to
|
|
9
|
+
use the skill and reference `firebase_basics/references/android_setup` to ensure
|
|
10
|
+
the following is done.
|
|
12
11
|
|
|
13
12
|
- The Firebase CLI is available and authenticated.
|
|
14
13
|
- An Android project exists and is registered with a Firebase Project.
|
|
@@ -35,10 +34,10 @@ ______________________________________________________________________
|
|
|
35
34
|
|
|
36
35
|
## 1. Add dependencies to Gradle build files
|
|
37
36
|
|
|
38
|
-
> [!IMPORTANT] **[AGENT] RESOLVING THE SDK VERSION DETERMINISTICALLY**
|
|
39
|
-
>
|
|
40
|
-
>
|
|
41
|
-
>
|
|
37
|
+
> [!IMPORTANT] **[AGENT] RESOLVING THE SDK VERSION DETERMINISTICALLY** Never
|
|
38
|
+
> guess or hardcode a memorized out-of-date SDK or plugin version. Before adding
|
|
39
|
+
> dependencies, you MUST query the latest available versions directly from the
|
|
40
|
+
> Google Maven Repository:
|
|
42
41
|
>
|
|
43
42
|
> ```bash
|
|
44
43
|
> # Find the latest Firebase Android BoM version
|
|
@@ -56,37 +55,37 @@ ______________________________________________________________________
|
|
|
56
55
|
> ```
|
|
57
56
|
|
|
58
57
|
In the **module (app-level)** `build.gradle.kts` (usually
|
|
59
|
-
`<project>/<app-module>/build.gradle.kts`), add the
|
|
60
|
-
|
|
58
|
+
`<project>/<app-module>/build.gradle.kts`), add the Kotlin serialization plugin
|
|
59
|
+
and the dependency for Firebase SQL Connect:
|
|
61
60
|
|
|
62
|
-
1.
|
|
61
|
+
1. Add the Kotlin serialization plugin to the `plugins` block:
|
|
63
62
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
```kotlin
|
|
64
|
+
plugins {
|
|
65
|
+
// ... other plugins
|
|
66
|
+
kotlin("plugin.serialization") version "1.8.22" // Must match Kotlin version
|
|
67
|
+
}
|
|
68
|
+
```
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
1. Add the required Firebase SQL Connect dependencies to the `dependencies`
|
|
71
|
+
block:
|
|
73
72
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
```kotlin
|
|
74
|
+
dependencies {
|
|
75
|
+
// ... other dependencies
|
|
77
76
|
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
// [AGENT] Fetch the latest resolved version using the Gradle command above
|
|
78
|
+
implementation(platform("com.google.firebase:firebase-bom:<latest_bom_version>"))
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
// Add the dependency for the Firebase SQL Connect library
|
|
81
|
+
// When using the BoM, don't specify versions in Firebase library dependencies
|
|
82
|
+
implementation("com.google.firebase:firebase-dataconnect")
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
// Add additional required dependencies
|
|
85
|
+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3")
|
|
86
|
+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.5.1")
|
|
87
|
+
}
|
|
88
|
+
```
|
|
90
89
|
|
|
91
90
|
______________________________________________________________________
|
|
92
91
|
|
|
@@ -106,9 +106,14 @@ await executeQuery(queryRef, { fetchPolicy: QueryFetchPolicy.SERVER_ONLY });
|
|
|
106
106
|
|
|
107
107
|
### Subscriptions (Realtime)
|
|
108
108
|
|
|
109
|
-
Use `subscribe()` to receive live updates. It accepts either an observer object
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
Use `subscribe()` to receive live updates. It accepts either an observer object
|
|
110
|
+
(`SubscriptionOptions`) or positional callbacks:
|
|
111
|
+
|
|
112
|
+
> **Note:** When passing an observer object literal, the error callback property
|
|
113
|
+
> is named **`onErr`** (`{ onNext, onErr, onComplete }`). Passing `onError` in
|
|
114
|
+
> an object literal fails TypeScript compilation (`TS2769`) and is ignored at
|
|
115
|
+
> runtime. The name `onError` is only used as the parameter name in the
|
|
116
|
+
> positional callback overload (`subscribe(ref, onNext, onError, onComplete)`).
|
|
112
117
|
|
|
113
118
|
#### Web (Vanilla JS / TypeScript)
|
|
114
119
|
|
|
@@ -32,13 +32,13 @@ ______________________________________________________________________
|
|
|
32
32
|
|
|
33
33
|
## Access Levels
|
|
34
34
|
|
|
35
|
-
| Level | Who Can Access | CEL Equivalent
|
|
36
|
-
| --------------------- | -------------------------------------------- |
|
|
37
|
-
| `PUBLIC` | Anyone, authenticated or not | `true`
|
|
38
|
-
| `USER_ANON` | Any authenticated user (including anonymous) | `auth != null`
|
|
39
|
-
| `USER` | Authenticated users (excludes anonymous) | `auth != null && auth.token.firebase.sign_in_provider != 'anonymous'`
|
|
40
|
-
| `USER_EMAIL_VERIFIED` | Users with verified email | `auth != null && auth.token.email_verified`
|
|
41
|
-
| `NO_ACCESS` | Admin SDK only | `false`
|
|
35
|
+
| Level | Who Can Access | CEL Equivalent |
|
|
36
|
+
| --------------------- | -------------------------------------------- | --------------------------------------------------------------------- |
|
|
37
|
+
| `PUBLIC` | Anyone, authenticated or not | `true` |
|
|
38
|
+
| `USER_ANON` | Any authenticated user (including anonymous) | `auth != null` |
|
|
39
|
+
| `USER` | Authenticated users (excludes anonymous) | `auth != null && auth.token.firebase.sign_in_provider != 'anonymous'` |
|
|
40
|
+
| `USER_EMAIL_VERIFIED` | Users with verified email | `auth != null && auth.token.email_verified` |
|
|
41
|
+
| `NO_ACCESS` | Admin SDK only | `false` |
|
|
42
42
|
|
|
43
43
|
> **Important:** Levels like `USER` are starting points. Always add filters or
|
|
44
44
|
> expressions to verify the user can access specific data.
|
|
@@ -49,12 +49,12 @@ ______________________________________________________________________
|
|
|
49
49
|
|
|
50
50
|
### Available Bindings
|
|
51
51
|
|
|
52
|
-
| Binding | Description
|
|
53
|
-
| ----------------------- |
|
|
54
|
-
| `auth.uid` | Current user's Firebase UID
|
|
55
|
-
| `auth.token` | Auth token claims (see below)
|
|
56
|
-
| `vars` | Operation variables (e.g., `vars.movieId`)
|
|
57
|
-
| `request.time` | Server timestamp
|
|
52
|
+
| Binding | Description |
|
|
53
|
+
| ----------------------- | ----------------------------------------------------------------- |
|
|
54
|
+
| `auth.uid` | Current user's Firebase UID |
|
|
55
|
+
| `auth.token` | Auth token claims (see below) |
|
|
56
|
+
| `vars` | Operation variables (e.g., `vars.movieId`) |
|
|
57
|
+
| `request.time` | Server timestamp |
|
|
58
58
|
| `request.operationName` | Name of the GraphQL operation being executed (e.g., `"GetMovie"`) |
|
|
59
59
|
|
|
60
60
|
### auth.token Fields
|
|
@@ -4,16 +4,23 @@ description: >-
|
|
|
4
4
|
Sets up, manages, queries, and configures Cloud Firestore databases (Standard/Enterprise edition), including data modeling, security rules, indexes, and SDK integrations (Web, Python, iOS, Android, Flutter). Use when creating/listing Firestore databases, defining data models/indexes, writing SDK queries, or integrating Firestore SDKs. For authoring or modifying Firestore Security Rules (firestore.rules), delegate to the firestore-rules-author subagent if subagent delegation is available, or use firestore-rules-creation otherwise. Don't use for Firebase Hosting, Data Connect, Auth, Storage/GCS, Crashlytics, Functions, or BigQuery.
|
|
5
5
|
compatibility: This skill is best used with the Firebase CLI, but does not require it. Firebase CLI can be accessed through `npx -y firebase-tools@latest`.
|
|
6
6
|
metadata:
|
|
7
|
+
author: Google LLC
|
|
7
8
|
category: Databases
|
|
8
9
|
disable-model-invocation: true
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Cloud Firestore Database and Operations
|
|
12
13
|
|
|
13
|
-
> [!IMPORTANT] **Security Rules Authoring (`firestore.rules`)**
|
|
14
|
-
>
|
|
15
|
-
>
|
|
16
|
-
> - **If subagent delegation
|
|
14
|
+
> [!IMPORTANT] **Security Rules Authoring (`firestore.rules`)** Whenever your
|
|
15
|
+
> task requires creating, authoring, or modifying `firestore.rules`:
|
|
16
|
+
>
|
|
17
|
+
> - **If subagent delegation AND the `firestore-rules-author` subagent are
|
|
18
|
+
> available**: delegate authoring `firestore.rules` to the
|
|
19
|
+
> `firestore-rules-author` subagent rather than writing `firestore.rules`
|
|
20
|
+
> directly in the main agent.
|
|
21
|
+
> - **If subagent delegation is unavailable** (e.g., subagents not enabled in
|
|
22
|
+
> the IDE) **OR `firestore-rules-author` is not installed**: read and follow
|
|
23
|
+
> the `firestore-rules-creation` skill to write `firestore.rules` directly.
|
|
17
24
|
|
|
18
25
|
Before setting up dependencies, writing data models, or configuring security
|
|
19
26
|
rules, you MUST always identify the Firestore instance edition.
|
|
@@ -30,12 +37,15 @@ npx -y firebase-tools@latest firestore:databases:list
|
|
|
30
37
|
|
|
31
38
|
1. For each database found, inspect its edition and details:
|
|
32
39
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
```bash
|
|
41
|
+
npx -y firebase-tools@latest firestore:databases:get <database-id>
|
|
42
|
+
```
|
|
43
|
+
|
|
36
44
|
1. Ask the user which database instance they wish to target or if they would
|
|
37
45
|
prefer to create a new instance.
|
|
46
|
+
|
|
38
47
|
1. Once the target instance is established:
|
|
48
|
+
|
|
39
49
|
- If the **`edition`** is `STANDARD`, follow the guides under
|
|
40
50
|
`references/standard/`.
|
|
41
51
|
- If the **`edition`** is `ENTERPRISE` or native mode, follow the guides
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Cloud Firestore (Enterprise edition) - Android Setup Guide (Kotlin)
|
|
2
2
|
|
|
3
|
-
This guide describes the SDK setup and basic usage patterns for
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
This guide describes the SDK setup and basic usage patterns for Cloud Firestore
|
|
4
|
+
(Enterprise edition in Native mode) in an Android app using Kotlin DSL
|
|
5
|
+
(`build.gradle.kts`) and Kotlin code.
|
|
6
6
|
|
|
7
7
|
## Prerequisites
|
|
8
8
|
|
|
9
|
-
IMPORTANT: Before specifically working with Cloud Firestore, make sure
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
IMPORTANT: Before specifically working with Cloud Firestore, make sure to use
|
|
10
|
+
the skill and reference `firebase_basics/references/android_setup` to ensure the
|
|
11
|
+
following is done.
|
|
12
12
|
|
|
13
13
|
- The Firebase CLI is available and authenticated.
|
|
14
14
|
- An Android project exists and is registered with a Firebase Project.
|
|
@@ -33,10 +33,10 @@ ______________________________________________________________________
|
|
|
33
33
|
|
|
34
34
|
## 2. Add dependencies to Gradle build files
|
|
35
35
|
|
|
36
|
-
> [!IMPORTANT] **[AGENT] RESOLVING THE SDK VERSION DETERMINISTICALLY**
|
|
37
|
-
>
|
|
38
|
-
>
|
|
39
|
-
>
|
|
36
|
+
> [!IMPORTANT] **[AGENT] RESOLVING THE SDK VERSION DETERMINISTICALLY** Never
|
|
37
|
+
> guess or hardcode a memorized out-of-date SDK or plugin version. Before adding
|
|
38
|
+
> dependencies, you MUST query the latest available versions directly from the
|
|
39
|
+
> Google Maven Repository:
|
|
40
40
|
>
|
|
41
41
|
> ```bash
|
|
42
42
|
> # Find the latest Firebase Android BoM version
|
|
@@ -54,8 +54,8 @@ ______________________________________________________________________
|
|
|
54
54
|
> ```
|
|
55
55
|
|
|
56
56
|
In the **module (app-level)** `build.gradle.kts` (usually
|
|
57
|
-
`<project>/<app-module>/build.gradle.kts`), add the dependency for
|
|
58
|
-
|
|
57
|
+
`<project>/<app-module>/build.gradle.kts`), add the dependency for Cloud
|
|
58
|
+
Firestore:
|
|
59
59
|
|
|
60
60
|
```kotlin
|
|
61
61
|
dependencies {
|
|
@@ -113,26 +113,26 @@ ______________________________________________________________________
|
|
|
113
113
|
|
|
114
114
|
### Strict rules & accountability
|
|
115
115
|
|
|
116
|
-
1.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
1.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
1.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
116
|
+
1. **Mandatory Execution Engine**: Every repository lookup requiring related
|
|
117
|
+
data mapping, textual relevance scoring, or multi-document counting MUST be
|
|
118
|
+
authored natively using the server-side `db.pipeline()` API.
|
|
119
|
+
1. **Required Proof of Use**: In your task execution summaries, you MUST
|
|
120
|
+
explicitly highlight the exact pipeline stages (`.define()`, `.addFields()`,
|
|
121
|
+
`.search()`, `.aggregate()`) integrated into your primary data layer return
|
|
122
|
+
paths. Failure to implement pipelines natively constitutes an immediate
|
|
123
|
+
violation of instructions.
|
|
124
|
+
1. **Check API References**:
|
|
125
|
+
- **Locate**: Locate the standard Maven sources JAR (`-sources.jar`)
|
|
126
|
+
corresponding to the resolved `firebase-firestore` dependency version
|
|
127
|
+
inside your local Gradle or Maven dependency cache.
|
|
128
|
+
- **Extract Once**: Extract the documentation files `pipeline.docs.txt` and
|
|
129
|
+
`expressions.docs.txt` from the root directory of that `-sources.jar`
|
|
130
|
+
archive into a temporary workspace scratch directory of your choice.
|
|
131
|
+
- **Read & Reference**:
|
|
132
|
+
- **Read** the extracted `pipeline.docs.txt` once fully to understand core
|
|
133
|
+
pipeline structure and stage capabilities.
|
|
134
|
+
- **Reference** the extracted `expressions.docs.txt` on-demand for specific
|
|
135
|
+
function overloads and parameters.
|
|
136
136
|
|
|
137
137
|
______________________________________________________________________
|
|
138
138
|
|
|
@@ -53,7 +53,8 @@ create index entries with duplicate values.
|
|
|
53
53
|
- Index Required: **Composite Index** on field `a` and `b`
|
|
54
54
|
- **Multiple Ranges**: `where("a", ">", 1).where("b", ">", 2)`
|
|
55
55
|
- Index Required: **Composite Index** on field `a` and `b`
|
|
56
|
-
- **Array Contains + Equality**:
|
|
56
|
+
- **Array Contains + Equality**:
|
|
57
|
+
`where("tags", "array-contains", "news").where("active", "==", true)`
|
|
57
58
|
- Index Required: **Composite Index** on field `tags` and `active`
|
|
58
59
|
|
|
59
60
|
If no indexes is present, Firestore Enterprise will perform a full collection
|