clementine-agent 1.13.3 → 1.13.4
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.
|
@@ -247,7 +247,9 @@ export declare class PersonalAssistant {
|
|
|
247
247
|
};
|
|
248
248
|
delegateProfile?: AgentProfile;
|
|
249
249
|
}): Promise<string>;
|
|
250
|
-
runCronJob(jobName: string, jobPrompt: string, tier?: number, maxTurns?: number, model?: string, workDir?: string, timeoutMs?: number, successCriteria?: string[], agentSlug?: string
|
|
250
|
+
runCronJob(jobName: string, jobPrompt: string, tier?: number, maxTurns?: number, model?: string, workDir?: string, timeoutMs?: number, successCriteria?: string[], agentSlug?: string, opts?: {
|
|
251
|
+
disableAllTools?: boolean;
|
|
252
|
+
}): Promise<string>;
|
|
251
253
|
/**
|
|
252
254
|
* Goal-backward verification pass using Haiku after cron job execution.
|
|
253
255
|
* Instead of vague quality ratings, verifies actual outcomes:
|
package/dist/agent/assistant.js
CHANGED
|
@@ -3897,9 +3897,14 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
|
|
|
3897
3897
|
// ── Heartbeat / Cron ──────────────────────────────────────────────
|
|
3898
3898
|
async heartbeat(standingInstructions, changesSummary = '', timeContext = '', dedupContext = '', profile) {
|
|
3899
3899
|
setInteractionSource('autonomous');
|
|
3900
|
+
// Heartbeat speaks text only — the prompt below explicitly forbids tool
|
|
3901
|
+
// calls. Skipping MCP server load + tool inventory cuts the prompt by
|
|
3902
|
+
// hundreds of thousands of tokens on installs with many integrations,
|
|
3903
|
+
// which is what kept Haiku exceeding its 200K context window.
|
|
3900
3904
|
const sdkOptions = await this.buildOptions({
|
|
3901
3905
|
isHeartbeat: true,
|
|
3902
3906
|
enableTeams: false,
|
|
3907
|
+
disableAllTools: true,
|
|
3903
3908
|
model: MODELS.haiku,
|
|
3904
3909
|
profile: profile ?? undefined,
|
|
3905
3910
|
});
|
|
@@ -4006,7 +4011,7 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
|
|
|
4006
4011
|
return extractDeliverable(trace) ||
|
|
4007
4012
|
trace.filter(t => t.type === 'text').map(t => t.content).join('').trim();
|
|
4008
4013
|
}
|
|
4009
|
-
async runCronJob(jobName, jobPrompt, tier = 1, maxTurns, model, workDir, timeoutMs, successCriteria, agentSlug) {
|
|
4014
|
+
async runCronJob(jobName, jobPrompt, tier = 1, maxTurns, model, workDir, timeoutMs, successCriteria, agentSlug, opts) {
|
|
4010
4015
|
setInteractionSource('autonomous');
|
|
4011
4016
|
// Tag every tool_use audit event with the cron job name + agent so
|
|
4012
4017
|
// analytics tool-usage can show "Bash×893 driven by market-leader-followup"
|
|
@@ -4040,6 +4045,7 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
|
|
|
4040
4045
|
enableTeams: true,
|
|
4041
4046
|
stallGuard: cronGuard,
|
|
4042
4047
|
profile: cronProfile,
|
|
4048
|
+
disableAllTools: opts?.disableAllTools ?? false,
|
|
4043
4049
|
});
|
|
4044
4050
|
// Override cwd if a project workDir is specified
|
|
4045
4051
|
if (workDir) {
|
|
@@ -318,7 +318,14 @@ export async function classifyRoute(userMessage, agents, gateway) {
|
|
|
318
318
|
try {
|
|
319
319
|
raw = await gateway.handleCronJob('route-classify', prompt, 1, // tier 1
|
|
320
320
|
3, // maxTurns — classifier doesn't need tools
|
|
321
|
-
'haiku'
|
|
321
|
+
'haiku', // cheap
|
|
322
|
+
undefined, // workDir
|
|
323
|
+
'standard', // mode
|
|
324
|
+
undefined, // maxHours
|
|
325
|
+
undefined, // timeoutMs
|
|
326
|
+
undefined, // successCriteria
|
|
327
|
+
undefined, // agentSlug
|
|
328
|
+
{ disableAllTools: true });
|
|
322
329
|
}
|
|
323
330
|
catch (err) {
|
|
324
331
|
logger.warn({ err }, 'Route classifier call failed');
|
|
@@ -135,7 +135,13 @@ export async function gradeRun(entry, gateway, jobPrompt) {
|
|
|
135
135
|
try {
|
|
136
136
|
raw = await gateway.handleCronJob(`grade:${entry.jobName}`, prompt, 1, // tier 1
|
|
137
137
|
3, // maxTurns — tight
|
|
138
|
-
'haiku'
|
|
138
|
+
'haiku', undefined, // workDir
|
|
139
|
+
'standard', // mode
|
|
140
|
+
undefined, // maxHours
|
|
141
|
+
undefined, // timeoutMs
|
|
142
|
+
undefined, // successCriteria
|
|
143
|
+
undefined, // agentSlug
|
|
144
|
+
{ disableAllTools: true });
|
|
139
145
|
}
|
|
140
146
|
catch (err) {
|
|
141
147
|
logger.warn({ err, jobName: entry.jobName }, 'Outcome grader LLM call failed');
|
package/dist/gateway/router.d.ts
CHANGED
|
@@ -152,7 +152,9 @@ export declare class Gateway {
|
|
|
152
152
|
handleMessage(sessionKey: string, text: string, onText?: OnTextCallback, model?: string, maxTurns?: number, onToolActivity?: OnToolActivityCallback, onProgress?: OnProgressCallback): Promise<string>;
|
|
153
153
|
private _handleMessageInner;
|
|
154
154
|
handleHeartbeat(standingInstructions: string, changesSummary?: string, timeContext?: string, dedupContext?: string, profile?: import('../types.js').AgentProfile | null): Promise<string>;
|
|
155
|
-
handleCronJob(jobName: string, jobPrompt: string, tier?: number, maxTurns?: number, model?: string, workDir?: string, mode?: 'standard' | 'unleashed', maxHours?: number, timeoutMs?: number, successCriteria?: string[], agentSlug?: string
|
|
155
|
+
handleCronJob(jobName: string, jobPrompt: string, tier?: number, maxTurns?: number, model?: string, workDir?: string, mode?: 'standard' | 'unleashed', maxHours?: number, timeoutMs?: number, successCriteria?: string[], agentSlug?: string, opts?: {
|
|
156
|
+
disableAllTools?: boolean;
|
|
157
|
+
}): Promise<string>;
|
|
156
158
|
/**
|
|
157
159
|
* Process a team message as an autonomous task — same multi-phase execution
|
|
158
160
|
* as cron unleashed jobs, so agents can work until done instead of being
|
package/dist/gateway/router.js
CHANGED
|
@@ -1345,7 +1345,7 @@ export class Gateway {
|
|
|
1345
1345
|
releaseLane();
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
-
async handleCronJob(jobName, jobPrompt, tier = 1, maxTurns, model, workDir, mode = 'standard', maxHours, timeoutMs, successCriteria, agentSlug) {
|
|
1348
|
+
async handleCronJob(jobName, jobPrompt, tier = 1, maxTurns, model, workDir, mode = 'standard', maxHours, timeoutMs, successCriteria, agentSlug, opts) {
|
|
1349
1349
|
const releaseLane = await lanes.acquire('cron');
|
|
1350
1350
|
try {
|
|
1351
1351
|
logger.info(`Running cron job: ${jobName}${workDir ? ` in ${workDir}` : ''}${mode === 'unleashed' ? ' (unleashed)' : ''}${agentSlug && agentSlug !== 'clementine' ? ` as ${agentSlug}` : ''}`);
|
|
@@ -1357,7 +1357,7 @@ export class Gateway {
|
|
|
1357
1357
|
response = await this.assistant.runUnleashedTask(jobName, jobPrompt, tier, maxTurns, model, workDir, maxHours, agentSlug);
|
|
1358
1358
|
}
|
|
1359
1359
|
else {
|
|
1360
|
-
response = await this.assistant.runCronJob(jobName, jobPrompt, tier, maxTurns, model, workDir, timeoutMs, successCriteria, agentSlug);
|
|
1360
|
+
response = await this.assistant.runCronJob(jobName, jobPrompt, tier, maxTurns, model, workDir, timeoutMs, successCriteria, agentSlug, opts);
|
|
1361
1361
|
}
|
|
1362
1362
|
// Re-baseline integrity checksums after cron job (may write to vault)
|
|
1363
1363
|
scanner.refreshIntegrity();
|