@sema-agent/server 5.1.2 → 5.2.0
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/dist/fleet/fleet-bus.js
CHANGED
|
@@ -668,7 +668,10 @@ export function fleetBackgroundChildPublisher(bus, log) {
|
|
|
668
668
|
// 现状 core 只在 terminal 事件带此键(三发射点亲核)⇒ 本透传对旧 core 惰性;core 停 spawn/tick
|
|
669
669
|
// 源头补上即通,tick 臂(下方 :78x)早已同姿。server 不自行以 sessionId 推导——fork lane 的
|
|
670
670
|
// forkTranscriptId 与 sessionId 的等价关系归 core 所有,不在消费端烙死。
|
|
671
|
-
|
|
671
|
+
// [2400] FLEET-WORKFLOWS-7:[2070]③「名不铸」的第四处——spawn 双缺 description/name 时此前 `?? e.taskId`
|
|
672
|
+
// 拿 a* handle 冒充显示名;tick 臂只在 name 在场才发 + 总线 MERGE ⇒ 假名永久留行。缺席不铸,与其余三处同判。
|
|
673
|
+
const spawnName = e.description ?? e.name;
|
|
674
|
+
bus.publishTask({ id: e.taskId, ...(spawnName !== undefined ? { name: redactSecrets(spawnName) } : {}), ...(e.agentType ? { agentType: redactSecrets(e.agentType) } : {}), ...rowTags(m), status: "running", tokens: 0, ...(e.transcriptId ? { transcriptId: e.transcriptId } : {}) });
|
|
672
675
|
dlog("bg_child_event", { kind: "spawn", taskId: e.taskId, sessionScoped: e.sessionScoped, scope: m.tenantScope, hostSessionId: m.hostSessionId ?? null, parentTaskId: m.parentTaskId ?? null });
|
|
673
676
|
};
|
|
674
677
|
const handleTick = (e, m) => {
|
|
@@ -127,12 +127,13 @@ async function handleCapabilitiesBody(req, res, url, ctx, miss) {
|
|
|
127
127
|
subagentResume: Boolean(deps.subagentSteerRegistry) && Boolean(deps.runStore),
|
|
128
128
|
// TaskRequest.settings (client per-request SemaSettings stamp) → projected into the engine TIGHTEN-ONLY
|
|
129
129
|
// (deny-wins, after the deployment + operator baseline). v1 wires permissions + permissionMode (default/
|
|
130
|
-
// acceptEdits/plan — `bypassPermissions` is NEVER honored from settings) + model + outputStyle.
|
|
131
|
-
//
|
|
132
|
-
//
|
|
130
|
+
// acceptEdits/plan — `bypassPermissions` is NEVER honored from settings) + model + outputStyle.
|
|
131
|
+
// `env`([2400] X-8):与真消费点同谓词——resolve-spec 的 setSessionShellEnv 只在 cwdHonored
|
|
132
|
+
// (单用户 host lane)注入 shell env;其余 lane 收到即警告忽略。此前硬编码 false 是「TaskSpec 无
|
|
133
|
+
// per-task env 注入」时代的陈旧断言(R-survey shellEnv seam 落地后失真=说没有但其实有,活能力被藏)。
|
|
133
134
|
// `hooks`(hook-runner 阶段一):TRUE 当本部署会真跑 hook 命令 = 单用户闸(hook 命令跑在
|
|
134
135
|
// worker host,class ② 能力授予;resolveSpec 的 taskHooks 装配同一谓词)。多租户 = false(收到警告忽略)。
|
|
135
|
-
taskSettings: { permissions: true, permissionMode: true, model: true, outputStyle: true, env:
|
|
136
|
+
taskSettings: { permissions: true, permissionMode: true, model: true, outputStyle: true, env: cwdHonored(deps.config), hooks: deps.config.requirePrincipal !== true },
|
|
136
137
|
// [1476] R1 / [1478] R2: TaskRequest.appendSystemPrompt is accepted top-level → TaskSpec.appendSystemPrompt
|
|
137
138
|
// (first-class lane for the shell's product-knowledge block). A shell probes THIS flag: false/absent ⇒ fall
|
|
138
139
|
// back to the settings.outputStyle ride-along (older servers fold that into the same spec field).
|
|
@@ -159,17 +159,30 @@ export interface TaskRequestBody {
|
|
|
159
159
|
timeoutSec?: number;
|
|
160
160
|
maxOutputTokens?: number;
|
|
161
161
|
maxTurns?: number;
|
|
162
|
+
deadlineNudge?: false;
|
|
163
|
+
callCapByDeadline?: false;
|
|
164
|
+
gracefulFinalize?: false;
|
|
162
165
|
};
|
|
163
166
|
/** design/133 (core 1.251) + G1 (core 1.253): turn-boundary attachment reminders (todo / changed-files /
|
|
164
|
-
* plan-mode) + one-shot boundary notices (post-compaction background-task recap / deferred-tools delta).
|
|
167
|
+
* plan-mode) + one-shot boundary notices (post-compaction background-task recap / deferred-tools delta).
|
|
168
|
+
* [2400] CAPS-OPS-13:本类型经 src/index.ts 导出给 embedder——键集必须与真验收面(spec-fields.ts
|
|
169
|
+
* normalizeAttachments 10 键 / normalizeLimits 6 键)同源;此前少 8 键 ⇒ agentListing:false(唯一能关
|
|
170
|
+
* core 默认开列表注入的通道)与三个 deadline opt-out 在类型面失踪。agentListing/skillsListing 是
|
|
171
|
+
* boolean 透传(core DEFAULT-ON,explicit false 才关);budgetUsd/mcpInstructions 只认 literal true;
|
|
172
|
+
* limits 三个 opt-out 只认 literal false(normalizer 同判)。 */
|
|
165
173
|
attachments?: {
|
|
166
174
|
todoReminder?: boolean;
|
|
175
|
+
todoReminderMode?: "baseline" | "off";
|
|
167
176
|
changedFiles?: boolean | {
|
|
168
177
|
maxFiles?: number;
|
|
169
178
|
};
|
|
170
179
|
planModeReminder?: boolean;
|
|
180
|
+
budgetUsd?: true;
|
|
171
181
|
backgroundTasks?: boolean;
|
|
172
182
|
toolsDelta?: boolean;
|
|
183
|
+
mcpInstructions?: true;
|
|
184
|
+
agentListing?: boolean;
|
|
185
|
+
skillsListing?: boolean;
|
|
173
186
|
};
|
|
174
187
|
/** C1 (core 1.219, subagent viewing pane): opt-in — forward a delegated child's live CONTENT events
|
|
175
188
|
* (text_delta/reasoning_delta/tool_start/tool_end, each stamped `parentToolCallId`) onto this run's stream/durable
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/server",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Sema Server — the server/API implementation layer for Sema, wiring core, registry, model providers, and cloud agent execution. Built on @sema-agent/core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "BUSL-1.1",
|