imtoagent 0.3.9 → 0.3.11

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.
@@ -291,6 +291,17 @@ const IM_FIELDS: Record<string, { key: string; label: string; required: boolean
291
291
  // ================================================================
292
292
 
293
293
  export async function runSetupWizard(): Promise<void> {
294
+ // Guard: refuse to run in non-TTY environment
295
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
296
+ console.error('');
297
+ console.error('❌ Setup wizard requires an interactive terminal (TTY).');
298
+ console.error(' If you installed via "curl | bash", run these commands manually:');
299
+ console.error('');
300
+ console.error(' imtoagent setup');
301
+ console.error('');
302
+ process.exit(1);
303
+ }
304
+
294
305
  const dataDir = getDataDir();
295
306
  const configPath = path.join(dataDir, 'config.json');
296
307
 
@@ -17,7 +17,7 @@ export interface BackendInfo {
17
17
  const BACKEND_DEFS: Omit<BackendInfo, 'installed' | 'version'>[] = [
18
18
  { type: 'claude', label: 'Claude Code', installHint: 'npm install -g @anthropic-ai/claude-agent-sdk' },
19
19
  { type: 'codex', label: 'Codex', installHint: 'npm install -g @openai/codex' },
20
- { type: 'opencode', label: 'OpenCode', installHint: 'npm install -g opencode' },
20
+ { type: 'opencode', label: 'OpenCode', installHint: 'curl -fsSL https://opencode.ai/install | bash' },
21
21
  ];
22
22
 
23
23
  // ================================================================
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imtoagent",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "description": "IM ↔ Agent 统一网关 — 飞书/Telegram/微信/企业微信对接 Claude Code/Codex/OpenCode",
5
5
  "type": "module",
6
6
  "bin": {