@somewhere-cloud/cli 0.38.143 → 0.38.145

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.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@somewhere-cloud/cli",
3
- "version": "0.38.143",
3
+ "version": "0.38.145",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@somewhere-cloud/cli",
9
- "version": "0.38.143",
9
+ "version": "0.38.145",
10
10
  "license": "MIT",
11
11
  "bin": {
12
12
  "somewhere": "bin/somewhere.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@somewhere-cloud/cli",
3
- "version": "0.38.143",
3
+ "version": "0.38.145",
4
4
  "description": "CLI for somewhere.cloud — auth, projects, deploy, pull, promote, db, logs, env, MCP bridge.",
5
5
  "keywords": [
6
6
  "somewhere",
@@ -66,5 +66,5 @@
66
66
  },
67
67
  "bundleDependencies": [],
68
68
  "bundledDependencies": [],
69
- "gitHead": "51c11127f6448487e1c1762a5d48a4469e6467f7"
69
+ "gitHead": "8aedcddb5e58021976bca33c1ae660efa1984d53"
70
70
  }
@@ -8,12 +8,12 @@
8
8
  "shared/transient-read.ts": "2f22daebdc74fed6255a29df7deda0db307f9165c1d9988dba3ee872b2584ffd",
9
9
  "shared/types/placeholder-identity.ts": "089a46e2474a21193d3611eddd9c94b6bbe62441b3039ed80fc8499bada447ca",
10
10
  "worker/containers/compile/checker-contract.cjs": "c6d4ebc9ec058b3562655cc4f18dc1cea7e4492eb35b7f0fd0d87e974c26b492",
11
- "worker/containers/compile/consumer-contract.cjs": "4d4aeba51e4b65543bba54f5e026a9e5905ef717a2e623fe7d6327d2d5d81565",
11
+ "worker/containers/compile/consumer-contract.cjs": "8683de88ffa841ee995e67310ea163f22f0ca6d22b247f4c42b8918db1e64f9d",
12
12
  "worker/containers/compile/declared-data-contract.cjs": "1261275ab4ff75b3001456a30b041a7c639578ffff0b67b42706d7b0ff11d744",
13
13
  "worker/containers/compile/generated-declarations-render.cjs": "7ffdb34645cc9eccac6eba39dc86b646a41c4de8a1a038d2b5b46f42df9f1157",
14
14
  "worker/containers/compile/generated-declarations.cjs": "6e9902e054c5c784fd9b3c3fafc1869e79954100a45014e1132247cd82833ec4",
15
15
  "worker/containers/compile/groups-types.cjs": "7c22b4bb96c9391005d434852600dc02bc8a6bbb99d78d2b8e3eb152f7b72c58",
16
- "worker/containers/compile/runtime-types.cjs": "388596318b94236bf76634e935fb763676a4156f4aa93f9ec952fd42f66f8d29",
16
+ "worker/containers/compile/runtime-types.cjs": "7a56610ddf48164fa31af2d8e23553c8bd39122a4d93f375afccf17195024820",
17
17
  "worker/containers/compile/schema-types.cjs": "6bd92695cd275b0c6bc7dc79daaf3189fb275449321342c967a2030f287cfdfa",
18
18
  "worker/containers/compile/typed-data.cjs": "1c8bec853fbee4ffd34c651076a4e1f4d8b18c0c2be5e99e31df7c9283207627",
19
19
  "worker/containers/compile/typed-files.cjs": "f2568567a53994575ede91f9a0839965e64f94eb92ae11315650189b6de0f79c",
@@ -58,8 +58,8 @@
58
58
  "worker/src/utils/db-schema-deploy/schema-ownership.ts": "e6c811a87bc657707be3518dfe547c6d97718ac073108b126eb7f791c9c08202",
59
59
  "worker/src/utils/dev-health-class.ts": "fd430f31b9c8469f3d90e118fd8c75d1836ebcf705c1f9e93915ffa53a4cb066",
60
60
  "worker/src/utils/errors.ts": "f9d22810c285d2a512d258853bdd17cf9c1445c3983d51f3adbbcede273ac07d",
61
- "worker/src/utils/event-log.ts": "1f878064deef5ca490b7b84bed9c1fc50a8b7fc84b3d55a9eeada86f570e37b0",
62
- "worker/src/utils/feed-kinds.ts": "9fca06b277f02324444fee2cc267d03811707e262232382d5b5e40d9035d2def",
61
+ "worker/src/utils/event-log.ts": "830714e6dba2fb720e7891a2ce3d4acb9bb936f018949b53911dbc8d9e06021a",
62
+ "worker/src/utils/feed-kinds.ts": "70577b6473815fc00179216e0375c5657a9eb42a30f2799ca770752814487020",
63
63
  "worker/src/utils/journey-segment.ts": "fc92c196b5368a2aa07b205d12b1bf4344e8d5dcde875c66400b79729207ad96",
64
64
  "worker/src/utils/json-exact-integers.ts": "e2eb8d3b2e17da363eb14fb46d876208579e2e92bfac173fb27527e6c4fb575e",
65
65
  "worker/src/utils/log-sanitize.ts": "f4591089c16a34e4cbc271ec22b48566b970a62e30d3e9856b7dcd9c479fb0e8",
@@ -70,8 +70,8 @@
70
70
  "worker/src/utils/public-urls.ts": "44e455118f85c111316f6d8346d61e736ffcd1971c4539ea146100084aa6f21e",
71
71
  "worker/src/utils/reference-check-inputs.ts": "59c7c8d3b4aaf8bffb2a54964e41f909437745d001b093edd74cc135f4edcf67",
72
72
  "worker/src/utils/telegram-attempt-receipts.ts": "a9ba55ae71f63ada44a105f1ceae04b0491bda0d6e77e5762db2dbecdd2981dd",
73
- "worker/src/utils/telegram.ts": "dfbc9e756b44b445b3c3504c90a1094a94e6f9853ff9c0e0a84fba0e8c4518da",
73
+ "worker/src/utils/telegram.ts": "9aaaa2597c366da1eeee9e2252e9b73e611ea97ed9558f7e07e694d9b393f053",
74
74
  "worker/src/utils/workers-ai-comparison.ts": "18b5d5ea96f817387a5ef49733ba611c99cbb14987143c28118b1c90f3b637d4"
75
75
  },
76
- "sha256": "1e90ceb52d16c135e1e1dd8864d7c098f53cbfee9d08b775add70f47ac5ef988"
76
+ "sha256": "5fc2cf25ea995fda5bf86ac5a7e7f3df28d7ea14919f5eff51731892adacbcbf"
77
77
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "sha256": "b91dc8dd58f9666ee0f10cc6eb47a5c144a3d6906302239d9c900c64bb5178d1"
2
+ "sha256": "3e4600ecbbcb5d21e995cec1538ad4972b51a0c2998c02f28d50ead9cfb2cb04"
3
3
  }
@@ -1276,8 +1276,17 @@ type SomewhereDbAggregateOptionsFor<T extends string> = SomewhereDbAggregateOpti
1276
1276
  max?: __SomewhereDeclared<T, 'scalar', string> | null;
1277
1277
  groupBy?: readonly __SomewhereDeclared<T, 'scalar', string>[] | null;
1278
1278
  };
1279
- type SomewhereDbAggregateRow<T extends string> = T extends keyof SomewhereDeclaredTables
1280
- ? Record<string, number | string | boolean | null>
1279
+ type SomewhereDbGroupBy<T extends string> = SomewhereDbAggregateOptionsFor<T>['groupBy'];
1280
+ // A literal list names the keys present in each row. Dynamic arrays can
1281
+ // select any subset, so their rows retain the generic scalar index type.
1282
+ type __SomewhereDbGroupColumn<T extends string, K extends string> = K extends SomewhereDbColumn<T>
1283
+ ? Pick<SomewhereDbRow<T>, K>
1284
+ : unknown;
1285
+ type __SomewhereDbGroupColumns<T extends string, G> = G extends readonly [infer K extends string, ...infer Rest]
1286
+ ? __SomewhereDbGroupColumn<T, K> & __SomewhereDbGroupColumns<T, Rest>
1287
+ : unknown;
1288
+ type SomewhereDbAggregateRow<T extends string, G> = T extends keyof SomewhereDeclaredTables
1289
+ ? Record<string, number | string | boolean | null> & __SomewhereDbGroupColumns<T, G>
1281
1290
  : Record<string, unknown>;
1282
1291
  interface SomewhereDbAggregateResult<Row = Record<string, unknown>> {
1283
1292
  // Always an array of group rows (exactly one when ungrouped): grouped columns plus composed result keys.
@@ -1327,14 +1336,14 @@ interface SomewhereDbScopeApi {
1327
1336
  list(): Promise<SomewhereDbScopeEntry[]>;
1328
1337
  }
1329
1338
  interface SomewhereServerDb {
1330
- aggregate<T extends SomewhereDbTable>(table: T, options: SomewhereDbAggregateOptionsFor<T>): Promise<SomewhereDbAggregateResult<SomewhereDbAggregateRow<T>>>;
1339
+ aggregate<T extends SomewhereDbTable, const G extends SomewhereDbGroupBy<T> = SomewhereDbGroupBy<T>>(table: T, options: SomewhereDbAggregateOptionsFor<T> & { groupBy?: G }): Promise<SomewhereDbAggregateResult<SomewhereDbAggregateRow<T, G>>>;
1331
1340
  }
1332
1341
  interface SomewhereCallerDb {
1333
1342
  /** @deprecated Replaced by sw.rooms.live(name, sw.db.from(...)); deploy refuses sw.db.live. */
1334
1343
  live(name: 'sw.db.live was replaced by sw.rooms.live(name, sw.db.from(...))', read: never): never;
1335
1344
  query(sql: string, params?: readonly unknown[] | null, options?: SomewhereDbRawCallerOptions | null): Promise<SomewhereDbResult>;
1336
1345
  batch(statements: readonly SomewhereRawDbStatement[], options?: SomewhereDbRawCallerOptions | null): Promise<SomewhereRawBatchResult[]>;
1337
- aggregate<T extends SomewhereDbTable>(table: T, options: SomewhereDbAggregateOptionsFor<T> & { asServer?: true }): Promise<SomewhereDbAggregateResult<SomewhereDbAggregateRow<T>>>;
1346
+ aggregate<T extends SomewhereDbTable, const G extends SomewhereDbGroupBy<T> = SomewhereDbGroupBy<T>>(table: T, options: SomewhereDbAggregateOptionsFor<T> & { asServer?: true } & { groupBy?: G }): Promise<SomewhereDbAggregateResult<SomewhereDbAggregateRow<T, G>>>;
1338
1347
  tables(): Promise<string[]>;
1339
1348
  readonly scope: SomewhereDbScopeApi;
1340
1349
  }
@@ -2031,7 +2040,36 @@ interface SomewhereRuntimeConnectStripe {
2031
2040
  subscribers(opts?: { status?: string; limit?: number; cursor?: string | null } | null): Promise<SomewhereConnectStripeSubscribersResult>;
2032
2041
  disconnect(): Promise<{ ok: true }>;
2033
2042
  }
2034
- interface SomewhereRuntimeConnect { readonly stripe: SomewhereRuntimeConnectStripe }
2043
+ // Google Calendar (a person's own calendar, events only; docs topic google-calendar)
2044
+ interface SomewhereGoogleCalendarEventInput {
2045
+ id?: string;
2046
+ title: string;
2047
+ description?: string | null;
2048
+ location?: string | null;
2049
+ start: string;
2050
+ end: string;
2051
+ all_day?: boolean;
2052
+ time_zone?: string | null;
2053
+ }
2054
+ interface SomewhereGoogleCalendarEvent {
2055
+ id: string;
2056
+ updated: string | null;
2057
+ }
2058
+ type SomewhereGoogleCalendarStatus =
2059
+ | { connected: false }
2060
+ | { connected: true; reconnect_needed: boolean; calendar: { name: string | null; time_zone: string | null }; connected_at: number | null };
2061
+ interface SomewhereGoogleCalendarWho { user_id?: string; userId?: string }
2062
+ interface SomewhereRuntimeConnectGoogleCalendar {
2063
+ /** The app's own connect endpoint returns this: it starts and finishes the connection in the signed-in person's browser. */
2064
+ connect(request: Request, opts?: { return_to?: string; returnTo?: string } | null): Promise<Response>;
2065
+ /** user_id only inside a scheduled or background job; in a request, calls act for the signed-in caller. */
2066
+ status(opts?: SomewhereGoogleCalendarWho | null): Promise<SomewhereGoogleCalendarStatus>;
2067
+ createEvent(opts: SomewhereGoogleCalendarWho & { event: SomewhereGoogleCalendarEventInput }): Promise<SomewhereGoogleCalendarEvent>;
2068
+ updateEvent(opts: SomewhereGoogleCalendarWho & { event_id: string; event: Partial<Omit<SomewhereGoogleCalendarEventInput, 'id'>> }): Promise<SomewhereGoogleCalendarEvent>;
2069
+ deleteEvent(opts: SomewhereGoogleCalendarWho & { event_id: string }): Promise<{ deleted: boolean }>;
2070
+ disconnect(opts?: SomewhereGoogleCalendarWho | null): Promise<{ disconnected: boolean; google_permissions_url: string }>;
2071
+ }
2072
+ interface SomewhereRuntimeConnect { readonly stripe: SomewhereRuntimeConnectStripe; readonly googleCalendar: SomewhereRuntimeConnectGoogleCalendar }
2035
2073
 
2036
2074
  // Billing (plan catalog + entitlements for the app's own users)
2037
2075
  interface SomewhereBillingPlanFeatureInput { feature: string; limit?: number | null }
@@ -3251,6 +3289,7 @@ interface SomewhereEmailBounce {
3251
3289
  }
3252
3290
  interface SomewhereEmailTestInboxMessage {
3253
3291
  id: string;
3292
+ headers?: { 'Message-ID': string; 'In-Reply-To'?: string; References?: string };
3254
3293
  to: string;
3255
3294
  subject: string;
3256
3295
  html: string | null;
@@ -3708,6 +3747,7 @@ interface SomewhereTaskSettings {
3708
3747
  interface SomewhereTaskListOptions {
3709
3748
  status?: SomewhereTaskStatus;
3710
3749
  assignee?: string;
3750
+ label?: string;
3711
3751
  area?: string;
3712
3752
  parent_id?: string | null;
3713
3753
  q?: string;
@@ -4471,8 +4511,8 @@ var require_consumer_contract = __commonJS({
4471
4511
  "worker/containers/compile/consumer-contract.cjs"(exports2, module2) {
4472
4512
  "use strict";
4473
4513
  var CONSUMER_CONTRACT2 = Object.freeze({
4474
- version: 30,
4475
- digest: "6b27b36b315bece1e2cd83950720930286ed19b8858b7e8cd8f5f5bf7566797b"
4514
+ version: 39,
4515
+ digest: "735f80e8c71b5c115e57aa84506faadeba2ca50196908ea26766c17c79cf0262"
4476
4516
  });
4477
4517
  var MEMBERSHIPS = "memberships: table({ id: id(), team_id: text(), member_id: text() }, { scope: owner(), client: { read: true } }),";
4478
4518
  var SHARES = "shares: table({ id: id(), grantee_id: text() }, { scope: owner(), client: { read: true, create: ['grantee_id'], delete: true }, unique: [['user_id', 'grantee_id']] }),";