agent-sh 0.13.7 → 0.14.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 +1 -1
- package/dist/agent/agent-loop.d.ts +13 -17
- package/dist/agent/agent-loop.js +118 -224
- package/dist/agent/conversation-state.d.ts +1 -1
- package/dist/agent/events.d.ts +218 -0
- package/dist/agent/events.js +1 -0
- package/dist/agent/host-types.d.ts +20 -0
- package/dist/agent/index.d.ts +5 -9
- package/dist/agent/index.js +269 -167
- package/dist/agent/llm-facade.d.ts +13 -0
- package/dist/{utils → agent}/llm-facade.js +1 -1
- package/dist/agent/nuclear-form.d.ts +1 -1
- package/dist/agent/providers/deepseek.js +2 -5
- package/dist/agent/providers/openai-compatible.js +2 -2
- package/dist/agent/providers/openai.js +2 -5
- package/dist/agent/providers/openrouter.js +5 -5
- package/dist/agent/subagent.d.ts +1 -1
- package/dist/agent/tool-protocol.d.ts +1 -1
- package/dist/agent/tool-registry.d.ts +1 -1
- package/dist/cli/auth/cli.js +11 -6
- package/dist/cli/auth/discover.d.ts +5 -0
- package/dist/cli/auth/discover.js +25 -0
- package/dist/cli/auth/keys.d.ts +5 -2
- package/dist/cli/auth/keys.js +22 -2
- package/dist/cli/index.d.ts +16 -0
- package/dist/cli/index.js +12 -2
- package/dist/core/event-bus.d.ts +28 -371
- package/dist/core/extension-loader.js +6 -6
- package/dist/core/index.d.ts +10 -29
- package/dist/core/index.js +32 -84
- package/dist/extensions/index.d.ts +2 -1
- package/dist/extensions/index.js +1 -1
- package/dist/extensions/slash-commands/events.d.ts +18 -0
- package/dist/extensions/slash-commands/events.js +1 -0
- package/dist/extensions/slash-commands/index.d.ts +15 -0
- package/dist/extensions/{slash-commands.js → slash-commands/index.js} +4 -3
- package/dist/shell/events.d.ts +85 -0
- package/dist/shell/events.js +1 -0
- package/dist/shell/index.d.ts +1 -0
- package/dist/shell/index.js +6 -0
- package/dist/shell/tui-renderer.js +0 -1
- package/examples/extensions/ash-acp-bridge/src/index.ts +2 -2
- package/examples/extensions/ashi/package.json +1 -1
- package/examples/extensions/ollama.ts +47 -42
- package/examples/extensions/opencode-bridge/README.md +4 -0
- package/examples/extensions/opencode-bridge/index.ts +3 -1
- package/examples/extensions/pi-bridge/index.ts +3 -4
- package/examples/extensions/zai-coding-plan.ts +2 -6
- package/package.json +1 -1
- package/dist/extensions/slash-commands.d.ts +0 -2
- package/dist/utils/llm-facade.d.ts +0 -11
- /package/dist/{utils → agent}/llm-client.d.ts +0 -0
- /package/dist/{utils → agent}/llm-client.js +0 -0
|
@@ -25,14 +25,10 @@ function buildReasoningParams(level: string, _model?: string): Record<string, un
|
|
|
25
25
|
|
|
26
26
|
export default function activate(ctx: AgentContext): void {
|
|
27
27
|
const { key } = resolveApiKey(ID);
|
|
28
|
-
const apiKey = key ?? process.env.ZAI_API_KEY ?? process.env.ZHIPU_API_KEY;
|
|
29
|
-
if (!apiKey) return;
|
|
30
|
-
|
|
31
28
|
ctx.agent.providers.configure(ID, { reasoningParams: buildReasoningParams });
|
|
32
|
-
|
|
33
|
-
ctx.bus.emit("provider:register", {
|
|
29
|
+
ctx.agent.providers.register({
|
|
34
30
|
id: ID,
|
|
35
|
-
apiKey:
|
|
31
|
+
apiKey: key ?? process.env.ZAI_API_KEY ?? process.env.ZHIPU_API_KEY,
|
|
36
32
|
baseURL: BASE_URL,
|
|
37
33
|
defaultModel: DEFAULT_MODELS[0].id,
|
|
38
34
|
models: DEFAULT_MODELS,
|
package/package.json
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ctx.llm facade — delegates to an `llm:invoke` handler registered by the
|
|
3
|
-
* active backend. No handler → `available` is false and calls reject.
|
|
4
|
-
*/
|
|
5
|
-
import type { LlmInterface } from "../agent/host-types.js";
|
|
6
|
-
interface HandlerGate {
|
|
7
|
-
list: () => string[];
|
|
8
|
-
call: (name: string, ...args: unknown[]) => unknown;
|
|
9
|
-
}
|
|
10
|
-
export declare function createLlmFacade(handlers: HandlerGate): LlmInterface;
|
|
11
|
-
export {};
|
|
File without changes
|
|
File without changes
|