@sema-agent/cli 1.0.36 → 1.0.38

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.
Files changed (3) hide show
  1. package/npm-shrinkwrap.json +17 -17
  2. package/package.json +5 -5
  3. package/sema.js +125 -49
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@sema-agent/cli",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@sema-agent/cli",
9
- "version": "1.0.36",
9
+ "version": "1.0.38",
10
10
  "license": "BUSL-1.1",
11
11
  "dependencies": {
12
- "@sema-agent/sdk": "0.0.58",
13
- "@sema-agent/server": "1.232.0"
12
+ "@sema-agent/sdk": "0.0.59",
13
+ "@sema-agent/server": "1.238.0"
14
14
  },
15
15
  "bin": {
16
16
  "sema": "sema.js"
@@ -629,9 +629,9 @@
629
629
  }
630
630
  },
631
631
  "node_modules/@sema-agent/core": {
632
- "version": "1.347.2",
633
- "resolved": "https://registry.npmjs.org/@sema-agent/core/-/core-1.347.2.tgz",
634
- "integrity": "sha512-nmum/ILs5406o0Mkf8Nop4HzgXL8PnzFtAUp5VPQCpjId1imVeJIJirOQH3MOR3YnKUd4jDt9dhpMwO/S52D9A==",
632
+ "version": "1.351.0",
633
+ "resolved": "https://registry.npmjs.org/@sema-agent/core/-/core-1.351.0.tgz",
634
+ "integrity": "sha512-QyezdvW/pJvWrvth/U30i2d6LBQ9rmBIDya+FFsBu0JCGXTlJ2cfTrg+PEKVsfOMGYwicA7lZhqZn4UPAWP96g==",
635
635
  "license": "BUSL-1.1",
636
636
  "dependencies": {
637
637
  "@modelcontextprotocol/sdk": "1.29.0",
@@ -669,21 +669,21 @@
669
669
  }
670
670
  },
671
671
  "node_modules/@sema-agent/sdk": {
672
- "version": "0.0.58",
673
- "resolved": "https://registry.npmjs.org/@sema-agent/sdk/-/sdk-0.0.58.tgz",
674
- "integrity": "sha512-F9y2lgmaNImqHKfYNUd7jIM1TnRrnHcRAOn+aJhP3u3556jL2yVYUepAMExFd9ioq06Eyqg4cZF+aaok94bPLw==",
672
+ "version": "0.0.59",
673
+ "resolved": "https://registry.npmjs.org/@sema-agent/sdk/-/sdk-0.0.59.tgz",
674
+ "integrity": "sha512-g1nY8HnpQwGWYq7qi/dRa+OhcJQKqW6VdLastRkc7h5SSZwj2NUUUlCE9IBMEWWfgF5nRxCi3fK9SUIQE7a3fw==",
675
675
  "license": "BUSL-1.1",
676
676
  "engines": {
677
677
  "node": ">=20"
678
678
  }
679
679
  },
680
680
  "node_modules/@sema-agent/server": {
681
- "version": "1.232.0",
682
- "resolved": "https://registry.npmjs.org/@sema-agent/server/-/server-1.232.0.tgz",
683
- "integrity": "sha512-4wb7IT3B/kTyZKjSj5pBAXEBrBazsn80mnJYtW6dA2+wWG2iLdifBc2c2FSWwsnQzqUKow9nI41cYAAgAPSvvQ==",
681
+ "version": "1.238.0",
682
+ "resolved": "https://registry.npmjs.org/@sema-agent/server/-/server-1.238.0.tgz",
683
+ "integrity": "sha512-OLuRck3rGhaIsE25+xvGsVpgMgsUCPsAC4eJQOy6+9Bxm8j1iCfTfuL+9p1i4RAZtA2FS8cZYMfMe7TAv44G3A==",
684
684
  "license": "BUSL-1.1",
685
685
  "dependencies": {
686
- "@sema-agent/core": "^1.341.0",
686
+ "@sema-agent/core": "^1.351.0",
687
687
  "@sema-agent/registry-core": "^0.10.21",
688
688
  "e2b": "^2.28.0",
689
689
  "libsodium-wrappers": "^0.8.4",
@@ -1699,9 +1699,9 @@
1699
1699
  "license": "MIT"
1700
1700
  },
1701
1701
  "node_modules/mysql2": {
1702
- "version": "3.23.0",
1703
- "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.23.0.tgz",
1704
- "integrity": "sha512-ZwyGLoG9BRlL7hKNDcIy7q18hA6WTWGEpLAerGHXj5Xahemia4msZdwjIOUIzesjK3B5z5gWLktf+2tYSLAyTA==",
1702
+ "version": "3.23.1",
1703
+ "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.23.1.tgz",
1704
+ "integrity": "sha512-tTuRnC7qCet2IOfSNMYZ5SwXuBnfvBPAcIA28P0gtruXyZlU1LMxA6uha32kYypoFgyYklMqhLWwt4laYwXR/Q==",
1705
1705
  "license": "MIT",
1706
1706
  "dependencies": {
1707
1707
  "aws-ssl-profiles": "^1.1.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/cli",
3
- "version": "1.0.36",
3
+ "version": "1.0.38",
4
4
  "description": "Sema — your own Claude Code-grade coding agent, in the terminal.",
5
5
  "license": "BUSL-1.1",
6
6
  "bin": {
@@ -21,14 +21,14 @@
21
21
  "sema"
22
22
  ],
23
23
  "dependencies": {
24
- "@sema-agent/sdk": "0.0.58",
25
- "@sema-agent/server": "1.232.0"
24
+ "@sema-agent/sdk": "0.0.59",
25
+ "@sema-agent/server": "1.238.0"
26
26
  },
27
27
  "overrides": {
28
- "@sema-agent/core": "1.347.2",
28
+ "@sema-agent/core": "1.351.0",
29
29
  "@sema-agent/registry-core": "0.10.21"
30
30
  },
31
- "semaEngineVersion": "server 1.232.0 / core 1.347.2 / registry-core 0.10.21",
31
+ "semaEngineVersion": "server 1.238.0 / core 1.351.0 / registry-core 0.10.21",
32
32
  "engines": {
33
33
  "node": ">=18"
34
34
  }
package/sema.js CHANGED
@@ -161216,10 +161216,13 @@ var engineTaskNotification_exports = {};
161216
161216
  __export(engineTaskNotification_exports, {
161217
161217
  enqueueBgChildNotification: () => enqueueBgChildNotification,
161218
161218
  enqueueEngineWorkflowNotification: () => enqueueEngineWorkflowNotification,
161219
+ installBgTaskStatusProbe: () => installBgTaskStatusProbe,
161219
161220
  installWorkflowStatusProbe: () => installWorkflowStatusProbe,
161220
161221
  isWorkflowCompletionCardEnqueued: () => isWorkflowCompletionCardEnqueued,
161221
161222
  markEngineWorkflowNotified: () => markEngineWorkflowNotified,
161223
+ outstandingDeliverableWorkflowCount: () => outstandingDeliverableWorkflowCount,
161222
161224
  outstandingWorkflowCount: () => outstandingWorkflowCount,
161225
+ registerOutstandingBgTask: () => registerOutstandingBgTask,
161223
161226
  registerOutstandingWorkflowRun: () => registerOutstandingWorkflowRun,
161224
161227
  subscribeOutstandingWorkflows: () => subscribeOutstandingWorkflows
161225
161228
  });
@@ -161241,6 +161244,9 @@ function notifyOutstanding() {
161241
161244
  function outstandingWorkflowCount() {
161242
161245
  return outstandingRuns.size;
161243
161246
  }
161247
+ function outstandingDeliverableWorkflowCount() {
161248
+ return statusProbe ? outstandingRuns.size : 0;
161249
+ }
161244
161250
  function subscribeOutstandingWorkflows(listener5) {
161245
161251
  outstandingListeners.add(listener5);
161246
161252
  return () => {
@@ -161250,6 +161256,14 @@ function subscribeOutstandingWorkflows(listener5) {
161250
161256
  function installWorkflowStatusProbe(probe3) {
161251
161257
  statusProbe = probe3;
161252
161258
  }
161259
+ function installBgTaskStatusProbe(probe3) {
161260
+ bgStatusProbe = probe3;
161261
+ }
161262
+ function registerOutstandingBgTask(taskId, description) {
161263
+ if (!taskId || notifiedRunIds.has(taskId) || outstandingBgTasks.has(taskId)) return;
161264
+ outstandingBgTasks.set(taskId, { registeredAt: Date.now(), description });
161265
+ ensureWatchTimer();
161266
+ }
161253
161267
  function registerOutstandingWorkflowRun(runId) {
161254
161268
  if (!runId || notifiedRunIds.has(runId) || outstandingRuns.has(runId)) return;
161255
161269
  outstandingRuns.set(runId, Date.now());
@@ -161264,13 +161278,47 @@ function ensureWatchTimer() {
161264
161278
  if (typeof watchTimer.unref === "function") watchTimer.unref();
161265
161279
  }
161266
161280
  async function tickWatch() {
161267
- if (outstandingRuns.size === 0) {
161281
+ if (outstandingRuns.size === 0 && outstandingBgTasks.size === 0) {
161268
161282
  if (watchTimer !== null) {
161269
161283
  clearInterval(watchTimer);
161270
161284
  watchTimer = null;
161271
161285
  }
161272
161286
  return;
161273
161287
  }
161288
+ if (tickInFlight) return;
161289
+ tickInFlight = true;
161290
+ try {
161291
+ await tickWatchInner();
161292
+ } finally {
161293
+ tickInFlight = false;
161294
+ }
161295
+ }
161296
+ async function tickWatchInner() {
161297
+ const bgProbe = bgStatusProbe;
161298
+ const bgNow = Date.now();
161299
+ for (const [taskId, meta3] of [...outstandingBgTasks]) {
161300
+ if (notifiedRunIds.has(taskId)) {
161301
+ outstandingBgTasks.delete(taskId);
161302
+ continue;
161303
+ }
161304
+ if (bgNow - meta3.registeredAt > WATCH_TTL_MS) {
161305
+ outstandingBgTasks.delete(taskId);
161306
+ continue;
161307
+ }
161308
+ if (!bgProbe) continue;
161309
+ try {
161310
+ const res = await bgProbe(taskId);
161311
+ if (res?.terminal) {
161312
+ outstandingBgTasks.delete(taskId);
161313
+ enqueueBgChildNotification({
161314
+ taskId,
161315
+ status: res.status,
161316
+ summary: `Background agent "${meta3.description}" ${res.status}`
161317
+ });
161318
+ }
161319
+ } catch {
161320
+ }
161321
+ }
161274
161322
  const probe3 = statusProbe;
161275
161323
  const now2 = Date.now();
161276
161324
  for (const [runId, registeredAt] of [...outstandingRuns]) {
@@ -161303,6 +161351,7 @@ function enqueueBgChildNotification(n2) {
161303
161351
  if (notifiedRunIds.has(n2.taskId)) return;
161304
161352
  bgNotifiedKeys.add(key);
161305
161353
  notifiedRunIds.add(n2.taskId);
161354
+ cardEnqueuedRunIds.add(n2.taskId);
161306
161355
  const message = `<${TASK_NOTIFICATION_TAG}>
161307
161356
  <${TASK_ID_TAG}>${escapeXml(n2.taskId)}</${TASK_ID_TAG}>
161308
161357
  <${STATUS_TAG}>${escapeXml(n2.status)}</${STATUS_TAG}>
@@ -161327,7 +161376,7 @@ function enqueueEngineWorkflowNotification(c2) {
161327
161376
  mode: "task-notification"
161328
161377
  });
161329
161378
  }
161330
- var notifiedRunIds, cardEnqueuedRunIds, outstandingRuns, outstandingListeners, statusProbe, watchTimer, WATCH_INTERVAL_MS2, WATCH_TTL_MS, bgNotifiedKeys;
161379
+ var notifiedRunIds, cardEnqueuedRunIds, outstandingRuns, outstandingListeners, statusProbe, watchTimer, WATCH_INTERVAL_MS2, WATCH_TTL_MS, outstandingBgTasks, bgStatusProbe, tickInFlight, bgNotifiedKeys;
161331
161380
  var init_engineTaskNotification = __esm({
161332
161381
  "build-src/src/sema/engineTaskNotification.ts"() {
161333
161382
  init_xml();
@@ -161341,6 +161390,9 @@ var init_engineTaskNotification = __esm({
161341
161390
  watchTimer = null;
161342
161391
  WATCH_INTERVAL_MS2 = 5e3;
161343
161392
  WATCH_TTL_MS = 2 * 60 * 60 * 1e3;
161393
+ outstandingBgTasks = /* @__PURE__ */ new Map();
161394
+ bgStatusProbe = null;
161395
+ tickInFlight = false;
161344
161396
  bgNotifiedKeys = /* @__PURE__ */ new Set();
161345
161397
  }
161346
161398
  });
@@ -163614,6 +163666,7 @@ function structuredToToolUseResult(structured, modelText) {
163614
163666
  const agentId = typeof s.task_id === "string" ? s.task_id : void 0;
163615
163667
  if (agentId === void 0 || typeof s.description !== "string" || typeof s.prompt !== "string")
163616
163668
  return null;
163669
+ registerOutstandingBgTask(agentId, s.description);
163617
163670
  return {
163618
163671
  toolUseResult: {
163619
163672
  isAsync: true,
@@ -164369,7 +164422,7 @@ async function* sdkMessagesToCcEvents(sdk, meta3) {
164369
164422
  if (renderedEngineTaskNotifications.has(dedupKey)) break;
164370
164423
  renderedEngineTaskNotifications.add(dedupKey);
164371
164424
  if (n2.task_type !== "external" && isWorkflowCompletionCardEnqueued(taskId)) break;
164372
- markEngineWorkflowNotified(taskId);
164425
+ if (n2.task_type !== "external") markEngineWorkflowNotified(taskId);
164373
164426
  const summary = typeof n2.summary === "string" && n2.summary.length > 0 ? n2.summary : `Background task "${taskId}" ${rawStatus}`;
164374
164427
  const toolUseIdLine = typeof n2.toolUseId === "string" && n2.toolUseId.length > 0 ? `
164375
164428
  <${TOOL_USE_ID_TAG}>${escapeXml(n2.toolUseId)}</${TOOL_USE_ID_TAG}>` : "";
@@ -165469,16 +165522,15 @@ function createLiveFleetSource(config4, now2 = Date.now()) {
165469
165522
  break;
165470
165523
  default: {
165471
165524
  const anyFrame = frame;
165472
- if (anyFrame.type === "bg_notification" && anyFrame.taskId && anyFrame.status) {
165525
+ const n2 = anyFrame.type === "bg_notification" ? anyFrame.notification ?? anyFrame : void 0;
165526
+ if (n2 && typeof n2.taskId === "string" && typeof n2.status === "string") {
165473
165527
  if (process.env.SEMA_DEBUG) {
165474
- logForDebugging(
165475
- `[fleet-frame] bg_notification taskId=${anyFrame.taskId} status=${anyFrame.status}`
165476
- );
165528
+ logForDebugging(`[fleet-frame] bg_notification taskId=${n2.taskId} status=${n2.status}`);
165477
165529
  }
165478
165530
  enqueueBgChildNotification({
165479
- taskId: anyFrame.taskId,
165480
- status: anyFrame.status,
165481
- summary: anyFrame.summary
165531
+ taskId: n2.taskId,
165532
+ status: n2.status,
165533
+ ...typeof n2.summary === "string" ? { summary: n2.summary } : {}
165482
165534
  });
165483
165535
  }
165484
165536
  break;
@@ -353841,7 +353893,7 @@ function useClaudeAiLimits() {
353841
353893
  var import_react64;
353842
353894
  var init_claudeAiLimitsHook = __esm({
353843
353895
  "build-src/src/services/claudeAiLimitsHook.ts"() {
353844
- import_react64 = __toESM(require_react());
353896
+ import_react64 = __toESM(require_react(), 1);
353845
353897
  init_claudeAiLimits();
353846
353898
  }
353847
353899
  });
@@ -360097,7 +360149,7 @@ function UserToolSuccessMessage({
360097
360149
  }) ?? null;
360098
360150
  if (renderedMessage === null) {
360099
360151
  const report = parseSubagentReport(message.toolUseResult);
360100
- const notActive = typeof message.toolUseResult === "string" ? /^Tool "([^"]+)" is not active yet/.exec(message.toolUseResult) : null;
360152
+ const notActive = typeof message.toolUseResult === "string" && /is not active yet\. Call ToolSearch with/.test(message.toolUseResult) ? /^Tool "([^"]+)" is not active yet/.exec(message.toolUseResult) : null;
360101
360153
  if (notActive) {
360102
360154
  renderedMessage = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(ThemedText, { color: "warning", children: [
360103
360155
  notActive[1],
@@ -360107,7 +360159,22 @@ function UserToolSuccessMessage({
360107
360159
  renderedMessage = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(SubagentReportSummary, { report, isTranscriptMode });
360108
360160
  } else {
360109
360161
  const fallbackText = genericResultText(message.toolUseResult, { full: Boolean(isTranscriptMode) || verbose });
360110
- if (fallbackText) renderedMessage = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(ThemedText, { children: fallbackText }) });
360162
+ if (fallbackText) {
360163
+ renderedMessage = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(ThemedText, { children: fallbackText }) });
360164
+ } else {
360165
+ const raw2 = typeof message.toolUseResult === "string" ? message.toolUseResult : (() => {
360166
+ try {
360167
+ return JSON.stringify(message.toolUseResult);
360168
+ } catch {
360169
+ return String(message.toolUseResult);
360170
+ }
360171
+ })();
360172
+ const shown = raw2 && raw2 !== "{}" && raw2 !== "null" ? raw2 : "";
360173
+ if (shown) {
360174
+ const clipped = !isTranscriptMode && !verbose && shown.length > 1600 ? `${shown.slice(0, 1600)}\u2026` : shown;
360175
+ renderedMessage = /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(ThemedText, { children: clipped }) });
360176
+ }
360177
+ }
360111
360178
  }
360112
360179
  }
360113
360180
  if (renderedMessage === null) {
@@ -368320,6 +368387,11 @@ var init_SkillTool = __esm({
368320
368387
  get outputSchema() {
368321
368388
  return outputSchema9();
368322
368389
  },
368390
+ // G 件(clay dogfood 2026-07-19,#16):skill 卡点击不展开——Messages.isItemClickable 只放行
368391
+ // 实现了 isResultTruncated 的工具,SkillTool(CC 原版同)缺席=恒不可点。超集声明:skill 卡
368392
+ // 收起态恒有隐藏面(进度列表裁到末 N 条「+N more tool uses」/forked result 长文),点击展开
368393
+ // 是桌面 app 核心 affordance。无隐藏内容时点击=同帧重渲,无害。
368394
+ isResultTruncated: () => true,
368323
368395
  description: async ({ skill }) => `Execute skill: ${skill}`,
368324
368396
  prompt: async () => getPrompt(getProjectRoot()),
368325
368397
  // Only one skill/command should run at a time, since the tool expands the
@@ -406293,7 +406365,7 @@ function renderWorkflowToolResultMessage(content, _progress, { verbose }) {
406293
406365
  }
406294
406366
  } catch {
406295
406367
  }
406296
- if (/is not active yet/.test(text2)) {
406368
+ if (/^Tool "[^"]+" is not active yet\. Call ToolSearch with/.test(text2)) {
406297
406369
  return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(MessageResponse, { children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(ThemedText, { color: "warning", children: "Workflow tool not active yet \u2014 activating via ToolSearch\u2026" }) });
406298
406370
  }
406299
406371
  const shown = verbose || text2.length <= 400 ? text2 : `${text2.slice(0, 400)}\u2026`;
@@ -406345,11 +406417,13 @@ var init_EngineWorkflowTool = __esm({
406345
406417
  // renderToolResultMessage 才拿得到信封做人话化;object 臂兜结构化回放/存储形。
406346
406418
  external_exports.union([
406347
406419
  external_exports.string(),
406420
+ // loose:保留未知键(对抗复审 §3——strict strip 会把 {error:…,retryable:…} 缩成 {} 显成空,
406421
+ // 隐掉真错误)。渲染层 JSON.stringify 因此拿得到原字段。
406348
406422
  external_exports.object({
406349
406423
  runId: external_exports.string().optional(),
406350
406424
  status: external_exports.string().optional(),
406351
406425
  note: external_exports.string().optional()
406352
- })
406426
+ }).loose()
406353
406427
  ])
406354
406428
  )
406355
406429
  );
@@ -450939,7 +451013,7 @@ function Settings({
450939
451013
  var import_react113, import_jsx_runtime193;
450940
451014
  var init_cmd_config = __esm({
450941
451015
  "build-src/src/sema/overrides/cmd-config.tsx"() {
450942
- import_react113 = __toESM(require_react());
451016
+ import_react113 = __toESM(require_react(), 1);
450943
451017
  init_useKeybinding();
450944
451018
  init_useExitOnCtrlCDWithKeybindings();
450945
451019
  init_useTerminalSize();
@@ -450950,7 +451024,7 @@ var init_cmd_config = __esm({
450950
451024
  init_Config();
450951
451025
  init_settings_usage();
450952
451026
  init_Stats();
450953
- import_jsx_runtime193 = __toESM(require_jsx_runtime());
451027
+ import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
450954
451028
  }
450955
451029
  });
450956
451030
 
@@ -478425,23 +478499,10 @@ function createSemaGetStartedFeed() {
478425
478499
  };
478426
478500
  }
478427
478501
  function createWhatsNewFeed(releaseNotes2) {
478428
- const lines = releaseNotes2.map((note) => {
478429
- if (false) {
478430
- const match = note.match(/^(\d+\s+\w+\s+ago)\s+(.+)$/);
478431
- if (match) {
478432
- return {
478433
- timestamp: match[1],
478434
- text: match[2] || ""
478435
- };
478436
- }
478437
- }
478438
- return {
478439
- text: note
478440
- };
478441
- });
478442
- const emptyMessage = false ? "Unable to fetch latest claude-cli-internal commits" : "Check the Sema changelog for updates";
478502
+ const lines = releaseNotes2.map((note) => ({ text: note }));
478503
+ const emptyMessage = "Run /release-notes to see what changed recently";
478443
478504
  return {
478444
- title: false ? "What's new [ANT-ONLY: Latest CC commits]" : "What's new",
478505
+ title: "What's new",
478445
478506
  lines,
478446
478507
  footer: lines.length > 0 ? "/release-notes for more" : void 0,
478447
478508
  emptyMessage
@@ -479812,13 +479873,13 @@ var init_sema_brand = __esm({
479812
479873
  _doc: "Rendered as the 'What's new' feed (createWhatsNewFeed). Top version MUST be >= current app version (2.1.187) and newer than config.lastReleaseNotesSeen so the notes display and full-logo mode triggers. Pinned == app version (2.1.187) + lastReleaseNotesSeen (loginState.ts) so getRecentReleaseNotes()===[] \u2192 condensed logo (matches refs/chrome.empty-input.json).",
479813
479874
  version: "2.1.187",
479814
479875
  notes: [
479815
- "Sema shell: faithful CC REPL over the @sema-agent/sdk fleet",
479816
- "Welcome screen now shows your account, plan, and recent activity",
479817
- "Slash-command gating wired to the fleet capability handshake"
479876
+ "Idle-time completion notifications for background agents & workflows (dual-channel dedup)",
479877
+ "Headless -p now waits for workflow completion before exiting \u2014 artifacts always land",
479878
+ "Fleet rows: agent TYPE column, per-child elapsed time, parent nesting restored"
479818
479879
  ]
479819
479880
  },
479820
- productVersion: "1.0.36",
479821
- announcement: "sema 1.0.36 \u2014 workflow completion notices arrive exactly once, deferred-tool activation reads as one plain line, agent results keep real file paths for assertions, and schema docs cover union types."
479881
+ productVersion: "1.0.38",
479882
+ announcement: "sema 1.0.38 \u2014 background agent & workflow completion notifications now arrive while you're idle (no more waiting for your next message), and resumed sessions show the full welcome screen."
479822
479883
  };
479823
479884
  }
479824
479885
  });
@@ -480155,7 +480216,7 @@ function WelcomeSciFi() {
480155
480216
  const announcement = sema_brand_default.announcement;
480156
480217
  const rightCol = /* @__PURE__ */ (0, import_jsx_runtime265.jsxs)(ThemedBox_default, { flexDirection: "column", marginLeft: 3, flexGrow: 1, children: [
480157
480218
  /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ThemedText, { wrap: "truncate", children: /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ThemedText, { color: "claude", bold: true, children: "\u258DTips for getting started" }) }),
480158
- /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ThemedText, { wrap: "truncate", dimColor: true, children: "Run /init to generate a CLAUDE.md with project conventions" }),
480219
+ /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ThemedText, { wrap: "truncate", dimColor: true, children: "Run /init to set up project conventions loaded every session" }),
480159
480220
  /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ThemedText, { wrap: "truncate", dimColor: true, children: "Paste screenshots with ctrl+v \xB7 open the agent fleet with \u2190" }),
480160
480221
  /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ThemedText, { wrap: "truncate", dimColor: true, children: "/model picks the brain \xB7 c cycles its context window" }),
480161
480222
  /* @__PURE__ */ (0, import_jsx_runtime265.jsx)(ThemedText, { children: " " }),
@@ -482747,13 +482808,13 @@ var require_sema_brand = __commonJS({
482747
482808
  _doc: "Rendered as the 'What's new' feed (createWhatsNewFeed). Top version MUST be >= current app version (2.1.187) and newer than config.lastReleaseNotesSeen so the notes display and full-logo mode triggers. Pinned == app version (2.1.187) + lastReleaseNotesSeen (loginState.ts) so getRecentReleaseNotes()===[] \u2192 condensed logo (matches refs/chrome.empty-input.json).",
482748
482809
  version: "2.1.187",
482749
482810
  notes: [
482750
- "Sema shell: faithful CC REPL over the @sema-agent/sdk fleet",
482751
- "Welcome screen now shows your account, plan, and recent activity",
482752
- "Slash-command gating wired to the fleet capability handshake"
482811
+ "Idle-time completion notifications for background agents & workflows (dual-channel dedup)",
482812
+ "Headless -p now waits for workflow completion before exiting \u2014 artifacts always land",
482813
+ "Fleet rows: agent TYPE column, per-child elapsed time, parent nesting restored"
482753
482814
  ]
482754
482815
  },
482755
- productVersion: "1.0.36",
482756
- announcement: "sema 1.0.36 \u2014 workflow completion notices arrive exactly once, deferred-tool activation reads as one plain line, agent results keep real file paths for assertions, and schema docs cover union types."
482816
+ productVersion: "1.0.38",
482817
+ announcement: "sema 1.0.38 \u2014 background agent & workflow completion notifications now arrive while you're idle (no more waiting for your next message), and resumed sessions show the full welcome screen."
482757
482818
  };
482758
482819
  }
482759
482820
  });
@@ -605791,7 +605852,7 @@ async function _temp157() {
605791
605852
  logForDebugging("Showing marketplace installation success notification");
605792
605853
  notifs.push({
605793
605854
  key: "marketplace-installed",
605794
- jsx: /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(ThemedText, { color: "success", children: "\u2713 Anthropic marketplace installed \xB7 /plugin to see available plugins" }),
605855
+ jsx: /* @__PURE__ */ (0, import_jsx_runtime456.jsx)(ThemedText, { color: "success", children: "\u2713 Plugin marketplace installed \xB7 /plugin to see available plugins" }),
605795
605856
  priority: "immediate",
605796
605857
  timeoutMs: 7e3
605797
605858
  });
@@ -612415,7 +612476,7 @@ function REPL({
612415
612476
  const sessionTitle = terminalTitleFromRename ? getCurrentSessionTitle(getSessionId()) : void 0;
612416
612477
  const [haikuTitle, setHaikuTitle] = (0, import_react331.useState)();
612417
612478
  const haikuTitleAttemptedRef = (0, import_react331.useRef)((initialMessages?.length ?? 0) > 0);
612418
- const [hideWelcomeBanner, setHideWelcomeBanner] = (0, import_react331.useState)((initialMessages?.length ?? 0) > 0);
612479
+ const [hideWelcomeBanner, setHideWelcomeBanner] = (0, import_react331.useState)(false);
612419
612480
  const agentTitle = mainThreadAgentDefinition?.agentType;
612420
612481
  const terminalTitleBase = sessionTitle ?? agentTitle ?? haikuTitle;
612421
612482
  const terminalTitle = terminalTitleBase ? `Sema \u2014 ${terminalTitleBase}` : "Sema";
@@ -612951,7 +613012,7 @@ function REPL({
612951
613012
  contentReplacementStateRef.current = reconstructContentReplacementState(messages2, log2.contentReplacements ?? []);
612952
613013
  }
612953
613014
  setMessages(() => messages2);
612954
- setHideWelcomeBanner(true);
613015
+ setHideWelcomeBanner(false);
612955
613016
  setToolJSX(null);
612956
613017
  setInputValue("");
612957
613018
  logEvent("tengu_session_resumed", {
@@ -629123,6 +629184,19 @@ function createLiveConversationClient(config4) {
629123
629184
  runsEvents: (taskId, opts) => client4.runs.events(taskId, opts),
629124
629185
  respondToolApproval
629125
629186
  };
629187
+ installBgTaskStatusProbe(async (taskId) => {
629188
+ let t2 = null;
629189
+ try {
629190
+ t2 = await client4.runs.get(taskId);
629191
+ } catch {
629192
+ return null;
629193
+ }
629194
+ if (!t2 || typeof t2.status !== "string") return null;
629195
+ if (t2.status === "completed" || t2.status === "failed" || t2.status === "killed") {
629196
+ return { terminal: true, status: t2.status };
629197
+ }
629198
+ return { terminal: false, status: t2.status };
629199
+ });
629126
629200
  installWorkflowStatusProbe(async (runId) => {
629127
629201
  let run2 = null;
629128
629202
  try {
@@ -635321,8 +635395,9 @@ function runHeadlessStreaming(structuredIO, mcpClients, commands, tools, initial
635321
635395
  const hasRunningBg = getRunningTasks(state3).some(
635322
635396
  (t2) => isBackgroundTask(t2) && t2.type !== "in_process_teammate"
635323
635397
  );
635398
+ const hasDeliverableEngineWork = outstandingDeliverableWorkflowCount() > 0;
635324
635399
  const hasMainThreadQueued = peek(isMainThread) !== void 0;
635325
- if (hasRunningBg || hasMainThreadQueued) {
635400
+ if (hasRunningBg || hasMainThreadQueued || hasDeliverableEngineWork) {
635326
635401
  waitingForAgents = true;
635327
635402
  if (!hasMainThreadQueued) {
635328
635403
  runPhase = "waiting_for_agents";
@@ -637548,6 +637623,7 @@ var init_print = __esm({
637548
637623
  init_diagLogs();
637549
637624
  init_Tool();
637550
637625
  init_loadAgentsDir();
637626
+ init_engineTaskNotification();
637551
637627
  init_messageQueueManager();
637552
637628
  init_commandLifecycle();
637553
637629
  init_sessionState();
@@ -654490,7 +654566,7 @@ Auth: unix socket -R \u2192 local proxy`, "info");
654490
654566
  pendingHookMessages
654491
654567
  }, renderAndRun);
654492
654568
  }
654493
- }).version("sema 1.0.36", "-v, --version", "Output the version number");
654569
+ }).version("sema 1.0.38", "-v, --version", "Output the version number");
654494
654570
  program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
654495
654571
  program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
654496
654572
  if (canUserConfigureAdvisor()) {