mobileclaude-agent 0.1.1 → 0.1.3

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/config.js +9 -0
  2. package/package.json +1 -1
package/dist/config.js CHANGED
@@ -21,6 +21,15 @@ export const AGENT_VERSION = '0.1.0';
21
21
  const configDir = join(homedir(), '.mobileclaude');
22
22
  const tokenPath = join(configDir, 'token');
23
23
  export function getRelayToken() {
24
+ // Env var override — set via: MOBILECLAUDE_TOKEN=<ios-token> npx mobileclaude-agent
25
+ const envToken = process.env.MOBILECLAUDE_TOKEN?.trim();
26
+ if (envToken && envToken.length > 0) {
27
+ // Persist it so future runs without env var keep using it
28
+ if (!existsSync(configDir))
29
+ mkdirSync(configDir, { recursive: true });
30
+ writeFileSync(tokenPath, envToken, 'utf-8');
31
+ return envToken;
32
+ }
24
33
  if (!existsSync(configDir)) {
25
34
  mkdirSync(configDir, { recursive: true });
26
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobileclaude-agent",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Desktop agent for MobileIDE — controls Claude Code from your iPhone via Supabase",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",