dsh-scout 0.9.0 → 0.9.2

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/i18n.js ADDED
@@ -0,0 +1,299 @@
1
+ export const SCOUT_LANGUAGES = ['zh-CN', 'en'];
2
+ export function isScoutLanguage(value) {
3
+ return typeof value === 'string' && SCOUT_LANGUAGES.includes(value);
4
+ }
5
+ /** Resolve any value to a supported language, falling back to the `zh-CN` default. */
6
+ export function normalizeScoutLanguage(value) {
7
+ return isScoutLanguage(value) ? value : 'zh-CN';
8
+ }
9
+ /** Fill `{placeholder}` slots in a localized template; unknown slots stay verbatim. */
10
+ export function formatScoutString(template, values) {
11
+ return template.replace(/\{(\w+)\}/g, (match, key) => {
12
+ const value = values[key];
13
+ return value === undefined ? match : String(value);
14
+ });
15
+ }
16
+ const ZH_CN = {
17
+ language: 'zh-CN',
18
+ header: {
19
+ decision: '- 判断:**{decision}**',
20
+ reason: '- 理由:{reason}',
21
+ objective: '- 目标:{objective}',
22
+ evidenceSummary: '- 证据概况:{summary}',
23
+ },
24
+ headings: {
25
+ supportingEvidence: '## Key supporting evidence (up to 3)',
26
+ unresolvedRisks: '## Blocking or unresolved risks (up to 3)',
27
+ roleHypotheses: '## Role task and authority hypotheses',
28
+ verificationChecklist: '## Verification checklist',
29
+ claimLedger: '## Claim ledger',
30
+ sources: '## Sources',
31
+ coverage: '## Coverage',
32
+ interviewQuestions: '## Interview questions',
33
+ },
34
+ claim: {
35
+ line: '- **{status} / {evidenceLevel} / {impact}** {text}(维度:{dimension};来源:{sourceIds};置信说明:{confidenceNote};下一步:{nextAction}{history})',
36
+ noSourceIds: '无来源',
37
+ history: ';历史修订:{count}',
38
+ checklistLine: '- [{impact}] {claimId}: {text} → 下一步:{nextAction}',
39
+ },
40
+ empty: {
41
+ noSources: '- 暂无来源',
42
+ noClaims: '- 暂无结论',
43
+ noSupportingEvidence: '- 暂无已核验的支持证据',
44
+ noUnresolvedRisks: '- 暂无阻断级或重要待核验风险',
45
+ noRoleHypotheses: '- 岗位真实性、汇报关系和授权边界尚未建模',
46
+ noChecklistItems: '- 无待核验的阻断级或重要事项',
47
+ },
48
+ coverage: {
49
+ entry: '- {dimension}({label}):已核验 {verified} / 待核验 {open} / 未调查:{untouched}',
50
+ untouchedLine: '未调查维度({count}):{dimensions}',
51
+ yes: '是',
52
+ no: '否',
53
+ none: '无',
54
+ separator: '、',
55
+ },
56
+ decisions: {
57
+ PROCEED: '继续推进',
58
+ VERIFY: '继续核验',
59
+ STOP: '停止',
60
+ },
61
+ decisionReasons: {
62
+ identity: '公司主体仍未核验,不能直接推进。',
63
+ unresolved: '仍有阻断级或重要结论未完成核验,不能直接推进。',
64
+ missingDimension: '缺少已核验的必需维度:{dimension}。',
65
+ proceed: '当前关键结论均有来源支撑,建议进入下一轮并继续现场核验。',
66
+ blockingContradiction: '存在相互矛盾的关键事实,需先解决冲突。',
67
+ },
68
+ statuses: {
69
+ verified: '已核验',
70
+ reported: '转述',
71
+ inferred: '推断',
72
+ contradicted: '矛盾',
73
+ unknown: '未知',
74
+ needs_verification: '待核验',
75
+ },
76
+ evidenceLevels: {
77
+ E0: 'E0(无证据)',
78
+ E1: 'E1(单方陈述)',
79
+ E2: 'E2(独立来源)',
80
+ E3: 'E3(权威来源)',
81
+ },
82
+ impacts: {
83
+ blocking: '阻断级',
84
+ material: '重要',
85
+ informational: '参考',
86
+ },
87
+ dimensions: {
88
+ identity: '主体身份',
89
+ role_existence: '岗位真实性',
90
+ reporting_line: '汇报关系',
91
+ mandate: '授权与职责',
92
+ company_and_founder: '公司与创始人',
93
+ product_and_technology: '产品与技术',
94
+ market_and_competition: '市场与竞争',
95
+ financing_and_commercialization: '融资与商业化',
96
+ organization_and_hr: '组织与人力',
97
+ risk: '风险',
98
+ role_fit: '岗位匹配度',
99
+ },
100
+ questions: {
101
+ identity: '公司主体的法定名称、注册号与注册地是什么?如何与品牌对应?',
102
+ role_existence: '该岗位当前是否真实在招?招聘状态与到岗时间如何?',
103
+ reporting_line: '该岗位直接向谁汇报?虚线/实线如何划分?',
104
+ mandate: '该岗位在哪些事项上拥有最终决定权?团队与预算规模如何?',
105
+ company_and_founder: '创始团队背景与股权结构如何?关键决策人是谁?',
106
+ product_and_technology: '核心产品当前处于什么阶段?技术壁垒与依赖是什么?',
107
+ market_and_competition: '目标市场与主要竞争对手是谁?差异化优势如何维持?',
108
+ financing_and_commercialization: '当前融资轮次、现金储备与商业化进展如何?',
109
+ organization_and_hr: '当前组织规模、关键岗位空缺与离职率如何?',
110
+ risk: '已知的合规、诉讼或经营风险有哪些?处置进展如何?',
111
+ role_fit: '该岗位的成功标准是什么?与我的经验差距在哪里?',
112
+ },
113
+ defaults: {
114
+ decisionObjective: '判断是否值得进入下一轮,并准备面试反问',
115
+ fitQuestion: '该岗位是否拥有足够的业务授权,值得继续推进?',
116
+ initialDecisionReason: '尚未完成公司主体和岗位授权核验。',
117
+ interviewQuestions: [
118
+ '这个岗位在前三个月最重要的业务结果是什么?',
119
+ '该岗位直接向谁汇报,在哪些事项上拥有最终决定权?',
120
+ '现有团队、预算和外部供应商资源分别是什么?',
121
+ '当前最影响业务增长的组织问题是什么?',
122
+ '六个月后,哪些可观察结果代表这个岗位取得成功?',
123
+ ],
124
+ },
125
+ ingest: {
126
+ autoConfidenceNote: '由采集项自动登记,来源 {sourceId}',
127
+ autoNextAction: '核验该主张并补充独立来源',
128
+ },
129
+ comparison: {
130
+ title: '# 公司/岗位对比({count} 个案例)',
131
+ overviewHeading: '## 总览',
132
+ summary: '- **{title}**:决策 **{decision}**;主体{identity};主张 {claimCount} 条{countsSuffix}',
133
+ countsSuffix: '({counts})',
134
+ identityVerified: '已核验',
135
+ identityUnverified: '待核验',
136
+ decisionTableHeading: '## 决策与主体核验对比',
137
+ tableHeader: '| 案例 | 决策 | 主体核验 | 主张数 |',
138
+ tableSeparator: '|---|---|---|---|',
139
+ tableRow: '| {title} | {decision} | {identity} | {claimCount} |',
140
+ verifiedMark: '✅ 已核验',
141
+ unverifiedMark: '⚠️ 待核验',
142
+ detailHeading: '## 各案例详情',
143
+ detailTitle: '### {title}({caseId})',
144
+ verifiedHeading: '**关键已核验结论**:',
145
+ openHeading: '**待核验风险/未知项**:',
146
+ noVerified: '- 暂无已核验结论',
147
+ noOpen: '- 无',
148
+ openItem: '- [{impact}] {text} → {nextAction}',
149
+ questionsHeading: '## 面试问题(合并去重,前 12 条)',
150
+ disclaimer: '> 对比只呈现各案例证据边界内的状态,不替代法律、投资或医疗意见;关键差异请以原始来源人工复核。',
151
+ },
152
+ reportDisclaimer: '> 本报告只表达当前证据边界内的判断,不替代法律、投资或医疗意见。',
153
+ };
154
+ const EN = {
155
+ language: 'en',
156
+ header: {
157
+ decision: '- Decision: **{decision}**',
158
+ reason: '- Reason: {reason}',
159
+ objective: '- Objective: {objective}',
160
+ evidenceSummary: '- Evidence summary: {summary}',
161
+ },
162
+ headings: {
163
+ supportingEvidence: '## Key supporting evidence (up to 3)',
164
+ unresolvedRisks: '## Blocking or unresolved risks (up to 3)',
165
+ roleHypotheses: '## Role task and authority hypotheses',
166
+ verificationChecklist: '## Verification checklist',
167
+ claimLedger: '## Claim ledger',
168
+ sources: '## Sources',
169
+ coverage: '## Coverage',
170
+ interviewQuestions: '## Interview questions',
171
+ },
172
+ claim: {
173
+ line: '- **{status} / {evidenceLevel} / {impact}** {text} (dimension: {dimension}; sources: {sourceIds}; confidence: {confidenceNote}; next action: {nextAction}{history})',
174
+ noSourceIds: 'no source',
175
+ history: '; revisions: {count}',
176
+ checklistLine: '- [{impact}] {claimId}: {text} → next action: {nextAction}',
177
+ },
178
+ empty: {
179
+ noSources: '- No sources yet',
180
+ noClaims: '- No claims yet',
181
+ noSupportingEvidence: '- No verified supporting evidence yet',
182
+ noUnresolvedRisks: '- No blocking or material claims awaiting verification',
183
+ noRoleHypotheses: '- Role existence, reporting line, and authority boundary are not modelled yet',
184
+ noChecklistItems: '- No blocking or material items awaiting verification',
185
+ },
186
+ coverage: {
187
+ entry: '- {dimension} ({label}): verified {verified} / open {open} / untouched: {untouched}',
188
+ untouchedLine: 'Untouched dimensions ({count}): {dimensions}',
189
+ yes: 'yes',
190
+ no: 'no',
191
+ none: 'none',
192
+ separator: ', ',
193
+ },
194
+ decisions: {
195
+ PROCEED: 'proceed',
196
+ VERIFY: 'verify',
197
+ STOP: 'stop',
198
+ },
199
+ decisionReasons: {
200
+ identity: 'The company identity is not verified yet, so we cannot proceed.',
201
+ unresolved: 'Blocking or material claims are still unverified, so we cannot proceed.',
202
+ missingDimension: 'Missing verified required dimension: {dimension}.',
203
+ proceed: 'All key claims are backed by sources; proceed to the next round and keep verifying on site.',
204
+ blockingContradiction: 'Blocking facts contradict each other; resolve the conflict before deciding.',
205
+ },
206
+ statuses: {
207
+ verified: 'verified',
208
+ reported: 'reported',
209
+ inferred: 'inferred',
210
+ contradicted: 'contradicted',
211
+ unknown: 'unknown',
212
+ needs_verification: 'needs verification',
213
+ },
214
+ evidenceLevels: {
215
+ E0: 'E0 (no evidence)',
216
+ E1: 'E1 (single-party account)',
217
+ E2: 'E2 (independent source)',
218
+ E3: 'E3 (authoritative source)',
219
+ },
220
+ impacts: {
221
+ blocking: 'blocking',
222
+ material: 'material',
223
+ informational: 'informational',
224
+ },
225
+ dimensions: {
226
+ identity: 'Company identity',
227
+ role_existence: 'Role existence',
228
+ reporting_line: 'Reporting line',
229
+ mandate: 'Mandate and authority',
230
+ company_and_founder: 'Company and founder',
231
+ product_and_technology: 'Product and technology',
232
+ market_and_competition: 'Market and competition',
233
+ financing_and_commercialization: 'Financing and commercialization',
234
+ organization_and_hr: 'Organization and HR',
235
+ risk: 'Risk',
236
+ role_fit: 'Role fit',
237
+ },
238
+ questions: {
239
+ identity: 'What are the legal name, registration number, and registered region of the entity behind the brand?',
240
+ role_existence: 'Is this role actually open right now, and what are the hiring status and start date?',
241
+ reporting_line: 'Who does this role report to, and how are the solid and dotted lines split?',
242
+ mandate: 'Which decisions does this role own, and what are the team and budget sizes?',
243
+ company_and_founder: 'What is the founding team background and cap table, and who makes the key decisions?',
244
+ product_and_technology: 'What stage is the core product at, and what are its technical moat and dependencies?',
245
+ market_and_competition: 'Who are the main competitors in the target market, and how is the differentiation maintained?',
246
+ financing_and_commercialization: 'What are the current funding round, cash runway, and commercialization progress?',
247
+ organization_and_hr: 'What are the current headcount, key open roles, and attrition rate?',
248
+ risk: 'What known compliance, litigation, or operational risks exist, and how are they being handled?',
249
+ role_fit: 'What does success look like in this role, and where does my experience fall short?',
250
+ },
251
+ defaults: {
252
+ decisionObjective: 'Decide whether this role is worth pursuing, and prepare questions to ask.',
253
+ fitQuestion: 'Does this role carry enough business authority to be worth pursuing?',
254
+ initialDecisionReason: 'Company identity and role authority have not been verified yet.',
255
+ interviewQuestions: [
256
+ 'What business outcomes matter most in this role in the first three months?',
257
+ 'Who does this role report to, and which decisions does it own?',
258
+ 'What team, budget, and external vendor resources are in place today?',
259
+ 'What organizational problem most constrains business growth right now?',
260
+ 'What observable results would mean this role succeeded six months from now?',
261
+ ],
262
+ },
263
+ ingest: {
264
+ autoConfidenceNote: 'Auto-registered from an ingested item; source {sourceId}',
265
+ autoNextAction: 'Verify this claim and add an independent source',
266
+ },
267
+ comparison: {
268
+ title: '# Company / role comparison ({count} cases)',
269
+ overviewHeading: '## Overview',
270
+ summary: '- **{title}**: decision **{decision}**; identity {identity}; claims: {claimCount}{countsSuffix}',
271
+ countsSuffix: ' ({counts})',
272
+ identityVerified: 'verified',
273
+ identityUnverified: 'unverified',
274
+ decisionTableHeading: '## Decision and identity comparison',
275
+ tableHeader: '| Case | Decision | Identity | Claims |',
276
+ tableSeparator: '|---|---|---|---|',
277
+ tableRow: '| {title} | {decision} | {identity} | {claimCount} |',
278
+ verifiedMark: '✅ verified',
279
+ unverifiedMark: '⚠️ unverified',
280
+ detailHeading: '## Case details',
281
+ detailTitle: '### {title} ({caseId})',
282
+ verifiedHeading: '**Key verified claims**:',
283
+ openHeading: '**Unresolved risks / unknowns**:',
284
+ noVerified: '- No verified claims yet',
285
+ noOpen: '- None',
286
+ openItem: '- [{impact}] {text} → {nextAction}',
287
+ questionsHeading: '## Interview questions (merged and deduplicated, first 12)',
288
+ disclaimer: '> This comparison only reports the status inside each case evidence boundary; it does not replace legal, investment, or medical advice. Verify key differences against the original sources.',
289
+ },
290
+ reportDisclaimer: '> This report only states judgements within the current evidence boundary; it does not replace legal, investment, or medical advice.',
291
+ };
292
+ const TABLES = {
293
+ 'zh-CN': ZH_CN,
294
+ en: EN,
295
+ };
296
+ /** Look up the string table for a language; an unknown or missing language falls back to `zh-CN`. */
297
+ export function scoutStrings(lang) {
298
+ return TABLES[normalizeScoutLanguage(lang)];
299
+ }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Context } from '@deepseek-ai/cordis';
2
2
  import z from '@deepseek-ai/schemastery';
3
+ import { type ScoutLanguage } from './i18n.js';
3
4
  export declare const name = "dsh-scout";
4
5
  export declare const inject: string[];
5
6
  export interface Config {
@@ -9,15 +10,19 @@ export interface Config {
9
10
  autoPersist?: boolean;
10
11
  /** Trusted authority host suffixes used by the E3 evidence policy. */
11
12
  authorityHostSuffixes?: readonly string[];
13
+ /** Language used by the rendered report, comparison and interview questions. */
14
+ language?: ScoutLanguage;
12
15
  }
13
- export declare const Config: z<Schemastery.ObjectS<{
14
- scoutDir: z<string, string>;
15
- autoPersist: z<boolean, boolean>;
16
- authorityHostSuffixes: z<string[], string[]>;
17
- }>, Schemastery.ObjectT<{
18
- scoutDir: z<string, string>;
19
- autoPersist: z<boolean, boolean>;
20
- authorityHostSuffixes: z<string[], string[]>;
21
- }>>;
16
+ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
17
+ scoutDir: z<string, string, "defined">;
18
+ autoPersist: z<boolean, boolean, "defined">;
19
+ authorityHostSuffixes: z<string[], string[], "defined">;
20
+ language: z<"zh-CN" | "en", "zh-CN" | "en", "defined">;
21
+ }>>, Schemastery.ObjectT<NoInfer<{
22
+ scoutDir: z<string, string, "defined">;
23
+ autoPersist: z<boolean, boolean, "defined">;
24
+ authorityHostSuffixes: z<string[], string[], "defined">;
25
+ language: z<"zh-CN" | "en", "zh-CN" | "en", "defined">;
26
+ }>>, "plain">;
22
27
  export declare function apply(ctx: Context, config?: Config): void;
23
28
  export * from './model.js';