@hmharness/kernel 0.9.7 → 0.18.14
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 +1 -1
- package/dist/context.d.ts +1 -1
- package/dist/index.d.ts +15 -15
- package/dist/loop-types.d.ts +1 -1
- package/dist/loop.d.ts +3 -3
- package/dist/mcp.d.ts +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/registry.d.ts +1 -1
- package/dist/session.d.ts +1 -1
- package/dist/types.d.ts +16 -0
- package/package.json +1 -1
package/dist/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HmhConfig } from './types.
|
|
1
|
+
import type { HmhConfig } from './types.js';
|
|
2
2
|
export declare const STATE_DIRS: readonly ["sessions", "memory", "skills", "insights", "bench"];
|
|
3
3
|
export declare function homeDir(): string;
|
|
4
4
|
export declare function defaultConfig(): HmhConfig;
|
package/dist/context.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* instead of being dropped. Without the hook, behaviour is byte-identical
|
|
13
13
|
* to the legacy prune.
|
|
14
14
|
*/
|
|
15
|
-
import type { ChatMessage } from './types.
|
|
15
|
+
import type { ChatMessage } from './types.js';
|
|
16
16
|
export declare const DEFAULT_CONTEXT_CHARS = 160000;
|
|
17
17
|
export declare function transcriptChars(messages: ChatMessage[]): number;
|
|
18
18
|
export declare const DIGEST_MARK = "[rolling digest of earlier context]";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from './types.
|
|
2
|
-
export * from './shellgate.
|
|
3
|
-
export * from './capability.
|
|
4
|
-
export * from './registry.
|
|
5
|
-
export * from './provider.
|
|
6
|
-
export * from './window.
|
|
7
|
-
export * from './loop.
|
|
8
|
-
export * from './session.
|
|
9
|
-
export * from './router.
|
|
10
|
-
export * from './config.
|
|
11
|
-
export * from './context.
|
|
12
|
-
export * from './mcp.
|
|
13
|
-
export * from './goal.
|
|
14
|
-
export * from './mcp2026.
|
|
15
|
-
export * from './adaptive-router.
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './shellgate.js';
|
|
3
|
+
export * from './capability.js';
|
|
4
|
+
export * from './registry.js';
|
|
5
|
+
export * from './provider.js';
|
|
6
|
+
export * from './window.js';
|
|
7
|
+
export * from './loop.js';
|
|
8
|
+
export * from './session.js';
|
|
9
|
+
export * from './router.js';
|
|
10
|
+
export * from './config.js';
|
|
11
|
+
export * from './context.js';
|
|
12
|
+
export * from './mcp.js';
|
|
13
|
+
export * from './goal.js';
|
|
14
|
+
export * from './mcp2026.js';
|
|
15
|
+
export * from './adaptive-router.js';
|
package/dist/loop-types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Structural typing for the registry the loop needs (avoids a hard import
|
|
4
4
|
* cycle and lets tests pass a stub registry).
|
|
5
5
|
*/
|
|
6
|
-
import type { Tool } from './types.
|
|
6
|
+
import type { Tool } from './types.js';
|
|
7
7
|
export interface ChatMessage {
|
|
8
8
|
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
9
9
|
content: string | null;
|
package/dist/loop.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ChatMessage, RegistryLike } from './loop-types.
|
|
2
|
-
import { chat, type DeltaKind } from './provider.
|
|
3
|
-
import type { ProviderConfig, ToolContext } from './types.
|
|
1
|
+
import type { ChatMessage, RegistryLike } from './loop-types.js';
|
|
2
|
+
import { chat, type DeltaKind } from './provider.js';
|
|
3
|
+
import type { ProviderConfig, ToolContext } from './types.js';
|
|
4
4
|
export interface LoopEvents {
|
|
5
5
|
onAssistant?(m: ChatMessage): void;
|
|
6
6
|
onDelta?(kind: DeltaKind, chunk: string): void;
|
package/dist/mcp.d.ts
CHANGED
package/dist/provider.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* surfaced separately so frontends can show the model thinking. One retry on
|
|
7
7
|
* transient 429/5xx before the stream starts; mid-stream failures surface.
|
|
8
8
|
*/
|
|
9
|
-
import type { ChatMessage, ProviderConfig } from './types.
|
|
9
|
+
import type { ChatMessage, ProviderConfig } from './types.js';
|
|
10
10
|
export interface ChatResponse {
|
|
11
11
|
message: ChatMessage;
|
|
12
12
|
usage?: {
|
package/dist/registry.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* projection. Boring on purpose: 2026 consensus is that the loop+registry
|
|
5
5
|
* core should stay simple while capability volume grows around it.
|
|
6
6
|
*/
|
|
7
|
-
import type { Tool } from './types.
|
|
7
|
+
import type { Tool } from './types.js';
|
|
8
8
|
export declare class Registry {
|
|
9
9
|
#private;
|
|
10
10
|
register(tool: Tool): this;
|
package/dist/session.d.ts
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -122,6 +122,22 @@ export interface HmhConfig {
|
|
|
122
122
|
};
|
|
123
123
|
/** Named vendor endpoints for multi-provider routing. */
|
|
124
124
|
providers?: Record<string, ProviderConfig>;
|
|
125
|
+
/** Web UI exposure. Default loopback-only (zero remote attack surface).
|
|
126
|
+
* LAN/WAN listening REQUIRES a token: the approval endpoint is RCE by
|
|
127
|
+
* design, so any non-loopback bind without auth is a remote-code-execution
|
|
128
|
+
* hole, not a feature. */
|
|
129
|
+
web?: {
|
|
130
|
+
/** 'loopback' (default) | 'lan' | 'wan'. lan = bind 0.0.0.0, host-allowlist
|
|
131
|
+
* accepts private-range IPs; wan = same but host-allowlist is disabled
|
|
132
|
+
* (any Host/Origin header accepted) because WAN visitors arrive through
|
|
133
|
+
* NAT/frp/tailscale domains we cannot enumerate. Token is MANDATORY for
|
|
134
|
+
* both. */
|
|
135
|
+
exposure?: 'loopback' | 'lan' | 'wan';
|
|
136
|
+
/** Shared secret for non-loopback access. Sent as ?key= on first load,
|
|
137
|
+
* then via the X-Hmh-Key header (SSE cannot set custom headers, so the
|
|
138
|
+
* page keeps the key in sessionStorage and appends it to /api/events). */
|
|
139
|
+
token?: string;
|
|
140
|
+
};
|
|
125
141
|
/** Per-purpose provider names resolved against `providers`. */
|
|
126
142
|
routing?: {
|
|
127
143
|
/** main chat loop (default: `provider`) */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hmharness/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.14",
|
|
4
4
|
"description": "hmharness kernel: tool registry, provider adapters, the agent loop, session log, config. Zero runtime dependencies (Node >=22 native fetch).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|