@sema-agent/cli 1.0.45 → 1.0.46
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/npm-shrinkwrap.json +13 -13
- package/package.json +5 -5
- package/sema.js +213 -37
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.46",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@sema-agent/cli",
|
|
9
|
-
"version": "1.0.
|
|
9
|
+
"version": "1.0.46",
|
|
10
10
|
"license": "BUSL-1.1",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@sema-agent/sdk": "0.0.
|
|
13
|
-
"@sema-agent/server": "1.
|
|
12
|
+
"@sema-agent/sdk": "0.0.64",
|
|
13
|
+
"@sema-agent/server": "1.243.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.
|
|
633
|
-
"resolved": "https://registry.npmjs.org/@sema-agent/core/-/core-1.
|
|
634
|
-
"integrity": "sha512-
|
|
632
|
+
"version": "1.363.0",
|
|
633
|
+
"resolved": "https://registry.npmjs.org/@sema-agent/core/-/core-1.363.0.tgz",
|
|
634
|
+
"integrity": "sha512-4+XYE255skF0NKrC1IorJVA3O+V8JpzRKDPA7XPjRBmk2C8YNuiLDz2CQ2VDzVoQXvjipr1MeJFeHU0h/oDezA==",
|
|
635
635
|
"license": "BUSL-1.1",
|
|
636
636
|
"dependencies": {
|
|
637
637
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
@@ -669,18 +669,18 @@
|
|
|
669
669
|
}
|
|
670
670
|
},
|
|
671
671
|
"node_modules/@sema-agent/sdk": {
|
|
672
|
-
"version": "0.0.
|
|
673
|
-
"resolved": "https://registry.npmjs.org/@sema-agent/sdk/-/sdk-0.0.
|
|
674
|
-
"integrity": "sha512-
|
|
672
|
+
"version": "0.0.64",
|
|
673
|
+
"resolved": "https://registry.npmjs.org/@sema-agent/sdk/-/sdk-0.0.64.tgz",
|
|
674
|
+
"integrity": "sha512-1sxthy2IjoSf+4f0pAXJlEmAoG+YgQP4gBAoMbKdFwt2wxNJbJ5yQKGm8u0FoeSGcnLRzHsi5LdelTKwxvb2dQ==",
|
|
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.
|
|
682
|
-
"resolved": "https://registry.npmjs.org/@sema-agent/server/-/server-1.
|
|
683
|
-
"integrity": "sha512-
|
|
681
|
+
"version": "1.243.0",
|
|
682
|
+
"resolved": "https://registry.npmjs.org/@sema-agent/server/-/server-1.243.0.tgz",
|
|
683
|
+
"integrity": "sha512-DupPRb2H3nb59NH4+ltvKYOlgZJO6FqD3sf5EwjN8+DQfEbSl80pnxcn7SvKZurIRC2qQY+WdAVN5mymlMRc2g==",
|
|
684
684
|
"license": "BUSL-1.1",
|
|
685
685
|
"dependencies": {
|
|
686
686
|
"@sema-agent/core": "^1.361.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.46",
|
|
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.
|
|
25
|
-
"@sema-agent/server": "1.
|
|
24
|
+
"@sema-agent/sdk": "0.0.64",
|
|
25
|
+
"@sema-agent/server": "1.243.0"
|
|
26
26
|
},
|
|
27
27
|
"overrides": {
|
|
28
|
-
"@sema-agent/core": "1.
|
|
28
|
+
"@sema-agent/core": "1.363.0",
|
|
29
29
|
"@sema-agent/registry-core": "0.10.21"
|
|
30
30
|
},
|
|
31
|
-
"semaEngineVersion": "server 1.
|
|
31
|
+
"semaEngineVersion": "server 1.243.0 / core 1.363.0 / registry-core 0.10.21",
|
|
32
32
|
"engines": {
|
|
33
33
|
"node": ">=18"
|
|
34
34
|
}
|
package/sema.js
CHANGED
|
@@ -122316,6 +122316,18 @@ function settleSubagentContent(taskId) {
|
|
|
122316
122316
|
flushBuffers(s);
|
|
122317
122317
|
scheduleNotify(taskId);
|
|
122318
122318
|
}
|
|
122319
|
+
function recordBgTerminalFacts(taskId, facts) {
|
|
122320
|
+
if (!taskId) return;
|
|
122321
|
+
if (bgFacts.size >= MAX_TASKS && !bgFacts.has(taskId)) {
|
|
122322
|
+
const oldest = bgFacts.keys().next().value;
|
|
122323
|
+
if (oldest !== void 0) bgFacts.delete(oldest);
|
|
122324
|
+
}
|
|
122325
|
+
bgFacts.set(taskId, facts);
|
|
122326
|
+
scheduleNotify(taskId);
|
|
122327
|
+
}
|
|
122328
|
+
function getBgTerminalFacts(taskId) {
|
|
122329
|
+
return bgFacts.get(taskId) ?? bgFacts.get(taskToParent.get(taskId) ?? "");
|
|
122330
|
+
}
|
|
122319
122331
|
function subscribeSubagentContent(fn2) {
|
|
122320
122332
|
notifyListener = fn2;
|
|
122321
122333
|
for (const id of tasks.keys()) pendingNotify.add(id);
|
|
@@ -122324,7 +122336,7 @@ function subscribeSubagentContent(fn2) {
|
|
|
122324
122336
|
if (notifyListener === fn2) notifyListener = null;
|
|
122325
122337
|
};
|
|
122326
122338
|
}
|
|
122327
|
-
var MAX_ITEMS_PER_TASK, MAX_TASKS, NOTIFY_COALESCE_MS, tasks, parentToTask, taskToParent, notifyListener, pendingNotify, notifyTimer;
|
|
122339
|
+
var MAX_ITEMS_PER_TASK, MAX_TASKS, NOTIFY_COALESCE_MS, tasks, parentToTask, taskToParent, notifyListener, pendingNotify, notifyTimer, bgFacts;
|
|
122328
122340
|
var init_subagentContentStore = __esm({
|
|
122329
122341
|
"build-src/src/sema/subagentContentStore.ts"() {
|
|
122330
122342
|
MAX_ITEMS_PER_TASK = 200;
|
|
@@ -122336,6 +122348,7 @@ var init_subagentContentStore = __esm({
|
|
|
122336
122348
|
notifyListener = null;
|
|
122337
122349
|
pendingNotify = /* @__PURE__ */ new Set();
|
|
122338
122350
|
notifyTimer = null;
|
|
122351
|
+
bgFacts = /* @__PURE__ */ new Map();
|
|
122339
122352
|
}
|
|
122340
122353
|
});
|
|
122341
122354
|
|
|
@@ -167215,6 +167228,9 @@ function createLiveFleetSource(config4, now2 = Date.now()) {
|
|
|
167215
167228
|
const mainName = config4.mainName ?? "main";
|
|
167216
167229
|
const taskMap = /* @__PURE__ */ new Map();
|
|
167217
167230
|
const wfMap = /* @__PURE__ */ new Map();
|
|
167231
|
+
const rowMeta = /* @__PURE__ */ new Map();
|
|
167232
|
+
const retained = /* @__PURE__ */ new Map();
|
|
167233
|
+
const TERMINAL_RETAIN_MS = 6e4;
|
|
167218
167234
|
let connected = false;
|
|
167219
167235
|
let version4 = null;
|
|
167220
167236
|
let scoped = null;
|
|
@@ -167244,11 +167260,28 @@ function createLiveFleetSource(config4, now2 = Date.now()) {
|
|
|
167244
167260
|
tokens: 0,
|
|
167245
167261
|
viewed: true
|
|
167246
167262
|
};
|
|
167247
|
-
function project2() {
|
|
167263
|
+
function project2(nowMs = Date.now()) {
|
|
167248
167264
|
const viewingTaskId = getAppStateStoreRef()?.getState().viewingAgentTaskId;
|
|
167265
|
+
const liveRows = [...taskMap.values()].map((r) => {
|
|
167266
|
+
if (TERMINAL_FLEET_TASK_STATUSES.has(r.status ?? "")) return r;
|
|
167267
|
+
const meta3 = rowMeta.get(r.id);
|
|
167268
|
+
if (!meta3) return r;
|
|
167269
|
+
const idle = Math.max(0, nowMs - meta3.receivedAt);
|
|
167270
|
+
return idle > 0 ? { ...r, elapsedMs: (r.elapsedMs ?? 0) + idle } : r;
|
|
167271
|
+
});
|
|
167272
|
+
const retainedRows = [];
|
|
167273
|
+
for (const [id, r] of retained) {
|
|
167274
|
+
if (taskMap.has(id)) continue;
|
|
167275
|
+
const isViewed = viewingTaskId !== void 0 && fleetRowTaskId(id) === viewingTaskId;
|
|
167276
|
+
if (nowMs > r.expireAt && !isViewed) {
|
|
167277
|
+
retained.delete(id);
|
|
167278
|
+
continue;
|
|
167279
|
+
}
|
|
167280
|
+
retainedRows.push(r.row);
|
|
167281
|
+
}
|
|
167249
167282
|
return {
|
|
167250
167283
|
main: { ...main3, viewed: viewingTaskId === void 0 },
|
|
167251
|
-
tasks: projectTasks([...
|
|
167284
|
+
tasks: projectTasks([...liveRows, ...retainedRows], viewingTaskId),
|
|
167252
167285
|
workflows: projectWorkflows([...wfMap.values()]),
|
|
167253
167286
|
selection: { kind: "tasks", index: null }
|
|
167254
167287
|
// shell-local UI cursor
|
|
@@ -167260,17 +167293,33 @@ function createLiveFleetSource(config4, now2 = Date.now()) {
|
|
|
167260
167293
|
version4 = frame.version;
|
|
167261
167294
|
scoped = frame.scoped;
|
|
167262
167295
|
break;
|
|
167263
|
-
case "snapshot":
|
|
167296
|
+
case "snapshot": {
|
|
167264
167297
|
taskMap.clear();
|
|
167265
167298
|
wfMap.clear();
|
|
167266
|
-
|
|
167299
|
+
rowMeta.clear();
|
|
167300
|
+
const at = Date.now();
|
|
167301
|
+
for (const row2 of frame.tasks) {
|
|
167302
|
+
taskMap.set(row2.id, row2);
|
|
167303
|
+
rowMeta.set(row2.id, { receivedAt: at });
|
|
167304
|
+
}
|
|
167267
167305
|
for (const row2 of frame.workflows) wfMap.set(row2.id, row2);
|
|
167268
167306
|
break;
|
|
167307
|
+
}
|
|
167269
167308
|
case "task":
|
|
167270
|
-
if (frame.row?.id)
|
|
167309
|
+
if (frame.row?.id) {
|
|
167310
|
+
taskMap.set(frame.row.id, frame.row);
|
|
167311
|
+
rowMeta.set(frame.row.id, { receivedAt: Date.now() });
|
|
167312
|
+
if (TERMINAL_FLEET_TASK_STATUSES.has(frame.row.status ?? "")) {
|
|
167313
|
+
retained.set(frame.row.id, {
|
|
167314
|
+
row: frame.row,
|
|
167315
|
+
expireAt: Date.now() + TERMINAL_RETAIN_MS
|
|
167316
|
+
});
|
|
167317
|
+
}
|
|
167318
|
+
}
|
|
167271
167319
|
break;
|
|
167272
167320
|
case "task_remove":
|
|
167273
167321
|
taskMap.delete(frame.id);
|
|
167322
|
+
rowMeta.delete(frame.id);
|
|
167274
167323
|
break;
|
|
167275
167324
|
case "workflow":
|
|
167276
167325
|
if (frame.row?.id) wfMap.set(frame.row.id, frame.row);
|
|
@@ -167285,6 +167334,27 @@ function createLiveFleetSource(config4, now2 = Date.now()) {
|
|
|
167285
167334
|
if (process.env.SEMA_DEBUG) {
|
|
167286
167335
|
logForDebugging(`[fleet-frame] bg_notification taskId=${n2.taskId} status=${n2.status} seq=${n2.seq ?? "-"}`);
|
|
167287
167336
|
}
|
|
167337
|
+
if (TERMINAL_FLEET_TASK_STATUSES.has(n2.status)) {
|
|
167338
|
+
const nn = n2;
|
|
167339
|
+
recordBgTerminalFacts(n2.taskId, {
|
|
167340
|
+
status: n2.status,
|
|
167341
|
+
...typeof nn.summary === "string" ? { summary: nn.summary } : {},
|
|
167342
|
+
...Array.isArray(nn.recentSteps) ? {
|
|
167343
|
+
recentSteps: nn.recentSteps.filter((s) => s && typeof s === "object").map((s) => ({
|
|
167344
|
+
...typeof s.tool === "string" ? { tool: s.tool } : {},
|
|
167345
|
+
...typeof s.target === "string" ? { target: s.target } : {},
|
|
167346
|
+
...typeof s.outcome === "string" ? { outcome: s.outcome } : {}
|
|
167347
|
+
}))
|
|
167348
|
+
} : {}
|
|
167349
|
+
});
|
|
167350
|
+
const known = taskMap.get(n2.taskId);
|
|
167351
|
+
if (known && !retained.has(n2.taskId)) {
|
|
167352
|
+
retained.set(n2.taskId, {
|
|
167353
|
+
row: { ...known, status: n2.status },
|
|
167354
|
+
expireAt: Date.now() + TERMINAL_RETAIN_MS
|
|
167355
|
+
});
|
|
167356
|
+
}
|
|
167357
|
+
}
|
|
167288
167358
|
enqueueBgChildNotification({
|
|
167289
167359
|
taskId: n2.taskId,
|
|
167290
167360
|
status: n2.status,
|
|
@@ -167349,7 +167419,7 @@ function createLiveFleetSource(config4, now2 = Date.now()) {
|
|
|
167349
167419
|
tick(nowMs) {
|
|
167350
167420
|
const dt = Math.max(0, nowMs - t0);
|
|
167351
167421
|
main3.elapsedMs = dt;
|
|
167352
|
-
return project2();
|
|
167422
|
+
return project2(nowMs);
|
|
167353
167423
|
},
|
|
167354
167424
|
snapshot() {
|
|
167355
167425
|
return project2();
|
|
@@ -167382,6 +167452,7 @@ var init_fleetClient = __esm({
|
|
|
167382
167452
|
init_liveSessionStore();
|
|
167383
167453
|
init_appStateRef();
|
|
167384
167454
|
init_footerRowBelt();
|
|
167455
|
+
init_subagentContentStore();
|
|
167385
167456
|
FLEET_STREAM_PATH = "/v1/fleet/stream";
|
|
167386
167457
|
TERMINAL_FLEET_TASK_STATUSES = /* @__PURE__ */ new Set(["completed", "failed", "killed"]);
|
|
167387
167458
|
liveBgViews = /* @__PURE__ */ new Set();
|
|
@@ -355996,7 +356067,7 @@ function useClaudeAiLimits() {
|
|
|
355996
356067
|
var import_react64;
|
|
355997
356068
|
var init_claudeAiLimitsHook = __esm({
|
|
355998
356069
|
"build-src/src/services/claudeAiLimitsHook.ts"() {
|
|
355999
|
-
import_react64 = __toESM(require_react());
|
|
356070
|
+
import_react64 = __toESM(require_react(), 1);
|
|
356000
356071
|
init_claudeAiLimits();
|
|
356001
356072
|
}
|
|
356002
356073
|
});
|
|
@@ -440725,6 +440796,10 @@ var selfKnowledge_exports = {};
|
|
|
440725
440796
|
__export(selfKnowledge_exports, {
|
|
440726
440797
|
SEMA_IDENTITY_LINE: () => SEMA_IDENTITY_LINE,
|
|
440727
440798
|
SEMA_SELF_KNOWLEDGE: () => SEMA_SELF_KNOWLEDGE,
|
|
440799
|
+
__resetSelfKnowledgeCapCacheForTests: () => __resetSelfKnowledgeCapCacheForTests,
|
|
440800
|
+
appendSystemPromptCapable: () => appendSystemPromptCapable,
|
|
440801
|
+
kickAppendSystemPromptCapProbe: () => kickAppendSystemPromptCapProbe,
|
|
440802
|
+
withSelfKnowledgeAppend: () => withSelfKnowledgeAppend,
|
|
440728
440803
|
withSelfKnowledgeOutputStyle: () => withSelfKnowledgeOutputStyle
|
|
440729
440804
|
});
|
|
440730
440805
|
function withSelfKnowledgeOutputStyle(existing) {
|
|
@@ -440734,7 +440809,38 @@ function withSelfKnowledgeOutputStyle(existing) {
|
|
|
440734
440809
|
|
|
440735
440810
|
${existing}`;
|
|
440736
440811
|
}
|
|
440737
|
-
|
|
440812
|
+
function withSelfKnowledgeAppend(existing) {
|
|
440813
|
+
if (!existing || !existing.trim()) return SEMA_SELF_KNOWLEDGE;
|
|
440814
|
+
if (existing.includes("# About sema (product context)")) return existing;
|
|
440815
|
+
return `${SEMA_SELF_KNOWLEDGE}
|
|
440816
|
+
|
|
440817
|
+
${existing}`;
|
|
440818
|
+
}
|
|
440819
|
+
function kickAppendSystemPromptCapProbe(baseUrl, probe3) {
|
|
440820
|
+
const hit = appendCapByBase.get(baseUrl);
|
|
440821
|
+
if (hit && (hit.ok || Date.now() - hit.at < APPEND_CAP_FALSE_RETRY_TTL_MS)) return;
|
|
440822
|
+
if (appendCapInFlight.has(baseUrl)) return;
|
|
440823
|
+
appendCapInFlight.add(baseUrl);
|
|
440824
|
+
void (async () => {
|
|
440825
|
+
try {
|
|
440826
|
+
const caps = await probe3();
|
|
440827
|
+
const ok2 = caps.appendSystemPrompt === true;
|
|
440828
|
+
appendCapByBase.set(baseUrl, { ok: ok2, at: Date.now() });
|
|
440829
|
+
} catch {
|
|
440830
|
+
} finally {
|
|
440831
|
+
appendCapInFlight.delete(baseUrl);
|
|
440832
|
+
}
|
|
440833
|
+
})();
|
|
440834
|
+
}
|
|
440835
|
+
function appendSystemPromptCapable(baseUrl) {
|
|
440836
|
+
if (!baseUrl) return false;
|
|
440837
|
+
return appendCapByBase.get(baseUrl)?.ok === true;
|
|
440838
|
+
}
|
|
440839
|
+
function __resetSelfKnowledgeCapCacheForTests() {
|
|
440840
|
+
appendCapByBase.clear();
|
|
440841
|
+
appendCapInFlight.clear();
|
|
440842
|
+
}
|
|
440843
|
+
var SEMA_SELF_KNOWLEDGE, SEMA_IDENTITY_LINE, appendCapByBase, APPEND_CAP_FALSE_RETRY_TTL_MS, appendCapInFlight;
|
|
440738
440844
|
var init_selfKnowledge = __esm({
|
|
440739
440845
|
"build-src/src/sema/selfKnowledge.ts"() {
|
|
440740
440846
|
SEMA_SELF_KNOWLEDGE = `# About sema (product context)
|
|
@@ -440747,6 +440853,9 @@ You are running inside sema, an AI coding CLI. Facts you must know and act on:
|
|
|
440747
440853
|
- Plugins: /plugin opens the plugin manager (marketplaces, install, enable/disable). Skills: /skills. Both consume the open Sema plugin/skill ecosystem directly.
|
|
440748
440854
|
- If asked what sema is: an AI coding CLI, Sema-compatible and a superset of it (engine architecture, model freedom, cloud axes). If unsure whether a capability exists, verify with \`sema --help\` or the sema-guide agent instead of denying it.`;
|
|
440749
440855
|
SEMA_IDENTITY_LINE = "You are part of sema, an AI coding CLI that is fully Sema-compatible (claude commands map to sema verbatim) and a superset of it (engine architecture, Model Hub, cloud axes).";
|
|
440856
|
+
appendCapByBase = /* @__PURE__ */ new Map();
|
|
440857
|
+
APPEND_CAP_FALSE_RETRY_TTL_MS = 5 * 6e4;
|
|
440858
|
+
appendCapInFlight = /* @__PURE__ */ new Set();
|
|
440750
440859
|
}
|
|
440751
440860
|
});
|
|
440752
440861
|
|
|
@@ -451680,7 +451789,7 @@ function Settings({
|
|
|
451680
451789
|
var import_react113, import_jsx_runtime193;
|
|
451681
451790
|
var init_cmd_config = __esm({
|
|
451682
451791
|
"build-src/src/sema/overrides/cmd-config.tsx"() {
|
|
451683
|
-
import_react113 = __toESM(require_react());
|
|
451792
|
+
import_react113 = __toESM(require_react(), 1);
|
|
451684
451793
|
init_useKeybinding();
|
|
451685
451794
|
init_useExitOnCtrlCDWithKeybindings();
|
|
451686
451795
|
init_useTerminalSize();
|
|
@@ -451691,7 +451800,7 @@ var init_cmd_config = __esm({
|
|
|
451691
451800
|
init_Config();
|
|
451692
451801
|
init_settings_usage();
|
|
451693
451802
|
init_Stats();
|
|
451694
|
-
import_jsx_runtime193 = __toESM(require_jsx_runtime());
|
|
451803
|
+
import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
|
|
451695
451804
|
}
|
|
451696
451805
|
});
|
|
451697
451806
|
|
|
@@ -480484,13 +480593,15 @@ var init_sema_brand = __esm({
|
|
|
480484
480593
|
_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).",
|
|
480485
480594
|
version: "2.1.187",
|
|
480486
480595
|
notes: [
|
|
480487
|
-
"
|
|
480488
|
-
"
|
|
480489
|
-
"
|
|
480596
|
+
"Background/fork agents: elapsed time now ticks while they run (the engine only reports on activity; the shell keeps the clock honest in between)",
|
|
480597
|
+
"Completed agents no longer vanish instantly \u2014 they stay in the agents tree for a minute and the completed counter finally counts them",
|
|
480598
|
+
"Enter on an agent in the full-screen agents view now opens its transcript (it used to just refilter the tree)",
|
|
480599
|
+
"Finished background agents show their recent tool steps and outcome when you open them; the waiting placeholder now tells the truth about what will appear",
|
|
480600
|
+
"Product self-knowledge now rides the engine's first-class appendSystemPrompt lane (engine 1.243.0), freeing output styles for their real job"
|
|
480490
480601
|
]
|
|
480491
480602
|
},
|
|
480492
|
-
productVersion: "1.0.
|
|
480493
|
-
announcement: "sema 1.0.
|
|
480603
|
+
productVersion: "1.0.46",
|
|
480604
|
+
announcement: "sema 1.0.46 \u2014 Background agents are now fully observable: elapsed time ticks live, completed agents stay listed (with a completed count) instead of vanishing, pressing enter on an agent in the agents view now really opens its transcript, and finished background agents show their recent steps and outcome. Ships on engine 1.243.0."
|
|
480494
480605
|
};
|
|
480495
480606
|
}
|
|
480496
480607
|
});
|
|
@@ -483419,13 +483530,15 @@ var require_sema_brand = __commonJS({
|
|
|
483419
483530
|
_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).",
|
|
483420
483531
|
version: "2.1.187",
|
|
483421
483532
|
notes: [
|
|
483422
|
-
"
|
|
483423
|
-
"
|
|
483424
|
-
"
|
|
483533
|
+
"Background/fork agents: elapsed time now ticks while they run (the engine only reports on activity; the shell keeps the clock honest in between)",
|
|
483534
|
+
"Completed agents no longer vanish instantly \u2014 they stay in the agents tree for a minute and the completed counter finally counts them",
|
|
483535
|
+
"Enter on an agent in the full-screen agents view now opens its transcript (it used to just refilter the tree)",
|
|
483536
|
+
"Finished background agents show their recent tool steps and outcome when you open them; the waiting placeholder now tells the truth about what will appear",
|
|
483537
|
+
"Product self-knowledge now rides the engine's first-class appendSystemPrompt lane (engine 1.243.0), freeing output styles for their real job"
|
|
483425
483538
|
]
|
|
483426
483539
|
},
|
|
483427
|
-
productVersion: "1.0.
|
|
483428
|
-
announcement: "sema 1.0.
|
|
483540
|
+
productVersion: "1.0.46",
|
|
483541
|
+
announcement: "sema 1.0.46 \u2014 Background agents are now fully observable: elapsed time ticks live, completed agents stay listed (with a completed count) instead of vanishing, pressing enter on an agent in the agents view now really opens its transcript, and finished background agents show their recent steps and outcome. Ships on engine 1.243.0."
|
|
483429
483542
|
};
|
|
483430
483543
|
}
|
|
483431
483544
|
});
|
|
@@ -556765,6 +556878,7 @@ var init_event_registry = __esm({
|
|
|
556765
556878
|
{ kind: "agent_listing", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "on", rendererRef: "turn-attachments.ts#renderAgentListingDelta" },
|
|
556766
556879
|
{ kind: "skills_listing", carrier: "message.user-prefix", trust: "operator", dedupe: "replace-by-key", defaultPolicy: "on", rendererRef: "turn-attachments.ts#renderSkillsListingDelta" },
|
|
556767
556880
|
{ kind: "mcp_instructions", carrier: "message.user-prefix", trust: "external", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderMcpInstructionsDelta" },
|
|
556881
|
+
{ kind: "mcp_dropped_tools", carrier: "message.user-prefix", trust: "external", dedupe: "replace-by-key", defaultPolicy: "off", rendererRef: "turn-attachments.ts#renderMcpDroppedTools" },
|
|
556768
556882
|
{ kind: "deadline_converge", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#deadline-t1" },
|
|
556769
556883
|
{ kind: "deadline_deliver_now", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#deadline-t2" },
|
|
556770
556884
|
{ kind: "deadline_finalize", carrier: "message.user-prefix", trust: "operator", dedupe: "once-per-run", defaultPolicy: "always", rendererRef: "runtask.ts#buildFinalizeText" },
|
|
@@ -556795,6 +556909,8 @@ var init_coordinator = __esm({
|
|
|
556795
556909
|
|
|
556796
556910
|
IMPORTANT: You are running as a named agent in a team. To communicate, use the SendMessage tool \u2014 \`to: "main"\` sends an update to the spawning conversation; \`to: "<name>"\` reaches a teammate: a running teammate receives your message at its next turn, and a completed teammate is continued from its transcript.
|
|
556797
556911
|
|
|
556912
|
+
Always refer to teammates by their NAME (e.g. "main", "analyzer"). Use an agent id (format \`a\u2026\`, from a spawn result or task notification) only when you don't have a name for that agent.
|
|
556913
|
+
|
|
556798
556914
|
Just writing a response in text is not visible to others on your team - you MUST use the SendMessage tool.
|
|
556799
556915
|
|
|
556800
556916
|
The user interacts primarily with the spawning conversation. Your work is coordinated through teammate messaging.`;
|
|
@@ -557193,6 +557309,12 @@ var init_auto_mode_prompt = __esm({
|
|
|
557193
557309
|
}
|
|
557194
557310
|
});
|
|
557195
557311
|
|
|
557312
|
+
// node_modules/@sema-agent/core/dist/core/runner/strict-output-schema.js
|
|
557313
|
+
var init_strict_output_schema = __esm({
|
|
557314
|
+
"node_modules/@sema-agent/core/dist/core/runner/strict-output-schema.js"() {
|
|
557315
|
+
}
|
|
557316
|
+
});
|
|
557317
|
+
|
|
557196
557318
|
// node_modules/@sema-agent/core/dist/core/mcp.js
|
|
557197
557319
|
import { tmpdir as tmpdir15 } from "node:os";
|
|
557198
557320
|
import { join as join167 } from "node:path";
|
|
@@ -557205,6 +557327,7 @@ var init_mcp5 = __esm({
|
|
|
557205
557327
|
init_types9();
|
|
557206
557328
|
init_tool_errors();
|
|
557207
557329
|
init_untrusted_text();
|
|
557330
|
+
init_strict_output_schema();
|
|
557208
557331
|
MCP_IMAGE_MAX_BASE64 = 5 * 1024 * 1024;
|
|
557209
557332
|
IMAGE_TARGET_RAW_SIZE3 = MCP_IMAGE_MAX_BASE64 * 3 / 4;
|
|
557210
557333
|
MCP_BLOB_DIR = join167(tmpdir15(), "sema-mcp-blobs");
|
|
@@ -557477,12 +557600,6 @@ var init_lsp_protocol = __esm({
|
|
|
557477
557600
|
}
|
|
557478
557601
|
});
|
|
557479
557602
|
|
|
557480
|
-
// node_modules/@sema-agent/core/dist/core/runner/strict-output-schema.js
|
|
557481
|
-
var init_strict_output_schema = __esm({
|
|
557482
|
-
"node_modules/@sema-agent/core/dist/core/runner/strict-output-schema.js"() {
|
|
557483
|
-
}
|
|
557484
|
-
});
|
|
557485
|
-
|
|
557486
557603
|
// node_modules/@sema-agent/core/dist/prompt-assembly/composer.js
|
|
557487
557604
|
var SINGLE_BLOCK_LAYOUT;
|
|
557488
557605
|
var init_composer = __esm({
|
|
@@ -562209,7 +562326,7 @@ function livePlaceholderUuid(taskId) {
|
|
|
562209
562326
|
}
|
|
562210
562327
|
function createLivePlaceholderMessage(taskId) {
|
|
562211
562328
|
const msg = createAssistantMessage({
|
|
562212
|
-
content: "*waiting for agent output \u2014
|
|
562329
|
+
content: "*waiting for agent output \u2014 streamed transcript appears here when available; a background agent shows tool/token progress in the agents tree and lands its outcome here on completion*",
|
|
562213
562330
|
isVirtual: true
|
|
562214
562331
|
});
|
|
562215
562332
|
return { ...msg, uuid: livePlaceholderUuid(taskId) };
|
|
@@ -562264,7 +562381,30 @@ function composeViewedMessages(t2, taskId) {
|
|
|
562264
562381
|
msgs.push(...content);
|
|
562265
562382
|
if (isTerminalTaskStatus(t2.status)) {
|
|
562266
562383
|
const report = reportTextOf(t2);
|
|
562267
|
-
if (report)
|
|
562384
|
+
if (report) {
|
|
562385
|
+
msgs.push(createAssistantMessage({ content: report }));
|
|
562386
|
+
} else {
|
|
562387
|
+
const facts = getBgTerminalFacts(taskId);
|
|
562388
|
+
if (facts) {
|
|
562389
|
+
const lines = [];
|
|
562390
|
+
const steps = facts.recentSteps ?? [];
|
|
562391
|
+
if (steps.length > 0) {
|
|
562392
|
+
lines.push("Recent steps:");
|
|
562393
|
+
for (const s of steps) {
|
|
562394
|
+
const bits2 = [s.tool, s.target].filter(Boolean).join(" \xB7 ");
|
|
562395
|
+
lines.push(`- ${bits2 || "tool"}${s.outcome ? ` \u2192 ${s.outcome}` : ""}`);
|
|
562396
|
+
}
|
|
562397
|
+
}
|
|
562398
|
+
if (facts.summary) lines.push(facts.summary);
|
|
562399
|
+
if (lines.length > 0) {
|
|
562400
|
+
const msg = createAssistantMessage({
|
|
562401
|
+
content: lines.join("\n"),
|
|
562402
|
+
isVirtual: true
|
|
562403
|
+
});
|
|
562404
|
+
msgs.push(msg);
|
|
562405
|
+
}
|
|
562406
|
+
}
|
|
562407
|
+
}
|
|
562268
562408
|
} else if (content.length === 0) {
|
|
562269
562409
|
msgs.push(createLivePlaceholderMessage(taskId));
|
|
562270
562410
|
}
|
|
@@ -562280,6 +562420,7 @@ function reportTextOf(task) {
|
|
|
562280
562420
|
}
|
|
562281
562421
|
function makeEngineAgentResult(report, task) {
|
|
562282
562422
|
return {
|
|
562423
|
+
agentId: task.agentId ?? task.id,
|
|
562283
562424
|
agentType: task.agentType,
|
|
562284
562425
|
content: [{ type: "text", text: report }],
|
|
562285
562426
|
totalToolUseCount: task.progress?.toolUseCount ?? 0,
|
|
@@ -562397,6 +562538,7 @@ function useEngineAgentViewSeeder(store) {
|
|
|
562397
562538
|
releaseTicksRef.current = 0;
|
|
562398
562539
|
if (viewingId === void 0 || !isEngineViewRow(viewingId)) return;
|
|
562399
562540
|
const TERMINAL = /* @__PURE__ */ new Set(["completed", "failed", "killed"]);
|
|
562541
|
+
let sawLive = false;
|
|
562400
562542
|
let lastLogged = "";
|
|
562401
562543
|
const timer2 = setInterval(() => {
|
|
562402
562544
|
const snap = getFleetFooterSource()?.snapshot();
|
|
@@ -562407,7 +562549,25 @@ function useEngineAgentViewSeeder(store) {
|
|
|
562407
562549
|
lastLogged = seen;
|
|
562408
562550
|
logForDebugging(`[fleet-view] viewing=${viewingId} fleet-row=${seen}`);
|
|
562409
562551
|
}
|
|
562410
|
-
const
|
|
562552
|
+
const isTerminal3 = row2 !== void 0 && TERMINAL.has(String(row2.status));
|
|
562553
|
+
if (row2 !== void 0 && !isTerminal3) sawLive = true;
|
|
562554
|
+
if (isTerminal3) {
|
|
562555
|
+
store.setState((prev) => {
|
|
562556
|
+
const t2 = prev.tasks[viewingId];
|
|
562557
|
+
if (!isLocalAgent2(t2)) return prev;
|
|
562558
|
+
const st2 = coerceStubStatus(String(row2.status));
|
|
562559
|
+
if (!isTerminalTaskStatus(st2) || t2.status === st2) return prev;
|
|
562560
|
+
const next = {
|
|
562561
|
+
...t2,
|
|
562562
|
+
status: st2,
|
|
562563
|
+
endTime: t2.endTime ?? Date.now(),
|
|
562564
|
+
messages: void 0
|
|
562565
|
+
};
|
|
562566
|
+
return { ...prev, tasks: { ...prev.tasks, [viewingId]: next } };
|
|
562567
|
+
});
|
|
562568
|
+
seedEngineAgentTranscript(store.setState, viewingId);
|
|
562569
|
+
}
|
|
562570
|
+
const released = (row2 === void 0 || isTerminal3) && sawLive;
|
|
562411
562571
|
if (!released) {
|
|
562412
562572
|
releaseTicksRef.current = 0;
|
|
562413
562573
|
return;
|
|
@@ -562927,6 +563087,8 @@ function FleetTreeHost(props) {
|
|
|
562927
563087
|
appStoreRef.current = appStore;
|
|
562928
563088
|
const tasksRef = (0, import_react202.useRef)(state3.tasks);
|
|
562929
563089
|
tasksRef.current = state3.tasks;
|
|
563090
|
+
const onDidEnterViewRef = (0, import_react202.useRef)(props.onDidEnterView);
|
|
563091
|
+
onDidEnterViewRef.current = props.onDidEnterView;
|
|
562930
563092
|
const drillInto = (rowId) => {
|
|
562931
563093
|
const store = appStoreRef.current;
|
|
562932
563094
|
try {
|
|
@@ -562936,14 +563098,19 @@ function FleetTreeHost(props) {
|
|
|
562936
563098
|
if (store) {
|
|
562937
563099
|
const row2 = tasksRef.current.find((t2) => t2.id === rowId);
|
|
562938
563100
|
enterFleetAgentView(row2 ?? { id: rowId }, store);
|
|
563101
|
+
onDidEnterViewRef.current?.();
|
|
562939
563102
|
} else {
|
|
562940
563103
|
setLocalViewing(rowId);
|
|
562941
563104
|
}
|
|
562942
563105
|
};
|
|
562943
563106
|
const viewMain = () => {
|
|
562944
563107
|
const store = appStoreRef.current;
|
|
562945
|
-
if (store)
|
|
562946
|
-
|
|
563108
|
+
if (store) {
|
|
563109
|
+
exitAgentViewToMain(store);
|
|
563110
|
+
onDidEnterViewRef.current?.();
|
|
563111
|
+
} else {
|
|
563112
|
+
setLocalViewing(void 0);
|
|
563113
|
+
}
|
|
562947
563114
|
};
|
|
562948
563115
|
const appViewingRef = (0, import_react202.useRef)(appViewingTaskId);
|
|
562949
563116
|
appViewingRef.current = appViewingTaskId;
|
|
@@ -570677,7 +570844,8 @@ function FleetView(props) {
|
|
|
570677
570844
|
windowSize: listWindow,
|
|
570678
570845
|
isActive: !detailWorkflowId,
|
|
570679
570846
|
onSelectWorkflow: resolver ? openWorkflow : void 0,
|
|
570680
|
-
suppressEmptyState: true
|
|
570847
|
+
suppressEmptyState: true,
|
|
570848
|
+
onDidEnterView: () => onAction({ type: "done" })
|
|
570681
570849
|
}
|
|
570682
570850
|
)
|
|
570683
570851
|
] }),
|
|
@@ -623770,7 +623938,7 @@ Settings load in order: user \u2192 project \u2192 local (later overrides earlie
|
|
|
623770
623938
|
"allow": ["Bash(npm:*)", "Edit(.claude)", "Read"],
|
|
623771
623939
|
"deny": ["Bash(rm -rf:*)"],
|
|
623772
623940
|
"ask": ["Write(/etc/*)"],
|
|
623773
|
-
"defaultMode": "default" | "plan" | "acceptEdits" | "dontAsk",
|
|
623941
|
+
"defaultMode": "default" | "plan" | "acceptEdits" | "dontAsk" | "auto",
|
|
623774
623942
|
"additionalDirectories": ["/extra/dir"]
|
|
623775
623943
|
}
|
|
623776
623944
|
}
|
|
@@ -630159,7 +630327,10 @@ function toLiveRequest(req, capturedSessionId) {
|
|
|
630159
630327
|
if (typeof out6.scenario === "string" && SEMA_MOCK_SCENARIO_KEYS.has(out6.scenario)) {
|
|
630160
630328
|
delete out6.scenario;
|
|
630161
630329
|
}
|
|
630162
|
-
{
|
|
630330
|
+
if (appendSystemPromptCapable(liveCapsBaseUrl)) {
|
|
630331
|
+
const existing = out6.appendSystemPrompt;
|
|
630332
|
+
out6.appendSystemPrompt = withSelfKnowledgeAppend(existing);
|
|
630333
|
+
} else {
|
|
630163
630334
|
const settings2 = out6.settings ?? {};
|
|
630164
630335
|
out6.settings = { ...settings2, outputStyle: withSelfKnowledgeOutputStyle(settings2.outputStyle) };
|
|
630165
630336
|
}
|
|
@@ -630210,6 +630381,11 @@ function createLiveConversationClient(config4) {
|
|
|
630210
630381
|
principal: config4.principal,
|
|
630211
630382
|
...config4.timeoutMs !== void 0 ? { timeoutMs: config4.timeoutMs } : {}
|
|
630212
630383
|
});
|
|
630384
|
+
liveCapsBaseUrl = config4.baseUrl;
|
|
630385
|
+
kickAppendSystemPromptCapProbe(
|
|
630386
|
+
config4.baseUrl,
|
|
630387
|
+
() => client4.capabilities()
|
|
630388
|
+
);
|
|
630213
630389
|
void prepareTaskAgentsWire({
|
|
630214
630390
|
baseUrl: config4.baseUrl,
|
|
630215
630391
|
// loopback-unauthed = 不传 token(agentsWireCaps 对缺省 token 自然零 Authorization 头)。
|
|
@@ -630400,7 +630576,7 @@ function createLiveConversationClient(config4) {
|
|
|
630400
630576
|
};
|
|
630401
630577
|
return liveClient;
|
|
630402
630578
|
}
|
|
630403
|
-
var ENGINE_TO_CC_TOOL, SEMA_MOCK_SCENARIO_KEYS, liveClient_default;
|
|
630579
|
+
var ENGINE_TO_CC_TOOL, SEMA_MOCK_SCENARIO_KEYS, liveCapsBaseUrl, liveClient_default;
|
|
630404
630580
|
var init_liveClient = __esm({
|
|
630405
630581
|
"build-src/src/sema/liveClient.ts"() {
|
|
630406
630582
|
init_rewindAnchorStore();
|
|
@@ -655669,7 +655845,7 @@ Auth: unix socket -R \u2192 local proxy`, "info");
|
|
|
655669
655845
|
pendingHookMessages
|
|
655670
655846
|
}, renderAndRun);
|
|
655671
655847
|
}
|
|
655672
|
-
}).version("sema 1.0.
|
|
655848
|
+
}).version("sema 1.0.46", "-v, --version", "Output the version number");
|
|
655673
655849
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
655674
655850
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
655675
655851
|
if (canUserConfigureAdvisor()) {
|