Skip to content

Commit 5e3259d

Browse files
chore(gateway): remove legacy userEmail/INBOX_ZERO fields (#76)
Remove unused `userEmail` field from all API request schemas and `INBOX_ZERO_*` environment variable handling. This was leftover from a prototype email inbox assistant that is no longer active. Neither the TypeScript nor Python SDK exposed `userEmail` in their public API, so this is a non-breaking change. Closes #71
1 parent a34fa7d commit 5e3259d

File tree

6 files changed

+8
-57
lines changed

6 files changed

+8
-57
lines changed

docs/openapi.yaml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ components:
3939
type: string
4040
model:
4141
type: string
42-
userEmail:
43-
type: string
44-
format: email
4542
maxTokens:
4643
type: integer
4744
exclusiveMinimum: 0
@@ -58,9 +55,6 @@ components:
5855
type: string
5956
model:
6057
type: string
61-
userEmail:
62-
type: string
63-
format: email
6458
schema:
6559
type: object
6660
properties:
@@ -110,9 +104,6 @@ components:
110104
type: string
111105
model:
112106
type: string
113-
userEmail:
114-
type: string
115-
format: email
116107
required:
117108
- prompt
118109
StreamObjectRequest:
@@ -126,9 +117,6 @@ components:
126117
type: string
127118
model:
128119
type: string
129-
userEmail:
130-
type: string
131-
format: email
132120
schema:
133121
type: object
134122
properties:
@@ -459,9 +447,6 @@ paths:
459447
type: string
460448
model:
461449
type: string
462-
userEmail:
463-
type: string
464-
format: email
465450
maxTokens:
466451
type: integer
467452
exclusiveMinimum: 0
@@ -577,9 +562,6 @@ paths:
577562
type: string
578563
model:
579564
type: string
580-
userEmail:
581-
type: string
582-
format: email
583565
schema:
584566
type: object
585567
properties:
@@ -722,9 +704,6 @@ paths:
722704
type: string
723705
model:
724706
type: string
725-
userEmail:
726-
type: string
727-
format: email
728707
required:
729708
- prompt
730709
responses:
@@ -795,9 +774,6 @@ paths:
795774
type: string
796775
model:
797776
type: string
798-
userEmail:
799-
type: string
800-
format: email
801777
schema:
802778
type: object
803779
properties:

packages/gateway/src/cli.ts

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,8 @@ import {
1616
* OAuth tokens (Claude Pro/Max) operate under Anthropic's Consumer Terms which
1717
* prohibit automated access. Use ANTHROPIC_API_KEY for all automation.
1818
* See: https://www.anthropic.com/legal/consumer-terms
19-
*
20-
* Also passes through tool proxy variables for Claude skills that need to
21-
* invoke Inbox Zero API tools.
2219
*/
23-
export function buildClaudeEnv(options?: {
24-
userEmail?: string;
25-
}): NodeJS.ProcessEnv {
20+
export function buildClaudeEnv(): NodeJS.ProcessEnv {
2621
const env = { ...process.env };
2722

2823
// API key takes precedence - OAuth is undocumented fallback for personal testing only.
@@ -31,18 +26,6 @@ export function buildClaudeEnv(options?: {
3126
env.CLAUDE_CODE_OAUTH_TOKEN = undefined;
3227
}
3328

34-
// Pass through tool proxy variables for Claude skills
35-
// These enable the inbox-zero-tools skill to invoke the LLM Tool Proxy API
36-
if (process.env.INBOX_ZERO_API_URL) {
37-
env.INBOX_ZERO_API_URL = process.env.INBOX_ZERO_API_URL;
38-
}
39-
if (process.env.LLM_TOOL_PROXY_TOKEN) {
40-
env.LLM_TOOL_PROXY_TOKEN = process.env.LLM_TOOL_PROXY_TOKEN;
41-
}
42-
if (options?.userEmail) {
43-
env.INBOX_ZERO_USER_EMAIL = options.userEmail;
44-
}
45-
4629
return env;
4730
}
4831

@@ -57,8 +40,6 @@ export interface ClaudeCliOptions {
5740
timeoutMs?: number;
5841
/** Model alias (e.g., 'sonnet', 'haiku') or full name */
5942
model?: string;
60-
/** User email for tool proxy access (enables Claude skills to call Inbox Zero tools) */
61-
userEmail?: string;
6243
/** JSON schema for constrained decoding (CLI enforces valid JSON output) */
6344
jsonSchema?: Record<string, unknown>;
6445
}
@@ -91,7 +72,7 @@ export async function executeClaudeCli(
9172

9273
const claude = spawn("claude", args, {
9374
stdio: ["pipe", "pipe", "pipe"],
94-
env: buildClaudeEnv({ userEmail: options.userEmail }),
75+
env: buildClaudeEnv(),
9576
});
9677

9778
// Set up execution timeout

packages/gateway/src/routes/generate.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ router.post(
3636
return;
3737
}
3838

39-
const { prompt, system, sessionId, model, userEmail } = parseResult.data;
39+
const { prompt, system, sessionId, model } = parseResult.data;
4040

4141
logger.info("generate-text", {
4242
model: model || "default",
@@ -50,7 +50,6 @@ router.post(
5050
system,
5151
sessionId,
5252
model,
53-
userEmail,
5453
});
5554

5655
res.json({
@@ -90,8 +89,7 @@ router.post(
9089
return;
9190
}
9291

93-
const { prompt, system, schema, sessionId, model, userEmail } =
94-
parseResult.data;
92+
const { prompt, system, schema, sessionId, model } = parseResult.data;
9593

9694
logger.info("generate-object", {
9795
model: model || "default",
@@ -105,7 +103,6 @@ router.post(
105103
system,
106104
sessionId,
107105
model,
108-
userEmail,
109106
jsonSchema: schema,
110107
});
111108

packages/gateway/src/routes/stream-object.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ router.post(
8080
return;
8181
}
8282

83-
const { prompt, system, sessionId, model, userEmail, schema } =
84-
parseResult.data;
83+
const { prompt, system, sessionId, model, schema } = parseResult.data;
8584

8685
// Set up SSE headers
8786
res.setHeader("Content-Type", "text/event-stream");
@@ -113,7 +112,7 @@ router.post(
113112

114113
const claude = spawn("claude", args, {
115114
stdio: ["pipe", "pipe", "pipe"],
116-
env: buildClaudeEnv({ userEmail }),
115+
env: buildClaudeEnv(),
117116
});
118117

119118
const currentSessionId = sessionId || uuidv4();

packages/gateway/src/routes/stream.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ router.post(
7777
return;
7878
}
7979

80-
const { prompt, system, sessionId, model, userEmail } = parseResult.data;
80+
const { prompt, system, sessionId, model } = parseResult.data;
8181

8282
// Set up SSE headers
8383
res.setHeader("Content-Type", "text/event-stream");
@@ -103,7 +103,7 @@ router.post(
103103

104104
const claude = spawn("claude", args, {
105105
stdio: ["pipe", "pipe", "pipe"],
106-
env: buildClaudeEnv({ userEmail }),
106+
env: buildClaudeEnv(),
107107
});
108108

109109
const currentSessionId = sessionId || uuidv4();

packages/gateway/src/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ const baseRequestSchema = z.object({
1212
prompt: z.string(),
1313
sessionId: z.string().optional(),
1414
model: z.string().optional(),
15-
/** User email for tool proxy access (enables Claude skills to call Inbox Zero tools) */
16-
userEmail: z.string().email().optional(),
1715
});
1816

1917
export const generateTextRequestSchema = baseRequestSchema.extend({

0 commit comments

Comments
 (0)