@sema-agent/server 2.0.0 → 2.0.1

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/config.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { type Model } from "@sema-agent/core";
2
2
  import type { Autonomy } from "./runtime-governance.js";
3
- import type { ServiceConfig } from "./config-types.js";
3
+ import type { ServiceConfig, ServiceConfigFlat, ServiceConfigGroups } from "./config-types.js";
4
4
  /** design/158 A1: the config TYPE face lives in the leaf module config-types.ts; re-exported here so
5
5
  * every existing `from "./config.js"` importer compiles unchanged (pure-type consumers should prefer
6
6
  * importing config-types.js directly — a type-only leaf, no loader baggage). */
7
- export type { ServiceConfig, ScopedMcpServer, ImageBakeConfig } from "./config-types.js";
7
+ export type { ServiceConfig, ScopedMcpServer, ImageBakeConfig, ServiceConfigFlat, ServiceConfigGroups, ServiceStoreConfig, ServiceModelPlaneConfig, ServiceApprovalConfig, ServiceMemoryConfig, ServiceAuthConfig, ServiceOrchestrationConfig, ServiceLimitsHttpConfig, ServiceObservabilityConfig, ServiceIntegrationsConfig, } from "./config-types.js";
8
8
  /** Parse the AUTONOMY env into a validated autonomy mode. Unset/empty → undefined (unmanaged → no extra
9
9
  * tightening). An UNKNOWN value FAILS at startup rather than silently becoming a no-op (a typo'd `AUTONOMY=readonly`
10
10
  * must not silently leave a deployment ungoverned — fail-loud, same discipline as numEnv). Exported so the HOT
@@ -85,6 +85,18 @@ export declare const hostExecSpoolEnabled: () => boolean;
85
85
  * is REMOVED (a spread-inherited value from a bigger-window base model would mis-trigger a small window).
86
86
  * Shared by the env lane (main + cheap models) and the center lane (sema-registry toModel). */
87
87
  export declare function applyAutoCompactWindow(m: Model, explicit?: number): void;
88
+ /** 组名 → 该组取景的平铺键(introspection 面:测试用它钉「每个平铺键恰好被一组取景」)。 */
89
+ export declare const CONFIG_GROUP_KEYS: {
90
+ readonly [G in keyof ServiceConfigGroups]: readonly (keyof ServiceConfigFlat)[];
91
+ };
92
+ /** 把九个组视图挂到平铺配置上(**就地**,返回的就是同一个对象——视图必须看着这一个存储处)。
93
+ *
94
+ * 组键是**不可枚举**的:`Object.keys(config)` / `JSON.stringify(config)` / `{...config}` 的平铺面因此
95
+ * 逐字节不变(既有消费点、既有 dump/审计面零影响),代价是 spread 克隆不带组视图——克隆后要用组形,
96
+ * 再过一次本函数(读一个缺席的组是当场 TypeError,不会静默给旧值)。
97
+ *
98
+ * `loadConfig` 是主调用点;测试夹具(test/helpers/make-config.ts)构造 `ServiceConfigFlat` 后同样过它。 */
99
+ export declare function attachConfigGroups(flat: ServiceConfigFlat): ServiceConfig;
88
100
  export declare function loadConfig(): ServiceConfig;
89
101
  /** 有效监听绑址([1934])。**显式 `BIND_HOST`/`HOST` 恒生效**(operator 保留在任何形下明示暴露的
90
102
  * 权利);未显式时:**无鉴权写面 ⇒ 127.0.0.1**,其余 ⇒ undefined(Node 默认全接口,既有部署零影响)。