@epoch-agent/protocol 0.4.0 → 0.6.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/index.d.ts CHANGED
@@ -1020,7 +1020,13 @@ interface AgentRole {
1020
1020
  * 只是不省钱」。
1021
1021
  */
1022
1022
  skills?: string[];
1023
- /** 轮次预算。不给则沿用 `max(4, floor(父 maxTurns / 2))` */
1023
+ /**
1024
+ * 轮次预算。不给则沿用 `config.maxTurns` —— 也就是用户设置里那一个数。
1025
+ *
1026
+ * ⚠️ 2026-09-04 之前这里是 `max(4, floor(父 maxTurns / 2))`(「父的一半」)。
1027
+ * 撤掉那个折半的判据在 `runtime/src/session-factory.ts` 填这一格的地方。
1028
+ * 值域上**没有上限**,正整数就行(`agent-role/loader.ts` 那条 schema)。
1029
+ */
1024
1030
  maxTurns?: number;
1025
1031
  source: AgentRoleSource;
1026
1032
  }
@@ -1295,6 +1301,144 @@ interface BlankCard {
1295
1301
  icon?: string;
1296
1302
  }
1297
1303
 
1304
+ /**
1305
+ * 宿主自定义的那句开场招呼(2026-09-04)—— 新会话空屏最上面那几行字。
1306
+ *
1307
+ * 这是「宿主装配期按下的事实」那条路上的**第四个键**(`brand` → `sidebarMenu`
1308
+ * → `blankCards` → 这一个):只读、界面上没有写端点、`GET /api/config` 原样下发、
1309
+ * 没配就不带这个键。为什么是配置项而不是 `createWebServer()` 的参数,全文在
1310
+ * `EpochConfig.brand` 上(一句话:走 `epoch web --json` 起子进程的宿主没有构造
1311
+ * 函数可传)。
1312
+ *
1313
+ * ## ⚠️ 它和前三个键有一处**本质不同**:这一格本来就是我们的话
1314
+ *
1315
+ * `brand` / `sidebarMenu.label` / `BlankCard.title` 是**凭空多出来**的文案 ——
1316
+ * 我们从来没有一份对应的译文,所以「宿主的话不过 catalog」没有代价。
1317
+ *
1318
+ * 这一格不是。「今天想做点什么?」今天住在 `locales/zh.yaml` 和 `en.yaml` 里,
1319
+ * **跟着界面语言翻**,而且在宿主没配卡片时它是**整屏唯一的一行字**。要是照抄前三个
1320
+ * 键收一个纯字符串,宿主配完之后,把界面切成英文的用户看到的是一句中文 —— 那一
1321
+ * 屏于是从「一句翻好的话」退成「一句没翻的话」,**是这个键把它弄坏的**。
1322
+ *
1323
+ * 所以这一格的每一样文案收的是 {@link HostText}(`{ zh, en }`)而不是 `string`。
1324
+ * 代价如实记着:**单语宿主也得多写一层缩进**。那笔账认了 —— 它换来的是「宿主配了
1325
+ * 之后这一屏仍然会翻」,而这正是上一段说的那件不能弄坏的事。
1326
+ *
1327
+ * ## 三样文案,各自的默认档不一样
1328
+ *
1329
+ * | 字段 | 宿主不给时屏幕上是什么 |
1330
+ * | ---------- | ------------------------------- |
1331
+ * | `eyebrow` | **没有这一行**(今天就没有) |
1332
+ * | `title` | **我们那句**(`web.ui.blank.title`) |
1333
+ * | `subtitle` | **没有这一行**(今天就没有) |
1334
+ *
1335
+ * 也就是说 `{ eyebrow: … }` 单给一格是正当配置,意思是「在**你们那句**招呼上面
1336
+ * 加一行我的眉标」—— 三格互不牵连,不给的那格照它自己的默认档走。
1337
+ *
1338
+ * ⚠️ 这三样正是 2026-08-18 从这一屏上**撤掉过**的东西(眉标「新会话」/ 那句 lede /
1339
+ * 三条种子)。这个键没有推翻那笔账,变的是**谁来出题** —— 判据逐字同
1340
+ * [blank-cards.ts](./blank-cards.ts) 文件头第二节:**我们自己一个字都不加回去**,
1341
+ * 宿主不配的时候这一屏仍然只有那一行招呼,一个像素都没变。
1342
+ * 下一个想「至少给个眉标吧」的人:那就是 08-18 撤掉的那一行,别加回来。
1343
+ *
1344
+ * ## `hidden`:唯一能表达「这一段一个字都不画」的写法
1345
+ *
1346
+ * 前三个键的「不要」都写成**别写这个键**,因为它们的默认档就是「什么都没有」。
1347
+ * 这一格反过来 —— 不写这个键 = 我们那句招呼**照旧在**,于是「我不要这句话」在
1348
+ * 这份配置里本来是**说不出口的**。`hidden: true` 补的正是那一档。
1349
+ *
1350
+ * ⚠️ **不能拿空串表达。** 「空串是配错了」是 `brand` / `sidebarMenu` / `blankCards`
1351
+ * 三处共守的口径(它抓的是「宿主的模板渲染出了个空值」这类事故),在这儿破一次,
1352
+ * 那三处就得各自解释一遍为什么自己不破。
1353
+ *
1354
+ * ⚠️ **`hidden: true` 和文案字段同时给是允许的,`hidden` 赢。** 这一条刻意和
1355
+ * 「空数组是配错了」那类判据分开:那一类拦的是**说不出意思**的状态(typo 的形态),
1356
+ * 而这一个说得出意思 ——「先关掉,文案留着」。宿主拿一个开关控制这一格
1357
+ * (`hidden: !enabled`,底下文案常年放着)是很自然的写法,为它逼宿主把文案删掉,
1358
+ * 换来的只是我们这边少一行注释。
1359
+ *
1360
+ * ⚠️ **`hidden` 只管这一段(三行字),不管卡片。** `hidden: true` + `blankCards`
1361
+ * = 这一屏只有那几张卡;两个都关 = 这一屏**真的一个字都没有**。后面那一档是宿主
1362
+ * 明确按下的,不是「暂无数据」那种没人管的空 —— 文件头那句「空屏是一次邀请」骂的
1363
+ * 是我们自己端上去的空屏,不是宿主决定不邀请。
1364
+ */
1365
+
1366
+ /**
1367
+ * 一样**要跟着界面语言翻**的宿主文案。
1368
+ *
1369
+ * 类型写成 `Partial<Record<Lang, string>>` 而不是 `{ zh?: string; en?: string }`:
1370
+ * 语言的值域真源是 [i18n.ts](./i18n.js) 的 `LANGS`,另写一个字面量等于开第二份 ——
1371
+ * 那正是那个文件头点名要避免的「类型允许但运行时没有 catalog」的反面(这儿是
1372
+ * 「加了语言但这个类型不认」)。手法同 core 那边 `Record<HookType, true>` 那一条。
1373
+ *
1374
+ * ⚠️ **两格都可选,但不许一格都不给**(core 的 schema 拦这一条):一张空表和
1375
+ * 「没配这个字段」在屏幕上是同一件事,而写了个空表的宿主显然不是那个意思。
1376
+ * 每一格的值也不许是空串,判据同 `brand` 那条。
1377
+ *
1378
+ * ⚠️ **不给的那个语言不会让这一行消失** —— 见 {@link resolveHostText} 的回落链。
1379
+ */
1380
+ type HostText = Partial<Record<Lang, string>>;
1381
+ /**
1382
+ * 挑出这一刻该画的那一份。**纯函数,放在 protocol 是因为它有第二个消费方** ——
1383
+ * 自己画前端的宿主(EMBEDDING §10)拿到的是同一份 `{ zh, en }`,回落链该和第一方
1384
+ * Web UI 一模一样,抄一份的下场是两边在「宿主只写了一个语言」那一档上分叉。
1385
+ *
1386
+ * 回落链:**这一刻的语言 → `DEFAULT_LANG` → 表里剩下的任意一份**。
1387
+ *
1388
+ * ⚠️ 第三跳不是凑数的,它是这个函数唯一一处需要解释的地方:一个只写了 `en` 的
1389
+ * 宿主(它的产品就是英文的),在中文界面下如果只回落到 `zh`,屏幕上那一行会**整个
1390
+ * 消失**。而「宿主配了却什么都不显示」是这一整条路上最难查的一种坏法 —— 配置是对
1391
+ * 的、请求是对的、屏幕上什么都没有。宁可给他看一句英文。
1392
+ *
1393
+ * 空串按「没给」算(`?? ` 接不住空串,所以这儿是显式判空):core 那边已经拦掉了
1394
+ * 写死在配置里的空串,但这个函数也服务着自己拼对象的 Node 宿主。
1395
+ */
1396
+ declare function resolveHostText(text: HostText | undefined, lang: Lang): string | undefined;
1397
+ /**
1398
+ * 新会话空屏最上面那一段(眉标 / 招呼 / 副标题)。
1399
+ *
1400
+ * 三样文案**互不牵连**,不给的那一样各走各的默认档(表在文件头)。
1401
+ *
1402
+ * ⚠️ **整段给了却一个键都没有(`{}`)是配错了**,core 的 schema 会为它产出一条
1403
+ * 带字段路径的 warn 诊断然后整份配置退默认值 —— 判据同 `blankCards: []`:
1404
+ * 不想改这一段就别写这个键。
1405
+ */
1406
+ interface BlankGreeting {
1407
+ /**
1408
+ * 招呼上面那一行小字。**不给 = 没有这一行**(今天这一屏就没有)。
1409
+ *
1410
+ * 这一行 2026-08-18 撤掉过一次,撤的时候它写的是「新会话」—— 而那三个字侧栏那
1411
+ * 一行高亮、顶栏那个标题都已经在说,属于**第二遍**。宿主的眉标不是第二遍:
1412
+ * 它印的是自己的产品名或者场景名,屏幕上没有第二处在说。
1413
+ */
1414
+ eyebrow?: HostText;
1415
+ /**
1416
+ * 那句招呼本身。**不给 = 我们那句**(`web.ui.blank.title`,跟着界面语言翻)。
1417
+ *
1418
+ * ⚠️ 这是这个键里唯一一格「不给 ≠ 什么都没有」的字段,别照着另外两格的直觉读。
1419
+ */
1420
+ title?: HostText;
1421
+ /**
1422
+ * 招呼底下那一行说明。**不给 = 没有这一行**。
1423
+ *
1424
+ * ⚠️ 它就是 2026-08-18 撤掉的那句 lede。撤它的账原文是**「它整句都在解释种子
1425
+ * 怎么动(填进输入框不发出去)—— 种子没了就没了宾语」**:那是一条**关于宾语**
1426
+ * 的判据,不是「这一屏不许有第二行字」。宿主手上有宾语(它自己那几张
1427
+ * `blankCards`,或者它自己的产品要说的话),所以这一行对它成立、对我们不成立。
1428
+ */
1429
+ subtitle?: HostText;
1430
+ /**
1431
+ * 这一段**一个字都不画**(连我们那句招呼一起)。缺省 `false`。
1432
+ *
1433
+ * 它是唯一能表达「我不要这句话」的写法 —— 理由、以及「为什么不能拿空串表达」,
1434
+ * 全文在文件头第四节。
1435
+ *
1436
+ * ⚠️ 和三样文案**同时给是允许的,这一个赢**(「先关掉,文案留着」是正当配置)。
1437
+ * ⚠️ 它**不管卡片**:`blankCards` 是另一个键,各关各的。
1438
+ */
1439
+ hidden?: boolean;
1440
+ }
1441
+
1298
1442
  /**
1299
1443
  * 内容合规的**契约值** —— 类别与动作。
1300
1444
  *
@@ -1330,6 +1474,71 @@ type ComplianceCategory = (typeof COMPLIANCE_CATEGORIES)[number];
1330
1474
  declare const COMPLIANCE_ACTIONS: readonly ["block", "mask", "warn", "off"];
1331
1475
  type ComplianceAction = (typeof COMPLIANCE_ACTIONS)[number];
1332
1476
 
1477
+ /**
1478
+ * 侧栏最下面那一行「用户」(2026-09-07)—— 宿主可以换掉的名字和头像。
1479
+ *
1480
+ * 这是「宿主装配期按下的事实」那条路上的**第五个键**(`brand` → `sidebarMenu`
1481
+ * → `blankCards` → `blankGreeting` → 这一个):只读、`GET /api/config` 原样下发、
1482
+ * 界面上没有写端点。为什么是配置项而不是 `createWebServer()` 的装配参数,全文在
1483
+ * [`EpochConfig.brand`](./config.ts) 上(一句话:走 `epoch web --json` 起子进程的
1484
+ * 宿主没有构造函数可传)。
1485
+ *
1486
+ * ## ⚠️ 它和前四个键**默认档不同**:不配也有东西,而且照旧点得开
1487
+ *
1488
+ * 那一行是**设置的唯一入口**(点开是一张菜单,「设置」在最下面 —— 屏幕上那一格在
1489
+ * web 的 `shell/host-menu.tsx` 文件头)。所以「宿主没配」这一档**不能是空白**:
1490
+ *
1491
+ * | 键 | 没配 = 屏幕上 |
1492
+ * | --------------------- | ------------------------------------- |
1493
+ * | `brand` / `sidebarMenu` / `blankCards` | 什么都没有 |
1494
+ * | `blankGreeting` | **我们那句**招呼(跟着界面语言翻) |
1495
+ * | 这一个 | **我们那句**「用户」+ 一枚 `user-round` |
1496
+ *
1497
+ * 也就是说它的形状照 `blankGreeting`(回落到我们自己那份),不是照 `brand`
1498
+ * (不给就不画)。判据是**这一格删不掉** —— 删了设置就没有入口了。
1499
+ *
1500
+ * ## 为什么文案收 `string` 而不是 `{ zh, en }`
1501
+ *
1502
+ * 和 `blankGreeting` 刻意不同,虽然两个键都有「我们那份译文」。差别在于**宿主给的
1503
+ * 那份是什么**:招呼是一句**话**(同一句话有中英两版才说得通),而这一格是一个
1504
+ * **名字**(「张三」/ 公司账号名 / 一个岗位)—— 名字不随界面语言变。
1505
+ * 收 `{ zh, en }` 的话,宿主要么两格填同一个字符串(那就是白填一次),要么被这个
1506
+ * 形状暗示着去给自己的用户名编一个英文版。
1507
+ *
1508
+ * ⚠️ 所以**没配那一档才是有译文的那一档**(`web.ui.sidebar.user`:中文「用户」/
1509
+ * 英文「Account」),宿主一配就整个换成宿主的话、一个字不翻 —— 同 `SidebarMenuItem`
1510
+ * 的 `label`、同启动诊断的 `detail`。
1511
+ */
1512
+ /**
1513
+ * 那一行上的名字和头像。**整个键不配 = 我们那句「用户」+ `user-round`**。
1514
+ *
1515
+ * ⚠️ 两个字段都是**宿主的话/宿主的选择**,`label` 一个字都不过 i18n catalog。
1516
+ */
1517
+ interface HostUser {
1518
+ /**
1519
+ * 屏幕上那几个字。空串是配错了(不想改就别写这个键),core 的 schema 会拦。
1520
+ *
1521
+ * ⚠️ **必填,而不是「可以只配一枚图标」**:这一格的宾语是「谁在用这个 agent」,
1522
+ * 而一个换了头像却还叫「用户」的行没有回答那个问题。只想换图标的宿主照旧要把
1523
+ * 名字写出来 —— 那时它写的是它心里那个词(「账号」/「我」),而那正是这个键
1524
+ * 存在的理由。
1525
+ *
1526
+ * 不设长度上限(判据同 `brand`:为「名字有点长」判一次校验失败,代价是宿主整份
1527
+ * 配置退默认值)。装不下由界面收省略号。
1528
+ */
1529
+ label: string;
1530
+ /**
1531
+ * 行首那枚图标的名字。**不给就落 `user-round`**(那一枚是这一格的兜底,
1532
+ * 不是一个「没有图标」的档)。
1533
+ *
1534
+ * ⚠️ 类型是 `string` 而不是联合,认哪几个名字由第一方 Web UI 说了算(一张
1535
+ * **白名单**,判据在 web 的 `shell/host-menu.tsx` 的 `HOST_ICONS` 上),
1536
+ * **认不出来的当没给** —— 逐字同 [`SidebarMenuItem.icon`](./sidebar-menu.ts):
1537
+ * 图标名是那张界面的私有词表,写进契约等于对宿主承诺那三十几个名字一个都不改。
1538
+ */
1539
+ icon?: string;
1540
+ }
1541
+
1333
1542
  /**
1334
1543
  * 宿主自定义的那几行侧栏菜单(2026-09-02)。
1335
1544
  *
@@ -1448,6 +1657,16 @@ interface SidebarMenuMessage {
1448
1657
  declare const SHELL_KINDS: readonly ["cmd", "powershell", "pwsh"];
1449
1658
  /** Windows shell 选择 */
1450
1659
  type ShellKind = (typeof SHELL_KINDS)[number];
1660
+ /**
1661
+ * 轮次那一格里「不设上限」的表示法(2026-09-06)。
1662
+ *
1663
+ * ⚠️ **这是 infra `UNLIMITED_TURNS` 的第二份**,判据全文在那一份上(为什么是 `0`
1664
+ * 而不是 `undefined`)。各写一份是分层的代价,和上面 {@link SHELL_KINDS} 那条
1665
+ * 逐字相同:`protocol` 和 `infra` 互相 import 不了(两个都是零内部依赖层),
1666
+ * 而这个哨兵要同时被引擎(infra 那侧)和只依赖 protocol 的 Web 认出来。
1667
+ * core 里有一条用例锁着它们相等 —— 一个只改了一头的人会当场变红。
1668
+ */
1669
+ declare const UNLIMITED_TURNS = 0;
1451
1670
  type ProviderType = 'openai' | 'anthropic' | 'google' | 'deepseek' | 'groq' | 'mistral' | 'moonshotai' | 'cohere' | 'xai' | 'perplexity' | 'amazon-bedrock' | 'azure' | 'togetherai' | 'ollama' | 'openai-compatible';
1452
1671
  /** provider 元信息:展示名 + API key 环境变量名 */
1453
1672
  interface ProviderInfo {
@@ -1522,6 +1741,10 @@ interface EpochConfig {
1522
1741
  * infra 是零内部依赖层,import 不了 protocol。core 里有一条用例锁着它们相等。
1523
1742
  */
1524
1743
  shell?: ShellKind;
1744
+ /**
1745
+ * 一条用户消息底下最多几次模型请求。**{@link UNLIMITED_TURNS}(`0`)= 不设上限**,
1746
+ * 也是缺省(2026-09-06)。判据全文在 infra 的 `DEFAULT_MAX_TURNS` 上。
1747
+ */
1525
1748
  maxTurns: number;
1526
1749
  contextLength: number;
1527
1750
  homeDir: string;
@@ -1908,7 +2131,12 @@ interface EpochConfig {
1908
2131
  */
1909
2132
  brand?: string;
1910
2133
  /**
1911
- * 宿主自定义的那几行侧栏菜单(2026-09-02)。**缺省 = 侧栏上一行都不多**。
2134
+ * 宿主自定义的那几行侧栏菜单(2026-09-02)。**缺省 = 那张菜单里只有「设置」一行**。
2135
+ *
2136
+ * ⚠️ **2026-09-07 起它画在侧栏最下面那一行「用户」点开的那张菜单里**,不再是
2137
+ * 贴在「设置」上面的几行常驻按钮 —— 那一格的形态换了,**这个键一个字都没改**
2138
+ * (`id` / `label` / `icon` 三个字段、点下去那条 `postMessage`、顺序原样、
2139
+ * 空数组算配错,全部照旧)。宿主已经接好的那句 `message` 监听不用动。
1912
2140
  *
1913
2141
  * 形状、口径、以及「点下去往父窗口发一条 `postMessage`」那条判据,全文在
1914
2142
  * [sidebar-menu.ts](./sidebar-menu.ts) 的文件头 —— 这儿只记它和 {@link brand}
@@ -1941,6 +2169,38 @@ interface EpochConfig {
1941
2169
  * —— 三条都逐字同 {@link sidebarMenu}。
1942
2170
  */
1943
2171
  blankCards?: readonly BlankCard[];
2172
+ /**
2173
+ * 宿主自定义的那句开场招呼(2026-09-04)。**缺省 = 我们那句**
2174
+ * (`web.ui.blank.title`,跟着界面语言翻)—— 这一格和上面三个键**默认档相反**。
2175
+ *
2176
+ * 形状、三样文案各自的默认档、以及 `hidden` 那一档存在的理由,全文在
2177
+ * [blank-greeting.ts](./blank-greeting.ts) 的文件头 —— 这儿只记它和上面三个键
2178
+ * 的**关系**:同一类东西(宿主装配期按下的事实、只读、`GET /api/config` 原样
2179
+ * 下发、没配就不带这个键),所以并排放在顶层。
2180
+ *
2181
+ * ⚠️ **但它的文案收 `{ zh, en }` 而不是 `string`**,这是四个键里唯一一个 ——
2182
+ * 因为它是四个里唯一一个**本来就有我们的译文**的位置。照抄前三个键收纯字符串的
2183
+ * 话,宿主一配,英文界面上那一屏唯一的一行字就永远是中文。全文在
2184
+ * `blank-greeting.ts` 文件头第二节。
2185
+ *
2186
+ * ⚠️ **空段(`blankGreeting: {}`)是配错了**,同 `blankCards: []`;
2187
+ * 每一样文案的 `{ zh, en }` 也不许一格都不给、不许是空串 —— 判据同 {@link brand}。
2188
+ */
2189
+ blankGreeting?: BlankGreeting;
2190
+ /**
2191
+ * 侧栏最下面那一行「用户」的名字和头像(2026-09-07)。**缺省 = 我们那句「用户」
2192
+ * + 一枚 `user-round`**,那一行**永远在** —— 它是设置的唯一入口。
2193
+ *
2194
+ * 形状、以及「为什么这一格的默认档和上面四个键相反」,全文在
2195
+ * [host-user.ts](./host-user.ts) 的文件头 —— 这儿只记它和它们的**关系**:
2196
+ * 同一类东西(宿主装配期按下的事实、只读、`GET /api/config` 原样下发、
2197
+ * 没配就不带这个键),所以并排放在顶层,不进 `display`(那一段收的是**用户**的
2198
+ * 显示偏好)。
2199
+ *
2200
+ * ⚠️ **不配和配了都不影响那一行画不画**,这是它和 {@link brand} 的硬差别:
2201
+ * `brand` 是「那一格显不显示」的开关,这一个只换里面的字和图标。
2202
+ */
2203
+ user?: HostUser;
1944
2204
  /**
1945
2205
  * `~/.epoch/artifacts/` 的保留策略(方案 47 PR-4)。**缺省 = 内置默认**
1946
2206
  * (7 天 / 512MB)—— 整段不配和显式写这两个默认值,行为逐字节相同。
@@ -2850,6 +3110,26 @@ type FinishReason =
2850
3110
  * 与输出侧被拦下的区别在文本里说清,不在这个枚举里分叉。
2851
3111
  */
2852
3112
  | 'compliance'
3113
+ /**
3114
+ * provider 把这一轮的回复**按 max output tokens 截断了**(2026-09-04)。
3115
+ *
3116
+ * ## 为什么必须和 `'stop'` 分开
3117
+ *
3118
+ * 分不开的时候,「模型自己收的」和「话没说完就被切了」在事后**无法区分** ——
3119
+ * 两者在界面上长得一模一样(都是「这一轮没有工具调用」)。而这是所有
3120
+ * 「模型半路停下」类问题的**第一个分诊问题**:一句
3121
+ * 「我先确认苏菲店的信息,再拉昨日数据。」+ 0 个工具调用,到底是模型宣布了
3122
+ * 下一步就收工(该由 `verify:stop` 那道闸救),还是它正要发工具调用时
3123
+ * 被截断(该调高 max output tokens)—— 处置完全相反。
3124
+ *
3125
+ * 实测过一次:`sessions.db` 里 687 条消息的 `finish_reason` 列**全是 NULL**,
3126
+ * 而 `AgentLoop` 当时只判了 `'content-filter'`,没有任何一处判 `'length'`。
3127
+ * 那一轮到底是哪一种,事后答不出来。
3128
+ *
3129
+ * ⚠️ **这一档不是「出错了」。** 请求成功、已经计费、那半截正文是真的,
3130
+ * 只是它不完整。宿主该说的话是「回复被截断了」而不是「失败了」。
3131
+ */
3132
+ | 'length'
2853
3133
  /** 触达成本或 token 预算上限 */
2854
3134
  | 'budget-exceeded'
2855
3135
  /** 异常终止(详情见前一个 error 事件) */
@@ -3109,8 +3389,12 @@ type AgentEvent =
3109
3389
  /**
3110
3390
  * 一条 `notice` 是哪一类。
3111
3391
  *
3112
- * 今天只有一种,但写成联合是为了让**将来加第二种时消费方的 switch 会红** ——
3392
+ * 写成联合而不是 `string`,是为了让**加一档时消费方的 switch 会红** ——
3113
3393
  * 判据同 wire.ts 的 `WireResetReason`。
3394
+ *
3395
+ * ⚠️ 这里原来写着「今天只有一种」—— 那句话在写下之后就一直在过期
3396
+ * (`images-dropped` / `compliance-masked` / `response-truncated` 陆续进来)。
3397
+ * 有几种去数下面这个联合,别在散文里再抄一个会骗人的数字。
3114
3398
  */
3115
3399
  type NoticeCode =
3116
3400
  /**
@@ -3156,7 +3440,19 @@ type NoticeCode =
3156
3440
  * `finish: 'compliance'` + 一句正文,用户当场知道发生了什么。
3157
3441
  * 这一档请求照发,所以只欠一句旁白。
3158
3442
  */
3159
- | 'compliance-masked';
3443
+ | 'compliance-masked'
3444
+ /**
3445
+ * provider 按 max output tokens **把这一轮的回复切了**(2026-09-04)。
3446
+ *
3447
+ * 和 `FinishReason` 的 `'length'` 是同一件事的两个出口,两个都要:
3448
+ * 收尾原因是给**机器**分支的(headless 的 `result.reason`、落盘的
3449
+ * `finish_reason` 列、web 那枚记号),这一帧是给**人**看的那句话 ——
3450
+ * 屏幕上那半截正文自己不会说「我是半截的」。
3451
+ *
3452
+ * ⚠️ 走 `notice` 而不是 `text-delta`,判据同上面 `skill-learned` 那三条:
3453
+ * 它不是模型说的话,塞进正文就会进历史、进落盘、下一轮再进模型。
3454
+ */
3455
+ | 'response-truncated';
3160
3456
  type AgentEventType = AgentEvent['type'];
3161
3457
  /** 取出某个具体事件的类型,例如 AgentEventOf<'tool-call'> */
3162
3458
  type AgentEventOf<T extends AgentEventType> = Extract<AgentEvent, {
@@ -3802,6 +4098,131 @@ declare function unfixedRules(allowRules: readonly string[], approvals: readonly
3802
4098
  */
3803
4099
  declare function collectPendingApprovals(defs: readonly ScheduleDefinition[], runs: readonly ScheduleRun[]): SchedulePendingItem[];
3804
4100
 
4101
+ /**
4102
+ * 模型在对话里交上来的一份定时任务**草稿**。
4103
+ *
4104
+ * `epoch schedule add` 和自动化面板那张表单是两条**人操作**的写入路。这一份是
4105
+ * 第三条来路,而它**不是写入路** —— 草稿谁都落不了库,它只是一份摆到人眼前的
4106
+ * 提案。真正落库的仍然是那两条:人点「审阅并保存」之后走的是同一个
4107
+ * `POST /api/schedules`,人粘贴命令行走的是同一个 `epoch schedule add`。
4108
+ *
4109
+ * ## ⚠️ 三条硬约束都摊在类型上,不靠注释(照 [schedule-templates.ts](./schedule-templates.js) 那三条办)
4110
+ *
4111
+ * | 要守住的 | 落在类型的哪一格 |
4112
+ * | ------------------------------ | -------------------------------------------------------------------- |
4113
+ * | 模型不许把任务放到「跳过全部检查」 | {@link ScheduleDraftPermission} 的取值里**没有** `bypass` |
4114
+ * | 填进表单后**必须让用户过一遍** | 整份形状里**没有** `maxBudgetUsd`,而它是必填 —— 表单因此保存不了 |
4115
+ * | 草稿不是写入路 | 这里只有数据,没有 id 生成、没有 `enabled`、没有 `createdAt` |
4116
+ *
4117
+ * 第二条是三条里最要紧的,而它和模板那一条**是同一条**:预算必填、没有默认值
4118
+ * (方案 45 §3.5),于是一份草稿填进表单之后那个保存按钮**天然是灰的**,
4119
+ * 用户不看完那一屏就出不去。写成「草稿里预填 0.50 + 一句『请检查』」的话,
4120
+ * 「必须过一遍」就退化成一句没人读的话 —— 而这一格错了的后果很具体:
4121
+ * 一觉醒来 40 美元。
4122
+ *
4123
+ * ## 为什么住在 protocol
4124
+ *
4125
+ * 和 `SCHEDULE_TEMPLATES` 同一个理由,而且更硬一档:这一份的**两端都要读它** ——
4126
+ * core 那侧要解析模型发来的入参(`tools/builtin/schedule-draft.ts`),
4127
+ * `packages/web` 那侧要从那次工具调用的入参里把它读回来渲染成一张卡片
4128
+ * (`thread/rows.ts`,照 `todo` 的先例)。web 只依赖 protocol + view,够不着 core。
4129
+ *
4130
+ * ## ⚠️ 这里一个中文字都没有
4131
+ *
4132
+ * 判据同 schedule-templates.ts 最后一节:措辞在 `locales/*.yaml` 的
4133
+ * `web.ui.thread.draft_*` 底下(卡片)和 core 的工具输出里(给模型看的那半,
4134
+ * 按 `locales/zh.yaml` 的范围说明不进 catalog)。
4135
+ */
4136
+
4137
+ /**
4138
+ * 那个工具的名字。**真源在这儿而不是 core**,因为读它的有两个包:
4139
+ * core 注册工具时用它,web 从工具流里认出那次调用时用它
4140
+ * (`thread/rows.ts`)。
4141
+ *
4142
+ * ⚠️ 这一点上它和隔壁 `TODO_TOOL` 的做法不一样:那个名字今天在
4143
+ * `web/src/thread/rows.ts` 里另写了一份字面量(那时 protocol 里没有落脚点)。
4144
+ * 别照那个抄 —— 两份字面量漂了的表现是「卡片再也不渲染了」,而 typecheck
4145
+ * 一声不响。
4146
+ */
4147
+ declare const SCHEDULE_DRAFT_TOOL = "schedule_draft";
4148
+ /**
4149
+ * 草稿能落在哪几档权限上 —— **`bypass` 不在里面**。
4150
+ *
4151
+ * 不是「运行期会拒绝」,是那一档在类型上根本不存在(判据同
4152
+ * `ScheduleTemplate.permission`)。理由比模板那一侧更直接:`bypass` 要一次
4153
+ * 二次确认(`bypass-not-confirmed`),而那次确认的**对象是人**;让模型提议
4154
+ * 一个「等着人去勾确认框」的档位,等于把那道确认变成一道例行手续。
4155
+ *
4156
+ * 用户自己想要那一档时照旧走表单 —— 那条路一个字都没改。
4157
+ */
4158
+ type ScheduleDraftPermission = Exclude<PermissionLevel, 'bypass'>;
4159
+ /** 草稿里那份清单。三个字段各自**可选**:没提到的一格 = 「这一格我没意见」 */
4160
+ interface ScheduleDraftAllowlist {
4161
+ allowTools?: readonly string[];
4162
+ allowOperations?: readonly OperationType[];
4163
+ allowRules?: readonly string[];
4164
+ }
4165
+ /** 起草一条新任务 */
4166
+ interface ScheduleDraftCreate extends ScheduleDraftAllowlist {
4167
+ action: 'create';
4168
+ name: string;
4169
+ prompt: string;
4170
+ trigger: ScheduleTrigger;
4171
+ /** 工作目录。不给就是引擎那份缺省(`~/.epoch/automation/<id>/`) */
4172
+ workDir?: string;
4173
+ permission: ScheduleDraftPermission;
4174
+ /**
4175
+ * 为什么建议这一条,一句话。**给人看的**,会印在卡片上。
4176
+ *
4177
+ * 必填,而这是刻意的:一条凭空出现在对话里的定时任务,用户第一个问题
4178
+ * 一定是「你为什么觉得我需要它」。答不上来的提案不该提。
4179
+ */
4180
+ note: string;
4181
+ }
4182
+ /**
4183
+ * 提议改一条**已有**的任务。
4184
+ *
4185
+ * 每一格都可选(`undefined` = 这一格不动),但至少要动一格 —— 一份什么都不改的
4186
+ * 提案是在浪费用户的一次点击。这条判定在 core 那侧
4187
+ * (`schedule/draft.ts` 的 `draft-update-empty`)。
4188
+ *
4189
+ * ## ⚠️ 「放宽」和别的改动在类型上长得一样,所以判定必须在别处
4190
+ *
4191
+ * 把超时从 10 分钟调到 30 分钟,和往清单里加一条 `terminal(rm:*)`,在这个形状里
4192
+ * 是同一种东西:几个可选字段。而后者是**提权**。所以两个宿主都必须自己把
4193
+ * 「这次提案放宽了什么」单独标出来(web 的卡片、core 的工具输出),
4194
+ * 不许把它混在一列改动里 —— 用户扫一眼就点保存的那一下,正是这条要防的。
4195
+ */
4196
+ interface ScheduleDraftUpdate extends ScheduleDraftAllowlist {
4197
+ action: 'update';
4198
+ /** 改哪一条。模型得先用 `action: 'list'` 看见 id,界面上那串它猜不出来 */
4199
+ id: string;
4200
+ name?: string;
4201
+ prompt?: string;
4202
+ trigger?: ScheduleTrigger;
4203
+ workDir?: string;
4204
+ permission?: ScheduleDraftPermission;
4205
+ enabled?: boolean;
4206
+ maxTurns?: number;
4207
+ timeoutMs?: number;
4208
+ /** 同 {@link ScheduleDraftCreate.note},必填 */
4209
+ note: string;
4210
+ }
4211
+ type ScheduleDraft = ScheduleDraftCreate | ScheduleDraftUpdate;
4212
+ /**
4213
+ * 一次提案里「放宽了什么」的分类。
4214
+ *
4215
+ * 只有三类,而三类都是**授权面变大**的方向:档位往松走、清单多了条目、
4216
+ * 从停用变成启用。别往里加「超时变长」这种 —— 它花的是钱和时间,不是权限,
4217
+ * 而把两种东西混进同一枚警示标,那枚标就不再有信息量。
4218
+ *
4219
+ * 判定在 core(`schedule/draft.ts` 的 `draftWidening`),渲染在 web
4220
+ * (`thread/schedule-draft.tsx`)—— 两侧各算一遍是刻意的,判据同
4221
+ * `web/src/thread/rows.ts` 文件头那条:web 读的是**模型发出的原始入参**,
4222
+ * 而不是 core 归一化之后的结论。
4223
+ */
4224
+ type ScheduleWideningKind = 'permission' | 'allowlist' | 'enabled';
4225
+
3805
4226
  /**
3806
4227
  * 工作区信任契约。
3807
4228
  *
@@ -5300,8 +5721,12 @@ interface HeadlessResult {
5300
5721
  /**
5301
5722
  * 收尾原因。
5302
5723
  *
5303
- * 前七个逐字沿用 `FinishReason`(引擎的收尾原因就是这一份,不另做映射),
5724
+ * `FinishReason` 那一整份逐字沿用(引擎的收尾原因就是这一份,不另做映射),
5304
5725
  * 后两个是 headless 这一层才有的:
5726
+ *
5727
+ * ⚠️ 这里原来写着「前七个」,而 `FinishReason` 早就不是七档了
5728
+ * (`compliance` / `length` 陆续进来)—— 数字写在散文里就会变成假话,
5729
+ * 而**能编译过的是那个联合**。要数就去数它。
5305
5730
  */
5306
5731
  type HeadlessResultReason = FinishReason
5307
5732
  /**
@@ -5941,6 +6366,10 @@ interface WireConfigResponse {
5941
6366
  /**
5942
6367
  * 宿主自定义的那几行侧栏菜单 —— **宿主没配就没有这个键**(2026-09-02)。
5943
6368
  *
6369
+ * ⚠️ **2026-09-07 起第一方 Web UI 把它画在「用户」那张菜单里**(原来是贴在
6370
+ * 「设置」上面的几行常驻按钮)。**网线上这一格一个字都没改** —— 那是那张界面
6371
+ * 自己的排版决定,而这条端点也服务着自己画前端的宿主(EMBEDDING §10)。
6372
+ *
5944
6373
  * 和 {@link brand} 同一个形状、同一个理由,连搭在这条端点上的理由都一样:
5945
6374
  * 侧栏首屏就要画它,为一份可选的静态清单另开一个端点等于让每个客户端多一次往返。
5946
6375
  * 它**只读** —— 那是宿主装配期的事,界面上没有、也不会有改它的入口。
@@ -5970,6 +6399,38 @@ interface WireConfigResponse {
5970
6399
  * 自己画前端的宿主(EMBEDDING §10)。
5971
6400
  */
5972
6401
  blankCards?: readonly BlankCard[];
6402
+ /**
6403
+ * 宿主自定义的那句开场招呼 —— **宿主没配就没有这个键**(2026-09-04)。
6404
+ *
6405
+ * 来源是 `EpochConfig.blankGreeting`;三样文案各自的默认档、以及 `hidden` 那一档,
6406
+ * 全文在 [blank-greeting.ts](./blank-greeting.js) 的文件头。
6407
+ *
6408
+ * ⚠️ **原样转发,服务端一个字都不改 —— 包括「按语言挑那一份」这件事也不在这儿做。**
6409
+ * 这一条值得单独写下来,因为它看上去正是这条端点该干的事(`?lang=` 就在手上):
6410
+ *
6411
+ * | 在服务端挑 | 原样下发(**选它**) |
6412
+ * | -------------------------------------------- | ----------------------------------------- |
6413
+ * | 切语言要等 `/api/config` 重拉完那一行才变 | 语言是 React 树上的值,**当场变** |
6414
+ * | 那一发拉失败,招呼话就卡在旧语言 | 拉不拉得动都不影响它 |
6415
+ * | 自己画前端的宿主(§10)拿不到另一份 | 两份都在它手上,它自己怎么挑是它的事 |
6416
+ *
6417
+ * 顺带守住这条端点上那句话:**`diagnostics` 仍然是唯一跟着请求语言走的东西**
6418
+ * (见本文件 `diagnostics` 那一格)—— 那一格没得选,它是服务端生成的字符串。
6419
+ */
6420
+ blankGreeting?: BlankGreeting;
6421
+ /**
6422
+ * 侧栏最下面那一行「用户」的名字和头像 —— **宿主没配就没有这个键**(2026-09-07)。
6423
+ *
6424
+ * 来源是 `EpochConfig.user`;两个字段的含义、以及「为什么这一格没配也照旧画那一行」
6425
+ * 全文在 [host-user.ts](./host-user.js) 的文件头。
6426
+ *
6427
+ * ⚠️ **原样转发,服务端一个字都不改**,判据逐字同上面那个 `sidebarMenu`:
6428
+ * `label` 不翻译(它是宿主的话),`icon` 认不认得出来也不在这一层判。
6429
+ *
6430
+ * ⚠️ **「没这个键」在这一格上的意思和别处不同**:不是「屏幕上什么都没有」,
6431
+ * 而是「那一行用我们自己那份文案和图标」—— 客户端那侧是一次回落,不是一道开关。
6432
+ */
6433
+ user?: HostUser;
5973
6434
  /**
5974
6435
  * 自动压缩那条线(决定 8 的第三个时刻,2026-08-16)。形状与三条判据见
5975
6436
  * {@link WireCompressionLine}。
@@ -7959,7 +8420,14 @@ interface WireAgentRoleSummary {
7959
8420
  * `web.ui.cap.role_add_skills_hint`:**只管索引里列不列得出**。
7960
8421
  */
7961
8422
  skills: readonly string[] | null;
7962
- /** 轮次上限。`null` = 跟全局(`max(4, floor(父 maxTurns / 2))`) */
8423
+ /**
8424
+ * 轮次上限。**三档,别读成两档**:`null` = 这个角色没声明、跟全局走
8425
+ * (`config.maxTurns`,2026-09-04 前是它的一半);`0` = 它声明了不限
8426
+ * (`UNLIMITED_TURNS`);其余是个数。
8427
+ *
8428
+ * 中间那一档 2026-09-06 才出现,所以画它的地方要单独一句「不限」——
8429
+ * 一个 `轮次上限: 0` 读出来是「一轮都不许跑」,正好是反面。
8430
+ */
7963
8431
  maxTurns: number | null;
7964
8432
  /**
7965
8433
  * 同名覆盖被收窄时**掉了哪几个工具**。没收窄就是空数组。
@@ -8634,7 +9102,13 @@ interface WireRoleAddRequest {
8634
9102
  * 技能名,他该怎么办。
8635
9103
  */
8636
9104
  skills?: readonly string[];
8637
- /** 轮次上限。不给 = 跟全局。范围由 `FrontmatterSchema` 说了算(1–200 的整数) */
9105
+ /**
9106
+ * 轮次上限。**不给 = 跟全局,`0` = 不限**(两者不同义,见 `WireAgentRoleSummary`
9107
+ * 那一格)。范围由 `FrontmatterSchema` 说了算:0 或正整数,两头都没有拦网。
9108
+ *
9109
+ * ⚠️ 这一行 2026-09-06 之前写的是「1–200 的整数」,那两个数**都已经不在了** ——
9110
+ * 上限 2026-09-04 撤,下限 2026-09-06 撤。
9111
+ */
8638
9112
  maxTurns?: number;
8639
9113
  }
8640
9114
  declare const WIRE_ROLE_ADD_FIELDS: WireFields<WireRoleAddRequest>;
@@ -12259,4 +12733,4 @@ declare const SECRET_SERVICE = "epoch-agent";
12259
12733
  */
12260
12734
  declare const MCP_DATA_KEY_NAME = "mcp-auth-data-key";
12261
12735
 
12262
- export { ACTION_CONTEXTS, AGENT_ROLE_NAME_PATTERN, API_KEY_ENV_VARS, APPROVAL_OUTCOMES, type ActiveAgentRole, type AgentEvent, type AgentEventOf, type AgentEventType, type AgentRole, type AgentRoleScope, type AgentRoleSource, type ApprovalAnswer, type ApprovalOutcome, type ApprovalReply, type ApprovalRequest, type ArtifactKind, type AttributeValue, type Attributes, type BackgroundTaskInfo, type BackgroundTaskKind, type BackgroundTaskStatus, type BlankCard, type BoundKey, type BudgetBreach, COMMAND_NAME_PATTERN, COMPLIANCE_ACTIONS, COMPLIANCE_CATEGORIES, type Catalogs, type ComplianceAction, type ComplianceCategory, type ContextBreakdown, type ContextSegment, type CustomCommandDef, type CustomCommandSource, DEFAULT_AGENT_ROLE, DEFAULT_LANG, type DecidedTrustLevel, type Diagnostic, DiagnosticSink, type DiagnosticStatus, type EpochConfig, type EpochContentPart, type EpochFilePart, type EpochHook, type EpochImagePart, type EpochMessage, type EpochMessageRole, type EpochPlugin, type EpochSessionPart, type EpochSkill, type EpochTextPart, type EpochTool, type EpochToolCall, type EpochToolResult, type EpochTurnFacts, type EpochUserContent, type ExpandedCommand, type FileOmitReason, type FinishReason, type FixableApproval, type FlatCatalog, GEN_AI, HEADLESS_INPUT_EVENT_TYPES, HEADLESS_INPUT_FORMATS, HEADLESS_OUTPUT_FORMATS, HEADLESS_PROTOCOL_VERSION, type HeadlessEnvelope, type HeadlessEvent, type HeadlessInit, type HeadlessInputEvent, type HeadlessInputEventType, type HeadlessInputFormat, type HeadlessLifecycleEvent, type HeadlessOutputFormat, type HeadlessResult, type HeadlessResultReason, type HookContext, type HookEvent, type HookHandler, type HookManager, type HookRegistration, type HookType, type JsonSchema, KEY_ACTIONS, type KeyAction, type KeyChord, type KeyContext, type KeySequence, type KeybindingReport, type KeybindingSource, type KeybindingTable, LANGS, type Lang, type LocalizedDetail, type LogFn, MAX_ATTACH_BYTES, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_HEADER_CHARS, MAX_OPTIONS, MAX_QUESTIONS, MAX_SESSION_ATTACH_BYTES, MAX_SESSION_REFS, MCP_DATA_KEY_NAME, METRIC, MIN_OPTIONS, type MentionSet, type ModelRef, type ModelSelection, type ModelSelectionOrigin, NOOP_TELEMETRY, type NoticeCode, OPERATION_TYPES, type Operation, type OperationType, PERMISSION_LEVELS, PLAN_OUTCOMES, PROVIDER_INFOS, PROVIDER_TYPES, type PermissionDecision, type PermissionLevel, type PermissionManager, type PermissionRuleLists, type PlanApprovalOutcome, type PlanProposal, type PluginContext, type ProviderInfo, type ProviderType, type QuestionAnswer, type QuestionItem, type QuestionOption, type QuestionRequest, RESERVED_CHORDS, RESERVED_COMMAND_NAMES, type RejectReason, type RejectedKey, type RuleValue, SCHEDULE_INTERVAL_MINUTES, SCHEDULE_RUN_STATUSES, SCHEDULE_TEMPLATES, SEARCH_API_KEY_ENV, SEARCH_PROVIDER_TYPES, SECRET_SERVICE, SEQUENCE_CONTEXTS, SESSION_MENTION_PREFIX, SESSION_REFERENCE_ERROR_CODES, SHELL_KINDS, SIDEBAR_MENU_MESSAGE_TYPE, SIMULTANEOUS_CONTEXTS, SYSTEM_NOTE_PREFIX, type ScheduleAllowlist, type ScheduleBackendKind, type ScheduleCycle, type ScheduleDefinition, type SchedulePendingApproval, type SchedulePendingItem, type ScheduleRun, type ScheduleRunStatus, type ScheduleRunnerSpec, type ScheduleTemplate, type ScheduleTemplateId, type ScheduleTrigger, type ScheduleTriggerKind, type ScheduleWeekday, type SearchProviderType, type SecretBackendId, type SecretStore, type SelectionContext, type SelectionRejection, type SelectionWarning, type SessionAttachKind, type SessionAttachResult, type SessionOmitReason, type SessionSurfaceMessage, type SessionSurfaceView, type SetSelectionResult, type ShellKind, type SidebarMenuItem, type SidebarMenuMessage, type SpanLike, type SubToolCall, type SubToolCallResult, type Telemetry, type TokenUsage, type ToolAnnotations, type ToolArtifact, type ToolArtifactInput, type ToolContext, type ToolDefinition, ToolExposure, type ToolProvider, type ToolResult, type Translate, type TranslateVars, type TrustLevel, type TrustManager, type TrustRecord, type TrustScope, type VerifyResult, WIRE_ABORT_FIELDS, WIRE_ABOUT_FIELDS, WIRE_AGENT_ROLE_FIELDS, WIRE_APPROVAL_CACHE_REVOKE_REQUEST_FIELDS, WIRE_APPROVAL_CACHE_REVOKE_RESPONSE_FIELDS, WIRE_APPROVAL_LIST_FIELDS, WIRE_APPROVAL_ROW_FIELDS, WIRE_ARTIFACTS_FIELDS, WIRE_AUDIT_LOG_FIELDS, WIRE_AUDIT_ROW_FIELDS, WIRE_AUTH_COOKIE, WIRE_AUTH_COOKIE_ATTRS, WIRE_AUTH_TOKEN_PARAM, WIRE_BACKGROUND_TASK_FIELDS, WIRE_BLOCKED_GOALS_FIELDS, WIRE_BLOCKED_GOAL_FIELDS, WIRE_BLOCKED_LEVEL_FIELDS, WIRE_BUILTIN_CONNECTOR_FIELDS, WIRE_CACHED_APPROVAL_FIELDS, WIRE_CAPABILITIES_FIELDS, WIRE_CAPABILITY_PROJECT_FIELDS, WIRE_CHECKPOINT_LIST_FIELDS, WIRE_CHECKPOINT_SUMMARY_FIELDS, WIRE_COMMANDS_FIELDS, WIRE_COMMAND_EXPANSION_FIELDS, WIRE_COMPACT_FIELDS, WIRE_COMPRESSION_LINE_FIELDS, WIRE_CONFIG_FIELDS, WIRE_CONTEXT_FIELDS, WIRE_CREATE_SESSION_FIELDS, WIRE_CREATE_WORKSPACE_FIELDS, WIRE_CREATE_WORKSPACE_RESPONSE_FIELDS, WIRE_CUSTOM_COMMAND_FIELDS, WIRE_DELETE_SESSION_FIELDS, WIRE_DIFF_FILE_FIELDS, WIRE_ERROR_FIELDS, WIRE_FILE_CANDIDATES_FIELDS, WIRE_FILE_CANDIDATE_FIELDS, WIRE_FILE_CHANGE_FIELDS, WIRE_FILE_OPEN_RESPONSE_FIELDS, WIRE_FILE_REFERENCE_FIELDS, WIRE_FILE_STAT_MAX, WIRE_FILE_STAT_OK_FIELDS, WIRE_FILE_STAT_REFUSED_FIELDS, WIRE_FILE_STAT_RESPONSE_FIELDS, WIRE_FILE_TEXT_RESPONSE_FIELDS, WIRE_GOAL_ACTIONS, WIRE_GOAL_BLOCK_FIELDS, WIRE_GOAL_CLEAR_FIELDS, WIRE_GOAL_CREATE_FIELDS, WIRE_GOAL_FIELDS, WIRE_GOAL_LIMITS_FIELDS, WIRE_GOAL_PHASES, WIRE_GOAL_REFUSALS, WIRE_GOAL_RESPONSE_FIELDS, WIRE_GOAL_WRITE_FIELDS, WIRE_HEALTH_FIELDS, WIRE_IMAGE_REFERENCE_FIELDS, WIRE_KNOWN_WORKSPACE_FIELDS, WIRE_LANG_PARAM, WIRE_MANAGED_LOCK_FIELDS, WIRE_MCP_ADD_FIELDS, WIRE_MCP_ADD_RESPONSE_FIELDS, WIRE_MCP_APPLY_ENTRY_FIELDS, WIRE_MCP_APPLY_RESPONSE_FIELDS, WIRE_MCP_CONFIG_APPLY_FIELDS, WIRE_MCP_CONFIG_FIELDS, WIRE_MCP_CONFIG_ISSUE_FIELDS, WIRE_MCP_CONFIG_SAVE_FIELDS, WIRE_MCP_CONFIG_SAVE_RESPONSE_FIELDS, WIRE_MCP_CONNECTOR_FIELDS, WIRE_MCP_RECONNECT_FIELDS, WIRE_MESSAGE_LIST_FIELDS, WIRE_MODEL_FIELDS, WIRE_MODEL_SELECTION_FIELDS, WIRE_MODEL_SET_FIELDS, WIRE_MODEL_SUGGESTIONS_FIELDS, WIRE_PATCH_SESSION_FIELDS, WIRE_PATCH_SESSION_RESPONSE_FIELDS, WIRE_PERMISSION_RULE_FIELDS, WIRE_PERMISSION_SET_REQUEST_FIELDS, WIRE_PERMISSION_SET_RESPONSE_FIELDS, WIRE_PERMISSION_SHADOW_FIELDS, WIRE_PERMISSION_STATE_FIELDS, WIRE_PERMISSION_STATUS_FIELDS, WIRE_PLAN_ACTIONS, WIRE_PLAN_FIELDS, WIRE_PLAN_MODE_REQUEST_FIELDS, WIRE_PLAN_MODE_RESPONSE_FIELDS, WIRE_PLAN_MODE_STATE_FIELDS, WIRE_PLUGINS_FIELDS, WIRE_PLUGIN_ACTION_FIELDS, WIRE_PLUGIN_INSTALL_FIELDS, WIRE_PLUGIN_LOCAL_FIELDS, WIRE_PLUGIN_LOCAL_INSTALL_FIELDS, WIRE_PLUGIN_MARKETPLACE_FIELDS, WIRE_PLUGIN_MARKETPLACE_RESPONSE_FIELDS, WIRE_PLUGIN_NAME_FIELDS, WIRE_PLUGIN_PREVIEW_FIELDS, WIRE_PLUGIN_PREVIEW_RESPONSE_FIELDS, WIRE_PLUGIN_UPDATE_FIELDS, WIRE_POLICY_DIR_FIELDS, WIRE_POLICY_STATUS_FIELDS, WIRE_PROVIDERS_FIELDS, WIRE_PROVIDER_KEY_FIELDS, WIRE_PROVIDER_MODELS_FIELDS, WIRE_PROVIDER_OPTION_FIELDS, WIRE_QUESTION_LIST_FIELDS, WIRE_QUESTION_ROW_FIELDS, WIRE_RESPOND_APPROVAL_FIELDS, WIRE_RESPOND_APPROVAL_RESPONSE_FIELDS, WIRE_RESPOND_QUESTION_FIELDS, WIRE_RESPOND_QUESTION_RESPONSE_FIELDS, WIRE_REWIND_FILE_PLAN_FIELDS, WIRE_REWIND_OUTCOME_FIELDS, WIRE_REWIND_PREVIEW_FIELDS, WIRE_REWIND_REQUEST_FIELDS, WIRE_REWIND_RESPONSE_FIELDS, WIRE_REWIND_SCOPES, WIRE_ROLE_ADD_FIELDS, WIRE_ROLE_ADD_RESPONSE_FIELDS, WIRE_SANDBOX_STATUS_FIELDS, WIRE_SCHEDULE_CAPABILITY_FIELDS, WIRE_SCHEDULE_CREATE_FIELDS, WIRE_SCHEDULE_DEFAULTS_FIELDS, WIRE_SCHEDULE_DELETE_FIELDS, WIRE_SCHEDULE_FIELDS, WIRE_SCHEDULE_FIX_FIELDS, WIRE_SCHEDULE_FIX_REQUEST_FIELDS, WIRE_SCHEDULE_ISSUE_CODES, WIRE_SCHEDULE_LIST_FIELDS, WIRE_SCHEDULE_PENDING_FIELDS, WIRE_SCHEDULE_RECORDING_FIELDS, WIRE_SCHEDULE_ROW_FIELDS, WIRE_SCHEDULE_RUNS_FIELDS, WIRE_SCHEDULE_RUN_FIELDS, WIRE_SCHEDULE_SAVE_FIELDS, WIRE_SECURITY_FIELDS, WIRE_SECURITY_WORKSPACE_FIELDS, WIRE_SEND_MESSAGE_FIELDS, WIRE_SEND_MESSAGE_RESPONSE_FIELDS, WIRE_SESSION_CANDIDATES_FIELDS, WIRE_SESSION_CANDIDATE_FIELDS, WIRE_SESSION_FINISH_FIELDS, WIRE_SESSION_LIST_FIELDS, WIRE_SESSION_REFERENCE_FIELDS, WIRE_SESSION_RESPONSE_FIELDS, WIRE_SESSION_SUMMARY_FIELDS, WIRE_SESSION_WORKSPACE_FIELDS, WIRE_SESSION_WORKSPACE_RESPONSE_FIELDS, WIRE_SETTINGS_FIELDS, WIRE_SETTINGS_WRITE_FIELDS, WIRE_SETTINGS_WRITE_REQUEST_FIELDS, WIRE_SETTING_ROW_FIELDS, WIRE_SETTING_STEP_FIELDS, WIRE_SETTING_WRITE_FIELDS, WIRE_SETTING_WRITE_LAYERS, WIRE_SKILL_BODY_FIELDS, WIRE_SKILL_FIELDS, WIRE_SKILL_IMPORT_FIELDS, WIRE_SKILL_IMPORT_PREVIEW_FIELDS, WIRE_SKILL_REMOVE_FIELDS, WIRE_TASKS_FIELDS, WIRE_TOOLS_FIELDS, WIRE_TOOL_GATE_FIELDS, WIRE_TOOL_ROW_FIELDS, WIRE_WORKSPACE_DIFF_FIELDS, WIRE_WORKSPACE_DIRS_FIELDS, WIRE_WORKSPACE_DIR_ENTRY_FIELDS, WIRE_WORKSPACE_REF_FIELDS, type WireAbortResponse, type WireAbout, type WireAgentEnvelope, type WireAgentEvent, type WireAgentRoleSummary, type WireApprovalCacheRevokeRequest, type WireApprovalCacheRevokeResponse, type WireApprovalListResponse, type WireApprovalRequest, type WireArtifactsResponse, type WireAuditCode, type WireAuditLog, type WireAuditOutcome, type WireAuditRow, type WireAuthDenyReason, type WireAuthDenyStatus, type WireAuthGuard, type WireAuthRequestView, type WireAuthVerdict, type WireBackgroundTask, type WireBindWorkspaceRequest, type WireBlockedGoal, type WireBlockedGoalsResponse, type WireBlockedLevel, type WireBuiltinConnector, type WireCachedApproval, type WireCachedDecision, type WireCapabilitiesResponse, type WireCapabilityProject, type WireCheckpointListResponse, type WireCheckpointSummary, type WireCommandExpansion, type WireCommandsResponse, type WireCompactRequest, type WireCompactResponse, type WireCompressionLine, type WireConfigResponse, type WireContextResponse, type WireCreateSessionRequest, type WireCreateSessionResponse, type WireCreateWorkspaceRequest, type WireCreateWorkspaceResponse, type WireCustomCommand, type WireDeleteSessionResponse, type WireDiffFile, type WireDiffNote, type WireDiffOmitReason, type WireDiffSource, type WireDiffStatus, type WireEnvelope, type WireErrorResponse, type WireEvent, type WireFields, type WireFileCandidate, type WireFileCandidatesResponse, type WireFileChange, type WireFileKind, type WireFileOpenRefusal, type WireFileOpenResponse, type WireFileReference, type WireFileRefusal, type WireFileStat, type WireFileStatOk, type WireFileStatRefused, type WireFileStatResponse, type WireFileTextResponse, type WireFixture, type WireFixtureCase, type WireGoal, type WireGoalBlock, type WireGoalClearResponse, type WireGoalCreateRequest, type WireGoalLimits, type WireGoalPhase, type WireGoalRefusal, type WireGoalResponse, type WireGoalUpdateRequest, type WireGoalWriteResponse, type WireHealthResponse, type WireHubEnvelope, type WireHubEvent, type WireImageReference, type WireKnownWorkspace, type WireManagedLock, type WireMcpAddRequest, type WireMcpAddResponse, type WireMcpApplyAction, type WireMcpApplyEntry, type WireMcpApplyResponse, type WireMcpConfigApplyRequest, type WireMcpConfigIssue, type WireMcpConfigResponse, type WireMcpConfigSaveRequest, type WireMcpConfigSaveResponse, type WireMcpConnector, type WireMcpReconnectResponse, type WireMessageListResponse, type WireModelCaveat, type WireModelProbeStatus, type WireModelRejection, type WireModelResponse, type WireModelSelection, type WireModelSetRequest, type WireModelSetResponse, type WireModelSource, type WireModelSuggestions, type WirePatchSessionRequest, type WirePatchSessionResponse, type WirePermissionRememberFailure, type WirePermissionRuleRow, type WirePermissionSetRequest, type WirePermissionSetResponse, type WirePermissionShadow, type WirePermissionState, type WirePermissionStatus, type WirePickDirectoryResponse, type WirePlanAction, type WirePlanModeRequest, type WirePlanModeResponse, type WirePlanModeState, type WirePlanResponse, type WirePluginActionResponse, type WirePluginCounts, type WirePluginEntry, type WirePluginHit, type WirePluginHookTally, type WirePluginInstallRequest, type WirePluginLocalInstallRequest, type WirePluginLocalRequest, type WirePluginMarketplace, type WirePluginMarketplaceRequest, type WirePluginMarketplaceResponse, type WirePluginNameRequest, type WirePluginPreview, type WirePluginPreviewRequest, type WirePluginPreviewResponse, type WirePluginRefuseReason, type WirePluginSourceType, type WirePluginUpdateRequest, type WirePluginsResponse, type WirePolicyDir, type WirePolicyStatus, type WireProviderKeyRequest, type WireProviderKeyResponse, type WireProviderModelsRequest, type WireProviderModelsResponse, type WireProviderOption, type WireProviderSummary, type WireProvidersResponse, type WireQuestionListResponse, type WireQuestionRequest, type WireReplayMessage, type WireResetReason, type WireRespondApprovalRequest, type WireRespondApprovalResponse, type WireRespondQuestionRequest, type WireRespondQuestionResponse, type WireRewindAction, type WireRewindDrift, type WireRewindFilePlan, type WireRewindOutcome, type WireRewindPreview, type WireRewindRequest, type WireRewindResponse, type WireRewindScope, type WireRoleAddRequest, type WireRoleAddResponse, type WireSandboxReason, type WireSandboxStatus, type WireScheduleCapability, type WireScheduleCreateRequest, type WireScheduleDefaults, type WireScheduleDeleteResponse, type WireScheduleFixRequest, type WireScheduleFixResponse, type WireScheduleIssue, type WireScheduleIssueCode, type WireScheduleListResponse, type WireSchedulePendingResponse, type WireScheduleRecordingResponse, type WireScheduleRegisterRefusal, type WireScheduleRegisterWarning, type WireScheduleRegistration, type WireScheduleResponse, type WireScheduleRow, type WireScheduleRunResponse, type WireScheduleRunsResponse, type WireScheduleSaveResponse, type WireScheduleUpdateRequest, type WireSecurityResponse, type WireSecurityWorkspace, type WireSendMessageRequest, type WireSendMessageResponse, type WireSessionCandidate, type WireSessionCandidatesResponse, type WireSessionFinish, type WireSessionListResponse, type WireSessionReference, type WireSessionResponse, type WireSessionSummary, type WireSessionWorkspace, type WireSessionWorkspaceResponse, type WireSettingApply, type WireSettingFutile, type WireSettingLayer, type WireSettingRow, type WireSettingStep, type WireSettingValue, type WireSettingValueKind, type WireSettingWrite, type WireSettingWriteLayer, type WireSettingsResponse, type WireSettingsWriteRequest, type WireSettingsWriteResponse, type WireSkillBodyResponse, type WireSkillImportConflict, type WireSkillImportEntry, type WireSkillImportFailure, type WireSkillImportForm, type WireSkillImportIssue, type WireSkillImportPreviewResponse, type WireSkillImportResponse, type WireSkillRemoveFailure, type WireSkillRemoveResponse, type WireSkillSummary, type WireSummaryWorkspace, type WireTaggedEvent, type WireTasksResponse, type WireToolGate, type WireToolGateAxis, type WireToolRow, type WireToolSummary, type WireToolVerdict, type WireToolsResponse, type WireTurnState, type WireWorkspaceBinding, type WireWorkspaceDiffResponse, type WireWorkspaceDirEntry, type WireWorkspaceDirsResponse, type WireWorkspaceRef, apiKeyEnvVar, assertNeverPart, assistantTurnText, attachSessionSurface, chordId, collectPendingApprovals, compressionThresholdTokens, conformsToWire, contentToText, diagnosticToLine, extractAllMentions, extractMentions, extractSessionMentions, filePartSummary, flattenCatalog, getProviderInfo, hasFailure, isApprovalOutcome, isContextNearlyFull, isHeadlessInputFormat, isHeadlessLifecycleEvent, isHeadlessOutputFormat, isKeyAction, isLang, isMentionableFilePath, isOperationType, isPermissionLevel, isPlanOutcome, isProviderType, isQuestionAnswerMap, isSearchProviderType, isValidAgentRoleName, isValidCommandName, isWireGoalPhase, isWireHubEvent, isWirePlanAction, isWireRewindScope, isWireSettingWriteLayer, makeTranslate, normalizeApproval, packSessionSurface, parseChord, parseModelRef, parseSequence, perAction, placeholdersOf, promptTokens, sequenceId, sessionPartSummary, stripSystemNote, systemNote, tableOf, totalUsageTokens, translatorFor, turnDigest, unfixedRules, utf8ByteLength, wireFields };
12736
+ export { ACTION_CONTEXTS, AGENT_ROLE_NAME_PATTERN, API_KEY_ENV_VARS, APPROVAL_OUTCOMES, type ActiveAgentRole, type AgentEvent, type AgentEventOf, type AgentEventType, type AgentRole, type AgentRoleScope, type AgentRoleSource, type ApprovalAnswer, type ApprovalOutcome, type ApprovalReply, type ApprovalRequest, type ArtifactKind, type AttributeValue, type Attributes, type BackgroundTaskInfo, type BackgroundTaskKind, type BackgroundTaskStatus, type BlankCard, type BlankGreeting, type BoundKey, type BudgetBreach, COMMAND_NAME_PATTERN, COMPLIANCE_ACTIONS, COMPLIANCE_CATEGORIES, type Catalogs, type ComplianceAction, type ComplianceCategory, type ContextBreakdown, type ContextSegment, type CustomCommandDef, type CustomCommandSource, DEFAULT_AGENT_ROLE, DEFAULT_LANG, type DecidedTrustLevel, type Diagnostic, DiagnosticSink, type DiagnosticStatus, type EpochConfig, type EpochContentPart, type EpochFilePart, type EpochHook, type EpochImagePart, type EpochMessage, type EpochMessageRole, type EpochPlugin, type EpochSessionPart, type EpochSkill, type EpochTextPart, type EpochTool, type EpochToolCall, type EpochToolResult, type EpochTurnFacts, type EpochUserContent, type ExpandedCommand, type FileOmitReason, type FinishReason, type FixableApproval, type FlatCatalog, GEN_AI, HEADLESS_INPUT_EVENT_TYPES, HEADLESS_INPUT_FORMATS, HEADLESS_OUTPUT_FORMATS, HEADLESS_PROTOCOL_VERSION, type HeadlessEnvelope, type HeadlessEvent, type HeadlessInit, type HeadlessInputEvent, type HeadlessInputEventType, type HeadlessInputFormat, type HeadlessLifecycleEvent, type HeadlessOutputFormat, type HeadlessResult, type HeadlessResultReason, type HookContext, type HookEvent, type HookHandler, type HookManager, type HookRegistration, type HookType, type HostText, type HostUser, type JsonSchema, KEY_ACTIONS, type KeyAction, type KeyChord, type KeyContext, type KeySequence, type KeybindingReport, type KeybindingSource, type KeybindingTable, LANGS, type Lang, type LocalizedDetail, type LogFn, MAX_ATTACH_BYTES, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_HEADER_CHARS, MAX_OPTIONS, MAX_QUESTIONS, MAX_SESSION_ATTACH_BYTES, MAX_SESSION_REFS, MCP_DATA_KEY_NAME, METRIC, MIN_OPTIONS, type MentionSet, type ModelRef, type ModelSelection, type ModelSelectionOrigin, NOOP_TELEMETRY, type NoticeCode, OPERATION_TYPES, type Operation, type OperationType, PERMISSION_LEVELS, PLAN_OUTCOMES, PROVIDER_INFOS, PROVIDER_TYPES, type PermissionDecision, type PermissionLevel, type PermissionManager, type PermissionRuleLists, type PlanApprovalOutcome, type PlanProposal, type PluginContext, type ProviderInfo, type ProviderType, type QuestionAnswer, type QuestionItem, type QuestionOption, type QuestionRequest, RESERVED_CHORDS, RESERVED_COMMAND_NAMES, type RejectReason, type RejectedKey, type RuleValue, SCHEDULE_DRAFT_TOOL, SCHEDULE_INTERVAL_MINUTES, SCHEDULE_RUN_STATUSES, SCHEDULE_TEMPLATES, SEARCH_API_KEY_ENV, SEARCH_PROVIDER_TYPES, SECRET_SERVICE, SEQUENCE_CONTEXTS, SESSION_MENTION_PREFIX, SESSION_REFERENCE_ERROR_CODES, SHELL_KINDS, SIDEBAR_MENU_MESSAGE_TYPE, SIMULTANEOUS_CONTEXTS, SYSTEM_NOTE_PREFIX, type ScheduleAllowlist, type ScheduleBackendKind, type ScheduleCycle, type ScheduleDefinition, type ScheduleDraft, type ScheduleDraftAllowlist, type ScheduleDraftCreate, type ScheduleDraftPermission, type ScheduleDraftUpdate, type SchedulePendingApproval, type SchedulePendingItem, type ScheduleRun, type ScheduleRunStatus, type ScheduleRunnerSpec, type ScheduleTemplate, type ScheduleTemplateId, type ScheduleTrigger, type ScheduleTriggerKind, type ScheduleWeekday, type ScheduleWideningKind, type SearchProviderType, type SecretBackendId, type SecretStore, type SelectionContext, type SelectionRejection, type SelectionWarning, type SessionAttachKind, type SessionAttachResult, type SessionOmitReason, type SessionSurfaceMessage, type SessionSurfaceView, type SetSelectionResult, type ShellKind, type SidebarMenuItem, type SidebarMenuMessage, type SpanLike, type SubToolCall, type SubToolCallResult, type Telemetry, type TokenUsage, type ToolAnnotations, type ToolArtifact, type ToolArtifactInput, type ToolContext, type ToolDefinition, ToolExposure, type ToolProvider, type ToolResult, type Translate, type TranslateVars, type TrustLevel, type TrustManager, type TrustRecord, type TrustScope, UNLIMITED_TURNS, type VerifyResult, WIRE_ABORT_FIELDS, WIRE_ABOUT_FIELDS, WIRE_AGENT_ROLE_FIELDS, WIRE_APPROVAL_CACHE_REVOKE_REQUEST_FIELDS, WIRE_APPROVAL_CACHE_REVOKE_RESPONSE_FIELDS, WIRE_APPROVAL_LIST_FIELDS, WIRE_APPROVAL_ROW_FIELDS, WIRE_ARTIFACTS_FIELDS, WIRE_AUDIT_LOG_FIELDS, WIRE_AUDIT_ROW_FIELDS, WIRE_AUTH_COOKIE, WIRE_AUTH_COOKIE_ATTRS, WIRE_AUTH_TOKEN_PARAM, WIRE_BACKGROUND_TASK_FIELDS, WIRE_BLOCKED_GOALS_FIELDS, WIRE_BLOCKED_GOAL_FIELDS, WIRE_BLOCKED_LEVEL_FIELDS, WIRE_BUILTIN_CONNECTOR_FIELDS, WIRE_CACHED_APPROVAL_FIELDS, WIRE_CAPABILITIES_FIELDS, WIRE_CAPABILITY_PROJECT_FIELDS, WIRE_CHECKPOINT_LIST_FIELDS, WIRE_CHECKPOINT_SUMMARY_FIELDS, WIRE_COMMANDS_FIELDS, WIRE_COMMAND_EXPANSION_FIELDS, WIRE_COMPACT_FIELDS, WIRE_COMPRESSION_LINE_FIELDS, WIRE_CONFIG_FIELDS, WIRE_CONTEXT_FIELDS, WIRE_CREATE_SESSION_FIELDS, WIRE_CREATE_WORKSPACE_FIELDS, WIRE_CREATE_WORKSPACE_RESPONSE_FIELDS, WIRE_CUSTOM_COMMAND_FIELDS, WIRE_DELETE_SESSION_FIELDS, WIRE_DIFF_FILE_FIELDS, WIRE_ERROR_FIELDS, WIRE_FILE_CANDIDATES_FIELDS, WIRE_FILE_CANDIDATE_FIELDS, WIRE_FILE_CHANGE_FIELDS, WIRE_FILE_OPEN_RESPONSE_FIELDS, WIRE_FILE_REFERENCE_FIELDS, WIRE_FILE_STAT_MAX, WIRE_FILE_STAT_OK_FIELDS, WIRE_FILE_STAT_REFUSED_FIELDS, WIRE_FILE_STAT_RESPONSE_FIELDS, WIRE_FILE_TEXT_RESPONSE_FIELDS, WIRE_GOAL_ACTIONS, WIRE_GOAL_BLOCK_FIELDS, WIRE_GOAL_CLEAR_FIELDS, WIRE_GOAL_CREATE_FIELDS, WIRE_GOAL_FIELDS, WIRE_GOAL_LIMITS_FIELDS, WIRE_GOAL_PHASES, WIRE_GOAL_REFUSALS, WIRE_GOAL_RESPONSE_FIELDS, WIRE_GOAL_WRITE_FIELDS, WIRE_HEALTH_FIELDS, WIRE_IMAGE_REFERENCE_FIELDS, WIRE_KNOWN_WORKSPACE_FIELDS, WIRE_LANG_PARAM, WIRE_MANAGED_LOCK_FIELDS, WIRE_MCP_ADD_FIELDS, WIRE_MCP_ADD_RESPONSE_FIELDS, WIRE_MCP_APPLY_ENTRY_FIELDS, WIRE_MCP_APPLY_RESPONSE_FIELDS, WIRE_MCP_CONFIG_APPLY_FIELDS, WIRE_MCP_CONFIG_FIELDS, WIRE_MCP_CONFIG_ISSUE_FIELDS, WIRE_MCP_CONFIG_SAVE_FIELDS, WIRE_MCP_CONFIG_SAVE_RESPONSE_FIELDS, WIRE_MCP_CONNECTOR_FIELDS, WIRE_MCP_RECONNECT_FIELDS, WIRE_MESSAGE_LIST_FIELDS, WIRE_MODEL_FIELDS, WIRE_MODEL_SELECTION_FIELDS, WIRE_MODEL_SET_FIELDS, WIRE_MODEL_SUGGESTIONS_FIELDS, WIRE_PATCH_SESSION_FIELDS, WIRE_PATCH_SESSION_RESPONSE_FIELDS, WIRE_PERMISSION_RULE_FIELDS, WIRE_PERMISSION_SET_REQUEST_FIELDS, WIRE_PERMISSION_SET_RESPONSE_FIELDS, WIRE_PERMISSION_SHADOW_FIELDS, WIRE_PERMISSION_STATE_FIELDS, WIRE_PERMISSION_STATUS_FIELDS, WIRE_PLAN_ACTIONS, WIRE_PLAN_FIELDS, WIRE_PLAN_MODE_REQUEST_FIELDS, WIRE_PLAN_MODE_RESPONSE_FIELDS, WIRE_PLAN_MODE_STATE_FIELDS, WIRE_PLUGINS_FIELDS, WIRE_PLUGIN_ACTION_FIELDS, WIRE_PLUGIN_INSTALL_FIELDS, WIRE_PLUGIN_LOCAL_FIELDS, WIRE_PLUGIN_LOCAL_INSTALL_FIELDS, WIRE_PLUGIN_MARKETPLACE_FIELDS, WIRE_PLUGIN_MARKETPLACE_RESPONSE_FIELDS, WIRE_PLUGIN_NAME_FIELDS, WIRE_PLUGIN_PREVIEW_FIELDS, WIRE_PLUGIN_PREVIEW_RESPONSE_FIELDS, WIRE_PLUGIN_UPDATE_FIELDS, WIRE_POLICY_DIR_FIELDS, WIRE_POLICY_STATUS_FIELDS, WIRE_PROVIDERS_FIELDS, WIRE_PROVIDER_KEY_FIELDS, WIRE_PROVIDER_MODELS_FIELDS, WIRE_PROVIDER_OPTION_FIELDS, WIRE_QUESTION_LIST_FIELDS, WIRE_QUESTION_ROW_FIELDS, WIRE_RESPOND_APPROVAL_FIELDS, WIRE_RESPOND_APPROVAL_RESPONSE_FIELDS, WIRE_RESPOND_QUESTION_FIELDS, WIRE_RESPOND_QUESTION_RESPONSE_FIELDS, WIRE_REWIND_FILE_PLAN_FIELDS, WIRE_REWIND_OUTCOME_FIELDS, WIRE_REWIND_PREVIEW_FIELDS, WIRE_REWIND_REQUEST_FIELDS, WIRE_REWIND_RESPONSE_FIELDS, WIRE_REWIND_SCOPES, WIRE_ROLE_ADD_FIELDS, WIRE_ROLE_ADD_RESPONSE_FIELDS, WIRE_SANDBOX_STATUS_FIELDS, WIRE_SCHEDULE_CAPABILITY_FIELDS, WIRE_SCHEDULE_CREATE_FIELDS, WIRE_SCHEDULE_DEFAULTS_FIELDS, WIRE_SCHEDULE_DELETE_FIELDS, WIRE_SCHEDULE_FIELDS, WIRE_SCHEDULE_FIX_FIELDS, WIRE_SCHEDULE_FIX_REQUEST_FIELDS, WIRE_SCHEDULE_ISSUE_CODES, WIRE_SCHEDULE_LIST_FIELDS, WIRE_SCHEDULE_PENDING_FIELDS, WIRE_SCHEDULE_RECORDING_FIELDS, WIRE_SCHEDULE_ROW_FIELDS, WIRE_SCHEDULE_RUNS_FIELDS, WIRE_SCHEDULE_RUN_FIELDS, WIRE_SCHEDULE_SAVE_FIELDS, WIRE_SECURITY_FIELDS, WIRE_SECURITY_WORKSPACE_FIELDS, WIRE_SEND_MESSAGE_FIELDS, WIRE_SEND_MESSAGE_RESPONSE_FIELDS, WIRE_SESSION_CANDIDATES_FIELDS, WIRE_SESSION_CANDIDATE_FIELDS, WIRE_SESSION_FINISH_FIELDS, WIRE_SESSION_LIST_FIELDS, WIRE_SESSION_REFERENCE_FIELDS, WIRE_SESSION_RESPONSE_FIELDS, WIRE_SESSION_SUMMARY_FIELDS, WIRE_SESSION_WORKSPACE_FIELDS, WIRE_SESSION_WORKSPACE_RESPONSE_FIELDS, WIRE_SETTINGS_FIELDS, WIRE_SETTINGS_WRITE_FIELDS, WIRE_SETTINGS_WRITE_REQUEST_FIELDS, WIRE_SETTING_ROW_FIELDS, WIRE_SETTING_STEP_FIELDS, WIRE_SETTING_WRITE_FIELDS, WIRE_SETTING_WRITE_LAYERS, WIRE_SKILL_BODY_FIELDS, WIRE_SKILL_FIELDS, WIRE_SKILL_IMPORT_FIELDS, WIRE_SKILL_IMPORT_PREVIEW_FIELDS, WIRE_SKILL_REMOVE_FIELDS, WIRE_TASKS_FIELDS, WIRE_TOOLS_FIELDS, WIRE_TOOL_GATE_FIELDS, WIRE_TOOL_ROW_FIELDS, WIRE_WORKSPACE_DIFF_FIELDS, WIRE_WORKSPACE_DIRS_FIELDS, WIRE_WORKSPACE_DIR_ENTRY_FIELDS, WIRE_WORKSPACE_REF_FIELDS, type WireAbortResponse, type WireAbout, type WireAgentEnvelope, type WireAgentEvent, type WireAgentRoleSummary, type WireApprovalCacheRevokeRequest, type WireApprovalCacheRevokeResponse, type WireApprovalListResponse, type WireApprovalRequest, type WireArtifactsResponse, type WireAuditCode, type WireAuditLog, type WireAuditOutcome, type WireAuditRow, type WireAuthDenyReason, type WireAuthDenyStatus, type WireAuthGuard, type WireAuthRequestView, type WireAuthVerdict, type WireBackgroundTask, type WireBindWorkspaceRequest, type WireBlockedGoal, type WireBlockedGoalsResponse, type WireBlockedLevel, type WireBuiltinConnector, type WireCachedApproval, type WireCachedDecision, type WireCapabilitiesResponse, type WireCapabilityProject, type WireCheckpointListResponse, type WireCheckpointSummary, type WireCommandExpansion, type WireCommandsResponse, type WireCompactRequest, type WireCompactResponse, type WireCompressionLine, type WireConfigResponse, type WireContextResponse, type WireCreateSessionRequest, type WireCreateSessionResponse, type WireCreateWorkspaceRequest, type WireCreateWorkspaceResponse, type WireCustomCommand, type WireDeleteSessionResponse, type WireDiffFile, type WireDiffNote, type WireDiffOmitReason, type WireDiffSource, type WireDiffStatus, type WireEnvelope, type WireErrorResponse, type WireEvent, type WireFields, type WireFileCandidate, type WireFileCandidatesResponse, type WireFileChange, type WireFileKind, type WireFileOpenRefusal, type WireFileOpenResponse, type WireFileReference, type WireFileRefusal, type WireFileStat, type WireFileStatOk, type WireFileStatRefused, type WireFileStatResponse, type WireFileTextResponse, type WireFixture, type WireFixtureCase, type WireGoal, type WireGoalBlock, type WireGoalClearResponse, type WireGoalCreateRequest, type WireGoalLimits, type WireGoalPhase, type WireGoalRefusal, type WireGoalResponse, type WireGoalUpdateRequest, type WireGoalWriteResponse, type WireHealthResponse, type WireHubEnvelope, type WireHubEvent, type WireImageReference, type WireKnownWorkspace, type WireManagedLock, type WireMcpAddRequest, type WireMcpAddResponse, type WireMcpApplyAction, type WireMcpApplyEntry, type WireMcpApplyResponse, type WireMcpConfigApplyRequest, type WireMcpConfigIssue, type WireMcpConfigResponse, type WireMcpConfigSaveRequest, type WireMcpConfigSaveResponse, type WireMcpConnector, type WireMcpReconnectResponse, type WireMessageListResponse, type WireModelCaveat, type WireModelProbeStatus, type WireModelRejection, type WireModelResponse, type WireModelSelection, type WireModelSetRequest, type WireModelSetResponse, type WireModelSource, type WireModelSuggestions, type WirePatchSessionRequest, type WirePatchSessionResponse, type WirePermissionRememberFailure, type WirePermissionRuleRow, type WirePermissionSetRequest, type WirePermissionSetResponse, type WirePermissionShadow, type WirePermissionState, type WirePermissionStatus, type WirePickDirectoryResponse, type WirePlanAction, type WirePlanModeRequest, type WirePlanModeResponse, type WirePlanModeState, type WirePlanResponse, type WirePluginActionResponse, type WirePluginCounts, type WirePluginEntry, type WirePluginHit, type WirePluginHookTally, type WirePluginInstallRequest, type WirePluginLocalInstallRequest, type WirePluginLocalRequest, type WirePluginMarketplace, type WirePluginMarketplaceRequest, type WirePluginMarketplaceResponse, type WirePluginNameRequest, type WirePluginPreview, type WirePluginPreviewRequest, type WirePluginPreviewResponse, type WirePluginRefuseReason, type WirePluginSourceType, type WirePluginUpdateRequest, type WirePluginsResponse, type WirePolicyDir, type WirePolicyStatus, type WireProviderKeyRequest, type WireProviderKeyResponse, type WireProviderModelsRequest, type WireProviderModelsResponse, type WireProviderOption, type WireProviderSummary, type WireProvidersResponse, type WireQuestionListResponse, type WireQuestionRequest, type WireReplayMessage, type WireResetReason, type WireRespondApprovalRequest, type WireRespondApprovalResponse, type WireRespondQuestionRequest, type WireRespondQuestionResponse, type WireRewindAction, type WireRewindDrift, type WireRewindFilePlan, type WireRewindOutcome, type WireRewindPreview, type WireRewindRequest, type WireRewindResponse, type WireRewindScope, type WireRoleAddRequest, type WireRoleAddResponse, type WireSandboxReason, type WireSandboxStatus, type WireScheduleCapability, type WireScheduleCreateRequest, type WireScheduleDefaults, type WireScheduleDeleteResponse, type WireScheduleFixRequest, type WireScheduleFixResponse, type WireScheduleIssue, type WireScheduleIssueCode, type WireScheduleListResponse, type WireSchedulePendingResponse, type WireScheduleRecordingResponse, type WireScheduleRegisterRefusal, type WireScheduleRegisterWarning, type WireScheduleRegistration, type WireScheduleResponse, type WireScheduleRow, type WireScheduleRunResponse, type WireScheduleRunsResponse, type WireScheduleSaveResponse, type WireScheduleUpdateRequest, type WireSecurityResponse, type WireSecurityWorkspace, type WireSendMessageRequest, type WireSendMessageResponse, type WireSessionCandidate, type WireSessionCandidatesResponse, type WireSessionFinish, type WireSessionListResponse, type WireSessionReference, type WireSessionResponse, type WireSessionSummary, type WireSessionWorkspace, type WireSessionWorkspaceResponse, type WireSettingApply, type WireSettingFutile, type WireSettingLayer, type WireSettingRow, type WireSettingStep, type WireSettingValue, type WireSettingValueKind, type WireSettingWrite, type WireSettingWriteLayer, type WireSettingsResponse, type WireSettingsWriteRequest, type WireSettingsWriteResponse, type WireSkillBodyResponse, type WireSkillImportConflict, type WireSkillImportEntry, type WireSkillImportFailure, type WireSkillImportForm, type WireSkillImportIssue, type WireSkillImportPreviewResponse, type WireSkillImportResponse, type WireSkillRemoveFailure, type WireSkillRemoveResponse, type WireSkillSummary, type WireSummaryWorkspace, type WireTaggedEvent, type WireTasksResponse, type WireToolGate, type WireToolGateAxis, type WireToolRow, type WireToolSummary, type WireToolVerdict, type WireToolsResponse, type WireTurnState, type WireWorkspaceBinding, type WireWorkspaceDiffResponse, type WireWorkspaceDirEntry, type WireWorkspaceDirsResponse, type WireWorkspaceRef, apiKeyEnvVar, assertNeverPart, assistantTurnText, attachSessionSurface, chordId, collectPendingApprovals, compressionThresholdTokens, conformsToWire, contentToText, diagnosticToLine, extractAllMentions, extractMentions, extractSessionMentions, filePartSummary, flattenCatalog, getProviderInfo, hasFailure, isApprovalOutcome, isContextNearlyFull, isHeadlessInputFormat, isHeadlessLifecycleEvent, isHeadlessOutputFormat, isKeyAction, isLang, isMentionableFilePath, isOperationType, isPermissionLevel, isPlanOutcome, isProviderType, isQuestionAnswerMap, isSearchProviderType, isValidAgentRoleName, isValidCommandName, isWireGoalPhase, isWireHubEvent, isWirePlanAction, isWireRewindScope, isWireSettingWriteLayer, makeTranslate, normalizeApproval, packSessionSurface, parseChord, parseModelRef, parseSequence, perAction, placeholdersOf, promptTokens, resolveHostText, sequenceId, sessionPartSummary, stripSystemNote, systemNote, tableOf, totalUsageTokens, translatorFor, turnDigest, unfixedRules, utf8ByteLength, wireFields };
package/dist/index.js CHANGED
@@ -246,6 +246,7 @@ function tableOf(bindings) {
246
246
  }
247
247
  // src/config.ts
248
248
  var SHELL_KINDS = ["cmd", "powershell", "pwsh"];
249
+ var UNLIMITED_TURNS = 0;
249
250
  var PROVIDER_INFOS = [
250
251
  { type: "openai", label: "OpenAI", apiKeyEnv: "OPENAI_API_KEY", interactive: true },
251
252
  { type: "anthropic", label: "Anthropic", apiKeyEnv: "ANTHROPIC_API_KEY", interactive: true },
@@ -520,6 +521,8 @@ function collectPendingApprovals(defs, runs) {
520
521
  }
521
522
  return items.sort((a, b) => a.at - b.at || (a.scheduleId < b.scheduleId ? -1 : 1));
522
523
  }
524
+ // src/schedule-draft.ts
525
+ var SCHEDULE_DRAFT_TOOL = "schedule_draft";
523
526
  // src/question.ts
524
527
  var MAX_QUESTIONS = 4;
525
528
  var MIN_OPTIONS = 2;
@@ -1657,20 +1660,6 @@ var WIRE_FILE_CANDIDATES_FIELDS = wireFields()({
1657
1660
  });
1658
1661
  // src/sidebar-menu.ts
1659
1662
  var SIDEBAR_MENU_MESSAGE_TYPE = "epoch:sidebar-menu";
1660
- // src/compliance.ts
1661
- var COMPLIANCE_CATEGORIES = [
1662
- "sexual",
1663
- "political",
1664
- "hate",
1665
- "violence",
1666
- "illegal",
1667
- "self_harm",
1668
- "privacy"
1669
- ];
1670
- var COMPLIANCE_ACTIONS = ["block", "mask", "warn", "off"];
1671
- // src/secret.ts
1672
- var SECRET_SERVICE = "epoch-agent";
1673
- var MCP_DATA_KEY_NAME = "mcp-auth-data-key";
1674
1663
  // src/i18n.ts
1675
1664
  var LANGS = ["zh", "en"];
1676
1665
  var DEFAULT_LANG = "zh";
@@ -1711,5 +1700,28 @@ function translatorFor(catalogs, lang) {
1711
1700
  const translate = makeTranslate(catalogs);
1712
1701
  return (key, vars) => translate(lang, key, vars);
1713
1702
  }
1703
+ // src/blank-greeting.ts
1704
+ function resolveHostText(text, lang) {
1705
+ if (!text) return void 0;
1706
+ const pick = (candidate) => {
1707
+ const value = text[candidate];
1708
+ return value !== void 0 && value !== "" ? value : void 0;
1709
+ };
1710
+ return pick(lang) ?? pick(DEFAULT_LANG) ?? LANGS.map(pick).find((value) => value !== void 0);
1711
+ }
1712
+ // src/compliance.ts
1713
+ var COMPLIANCE_CATEGORIES = [
1714
+ "sexual",
1715
+ "political",
1716
+ "hate",
1717
+ "violence",
1718
+ "illegal",
1719
+ "self_harm",
1720
+ "privacy"
1721
+ ];
1722
+ var COMPLIANCE_ACTIONS = ["block", "mask", "warn", "off"];
1723
+ // src/secret.ts
1724
+ var SECRET_SERVICE = "epoch-agent";
1725
+ var MCP_DATA_KEY_NAME = "mcp-auth-data-key";
1714
1726
 
1715
- export { ACTION_CONTEXTS, AGENT_ROLE_NAME_PATTERN, API_KEY_ENV_VARS, APPROVAL_OUTCOMES, COMMAND_NAME_PATTERN, COMPLIANCE_ACTIONS, COMPLIANCE_CATEGORIES, DEFAULT_AGENT_ROLE, DEFAULT_LANG, DiagnosticSink, GEN_AI, HEADLESS_INPUT_EVENT_TYPES, HEADLESS_INPUT_FORMATS, HEADLESS_OUTPUT_FORMATS, HEADLESS_PROTOCOL_VERSION, KEY_ACTIONS, LANGS, MAX_ATTACH_BYTES, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_HEADER_CHARS, MAX_OPTIONS, MAX_QUESTIONS, MAX_SESSION_ATTACH_BYTES, MAX_SESSION_REFS, MCP_DATA_KEY_NAME, METRIC, MIN_OPTIONS, NOOP_TELEMETRY, OPERATION_TYPES, PERMISSION_LEVELS, PLAN_OUTCOMES, PROVIDER_INFOS, PROVIDER_TYPES, RESERVED_CHORDS, RESERVED_COMMAND_NAMES, SCHEDULE_INTERVAL_MINUTES, SCHEDULE_RUN_STATUSES, SCHEDULE_TEMPLATES, SEARCH_API_KEY_ENV, SEARCH_PROVIDER_TYPES, SECRET_SERVICE, SEQUENCE_CONTEXTS, SESSION_MENTION_PREFIX, SESSION_REFERENCE_ERROR_CODES, SHELL_KINDS, SIDEBAR_MENU_MESSAGE_TYPE, SIMULTANEOUS_CONTEXTS, SYSTEM_NOTE_PREFIX, ToolExposure, WIRE_ABORT_FIELDS, WIRE_ABOUT_FIELDS, WIRE_AGENT_ROLE_FIELDS, WIRE_APPROVAL_CACHE_REVOKE_REQUEST_FIELDS, WIRE_APPROVAL_CACHE_REVOKE_RESPONSE_FIELDS, WIRE_APPROVAL_LIST_FIELDS, WIRE_APPROVAL_ROW_FIELDS, WIRE_ARTIFACTS_FIELDS, WIRE_AUDIT_LOG_FIELDS, WIRE_AUDIT_ROW_FIELDS, WIRE_AUTH_COOKIE, WIRE_AUTH_COOKIE_ATTRS, WIRE_AUTH_TOKEN_PARAM, WIRE_BACKGROUND_TASK_FIELDS, WIRE_BLOCKED_GOALS_FIELDS, WIRE_BLOCKED_GOAL_FIELDS, WIRE_BLOCKED_LEVEL_FIELDS, WIRE_BUILTIN_CONNECTOR_FIELDS, WIRE_CACHED_APPROVAL_FIELDS, WIRE_CAPABILITIES_FIELDS, WIRE_CAPABILITY_PROJECT_FIELDS, WIRE_CHECKPOINT_LIST_FIELDS, WIRE_CHECKPOINT_SUMMARY_FIELDS, WIRE_COMMANDS_FIELDS, WIRE_COMMAND_EXPANSION_FIELDS, WIRE_COMPACT_FIELDS, WIRE_COMPRESSION_LINE_FIELDS, WIRE_CONFIG_FIELDS, WIRE_CONTEXT_FIELDS, WIRE_CREATE_SESSION_FIELDS, WIRE_CREATE_WORKSPACE_FIELDS, WIRE_CREATE_WORKSPACE_RESPONSE_FIELDS, WIRE_CUSTOM_COMMAND_FIELDS, WIRE_DELETE_SESSION_FIELDS, WIRE_DIFF_FILE_FIELDS, WIRE_ERROR_FIELDS, WIRE_FILE_CANDIDATES_FIELDS, WIRE_FILE_CANDIDATE_FIELDS, WIRE_FILE_CHANGE_FIELDS, WIRE_FILE_OPEN_RESPONSE_FIELDS, WIRE_FILE_REFERENCE_FIELDS, WIRE_FILE_STAT_MAX, WIRE_FILE_STAT_OK_FIELDS, WIRE_FILE_STAT_REFUSED_FIELDS, WIRE_FILE_STAT_RESPONSE_FIELDS, WIRE_FILE_TEXT_RESPONSE_FIELDS, WIRE_GOAL_ACTIONS, WIRE_GOAL_BLOCK_FIELDS, WIRE_GOAL_CLEAR_FIELDS, WIRE_GOAL_CREATE_FIELDS, WIRE_GOAL_FIELDS, WIRE_GOAL_LIMITS_FIELDS, WIRE_GOAL_PHASES, WIRE_GOAL_REFUSALS, WIRE_GOAL_RESPONSE_FIELDS, WIRE_GOAL_WRITE_FIELDS, WIRE_HEALTH_FIELDS, WIRE_IMAGE_REFERENCE_FIELDS, WIRE_KNOWN_WORKSPACE_FIELDS, WIRE_LANG_PARAM, WIRE_MANAGED_LOCK_FIELDS, WIRE_MCP_ADD_FIELDS, WIRE_MCP_ADD_RESPONSE_FIELDS, WIRE_MCP_APPLY_ENTRY_FIELDS, WIRE_MCP_APPLY_RESPONSE_FIELDS, WIRE_MCP_CONFIG_APPLY_FIELDS, WIRE_MCP_CONFIG_FIELDS, WIRE_MCP_CONFIG_ISSUE_FIELDS, WIRE_MCP_CONFIG_SAVE_FIELDS, WIRE_MCP_CONFIG_SAVE_RESPONSE_FIELDS, WIRE_MCP_CONNECTOR_FIELDS, WIRE_MCP_RECONNECT_FIELDS, WIRE_MESSAGE_LIST_FIELDS, WIRE_MODEL_FIELDS, WIRE_MODEL_SELECTION_FIELDS, WIRE_MODEL_SET_FIELDS, WIRE_MODEL_SUGGESTIONS_FIELDS, WIRE_PATCH_SESSION_FIELDS, WIRE_PATCH_SESSION_RESPONSE_FIELDS, WIRE_PERMISSION_RULE_FIELDS, WIRE_PERMISSION_SET_REQUEST_FIELDS, WIRE_PERMISSION_SET_RESPONSE_FIELDS, WIRE_PERMISSION_SHADOW_FIELDS, WIRE_PERMISSION_STATE_FIELDS, WIRE_PERMISSION_STATUS_FIELDS, WIRE_PLAN_ACTIONS, WIRE_PLAN_FIELDS, WIRE_PLAN_MODE_REQUEST_FIELDS, WIRE_PLAN_MODE_RESPONSE_FIELDS, WIRE_PLAN_MODE_STATE_FIELDS, WIRE_PLUGINS_FIELDS, WIRE_PLUGIN_ACTION_FIELDS, WIRE_PLUGIN_INSTALL_FIELDS, WIRE_PLUGIN_LOCAL_FIELDS, WIRE_PLUGIN_LOCAL_INSTALL_FIELDS, WIRE_PLUGIN_MARKETPLACE_FIELDS, WIRE_PLUGIN_MARKETPLACE_RESPONSE_FIELDS, WIRE_PLUGIN_NAME_FIELDS, WIRE_PLUGIN_PREVIEW_FIELDS, WIRE_PLUGIN_PREVIEW_RESPONSE_FIELDS, WIRE_PLUGIN_UPDATE_FIELDS, WIRE_POLICY_DIR_FIELDS, WIRE_POLICY_STATUS_FIELDS, WIRE_PROVIDERS_FIELDS, WIRE_PROVIDER_KEY_FIELDS, WIRE_PROVIDER_MODELS_FIELDS, WIRE_PROVIDER_OPTION_FIELDS, WIRE_QUESTION_LIST_FIELDS, WIRE_QUESTION_ROW_FIELDS, WIRE_RESPOND_APPROVAL_FIELDS, WIRE_RESPOND_APPROVAL_RESPONSE_FIELDS, WIRE_RESPOND_QUESTION_FIELDS, WIRE_RESPOND_QUESTION_RESPONSE_FIELDS, WIRE_REWIND_FILE_PLAN_FIELDS, WIRE_REWIND_OUTCOME_FIELDS, WIRE_REWIND_PREVIEW_FIELDS, WIRE_REWIND_REQUEST_FIELDS, WIRE_REWIND_RESPONSE_FIELDS, WIRE_REWIND_SCOPES, WIRE_ROLE_ADD_FIELDS, WIRE_ROLE_ADD_RESPONSE_FIELDS, WIRE_SANDBOX_STATUS_FIELDS, WIRE_SCHEDULE_CAPABILITY_FIELDS, WIRE_SCHEDULE_CREATE_FIELDS, WIRE_SCHEDULE_DEFAULTS_FIELDS, WIRE_SCHEDULE_DELETE_FIELDS, WIRE_SCHEDULE_FIELDS, WIRE_SCHEDULE_FIX_FIELDS, WIRE_SCHEDULE_FIX_REQUEST_FIELDS, WIRE_SCHEDULE_ISSUE_CODES, WIRE_SCHEDULE_LIST_FIELDS, WIRE_SCHEDULE_PENDING_FIELDS, WIRE_SCHEDULE_RECORDING_FIELDS, WIRE_SCHEDULE_ROW_FIELDS, WIRE_SCHEDULE_RUNS_FIELDS, WIRE_SCHEDULE_RUN_FIELDS, WIRE_SCHEDULE_SAVE_FIELDS, WIRE_SECURITY_FIELDS, WIRE_SECURITY_WORKSPACE_FIELDS, WIRE_SEND_MESSAGE_FIELDS, WIRE_SEND_MESSAGE_RESPONSE_FIELDS, WIRE_SESSION_CANDIDATES_FIELDS, WIRE_SESSION_CANDIDATE_FIELDS, WIRE_SESSION_FINISH_FIELDS, WIRE_SESSION_LIST_FIELDS, WIRE_SESSION_REFERENCE_FIELDS, WIRE_SESSION_RESPONSE_FIELDS, WIRE_SESSION_SUMMARY_FIELDS, WIRE_SESSION_WORKSPACE_FIELDS, WIRE_SESSION_WORKSPACE_RESPONSE_FIELDS, WIRE_SETTINGS_FIELDS, WIRE_SETTINGS_WRITE_FIELDS, WIRE_SETTINGS_WRITE_REQUEST_FIELDS, WIRE_SETTING_ROW_FIELDS, WIRE_SETTING_STEP_FIELDS, WIRE_SETTING_WRITE_FIELDS, WIRE_SETTING_WRITE_LAYERS, WIRE_SKILL_BODY_FIELDS, WIRE_SKILL_FIELDS, WIRE_SKILL_IMPORT_FIELDS, WIRE_SKILL_IMPORT_PREVIEW_FIELDS, WIRE_SKILL_REMOVE_FIELDS, WIRE_TASKS_FIELDS, WIRE_TOOLS_FIELDS, WIRE_TOOL_GATE_FIELDS, WIRE_TOOL_ROW_FIELDS, WIRE_WORKSPACE_DIFF_FIELDS, WIRE_WORKSPACE_DIRS_FIELDS, WIRE_WORKSPACE_DIR_ENTRY_FIELDS, WIRE_WORKSPACE_REF_FIELDS, apiKeyEnvVar, assertNeverPart, assistantTurnText, attachSessionSurface, chordId, collectPendingApprovals, compressionThresholdTokens, conformsToWire, contentToText, diagnosticToLine, extractAllMentions, extractMentions, extractSessionMentions, filePartSummary, flattenCatalog, getProviderInfo, hasFailure, isApprovalOutcome, isContextNearlyFull, isHeadlessInputFormat, isHeadlessLifecycleEvent, isHeadlessOutputFormat, isKeyAction, isLang, isMentionableFilePath, isOperationType, isPermissionLevel, isPlanOutcome, isProviderType, isQuestionAnswerMap, isSearchProviderType, isValidAgentRoleName, isValidCommandName, isWireGoalPhase, isWireHubEvent, isWirePlanAction, isWireRewindScope, isWireSettingWriteLayer, makeTranslate, normalizeApproval, packSessionSurface, parseChord, parseModelRef, parseSequence, perAction, placeholdersOf, promptTokens, sequenceId, sessionPartSummary, stripSystemNote, systemNote, tableOf, totalUsageTokens, translatorFor, turnDigest, unfixedRules, utf8ByteLength, wireFields };
1727
+ export { ACTION_CONTEXTS, AGENT_ROLE_NAME_PATTERN, API_KEY_ENV_VARS, APPROVAL_OUTCOMES, COMMAND_NAME_PATTERN, COMPLIANCE_ACTIONS, COMPLIANCE_CATEGORIES, DEFAULT_AGENT_ROLE, DEFAULT_LANG, DiagnosticSink, GEN_AI, HEADLESS_INPUT_EVENT_TYPES, HEADLESS_INPUT_FORMATS, HEADLESS_OUTPUT_FORMATS, HEADLESS_PROTOCOL_VERSION, KEY_ACTIONS, LANGS, MAX_ATTACH_BYTES, MAX_ATTACH_FILES, MAX_ATTACH_TOTAL_BYTES, MAX_HEADER_CHARS, MAX_OPTIONS, MAX_QUESTIONS, MAX_SESSION_ATTACH_BYTES, MAX_SESSION_REFS, MCP_DATA_KEY_NAME, METRIC, MIN_OPTIONS, NOOP_TELEMETRY, OPERATION_TYPES, PERMISSION_LEVELS, PLAN_OUTCOMES, PROVIDER_INFOS, PROVIDER_TYPES, RESERVED_CHORDS, RESERVED_COMMAND_NAMES, SCHEDULE_DRAFT_TOOL, SCHEDULE_INTERVAL_MINUTES, SCHEDULE_RUN_STATUSES, SCHEDULE_TEMPLATES, SEARCH_API_KEY_ENV, SEARCH_PROVIDER_TYPES, SECRET_SERVICE, SEQUENCE_CONTEXTS, SESSION_MENTION_PREFIX, SESSION_REFERENCE_ERROR_CODES, SHELL_KINDS, SIDEBAR_MENU_MESSAGE_TYPE, SIMULTANEOUS_CONTEXTS, SYSTEM_NOTE_PREFIX, ToolExposure, UNLIMITED_TURNS, WIRE_ABORT_FIELDS, WIRE_ABOUT_FIELDS, WIRE_AGENT_ROLE_FIELDS, WIRE_APPROVAL_CACHE_REVOKE_REQUEST_FIELDS, WIRE_APPROVAL_CACHE_REVOKE_RESPONSE_FIELDS, WIRE_APPROVAL_LIST_FIELDS, WIRE_APPROVAL_ROW_FIELDS, WIRE_ARTIFACTS_FIELDS, WIRE_AUDIT_LOG_FIELDS, WIRE_AUDIT_ROW_FIELDS, WIRE_AUTH_COOKIE, WIRE_AUTH_COOKIE_ATTRS, WIRE_AUTH_TOKEN_PARAM, WIRE_BACKGROUND_TASK_FIELDS, WIRE_BLOCKED_GOALS_FIELDS, WIRE_BLOCKED_GOAL_FIELDS, WIRE_BLOCKED_LEVEL_FIELDS, WIRE_BUILTIN_CONNECTOR_FIELDS, WIRE_CACHED_APPROVAL_FIELDS, WIRE_CAPABILITIES_FIELDS, WIRE_CAPABILITY_PROJECT_FIELDS, WIRE_CHECKPOINT_LIST_FIELDS, WIRE_CHECKPOINT_SUMMARY_FIELDS, WIRE_COMMANDS_FIELDS, WIRE_COMMAND_EXPANSION_FIELDS, WIRE_COMPACT_FIELDS, WIRE_COMPRESSION_LINE_FIELDS, WIRE_CONFIG_FIELDS, WIRE_CONTEXT_FIELDS, WIRE_CREATE_SESSION_FIELDS, WIRE_CREATE_WORKSPACE_FIELDS, WIRE_CREATE_WORKSPACE_RESPONSE_FIELDS, WIRE_CUSTOM_COMMAND_FIELDS, WIRE_DELETE_SESSION_FIELDS, WIRE_DIFF_FILE_FIELDS, WIRE_ERROR_FIELDS, WIRE_FILE_CANDIDATES_FIELDS, WIRE_FILE_CANDIDATE_FIELDS, WIRE_FILE_CHANGE_FIELDS, WIRE_FILE_OPEN_RESPONSE_FIELDS, WIRE_FILE_REFERENCE_FIELDS, WIRE_FILE_STAT_MAX, WIRE_FILE_STAT_OK_FIELDS, WIRE_FILE_STAT_REFUSED_FIELDS, WIRE_FILE_STAT_RESPONSE_FIELDS, WIRE_FILE_TEXT_RESPONSE_FIELDS, WIRE_GOAL_ACTIONS, WIRE_GOAL_BLOCK_FIELDS, WIRE_GOAL_CLEAR_FIELDS, WIRE_GOAL_CREATE_FIELDS, WIRE_GOAL_FIELDS, WIRE_GOAL_LIMITS_FIELDS, WIRE_GOAL_PHASES, WIRE_GOAL_REFUSALS, WIRE_GOAL_RESPONSE_FIELDS, WIRE_GOAL_WRITE_FIELDS, WIRE_HEALTH_FIELDS, WIRE_IMAGE_REFERENCE_FIELDS, WIRE_KNOWN_WORKSPACE_FIELDS, WIRE_LANG_PARAM, WIRE_MANAGED_LOCK_FIELDS, WIRE_MCP_ADD_FIELDS, WIRE_MCP_ADD_RESPONSE_FIELDS, WIRE_MCP_APPLY_ENTRY_FIELDS, WIRE_MCP_APPLY_RESPONSE_FIELDS, WIRE_MCP_CONFIG_APPLY_FIELDS, WIRE_MCP_CONFIG_FIELDS, WIRE_MCP_CONFIG_ISSUE_FIELDS, WIRE_MCP_CONFIG_SAVE_FIELDS, WIRE_MCP_CONFIG_SAVE_RESPONSE_FIELDS, WIRE_MCP_CONNECTOR_FIELDS, WIRE_MCP_RECONNECT_FIELDS, WIRE_MESSAGE_LIST_FIELDS, WIRE_MODEL_FIELDS, WIRE_MODEL_SELECTION_FIELDS, WIRE_MODEL_SET_FIELDS, WIRE_MODEL_SUGGESTIONS_FIELDS, WIRE_PATCH_SESSION_FIELDS, WIRE_PATCH_SESSION_RESPONSE_FIELDS, WIRE_PERMISSION_RULE_FIELDS, WIRE_PERMISSION_SET_REQUEST_FIELDS, WIRE_PERMISSION_SET_RESPONSE_FIELDS, WIRE_PERMISSION_SHADOW_FIELDS, WIRE_PERMISSION_STATE_FIELDS, WIRE_PERMISSION_STATUS_FIELDS, WIRE_PLAN_ACTIONS, WIRE_PLAN_FIELDS, WIRE_PLAN_MODE_REQUEST_FIELDS, WIRE_PLAN_MODE_RESPONSE_FIELDS, WIRE_PLAN_MODE_STATE_FIELDS, WIRE_PLUGINS_FIELDS, WIRE_PLUGIN_ACTION_FIELDS, WIRE_PLUGIN_INSTALL_FIELDS, WIRE_PLUGIN_LOCAL_FIELDS, WIRE_PLUGIN_LOCAL_INSTALL_FIELDS, WIRE_PLUGIN_MARKETPLACE_FIELDS, WIRE_PLUGIN_MARKETPLACE_RESPONSE_FIELDS, WIRE_PLUGIN_NAME_FIELDS, WIRE_PLUGIN_PREVIEW_FIELDS, WIRE_PLUGIN_PREVIEW_RESPONSE_FIELDS, WIRE_PLUGIN_UPDATE_FIELDS, WIRE_POLICY_DIR_FIELDS, WIRE_POLICY_STATUS_FIELDS, WIRE_PROVIDERS_FIELDS, WIRE_PROVIDER_KEY_FIELDS, WIRE_PROVIDER_MODELS_FIELDS, WIRE_PROVIDER_OPTION_FIELDS, WIRE_QUESTION_LIST_FIELDS, WIRE_QUESTION_ROW_FIELDS, WIRE_RESPOND_APPROVAL_FIELDS, WIRE_RESPOND_APPROVAL_RESPONSE_FIELDS, WIRE_RESPOND_QUESTION_FIELDS, WIRE_RESPOND_QUESTION_RESPONSE_FIELDS, WIRE_REWIND_FILE_PLAN_FIELDS, WIRE_REWIND_OUTCOME_FIELDS, WIRE_REWIND_PREVIEW_FIELDS, WIRE_REWIND_REQUEST_FIELDS, WIRE_REWIND_RESPONSE_FIELDS, WIRE_REWIND_SCOPES, WIRE_ROLE_ADD_FIELDS, WIRE_ROLE_ADD_RESPONSE_FIELDS, WIRE_SANDBOX_STATUS_FIELDS, WIRE_SCHEDULE_CAPABILITY_FIELDS, WIRE_SCHEDULE_CREATE_FIELDS, WIRE_SCHEDULE_DEFAULTS_FIELDS, WIRE_SCHEDULE_DELETE_FIELDS, WIRE_SCHEDULE_FIELDS, WIRE_SCHEDULE_FIX_FIELDS, WIRE_SCHEDULE_FIX_REQUEST_FIELDS, WIRE_SCHEDULE_ISSUE_CODES, WIRE_SCHEDULE_LIST_FIELDS, WIRE_SCHEDULE_PENDING_FIELDS, WIRE_SCHEDULE_RECORDING_FIELDS, WIRE_SCHEDULE_ROW_FIELDS, WIRE_SCHEDULE_RUNS_FIELDS, WIRE_SCHEDULE_RUN_FIELDS, WIRE_SCHEDULE_SAVE_FIELDS, WIRE_SECURITY_FIELDS, WIRE_SECURITY_WORKSPACE_FIELDS, WIRE_SEND_MESSAGE_FIELDS, WIRE_SEND_MESSAGE_RESPONSE_FIELDS, WIRE_SESSION_CANDIDATES_FIELDS, WIRE_SESSION_CANDIDATE_FIELDS, WIRE_SESSION_FINISH_FIELDS, WIRE_SESSION_LIST_FIELDS, WIRE_SESSION_REFERENCE_FIELDS, WIRE_SESSION_RESPONSE_FIELDS, WIRE_SESSION_SUMMARY_FIELDS, WIRE_SESSION_WORKSPACE_FIELDS, WIRE_SESSION_WORKSPACE_RESPONSE_FIELDS, WIRE_SETTINGS_FIELDS, WIRE_SETTINGS_WRITE_FIELDS, WIRE_SETTINGS_WRITE_REQUEST_FIELDS, WIRE_SETTING_ROW_FIELDS, WIRE_SETTING_STEP_FIELDS, WIRE_SETTING_WRITE_FIELDS, WIRE_SETTING_WRITE_LAYERS, WIRE_SKILL_BODY_FIELDS, WIRE_SKILL_FIELDS, WIRE_SKILL_IMPORT_FIELDS, WIRE_SKILL_IMPORT_PREVIEW_FIELDS, WIRE_SKILL_REMOVE_FIELDS, WIRE_TASKS_FIELDS, WIRE_TOOLS_FIELDS, WIRE_TOOL_GATE_FIELDS, WIRE_TOOL_ROW_FIELDS, WIRE_WORKSPACE_DIFF_FIELDS, WIRE_WORKSPACE_DIRS_FIELDS, WIRE_WORKSPACE_DIR_ENTRY_FIELDS, WIRE_WORKSPACE_REF_FIELDS, apiKeyEnvVar, assertNeverPart, assistantTurnText, attachSessionSurface, chordId, collectPendingApprovals, compressionThresholdTokens, conformsToWire, contentToText, diagnosticToLine, extractAllMentions, extractMentions, extractSessionMentions, filePartSummary, flattenCatalog, getProviderInfo, hasFailure, isApprovalOutcome, isContextNearlyFull, isHeadlessInputFormat, isHeadlessLifecycleEvent, isHeadlessOutputFormat, isKeyAction, isLang, isMentionableFilePath, isOperationType, isPermissionLevel, isPlanOutcome, isProviderType, isQuestionAnswerMap, isSearchProviderType, isValidAgentRoleName, isValidCommandName, isWireGoalPhase, isWireHubEvent, isWirePlanAction, isWireRewindScope, isWireSettingWriteLayer, makeTranslate, normalizeApproval, packSessionSurface, parseChord, parseModelRef, parseSequence, perAction, placeholdersOf, promptTokens, resolveHostText, sequenceId, sessionPartSummary, stripSystemNote, systemNote, tableOf, totalUsageTokens, translatorFor, turnDigest, unfixedRules, utf8ByteLength, wireFields };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epoch-agent/protocol",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "private": false,
5
5
  "description": "epoch-agent 契约层:工具 / 事件 / 权限 / 插件的类型定义,零运行时依赖",
6
6
  "repository": {