goatchain 0.0.5 → 0.0.7
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/acp-server.d.ts +5 -0
- package/dist/agent/tokenCounter.d.ts +10 -0
- package/dist/agent/types.d.ts +4 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +320 -190
- package/dist/session/executors/ToolExecutor.d.ts +1 -1
- package/dist/session/session.d.ts +17 -4
- package/dist/tool/builtin/bash.d.ts +51 -1
- package/dist/tool/builtin/index.d.ts +2 -2
- package/dist/tool/builtin/interactive-bash/constants.d.ts +3 -0
- package/dist/tool/builtin/interactive-bash/index.d.ts +5 -0
- package/dist/tool/builtin/interactive-bash/tools.d.ts +63 -0
- package/dist/tool/builtin/interactive-bash/types.d.ts +2 -0
- package/dist/tool/builtin/interactive-bash/utils.d.ts +24 -0
- package/dist/tool/builtin/task.d.ts +4 -0
- package/dist/tool/index.d.ts +2 -2
- package/dist/tool/types.d.ts +15 -1
- package/dist/types/event.d.ts +26 -2
- package/package.json +18 -9
- package/README.zh.md +0 -430
package/dist/acp-server.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { Message } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Token counter using tiktoken for accurate token counting.
|
|
4
|
+
*
|
|
5
|
+
* Supports both model-specific encoding (gpt-4o, gpt-4, etc.) and
|
|
6
|
+
* fallback to cl100k_base encoding.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* NOTE: Some runtimes may fail to load `tiktoken`'s WASM backend.
|
|
10
|
+
* We fall back to an approximate counter when encoding fails.
|
|
11
|
+
*/
|
|
2
12
|
export type TiktokenModel = string;
|
|
3
13
|
/**
|
|
4
14
|
* Count tokens in a string using the specified model's encoding.
|
package/dist/agent/types.d.ts
CHANGED
|
@@ -80,7 +80,10 @@ export interface AgentLoopState {
|
|
|
80
80
|
*/
|
|
81
81
|
lastModelStopReason?: ModelStopReason;
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Token usage statistics.
|
|
84
|
+
* - promptTokens: Current request's prompt tokens (not cumulative)
|
|
85
|
+
* - completionTokens: Current request's completion tokens (not cumulative)
|
|
86
|
+
* - totalTokens: Cumulative total tokens across all iterations
|
|
84
87
|
*/
|
|
85
88
|
usage: Usage;
|
|
86
89
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type { ParallelSubagentMiddlewareOptions } from './middleware/parallelSub
|
|
|
9
9
|
export { injectSystemReminderToLastUserMessage } from './middleware/utils';
|
|
10
10
|
export * from './subagent';
|
|
11
11
|
export * from './acp-adapter';
|
|
12
|
+
export { runAcpServer } from './acp-server';
|
|
12
13
|
export * from './model';
|
|
13
14
|
export type { OpenAITool } from './model';
|
|
14
15
|
export { BaseSession, BaseSessionManager, Session } from './session';
|