instar 0.7.26 → 0.7.28
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.
- package/dist/cli.js +0 -0
- package/dist/commands/server.js +1 -1
- package/dist/core/SessionManager.js +6 -11
- package/package.json +1 -1
- package/.vercel/README.txt +0 -11
- package/.vercel/project.json +0 -1
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/commands/server.js
CHANGED
|
@@ -81,7 +81,7 @@ async function respawnSessionForTopic(sessionManager, telegram, targetSession, t
|
|
|
81
81
|
// Use topic name, not tmux session name — tmux names include the project prefix
|
|
82
82
|
// which causes cascading names like ai-guy-ai-guy-ai-guy-topic-1 on each respawn.
|
|
83
83
|
const topicName = storedName || `topic-${topicId}`;
|
|
84
|
-
const newSessionName = await sessionManager.spawnInteractiveSession(bootstrapMessage, topicName);
|
|
84
|
+
const newSessionName = await sessionManager.spawnInteractiveSession(bootstrapMessage, topicName, { telegramTopicId: topicId });
|
|
85
85
|
telegram.registerTopicSession(topicId, newSessionName);
|
|
86
86
|
await telegram.sendToTopic(topicId, `Session respawned.`);
|
|
87
87
|
console.log(`[telegram→session] Respawned "${newSessionName}" for topic ${topicId}`);
|
|
@@ -365,26 +365,21 @@ export class SessionManager extends EventEmitter {
|
|
|
365
365
|
throw new Error(`Absolute session limit (${absoluteLimit}) reached. ` +
|
|
366
366
|
`Running: ${runningSessions.map(s => s.name).join(', ')}`);
|
|
367
367
|
}
|
|
368
|
-
// Spawn Claude in tmux
|
|
369
|
-
//
|
|
368
|
+
// Spawn Claude in tmux — no bash -c shell intermediary.
|
|
369
|
+
// Uses tmux -e flags to set/unset env vars directly, matching spawnSession pattern.
|
|
370
|
+
// This avoids shell injection risks and handles claudePath with spaces.
|
|
370
371
|
try {
|
|
371
372
|
const tmuxArgs = [
|
|
372
373
|
'new-session', '-d',
|
|
373
374
|
'-s', tmuxSession,
|
|
374
375
|
'-c', this.config.projectDir,
|
|
375
376
|
'-x', '200', '-y', '50',
|
|
377
|
+
'-e', 'CLAUDECODE=', // Prevent nested Claude Code detection
|
|
376
378
|
];
|
|
377
379
|
if (options?.telegramTopicId) {
|
|
378
|
-
|
|
379
|
-
// Also unset CLAUDECODE to prevent nested Claude Code errors
|
|
380
|
-
const claudeCmd = `${this.config.claudePath} --dangerously-skip-permissions`;
|
|
381
|
-
tmuxArgs.push('bash', '-c', `unset CLAUDECODE; export INSTAR_TELEGRAM_TOPIC=${options.telegramTopicId} && exec ${claudeCmd}`);
|
|
382
|
-
}
|
|
383
|
-
else {
|
|
384
|
-
// Unset CLAUDECODE to prevent nested Claude Code errors
|
|
385
|
-
const claudeCmd = `${this.config.claudePath} --dangerously-skip-permissions`;
|
|
386
|
-
tmuxArgs.push('bash', '-c', `unset CLAUDECODE; exec ${claudeCmd}`);
|
|
380
|
+
tmuxArgs.push('-e', `INSTAR_TELEGRAM_TOPIC=${options.telegramTopicId}`);
|
|
387
381
|
}
|
|
382
|
+
tmuxArgs.push(this.config.claudePath, '--dangerously-skip-permissions');
|
|
388
383
|
execFileSync(this.config.tmuxPath, tmuxArgs, { encoding: 'utf-8' });
|
|
389
384
|
}
|
|
390
385
|
catch (err) {
|
package/package.json
CHANGED
package/.vercel/README.txt
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
> Why do I have a folder named ".vercel" in my project?
|
|
2
|
-
The ".vercel" folder is created when you link a directory to a Vercel project.
|
|
3
|
-
|
|
4
|
-
> What does the "project.json" file contain?
|
|
5
|
-
The "project.json" file contains:
|
|
6
|
-
- The ID of the Vercel project that you linked ("projectId")
|
|
7
|
-
- The ID of the user or team your Vercel project is owned by ("orgId")
|
|
8
|
-
|
|
9
|
-
> Should I commit the ".vercel" folder?
|
|
10
|
-
No, you should not share the ".vercel" folder with anyone.
|
|
11
|
-
Upon creation, it will be automatically added to your ".gitignore" file.
|
package/.vercel/project.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"projectId":"prj_evM5LcItYL3IAmw8zNvEPGrHeaya","orgId":"team_dHctwIDcV3X9ydapQlCPHFGI","projectName":"claude-agent-kit"}
|