@best-agent/cli 0.0.2-beta.8 → 0.0.2-beta.9
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/LICENSE +21 -0
- package/README.md +44 -181
- package/dist/launcher.js +32 -0
- package/package.json +15 -27
- package/dist/best-agent-native-bridge.d.ts +0 -389
- package/dist/best-agent-native-bridge.js +0 -4645
- package/dist/cli-storage.d.ts +0 -5
- package/dist/cli-storage.js +0 -7
- package/dist/dimsdk/ask-user.d.ts +0 -21
- package/dist/dimsdk/ask-user.js +0 -131
- package/dist/dimsdk/cli/version.d.ts +0 -6
- package/dist/dimsdk/cli/version.js +0 -36
- package/dist/dimsdk/compat/archships/dim-agent/runtime-host.d.ts +0 -49
- package/dist/dimsdk/compat/archships/dim-agent/runtime-host.js +0 -215
- package/dist/dimsdk/compat/runtime-host.d.ts +0 -2
- package/dist/dimsdk/compat/runtime-host.js +0 -2
- package/dist/dimsdk/core/debug-log.d.ts +0 -8
- package/dist/dimsdk/core/debug-log.js +0 -100
- package/dist/dimsdk/core/env.d.ts +0 -26
- package/dist/dimsdk/core/env.js +0 -130
- package/dist/dimsdk/core/markdown/sanitize.d.ts +0 -2
- package/dist/dimsdk/core/markdown/sanitize.js +0 -43
- package/dist/dimsdk/core/markdown/wrap.d.ts +0 -9
- package/dist/dimsdk/core/markdown/wrap.js +0 -139
- package/dist/dimsdk/core/markdown.d.ts +0 -18
- package/dist/dimsdk/core/markdown.js +0 -62
- package/dist/dimsdk/core/model.d.ts +0 -273
- package/dist/dimsdk/core/model.js +0 -16
- package/dist/dimsdk/core/observability/perf-log.d.ts +0 -18
- package/dist/dimsdk/core/observability/perf-log.js +0 -236
- package/dist/dimsdk/core/store/agent-event-mappers.d.ts +0 -26
- package/dist/dimsdk/core/store/agent-event-mappers.js +0 -109
- package/dist/dimsdk/core/store/message-mutations.d.ts +0 -105
- package/dist/dimsdk/core/store/message-mutations.js +0 -1528
- package/dist/dimsdk/core/store/semantic-readers.d.ts +0 -2
- package/dist/dimsdk/core/store/semantic-readers.js +0 -4
- package/dist/dimsdk/core/store/transcript-projector.d.ts +0 -164
- package/dist/dimsdk/core/store/transcript-projector.js +0 -580
- package/dist/dimsdk/core/tool-metadata.d.ts +0 -12
- package/dist/dimsdk/core/tool-metadata.js +0 -70
- package/dist/dimsdk/core/transcript-part-id.d.ts +0 -6
- package/dist/dimsdk/core/transcript-part-id.js +0 -22
- package/dist/dimsdk/i18n/index.d.ts +0 -18
- package/dist/dimsdk/i18n/index.js +0 -141
- package/dist/dimsdk/i18n/locales/en.d.ts +0 -988
- package/dist/dimsdk/i18n/locales/en.js +0 -987
- package/dist/dimsdk/i18n/locales/index.d.ts +0 -1976
- package/dist/dimsdk/i18n/locales/index.js +0 -8
- package/dist/dimsdk/i18n/locales/zh-CN.d.ts +0 -988
- package/dist/dimsdk/i18n/locales/zh-CN.js +0 -987
- package/dist/dimsdk/i18n/types.d.ts +0 -13
- package/dist/dimsdk/i18n/types.js +0 -2
- package/dist/dimsdk/shared/value-normalizers.d.ts +0 -7
- package/dist/dimsdk/shared/value-normalizers.js +0 -48
- package/dist/dimsdk-tui.bundle-size.json +0 -169
- package/dist/dimsdk-tui.bundle.js +0 -330756
- package/dist/goatchain-adapter.d.ts +0 -41
- package/dist/goatchain-adapter.js +0 -499
- package/dist/index.d.ts +0 -3
- package/dist/index.js +0 -1405
- package/dist/native-runtime-bridge.d.ts +0 -387
- package/dist/native-runtime-bridge.js +0 -4624
- package/dist/provider-config-env.d.ts +0 -7
- package/dist/provider-config-env.js +0 -286
- package/dist/provider-model-limit-index.generated.d.ts +0 -3
- package/dist/provider-model-limit-index.generated.js +0 -7818
- package/dist/provider-model-limits.d.ts +0 -8
- package/dist/provider-model-limits.js +0 -43
- package/dist/runtime.d.ts +0 -47
- package/dist/runtime.js +0 -516
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type { ApprovalRequest, Message, ToolPermission, ToolResult } from "../model.js";
|
|
2
|
-
export type TranscriptSessionEvent = Readonly<{
|
|
3
|
-
type: "thinking.started";
|
|
4
|
-
partId: string;
|
|
5
|
-
subagentId?: string;
|
|
6
|
-
subagentTurnId?: string;
|
|
7
|
-
}> | Readonly<{
|
|
8
|
-
type: "thinking.delta";
|
|
9
|
-
partId: string;
|
|
10
|
-
delta: string;
|
|
11
|
-
subagentId?: string;
|
|
12
|
-
subagentTurnId?: string;
|
|
13
|
-
}> | Readonly<{
|
|
14
|
-
type: "thinking.finished";
|
|
15
|
-
partId: string;
|
|
16
|
-
content?: string;
|
|
17
|
-
subagentId?: string;
|
|
18
|
-
subagentTurnId?: string;
|
|
19
|
-
}> | Readonly<{
|
|
20
|
-
type: "assistant.delta";
|
|
21
|
-
delta: string;
|
|
22
|
-
streamId?: string;
|
|
23
|
-
}> | Readonly<{
|
|
24
|
-
type: "assistant.reset";
|
|
25
|
-
streamId?: string;
|
|
26
|
-
}> | Readonly<{
|
|
27
|
-
type: "assistant.message";
|
|
28
|
-
message: Readonly<{
|
|
29
|
-
content: string;
|
|
30
|
-
thinking?: string;
|
|
31
|
-
}>;
|
|
32
|
-
originalEventType?: "thread_item_message";
|
|
33
|
-
}> | Readonly<{
|
|
34
|
-
type: "tool.started";
|
|
35
|
-
toolCallId: string;
|
|
36
|
-
toolName: string;
|
|
37
|
-
subagentId?: string;
|
|
38
|
-
subagentTurnId?: string;
|
|
39
|
-
startedAtMs?: number;
|
|
40
|
-
input: Record<string, unknown>;
|
|
41
|
-
originalEventType?: "tool_call" | "tool_call_end";
|
|
42
|
-
}> | Readonly<{
|
|
43
|
-
type: "tool.delta";
|
|
44
|
-
toolCallId: string;
|
|
45
|
-
toolName: string;
|
|
46
|
-
subagentId?: string;
|
|
47
|
-
subagentTurnId?: string;
|
|
48
|
-
kind: "input" | "output";
|
|
49
|
-
delta: string;
|
|
50
|
-
linesWritten?: number;
|
|
51
|
-
isStderr?: boolean;
|
|
52
|
-
}> | Readonly<{
|
|
53
|
-
type: "tool.finished";
|
|
54
|
-
toolCallId: string;
|
|
55
|
-
toolName: string;
|
|
56
|
-
subagentId?: string;
|
|
57
|
-
subagentTurnId?: string;
|
|
58
|
-
errorCode?: string;
|
|
59
|
-
failureKind?: string;
|
|
60
|
-
output: unknown;
|
|
61
|
-
isError?: boolean;
|
|
62
|
-
}> | Readonly<{
|
|
63
|
-
type: "action.required";
|
|
64
|
-
kind: "tool_approval";
|
|
65
|
-
actionId: string;
|
|
66
|
-
subagentId?: string;
|
|
67
|
-
subagentTurnId?: string;
|
|
68
|
-
toolCallId: string;
|
|
69
|
-
toolName: string;
|
|
70
|
-
reason?: string;
|
|
71
|
-
permission?: ToolPermission;
|
|
72
|
-
riskLevel?: string;
|
|
73
|
-
args?: Record<string, unknown>;
|
|
74
|
-
availableScopes?: readonly string[];
|
|
75
|
-
payload?: Record<string, unknown>;
|
|
76
|
-
}> | Readonly<{
|
|
77
|
-
type: "action.required";
|
|
78
|
-
kind: "ask_user";
|
|
79
|
-
actionId: string;
|
|
80
|
-
toolCallId?: string;
|
|
81
|
-
toolName: string;
|
|
82
|
-
questions: readonly unknown[];
|
|
83
|
-
error?: unknown;
|
|
84
|
-
}> | Readonly<{
|
|
85
|
-
type: "subagent.started";
|
|
86
|
-
subagentId: string;
|
|
87
|
-
taskDescription?: string;
|
|
88
|
-
}> | Readonly<{
|
|
89
|
-
type: "subagent.output";
|
|
90
|
-
subagentId: string;
|
|
91
|
-
stream: "tool" | "text" | "error";
|
|
92
|
-
delta: string;
|
|
93
|
-
transcriptDelta?: string;
|
|
94
|
-
subagentTurnId?: string;
|
|
95
|
-
}> | Readonly<{
|
|
96
|
-
type: "subagent.state";
|
|
97
|
-
subagentId: string;
|
|
98
|
-
requestId?: string;
|
|
99
|
-
state: "running" | "paused";
|
|
100
|
-
}> | Readonly<{
|
|
101
|
-
type: "subagent.finished";
|
|
102
|
-
subagentId: string;
|
|
103
|
-
state: "completed" | "failed" | "rejected";
|
|
104
|
-
}> | Readonly<{
|
|
105
|
-
type: "error.recorded";
|
|
106
|
-
message: string;
|
|
107
|
-
}>;
|
|
108
|
-
type ProjectionMutations = Readonly<{
|
|
109
|
-
state: {
|
|
110
|
-
messages: Message[];
|
|
111
|
-
};
|
|
112
|
-
updateAssistant: (messageId: string, fn: (m: Extract<Message, {
|
|
113
|
-
role: "assistant";
|
|
114
|
-
}>) => Extract<Message, {
|
|
115
|
-
role: "assistant";
|
|
116
|
-
}>) => void;
|
|
117
|
-
updateAssistantHidden?: (messageId: string, fn: (m: Extract<Message, {
|
|
118
|
-
role: "assistant";
|
|
119
|
-
}>) => Extract<Message, {
|
|
120
|
-
role: "assistant";
|
|
121
|
-
}>) => void;
|
|
122
|
-
setAssistantStatus: (messageId: string, text: string) => void;
|
|
123
|
-
setAssistantThinking: (assistantId: string, content: string, partId: string) => void;
|
|
124
|
-
startNewThinkingBlock: (assistantId: string, partId: string) => void;
|
|
125
|
-
endThinkingBlock: (assistantId: string, partId: string, content?: string) => void;
|
|
126
|
-
appendAssistantMarkdown: (assistantId: string, delta: string) => void;
|
|
127
|
-
appendInfoPart?: (assistantId: string, text: string, meta?: Readonly<Record<string, unknown>>) => void;
|
|
128
|
-
upsertSubagentInfo: (assistantId: string, subagentId: string, kind: "header" | "activity" | "finished", text: string, meta?: Readonly<{
|
|
129
|
-
subagentStream?: string;
|
|
130
|
-
subagentTurnId?: string;
|
|
131
|
-
}>) => void;
|
|
132
|
-
upsertToolCallDelta: (assistantId: string, callId: string, toolName: string | undefined, argsTextDelta: string | undefined, linesWritten?: number, meta?: Readonly<{
|
|
133
|
-
subagentId?: string;
|
|
134
|
-
subagentTurnId?: string;
|
|
135
|
-
startedAtMs?: number;
|
|
136
|
-
}>) => void;
|
|
137
|
-
upsertToolCallEnd: (assistantId: string, callId: string, toolName: string, args: Record<string, unknown>, thoughtSignature?: string, meta?: Readonly<{
|
|
138
|
-
subagentId?: string;
|
|
139
|
-
subagentTurnId?: string;
|
|
140
|
-
startedAtMs?: number;
|
|
141
|
-
}>) => void;
|
|
142
|
-
upsertToolOutputStart: (assistantId: string, toolCallId: string, toolName: string, meta?: Readonly<{
|
|
143
|
-
subagentId?: string;
|
|
144
|
-
subagentTurnId?: string;
|
|
145
|
-
}>) => void;
|
|
146
|
-
appendToolOutputDelta: (assistantId: string, toolCallId: string, toolName: string, delta: string, meta?: Readonly<{
|
|
147
|
-
subagentId?: string;
|
|
148
|
-
subagentTurnId?: string;
|
|
149
|
-
}>) => void;
|
|
150
|
-
insertApprovalPart: (assistantId: string, request: ApprovalRequest) => void;
|
|
151
|
-
attachToolResultPart: (assistantId: string, result: ToolResult, meta?: Readonly<{
|
|
152
|
-
subagentId?: string;
|
|
153
|
-
subagentTurnId?: string;
|
|
154
|
-
}>) => void;
|
|
155
|
-
scheduleToolResultHighlight?: (assistantId: string, result: ToolResult) => void;
|
|
156
|
-
upsertChecklistPartFromDimSdk?: (assistantId: string, kind: "todo" | "plan", toolCallId: string, structured: unknown) => void;
|
|
157
|
-
flushPendingAssistantOutput?: (assistantId?: string) => void;
|
|
158
|
-
}>;
|
|
159
|
-
export declare function createTranscriptProjector(opts: ProjectionMutations): {
|
|
160
|
-
apply(assistantId: string, event: TranscriptSessionEvent): void;
|
|
161
|
-
clearAssistant(assistantId: string): void;
|
|
162
|
-
};
|
|
163
|
-
export {};
|
|
164
|
-
//# sourceMappingURL=transcript-projector.d.ts.map
|