hiwork-core 0.0.7 → 0.0.10

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.
@@ -56,6 +56,13 @@ export interface Config {
56
56
  * 一律写 `both`(fail-open,绝不把用户锁在门外)。
57
57
  */
58
58
  loginMode?: LoginMode;
59
+ /**
60
+ * 账号密码直连表单是否仍是受支持的登录方式:Host 从同一策略投影。
61
+ * 网关身份源切到统一认证(IAM)后为 false——密码由 IAM 持有,直连表单必然失败,
62
+ * 客户端据此收起密码入口,避免「密码正确却提示密码错误」。缺省 / 拉取失败一律
63
+ * 写 true(fail-open:绝不收起可用入口)。
64
+ */
65
+ passwordLogin?: boolean;
59
66
  budgets?: Array<{
60
67
  model_name: string;
61
68
  total_budget?: number | null;
@@ -140,11 +147,13 @@ export interface IpcCallbackPorts {
140
147
  */
141
148
  export declare function registerIpcMessageHandler(ports: IpcCallbackPorts): () => void;
142
149
  /**
143
- * 拉取客户端策略并把 `loginMode` 投影进 ai-router 命名空间(spec §5.4 / §6.1)。
150
+ * 拉取客户端策略并把 `loginMode` / `passwordLogin` 投影进 ai-router 命名空间
151
+ * (spec §5.4 / §6.1)。
144
152
  *
145
153
  * fail-open 是硬要求:缺 baseURL / 设备信息取不到 / 网络失败 / 响应非法一律投影
146
- * `DEFAULT_LOGIN_MODE`(`both`),**且只写 `loginMode` 一个字段**——不碰 lastError、
147
- * 不碰任何登录请求字段,策略拉取失败绝不影响登录与供给。**本函数永不抛异常**。
154
+ * `DEFAULT_LOGIN_MODE`(`both`)与 `DEFAULT_PASSWORD_LOGIN`(`true`),**且只写这两个
155
+ * 字段**——不碰 lastError、不碰任何登录请求字段,策略拉取失败绝不影响登录与供给。
156
+ * **本函数永不抛异常**。
148
157
  *
149
158
  * @returns 最终投影的登录方式(测试与调用方均可断言)。
150
159
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hiwork-core",
3
- "version": "0.0.7",
3
+ "version": "0.0.10",
4
4
  "type": "module",
5
5
  "description": "HiWork 企业统一登录与模型自动供给插件(ai-router 网关登录,Web 表单,无 CLI 认证)",
6
6
  "license": "UNLICENSED",