@kenkaiiii/gg-agent 5.91.0 → 5.91.2

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/NOTICE ADDED
@@ -0,0 +1,52 @@
1
+ GG Coder
2
+ Copyright (C) 2025-2026 KenKai
3
+
4
+ This program is free software: you can redistribute it and/or modify it under
5
+ the terms of the GNU Affero General Public License as published by the Free
6
+ Software Foundation, version 3 only (AGPL-3.0-only). See LICENSE.
7
+
8
+ This program is distributed in the hope that it will be useful, but WITHOUT
9
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10
+ FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
11
+ details.
12
+
13
+ Releases before 4 November 2026 (up to and including v0.102.0 of the desktop
14
+ app and 5.91.0 of the npm packages) were published under the MIT License, and
15
+ copies already received under those terms keep them.
16
+
17
+ --------------------------------------------------------------------------------
18
+ Contributions under the MIT License
19
+
20
+ The WSL-to-Windows-host audio playback in packages/ggcoder/src/core/radio.ts
21
+ (isWsl and tryPlayOnWindowsHost) is derived from contributions by
22
+ creativeprofit22 (pull requests #15 and #16, May 2026), made under these terms:
23
+
24
+ Copyright (c) 2026 creativeprofit22
25
+
26
+ Permission is hereby granted, free of charge, to any person obtaining a copy
27
+ of this software and associated documentation files (the "Software"), to deal
28
+ in the Software without restriction, including without limitation the rights
29
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
+ copies of the Software, and to permit persons to whom the Software is
31
+ furnished to do so, subject to the following conditions:
32
+
33
+ The above copyright notice and this permission notice shall be included in
34
+ all copies or substantial portions of the Software.
35
+
36
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
42
+ SOFTWARE.
43
+
44
+ --------------------------------------------------------------------------------
45
+ Third-party components
46
+
47
+ Bundled third-party code, fonts and media keep their own licenses, listed in:
48
+ gg-app/src/assets/fonts/THIRD-PARTY.md
49
+ packages/ggcoder/assets/motion/THIRD-PARTY.md
50
+ packages/gg-world/CREDITS.md
51
+ and in the LICENSE / OFL.txt files beside each component. npm and Cargo
52
+ dependencies are installed under their own licenses.
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://www.npmjs.com/package/@kenkaiiii/gg-agent"><img src="https://img.shields.io/npm/v/@kenkaiiii/gg-agent?style=for-the-badge" alt="npm version"></a>
9
- <a href="../../LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a>
9
+ <a href="../../LICENSE"><img src="https://img.shields.io/badge/License-AGPL--3.0-blue.svg?style=for-the-badge" alt="AGPL-3.0 License"></a>
10
10
  </p>
11
11
 
12
12
  Give an LLM tools. It calls them. Results go back in. It loops until it's done. That's it.
@@ -51,41 +51,41 @@ Return a string, or a `{ content, details }` object for structured results. If `
51
51
 
52
52
  ## Events
53
53
 
54
- | Event | Description |
55
- |---|---|
56
- | `text_delta` | Incremental text output |
57
- | `thinking_delta` | Extended thinking output |
58
- | `tool_call_start` | Tool invocation started (name, args) |
59
- | `tool_call_update` | Progress update from a running tool |
60
- | `tool_call_end` | Tool finished (result, duration, isError) |
61
- | `server_tool_call` | Server-side tool invocation |
62
- | `server_tool_result` | Server-side tool result |
63
- | `turn_end` | One LLM call completed (stop reason, usage) |
64
- | `agent_done` | All turns finished (total turns, total usage) |
65
- | `error` | Fatal error |
54
+ | Event | Description |
55
+ | -------------------- | --------------------------------------------- |
56
+ | `text_delta` | Incremental text output |
57
+ | `thinking_delta` | Extended thinking output |
58
+ | `tool_call_start` | Tool invocation started (name, args) |
59
+ | `tool_call_update` | Progress update from a running tool |
60
+ | `tool_call_end` | Tool finished (result, duration, isError) |
61
+ | `server_tool_call` | Server-side tool invocation |
62
+ | `server_tool_result` | Server-side tool result |
63
+ | `turn_end` | One LLM call completed (stop reason, usage) |
64
+ | `agent_done` | All turns finished (total turns, total usage) |
65
+ | `error` | Fatal error |
66
66
 
67
67
  ---
68
68
 
69
69
  ## Options
70
70
 
71
- | Option | Type | Description |
72
- |---|---|---|
73
- | `provider` | `"anthropic" \| "openai" \| "glm" \| "moonshot"` | Required |
74
- | `model` | `string` | Required |
75
- | `system` | `string` | System prompt |
76
- | `tools` | `AgentTool[]` | Tools with Zod schemas and execute functions |
77
- | `serverTools` | `ServerToolDefinition[]` | Server-side tool definitions |
78
- | `maxTurns` | `number` | Max LLM calls (default: 100) |
79
- | `maxTokens` | `number` | Max output tokens per turn |
80
- | `temperature` | `number` | Sampling temperature |
81
- | `thinking` | `"low" \| "medium" \| "high" \| "max"` | Extended thinking |
82
- | `apiKey` | `string` | Provider API key |
83
- | `baseUrl` | `string` | Custom endpoint |
84
- | `signal` | `AbortSignal` | Cancellation |
85
- | `cacheRetention` | `"none" \| "short" \| "long"` | Prompt cache preference |
86
- | `compaction` | `boolean` | Server-side compaction (Anthropic only) |
87
- | `maxContinuations` | `number` | Max pause_turn continuations (default: 5) |
88
- | `transformContext` | `(messages) => messages` | Transform messages before each LLM call |
71
+ | Option | Type | Description |
72
+ | ------------------ | ------------------------------------------------ | -------------------------------------------- |
73
+ | `provider` | `"anthropic" \| "openai" \| "glm" \| "moonshot"` | Required |
74
+ | `model` | `string` | Required |
75
+ | `system` | `string` | System prompt |
76
+ | `tools` | `AgentTool[]` | Tools with Zod schemas and execute functions |
77
+ | `serverTools` | `ServerToolDefinition[]` | Server-side tool definitions |
78
+ | `maxTurns` | `number` | Max LLM calls (default: 100) |
79
+ | `maxTokens` | `number` | Max output tokens per turn |
80
+ | `temperature` | `number` | Sampling temperature |
81
+ | `thinking` | `"low" \| "medium" \| "high" \| "max"` | Extended thinking |
82
+ | `apiKey` | `string` | Provider API key |
83
+ | `baseUrl` | `string` | Custom endpoint |
84
+ | `signal` | `AbortSignal` | Cancellation |
85
+ | `cacheRetention` | `"none" \| "short" \| "long"` | Prompt cache preference |
86
+ | `compaction` | `boolean` | Server-side compaction (Anthropic only) |
87
+ | `maxContinuations` | `number` | Max pause_turn continuations (default: 5) |
88
+ | `transformContext` | `(messages) => messages` | Transform messages before each LLM call |
89
89
 
90
90
  `transformContext` is called before each LLM call. Use it for compaction, truncation, or injecting dynamic context.
91
91
 
@@ -93,4 +93,4 @@ Return a string, or a `{ content, details }` object for structured results. If `
93
93
 
94
94
  ## License
95
95
 
96
- MIT
96
+ AGPL-3.0-only. See [LICENSE](../../LICENSE).
package/dist/index.cjs CHANGED
@@ -991,6 +991,7 @@ async function* agentLoop(messages, options) {
991
991
  maxTokens: clampOutputTokens(ceilingKey, options.maxTokens),
992
992
  temperature: options.temperature,
993
993
  thinking: options.thinking,
994
+ thinkingLevels: options.thinkingLevels,
994
995
  apiKey: liveApiKey,
995
996
  baseUrl: options.baseUrl,
996
997
  signal,