@hcmai/sdk 0.3.11 → 0.3.12

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
@@ -1,5 +1,178 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
 
3
+ /**
4
+ * 侦察层对 HTTP 的**窄端口**与**响应分类**。
5
+ *
6
+ * 🔴 为什么是端口而不是搬一份客户端过来(ADR-319 刀 6b 明令):
7
+ * CLI 已经有认证 / endpoint 解析 / token 刷新 / 拦截器这一整条管道
8
+ * (`packages/core/src/client.ts` + `src/http/`)。侦察层再造一份,就是
9
+ * 「集成 reference path 必复用 helper」那条铁律的反面。
10
+ *
11
+ * 但**响应分类**不在那条管道里,而它是侦察层的命根子:顾问打的是一个陌生环境,
12
+ * 「没权限」「没这个端点」「网关吐了 HTML」「连不上」的下一步完全不同。
13
+ * 把它们压成一个布尔,产物里就再也分不出来了。所以这一层必须自己有。
14
+ *
15
+ * ⚠️ `error` 用字符串而不是布尔:要区分的不是「成没成」,而是「没成是哪一种」。
16
+ * 判成功一律写 `error === 'ok'`,别写 `!error`。
17
+ */
18
+
19
+ /** 响应分类的完整取值域。 */
20
+ type OutcomeError = 'ok' | 'unauthorized' | 'forbidden' | 'not-found' | 'server-error' | 'bad-response' | 'network';
21
+ interface Outcome {
22
+ /** 网络层没走通时是 `-1`——它不是 HTTP 状态,别拿去和 4xx 比。 */
23
+ status: number;
24
+ /** 🔴 是 unknown 不是对象:服务端完全可能返回 array / string / number。 */
25
+ body: unknown;
26
+ error: OutcomeError;
27
+ /**
28
+ * 本次响应的头,键一律小写。
29
+ *
30
+ * 🔴 挂在 Outcome 上而不是客户端实例上(Python 侧是 `client.last_headers`):
31
+ * 那种可变字段有「串味」风险——上一次成功的头留到这一次失败时被读到,
32
+ * 而 `probeExtensionSource` 恰恰是紧跟每次 GET 读头。挂在返回值上让串味**结构上不可能**,
33
+ * 契约里那几条「last_headers 必须清空」于是从「要测的行为」变成「构造上成立」。
34
+ */
35
+ headers: Record<string, string>;
36
+ }
37
+ interface ReconProbe {
38
+ get(path: string, params?: Record<string, unknown>): Promise<Outcome>;
39
+ post?(path: string, body: unknown): Promise<Outcome>;
40
+ getMany?(paths: string[]): Promise<Record<string, Outcome>>;
41
+ postMany?(jobs: Array<{
42
+ path: string;
43
+ body: unknown;
44
+ }>): Promise<Record<string, Outcome>>;
45
+ /** 爬取时声明的 capability 串——它是**爬法**属性,不是环境属性。 */
46
+ readonly capabilities: string;
47
+ }
48
+ /** 把既有 axios 管道(已带认证与刷新)适配成侦察层的窄端口。 */
49
+ declare function httpProbe(http: AxiosInstance, capabilities: string): Required<ReconProbe>;
50
+
51
+ /** 🔴 只有这三个分量作门。backendVersion 仅记录——实测它在 on-prem 恒返 "unknown"。 */
52
+ declare const GATE_COMPONENTS: readonly ["tenantMetaManifestDigest", "extensionSource", "modelListHash"];
53
+ declare const BLIND_SPOTS: string;
54
+ declare const MODELS_PATH = "/api/system/models";
55
+ declare const MANIFEST_PATH = "/api/tenant-meta/list";
56
+ declare const VERSION_PATH = "/api/version/backend";
57
+ declare const META_PATH = "/api/models/{model}/meta";
58
+ declare const EXTENSION_SOURCE_HEADER = "x-hcm-extension-source";
59
+ /**
60
+ * 探针上限。取不到就取不到,**不许**为了拿到一个值把 761 个模型全试一遍——
61
+ * 那会让 doctor 从「几秒」变成「几分钟」,而 doctor 存在的意义就是**快速**告诉顾问他站在哪儿。
62
+ *
63
+ * 🔴 为什么是 50 而不是 20:「20 够不够」这个问题,原工位实测第 1 个 key 就命中,
64
+ * 但**这不能证明任何别的环境**;若某环境排序靠前的 key 恰好全是隐藏型(实测有 19 个),
65
+ * 探针会空手而归并阻断门,而 key 21 可能就带着这个头。
66
+ * ⇒ 正确的应对**不是**把 20 换成另一个同样证明不了的数字,而是:
67
+ * ① 放宽到显然够用又不至于拖慢 doctor(命中即停,坏情况 50 × ~50ms ≈ 2.5s);
68
+ * ② 把失败讲清楚(见 attempted/answered)。判据从「猜一个够用的数」换成「失败时说得出为什么」。
69
+ */
70
+ declare const MAX_SOURCE_PROBES = 50;
71
+ /**
72
+ * 本模块的全部前提是「打一个不认识的环境」。一个把 totalPages 报成 2**31 的
73
+ * 服务端会让顾问的笔记本原地转圈。200 页 × 200 行 = 4 万行,远超真实 workspace。
74
+ */
75
+ declare const MAX_MANIFEST_PAGES = 200;
76
+ interface ModelEntry {
77
+ modelKey?: string;
78
+ type?: string;
79
+ [k: string]: unknown;
80
+ }
81
+ /**
82
+ * `/api/system/models` 的响应体 → **可用的**模型条目。
83
+ *
84
+ * 🔴 **这是唯一一道门**。原先 doctor / computeFingerprint / 布局解析三个点各写各的过滤,
85
+ * 第三个漏了——而它跑在**最前面**,客户网关一改清单形状,recon 就在第一步崩掉,
86
+ * 而 FDE 手上没有源码、没有安装包、也没有第二份基线可对照。
87
+ *
88
+ * 两种敌意形状都在这里挡掉,调用方不必(也不许)自己判:
89
+ * ① `body` 整体不是对象——服务端**声明**返 object,但网关扒掉 envelope 直接返数组是真会发生的;
90
+ * ② `models[]` 里混进非对象元素——部分序列化失败 / 拼接出错。
91
+ *
92
+ * ⚠️ **降级不是静默**:这里只负责「不崩」,「有没有掉东西」由调用方各自留痕。
93
+ */
94
+ declare function modelEntries(body: unknown): ModelEntry[];
95
+ /**
96
+ * `/api/system/models` 的响应体 → 探针用的 modelKey 列表(去空串 + 排序)。
97
+ *
98
+ * 🔴 空串过滤不能省:一条缺 `modelKey` 的记录会让第一发打到 `/api/models//meta`,
99
+ * 白烧一发**有限的**探针配额。
100
+ * 🔴 排序 = 探针确定性:同一个环境两次 recon 必须探同一个模型,否则 `extensionSourceProbe`
101
+ * 会无端漂移,看上去像环境变了。
102
+ */
103
+ declare function modelKeys(body: unknown): string[];
104
+ interface ProbeResult {
105
+ sourceKey: string;
106
+ probeModelKey: string;
107
+ attempted: number;
108
+ answered: number;
109
+ }
110
+ /**
111
+ * 探 `X-HCM-Extension-Source`。
112
+ *
113
+ * 🔴 **这个头只挂在 `GET /api/models/{model}/meta` 上,`/api/system/models` 上没有**。
114
+ * 读错端点的后果不是「偶尔取不到」,是**每一个真实环境上恒为 unknown**:三个门分量残掉
115
+ * 一个 ⇒ `compareFingerprint` 恒返 `incomplete:` ⇒ 门被 `--force-stale` 常态化绕过。
116
+ *
117
+ * 🔴 `answered` 不是凑数的统计量,它是「unknown 到底是哪种 unknown」的唯一判据。
118
+ * 只返回 `(sourceKey, probeModelKey)` 时,「一个模型都没答应」与「答应了但没回这个头」
119
+ * **都**返回空串、**都**写同一条失败条目——顾问看到 `unknown` 照样不知道该查连通/权限还是查反代。
120
+ * **一个自己都分辨不了的分辨承诺比不承诺更糟**,它让人以为这件事已经处理了。
121
+ */
122
+ declare function probeExtensionSource(probe: ReconProbe, keys: string[]): Promise<ProbeResult>;
123
+ /**
124
+ * 产物目录要用的 `sourceKey`——`recon` 打出去的**第一个**请求序列。
125
+ *
126
+ * 🔴 单独一个入口,而**不是**让命令层自己 `probe.get(MODELS_PATH)` 再就地取 key:
127
+ * `probeExtensionSource` 此前有三个调用点,其中一个(recon 的这一跳)漏了
128
+ * 「元素可能不是对象 / body 整体可能不是对象 / modelKey 可能是空串」这三道过滤,
129
+ * 于是客户网关一改清单形状,`recon` 就在第一步以一条裸堆栈收场 —— 而顾问手上
130
+ * 没有源码、没有安装包、也没有第二份基线可对照。
131
+ * 三处各修各的会再漏第四处;收进 `modelKeys()` 这**一道门**,漏不掉。
132
+ *
133
+ * 🔴 探不到时回 `'unknown'` 而不是抛:探不到是**可降级**的(产物目录名带 unknown,
134
+ * 顾问一眼看得出这份基线的层次身份没确认),而抛会让整轮爬取在第一步就没了。
135
+ */
136
+ declare function computeReconSourceKey(probe: ReconProbe): Promise<string>;
137
+ interface Fingerprint {
138
+ tenantMetaManifestDigest: string;
139
+ manifestEntryCount: number;
140
+ extensionSource: string;
141
+ extensionSourceProbe: string;
142
+ extensionSourceProbeAttempted: number;
143
+ extensionSourceProbeAnswered: number;
144
+ modelListHash: string;
145
+ modelCount: number;
146
+ backendVersion: unknown;
147
+ capabilities: string;
148
+ createdAt: string;
149
+ ttlDays: number;
150
+ coverageNotes: {
151
+ gateComponents: string[];
152
+ blindSpots: string;
153
+ fetchFailures: string[];
154
+ };
155
+ }
156
+ declare function computeFingerprint(probe: ReconProbe, opts?: {
157
+ ttlDays?: number;
158
+ now?: () => Date;
159
+ }): Promise<Fingerprint>;
160
+ /**
161
+ * 比对两份四元组,回**差异清单**(空 = 同源)。
162
+ *
163
+ * 🔴 某个分量没爬到时,它和「爬到了而且相等」在值上同形。两边都没爬到 → 三个分量全等
164
+ * → 门放行一份根本没验过的基线。所以残缺本身也要进差异清单。
165
+ */
166
+ declare function compareFingerprint(recorded: Record<string, unknown>, current: Record<string, unknown>): string[];
167
+
168
+ /**
169
+ * 列出目标环境有哪些 Model。
170
+ *
171
+ * 解析复用 `fde/fingerprint` 的 {@link modelEntries}——那里是这个响应形状的唯一一道门
172
+ * (网关扒 envelope、数组里混非对象都在那儿挡掉),此处不另写一份过滤。
173
+ */
174
+ declare function listModels(http: AxiosInstance): Promise<ModelEntry[]>;
175
+
3
176
  interface ModelQueryDsl {
4
177
  filter?: Record<string, unknown>;
5
178
  sort?: Array<Record<string, unknown>>;
@@ -223,6 +396,8 @@ declare class HcmClient {
223
396
  }): Promise<HcmClient>;
224
397
  query<T = Record<string, unknown>>(model: string, dsl: ModelQueryDsl): Promise<QueryResult<T>>;
225
398
  action<R = unknown>(model: string, name: string, input: ActionInput): Promise<ActionResult<R>>;
399
+ /** 列出目标环境有哪些 Model —— `describe` 的上一步。 */
400
+ listModels(): Promise<ModelEntry[]>;
226
401
  describe(model: string, opts?: DescribeOpts): Promise<ModelDescription>;
227
402
  create(model: string, data: Record<string, unknown>): Promise<CreateResult>;
228
403
  update(model: string, id: string, data: Record<string, unknown>): Promise<CreateResult>;
@@ -1962,171 +2137,6 @@ declare class LayoutContainmentError extends Error {
1962
2137
  constructor(message: string);
1963
2138
  }
1964
2139
 
1965
- /**
1966
- * 侦察层对 HTTP 的**窄端口**与**响应分类**。
1967
- *
1968
- * 🔴 为什么是端口而不是搬一份客户端过来(ADR-319 刀 6b 明令):
1969
- * CLI 已经有认证 / endpoint 解析 / token 刷新 / 拦截器这一整条管道
1970
- * (`packages/core/src/client.ts` + `src/http/`)。侦察层再造一份,就是
1971
- * 「集成 reference path 必复用 helper」那条铁律的反面。
1972
- *
1973
- * 但**响应分类**不在那条管道里,而它是侦察层的命根子:顾问打的是一个陌生环境,
1974
- * 「没权限」「没这个端点」「网关吐了 HTML」「连不上」的下一步完全不同。
1975
- * 把它们压成一个布尔,产物里就再也分不出来了。所以这一层必须自己有。
1976
- *
1977
- * ⚠️ `error` 用字符串而不是布尔:要区分的不是「成没成」,而是「没成是哪一种」。
1978
- * 判成功一律写 `error === 'ok'`,别写 `!error`。
1979
- */
1980
-
1981
- /** 响应分类的完整取值域。 */
1982
- type OutcomeError = 'ok' | 'unauthorized' | 'forbidden' | 'not-found' | 'server-error' | 'bad-response' | 'network';
1983
- interface Outcome {
1984
- /** 网络层没走通时是 `-1`——它不是 HTTP 状态,别拿去和 4xx 比。 */
1985
- status: number;
1986
- /** 🔴 是 unknown 不是对象:服务端完全可能返回 array / string / number。 */
1987
- body: unknown;
1988
- error: OutcomeError;
1989
- /**
1990
- * 本次响应的头,键一律小写。
1991
- *
1992
- * 🔴 挂在 Outcome 上而不是客户端实例上(Python 侧是 `client.last_headers`):
1993
- * 那种可变字段有「串味」风险——上一次成功的头留到这一次失败时被读到,
1994
- * 而 `probeExtensionSource` 恰恰是紧跟每次 GET 读头。挂在返回值上让串味**结构上不可能**,
1995
- * 契约里那几条「last_headers 必须清空」于是从「要测的行为」变成「构造上成立」。
1996
- */
1997
- headers: Record<string, string>;
1998
- }
1999
- interface ReconProbe {
2000
- get(path: string, params?: Record<string, unknown>): Promise<Outcome>;
2001
- post?(path: string, body: unknown): Promise<Outcome>;
2002
- getMany?(paths: string[]): Promise<Record<string, Outcome>>;
2003
- postMany?(jobs: Array<{
2004
- path: string;
2005
- body: unknown;
2006
- }>): Promise<Record<string, Outcome>>;
2007
- /** 爬取时声明的 capability 串——它是**爬法**属性,不是环境属性。 */
2008
- readonly capabilities: string;
2009
- }
2010
- /** 把既有 axios 管道(已带认证与刷新)适配成侦察层的窄端口。 */
2011
- declare function httpProbe(http: AxiosInstance, capabilities: string): Required<ReconProbe>;
2012
-
2013
- /** 🔴 只有这三个分量作门。backendVersion 仅记录——实测它在 on-prem 恒返 "unknown"。 */
2014
- declare const GATE_COMPONENTS: readonly ["tenantMetaManifestDigest", "extensionSource", "modelListHash"];
2015
- declare const BLIND_SPOTS: string;
2016
- declare const MODELS_PATH = "/api/system/models";
2017
- declare const MANIFEST_PATH = "/api/tenant-meta/list";
2018
- declare const VERSION_PATH = "/api/version/backend";
2019
- declare const META_PATH = "/api/models/{model}/meta";
2020
- declare const EXTENSION_SOURCE_HEADER = "x-hcm-extension-source";
2021
- /**
2022
- * 探针上限。取不到就取不到,**不许**为了拿到一个值把 761 个模型全试一遍——
2023
- * 那会让 doctor 从「几秒」变成「几分钟」,而 doctor 存在的意义就是**快速**告诉顾问他站在哪儿。
2024
- *
2025
- * 🔴 为什么是 50 而不是 20:「20 够不够」这个问题,原工位实测第 1 个 key 就命中,
2026
- * 但**这不能证明任何别的环境**;若某环境排序靠前的 key 恰好全是隐藏型(实测有 19 个),
2027
- * 探针会空手而归并阻断门,而 key 21 可能就带着这个头。
2028
- * ⇒ 正确的应对**不是**把 20 换成另一个同样证明不了的数字,而是:
2029
- * ① 放宽到显然够用又不至于拖慢 doctor(命中即停,坏情况 50 × ~50ms ≈ 2.5s);
2030
- * ② 把失败讲清楚(见 attempted/answered)。判据从「猜一个够用的数」换成「失败时说得出为什么」。
2031
- */
2032
- declare const MAX_SOURCE_PROBES = 50;
2033
- /**
2034
- * 本模块的全部前提是「打一个不认识的环境」。一个把 totalPages 报成 2**31 的
2035
- * 服务端会让顾问的笔记本原地转圈。200 页 × 200 行 = 4 万行,远超真实 workspace。
2036
- */
2037
- declare const MAX_MANIFEST_PAGES = 200;
2038
- interface ModelEntry {
2039
- modelKey?: string;
2040
- type?: string;
2041
- [k: string]: unknown;
2042
- }
2043
- /**
2044
- * `/api/system/models` 的响应体 → **可用的**模型条目。
2045
- *
2046
- * 🔴 **这是唯一一道门**。原先 doctor / computeFingerprint / 布局解析三个点各写各的过滤,
2047
- * 第三个漏了——而它跑在**最前面**,客户网关一改清单形状,recon 就在第一步崩掉,
2048
- * 而 FDE 手上没有源码、没有安装包、也没有第二份基线可对照。
2049
- *
2050
- * 两种敌意形状都在这里挡掉,调用方不必(也不许)自己判:
2051
- * ① `body` 整体不是对象——服务端**声明**返 object,但网关扒掉 envelope 直接返数组是真会发生的;
2052
- * ② `models[]` 里混进非对象元素——部分序列化失败 / 拼接出错。
2053
- *
2054
- * ⚠️ **降级不是静默**:这里只负责「不崩」,「有没有掉东西」由调用方各自留痕。
2055
- */
2056
- declare function modelEntries(body: unknown): ModelEntry[];
2057
- /**
2058
- * `/api/system/models` 的响应体 → 探针用的 modelKey 列表(去空串 + 排序)。
2059
- *
2060
- * 🔴 空串过滤不能省:一条缺 `modelKey` 的记录会让第一发打到 `/api/models//meta`,
2061
- * 白烧一发**有限的**探针配额。
2062
- * 🔴 排序 = 探针确定性:同一个环境两次 recon 必须探同一个模型,否则 `extensionSourceProbe`
2063
- * 会无端漂移,看上去像环境变了。
2064
- */
2065
- declare function modelKeys(body: unknown): string[];
2066
- interface ProbeResult {
2067
- sourceKey: string;
2068
- probeModelKey: string;
2069
- attempted: number;
2070
- answered: number;
2071
- }
2072
- /**
2073
- * 探 `X-HCM-Extension-Source`。
2074
- *
2075
- * 🔴 **这个头只挂在 `GET /api/models/{model}/meta` 上,`/api/system/models` 上没有**。
2076
- * 读错端点的后果不是「偶尔取不到」,是**每一个真实环境上恒为 unknown**:三个门分量残掉
2077
- * 一个 ⇒ `compareFingerprint` 恒返 `incomplete:` ⇒ 门被 `--force-stale` 常态化绕过。
2078
- *
2079
- * 🔴 `answered` 不是凑数的统计量,它是「unknown 到底是哪种 unknown」的唯一判据。
2080
- * 只返回 `(sourceKey, probeModelKey)` 时,「一个模型都没答应」与「答应了但没回这个头」
2081
- * **都**返回空串、**都**写同一条失败条目——顾问看到 `unknown` 照样不知道该查连通/权限还是查反代。
2082
- * **一个自己都分辨不了的分辨承诺比不承诺更糟**,它让人以为这件事已经处理了。
2083
- */
2084
- declare function probeExtensionSource(probe: ReconProbe, keys: string[]): Promise<ProbeResult>;
2085
- /**
2086
- * 产物目录要用的 `sourceKey`——`recon` 打出去的**第一个**请求序列。
2087
- *
2088
- * 🔴 单独一个入口,而**不是**让命令层自己 `probe.get(MODELS_PATH)` 再就地取 key:
2089
- * `probeExtensionSource` 此前有三个调用点,其中一个(recon 的这一跳)漏了
2090
- * 「元素可能不是对象 / body 整体可能不是对象 / modelKey 可能是空串」这三道过滤,
2091
- * 于是客户网关一改清单形状,`recon` 就在第一步以一条裸堆栈收场 —— 而顾问手上
2092
- * 没有源码、没有安装包、也没有第二份基线可对照。
2093
- * 三处各修各的会再漏第四处;收进 `modelKeys()` 这**一道门**,漏不掉。
2094
- *
2095
- * 🔴 探不到时回 `'unknown'` 而不是抛:探不到是**可降级**的(产物目录名带 unknown,
2096
- * 顾问一眼看得出这份基线的层次身份没确认),而抛会让整轮爬取在第一步就没了。
2097
- */
2098
- declare function computeReconSourceKey(probe: ReconProbe): Promise<string>;
2099
- interface Fingerprint {
2100
- tenantMetaManifestDigest: string;
2101
- manifestEntryCount: number;
2102
- extensionSource: string;
2103
- extensionSourceProbe: string;
2104
- extensionSourceProbeAttempted: number;
2105
- extensionSourceProbeAnswered: number;
2106
- modelListHash: string;
2107
- modelCount: number;
2108
- backendVersion: unknown;
2109
- capabilities: string;
2110
- createdAt: string;
2111
- ttlDays: number;
2112
- coverageNotes: {
2113
- gateComponents: string[];
2114
- blindSpots: string;
2115
- fetchFailures: string[];
2116
- };
2117
- }
2118
- declare function computeFingerprint(probe: ReconProbe, opts?: {
2119
- ttlDays?: number;
2120
- now?: () => Date;
2121
- }): Promise<Fingerprint>;
2122
- /**
2123
- * 比对两份四元组,回**差异清单**(空 = 同源)。
2124
- *
2125
- * 🔴 某个分量没爬到时,它和「爬到了而且相等」在值上同形。两边都没爬到 → 三个分量全等
2126
- * → 门放行一份根本没验过的基线。所以残缺本身也要进差异清单。
2127
- */
2128
- declare function compareFingerprint(recorded: Record<string, unknown>, current: Record<string, unknown>): string[];
2129
-
2130
2140
  type DoctorAnchor = 'connectivity' | 'identity' | 'config-admin' | 'layer';
2131
2141
  /** 四条锚点的顺序是固定的:连通 → 我是谁 → 有没有权限 → 站在哪一层。 */
2132
2142
  declare const DOCTOR_ANCHORS: readonly DoctorAnchor[];
@@ -3007,4 +3017,4 @@ interface TriageRoundResult {
3007
3017
  */
3008
3018
  declare function runTriageRound(probe: ReconProbe, artifactsDir: string, entriesIn: readonly TriageEntry[]): Promise<TriageRoundResult>;
3009
3019
 
3010
- export { ACLASS_EMPTY_WHY, ACLASS_KINDS, ARTIFACT_ROOT, ARTIFACT_SUFFIXES, ARTIFACT_WORDING, AUTH_INFO_PATH, type Aclass, type AclassKind, type AclassProblem, type ActionHttpMethod, type ActionInput, type ActionMeta, type ActionResult, type ActionScope, type AdminResetPasswordRequest, type AdminResetPasswordResult, type AnyStreamEvent, type ApprovalConfirmPayload, type ApprovalRejectPayload, type AttachmentMeta, type AuthScheme, BLIND_SPOTS, type BootstrapReconcileResult, type BootstrapTenantRequest, type BootstrapTenantResult, CARRIER_BLIND, CARRIER_HIT, CARRIER_KEYS, CARRIER_LABELS, CARRIER_MISS, CARRIER_UNAVAILABLE, CARRIER_VERDICTS, CHANNELS, CHANNEL_ACLASS, CHANNEL_ARTIFACT, CHANNEL_NO_PROBE, CHANNEL_REGISTERED_IS_ACLASS, CHANNEL_UNREGISTERED, CLASS_REASONS, CLASS_SCOPE, type CacheClearResult, type CacheStats, type CarrierKey, type CarrierResult, type CarrierVerdict, type CarryOver, type ChangePasswordInput, type Channel, type ChironCategory, type ChironManifest, type ChironSkill, type ChironSkillFile, type ChironStage, type ClearMetaCacheOpts, CliError, CliErrorCode, type CliErrorInit, type ClientAuthContext, type ClientCredentialsInput, type ConnectionMessage, type ControlChannelEnvelope, type ConversationListItem, type ConversationListResult, type ConversationState, type CreateResult, type CreatedConversation, DATA_PACKAGE_BLIND_NOTE, DEBT_PREFIX, DEBT_UNKNOWN, DEFAULT_AGENT_ID, DEFAULT_SESSION_TTL_SECONDS, DOCTOR_ANCHORS, type DescribeOpts, type DoctorAnchor, type DoctorCheck, type DoctorReport, ENDPOINT_PREFIXES, ENTRY_SCOPE, ENUM_ELEMENT_KEYS, EXTENSION_SOURCE_HEADER, type EnvConfig, ExitCode, FACTS_REASONS, FOLDED_NOTE, FULLWIDTH_ALNUM_RANGES, type FactsProblem, type FieldMeta, type Fingerprint, type Fixture, type FormatOptions, GAP_CJK_INSIDE_LONGER_RUN, GAP_NOISE_TOKEN, GAP_REASONS, GATE_COMPONENTS, type Gap, type GlobalConfig, HcmClient, type HcmClientOpts, type HttpClientOptions, type IdentityMeta, type ImportClient, type ImportOptions, type ImportResult, type InteractionAnswerPayload, type InteractionRequest, type InteractionResolved, KIT_CARRY_OVER_KEY, KIT_CRAWLED_AT_FILE, LEDGER_MISSING_WORD, LayoutContainmentError, type ListTenantMetaOpts, type LoginOutcome, MANIFEST_PATH, MAPPING_ARTIFACT_VERSION, MAX_MANIFEST_PAGES, MAX_SOURCE_PROBES, META_PATH, MINI_CONTEXT_FILE, MINI_CONTEXT_KIND, MINI_CONTEXT_VERSION, MINI_PULL_MANIFEST_FILE, MINI_REMOTE_ROOT, MINI_STATE_DIR, MODELS_PATH, MappingArtifactError, Matcher, type MessageClass, type MessageCreatePayload, type MessageStreamHandle, type MigrationSummary, type MiniFileSnapshot, type MiniInitArgs, type MiniLocalFile, type MiniLocalStatus, type MiniPreviewTarget, type MiniProjectContext, type MiniPullArgs, type MiniPullManifest, type MiniPullResult, type MiniPushArgs, type MiniPushConflict, type MiniPushOperation, type MiniPushPlanItem, type MiniPushResult, type MiniSmokeCheckArgs, type MiniSmokeFetch, type MiniSmokeFetchResponse, type MiniSmokeResult, type MiniSmokeTargetKind, type MiniSmokeTargetResult, type MiniStatusEntry, type MiniSurface, type MiniTemplateArgs, type MiniTemplateKind, type MiniValidationResult, type MiniVerifyAgentReport, type MiniVerifyBrowserAcceptance, type MiniVerifyChangedFile, type MiniVerifyNextAction, type MiniVerifyPlan, type MiniVerifyPreviewUrl, type MiniVerifyReport, type MiniVerifySummary, type MiniWritableTemplateConfig, type ModelDescription, type ModelQueryDsl, type OneShotOpts, type OneShotResult, type OneShotToolCall, type Outcome, type OutputFormat, PASSWORD_CHANGE_REQUIRED, PREMISE_REASONS, PREMISE_REGISTRY_REASONS, PROACTIVE_REFRESH_MARGIN_SECONDS, PROBE_MARK_PREFIX, PRODUCT_RELATIVE_SHAPES, PRODUCT_STATE_WORDS, PROTOCOL_FACTS, type PairingLoginInput, type ParsedPlaceholder, type PasswordChangeChallenge, type PasswordLoginInput, type PatLoginInput, type Premise, type Principal, type ProfileConfig, type ProtocolFact, type QueryResult, REASON_DUPLICATE_TOKEN, REASON_EMPTY, REASON_NO_ENTRIES, REASON_PROBE_ABSENT, REASON_PROBE_SHAPE, REASON_PROBE_UNVERIFIED, REASON_UNREAD, RECON_DIRNAME, RECON_SEGMENTS_BELOW_ROOT, RED_REASONS, REGISTRY_REASONS, REGISTRY_SCOPE, REQUIRED_SECTIONS, ROUND_EXIT_CODES, ROUND_STAMPED_PRODUCTS, ROUND_STATES, ROUND_SUBCOMMAND, type ReconIdentity, ReconLayout, type ReconProbe, type ReconSummary, type Red, RefStore, type RefreshInput, type RelationMeta, type RemoveResult, type ResponseCompletedPayload, type ResponseFailedPayload, type ResponsePartDeltaPayload, type ResponseStartedPayload, type ResumeSummary, type ResumeTurn, type RoundResult, type RoundState, type RowResult, type RowStatus, SCOPES, SDK_VERSION, SEGMENT_SEPARATOR, type SaveMetaResult, type ScanOptions, type ScanResult, type SendMessageOpts, type SettingItem, type SettingWrite, type StreamCancelPayload, type StreamCommand, type StreamCommandEnvelope, type StreamCommandType, type StreamEventEnvelope, type StreamEventType, CONFIG as TRIAGE_CONFIG, GAP as TRIAGE_GAP, VERDICTS as TRIAGE_VERDICTS, TargetModelNotFound, type TaskProgressPayload, type TenantMetaEntry, type TimelineItemLite, type TokenRecord, TokenStore, type ToolCallFailedPayload, type ToolCallResultPayload, type ToolCallStartedPayload, type TriageEntry, type TriageProblem, type TriageProblemRow, type TriageRoundResult, type TriageVerdict, type V4RenderSink, type V4StreamEventType, VERSION_PATH, WORKSPACES_PATH, type WorkspaceFileContent, type WorkspaceFileItem, type WorkspaceFileListResult, WsClient, type WsClientOpts, absoluteDownloadUrl, adminResetPassword, archiveDir, artifactReason, assertSafeReferencePath, assertSafeSkillFilePath, assertSafeSkillId, baselineRoundPremise, bootstrapTenant, boundedFind, buildAnswer, buildCarrierResult, buildConfirm, buildInterrupt, buildMiniAppTemplateFiles, buildMiniPreviewTargets, buildMiniVerifyAgentReport, buildReject, buildResumeSummary, buildSteer, camelizeKeys, changePassword, checkCoherence, checkGaps, checkPremise, checkReds, cjkRunAt, classifyMessage, clearMetaCache, clearModelCache, compareFingerprint, computeFingerprint, computeReconSourceKey, conversationStateFile, covered, create, createConversation, createHttpClient, createV4Reducer, createWorkspaceFile, credentialsFile, defaultDownloadDir, defaultMiniRequiredScopes, deleteEnv, deleteIdentity, deleteTenantMeta, deleteWorkspaceFile, deriveAclass, deriveNamelessToolLabel, describePrincipal, detectDelegationPause, detectDirectInteractionPending, detectPasswordChangeChallenge, displayWidth, downloadDocument, endpointsIn, ensureSessionFresh, envDir, envFile, envsDir, exitCode, exitCodeFor, extractNextSteps, factsIndex, fetchConversationTimeline, fetchConversationTimelineStrict, fetchRecentConversations, fetchReconIdentity, fetchSkillCatalog, fetchSkillFile, fetchSkillMarkdown, fetchSkillReference, filterByStage, findLastAssistantSeq, flattenSkills, foldConfusables, foldedNoteFor, formatMiniVerifyReport, formatObject, formatRows, fromAxiosError, getCacheStats, getMiniStatus, getSettingDomain, getTenantMeta, globalConfigFile, guessMimeType, hcmConfigDir, httpProbe, identitiesDir, identityDir, identityMetaFile, inGap, inferEnvName, inferMiniWritableTemplateOptionsFromModel, initMiniAppProject, inspectRound, isCjk, isDelegationToolName, isReadOnly, isServerSlidingSession, listEnvs, listIdentities, listProfiles, listTenantMeta, listWorkspaceFiles, loadConversationState, loadEnv, loadGlobalConfig, loadIdentity, loadProfile, loadProtocolFacts, loadWorkspaceFileContent, loginClientCredentials, loginPairing, loginPassword, loginPat, matchSkills, migrateLegacyProfiles, modelEntries, modelKeys, needsRefresh, newRoundId, normalize, normalizeReferences, oneShot, parseConfirmToolName, parseFixture, parseInteractionRequest, parseInteractionResolved, parsePlaceholder, parseSettingAssignment, parseSkillFrontmatter, parseSkillRequirements, patchSettingDomain, probeAll, probeExtensionSource, profileDir, profileFile, pullMiniAppProject, pushMiniAppProject, readBusinessKeyFields, readMiniContext, readPullManifest, refreshToken, remove, renderRound, renderTriage, replHistoryFile, resetSettingItem, resolveActiveEnv, resolveActiveIdentity, resolveActiveProfile, resolveAllSkillsInstallOrder, resolveChironBase, resolveRefs, resolveSkillInstallOrder, roundAge, runDoctor, runImport, runMiniSmokeChecks, runRecon, runTriageRound, safeSegment, saveConversationState, saveEnv, saveGlobalConfig, saveIdentity, saveProfile, saveTenantMeta, saveWorkspaceFileContent, scan, segmentsOf, sendMessageAndStream, snakeToCamel, tenantSegment, toJson, toOrigin, toPrincipal, toTable, toYaml, truncateDisplay, unguardedKinds, update, uploadDocument, validateMiniProject };
3020
+ export { ACLASS_EMPTY_WHY, ACLASS_KINDS, ARTIFACT_ROOT, ARTIFACT_SUFFIXES, ARTIFACT_WORDING, AUTH_INFO_PATH, type Aclass, type AclassKind, type AclassProblem, type ActionHttpMethod, type ActionInput, type ActionMeta, type ActionResult, type ActionScope, type AdminResetPasswordRequest, type AdminResetPasswordResult, type AnyStreamEvent, type ApprovalConfirmPayload, type ApprovalRejectPayload, type AttachmentMeta, type AuthScheme, BLIND_SPOTS, type BootstrapReconcileResult, type BootstrapTenantRequest, type BootstrapTenantResult, CARRIER_BLIND, CARRIER_HIT, CARRIER_KEYS, CARRIER_LABELS, CARRIER_MISS, CARRIER_UNAVAILABLE, CARRIER_VERDICTS, CHANNELS, CHANNEL_ACLASS, CHANNEL_ARTIFACT, CHANNEL_NO_PROBE, CHANNEL_REGISTERED_IS_ACLASS, CHANNEL_UNREGISTERED, CLASS_REASONS, CLASS_SCOPE, type CacheClearResult, type CacheStats, type CarrierKey, type CarrierResult, type CarrierVerdict, type CarryOver, type ChangePasswordInput, type Channel, type ChironCategory, type ChironManifest, type ChironSkill, type ChironSkillFile, type ChironStage, type ClearMetaCacheOpts, CliError, CliErrorCode, type CliErrorInit, type ClientAuthContext, type ClientCredentialsInput, type ConnectionMessage, type ControlChannelEnvelope, type ConversationListItem, type ConversationListResult, type ConversationState, type CreateResult, type CreatedConversation, DATA_PACKAGE_BLIND_NOTE, DEBT_PREFIX, DEBT_UNKNOWN, DEFAULT_AGENT_ID, DEFAULT_SESSION_TTL_SECONDS, DOCTOR_ANCHORS, type DescribeOpts, type DoctorAnchor, type DoctorCheck, type DoctorReport, ENDPOINT_PREFIXES, ENTRY_SCOPE, ENUM_ELEMENT_KEYS, EXTENSION_SOURCE_HEADER, type EnvConfig, ExitCode, FACTS_REASONS, FOLDED_NOTE, FULLWIDTH_ALNUM_RANGES, type FactsProblem, type FieldMeta, type Fingerprint, type Fixture, type FormatOptions, GAP_CJK_INSIDE_LONGER_RUN, GAP_NOISE_TOKEN, GAP_REASONS, GATE_COMPONENTS, type Gap, type GlobalConfig, HcmClient, type HcmClientOpts, type HttpClientOptions, type IdentityMeta, type ImportClient, type ImportOptions, type ImportResult, type InteractionAnswerPayload, type InteractionRequest, type InteractionResolved, KIT_CARRY_OVER_KEY, KIT_CRAWLED_AT_FILE, LEDGER_MISSING_WORD, LayoutContainmentError, type ListTenantMetaOpts, type LoginOutcome, MANIFEST_PATH, MAPPING_ARTIFACT_VERSION, MAX_MANIFEST_PAGES, MAX_SOURCE_PROBES, META_PATH, MINI_CONTEXT_FILE, MINI_CONTEXT_KIND, MINI_CONTEXT_VERSION, MINI_PULL_MANIFEST_FILE, MINI_REMOTE_ROOT, MINI_STATE_DIR, MODELS_PATH, MappingArtifactError, Matcher, type MessageClass, type MessageCreatePayload, type MessageStreamHandle, type MigrationSummary, type MiniFileSnapshot, type MiniInitArgs, type MiniLocalFile, type MiniLocalStatus, type MiniPreviewTarget, type MiniProjectContext, type MiniPullArgs, type MiniPullManifest, type MiniPullResult, type MiniPushArgs, type MiniPushConflict, type MiniPushOperation, type MiniPushPlanItem, type MiniPushResult, type MiniSmokeCheckArgs, type MiniSmokeFetch, type MiniSmokeFetchResponse, type MiniSmokeResult, type MiniSmokeTargetKind, type MiniSmokeTargetResult, type MiniStatusEntry, type MiniSurface, type MiniTemplateArgs, type MiniTemplateKind, type MiniValidationResult, type MiniVerifyAgentReport, type MiniVerifyBrowserAcceptance, type MiniVerifyChangedFile, type MiniVerifyNextAction, type MiniVerifyPlan, type MiniVerifyPreviewUrl, type MiniVerifyReport, type MiniVerifySummary, type MiniWritableTemplateConfig, type ModelDescription, type ModelEntry, type ModelQueryDsl, type OneShotOpts, type OneShotResult, type OneShotToolCall, type Outcome, type OutputFormat, PASSWORD_CHANGE_REQUIRED, PREMISE_REASONS, PREMISE_REGISTRY_REASONS, PROACTIVE_REFRESH_MARGIN_SECONDS, PROBE_MARK_PREFIX, PRODUCT_RELATIVE_SHAPES, PRODUCT_STATE_WORDS, PROTOCOL_FACTS, type PairingLoginInput, type ParsedPlaceholder, type PasswordChangeChallenge, type PasswordLoginInput, type PatLoginInput, type Premise, type Principal, type ProfileConfig, type ProtocolFact, type QueryResult, REASON_DUPLICATE_TOKEN, REASON_EMPTY, REASON_NO_ENTRIES, REASON_PROBE_ABSENT, REASON_PROBE_SHAPE, REASON_PROBE_UNVERIFIED, REASON_UNREAD, RECON_DIRNAME, RECON_SEGMENTS_BELOW_ROOT, RED_REASONS, REGISTRY_REASONS, REGISTRY_SCOPE, REQUIRED_SECTIONS, ROUND_EXIT_CODES, ROUND_STAMPED_PRODUCTS, ROUND_STATES, ROUND_SUBCOMMAND, type ReconIdentity, ReconLayout, type ReconProbe, type ReconSummary, type Red, RefStore, type RefreshInput, type RelationMeta, type RemoveResult, type ResponseCompletedPayload, type ResponseFailedPayload, type ResponsePartDeltaPayload, type ResponseStartedPayload, type ResumeSummary, type ResumeTurn, type RoundResult, type RoundState, type RowResult, type RowStatus, SCOPES, SDK_VERSION, SEGMENT_SEPARATOR, type SaveMetaResult, type ScanOptions, type ScanResult, type SendMessageOpts, type SettingItem, type SettingWrite, type StreamCancelPayload, type StreamCommand, type StreamCommandEnvelope, type StreamCommandType, type StreamEventEnvelope, type StreamEventType, CONFIG as TRIAGE_CONFIG, GAP as TRIAGE_GAP, VERDICTS as TRIAGE_VERDICTS, TargetModelNotFound, type TaskProgressPayload, type TenantMetaEntry, type TimelineItemLite, type TokenRecord, TokenStore, type ToolCallFailedPayload, type ToolCallResultPayload, type ToolCallStartedPayload, type TriageEntry, type TriageProblem, type TriageProblemRow, type TriageRoundResult, type TriageVerdict, type V4RenderSink, type V4StreamEventType, VERSION_PATH, WORKSPACES_PATH, type WorkspaceFileContent, type WorkspaceFileItem, type WorkspaceFileListResult, WsClient, type WsClientOpts, absoluteDownloadUrl, adminResetPassword, archiveDir, artifactReason, assertSafeReferencePath, assertSafeSkillFilePath, assertSafeSkillId, baselineRoundPremise, bootstrapTenant, boundedFind, buildAnswer, buildCarrierResult, buildConfirm, buildInterrupt, buildMiniAppTemplateFiles, buildMiniPreviewTargets, buildMiniVerifyAgentReport, buildReject, buildResumeSummary, buildSteer, camelizeKeys, changePassword, checkCoherence, checkGaps, checkPremise, checkReds, cjkRunAt, classifyMessage, clearMetaCache, clearModelCache, compareFingerprint, computeFingerprint, computeReconSourceKey, conversationStateFile, covered, create, createConversation, createHttpClient, createV4Reducer, createWorkspaceFile, credentialsFile, defaultDownloadDir, defaultMiniRequiredScopes, deleteEnv, deleteIdentity, deleteTenantMeta, deleteWorkspaceFile, deriveAclass, deriveNamelessToolLabel, describePrincipal, detectDelegationPause, detectDirectInteractionPending, detectPasswordChangeChallenge, displayWidth, downloadDocument, endpointsIn, ensureSessionFresh, envDir, envFile, envsDir, exitCode, exitCodeFor, extractNextSteps, factsIndex, fetchConversationTimeline, fetchConversationTimelineStrict, fetchRecentConversations, fetchReconIdentity, fetchSkillCatalog, fetchSkillFile, fetchSkillMarkdown, fetchSkillReference, filterByStage, findLastAssistantSeq, flattenSkills, foldConfusables, foldedNoteFor, formatMiniVerifyReport, formatObject, formatRows, fromAxiosError, getCacheStats, getMiniStatus, getSettingDomain, getTenantMeta, globalConfigFile, guessMimeType, hcmConfigDir, httpProbe, identitiesDir, identityDir, identityMetaFile, inGap, inferEnvName, inferMiniWritableTemplateOptionsFromModel, initMiniAppProject, inspectRound, isCjk, isDelegationToolName, isReadOnly, isServerSlidingSession, listEnvs, listIdentities, listModels, listProfiles, listTenantMeta, listWorkspaceFiles, loadConversationState, loadEnv, loadGlobalConfig, loadIdentity, loadProfile, loadProtocolFacts, loadWorkspaceFileContent, loginClientCredentials, loginPairing, loginPassword, loginPat, matchSkills, migrateLegacyProfiles, modelEntries, modelKeys, needsRefresh, newRoundId, normalize, normalizeReferences, oneShot, parseConfirmToolName, parseFixture, parseInteractionRequest, parseInteractionResolved, parsePlaceholder, parseSettingAssignment, parseSkillFrontmatter, parseSkillRequirements, patchSettingDomain, probeAll, probeExtensionSource, profileDir, profileFile, pullMiniAppProject, pushMiniAppProject, readBusinessKeyFields, readMiniContext, readPullManifest, refreshToken, remove, renderRound, renderTriage, replHistoryFile, resetSettingItem, resolveActiveEnv, resolveActiveIdentity, resolveActiveProfile, resolveAllSkillsInstallOrder, resolveChironBase, resolveRefs, resolveSkillInstallOrder, roundAge, runDoctor, runImport, runMiniSmokeChecks, runRecon, runTriageRound, safeSegment, saveConversationState, saveEnv, saveGlobalConfig, saveIdentity, saveProfile, saveTenantMeta, saveWorkspaceFileContent, scan, segmentsOf, sendMessageAndStream, snakeToCamel, tenantSegment, toJson, toOrigin, toPrincipal, toTable, toYaml, truncateDisplay, unguardedKinds, update, uploadDocument, validateMiniProject };