@pentoshi/clai 3.8.27 → 3.8.29

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.
@@ -410,8 +410,8 @@ export async function runAgentTurn(prompt, options = {}) {
410
410
  prompt,
411
411
  history: options.history,
412
412
  plan: activePlan,
413
- runningJobs: jobManager.getRunningJobs(),
414
- recentJobs: jobManager.getRecentJobs(12),
413
+ runningJobs: jobManager.getRunningJobs(session.sessionId),
414
+ recentJobs: jobManager.getRecentJobs(12, session.sessionId),
415
415
  informationalQuery,
416
416
  idleOrSocial: idleOrSocialPrompt,
417
417
  });
@@ -738,7 +738,7 @@ export async function runAgentTurn(prompt, options = {}) {
738
738
  refreshSessionState = (plan) => {
739
739
  if (idleOrSocialPrompt || informationalQuery)
740
740
  return;
741
- const runningJobs = jobManager.getRunningJobs();
741
+ const runningJobs = jobManager.getRunningJobs(session.sessionId);
742
742
  const p = plan ?? activePlan;
743
743
  if (!buildLikeTurn &&
744
744
  !pentestLikeTurn &&
@@ -1419,6 +1419,8 @@ export async function runAgentTurn(prompt, options = {}) {
1419
1419
  artifacts: { stdout: emptyJobArtifact(), stderr: emptyJobArtifact() },
1420
1420
  redactionProfile: "provider-secrets-v1",
1421
1421
  ownerSessionId: session.sessionId,
1422
+ // Tool-stall tracker only — must never show up in shell.jobs.
1423
+ kind: "ephemeral",
1422
1424
  };
1423
1425
  jobManager.registerJob(jobId, backgroundJob, toolAc);
1424
1426
  const TOOL_STALL_ABORT_MS = toolStallBudgetMs(call);
@@ -1462,6 +1464,7 @@ export async function runAgentTurn(prompt, options = {}) {
1462
1464
  },
1463
1465
  confirmed: true,
1464
1466
  userPrompt: prompt,
1467
+ sessionId: session.sessionId,
1465
1468
  ...(engagementAction && scope
1466
1469
  ? {
1467
1470
  engagementAuthorization: {