@sendmux/cli 1.5.0 → 1.7.0

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 (39) hide show
  1. package/README.md +26 -3
  2. package/dist/agent-auth.d.ts.map +1 -1
  3. package/dist/agent-auth.js +51 -7
  4. package/dist/base-command.d.ts +11 -4
  5. package/dist/base-command.d.ts.map +1 -1
  6. package/dist/base-command.js +24 -1
  7. package/dist/commands/auth/login.d.ts +14 -0
  8. package/dist/commands/auth/login.d.ts.map +1 -0
  9. package/dist/commands/auth/login.js +36 -0
  10. package/dist/commands/auth/logout.d.ts +9 -0
  11. package/dist/commands/auth/logout.d.ts.map +1 -0
  12. package/dist/commands/auth/logout.js +22 -0
  13. package/dist/commands/mailbox/stream-events.d.ts +6 -6
  14. package/dist/commands/profiles/list.d.ts.map +1 -1
  15. package/dist/commands/profiles/list.js +3 -1
  16. package/dist/commands/profiles/set.d.ts.map +1 -1
  17. package/dist/commands/profiles/set.js +4 -1
  18. package/dist/commands/profiles/show.d.ts.map +1 -1
  19. package/dist/commands/profiles/show.js +25 -23
  20. package/dist/generated/operations.d.ts +6 -6
  21. package/dist/generated/operations.js +7 -7
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/oauth-http.d.ts +18 -0
  25. package/dist/oauth-http.d.ts.map +1 -0
  26. package/dist/oauth-http.js +113 -0
  27. package/dist/oauth-login.d.ts +13 -0
  28. package/dist/oauth-login.d.ts.map +1 -0
  29. package/dist/oauth-login.js +236 -0
  30. package/dist/oauth-profile.d.ts +6 -0
  31. package/dist/oauth-profile.d.ts.map +1 -0
  32. package/dist/oauth-profile.js +123 -0
  33. package/dist/operation-runner.d.ts.map +1 -1
  34. package/dist/operation-runner.js +72 -8
  35. package/dist/profiles.d.ts +23 -1
  36. package/dist/profiles.d.ts.map +1 -1
  37. package/dist/profiles.js +53 -7
  38. package/oclif.manifest.json +159 -68
  39. package/package.json +2 -2
@@ -31,7 +31,28 @@ export interface ActiveAgentCliProfile extends AgentProfileBase {
31
31
  state: "active";
32
32
  }
33
33
  export type AgentCliProfile = ActiveAgentCliProfile | RegisteringAgentCliProfile;
34
- export type CliProfile = AgentCliProfile | ApiKeyCliProfile;
34
+ export interface AuthorizingOAuthCliProfile {
35
+ type: "oauth";
36
+ state: "authorizing";
37
+ sessionId: string;
38
+ issuer: string;
39
+ }
40
+ export interface ActiveOAuthCliProfile {
41
+ type: "oauth";
42
+ state: "active" | "refreshing" | "revoking" | "reauthorize";
43
+ sessionId: string;
44
+ issuer: string;
45
+ clientId: string;
46
+ tokenEndpoint: string;
47
+ revocationEndpoint: string;
48
+ accessToken: string;
49
+ refreshToken: string;
50
+ expiresAt: number;
51
+ scopes: string[];
52
+ refreshStartedAt?: number;
53
+ }
54
+ export type OAuthCliProfile = AuthorizingOAuthCliProfile | ActiveOAuthCliProfile;
55
+ export type CliProfile = AgentCliProfile | ApiKeyCliProfile | OAuthCliProfile;
35
56
  export interface CliConfig {
36
57
  defaultProfile?: string;
37
58
  profiles: Record<string, CliProfile>;
@@ -43,6 +64,7 @@ export declare function clearAgentRegistrationIntent(configDir: string, profileN
43
64
  export declare function configPath(configDir: string): string;
44
65
  export declare function isAgentProfile(profile: CliProfile): profile is AgentCliProfile;
45
66
  export declare function isApiKeyProfile(profile: CliProfile): profile is ApiKeyCliProfile;
67
+ export declare function isOAuthProfile(profile: CliProfile): profile is OAuthCliProfile;
46
68
  export declare function isActiveAgentProfile(profile: CliProfile): profile is ActiveAgentCliProfile;
47
69
  export {};
48
70
  //# sourceMappingURL=profiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../src/profiles.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,UAA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AC,EACrC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,CAAC,MAAM,EAAE,SAAS,KAAK,CAAC,GAC/B,OAAO,CAAC,CAAC,CAAC,CAYZ;AAED,wBAAsB,8BAA8B,CAClD,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,0BAA0B,GACpC,OAAO,CAAC,0BAA0B,CAAC,CAqCrC;AAED,wBAAsB,4BAA4B,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMxG;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEpD;AAsHD,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,IAAI,eAAe,CAE9E;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,IAAI,gBAAgB,CAEhF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,IAAI,eAAe,CAE9E;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,IAAI,qBAAqB,CAE1F"}
package/dist/profiles.js CHANGED
@@ -5,6 +5,8 @@ const CONFIG_FILE = "config.json";
5
5
  const CONFIG_LOCK_RETRY_MS = 25;
6
6
  const CONFIG_LOCK_STALE_MS = 5_000;
7
7
  const CONFIG_LOCK_TIMEOUT_MS = 10_000;
8
+ const CONFIG_REPLACE_TIMEOUT_MS = CONFIG_LOCK_STALE_MS / 2;
9
+ const CONFIG_REPLACE_MAX_WAITS = CONFIG_REPLACE_TIMEOUT_MS / CONFIG_LOCK_RETRY_MS;
8
10
  export async function readCliConfig(configDir) {
9
11
  const path = configPath(configDir);
10
12
  try {
@@ -25,10 +27,11 @@ export async function readCliConfig(configDir) {
25
27
  export async function updateCliConfig(configDir, update) {
26
28
  await mkdir(configDir, { mode: 0o700, recursive: true });
27
29
  const releaseLock = await acquireConfigWriteLock(configDir);
30
+ const replaceDeadline = Date.now() + CONFIG_REPLACE_TIMEOUT_MS;
28
31
  try {
29
32
  const config = await readCliConfig(configDir);
30
33
  const result = update(config);
31
- await writeCliConfigFile(configDir, config);
34
+ await writeCliConfigFile(configDir, config, replaceDeadline);
32
35
  return result;
33
36
  }
34
37
  finally {
@@ -86,12 +89,30 @@ export async function clearAgentRegistrationIntent(configDir, profileName) {
86
89
  export function configPath(configDir) {
87
90
  return join(configDir, CONFIG_FILE);
88
91
  }
89
- async function writeCliConfigFile(configDir, config) {
92
+ async function writeCliConfigFile(configDir, config, replaceDeadline) {
90
93
  const path = configPath(configDir);
91
94
  const tempPath = `${path}.${process.pid}.tmp`;
92
95
  await writeFile(tempPath, `${JSON.stringify(config, null, 2)}\n`, { mode: 0o600 });
93
96
  await chmod(tempPath, 0o600);
94
- await rename(tempPath, path);
97
+ let waits = 0;
98
+ while (true) {
99
+ try {
100
+ await rename(tempPath, path);
101
+ break;
102
+ }
103
+ catch (error) {
104
+ if (!isRetryableWindowsProfileFsError(error))
105
+ throw error;
106
+ if (waits >= CONFIG_REPLACE_MAX_WAITS ||
107
+ Date.now() + CONFIG_LOCK_RETRY_MS > replaceDeadline) {
108
+ throw error;
109
+ }
110
+ waits += 1;
111
+ await new Promise((resolve) => setTimeout(resolve, CONFIG_LOCK_RETRY_MS));
112
+ if (Date.now() >= replaceDeadline)
113
+ throw error;
114
+ }
115
+ }
95
116
  await chmod(path, 0o600);
96
117
  }
97
118
  async function acquireConfigWriteLock(configDir) {
@@ -99,7 +120,14 @@ async function acquireConfigWriteLock(configDir) {
99
120
  }
100
121
  async function acquireFileLock(lockPath, timeoutMessage) {
101
122
  const deadline = Date.now() + CONFIG_LOCK_TIMEOUT_MS;
123
+ let lastOpenError;
102
124
  while (true) {
125
+ if (Date.now() >= deadline) {
126
+ if (lastOpenError && isRetryableWindowsProfileFsError(lastOpenError)) {
127
+ throw lastOpenError;
128
+ }
129
+ throw new Error(timeoutMessage);
130
+ }
103
131
  try {
104
132
  const handle = await open(lockPath, "wx", 0o600);
105
133
  return async () => {
@@ -118,8 +146,19 @@ async function acquireFileLock(lockPath, timeoutMessage) {
118
146
  };
119
147
  }
120
148
  catch (error) {
121
- if (!isNodeError(error) || error.code !== "EEXIST")
149
+ if (isNodeError(error) && error.code === "EEXIST") {
150
+ lastOpenError = error;
151
+ }
152
+ else if (isRetryableWindowsProfileFsError(error)) {
153
+ lastOpenError = error;
154
+ if (Date.now() + CONFIG_LOCK_RETRY_MS > deadline)
155
+ throw error;
156
+ await new Promise((resolve) => setTimeout(resolve, CONFIG_LOCK_RETRY_MS));
157
+ continue;
158
+ }
159
+ else {
122
160
  throw error;
161
+ }
123
162
  }
124
163
  try {
125
164
  const lock = await stat(lockPath);
@@ -141,9 +180,8 @@ async function acquireFileLock(lockPath, timeoutMessage) {
141
180
  continue;
142
181
  throw error;
143
182
  }
144
- if (Date.now() >= deadline) {
183
+ if (Date.now() + CONFIG_LOCK_RETRY_MS > deadline)
145
184
  throw new Error(timeoutMessage);
146
- }
147
185
  await new Promise((resolve) => setTimeout(resolve, CONFIG_LOCK_RETRY_MS));
148
186
  }
149
187
  }
@@ -168,7 +206,10 @@ export function isAgentProfile(profile) {
168
206
  return profile.type === "agent";
169
207
  }
170
208
  export function isApiKeyProfile(profile) {
171
- return !isAgentProfile(profile);
209
+ return profile.type === undefined || profile.type === "api_key";
210
+ }
211
+ export function isOAuthProfile(profile) {
212
+ return profile.type === "oauth";
172
213
  }
173
214
  export function isActiveAgentProfile(profile) {
174
215
  return isAgentProfile(profile) && profile.state === "active";
@@ -176,3 +217,8 @@ export function isActiveAgentProfile(profile) {
176
217
  function isNodeError(error) {
177
218
  return Boolean(error && typeof error === "object" && "code" in error);
178
219
  }
220
+ function isRetryableWindowsProfileFsError(error) {
221
+ return (process.platform === "win32" &&
222
+ isNodeError(error) &&
223
+ (error.code === "EPERM" || error.code === "EACCES" || error.code === "EBUSY"));
224
+ }
@@ -113,51 +113,16 @@
113
113
  "register.js"
114
114
  ]
115
115
  },
116
- "profiles:list": {
117
- "aliases": [],
118
- "args": {},
119
- "description": "List local Sendmux CLI profiles.",
120
- "flags": {
121
- "json": {
122
- "description": "Format output as json.",
123
- "helpGroup": "GLOBAL",
124
- "name": "json",
125
- "allowNo": false,
126
- "type": "boolean"
127
- },
128
- "verbose": {
129
- "description": "Include masked API key prefixes.",
130
- "name": "verbose",
131
- "allowNo": false,
132
- "type": "boolean"
133
- }
134
- },
135
- "hasDynamicHelp": false,
136
- "hiddenAliases": [],
137
- "id": "profiles:list",
138
- "pluginAlias": "@sendmux/cli",
139
- "pluginName": "@sendmux/cli",
140
- "pluginType": "core",
141
- "strict": true,
142
- "enableJsonFlag": true,
143
- "isESM": true,
144
- "relativePath": [
145
- "dist",
146
- "commands",
147
- "profiles",
148
- "list.js"
149
- ]
150
- },
151
- "profiles:set": {
116
+ "auth:login": {
152
117
  "aliases": [],
153
118
  "args": {
154
119
  "name": {
155
- "description": "Profile name.",
120
+ "description": "New profile name.",
156
121
  "name": "name",
157
122
  "required": true
158
123
  }
159
124
  },
160
- "description": "Create or update a local Sendmux CLI profile.",
125
+ "description": "Sign in through the browser and save an OAuth profile.",
161
126
  "flags": {
162
127
  "json": {
163
128
  "description": "Format output as json.",
@@ -166,31 +131,32 @@
166
131
  "allowNo": false,
167
132
  "type": "boolean"
168
133
  },
169
- "api-key": {
170
- "description": "Sendmux API key. Defaults to SENDMUX_API_KEY.",
171
- "name": "api-key",
172
- "required": false,
134
+ "issuer": {
135
+ "description": "Sendmux authorization-server issuer.",
136
+ "name": "issuer",
137
+ "default": "https://app.sendmux.ai",
173
138
  "hasDynamicHelp": false,
174
139
  "multiple": false,
175
140
  "type": "option"
176
141
  },
177
- "base-url": {
178
- "description": "Optional API base URL override for this profile.",
179
- "name": "base-url",
142
+ "scope": {
143
+ "description": "Permission to request. Repeat for multiple scopes.",
144
+ "name": "scope",
145
+ "required": true,
180
146
  "hasDynamicHelp": false,
181
- "multiple": false,
147
+ "multiple": true,
182
148
  "type": "option"
183
149
  },
184
- "default": {
185
- "description": "Make this the default profile.",
186
- "name": "default",
150
+ "no-browser": {
151
+ "description": "Print the authorization URL without opening a browser.",
152
+ "name": "no-browser",
187
153
  "allowNo": false,
188
154
  "type": "boolean"
189
155
  }
190
156
  },
191
157
  "hasDynamicHelp": false,
192
158
  "hiddenAliases": [],
193
- "id": "profiles:set",
159
+ "id": "auth:login",
194
160
  "pluginAlias": "@sendmux/cli",
195
161
  "pluginName": "@sendmux/cli",
196
162
  "pluginType": "core",
@@ -200,20 +166,19 @@
200
166
  "relativePath": [
201
167
  "dist",
202
168
  "commands",
203
- "profiles",
204
- "set.js"
169
+ "auth",
170
+ "login.js"
205
171
  ]
206
172
  },
207
- "profiles:show": {
173
+ "auth:logout": {
208
174
  "aliases": [],
209
175
  "args": {
210
176
  "name": {
211
- "description": "Profile name. Defaults to the configured default profile.",
212
- "name": "name",
213
- "required": false
177
+ "description": "OAuth profile name. Defaults to the configured profile.",
178
+ "name": "name"
214
179
  }
215
180
  },
216
- "description": "Show a local Sendmux CLI profile without revealing its key.",
181
+ "description": "Revoke an OAuth connection and remove its local profile.",
217
182
  "flags": {
218
183
  "json": {
219
184
  "description": "Format output as json.",
@@ -225,7 +190,7 @@
225
190
  },
226
191
  "hasDynamicHelp": false,
227
192
  "hiddenAliases": [],
228
- "id": "profiles:show",
193
+ "id": "auth:logout",
229
194
  "pluginAlias": "@sendmux/cli",
230
195
  "pluginName": "@sendmux/cli",
231
196
  "pluginType": "core",
@@ -235,8 +200,8 @@
235
200
  "relativePath": [
236
201
  "dist",
237
202
  "commands",
238
- "profiles",
239
- "show.js"
203
+ "auth",
204
+ "logout.js"
240
205
  ]
241
206
  },
242
207
  "mailbox:batch-delete-messages": {
@@ -6950,6 +6915,13 @@
6950
6915
  "path": "/mailbox/events",
6951
6916
  "pathParams": [],
6952
6917
  "queryParams": [
6918
+ {
6919
+ "name": "mailbox_id",
6920
+ "required": false,
6921
+ "schema": {
6922
+ "type": "string"
6923
+ }
6924
+ },
6953
6925
  {
6954
6926
  "name": "event_types",
6955
6927
  "required": false,
@@ -6981,13 +6953,6 @@
6981
6953
  "minimum": 30,
6982
6954
  "maximum": 3600
6983
6955
  }
6984
- },
6985
- {
6986
- "name": "mailbox_id",
6987
- "required": false,
6988
- "schema": {
6989
- "type": "string"
6990
- }
6991
6956
  }
6992
6957
  ],
6993
6958
  "responseKind": "json",
@@ -7682,6 +7647,132 @@
7682
7647
  "upload-attachment.js"
7683
7648
  ]
7684
7649
  },
7650
+ "profiles:list": {
7651
+ "aliases": [],
7652
+ "args": {},
7653
+ "description": "List local Sendmux CLI profiles.",
7654
+ "flags": {
7655
+ "json": {
7656
+ "description": "Format output as json.",
7657
+ "helpGroup": "GLOBAL",
7658
+ "name": "json",
7659
+ "allowNo": false,
7660
+ "type": "boolean"
7661
+ },
7662
+ "verbose": {
7663
+ "description": "Include masked API key prefixes.",
7664
+ "name": "verbose",
7665
+ "allowNo": false,
7666
+ "type": "boolean"
7667
+ }
7668
+ },
7669
+ "hasDynamicHelp": false,
7670
+ "hiddenAliases": [],
7671
+ "id": "profiles:list",
7672
+ "pluginAlias": "@sendmux/cli",
7673
+ "pluginName": "@sendmux/cli",
7674
+ "pluginType": "core",
7675
+ "strict": true,
7676
+ "enableJsonFlag": true,
7677
+ "isESM": true,
7678
+ "relativePath": [
7679
+ "dist",
7680
+ "commands",
7681
+ "profiles",
7682
+ "list.js"
7683
+ ]
7684
+ },
7685
+ "profiles:set": {
7686
+ "aliases": [],
7687
+ "args": {
7688
+ "name": {
7689
+ "description": "Profile name.",
7690
+ "name": "name",
7691
+ "required": true
7692
+ }
7693
+ },
7694
+ "description": "Create or update a local Sendmux CLI profile.",
7695
+ "flags": {
7696
+ "json": {
7697
+ "description": "Format output as json.",
7698
+ "helpGroup": "GLOBAL",
7699
+ "name": "json",
7700
+ "allowNo": false,
7701
+ "type": "boolean"
7702
+ },
7703
+ "api-key": {
7704
+ "description": "Sendmux API key. Defaults to SENDMUX_API_KEY.",
7705
+ "name": "api-key",
7706
+ "required": false,
7707
+ "hasDynamicHelp": false,
7708
+ "multiple": false,
7709
+ "type": "option"
7710
+ },
7711
+ "base-url": {
7712
+ "description": "Optional API base URL override for this profile.",
7713
+ "name": "base-url",
7714
+ "hasDynamicHelp": false,
7715
+ "multiple": false,
7716
+ "type": "option"
7717
+ },
7718
+ "default": {
7719
+ "description": "Make this the default profile.",
7720
+ "name": "default",
7721
+ "allowNo": false,
7722
+ "type": "boolean"
7723
+ }
7724
+ },
7725
+ "hasDynamicHelp": false,
7726
+ "hiddenAliases": [],
7727
+ "id": "profiles:set",
7728
+ "pluginAlias": "@sendmux/cli",
7729
+ "pluginName": "@sendmux/cli",
7730
+ "pluginType": "core",
7731
+ "strict": true,
7732
+ "enableJsonFlag": true,
7733
+ "isESM": true,
7734
+ "relativePath": [
7735
+ "dist",
7736
+ "commands",
7737
+ "profiles",
7738
+ "set.js"
7739
+ ]
7740
+ },
7741
+ "profiles:show": {
7742
+ "aliases": [],
7743
+ "args": {
7744
+ "name": {
7745
+ "description": "Profile name. Defaults to the configured default profile.",
7746
+ "name": "name",
7747
+ "required": false
7748
+ }
7749
+ },
7750
+ "description": "Show a local Sendmux CLI profile without revealing its key.",
7751
+ "flags": {
7752
+ "json": {
7753
+ "description": "Format output as json.",
7754
+ "helpGroup": "GLOBAL",
7755
+ "name": "json",
7756
+ "allowNo": false,
7757
+ "type": "boolean"
7758
+ }
7759
+ },
7760
+ "hasDynamicHelp": false,
7761
+ "hiddenAliases": [],
7762
+ "id": "profiles:show",
7763
+ "pluginAlias": "@sendmux/cli",
7764
+ "pluginName": "@sendmux/cli",
7765
+ "pluginType": "core",
7766
+ "strict": true,
7767
+ "enableJsonFlag": true,
7768
+ "isESM": true,
7769
+ "relativePath": [
7770
+ "dist",
7771
+ "commands",
7772
+ "profiles",
7773
+ "show.js"
7774
+ ]
7775
+ },
7685
7776
  "sending:complete-attachment-upload": {
7686
7777
  "aliases": [],
7687
7778
  "args": {},
@@ -18955,5 +19046,5 @@
18955
19046
  ]
18956
19047
  }
18957
19048
  },
18958
- "version": "1.5.0"
19049
+ "version": "1.7.0"
18959
19050
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendmux/cli",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@oclif/core": "4.11.4",
22
- "@sendmux/sdk": "1.4.2"
22
+ "@sendmux/sdk": "2.0.0"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "22.19.19",