@wacry/codeks-bridge 0.0.14 → 0.0.15

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/docs/inspect.md CHANGED
@@ -114,7 +114,7 @@ codeks-bridge serve --config /absolute/path/bridge.json --capture
114
114
  | compaction | `summary` / `handoff` | `source_not_allowed` | 原生检查点来源不在允许列表 |
115
115
  | compaction | `summary` / `handoff` | `format_mismatch` | 原生检查点格式与当前 adapter 不同 |
116
116
 
117
- `summary` 表示直接使用载荷中已有的文字,`handoff` 表示先取得文字交接:可以复用本地缓存,也可以向原来源生成。只有实际发起辅助请求时,上游调用列表才出现 `handoff`;这条状态标注本身不表示发生了额外 HTTP 请求。
117
+ `summary` 表示直接使用载荷中已有的文字。`no_native` 的标注显示“压缩 · 使用文字摘要”:这种检查点只保存摘要,没有原生来源信息,是正常的文字压缩。无法识别的原始密文仍标为 `unrecognized_state`,按配置透传、过滤或拒绝。`handoff` 表示先取得文字交接:可以复用本地缓存,也可以向原来源生成。只有实际发起辅助请求时,上游调用列表才出现 `handoff`;这条状态标注本身不表示发生了额外 HTTP 请求。
118
118
 
119
119
  响应侧标注 bridge 新生成的 reasoning 与压缩项(决定为 `output`)。流式响应指向 `response.output_item.done` 事件里的 `/item`,非流式响应指向 `/output/k`。只有文字摘要的压缩项没有原生部分,来源和格式为空;`native` 检查点的来源和格式取原生部分。
120
120
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wacry/codeks-bridge",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Configurable local Responses API bridge for codeks with GPT, Claude Messages, and DeepSeek Chat adapters.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "David Zhang",
package/ui/labels.js CHANGED
@@ -17,7 +17,7 @@ export const END_LABEL = { active: '传输中', complete: '完整', cancelled: '
17
17
  const DECISION = { replay: '回放', passthrough: '原样透传', drop: '丢弃', native: '恢复原生', summary: '文字摘要', handoff: '按需文字交接', reject: '拒绝', output: '输出' };
18
18
  const DECISION_CLASS = { replay: 'ok', passthrough: 'info', native: 'ok', drop: 'warn', summary: 'warn', handoff: 'warn', reject: 'bad', output: 'info' };
19
19
  // Verb shown before the reason text, per decision.
20
- const VERB = { replay: '回放', passthrough: '原样透传', drop: '丢弃', reject: '拒绝', summary: '改用文字摘要', handoff: '获取文字交接', native: '恢复原生压缩' };
20
+ const VERB = { replay: '回放', passthrough: '原样透传', drop: '丢弃', reject: '拒绝', summary: '使用文字摘要', handoff: '获取文字交接', native: '恢复原生压缩' };
21
21
 
22
22
  const REASON = {
23
23
  reasoning: {
@@ -29,7 +29,7 @@ const REASON = {
29
29
  },
30
30
  compaction: {
31
31
  native_restored: '',
32
- no_native: '检查点没有原生表示',
32
+ no_native: '',
33
33
  native_replay_disabled: '目标关闭了 native_replay',
34
34
  source_not_allowed: '来源未在原生压缩白名单',
35
35
  format_mismatch: '原生格式与目标不匹配',
@@ -57,7 +57,9 @@ export function sourceText(src) {
57
57
  }
58
58
 
59
59
  export function annChip(a, onClick) {
60
- const parts = [KIND_TEXT[a.kind] ?? a.kind, a.source ? sourceText(a.source) : (a.decision === 'output' ? null : '来源未知'), reasonText(a)].filter(Boolean);
60
+ const source = a.source ? sourceText(a.source)
61
+ : (a.decision === 'output' || (a.kind === 'compaction' && a.reason === 'no_native') ? null : '来源未知');
62
+ const parts = [KIND_TEXT[a.kind] ?? a.kind, source, reasonText(a)].filter(Boolean);
61
63
  return h('span', {
62
64
  class: `chip ann ${decisionClass(a.decision)}${onClick ? ' click' : ''}`,
63
65
  title: `${a.target}${a.event != null ? ` 事件 #${a.event}` : ''} ${a.pointer ?? ''}\n原因代码:${a.reason}\n格式:${a.format ?? '–'}`,