@sema-agent/client-core 0.21.0 → 0.22.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/README.md CHANGED
@@ -23,7 +23,7 @@ Renamed from **`@sema-agent/wire-cc-adapter`** (0.1.x, deprecated — see *Migra
23
23
 
24
24
  ## Scope
25
25
 
26
- **Version:** 0.21.0
26
+ **Version:** 0.22.0
27
27
 
28
28
  - **Today** — the adapter seam, the whole `adapt()` pipeline (all 14 A-layer arms plus the
29
29
  B/D/E tool-card layers), the notification/caps/model families, the adapter kernel (stream driver
@@ -88,6 +88,17 @@ export interface TaskRequestInput {
88
88
  interactiveTools?: false;
89
89
  /** rewind 三件(E18);端自己判空。 */
90
90
  rewind?: Record<string, unknown>;
91
+ /** 仓库坐标串(scan/code-review 场景;今日唯一供给方 web 的 Repository 输入=url/`owner/name` 串。
92
+ * server 是权威校验方;若 server 侧扩结构形,这里随提货单扩,不预铸。 */
93
+ repo?: string;
94
+ /** council 形开关(server 读 `=== true`)。 */
95
+ council?: boolean;
96
+ /** debate 变体开关(server 读 `=== true`)。 */
97
+ debate?: boolean;
98
+ /** debate 轮数(server clamp [1,3])。 */
99
+ rounds?: number;
100
+ /** 镜头名集(code-review 场景;web 进阶项发镜头名列表。语义/合法词表归 server 场景定义)。 */
101
+ lenses?: readonly string[];
91
102
  /** `settings` 的四个来源(端各自解析;本模块只负责合并序与「全空则不 stamp」)。 */
92
103
  settings?: {
93
104
  resolved?: Record<string, unknown>;
@@ -24,6 +24,16 @@ export const REQUEST_FIELD_MATRIX = [
24
24
  { field: 'mcpServers', lanes: ['interactive', 'print'], live: true, why: '本地 .mcp.json 投影;service 单用户门决定是否兑现' },
25
25
  { field: 'settings.webSearch', lanes: ['interactive', 'print'], live: true, why: 'SEMA_WEBSEARCH_* / settings.json;per-request 配置赢过部署 env' },
26
26
  { field: 'settings.hooks', lanes: ['interactive', 'print'], live: true, why: '[495]① 用户 settings 文件 hooks 逐字上 wire' },
27
+ // ── repo 场景五键([C135] 请托,2026-08-08):SDK TaskRequest 成文 passthrough 键(types doc
28
+ // 「scenario-specific fields like code-review's repo/council/debate/rounds ride here」),server
29
+ // resolve-spec 顶层直读(council/debate 按 `=== true`,rounds 进 clamp [1,3])。lanes 与
30
+ // scenario 同款(print 有 --scenario/SEMA_HEADLESS_SCENARIO,scan 场景无 repo 即 501/无意义,
31
+ // 值缺席不 stamp,登位为 -p 侧未来入口留座)。今天唯一供给方=web BFF lane 的 repo 字段入口。──
32
+ { field: 'repo', lanes: ['interactive', 'print'], live: true, why: 'scan/code-review 场景的仓库坐标(passthrough;server 是权威校验方,本层不铸第二判官)' },
33
+ { field: 'council', lanes: ['interactive', 'print'], live: true, why: 'code-review council 形开关(server 读 `=== true`;非 true 不 stamp=与缺席同义,发小的那个)' },
34
+ { field: 'debate', lanes: ['interactive', 'print'], live: true, why: 'council 的 debate 变体开关(server 读 `=== true`)' },
35
+ { field: 'rounds', lanes: ['interactive', 'print'], live: true, why: 'debate 轮数(server clamp [1,3],非有限数被 server 归 undefined——本层原样透传不预 clamp)' },
36
+ { field: 'lenses', lanes: ['interactive', 'print'], live: true, why: 'code-review 镜头集(passthrough 同 repo;形状由 server 场景定义,本层不闭集)' },
27
37
  // ── print 独有(§8-5 认定的**有理由**的差异)──────────────────────────────────────────────
28
38
  { field: 'finalVerification', lanes: ['print'], live: true, why: 'P1-1 终验:无人值守车道才需要引擎自证;交互 REPL 由人当场看结果。#106 裁 B(让位+告知)后交互面默认关' },
29
39
  { field: 'limits', lanes: ['print'], live: true, why: 'P2-3-b:`-p` 的预算护栏(--max-* flag 族),交互 REPL 由人随时 Esc' },
@@ -112,6 +122,13 @@ export function buildTaskRequest(input, lane) {
112
122
  ...(on('promptProfile', input.promptProfile) ? { promptProfile: input.promptProfile } : {}),
113
123
  ...(on('enableFork', input.enableFork) ? { enableFork: input.enableFork } : {}),
114
124
  ...(on('attachments', input.attachments) ? { attachments: input.attachments } : {}),
125
+ // repo 场景五键([C135]):值驱动 stamp;council/debate 非 true 不 stamp(与 server `=== true`
126
+ // 读法合拍——false 与缺席在 wire 上同义,发小的那个)。
127
+ ...(on('repo', input.repo) ? { repo: input.repo } : {}),
128
+ ...(on('council', input.council) && input.council === true ? { council: true } : {}),
129
+ ...(on('debate', input.debate) && input.debate === true ? { debate: true } : {}),
130
+ ...(on('rounds', input.rounds) ? { rounds: input.rounds } : {}),
131
+ ...(on('lenses', input.lenses) ? { lenses: input.lenses } : {}),
115
132
  // 空数组按 `images` 同款处理:没带附件与「带了 0 个附件」在 wire 上是同一件事,发小的那个。
116
133
  ...(on('attachmentIds', input.attachmentIds) && (input.attachmentIds?.length ?? 0) > 0
117
134
  ? { attachmentIds: [...(input.attachmentIds ?? [])] }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sema-agent/client-core",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Client-side session runtime shared by every sema human client (TUI / web / desktop): sema wire frames (AgentEvent) -> CC session vocabulary (SDKMessage) with dual-plane output (transcript/chrome), deterministic transcript ids, lane discipline as a type, and the notification/dedup ledgers. Every CC-skin shape is collected here so the wire itself stays neutral. Blackboard [1832] design axioms; [1651]/[1652]/[1653] signed seam design. Renamed from @sema-agent/wire-cc-adapter (0.1.x).",
5
5
  "license": "MIT",
6
6
  "type": "module",