hoomanjs 1.35.3 → 1.37.0
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/README.md +17 -13
- package/dist/acp/acp-agent.d.ts +40 -66
- package/dist/acp/acp-agent.js +786 -398
- package/dist/acp/acp-agent.js.map +1 -1
- package/dist/acp/approvals.d.ts +2 -2
- package/dist/acp/approvals.js +66 -58
- package/dist/acp/approvals.js.map +1 -1
- package/dist/acp/commands.d.ts +20 -0
- package/dist/acp/commands.js +66 -0
- package/dist/acp/commands.js.map +1 -0
- package/dist/acp/index.d.ts +1 -1
- package/dist/acp/index.js +1 -1
- package/dist/acp/index.js.map +1 -1
- package/dist/acp/mcp-servers.js +14 -8
- package/dist/acp/mcp-servers.js.map +1 -1
- package/dist/acp/prompt-invoke.js +103 -49
- package/dist/acp/prompt-invoke.js.map +1 -1
- package/dist/acp/session-config.d.ts +18 -0
- package/dist/acp/session-config.js +52 -0
- package/dist/acp/session-config.js.map +1 -0
- package/dist/acp/sessions/replay.d.ts +2 -2
- package/dist/acp/sessions/replay.js +28 -44
- package/dist/acp/sessions/replay.js.map +1 -1
- package/dist/acp/sessions/store.d.ts +4 -0
- package/dist/acp/sessions/store.js +5 -1
- package/dist/acp/sessions/store.js.map +1 -1
- package/dist/acp/utils/tool-kind.js +2 -2
- package/dist/acp/utils/tool-kind.js.map +1 -1
- package/dist/acp/utils/tool-result-content.d.ts +7 -0
- package/dist/acp/utils/tool-result-content.js +18 -0
- package/dist/acp/utils/tool-result-content.js.map +1 -1
- package/dist/chat/app.js +117 -1
- package/dist/chat/app.js.map +1 -1
- package/dist/chat/components/BottomChrome.d.ts +2 -1
- package/dist/chat/components/BottomChrome.js +2 -2
- package/dist/chat/components/BottomChrome.js.map +1 -1
- package/dist/chat/components/ReasoningStrip.js +3 -1
- package/dist/chat/components/ReasoningStrip.js.map +1 -1
- package/dist/chat/components/StatusBar.d.ts +2 -1
- package/dist/chat/components/StatusBar.js +18 -3
- package/dist/chat/components/StatusBar.js.map +1 -1
- package/dist/chat/components/ThoughtEvent.d.ts +3 -1
- package/dist/chat/components/ThoughtEvent.js +6 -2
- package/dist/chat/components/ThoughtEvent.js.map +1 -1
- package/dist/chat/components/Transcript.d.ts +5 -2
- package/dist/chat/components/Transcript.js +4 -4
- package/dist/chat/components/Transcript.js.map +1 -1
- package/dist/chat/components/markdown/CodeBlock.js.map +1 -1
- package/dist/cli.js +24 -1
- package/dist/cli.js.map +1 -1
- package/dist/configure/app.js +287 -64
- package/dist/configure/app.js.map +1 -1
- package/dist/configure/components/MenuScreen.js +29 -5
- package/dist/configure/components/MenuScreen.js.map +1 -1
- package/dist/configure/types.d.ts +8 -2
- package/dist/core/agent/index.js +17 -4
- package/dist/core/agent/index.js.map +1 -1
- package/dist/core/approvals/allowlist.d.ts +52 -0
- package/dist/core/approvals/allowlist.js +265 -0
- package/dist/core/approvals/allowlist.js.map +1 -0
- package/dist/core/approvals/bash-arity.d.ts +10 -0
- package/dist/core/approvals/bash-arity.js +178 -0
- package/dist/core/approvals/bash-arity.js.map +1 -0
- package/dist/core/approvals/intervention.d.ts +1 -2
- package/dist/core/approvals/intervention.js +5 -20
- package/dist/core/approvals/intervention.js.map +1 -1
- package/dist/core/approvals/wildcard.d.ts +14 -0
- package/dist/core/approvals/wildcard.js +27 -0
- package/dist/core/approvals/wildcard.js.map +1 -0
- package/dist/core/config.d.ts +352 -22
- package/dist/core/config.js +40 -0
- package/dist/core/config.js.map +1 -1
- package/dist/core/models/anthropic.d.ts +7 -1
- package/dist/core/models/anthropic.js +36 -7
- package/dist/core/models/anthropic.js.map +1 -1
- package/dist/core/models/azure.js +13 -0
- package/dist/core/models/azure.js.map +1 -1
- package/dist/core/models/bedrock.js +33 -0
- package/dist/core/models/bedrock.js.map +1 -1
- package/dist/core/models/google.js +5 -0
- package/dist/core/models/google.js.map +1 -1
- package/dist/core/models/groq.js +14 -0
- package/dist/core/models/groq.js.map +1 -1
- package/dist/core/models/minimax.js +2 -2
- package/dist/core/models/minimax.js.map +1 -1
- package/dist/core/models/moonshot.js +5 -0
- package/dist/core/models/moonshot.js.map +1 -1
- package/dist/core/models/ollama/index.js +5 -3
- package/dist/core/models/ollama/index.js.map +1 -1
- package/dist/core/models/openai.js +21 -1
- package/dist/core/models/openai.js.map +1 -1
- package/dist/core/models/openrouter.d.ts +2 -2
- package/dist/core/models/openrouter.js +28 -10
- package/dist/core/models/openrouter.js.map +1 -1
- package/dist/core/models/types.d.ts +759 -51
- package/dist/core/models/types.js +43 -7
- package/dist/core/models/types.js.map +1 -1
- package/dist/core/models/xai.js +12 -0
- package/dist/core/models/xai.js.map +1 -1
- package/dist/core/session-config.d.ts +10 -1
- package/dist/core/session-config.js +16 -0
- package/dist/core/session-config.js.map +1 -1
- package/dist/core/skills/built-in/hooman-config/SKILL.md +20 -12
- package/dist/core/state/file-tool-display.d.ts +6 -0
- package/dist/core/state/file-tool-display.js.map +1 -1
- package/dist/core/state/todos.d.ts +11 -0
- package/dist/core/state/todos.js +2 -0
- package/dist/core/state/todos.js.map +1 -1
- package/dist/core/state/tool-approvals.d.ts +6 -7
- package/dist/core/state/tool-approvals.js +7 -50
- package/dist/core/state/tool-approvals.js.map +1 -1
- package/dist/core/tools/filesystem.js +83 -27
- package/dist/core/tools/filesystem.js.map +1 -1
- package/dist/core/tools/shell.js +39 -0
- package/dist/core/tools/shell.js.map +1 -1
- package/dist/core/tools/terminal-backend.d.ts +41 -0
- package/dist/core/tools/terminal-backend.js +9 -0
- package/dist/core/tools/terminal-backend.js.map +1 -0
- package/dist/core/tools/text-fs-backend.d.ts +25 -0
- package/dist/core/tools/text-fs-backend.js +9 -0
- package/dist/core/tools/text-fs-backend.js.map +1 -0
- package/dist/core/tools/todo.d.ts +1 -0
- package/dist/core/tools/todo.js +2 -1
- package/dist/core/tools/todo.js.map +1 -1
- package/dist/core/tools/web-search.js +56 -1
- package/dist/core/tools/web-search.js.map +1 -1
- package/dist/core/utils/attachments.js.map +1 -1
- package/dist/core/utils/paths.d.ts +1 -0
- package/dist/core/utils/paths.js +1 -0
- package/dist/core/utils/paths.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/acp/sessions/options.d.ts +0 -10
- package/dist/acp/sessions/options.js +0 -89
- package/dist/acp/sessions/options.js.map +0 -1
package/README.md
CHANGED
|
@@ -458,17 +458,19 @@ LLM entries reference a provider by name and carry normalized model options:
|
|
|
458
458
|
|
|
459
459
|
Supported provider option fields:
|
|
460
460
|
|
|
461
|
-
- `
|
|
462
|
-
|
|
463
|
-
- `
|
|
464
|
-
- `
|
|
465
|
-
- `
|
|
466
|
-
- `
|
|
467
|
-
- `
|
|
468
|
-
- `
|
|
469
|
-
- `
|
|
470
|
-
- `
|
|
471
|
-
- `
|
|
461
|
+
All reasoning-capable providers share a common optional `reasoning` object (`{ effort?, summary?, display? }`). `effort` is `"minimal" | "low" | "medium" | "high"` and its presence enables thinking; Hooman translates it to each backend's native shape. `summary` (`"auto" | "concise" | "detailed" | "none"`) is only honored by the OpenAI/Azure Responses API. `display` (`"summarized" | "omitted"`) applies to Bedrock Claude / MiniMax only. See the bundled **hooman-config** skill for the exact per-provider mapping.
|
|
462
|
+
|
|
463
|
+
- `anthropic`: `apiKey`, optional `baseURL`, optional `headers`, optional `reasoning`
|
|
464
|
+
- `azure`: optional `resourceName`, optional `baseURL`, optional `apiKey`, optional `headers`, optional `apiVersion`, optional `useDeploymentBasedUrls`, optional `reasoning`
|
|
465
|
+
- `bedrock`: `region`, `accessKeyId`, `secretAccessKey`, optional `sessionToken`, optional `apiKey`, optional `reasoning`
|
|
466
|
+
- `google`: `apiKey`, optional `reasoning`
|
|
467
|
+
- `groq`: `apiKey`, optional `baseURL`, optional `headers`, optional `reasoning`
|
|
468
|
+
- `minimax`: `apiKey`, optional `headers`, optional `reasoning`
|
|
469
|
+
- `moonshot`: `apiKey`, optional `baseURL`, optional `headers`, optional `reasoning`
|
|
470
|
+
- `ollama`: optional `baseURL`, optional `reasoning`
|
|
471
|
+
- `openai`: `apiKey`, optional `baseURL`, optional `headers`, optional `api` (`"responses"` (default) or `"chat"`), optional `reasoning`
|
|
472
|
+
- `openrouter`: `apiKey`, optional `baseURL`, optional `headers`, optional `reasoning`
|
|
473
|
+
- `xai`: `apiKey`, optional `baseURL`, optional `headers`, optional `reasoning`
|
|
472
474
|
|
|
473
475
|
Normalized LLM option fields:
|
|
474
476
|
|
|
@@ -482,8 +484,10 @@ Notes:
|
|
|
482
484
|
- Azure uses the Vercel AI SDK `@ai-sdk/azure` provider. Set the LLM `model` to your Azure deployment name, not the raw OpenAI model id.
|
|
483
485
|
- Ollama maps normalized `temperature` into Ollama `options.temperature`.
|
|
484
486
|
- MiniMax uses the Anthropic-compatible endpoint `https://api.minimax.io/anthropic` automatically.
|
|
485
|
-
- Moonshot defaults `baseURL` to `https://api.moonshot.ai/v1` when it is omitted.
|
|
486
|
-
- OpenRouter defaults `baseURL` to `https://openrouter.ai/api/v1` when it is omitted, and model names are usually provider-qualified ids such as `anthropic/claude-3.5-sonnet`.
|
|
487
|
+
- Moonshot defaults `baseURL` to `https://api.moonshot.ai/v1` when it is omitted. It is served through the reasoning-aware openai-compatible adapter, so Kimi's `reasoning_content` streams as thinking — this makes it the right provider for reaching Kimi through an OpenAI-compatible proxy (e.g. LiteLLM), where the `openai` provider's Chat adapter would drop reasoning.
|
|
488
|
+
- OpenRouter defaults `baseURL` to `https://openrouter.ai/api/v1` when it is omitted, and model names are usually provider-qualified ids such as `anthropic/claude-3.5-sonnet`. It also uses the openai-compatible adapter, so reasoning streams for reasoning models.
|
|
489
|
+
- The `openai` provider defaults to the Responses API (`api: "responses"`), which surfaces reasoning. `api: "chat"` does NOT surface reasoning (the Chat adapter drops `reasoning_content`); route such proxies through `moonshot`/`openrouter` instead.
|
|
490
|
+
- `reasoning.display` is for Bedrock Claude (Opus 4.7+ hide reasoning by default) and MiniMax; the native Anthropic API rejects it.
|
|
487
491
|
- Bedrock can rely on the AWS default credential chain when explicit credentials are not provided.
|
|
488
492
|
|
|
489
493
|
## MCP Configuration
|
package/dist/acp/acp-agent.d.ts
CHANGED
|
@@ -1,69 +1,43 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { type AgentApp, type AgentConnection, type AgentContext, type CancelNotification, type DeleteSessionRequest, type InitializeRequest, type InitializeResponse, type ListSessionsRequest, type ListSessionsResponse, type LoadSessionRequest, type LoadSessionResponse, type NewSessionRequest, type NewSessionResponse, type PromptRequest, type PromptResponse, type SetSessionConfigOptionRequest, type SetSessionConfigOptionResponse, type SetSessionModeRequest, type SetSessionModeResponse } from "@agentclientprotocol/sdk";
|
|
2
|
+
/** Name + version reported to the client in `agentInfo`. */
|
|
3
|
+
type AgentIdentity = {
|
|
4
|
+
name: string;
|
|
5
|
+
version: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Hooman's ACP agent, built on the app-style SDK API.
|
|
9
|
+
*
|
|
10
|
+
* Implements initialization, session setup (`session/new`, `session/load`),
|
|
11
|
+
* session discovery (`session/list`, `session/delete`), and the full prompt
|
|
12
|
+
* turn (`session/prompt` streaming + `session/cancel`).
|
|
13
|
+
*/
|
|
14
|
+
export declare class HoomanAcpAgent {
|
|
4
15
|
#private;
|
|
5
|
-
constructor(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
}>;
|
|
30
|
-
authenticate(_params: Parameters<AgentContract["authenticate"]>[0]): Promise<{}>;
|
|
31
|
-
setSessionMode(params: Parameters<NonNullable<AgentContract["setSessionMode"]>>[0]): Promise<{}>;
|
|
32
|
-
setSessionConfigOption(params: Parameters<NonNullable<AgentContract["setSessionConfigOption"]>>[0]): Promise<SetSessionConfigOptionResponse>;
|
|
33
|
-
extMethod(method: string, _params: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
34
|
-
extNotification(_method: string, _params: Record<string, unknown>): Promise<void>;
|
|
35
|
-
listSessions(params: Parameters<NonNullable<AgentContract["listSessions"]>>[0]): Promise<{
|
|
36
|
-
sessions: import("@agentclientprotocol/sdk").SessionInfo[];
|
|
37
|
-
nextCursor: string | null;
|
|
38
|
-
}>;
|
|
39
|
-
newSession(params: Parameters<AgentContract["newSession"]>[0]): Promise<{
|
|
40
|
-
sessionId: `${string}-${string}-${string}-${string}-${string}`;
|
|
41
|
-
modes: {
|
|
42
|
-
currentModeId: "agent";
|
|
43
|
-
availableModes: {
|
|
44
|
-
id: "agent";
|
|
45
|
-
name: string;
|
|
46
|
-
description: string;
|
|
47
|
-
}[];
|
|
48
|
-
};
|
|
49
|
-
models: null;
|
|
50
|
-
configOptions: import("@agentclientprotocol/sdk").SessionConfigOption[];
|
|
51
|
-
}>;
|
|
52
|
-
loadSession(params: Parameters<NonNullable<AgentContract["loadSession"]>>[0]): Promise<{
|
|
53
|
-
modes: {
|
|
54
|
-
currentModeId: "agent";
|
|
55
|
-
availableModes: {
|
|
56
|
-
id: "agent";
|
|
57
|
-
name: string;
|
|
58
|
-
description: string;
|
|
59
|
-
}[];
|
|
60
|
-
};
|
|
61
|
-
models: null;
|
|
62
|
-
configOptions: import("@agentclientprotocol/sdk").SessionConfigOption[];
|
|
63
|
-
}>;
|
|
64
|
-
cancel(params: Parameters<AgentContract["cancel"]>[0]): Promise<void>;
|
|
65
|
-
prompt(params: Parameters<AgentContract["prompt"]>[0]): Promise<{
|
|
66
|
-
stopReason: "cancelled" | "refusal" | "end_turn";
|
|
67
|
-
}>;
|
|
16
|
+
constructor(identity: AgentIdentity);
|
|
17
|
+
/** Bind connection-scoped lifecycle: capture the client + dispose on close. */
|
|
18
|
+
onConnect(connection: AgentConnection): void;
|
|
19
|
+
initialize(params: InitializeRequest): InitializeResponse;
|
|
20
|
+
listSessions(params: ListSessionsRequest): Promise<ListSessionsResponse>;
|
|
21
|
+
deleteSession(params: DeleteSessionRequest): Promise<void>;
|
|
22
|
+
newSession(params: NewSessionRequest): Promise<NewSessionResponse>;
|
|
23
|
+
loadSession(params: LoadSessionRequest, client: AgentContext): Promise<LoadSessionResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Handle `session/set_mode`: switch the active mode for a running session,
|
|
26
|
+
* re-applying the tool surface and persisting the choice.
|
|
27
|
+
*/
|
|
28
|
+
setSessionMode(params: SetSessionModeRequest): Promise<SetSessionModeResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Handle `session/set_config_option`: apply a model or mode selection and
|
|
31
|
+
* return the complete, up-to-date configuration state (as the spec requires).
|
|
32
|
+
*/
|
|
33
|
+
setSessionConfigOption(params: SetSessionConfigOptionRequest): Promise<SetSessionConfigOptionResponse>;
|
|
34
|
+
/** Cancel an in-flight prompt turn. Silent no-op for unknown sessions. */
|
|
35
|
+
cancel(params: CancelNotification): Promise<void>;
|
|
36
|
+
/** Run one prompt turn: stream model output, tool calls, and a stop reason. */
|
|
37
|
+
prompt(params: PromptRequest): Promise<PromptResponse>;
|
|
68
38
|
}
|
|
39
|
+
/** Build the ACP agent app and register the handlers implemented so far. */
|
|
40
|
+
export declare function createAcpApp(agent: HoomanAcpAgent): AgentApp;
|
|
41
|
+
/** Run Hooman as an ACP agent over stdio. */
|
|
69
42
|
export declare function runAcpStdio(): Promise<void>;
|
|
43
|
+
export {};
|