vybekiit 0.7.3 → 0.7.7
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 +16607 -7527
- package/dist/global-skills/aws-cdk/SKILL.md +2 -1
- package/dist/global-skills/aws-cloudformation/SKILL.md +2 -1
- package/dist/global-skills/aws-serverless/SKILL.md +45 -44
- package/dist/global-skills/aws-serverless/assets/powertools-handler.py +2 -1
- package/dist/global-skills/aws-serverless/references/api-gateway.md +50 -470
- package/dist/global-skills/aws-serverless/references/architecture.md +47 -186
- package/dist/global-skills/aws-serverless/references/concurrency.md +44 -158
- package/dist/global-skills/aws-serverless/references/deployment.md +1 -1
- package/dist/global-skills/aws-serverless/references/event-sources.md +72 -391
- package/dist/global-skills/aws-serverless/references/lambda.md +69 -428
- package/dist/global-skills/aws-serverless/references/orchestration.md +65 -384
- package/dist/global-skills/aws-serverless/references/production.md +78 -415
- package/dist/global-skills/aws-serverless/references/troubleshooting.md +92 -619
- package/dist/global-skills/claimable-postgres/SKILL.md +60 -49
- package/dist/global-skills/design-my-data/SKILL.md +2 -0
- package/dist/global-skills/eas-app-stores/SKILL.md +8 -0
- package/dist/global-skills/eas-app-stores/references/play-store.md +2 -0
- package/dist/global-skills/eas-hosting/SKILL.md +8 -0
- package/dist/global-skills/eas-observe/SKILL.md +30 -8
- package/dist/global-skills/eas-observe/agents/openai.yaml +1 -1
- package/dist/global-skills/eas-observe/references/metrics.md +54 -3
- package/dist/global-skills/eas-observe/references/queries.md +78 -17
- package/dist/global-skills/eas-observe/references/setup.md +164 -5
- package/dist/global-skills/eas-observe/references/third-party.md +136 -0
- package/dist/global-skills/eas-simulator/SKILL.md +63 -11
- package/dist/global-skills/eas-simulator/references/controllers.md +21 -2
- package/dist/global-skills/eas-simulator/references/run-your-app.md +16 -11
- package/dist/global-skills/eas-simulator/references/troubleshooting.md +8 -5
- package/dist/global-skills/eas-update-insights/SKILL.md +8 -0
- package/dist/global-skills/eas-workflows/SKILL.md +15 -10
- package/dist/global-skills/eas-workflows/scripts/package.json +2 -7
- package/dist/global-skills/email-best-practices/.github/workflows/sync-skills.yml +30 -0
- package/dist/global-skills/email-best-practices/README.md +63 -0
- package/dist/global-skills/email-best-practices/references/accessibility.md +189 -0
- package/dist/global-skills/email-best-practices/references/compliance.md +125 -0
- package/dist/global-skills/email-best-practices/references/deliverability.md +121 -0
- package/dist/global-skills/email-best-practices/references/email-capture.md +129 -0
- package/dist/global-skills/email-best-practices/references/email-types.md +173 -0
- package/dist/global-skills/email-best-practices/references/list-management.md +157 -0
- package/dist/global-skills/email-best-practices/references/marketing-emails.md +115 -0
- package/dist/global-skills/email-best-practices/references/sending-reliability.md +155 -0
- package/dist/global-skills/email-best-practices/references/transactional-email-catalog.md +418 -0
- package/dist/global-skills/email-best-practices/references/transactional-emails.md +92 -0
- package/dist/global-skills/email-best-practices/references/webhooks-events.md +167 -0
- package/dist/global-skills/email-best-practices/tests/README.md +35 -0
- package/dist/global-skills/email-best-practices/tests/scenarios/01-spam-deliverability.md +46 -0
- package/dist/global-skills/email-best-practices/tests/scenarios/02-multi-region-compliance.md +48 -0
- package/dist/global-skills/email-best-practices/tests/scenarios/03-retry-idempotency.md +36 -0
- package/dist/global-skills/email-best-practices/tests/scenarios/04-webhook-bounce-handling.md +52 -0
- package/dist/global-skills/email-best-practices/tests/scenarios/05-new-saas-email-plan.md +51 -0
- package/dist/global-skills/expo-animation/LICENSE +21 -0
- package/dist/global-skills/expo-animation/RECIPES.md +385 -0
- package/dist/global-skills/expo-animation/SKILL.md +267 -0
- package/dist/global-skills/expo-animation/agents/openai.yaml +4 -0
- package/dist/global-skills/expo-app-clip/SKILL.md +8 -0
- package/dist/global-skills/expo-brownfield/SKILL.md +8 -0
- package/dist/global-skills/expo-brownfield/references/brownfield-isolated.md +53 -4
- package/dist/global-skills/expo-data-fetching/SKILL.md +8 -0
- package/dist/global-skills/expo-design-system/SKILL.md +356 -0
- package/dist/global-skills/expo-design-system/agents/openai.yaml +4 -0
- package/dist/global-skills/expo-design-system/references/audit.md +185 -0
- package/dist/global-skills/expo-dev-client/SKILL.md +8 -0
- package/dist/global-skills/expo-dom/SKILL.md +8 -0
- package/dist/global-skills/expo-examples/SKILL.md +8 -0
- package/dist/global-skills/expo-migrate-module/SKILL.md +113 -0
- package/dist/global-skills/expo-migrate-module/agents/openai.yaml +4 -0
- package/dist/global-skills/expo-migrate-module/references/compatibility.md +73 -0
- package/dist/global-skills/expo-migrate-module/references/example.md +212 -0
- package/dist/global-skills/expo-migrate-module/references/migration-map.md +306 -0
- package/dist/global-skills/expo-module/SKILL.md +11 -1
- package/dist/global-skills/expo-native-ui/SKILL.md +8 -0
- package/dist/global-skills/expo-project-structure/SKILL.md +114 -0
- package/dist/global-skills/expo-project-structure/agents/openai.yaml +4 -0
- package/dist/global-skills/expo-router/SKILL.md +8 -0
- package/dist/global-skills/expo-skill-feedback/SKILL.md +66 -33
- package/dist/global-skills/expo-skill-feedback/agents/openai.yaml +2 -2
- package/dist/global-skills/expo-tailwind-setup/SKILL.md +8 -0
- package/dist/global-skills/expo-ui/SKILL.md +8 -0
- package/dist/global-skills/expo-upgrade/SKILL.md +15 -1
- package/dist/global-skills/expo-web-to-native/SKILL.md +8 -0
- package/dist/global-skills/extension-to-functions-codebase/SKILL.md +129 -0
- package/dist/global-skills/extension-to-functions-codebase/references/configuration-migration.md +161 -0
- package/dist/global-skills/extension-to-functions-codebase/references/destructuring-shim.md +122 -0
- package/dist/global-skills/extension-to-functions-codebase/references/signature-mapping.md +84 -0
- package/dist/global-skills/firebase-ai-logic-basics/SKILL.md +61 -19
- package/dist/global-skills/firebase-ai-logic-basics/references/flutter_setup.md +6 -3
- package/dist/global-skills/firebase-app-hosting-basics/SKILL.md +5 -1
- package/dist/global-skills/firebase-auth-basics/SKILL.md +4 -2
- package/dist/global-skills/firebase-basics/SKILL.md +5 -5
- package/dist/global-skills/firebase-crashlytics/SKILL.md +2 -0
- package/dist/global-skills/firebase-data-connect/SKILL.md +2 -0
- package/dist/global-skills/firebase-firestore/SKILL.md +3 -6
- package/dist/global-skills/firebase-hosting-basics/SKILL.md +4 -1
- package/dist/global-skills/firebase-remote-config-basics/SKILL.md +5 -1
- package/dist/global-skills/firebase-security-rules-auditor/SKILL.md +4 -1
- package/dist/global-skills/harden/SKILL.md +2 -1
- package/dist/global-skills/instrument-feature-flags/SKILL.md +1 -0
- package/dist/global-skills/instrument-feature-flags/references/COMMANDMENTS.md +5 -0
- package/dist/global-skills/instrument-feature-flags/references/adding-feature-flag-code.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/android.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/api.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/best-practices.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/django.md +38 -5
- package/dist/global-skills/instrument-feature-flags/references/dotnet.md +10 -4
- package/dist/global-skills/instrument-feature-flags/references/elixir.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/flask.md +17 -5
- package/dist/global-skills/instrument-feature-flags/references/flutter.md +7 -5
- package/dist/global-skills/instrument-feature-flags/references/go.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/ios.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/java.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/laravel.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/next-js.md +74 -8
- package/dist/global-skills/instrument-feature-flags/references/nodejs.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/php.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/python.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/react-native.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/react.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/ruby-on-rails.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/ruby.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/rust.md +6 -4
- package/dist/global-skills/instrument-feature-flags/references/usage.md +41 -4
- package/dist/global-skills/instrument-feature-flags/references/web.md +7 -5
- package/dist/global-skills/instrument-product-analytics/SKILL.md +2 -1
- package/dist/global-skills/instrument-product-analytics/references/COMMANDMENTS.md +5 -0
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-hybrid.md +12 -14
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-astro-ssr.md +25 -21
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-django.md +75 -55
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-fastapi.md +3 -6
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-flask.md +26 -16
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-nuxt-3-6.md +8 -5
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-nuxt-4.md +4 -4
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-react-react-router-7-framework.md +3 -3
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-ruby-on-rails.md +8 -4
- package/dist/global-skills/instrument-product-analytics/references/EXAMPLE-tanstack-start.md +20 -8
- package/dist/global-skills/instrument-product-analytics/references/android.md +46 -4
- package/dist/global-skills/instrument-product-analytics/references/angular.md +41 -5
- package/dist/global-skills/instrument-product-analytics/references/astro.md +41 -5
- package/dist/global-skills/instrument-product-analytics/references/configuration.md +7 -4
- package/dist/global-skills/instrument-product-analytics/references/django.md +38 -5
- package/dist/global-skills/instrument-product-analytics/references/dotnet.md +10 -4
- package/dist/global-skills/instrument-product-analytics/references/elixir.md +6 -4
- package/dist/global-skills/instrument-product-analytics/references/flask.md +17 -5
- package/dist/global-skills/instrument-product-analytics/references/flutter.md +49 -4
- package/dist/global-skills/instrument-product-analytics/references/go.md +6 -4
- package/dist/global-skills/instrument-product-analytics/references/identify-users.md +38 -7
- package/dist/global-skills/instrument-product-analytics/references/ios.md +14 -4
- package/dist/global-skills/instrument-product-analytics/references/laravel.md +6 -4
- package/dist/global-skills/instrument-product-analytics/references/next-js.md +74 -8
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js-3-6.md +39 -7
- package/dist/global-skills/instrument-product-analytics/references/nuxt-js.md +40 -4
- package/dist/global-skills/instrument-product-analytics/references/php.md +6 -4
- package/dist/global-skills/instrument-product-analytics/references/posthog-python.md +21 -17
- package/dist/global-skills/instrument-product-analytics/references/python.md +15 -5
- package/dist/global-skills/instrument-product-analytics/references/react-native.md +41 -7
- package/dist/global-skills/instrument-product-analytics/references/react-router-v6.md +18 -4
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-data-mode.md +18 -4
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-declarative-mode.md +18 -4
- package/dist/global-skills/instrument-product-analytics/references/react-router-v7-framework-mode.md +18 -4
- package/dist/global-skills/instrument-product-analytics/references/ruby-on-rails.md +6 -4
- package/dist/global-skills/instrument-product-analytics/references/ruby.md +6 -4
- package/dist/global-skills/instrument-product-analytics/references/svelte.md +42 -6
- package/dist/global-skills/instrument-product-analytics/references/tanstack-start.md +31 -7
- package/dist/global-skills/instrument-product-analytics/references/usage.md +41 -4
- package/dist/global-skills/instrument-product-analytics/references/vue-js.md +42 -6
- package/dist/global-skills/manifest.json +6 -1
- package/dist/global-skills/neon/SKILL.md +235 -121
- package/dist/global-skills/neon-ai-gateway/SKILL.md +95 -16
- package/dist/global-skills/neon-functions/SKILL.md +242 -152
- package/dist/global-skills/neon-functions/references/ai-sdk.md +9 -3
- package/dist/global-skills/neon-functions/references/mastra-studio.md +1 -1
- package/dist/global-skills/neon-functions/references/mcp.md +13 -4
- package/dist/global-skills/neon-functions/references/sentry.md +165 -52
- package/dist/global-skills/neon-functions/references/sse.md +23 -6
- package/dist/global-skills/neon-object-storage/SKILL.md +40 -16
- package/dist/global-skills/neon-postgres/SKILL.md +63 -262
- package/dist/global-skills/neon-postgres-branches/SKILL.md +61 -50
- package/dist/global-skills/neon-postgres-egress-optimizer/SKILL.md +22 -3
- package/dist/global-skills/resend/SKILL.md +6 -6
- package/dist/global-skills/resend/references/automations.md +2 -2
- package/dist/global-skills/resend/references/broadcasts.md +11 -3
- package/dist/global-skills/resend/references/domains.md +25 -3
- package/dist/global-skills/resend/references/installation.md +7 -7
- package/dist/global-skills/setup-payments/SKILL.md +4 -5
- package/dist/global-skills/stripe-best-practices/SKILL.md +32 -7
- package/dist/global-skills/stripe-best-practices/references/billing.md +11 -1
- package/dist/global-skills/stripe-best-practices/references/payments.md +23 -2
- package/dist/global-skills/stripe-best-practices/references/security.md +21 -11
- package/dist/global-skills/stripe-best-practices/references/tax.md +116 -11
- package/dist/global-skills/supabase/CHANGELOG.md +25 -0
- package/dist/global-skills/supabase/SKILL.md +5 -1
- package/dist/global-skills/supabase-postgres-best-practices/CHANGELOG.md +30 -0
- package/dist/global-skills/supabase-postgres-best-practices/SKILL.md +1 -1
- package/dist/global-skills/use-kit-mcp/SKILL.md +5 -5
- package/dist/global-skills/use-railway/SKILL.md +4 -4
- package/dist/global-skills/use-railway/references/iac.md +206 -57
- package/dist/global-skills/use-railway/scripts/railway-api.sh +7 -2
- package/dist/global-skills/xcode-project-setup/SKILL.md +2 -0
- package/package.json +12 -9
- package/LICENSE.md +0 -47
- package/dist/global-skills/eas-workflows/scripts/validate.js +0 -84
- package/dist/global-skills/expo-skill-feedback/scripts/skill-feedback.cjs +0 -118
- package/dist/global-skills/neon-functions/references/hono-websockets.md +0 -145
|
@@ -1,37 +1,149 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Configuration in source control
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Choose one configuration model before editing files. Never manage the same service with both models.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Choose the model
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Prefer TypeScript Infrastructure as Code when the repository has TypeScript set up. Use `railway.json` only as the fallback for repositories without TypeScript.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Use TypeScript IaC when any of these signals exist in the current project or workspace:
|
|
10
|
+
|
|
11
|
+
- `.railway/railway.ts` already exists.
|
|
12
|
+
- A `tsconfig.json` or another `tsconfig*.json` exists.
|
|
13
|
+
- `package.json` declares `typescript`, or the project contains `.ts` or `.tsx` source files.
|
|
14
|
+
|
|
15
|
+
If none of those signals exist, create or edit `railway.json`. Do not choose `railway.toml` for new agent-authored configuration.
|
|
16
|
+
|
|
17
|
+
If a TypeScript repository already has `railway.json`, migrate the intended settings to `.railway/railway.ts` and remove the old file before planning. If the user explicitly asks to preserve the existing model rather than migrate, edit the existing file and explain that it remains service-level Config as Code.
|
|
18
|
+
|
|
19
|
+
The models have different scopes:
|
|
20
|
+
|
|
21
|
+
| Model | Scope | Applies when |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `.railway/railway.ts` | Whole Railway project: services, databases, buckets, volumes, variables, replicas, domains, and canvas groups | `railway config apply` applies the reviewed project plan |
|
|
24
|
+
| `railway.json` | One service's build and deploy settings | The next deployment reads the file; it does not update dashboard settings |
|
|
25
|
+
|
|
26
|
+
## TypeScript Infrastructure as Code
|
|
27
|
+
|
|
28
|
+
The desired Railway project state lives in:
|
|
10
29
|
|
|
11
30
|
```text
|
|
12
31
|
.railway/railway.ts
|
|
13
|
-
.railway/README.md
|
|
14
|
-
.agents/skills/railway-config/SKILL.md
|
|
15
32
|
```
|
|
16
33
|
|
|
17
|
-
`railway config init` and `railway config pull` create
|
|
34
|
+
`railway config init` and `railway config pull` also create `.railway/README.md`. Railway agent setup installs the shared `use-railway` skill; config commands do not need or create a project-local skill.
|
|
18
35
|
|
|
19
|
-
|
|
36
|
+
### Core rules
|
|
37
|
+
|
|
38
|
+
1. Express Railway product intent, not internal API details.
|
|
39
|
+
2. Do not write Railway UUIDs into `.railway/railway.ts`.
|
|
40
|
+
3. Do not write `EnvironmentConfigPatch`, `ServiceInstance`, Backboard internals, or generated Railway domains into source.
|
|
41
|
+
4. Prefer helpers such as `service()`, `postgres()`, `redis()`, `mysql()`, `mongo()`, `bucket()`, `volume()`, `group()`, `github()`, and `image()`.
|
|
42
|
+
5. Use `service.env.VARIABLE` and `database.env.VARIABLE` for references.
|
|
43
|
+
6. Keep secrets out of source. Imported unknown secret values should use `preserve()` or be omitted when the user wants a smaller import.
|
|
44
|
+
7. Prefer product DSL names such as `domains`, `replicas`, and `group`; avoid internal names such as `customDomains` and `multiRegionConfig`.
|
|
45
|
+
8. Do not add platform defaults unless the user explicitly wants them.
|
|
46
|
+
9. After editing `.railway/railway.ts`, run `railway config plan`.
|
|
47
|
+
10. Do not run `railway config apply` unless the user explicitly asks.
|
|
48
|
+
11. Never use `railway config apply --yes` or `--confirm-destructive` from an agent session without explicit user approval for the exact plan.
|
|
49
|
+
|
|
50
|
+
### Initialize or import
|
|
20
51
|
|
|
21
52
|
```bash
|
|
22
|
-
railway config init # create
|
|
53
|
+
railway config init # create .railway/railway.ts
|
|
23
54
|
railway config init --force # overwrite existing generated files
|
|
24
55
|
railway config pull # import the linked project
|
|
25
56
|
railway config pull --force # overwrite existing .railway/railway.ts
|
|
57
|
+
railway config pull --omit-preserved-variables # omit unknown variable values
|
|
26
58
|
railway config pull --json # print current graph instead of writing files
|
|
27
59
|
railway config pull --agent # ask an agent to clean the import afterward
|
|
28
60
|
```
|
|
29
61
|
|
|
30
|
-
If the directory is not linked, the CLI prompts for project
|
|
62
|
+
If the directory is not linked, the CLI prompts for project and environment in an interactive terminal. In agent workflows, link first or pass explicit project and environment context when supported.
|
|
63
|
+
|
|
64
|
+
### Authoring
|
|
65
|
+
|
|
66
|
+
Import the helpers needed by the project:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import {
|
|
70
|
+
bucket,
|
|
71
|
+
defineRailway,
|
|
72
|
+
github,
|
|
73
|
+
group,
|
|
74
|
+
image,
|
|
75
|
+
mongo,
|
|
76
|
+
mysql,
|
|
77
|
+
postgres,
|
|
78
|
+
preserve,
|
|
79
|
+
project,
|
|
80
|
+
redis,
|
|
81
|
+
service,
|
|
82
|
+
volume,
|
|
83
|
+
} from "railway/iac";
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Common resource patterns:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
const db = postgres("postgres");
|
|
90
|
+
|
|
91
|
+
const api = service("api", {
|
|
92
|
+
source: github("owner/repo", { branch: "main" }),
|
|
93
|
+
build: "pnpm build",
|
|
94
|
+
start: "pnpm start",
|
|
95
|
+
env: {
|
|
96
|
+
DATABASE_URL: db.env.DATABASE_URL,
|
|
97
|
+
INTERNAL_TOKEN: preserve(),
|
|
98
|
+
},
|
|
99
|
+
domains: ["api.example.com"],
|
|
100
|
+
replicas: 3,
|
|
101
|
+
volumeMounts: {
|
|
102
|
+
"/data": volume("uploads", { sizeMB: 4096 }),
|
|
103
|
+
},
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const worker = service("worker", {
|
|
107
|
+
source: image("ghcr.io/acme/worker:latest"),
|
|
108
|
+
env: {
|
|
109
|
+
API_HOST: api.env.RAILWAY_PRIVATE_DOMAIN,
|
|
110
|
+
API_TOKEN: api.env.INTERNAL_TOKEN,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
const media = bucket("media", { region: "iad" });
|
|
115
|
+
const backend = group("Backend", [api, worker, db]);
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Advanced placement can map regions to replica counts:
|
|
119
|
+
|
|
120
|
+
```ts
|
|
121
|
+
const web = service("web", {
|
|
122
|
+
replicas: {
|
|
123
|
+
"us-west2": 2,
|
|
124
|
+
"europe-west4": 1,
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Return every managed resource from the project:
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
export default defineRailway(() => {
|
|
133
|
+
const db = postgres("postgres");
|
|
134
|
+
const web = service("web", {
|
|
135
|
+
env: { DATABASE_URL: db.env.DATABASE_URL },
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
return project("my-app", {
|
|
139
|
+
resources: [db, web],
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
```
|
|
31
143
|
|
|
32
|
-
|
|
144
|
+
### Plan
|
|
33
145
|
|
|
34
|
-
Always plan before applying:
|
|
146
|
+
Always plan after editing and before applying:
|
|
35
147
|
|
|
36
148
|
```bash
|
|
37
149
|
railway config plan
|
|
@@ -47,9 +159,9 @@ Plan output summarizes changes in Terraform style:
|
|
|
47
159
|
Plan: 1 to add, 0 to change, 0 to destroy
|
|
48
160
|
```
|
|
49
161
|
|
|
50
|
-
Variable values are redacted by default. Use `--show-values` only when the user
|
|
162
|
+
Variable values are redacted by default. Use `--show-values` only when the user accepts the secret exposure risk. For CI drift checks, `--detailed-exit-code` returns `0` for no changes, `2` for pending changes, and another non-zero code for errors.
|
|
51
163
|
|
|
52
|
-
|
|
164
|
+
### Apply
|
|
53
165
|
|
|
54
166
|
```bash
|
|
55
167
|
railway config apply
|
|
@@ -58,51 +170,88 @@ railway config apply --yes --confirm-destructive
|
|
|
58
170
|
railway config apply --json --yes --confirm-destructive
|
|
59
171
|
```
|
|
60
172
|
|
|
61
|
-
`apply`
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
173
|
+
`apply` runs a fresh plan. If remote state changed, Railway rejects the stale apply and requires another plan. In non-interactive or agent sessions, destructive changes require `--confirm-destructive` in addition to `--yes` or `--json`; add it only after the user explicitly approves the exact destructive impact.
|
|
174
|
+
|
|
175
|
+
### Review checklist
|
|
176
|
+
|
|
177
|
+
Before applying, confirm:
|
|
178
|
+
|
|
179
|
+
- The latest plan shows only expected changes.
|
|
180
|
+
- The user reviewed the plan and explicitly requested apply.
|
|
181
|
+
- Secrets are not replaced with literal placeholders.
|
|
182
|
+
- Existing Railway-managed variables are omitted or use `preserve()` when they should remain untouched.
|
|
183
|
+
- Custom domains use `domains`, not networking internals.
|
|
184
|
+
- Scaling uses `replicas`, not `multiRegionConfig`.
|
|
185
|
+
- No generated Railway service domains or Railway UUIDs are committed.
|
|
186
|
+
|
|
187
|
+
### Troubleshoot TypeScript IaC
|
|
188
|
+
|
|
189
|
+
- **Service is already managed by `railway.json`**: migrate its intended settings and remove the old file before planning; Railway blocks dual ownership.
|
|
190
|
+
- **Plan shows secrets as hidden**: expected. Use `--show-values` only with user approval.
|
|
191
|
+
- **Apply says the plan is stale**: run a new plan, inspect it, then apply again only if requested.
|
|
192
|
+
- **Destructive apply is blocked**: get explicit approval for the exact plan before adding `--confirm-destructive`.
|
|
193
|
+
- **Imported variables use `preserve()`**: Railway could not safely print encrypted values; `preserve()` retains the remote value.
|
|
194
|
+
- **Generated code is too literal**: simplify `.railway/railway.ts`, then run another plan.
|
|
195
|
+
|
|
196
|
+
## `railway.json` fallback
|
|
197
|
+
|
|
198
|
+
Use this path only when the repository has no TypeScript setup. `railway.json` controls one service's build and deploy settings, not project resources such as databases, buckets, variables, or canvas groups.
|
|
199
|
+
|
|
200
|
+
Start with the schema so editors validate fields:
|
|
201
|
+
|
|
202
|
+
```json
|
|
203
|
+
{
|
|
204
|
+
"$schema": "https://railway.com/railway.schema.json",
|
|
205
|
+
"build": {
|
|
206
|
+
"builder": "RAILPACK",
|
|
207
|
+
"buildCommand": "npm run build"
|
|
208
|
+
},
|
|
209
|
+
"deploy": {
|
|
210
|
+
"preDeployCommand": ["npm run db:migrate"],
|
|
211
|
+
"startCommand": "npm start",
|
|
212
|
+
"healthcheckPath": "/health",
|
|
213
|
+
"healthcheckTimeout": 300,
|
|
214
|
+
"restartPolicyType": "ON_FAILURE",
|
|
215
|
+
"restartPolicyMaxRetries": 5
|
|
216
|
+
}
|
|
217
|
+
}
|
|
80
218
|
```
|
|
81
219
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
220
|
+
Rules for this fallback:
|
|
221
|
+
|
|
222
|
+
1. Include only settings the user intends to override. File values override dashboard values for that deployment.
|
|
223
|
+
2. Use the canonical schema field names; do not copy internal environment patch names blindly.
|
|
224
|
+
3. Keep service variables and secrets out of `railway.json`; manage them with Railway variables.
|
|
225
|
+
4. Use `environments.<name>` for environment-specific overrides and `environments.pr` for PR environments.
|
|
226
|
+
5. In a monorepo, place the file at the service root or set the service's custom Railway config file path to its absolute repository path.
|
|
227
|
+
6. Validate the JSON after editing. A deployment is required for the config to take effect; editing the file does not mutate dashboard settings.
|
|
228
|
+
|
|
229
|
+
Example environment override:
|
|
230
|
+
|
|
231
|
+
```json
|
|
232
|
+
{
|
|
233
|
+
"$schema": "https://railway.com/railway.schema.json",
|
|
234
|
+
"deploy": {
|
|
235
|
+
"startCommand": "npm start"
|
|
236
|
+
},
|
|
237
|
+
"environments": {
|
|
238
|
+
"staging": {
|
|
239
|
+
"deploy": {
|
|
240
|
+
"startCommand": "npm run staging"
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"pr": {
|
|
244
|
+
"deploy": {
|
|
245
|
+
"startCommand": "npm run preview"
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
```
|
|
97
251
|
|
|
98
|
-
|
|
99
|
-
- **Plan shows secrets as hidden**: this is expected. Use `--show-values` only with user approval.
|
|
100
|
-
- **Apply says the plan is stale**: run `railway config plan` again, inspect the new diff, then re-apply.
|
|
101
|
-
- **Destructive apply blocked**: get explicit user approval and rerun with `--confirm-destructive`.
|
|
102
|
-
- **Imported variables use `preserve()`**: Railway could not safely print encrypted secret values; preserve keeps the remote value.
|
|
103
|
-
- **Generated code is too literal**: edit `.railway/railway.ts` into a cleaner shape, then verify with `railway config plan`.
|
|
252
|
+
For the complete field list, use the live JSON schema or Railway's Config as Code reference rather than guessing unsupported keys.
|
|
104
253
|
|
|
105
254
|
## Validated against
|
|
106
255
|
|
|
107
|
-
- Docs: [infrastructure-as-code
|
|
108
|
-
- CLI source: [config/mod.rs](https://github.com/railwayapp/cli/blob/v5.
|
|
256
|
+
- Docs: [Infrastructure as Code](https://docs.railway.com/infrastructure-as-code), [IaC reference](https://docs.railway.com/infrastructure-as-code/reference), [Config as Code](https://docs.railway.com/guides/config-as-code), [Config as Code reference](https://docs.railway.com/reference/config-as-code)
|
|
257
|
+
- CLI source: [config/mod.rs](https://github.com/railwayapp/cli/blob/v5.27.1/src/commands/config/mod.rs), [config/runner.rs](https://github.com/railwayapp/cli/blob/v5.27.1/src/commands/config/runner.rs)
|
|
@@ -42,11 +42,16 @@ else
|
|
|
42
42
|
fi
|
|
43
43
|
|
|
44
44
|
HEADERS=(
|
|
45
|
-
-H "Authorization: Bearer $TOKEN"
|
|
46
45
|
-H "Content-Type: application/json"
|
|
47
46
|
-H "X-Railway-Skill-Id: $SKILL_ID"
|
|
48
47
|
-H "X-Railway-Skill-Version: $SKILL_VERSION"
|
|
49
48
|
-H "X-Railway-Agent-Session: $RAILWAY_AGENT_SESSION"
|
|
50
49
|
)
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
# Keep the token and the request body out of argv: /proc/<pid>/cmdline is
|
|
52
|
+
# readable by any other local user, so anything passed as an argument leaks on a
|
|
53
|
+
# shared host. The bearer goes in through --config on a pipe, the payload on stdin.
|
|
54
|
+
printf '%s' "$PAYLOAD" | curl -s https://backboard.railway.com/graphql/v2 \
|
|
55
|
+
"${HEADERS[@]}" \
|
|
56
|
+
--config <(printf 'header = "Authorization: Bearer %s"\n' "$TOKEN") \
|
|
57
|
+
-d @-
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
name: xcode-project-setup
|
|
3
3
|
description: Safely modifies Xcode projects (.pbxproj) to add Swift Packages and link files. Use this skill whenever an iOS project needs dependencies installed (e.g. Firebase, Alamofire).
|
|
4
4
|
compatibility: Requires Swift to be installed locally and macOS environment.
|
|
5
|
+
metadata:
|
|
6
|
+
category: ApplicationDevelopment
|
|
5
7
|
---
|
|
6
8
|
|
|
7
9
|
# Xcode Project Setup
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vybekiit",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.7.7",
|
|
4
|
+
"description": "Choose your services, sign in, create a VybeKiit app, and open its verified local welcome page.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
17
18
|
"@aws-sdk/client-dynamodb": "^3.1075.0",
|
|
18
19
|
"@aws-sdk/client-s3": "^3.1075.0",
|
|
19
20
|
"@aws-sdk/lib-dynamodb": "^3.1075.0",
|
|
@@ -23,19 +24,21 @@
|
|
|
23
24
|
"effect": "3.21.4",
|
|
24
25
|
"firebase-admin": "^13.0.2",
|
|
25
26
|
"mongodb": "^7.4.0",
|
|
26
|
-
"open": "11.0.0"
|
|
27
|
+
"open": "11.0.0",
|
|
28
|
+
"playwright": "^1.61.1"
|
|
27
29
|
},
|
|
28
30
|
"devDependencies": {
|
|
29
31
|
"@types/node": "22.20.0",
|
|
30
32
|
"tsup": "8.5.1",
|
|
31
33
|
"typescript": "5.7.2",
|
|
32
34
|
"vitest": "3.2.6",
|
|
33
|
-
"@vybekiit/agent-kit": "0.7.
|
|
34
|
-
"@vybekiit/
|
|
35
|
-
"@vybekiit/
|
|
36
|
-
"@vybekiit/
|
|
37
|
-
"@vybekiit/
|
|
38
|
-
"@vybekiit/
|
|
35
|
+
"@vybekiit/agent-kit": "0.7.7",
|
|
36
|
+
"@vybekiit/agent-mcp": "0.7.7",
|
|
37
|
+
"@vybekiit/core": "0.7.7",
|
|
38
|
+
"@vybekiit/db": "0.7.7",
|
|
39
|
+
"@vybekiit/deploy": "0.7.7",
|
|
40
|
+
"@vybekiit/payments": "0.7.7",
|
|
41
|
+
"@vybekiit/report-mode": "0.7.7"
|
|
39
42
|
},
|
|
40
43
|
"scripts": {
|
|
41
44
|
"build": "tsup && node scripts/bundleGlobalSkills.mjs",
|
package/LICENSE.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# VybeKiit licensing
|
|
2
|
-
|
|
3
|
-
This repository is **dual-licensed by component**, matching the Owned vs Maintained split (see
|
|
4
|
-
`CONTEXT.md`). Which license applies depends only on the path:
|
|
5
|
-
|
|
6
|
-
| Path | License | Why |
|
|
7
|
-
|---|---|---|
|
|
8
|
-
| `packages/*` (published `@vybekiit/*`) | **MIT** | Public, headless logic — free updates double as marketing; nothing secret here. |
|
|
9
|
-
| `cli/` (the published `vybekiit` scaffolder) | **MIT** | The public npm CLI anyone may `npx`; the paid gate is repo access, not the CLI itself. |
|
|
10
|
-
| `templates/*` + the buyer agent layer (`.vybekiit/`, and each template's `AGENTS.md` / `CLAUDE.md` / `.cursor/rules` / `language.md` / `BUILDER-VOICE.md`) | **Proprietary — VybeKiit EULA** | The paid, owned product. Full terms in [`EULA.md`](./EULA.md). |
|
|
11
|
-
| `apps/landing/`, root tooling/config, and other repo internals | Proprietary (not distributed) | Our store and build infrastructure — never shipped to a buyer. |
|
|
12
|
-
|
|
13
|
-
The MIT-licensed paths are the only parts published to public npm. The proprietary paths reach
|
|
14
|
-
buyers through private GitHub mirror repos after purchase (the gate) and are governed by the
|
|
15
|
-
[VybeKiit EULA](./EULA.md), which includes a plain-language summary of what a buyer can and can't do.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## MIT License — applies to `packages/*` and `cli/`
|
|
20
|
-
|
|
21
|
-
Copyright (c) 2026 VybeKiit authors
|
|
22
|
-
|
|
23
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
24
|
-
associated documentation files (the "Software"), to deal in the Software without restriction,
|
|
25
|
-
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
|
26
|
-
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
|
27
|
-
furnished to do so, subject to the following conditions:
|
|
28
|
-
|
|
29
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
30
|
-
portions of the Software.
|
|
31
|
-
|
|
32
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
33
|
-
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
34
|
-
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
35
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
36
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Proprietary — applies to `templates/*` and the buyer agent layer
|
|
41
|
-
|
|
42
|
-
These paths are **not** open source. They are the paid product, licensed (not sold) to buyers under
|
|
43
|
-
the **[VybeKiit EULA](./EULA.md)**. In short: a buyer may build unlimited products of their own,
|
|
44
|
-
including commercial ones, but may **not** redistribute, resell, or republish the kit itself, build a
|
|
45
|
-
competing kit with it, or share their access. Provided as-is, no warranty, liability capped at the
|
|
46
|
-
amount paid, best-effort updates with no compatibility guarantee. See `EULA.md` for the full terms
|
|
47
|
-
and the plain-language buyer summary.
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { readFile } from 'node:fs/promises';
|
|
4
|
-
import { resolve } from 'node:path';
|
|
5
|
-
import process from 'node:process';
|
|
6
|
-
|
|
7
|
-
import Ajv2020 from 'ajv/dist/2020.js';
|
|
8
|
-
import addFormats from 'ajv-formats';
|
|
9
|
-
import yaml from 'js-yaml';
|
|
10
|
-
|
|
11
|
-
import { fetchCached } from './fetch.js';
|
|
12
|
-
|
|
13
|
-
const SCHEMA_URL = 'https://api.expo.dev/v2/workflows/schema';
|
|
14
|
-
|
|
15
|
-
async function fetchSchema() {
|
|
16
|
-
const data = await fetchCached(SCHEMA_URL);
|
|
17
|
-
const body = JSON.parse(data);
|
|
18
|
-
return body.data;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
function createValidator(schema) {
|
|
22
|
-
const ajv = new Ajv2020({ allErrors: true, strict: true });
|
|
23
|
-
addFormats(ajv);
|
|
24
|
-
return ajv.compile(schema);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async function validateFile(validator, filePath) {
|
|
28
|
-
const content = await readFile(filePath, 'utf-8');
|
|
29
|
-
|
|
30
|
-
let doc;
|
|
31
|
-
try {
|
|
32
|
-
doc = yaml.load(content);
|
|
33
|
-
} catch (e) {
|
|
34
|
-
return { valid: false, error: `YAML parse error: ${e.message}` };
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const valid = validator(doc);
|
|
38
|
-
if (!valid) {
|
|
39
|
-
return { valid: false, error: formatErrors(validator.errors) };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
return { valid: true };
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function formatErrors(errors) {
|
|
46
|
-
return errors
|
|
47
|
-
.map((error) => {
|
|
48
|
-
const path = error.instancePath || '(root)';
|
|
49
|
-
const allowed = error.params?.allowedValues?.join(', ');
|
|
50
|
-
return ` ${path}: ${error.message}${allowed ? ` (allowed: ${allowed})` : ''}`;
|
|
51
|
-
})
|
|
52
|
-
.join('\n');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
if (import.meta.main) {
|
|
56
|
-
const args = process.argv.slice(2);
|
|
57
|
-
const files = args.filter((a) => !a.startsWith('-'));
|
|
58
|
-
|
|
59
|
-
if (files.length === 0 || args.includes('--help') || args.includes('-h')) {
|
|
60
|
-
console.log(`Usage: validate <workflow.yml> [workflow2.yml ...]
|
|
61
|
-
|
|
62
|
-
Validates EAS workflow YAML files against the official schema.`);
|
|
63
|
-
process.exit(files.length === 0 ? 1 : 0);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const schema = await fetchSchema();
|
|
67
|
-
const validator = createValidator(schema);
|
|
68
|
-
|
|
69
|
-
let hasErrors = false;
|
|
70
|
-
|
|
71
|
-
for (const file of files) {
|
|
72
|
-
const filePath = resolve(process.cwd(), file);
|
|
73
|
-
const result = await validateFile(validator, filePath);
|
|
74
|
-
|
|
75
|
-
if (result.valid) {
|
|
76
|
-
console.log(`✓ ${file}`);
|
|
77
|
-
} else {
|
|
78
|
-
console.error(`✗ ${file}\n${result.error}`);
|
|
79
|
-
hasErrors = true;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
process.exit(hasErrors ? 1 : 0);
|
|
84
|
-
}
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Submit feedback about an Expo skill to PostHog.
|
|
3
|
-
//
|
|
4
|
-
// Usage:
|
|
5
|
-
// node skill-feedback.cjs --skill <name> --rating <rating> --text "..." \
|
|
6
|
-
// [--about skill|expo] [--agent-harness <harness>] [--dry-run]
|
|
7
|
-
|
|
8
|
-
const {
|
|
9
|
-
POSTHOG_PROJECT_API_KEY,
|
|
10
|
-
SOURCE,
|
|
11
|
-
telemetryActive,
|
|
12
|
-
telemetryConfigured,
|
|
13
|
-
detectHarness,
|
|
14
|
-
platformProps,
|
|
15
|
-
telemetryIdentity,
|
|
16
|
-
sendToPosthog,
|
|
17
|
-
} = require("./telemetry_common.cjs");
|
|
18
|
-
|
|
19
|
-
const EVENT_NAME = "skill_feedback";
|
|
20
|
-
const RATINGS = ["useful", "confusing", "bug", "idea", "other"];
|
|
21
|
-
// What the feedback is about: the skill's own guidance (default), or Expo the
|
|
22
|
-
// framework — when a skill fell short because of Expo itself, not the skill.
|
|
23
|
-
const ABOUT_VALUES = ["skill", "expo"];
|
|
24
|
-
const MAX_FEEDBACK_CHARS = 4000;
|
|
25
|
-
|
|
26
|
-
function parseArgs(argv) {
|
|
27
|
-
const args = { skill: "", rating: "", text: "", about: "skill", agentHarness: "", dryRun: false };
|
|
28
|
-
for (let i = 0; i < argv.length; i++) {
|
|
29
|
-
const flag = argv[i];
|
|
30
|
-
const next = () => argv[++i] || "";
|
|
31
|
-
switch (flag) {
|
|
32
|
-
case "--skill": args.skill = next(); break;
|
|
33
|
-
case "--rating": args.rating = next(); break;
|
|
34
|
-
case "--text": args.text = next(); break;
|
|
35
|
-
case "--about": args.about = next(); break;
|
|
36
|
-
case "--agent-harness": args.agentHarness = next(); break;
|
|
37
|
-
case "--dry-run": args.dryRun = true; break;
|
|
38
|
-
default: break;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return args;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function eventPayload(args) {
|
|
45
|
-
const feedback = args.text.trim().slice(0, MAX_FEEDBACK_CHARS);
|
|
46
|
-
const skill = args.skill.trim();
|
|
47
|
-
const agentHarness = args.agentHarness.trim() || detectHarness();
|
|
48
|
-
|
|
49
|
-
if (!feedback) throw new Error("--text cannot be empty");
|
|
50
|
-
if (!skill) throw new Error("--skill cannot be empty");
|
|
51
|
-
if (!RATINGS.includes(args.rating)) throw new Error(`--rating must be one of: ${RATINGS.join(", ")}`);
|
|
52
|
-
const about = (args.about || "skill").trim() || "skill";
|
|
53
|
-
if (!ABOUT_VALUES.includes(about)) throw new Error(`--about must be one of: ${ABOUT_VALUES.join(", ")}`);
|
|
54
|
-
|
|
55
|
-
const timestamp = new Date().toISOString();
|
|
56
|
-
const [distinctId, identityProperties] = telemetryIdentity(agentHarness, { createInstallation: !args.dryRun });
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
api_key: POSTHOG_PROJECT_API_KEY,
|
|
60
|
-
event: EVENT_NAME,
|
|
61
|
-
distinct_id: distinctId,
|
|
62
|
-
timestamp,
|
|
63
|
-
properties: {
|
|
64
|
-
$process_person_profile: false,
|
|
65
|
-
source: SOURCE,
|
|
66
|
-
...identityProperties,
|
|
67
|
-
agent_harness: agentHarness,
|
|
68
|
-
...platformProps(),
|
|
69
|
-
skill,
|
|
70
|
-
about,
|
|
71
|
-
rating: args.rating,
|
|
72
|
-
feedback_text: feedback,
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
async function main(argv) {
|
|
78
|
-
const args = parseArgs(argv);
|
|
79
|
-
|
|
80
|
-
if (!args.dryRun && !telemetryActive()) {
|
|
81
|
-
console.debug("skill-feedback: telemetry is off (opt-in, off by default); nothing sent. Enable with `telemetry.cjs --on` or EXPO_SKILLS_TELEMETRY=1.");
|
|
82
|
-
return 0;
|
|
83
|
-
}
|
|
84
|
-
if (!telemetryConfigured() && !args.dryRun) {
|
|
85
|
-
console.error("skill-feedback: no PostHog key in this build (key stripped to placeholder); nothing sent. Set EXPO_SKILLS_POSTHOG_KEY or restore the key in telemetry_common.cjs.");
|
|
86
|
-
return 0;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
let payload;
|
|
90
|
-
try {
|
|
91
|
-
payload = eventPayload(args);
|
|
92
|
-
} catch (err) {
|
|
93
|
-
console.error(`skill-feedback: ${err.message}`);
|
|
94
|
-
return 2;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (args.dryRun) {
|
|
98
|
-
console.log(JSON.stringify({ ...payload, api_key: "phc_..." }, null, 2));
|
|
99
|
-
return 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
try {
|
|
103
|
-
await sendToPosthog(payload, { userAgent: "expo-skills/skill-feedback", timeoutMs: 10000 });
|
|
104
|
-
} catch (err) {
|
|
105
|
-
console.error(`skill-feedback: ${err.message}`);
|
|
106
|
-
return 1;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
console.log(`sent skill feedback: ${payload.properties.skill}`);
|
|
110
|
-
return 0;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
main(process.argv.slice(2))
|
|
114
|
-
.then((code) => process.exit(code))
|
|
115
|
-
.catch((err) => {
|
|
116
|
-
console.error(`skill-feedback: ${err && err.message ? err.message : err}`);
|
|
117
|
-
process.exit(1);
|
|
118
|
-
});
|