instar 0.7.19 → 0.7.20
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.
|
@@ -557,7 +557,7 @@ Create the directory structure and write config files:
|
|
|
557
557
|
mkdir -p .instar/state/sessions .instar/state/jobs .instar/logs
|
|
558
558
|
```
|
|
559
559
|
|
|
560
|
-
**`.instar/config.json
|
|
560
|
+
**`.instar/config.json`** (messaging section shown with Telegram — use `"messaging": []` if Telegram was not configured):
|
|
561
561
|
```json
|
|
562
562
|
{
|
|
563
563
|
"projectName": "my-project",
|
|
@@ -581,7 +581,19 @@ mkdir -p .instar/state/sessions .instar/state/jobs .instar/logs
|
|
|
581
581
|
"quotaThresholds": { "normal": 50, "elevated": 70, "critical": 85, "shutdown": 95 }
|
|
582
582
|
},
|
|
583
583
|
"users": [],
|
|
584
|
-
"messaging": [
|
|
584
|
+
"messaging": [
|
|
585
|
+
{
|
|
586
|
+
"type": "telegram",
|
|
587
|
+
"enabled": true,
|
|
588
|
+
"config": {
|
|
589
|
+
"token": "<BOT_TOKEN from BotFather>",
|
|
590
|
+
"chatId": "<CHAT_ID from Step 3e>",
|
|
591
|
+
"lifelineTopicId": "<LIFELINE_THREAD_ID from Step 3e>",
|
|
592
|
+
"pollIntervalMs": 2000,
|
|
593
|
+
"stallTimeoutMinutes": 5
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
],
|
|
585
597
|
"monitoring": {
|
|
586
598
|
"quotaTracking": false,
|
|
587
599
|
"memoryMonitoring": true,
|
|
@@ -0,0 +1,11 @@
|
|
|
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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"projectId":"prj_evM5LcItYL3IAmw8zNvEPGrHeaya","orgId":"team_dHctwIDcV3X9ydapQlCPHFGI","projectName":"claude-agent-kit"}
|
package/dist/cli.js
CHANGED
|
File without changes
|
package/dist/commands/init.js
CHANGED
|
@@ -160,7 +160,7 @@ async function initFreshProject(projectName, options) {
|
|
|
160
160
|
enabled: true,
|
|
161
161
|
webhookUrl: 'https://dawn.bot-me.ai/api/instar/feedback',
|
|
162
162
|
feedbackFile: path.join(stateDir, 'feedback.json'),
|
|
163
|
-
sharedSecret:
|
|
163
|
+
sharedSecret: 'instar-rising-tide-v1',
|
|
164
164
|
},
|
|
165
165
|
dispatches: {
|
|
166
166
|
enabled: true,
|
|
@@ -338,7 +338,7 @@ async function initExistingProject(options) {
|
|
|
338
338
|
enabled: true,
|
|
339
339
|
webhookUrl: 'https://dawn.bot-me.ai/api/instar/feedback',
|
|
340
340
|
feedbackFile: path.join(stateDir, 'feedback.json'),
|
|
341
|
-
sharedSecret:
|
|
341
|
+
sharedSecret: 'instar-rising-tide-v1',
|
|
342
342
|
},
|
|
343
343
|
dispatches: {
|
|
344
344
|
enabled: true,
|
|
@@ -127,20 +127,24 @@ export class SessionManager extends EventEmitter {
|
|
|
127
127
|
if (this.tmuxSessionExists(tmuxSession)) {
|
|
128
128
|
throw new Error(`tmux session "${tmuxSession}" already exists`);
|
|
129
129
|
}
|
|
130
|
-
// Build Claude CLI arguments
|
|
131
|
-
//
|
|
132
|
-
// when
|
|
130
|
+
// Build Claude CLI arguments via bash wrapper.
|
|
131
|
+
// Must unset CLAUDECODE to prevent "cannot be launched inside another Claude Code session"
|
|
132
|
+
// error when instar itself runs inside Claude Code.
|
|
133
133
|
const claudeArgs = ['--dangerously-skip-permissions'];
|
|
134
134
|
if (options.model) {
|
|
135
135
|
claudeArgs.push('--model', options.model);
|
|
136
136
|
}
|
|
137
137
|
claudeArgs.push('-p', options.prompt);
|
|
138
|
+
const claudeCmd = [this.config.claudePath, ...claudeArgs]
|
|
139
|
+
.map(a => a.replace(/'/g, "'\\''"))
|
|
140
|
+
.map(a => `'${a}'`)
|
|
141
|
+
.join(' ');
|
|
138
142
|
try {
|
|
139
143
|
execFileSync(this.config.tmuxPath, [
|
|
140
144
|
'new-session', '-d',
|
|
141
145
|
'-s', tmuxSession,
|
|
142
146
|
'-c', this.config.projectDir,
|
|
143
|
-
|
|
147
|
+
'bash', '-c', `unset CLAUDECODE; exec ${claudeCmd}`,
|
|
144
148
|
], { encoding: 'utf-8' });
|
|
145
149
|
}
|
|
146
150
|
catch (err) {
|
|
@@ -371,11 +375,14 @@ export class SessionManager extends EventEmitter {
|
|
|
371
375
|
];
|
|
372
376
|
if (options?.telegramTopicId) {
|
|
373
377
|
// Wrap in bash shell to export env var before Claude starts
|
|
378
|
+
// Also unset CLAUDECODE to prevent nested Claude Code errors
|
|
374
379
|
const claudeCmd = `${this.config.claudePath} --dangerously-skip-permissions`;
|
|
375
|
-
tmuxArgs.push('bash', '-c', `export INSTAR_TELEGRAM_TOPIC=${options.telegramTopicId} && exec ${claudeCmd}`);
|
|
380
|
+
tmuxArgs.push('bash', '-c', `unset CLAUDECODE; export INSTAR_TELEGRAM_TOPIC=${options.telegramTopicId} && exec ${claudeCmd}`);
|
|
376
381
|
}
|
|
377
382
|
else {
|
|
378
|
-
|
|
383
|
+
// Unset CLAUDECODE to prevent nested Claude Code errors
|
|
384
|
+
const claudeCmd = `${this.config.claudePath} --dangerously-skip-permissions`;
|
|
385
|
+
tmuxArgs.push('bash', '-c', `unset CLAUDECODE; exec ${claudeCmd}`);
|
|
379
386
|
}
|
|
380
387
|
execFileSync(this.config.tmuxPath, tmuxArgs, { encoding: 'utf-8' });
|
|
381
388
|
}
|
|
@@ -406,6 +406,12 @@ export class JobScheduler {
|
|
|
406
406
|
else {
|
|
407
407
|
summary += '\n_No output captured (session already closed)_';
|
|
408
408
|
}
|
|
409
|
+
// Skip Telegram notification for successful jobs with no meaningful output
|
|
410
|
+
// Prevents empty notification spam (e.g., dispatch-check when dispatch is unconfigured)
|
|
411
|
+
if (!failed && (!output || !output.trim())) {
|
|
412
|
+
console.log(`[scheduler] Skipping notification for ${job.slug} — no meaningful output`);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
409
415
|
// Send to the job's dedicated topic if available, otherwise fall back to generic messenger
|
|
410
416
|
if (this.telegram && job.topicId) {
|
|
411
417
|
try {
|