@oya-ai/cli 1.0.122 → 1.0.124

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -5
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -769,10 +769,8 @@ async function pick(preset, heading, question, options) {
769
769
  async function askSupabase(s) {
770
770
  s.secrets.SUPABASE_URL = s.replay ? process.env.SUPABASE_URL || "" : await ask("Supabase project URL:");
771
771
  s.secrets.SUPABASE_SERVICE_KEY = await secretFor(s, "SUPABASE_SERVICE_KEY");
772
- if (s.replay) return;
773
- note("Migrations need the Postgres connection string, not the API URL.");
774
- note("Leave it blank to apply them yourself later with `make migrate`.");
775
- s.migrateUrl = await askSecret("Postgres connection string (optional):", { validate: isPostgresUrl });
772
+ if (!s.replay) note("The data lives in the project's Postgres: its connection string, not the API URL.");
773
+ await askPostgres(s);
776
774
  }
777
775
  async function askPostgres(s) {
778
776
  s.secrets.DATABASE_URL = s.replay ? process.env.DATABASE_URL || "" : await askSecret("Postgres connection string:", {
@@ -949,7 +947,7 @@ var SECTIONS = [
949
947
  ["Tenant keys, each is an identity; add more from the dashboard", ["API_KEYS"]],
950
948
  ["Host operations: /metrics, drain, fleet provision", ["OYA_OPERATOR_TOKEN", "OYA_METRICS_TOKEN"]],
951
949
  ["Credentials at rest. Lose this and every stored cookie, proxy and TOTP seed is unreadable", ["OYA_PROFILE_SECRET"]],
952
- ["Database", ["SUPABASE_URL", "SUPABASE_SERVICE_KEY", "DATABASE_URL", "OYA_RECORDING_BUCKET"]],
950
+ ["Database", ["OYA_STORAGE", "DATABASE_URL", "SUPABASE_URL", "SUPABASE_SERVICE_KEY", "OYA_RECORDING_BUCKET"]],
953
951
  [
954
952
  "Agent LLM. A private or http base URL is operator-only: the dashboard and\n# POST /config/host reject one, on purpose, tenants can set that field too",
955
953
  ["OPENAI_API_KEY", "OPENAI_BASE_URL", "CHAT_MODEL"]
@@ -1071,9 +1069,11 @@ var fleetTokenLines = () => [
1071
1069
  "# Uncomment to let any browser presenting this token enrol itself.",
1072
1070
  `# FLEET_TOKEN=${token()}`
1073
1071
  ];
1072
+ var STORAGE_FOR = { sqlite: "sqlite", postgres: "postgres", supabase: "postgres" };
1074
1073
  function buildEnv(a, secrets, existing) {
1075
1074
  const { v, apiKey } = baseSecrets(a, existing);
1076
1075
  Object.assign(v, secrets);
1076
+ v.OYA_STORAGE = STORAGE_FOR[a.database] ?? "sqlite";
1077
1077
  if (a.llm.provider !== "skip") Object.assign(v, { OPENAI_BASE_URL: a.llm.baseUrl, CHAT_MODEL: a.llm.model });
1078
1078
  fleetSettings(v, { a, existing, wsUrl: a.publicUrl.replace(/^http/, "ws") + "/ws" });
1079
1079
  optionalSettings(v, a, existing);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oya-ai/cli",
3
- "version": "1.0.122",
3
+ "version": "1.0.124",
4
4
  "description": "Command line for the Oya browser control plane.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://oyabrowser.com",
@@ -39,7 +39,7 @@
39
39
  "access": "public"
40
40
  },
41
41
  "devDependencies": {
42
- "@oya-ai/browser": "1.0.122",
42
+ "@oya-ai/browser": "1.0.124",
43
43
  "@types/node": "^20.19.43",
44
44
  "tsup": "^8.0.0",
45
45
  "typescript": "^5.4.0"