stk-codegen 1.0.9 → 1.1.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 +0 -0
- package/dist/{984.index.js → 194.index.js} +13 -10
- package/dist/{96.index.js → 905.index.js} +6 -6
- package/dist/index.js +52 -32
- package/package.json +30 -7
- package/dist/App.d.ts +0 -4
- package/dist/cli.d.ts +0 -1
- package/dist/components/AgentStatus.d.ts +0 -7
- package/dist/components/BootstrapStatus.d.ts +0 -7
- package/dist/components/Conversation.d.ts +0 -20
- package/dist/components/DiffView.d.ts +0 -23
- package/dist/components/EscapeClearIndicator.d.ts +0 -3
- package/dist/components/ExitIndicator.d.ts +0 -3
- package/dist/components/Footer.d.ts +0 -5
- package/dist/components/Input.d.ts +0 -20
- package/dist/components/LimitedHeightBox.d.ts +0 -25
- package/dist/components/Message.d.ts +0 -12
- package/dist/components/ShellConfirmation.d.ts +0 -8
- package/dist/components/ShellExecution.d.ts +0 -19
- package/dist/components/SplashScreen.d.ts +0 -4
- package/dist/components/ToolExecution.d.ts +0 -9
- package/dist/config.d.ts +0 -9
- package/dist/core/agent/events.d.ts +0 -82
- package/dist/core/agent/reducer.d.ts +0 -4
- package/dist/core/agent/types.d.ts +0 -58
- package/dist/hooks/hooks.d.ts +0 -5
- package/dist/hooks/useAgent.core.d.ts +0 -16
- package/dist/hooks/useAgent.d.ts +0 -48
- package/dist/hooks/useMagicCommands.d.ts +0 -1
- package/dist/hooks/useTerminalLayout.d.ts +0 -16
- package/dist/services/clipboardImage.d.ts +0 -24
- package/dist/services/versionCheck.d.ts +0 -14
- package/dist/services/websocketClient.d.ts +0 -24
- package/dist/tools/Edit.d.ts +0 -14
- package/dist/tools/FindFiles.d.ts +0 -12
- package/dist/tools/GetWorkingDirectory.d.ts +0 -13
- package/dist/tools/GoogleSearch.d.ts +0 -9
- package/dist/tools/ReadFile.d.ts +0 -11
- package/dist/tools/ReadFolder.d.ts +0 -12
- package/dist/tools/ReadManyFiles.d.ts +0 -10
- package/dist/tools/SaveMemory.d.ts +0 -9
- package/dist/tools/SearchText.d.ts +0 -8
- package/dist/tools/Shell.d.ts +0 -11
- package/dist/tools/WebFetch.d.ts +0 -9
- package/dist/tools/WriteFile.d.ts +0 -10
- package/dist/tools/WriteTodos.d.ts +0 -9
- package/dist/tools/index.d.ts +0 -13
- package/dist/tools/runShellCommandAsync.d.ts +0 -3
- package/dist/tools/searchTextFallback.d.ts +0 -20
- package/dist/types/index.d.ts +0 -140
- package/dist/ui/agent/buildInkViewModel.d.ts +0 -57
- package/dist/ui/agent/mapMessages.d.ts +0 -7
- package/dist/ui/agent/textFormatting.d.ts +0 -8
- package/dist/utils/display.d.ts +0 -1
- package/dist/utils/keyMatchers.d.ts +0 -3
- package/dist/utils/paths.d.ts +0 -1
- package/dist/utils/projectSpecLoader.d.ts +0 -5
- package/dist/utils/text-buffer.d.ts +0 -25
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const ReadFolder: (parameters: {
|
|
2
|
-
dir_path: string;
|
|
3
|
-
ignore?: string[];
|
|
4
|
-
}) => Promise<{
|
|
5
|
-
llmContent: string;
|
|
6
|
-
returnDisplay: string;
|
|
7
|
-
error?: undefined;
|
|
8
|
-
} | {
|
|
9
|
-
error: any;
|
|
10
|
-
llmContent?: undefined;
|
|
11
|
-
returnDisplay?: undefined;
|
|
12
|
-
}>;
|
package/dist/tools/Shell.d.ts
DELETED
package/dist/tools/WebFetch.d.ts
DELETED
package/dist/tools/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export { ReadFile } from './ReadFile.js';
|
|
2
|
-
export { ReadFolder } from './ReadFolder.js';
|
|
3
|
-
export { Shell } from './Shell.js';
|
|
4
|
-
export { FindFiles } from './FindFiles.js';
|
|
5
|
-
export { SearchText } from './SearchText.js';
|
|
6
|
-
export { WriteFile } from './WriteFile.js';
|
|
7
|
-
export { Edit } from './Edit.js';
|
|
8
|
-
export { ReadManyFiles } from './ReadManyFiles.js';
|
|
9
|
-
export { SaveMemory } from './SaveMemory.js';
|
|
10
|
-
export { WebFetch } from './WebFetch.js';
|
|
11
|
-
export { GoogleSearch } from './GoogleSearch.js';
|
|
12
|
-
export { WriteTodos } from './WriteTodos.js';
|
|
13
|
-
export { GetWorkingDirectory } from './GetWorkingDirectory.js';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export type SearchTextParams = {
|
|
2
|
-
pattern: string;
|
|
3
|
-
dir_path?: string;
|
|
4
|
-
include?: string;
|
|
5
|
-
case_sensitive?: boolean;
|
|
6
|
-
fixed_strings?: boolean;
|
|
7
|
-
context?: number;
|
|
8
|
-
};
|
|
9
|
-
export type SearchTextMatch = {
|
|
10
|
-
file: string;
|
|
11
|
-
line: number;
|
|
12
|
-
content: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Node-based SearchText fallback that avoids external binaries.
|
|
16
|
-
* Behavior is best-effort compatible with rg: returns line matches and line text.
|
|
17
|
-
*/
|
|
18
|
-
export declare const searchTextFallback: (params: SearchTextParams) => Promise<{
|
|
19
|
-
matches: SearchTextMatch[];
|
|
20
|
-
}>;
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
export interface ConversationMessage {
|
|
2
|
-
id: string;
|
|
3
|
-
sender: 'user' | 'agent' | 'tool_execution' | 'agent_thought' | 'agent_error' | 'system' | 'shell';
|
|
4
|
-
text: string;
|
|
5
|
-
toolName?: string;
|
|
6
|
-
toolParams?: Record<string, any>;
|
|
7
|
-
status?: 'running' | 'finished' | 'pending_review' | 'completed';
|
|
8
|
-
stream?: {
|
|
9
|
-
status: 'streaming' | 'finished';
|
|
10
|
-
content?: string;
|
|
11
|
-
};
|
|
12
|
-
highlightedBlock?: {
|
|
13
|
-
language?: string;
|
|
14
|
-
content: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export interface PendingShellCommand {
|
|
18
|
-
tool_name: string;
|
|
19
|
-
tool_id: string;
|
|
20
|
-
generation_id: string;
|
|
21
|
-
parameters: {
|
|
22
|
-
command: string;
|
|
23
|
-
dir_path?: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface RunTool {
|
|
27
|
-
type: 'run_tool';
|
|
28
|
-
payload: {
|
|
29
|
-
tool_name: string;
|
|
30
|
-
tool_id: string;
|
|
31
|
-
generation_id: string;
|
|
32
|
-
parameters: Record<string, any>;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export interface ToolResult {
|
|
36
|
-
type: 'tool_result';
|
|
37
|
-
payload: {
|
|
38
|
-
tool_name: string;
|
|
39
|
-
tool_id: string;
|
|
40
|
-
generation_id: string | null;
|
|
41
|
-
status: 'success' | 'error';
|
|
42
|
-
result: any | null;
|
|
43
|
-
error?: string | null;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export interface ClientCancelGeneration {
|
|
47
|
-
type: 'client_cancel_generation';
|
|
48
|
-
payload: {
|
|
49
|
-
generation_id: string;
|
|
50
|
-
reason?: string;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
export interface AgentGenerationCancelled {
|
|
54
|
-
type: 'agent_generation_cancelled';
|
|
55
|
-
payload: {
|
|
56
|
-
generation_id: string;
|
|
57
|
-
reason?: string | null;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
export interface UserMessage {
|
|
61
|
-
type: 'user_message';
|
|
62
|
-
payload: {
|
|
63
|
-
prompt: string;
|
|
64
|
-
images?: {
|
|
65
|
-
base64: string;
|
|
66
|
-
mimeType: string;
|
|
67
|
-
}[];
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
export interface MagicCommand {
|
|
71
|
-
type: 'magic_command';
|
|
72
|
-
payload: {
|
|
73
|
-
name: string;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export interface WriteTodosResponse {
|
|
77
|
-
llmContent: string;
|
|
78
|
-
returnDisplay: {
|
|
79
|
-
todos: {
|
|
80
|
-
description: string;
|
|
81
|
-
status: string;
|
|
82
|
-
}[];
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
export interface HandshakeMessage {
|
|
86
|
-
type: 'handshake';
|
|
87
|
-
payload: {
|
|
88
|
-
client_type: 'cli';
|
|
89
|
-
known_tools: string[];
|
|
90
|
-
custom_tools: any[];
|
|
91
|
-
projectSpec: {
|
|
92
|
-
content: string;
|
|
93
|
-
filePaths: string[];
|
|
94
|
-
} | null;
|
|
95
|
-
initial_prompt?: string;
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
export interface ClientCancelLast {
|
|
99
|
-
type: 'client_cancel_last';
|
|
100
|
-
payload: Record<string, never>;
|
|
101
|
-
}
|
|
102
|
-
export type ClientMessage = UserMessage | MagicCommand | ClientCancelGeneration | ClientCancelLast | ToolResult | HandshakeMessage;
|
|
103
|
-
export type BackendMessage = RunTool | AgentGenerationCancelled | {
|
|
104
|
-
type: 'agent_error';
|
|
105
|
-
payload: {
|
|
106
|
-
generation_id?: string;
|
|
107
|
-
message: string;
|
|
108
|
-
details?: string;
|
|
109
|
-
};
|
|
110
|
-
} | {
|
|
111
|
-
type: 'agent_message_delta';
|
|
112
|
-
payload: {
|
|
113
|
-
generation_id?: string;
|
|
114
|
-
content: string;
|
|
115
|
-
};
|
|
116
|
-
} | {
|
|
117
|
-
type: 'agent_message';
|
|
118
|
-
payload: {
|
|
119
|
-
generation_id?: string;
|
|
120
|
-
content: string;
|
|
121
|
-
};
|
|
122
|
-
} | {
|
|
123
|
-
type: 'agent_thought';
|
|
124
|
-
payload: {
|
|
125
|
-
generation_id?: string;
|
|
126
|
-
content: string;
|
|
127
|
-
};
|
|
128
|
-
} | {
|
|
129
|
-
type: 'agent_finished';
|
|
130
|
-
payload: {
|
|
131
|
-
generation_id?: string;
|
|
132
|
-
content?: string;
|
|
133
|
-
};
|
|
134
|
-
} | {
|
|
135
|
-
type: 'handshake_ack';
|
|
136
|
-
payload: Record<string, never>;
|
|
137
|
-
} | {
|
|
138
|
-
type: 'bootstrap_finished';
|
|
139
|
-
payload: Record<string, never>;
|
|
140
|
-
};
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { CoreState } from '../../core/agent/types.js';
|
|
2
|
-
export interface StaticMessageView {
|
|
3
|
-
id: string;
|
|
4
|
-
role: 'user' | 'agent' | 'tool_execution' | 'shell' | 'system' | 'agent_error' | 'agent_thought';
|
|
5
|
-
text: string;
|
|
6
|
-
toolName?: string;
|
|
7
|
-
toolParams?: Record<string, any>;
|
|
8
|
-
status?: 'running' | 'finished' | 'error';
|
|
9
|
-
isBootstrap?: boolean;
|
|
10
|
-
highlightedBlock?: {
|
|
11
|
-
language?: string;
|
|
12
|
-
content: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
export interface ShellRunView {
|
|
16
|
-
id: string;
|
|
17
|
-
command: string;
|
|
18
|
-
status: 'pending' | 'running' | 'finished' | 'error' | 'cancelled';
|
|
19
|
-
stdout: string;
|
|
20
|
-
stderr: string;
|
|
21
|
-
/**
|
|
22
|
-
* Saída agregada (stdout + stderr) em forma já limpa para
|
|
23
|
-
* renderização, potencialmente truncada apenas do ponto de
|
|
24
|
-
* vista visual (o CoreState continua contendo a saída completa).
|
|
25
|
-
*/
|
|
26
|
-
visibleOutput: string;
|
|
27
|
-
/**
|
|
28
|
-
* Indica se a saída visual foi truncada em relação à saída real.
|
|
29
|
-
*/
|
|
30
|
-
isVisuallyTruncated: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Número total de linhas de saída (stdout + stderr) no core.
|
|
33
|
-
*/
|
|
34
|
-
totalLines: number;
|
|
35
|
-
/**
|
|
36
|
-
* Número de linhas efetivamente renderizadas na UI.
|
|
37
|
-
*/
|
|
38
|
-
visibleLinesCount: number;
|
|
39
|
-
}
|
|
40
|
-
export interface DiffReviewView {
|
|
41
|
-
id: string;
|
|
42
|
-
title?: string;
|
|
43
|
-
toolName?: string;
|
|
44
|
-
toolParams?: Record<string, any>;
|
|
45
|
-
oldContent: string;
|
|
46
|
-
newContent: string;
|
|
47
|
-
status: 'pending' | 'accepted' | 'rejected';
|
|
48
|
-
}
|
|
49
|
-
export interface InkViewModel {
|
|
50
|
-
staticMessages: StaticMessageView[];
|
|
51
|
-
liveAgentMessage?: StaticMessageView;
|
|
52
|
-
activeShellRun?: ShellRunView;
|
|
53
|
-
activeDiffReview?: DiffReviewView;
|
|
54
|
-
agentStatusLabel: string;
|
|
55
|
-
agentStatusPhase: string;
|
|
56
|
-
}
|
|
57
|
-
export declare function buildInkViewModel(state: CoreState): InkViewModel;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { CoreMessage } from '../../core/agent/types.js';
|
|
2
|
-
import { ConversationMessage } from '../../types/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Helper centralizado para mapear mensagens do core para o formato
|
|
5
|
-
* usado atualmente pelos componentes de conversa.
|
|
6
|
-
*/
|
|
7
|
-
export declare function mapCoreMessageToConversation(message: CoreMessage): ConversationMessage;
|
package/dist/utils/display.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const buildFriendlyLabel: (toolName: string, toolParams?: Record<string, any>) => string;
|
package/dist/utils/paths.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const sanitizePath: (p?: string) => string | undefined;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare class TextBuffer {
|
|
2
|
-
private text;
|
|
3
|
-
private cursor;
|
|
4
|
-
constructor(initialValue?: string);
|
|
5
|
-
get value(): string;
|
|
6
|
-
get cursorPosition(): number;
|
|
7
|
-
insert(char: string): void;
|
|
8
|
-
insertText(text: string): void;
|
|
9
|
-
backspace(): void;
|
|
10
|
-
delete(): void;
|
|
11
|
-
moveCursorLeft(): void;
|
|
12
|
-
moveCursorRight(): void;
|
|
13
|
-
moveCursorToStart(): void;
|
|
14
|
-
moveCursorToEnd(): void;
|
|
15
|
-
private _getLines;
|
|
16
|
-
private _offsetToRowCol;
|
|
17
|
-
private _rowColToOffset;
|
|
18
|
-
getLineCount(): number;
|
|
19
|
-
getCursorRow(): number;
|
|
20
|
-
moveCursorUp(): void;
|
|
21
|
-
moveCursorDown(): void;
|
|
22
|
-
moveCursorWordLeft(): void;
|
|
23
|
-
moveCursorWordRight(): void;
|
|
24
|
-
clone(): TextBuffer;
|
|
25
|
-
}
|