@somewhere-cloud/cli 0.38.134 → 0.38.137

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.134",
3
+ "version": "0.38.137",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@somewhere-cloud/cli",
9
- "version": "0.38.134",
9
+ "version": "0.38.137",
10
10
  "license": "MIT",
11
11
  "bin": {
12
12
  "cli": "bin/somewhere.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@somewhere-cloud/cli",
3
- "version": "0.38.134",
3
+ "version": "0.38.137",
4
4
  "description": "CLI for somewhere.cloud — auth, projects, deploy, pull, promote, db, logs, env, MCP bridge.",
5
5
  "keywords": [
6
6
  "somewhere",
@@ -67,5 +67,5 @@
67
67
  },
68
68
  "bundleDependencies": [],
69
69
  "bundledDependencies": [],
70
- "gitHead": "22311ce30475062979fd409d7ab2f248bc718a02"
70
+ "gitHead": "b2275a6b1f015916b109866b11d381fd9bc41c52"
71
71
  }
@@ -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": "e4f14acd6166f6577495fdea6092cbe82acc065a57b9adcb535dc7f776b27473",
11
+ "worker/containers/compile/consumer-contract.cjs": "5cbf5ee0c4a936b9bce6b62d0f27bf7729126d47d02a3cd3a0ff28db86dfd987",
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": "b5d1fec7c57d24c44fde1c995c51b04ccb0095512626350c319a19a6f4f3b030",
16
+ "worker/containers/compile/runtime-types.cjs": "9f2633dcca852c35bc20147bbb260d2c79969da33668f2bd9b1f5bbfcf21bc7f",
17
17
  "worker/containers/compile/schema-types.cjs": "4cd8d79a9401271bcb948865069b90d3d5f13a10c96c51cb084e22e63cbb57d8",
18
18
  "worker/containers/compile/typed-data.cjs": "1c8bec853fbee4ffd34c651076a4e1f4d8b18c0c2be5e99e31df7c9283207627",
19
19
  "worker/containers/compile/typed-files.cjs": "f2568567a53994575ede91f9a0839965e64f94eb92ae11315650189b6de0f79c",
@@ -73,5 +73,5 @@
73
73
  "worker/src/utils/telegram.ts": "dfbc9e756b44b445b3c3504c90a1094a94e6f9853ff9c0e0a84fba0e8c4518da",
74
74
  "worker/src/utils/workers-ai-comparison.ts": "18b5d5ea96f817387a5ef49733ba611c99cbb14987143c28118b1c90f3b637d4"
75
75
  },
76
- "sha256": "96fe68de3f6dd3c26f7e495a386524b7e2857c487e7380291b3f81b6cbe79316"
76
+ "sha256": "5752380cef1c84e07eda378872a79119e01f051c8a331ce1d384d3e1818c18c7"
77
77
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "sha256": "c726568702ad5b4fc6affb61a43ade93d3b84d080bba730271ef681dac6a07b7"
2
+ "sha256": "bc86fb6c013c3f890053c6f9a1eb9bac31fac41e5381a43422d7e85127b8436c"
3
3
  }
@@ -3832,8 +3832,73 @@ interface SomewhereRuntimeRooms extends SomewhereRoomOps {
3832
3832
  live<Row>(name: string, read: SomewhereDbResult<Row> | PromiseLike<SomewhereDbResult<Row>>): Promise<SomewhereDbLiveResult<Row>>;
3833
3833
  }
3834
3834
 
3835
+ // sw.mail: the signed-in app user's own mailbox (the server picks it from the session; no method takes a
3836
+ // user). sw.mail.project: the project's mailbox. Failures throw; an id from another mailbox reads as not found.
3837
+ type SomewhereMailStatus = 'draft' | 'awaiting_approval' | 'requested' | 'accepted' | 'delivered' | 'bounced'
3838
+ | 'complained' | 'failed' | 'outcome_unknown' | 'received' | 'refused';
3839
+ interface SomewhereMailSummary {
3840
+ id: string; direction: 'in' | 'out'; from: string; to: string[]; subject: string; status: SomewhereMailStatus;
3841
+ conversation: string; created_at: number; template_version: string | null; author: string;
3842
+ // The number of attachments; read one with attachment(id, n).
3843
+ attachments: number;
3844
+ }
3845
+ interface SomewhereMailEmail {
3846
+ id: string; direction: 'in' | 'out'; from_addr: string; to_addrs: string[]; cc_addrs: string[]; bcc_addrs: string[];
3847
+ reply_to: string | null; subject: string; text: string | null; html: string | null;
3848
+ message_id: string | null; in_reply_to: string | null; conversation: string;
3849
+ person: string | null; person_user_id: string | null; status: SomewhereMailStatus; status_at: number;
3850
+ author: string; template_version: string | null; approved_by: string | null; approved_at: number | null;
3851
+ kind: string; test: boolean; spam: string | null; provider_id: string | null; idempotency_key: string | null;
3852
+ note: string | null; created_at: number;
3853
+ attachments: Array<{ n: number; name: string; type: string; size: number }>;
3854
+ // Raw header lines, kept for mail received or written from 2026-11-20 on; null for older mail.
3855
+ headers: Array<{ name: string; value: string }> | null;
3856
+ checks: { spf: string | null; dkim: string | null; dmarc: string | null } | null;
3857
+ }
3858
+ interface SomewhereMailSearchResult {
3859
+ id: string; subject: string; from_addr: string; to_addrs: string[]; created_at: number; conversation: string;
3860
+ has_attachments: boolean; direction: 'in' | 'out'; status: SomewhereMailStatus;
3861
+ }
3862
+ interface SomewhereMailSendOptions {
3863
+ // An address registered in this mailbox (sw.mail.project may also send a template from a person address).
3864
+ from: string;
3865
+ // One to ten addresses.
3866
+ to: string | readonly string[];
3867
+ subject?: string; text?: string; html?: string;
3868
+ // Required with subject and html or text when from is a person address; vars fill its {{slots}}.
3869
+ template_key?: string; vars?: Record<string, string>;
3870
+ idempotency_key?: string;
3871
+ // An email in this mailbox to reply to; the reply joins its conversation.
3872
+ reply_to_email_id?: string;
3873
+ // A step name: this step goes to this one recipient at most once.
3874
+ once?: string;
3875
+ // true: send nothing to a recipient this mailbox has received mail from.
3876
+ unless_replied?: boolean;
3877
+ }
3878
+ interface SomewhereMailSendResult {
3879
+ email_id: string | null; status: SomewhereMailStatus | 'skipped'; duplicate: boolean;
3880
+ skipped?: 'replied'; sent_version?: string; waiting_version?: string | null;
3881
+ }
3882
+ interface SomewhereMailOps {
3883
+ list(options?: { limit?: number; before?: number; conversation?: string } | null): Promise<{ emails: SomewhereMailSummary[]; mailbox: 'app_user' | 'project' | null }>;
3884
+ get(id: string): Promise<{ email: SomewhereMailEmail }>;
3885
+ // The attachment's bytes as a Response (404 when there is no such attachment).
3886
+ attachment(id: string, n: number): Promise<Response>;
3887
+ search(text: string, options?: { limit?: number } | null): Promise<{ results: SomewhereMailSearchResult[]; searched: Array<{ mailbox: 'app_user' | 'project'; answered: boolean }> }>;
3888
+ send(message: SomewhereMailSendOptions): Promise<SomewhereMailSendResult>;
3889
+ readonly addresses: {
3890
+ list(): Promise<{ addresses: Array<{ address: string; signs_as_user_id: string | null }> }>;
3891
+ create(address: string): Promise<{ address: string; mailbox: 'app_user' | 'project'; sends_as: string }>;
3892
+ remove(address: string): Promise<{ removed: string }>;
3893
+ };
3894
+ }
3895
+ interface SomewhereRuntimeMail extends SomewhereMailOps {
3896
+ readonly project: SomewhereMailOps;
3897
+ }
3898
+
3835
3899
  interface SomewhereRuntimeContext {
3836
3900
  readonly email: SomewhereRuntimeEmail;
3901
+ readonly mail: SomewhereRuntimeMail;
3837
3902
  readonly rooms: SomewhereRuntimeRooms;
3838
3903
  readonly contacts: SomewhereRuntimeContacts;
3839
3904
  readonly notifications: SomewhereRuntimeNotifications;
@@ -4400,8 +4465,8 @@ var require_consumer_contract = __commonJS({
4400
4465
  "worker/containers/compile/consumer-contract.cjs"(exports2, module2) {
4401
4466
  "use strict";
4402
4467
  var CONSUMER_CONTRACT2 = Object.freeze({
4403
- version: 27,
4404
- digest: "f4ec703b576673b8586f4a0bbeab5c7a3204bc5edceef4751c9d4ccef1ec0022"
4468
+ version: 28,
4469
+ digest: "e4a7b324f259d0bc92b20434ff153cdfadebf865dd96dfa3e19e8b9811d43692"
4405
4470
  });
4406
4471
  var MEMBERSHIPS = "memberships: table({ id: id(), team_id: text(), member_id: text() }, { scope: owner(), client: { read: true } }),";
4407
4472
  var SHARES = "shares: table({ id: id(), grantee_id: text() }, { scope: owner(), client: { read: true, create: ['grantee_id'], delete: true }, unique: [['user_id', 'grantee_id']] }),";