@roll-agent/smart-reply-agent 0.4.0 → 1.1.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/SKILL.md +25 -37
- package/dist/index.js +1 -1
- package/dist/services/reply-authority-client.d.ts +2 -0
- package/dist/tools/generate-reply.d.ts +31 -43
- package/dist/types/candidate-info.d.ts +57 -0
- package/dist/types/funnel-stage.d.ts +4 -0
- package/dist/types/model-config.d.ts +66 -0
- package/dist/types/reply-authority.d.ts +785 -0
- package/package.json +2 -16
- package/references/env.yaml +6 -26
- package/data/brand-config.sample.json +0 -83
- package/dist/ai/model-registry.d.ts +0 -103
- package/dist/ai/structured-output.d.ts +0 -61
- package/dist/errors/app-error.d.ts +0 -42
- package/dist/errors/error-codes.d.ts +0 -48
- package/dist/errors/error-factory.d.ts +0 -30
- package/dist/errors/error-utils.d.ts +0 -39
- package/dist/errors/index.d.ts +0 -8
- package/dist/log-control.d.ts +0 -2
- package/dist/pipeline/age-eligibility.d.ts +0 -94
- package/dist/pipeline/candidate-context.d.ts +0 -8
- package/dist/pipeline/candidate-utils.d.ts +0 -5
- package/dist/pipeline/classification.d.ts +0 -13
- package/dist/pipeline/context-builder.d.ts +0 -21
- package/dist/pipeline/pipeline-progress.d.ts +0 -9
- package/dist/pipeline/reply-gate.d.ts +0 -19
- package/dist/pipeline/smart-reply.d.ts +0 -64
- package/dist/pipeline.d.ts +0 -21
- package/dist/pipeline.js +0 -1
- package/dist/services/brand-alias.d.ts +0 -4
- package/dist/services/brand-config-selectors.d.ts +0 -7
- package/dist/services/config-loader.d.ts +0 -11
- package/dist/services/duliday-api.d.ts +0 -30
- package/dist/services/duliday-mapper.d.ts +0 -8
- package/dist/tools/sync-brand-data.d.ts +0 -11
- package/dist/types/brand-resolution.d.ts +0 -83
- package/dist/types/classification.d.ts +0 -181
- package/dist/types/config.d.ts +0 -3
- package/dist/types/duliday-api.d.ts +0 -7197
- package/dist/types/geocoding.d.ts +0 -23
- package/dist/types/reply-policy.d.ts +0 -1390
- package/dist/types/zhipin.d.ts +0 -2196
- package/references/reply-policy-schema.md +0 -148
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
# Reply Policy Configuration Schema
|
|
2
|
-
|
|
3
|
-
`ReplyPolicyConfig` 是 `smart-reply-agent` 的回复策略配置。配置文件为 `data/reply-policy.json`。
|
|
4
|
-
|
|
5
|
-
这份配置应被视为**固定契约**:上层编排器只应修改这里文档化的字段,不应添加自定义字段。当前实现基于 Zod `object()` 解析,未声明字段不属于稳定接口,可能被忽略或在未来版本失效。
|
|
6
|
-
|
|
7
|
-
## 顶层字段
|
|
8
|
-
|
|
9
|
-
| 字段 | 类型 | 说明 |
|
|
10
|
-
|------|------|------|
|
|
11
|
-
| `stageGoals` | object | 每个漏斗阶段的目标、成功标准和推进策略 |
|
|
12
|
-
| `persona` | object | 回复人格:语气、亲和度、长度、提问风格等 |
|
|
13
|
-
| `industryVoices` | record | 行业语调配置(key 为 voiceId) |
|
|
14
|
-
| `defaultIndustryVoiceId` | string | 默认行业语调 ID |
|
|
15
|
-
| `hardConstraints` | object | 不可违反的红线规则 |
|
|
16
|
-
| `factGate` | object | 事实校验策略(strict/balanced/open) |
|
|
17
|
-
| `qualificationPolicy` | object | 候选人资格校验策略(当前含 age) |
|
|
18
|
-
| `outputGuards` | object | 输出质量守卫(追问数量、禁用审查措辞等) |
|
|
19
|
-
|
|
20
|
-
## stageGoals
|
|
21
|
-
|
|
22
|
-
固定阶段键:
|
|
23
|
-
|
|
24
|
-
- `trust_building`
|
|
25
|
-
- `private_channel`
|
|
26
|
-
- `qualify_candidate`
|
|
27
|
-
- `job_consultation`
|
|
28
|
-
- `interview_scheduling`
|
|
29
|
-
- `onboard_followup`
|
|
30
|
-
|
|
31
|
-
每个阶段对象包含:
|
|
32
|
-
|
|
33
|
-
| 字段 | 类型 | 说明 |
|
|
34
|
-
|------|------|------|
|
|
35
|
-
| `description` | string | 阶段说明(可选) |
|
|
36
|
-
| `primaryGoal` | string | 该阶段的核心目标 |
|
|
37
|
-
| `successCriteria` | string[] | 判定阶段成功的标准 |
|
|
38
|
-
| `ctaStrategy` | string | 推进下一步的策略 |
|
|
39
|
-
| `disallowedActions` | string[] | 该阶段禁止的行为(可选) |
|
|
40
|
-
|
|
41
|
-
归一化规则:
|
|
42
|
-
|
|
43
|
-
- `private_channel` 在 schema 中是可选的;如果省略,解析后会自动回退为 `trust_building`
|
|
44
|
-
- `ctaStrategy` 支持传入 `string` 或 `string[]`
|
|
45
|
-
- 如果传入 `string[]`,解析时会用换行符拼接为单个字符串
|
|
46
|
-
|
|
47
|
-
## persona
|
|
48
|
-
|
|
49
|
-
| 字段 | 类型 | 可选值/说明 |
|
|
50
|
-
|------|------|------------|
|
|
51
|
-
| `tone` | string | 如 "口语化" |
|
|
52
|
-
| `warmth` | string | 如 "高" |
|
|
53
|
-
| `humor` | string | 如 "低" |
|
|
54
|
-
| `length` | enum | `"short"` / `"medium"` / `"long"` |
|
|
55
|
-
| `questionStyle` | string | 如 "单轮一个关键问题" |
|
|
56
|
-
| `empathyStrategy` | string | 如 "先认可关切再给建议" |
|
|
57
|
-
| `addressStyle` | string | 如 "使用你" |
|
|
58
|
-
| `professionalIdentity` | string | 如 "资深招聘专员" |
|
|
59
|
-
| `companyBackground` | string | 如 "连锁餐饮招聘" |
|
|
60
|
-
|
|
61
|
-
## industryVoices
|
|
62
|
-
|
|
63
|
-
`industryVoices` 是 `record<string, IndustryVoicePolicy>`,key 为 `voiceId`,value 为语调对象。
|
|
64
|
-
|
|
65
|
-
每个 voice 对象包含:
|
|
66
|
-
|
|
67
|
-
| 字段 | 类型 | 说明 |
|
|
68
|
-
|------|------|------|
|
|
69
|
-
| `name` | string | 语调名称 |
|
|
70
|
-
| `industryBackground` | string | 行业背景描述 |
|
|
71
|
-
| `jargon` | string[] | 行业术语 |
|
|
72
|
-
| `styleKeywords` | string[] | 风格关键词 |
|
|
73
|
-
| `tabooPhrases` | string[] | 禁用表达 |
|
|
74
|
-
| `guidance` | string[] | 语调指导原则 |
|
|
75
|
-
|
|
76
|
-
相关字段:
|
|
77
|
-
|
|
78
|
-
| 字段 | 类型 | 说明 |
|
|
79
|
-
|------|------|------|
|
|
80
|
-
| `defaultIndustryVoiceId` | string | 默认 voiceId;应对应 `industryVoices` 中的某个 key |
|
|
81
|
-
|
|
82
|
-
## hardConstraints
|
|
83
|
-
|
|
84
|
-
| 字段 | 类型 | 说明 |
|
|
85
|
-
|------|------|------|
|
|
86
|
-
| `rules` | object[] | 红线规则数组 |
|
|
87
|
-
|
|
88
|
-
每条 rule 包含:
|
|
89
|
-
|
|
90
|
-
| 字段 | 类型 | 可选值/说明 |
|
|
91
|
-
|------|------|------------|
|
|
92
|
-
| `id` | string | 规则 ID |
|
|
93
|
-
| `rule` | string | 规则正文 |
|
|
94
|
-
| `severity` | enum | `"high"` / `"medium"` / `"low"` |
|
|
95
|
-
|
|
96
|
-
## factGate
|
|
97
|
-
|
|
98
|
-
| 字段 | 类型 | 可选值/说明 |
|
|
99
|
-
|------|------|------------|
|
|
100
|
-
| `mode` | enum | `"strict"` / `"balanced"` / `"open"` |
|
|
101
|
-
| `verifiableClaimTypes` | string[] | 需要事实校验的声明类型;当前 schema 不限制固定枚举 |
|
|
102
|
-
| `fallbackBehavior` | enum | `"generic_answer"` / `"ask_followup"` / `"handoff"` |
|
|
103
|
-
| `forbiddenWhenMissingFacts` | string[] | 缺事实时禁止输出的内容类型;当前 schema 不限制固定枚举 |
|
|
104
|
-
|
|
105
|
-
## qualificationPolicy
|
|
106
|
-
|
|
107
|
-
`qualificationPolicy` 当前只包含一个固定子对象:
|
|
108
|
-
|
|
109
|
-
- `age`
|
|
110
|
-
|
|
111
|
-
## qualificationPolicy.age
|
|
112
|
-
|
|
113
|
-
| 字段 | 类型 | 默认值 | 说明 |
|
|
114
|
-
|------|------|--------|------|
|
|
115
|
-
| `enabled` | boolean | `true` | 是否启用年龄资格校验 |
|
|
116
|
-
| `revealRange` | boolean | `false` | 是否允许透露年龄范围 |
|
|
117
|
-
| `failStrategy` | string | "礼貌说明不匹配,避免承诺" | 不符合时的表达策略 |
|
|
118
|
-
| `unknownStrategy` | string | "先核实年龄或资格条件" | 未知时的表达策略 |
|
|
119
|
-
| `passStrategy` | string | "确认匹配后推进下一步" | 符合时的表达策略 |
|
|
120
|
-
| `allowRedirect` | boolean | `true` | 不符合时是否允许推荐其他岗位 |
|
|
121
|
-
| `redirectPriority` | enum | `"medium"` | `"low"` / `"medium"` / `"high"` |
|
|
122
|
-
|
|
123
|
-
## outputGuards
|
|
124
|
-
|
|
125
|
-
| 字段 | 类型 | 默认值 | 说明 |
|
|
126
|
-
|------|------|--------|------|
|
|
127
|
-
| `maxQuestionsByMode.minimal` | number | `1` | minimal 模式下最多追问数 |
|
|
128
|
-
| `maxQuestionsByMode.focused` | number | `2` | focused 模式下最多追问数 |
|
|
129
|
-
| `blockedAuditPhrases` | string[] | 见默认值 | 禁止的审查式措辞 |
|
|
130
|
-
| `blockFirstTurnSpecificFacts` | boolean | `true` | 首轮是否禁止输出具体事实 |
|
|
131
|
-
|
|
132
|
-
当前默认 `blockedAuditPhrases`:
|
|
133
|
-
|
|
134
|
-
- `是否满足`
|
|
135
|
-
- `是否符合`
|
|
136
|
-
- `基本入职要求`
|
|
137
|
-
- `先确认资格`
|
|
138
|
-
- `年龄是否符合`
|
|
139
|
-
|
|
140
|
-
## 默认值与归一化
|
|
141
|
-
|
|
142
|
-
以下行为来自当前 schema 实现:
|
|
143
|
-
|
|
144
|
-
- `qualificationPolicy` 整体有默认值;如果整个对象缺失,会自动补齐默认 `age` 配置
|
|
145
|
-
- `qualificationPolicy.age` 各字段有默认值;部分缺失时会自动补齐
|
|
146
|
-
- `outputGuards` 整体有默认值;缺失时会自动使用默认追问上限和默认禁用措辞
|
|
147
|
-
- `stageGoals.private_channel` 缺失时,会自动回退为 `trust_building`
|
|
148
|
-
- `ctaStrategy` 允许 `string[]` 输入,但归一化后始终是单个字符串
|