govon 1.2.2 → 1.4.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/bin/govon.js +2 -41
- package/dist/App.d.ts +22 -0
- package/dist/App.d.ts.map +1 -0
- package/dist/App.js +307 -0
- package/dist/App.js.map +1 -0
- package/dist/client.d.ts +102 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +332 -0
- package/dist/client.js.map +1 -0
- package/dist/components/ApprovalPrompt.d.ts +15 -0
- package/dist/components/ApprovalPrompt.d.ts.map +1 -0
- package/dist/components/ApprovalPrompt.js +35 -0
- package/dist/components/ApprovalPrompt.js.map +1 -0
- package/dist/components/Banner.d.ts +6 -0
- package/dist/components/Banner.d.ts.map +1 -0
- package/dist/components/Banner.js +27 -0
- package/dist/components/Banner.js.map +1 -0
- package/dist/components/InputBar.d.ts +8 -0
- package/dist/components/InputBar.d.ts.map +1 -0
- package/dist/components/InputBar.js +26 -0
- package/dist/components/InputBar.js.map +1 -0
- package/dist/components/MarkdownView.d.ts +9 -0
- package/dist/components/MarkdownView.d.ts.map +1 -0
- package/dist/components/MarkdownView.js +38 -0
- package/dist/components/MarkdownView.js.map +1 -0
- package/dist/components/MessageBubble.d.ts +14 -0
- package/dist/components/MessageBubble.d.ts.map +1 -0
- package/dist/components/MessageBubble.js +15 -0
- package/dist/components/MessageBubble.js.map +1 -0
- package/dist/components/MetadataBar.d.ts +7 -0
- package/dist/components/MetadataBar.d.ts.map +1 -0
- package/dist/components/MetadataBar.js +19 -0
- package/dist/components/MetadataBar.js.map +1 -0
- package/dist/components/Spinner.d.ts +7 -0
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner.js +51 -0
- package/dist/components/Spinner.js.map +1 -0
- package/dist/components/ThinkingBlock.d.ts +9 -0
- package/dist/components/ThinkingBlock.d.ts.map +1 -0
- package/dist/components/ThinkingBlock.js +9 -0
- package/dist/components/ThinkingBlock.js.map +1 -0
- package/dist/components/ToolPanel.d.ts +7 -0
- package/dist/components/ToolPanel.d.ts.map +1 -0
- package/dist/components/ToolPanel.js +19 -0
- package/dist/components/ToolPanel.js.map +1 -0
- package/dist/config.d.ts +32 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +64 -0
- package/dist/config.js.map +1 -0
- package/dist/data/spinnerVerbs.d.ts +7 -0
- package/dist/data/spinnerVerbs.d.ts.map +1 -0
- package/dist/data/spinnerVerbs.js +58 -0
- package/dist/data/spinnerVerbs.js.map +1 -0
- package/dist/hooks/useDaemon.d.ts +16 -0
- package/dist/hooks/useDaemon.d.ts.map +1 -0
- package/dist/hooks/useDaemon.js +55 -0
- package/dist/hooks/useDaemon.js.map +1 -0
- package/dist/hooks/useHistory.d.ts +13 -0
- package/dist/hooks/useHistory.d.ts.map +1 -0
- package/dist/hooks/useHistory.js +170 -0
- package/dist/hooks/useHistory.js.map +1 -0
- package/dist/hooks/useSSE.d.ts +29 -0
- package/dist/hooks/useSSE.d.ts.map +1 -0
- package/dist/hooks/useSSE.js +341 -0
- package/dist/hooks/useSSE.js.map +1 -0
- package/dist/hooks/useTheme.d.ts +39 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/hooks/useTheme.js +36 -0
- package/dist/hooks/useTheme.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1496 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +356 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +67 -0
- package/dist/types.js.map +1 -0
- package/package.json +45 -19
- package/README.md +0 -45
- package/lib/python-check.js +0 -223
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,4EAA4E;AAC5E,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAwB,CAAC;AAE9D,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACtC,UAAU,CAAC,OAAO,CAAC;KACnB,KAAK,CAAC,YAAY,EAAE,kDAAkD,CAAC;KACvE,UAAU,CAAC,OAAO,EAAE;IACnB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,qCAAqC;CAChD,CAAC;KACD,MAAM,CAAC,SAAS,EAAE;IACjB,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,cAAc;CACzB,CAAC;KACD,IAAI,EAAE;KACN,SAAS,EAAE,CAAC;AAEf,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,6DAA6D;AAC7D,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAuB,CAAC;AAE9C,MAAM,CAAC,KAAC,GAAG,IAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,GAAI,CAAC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* types.ts — All shared TypeScript types for the GovOn npm TUI.
|
|
3
|
+
*
|
|
4
|
+
* Covers:
|
|
5
|
+
* - V3 SSE event discriminated union (fine-grained streaming)
|
|
6
|
+
* - V2 SSE event interface (coarse node-level streaming)
|
|
7
|
+
* - Chat message model (user / assistant with thinking & tools)
|
|
8
|
+
* - ApprovalRequest / ApprovalResponse
|
|
9
|
+
* - EvidenceItem / RunMetadata
|
|
10
|
+
* - AgentRunRequest / AgentRunResponse / AgentTrace / ToolResult
|
|
11
|
+
* - Theme
|
|
12
|
+
* - AppState + Action discriminated union for the reducer
|
|
13
|
+
* - Exported const maps: NODE_STATUS_MESSAGES, TASK_TYPE_LABELS,
|
|
14
|
+
* TASK_TYPE_STYLES, TOOL_DISPLAY_NAMES
|
|
15
|
+
*/
|
|
16
|
+
/** A single piece of evidence returned by the agent after a run. */
|
|
17
|
+
export interface EvidenceItem {
|
|
18
|
+
/** Origin of the evidence. */
|
|
19
|
+
source_type: "rag" | "api" | "llm_generated";
|
|
20
|
+
/** Human-readable content excerpt or summary. */
|
|
21
|
+
content: string;
|
|
22
|
+
/** Relevance / confidence score in [0, 1]. */
|
|
23
|
+
score?: number;
|
|
24
|
+
/** Arbitrary extra fields from the backend (e.g. chunk_id, url). */
|
|
25
|
+
metadata?: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/** Metadata attached to a completed agent run (v3 run_complete event). */
|
|
28
|
+
export interface RunMetadata {
|
|
29
|
+
total_iterations?: number;
|
|
30
|
+
total_tool_calls?: number;
|
|
31
|
+
total_latency_ms?: number;
|
|
32
|
+
node_latencies?: Record<string, number>;
|
|
33
|
+
}
|
|
34
|
+
/** A single tool call record embedded in a thinking_end event. */
|
|
35
|
+
export interface ToolCall {
|
|
36
|
+
name: string;
|
|
37
|
+
args: Record<string, unknown>;
|
|
38
|
+
}
|
|
39
|
+
export interface V3ThinkingStartEvent {
|
|
40
|
+
type: "thinking_start";
|
|
41
|
+
/** ReAct loop iteration number (1-based). */
|
|
42
|
+
iteration: number;
|
|
43
|
+
}
|
|
44
|
+
export interface V3ThinkingDeltaEvent {
|
|
45
|
+
type: "thinking_delta";
|
|
46
|
+
/** Partial LLM token chunk emitted during tool-call reasoning. */
|
|
47
|
+
content: string;
|
|
48
|
+
}
|
|
49
|
+
export interface V3ThinkingEndEvent {
|
|
50
|
+
type: "thinking_end";
|
|
51
|
+
/** Tool calls the agent decided to make after this reasoning step. */
|
|
52
|
+
tool_calls: ToolCall[];
|
|
53
|
+
/** ReAct loop iteration number (1-based). */
|
|
54
|
+
iteration: number;
|
|
55
|
+
}
|
|
56
|
+
export interface V3ToolStartEvent {
|
|
57
|
+
type: "tool_start";
|
|
58
|
+
/** Name of the tool being invoked. */
|
|
59
|
+
tool: string;
|
|
60
|
+
}
|
|
61
|
+
export interface V3ToolEndEvent {
|
|
62
|
+
type: "tool_end";
|
|
63
|
+
/** Name of the tool that finished. */
|
|
64
|
+
tool: string;
|
|
65
|
+
/** Whether the tool call succeeded. */
|
|
66
|
+
success?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface V3ResponseDeltaEvent {
|
|
69
|
+
type: "response_delta";
|
|
70
|
+
/** Partial final-answer token chunk (no tool_calls in flight). */
|
|
71
|
+
content: string;
|
|
72
|
+
}
|
|
73
|
+
export interface V3RunCompleteEvent {
|
|
74
|
+
type: "run_complete";
|
|
75
|
+
thread_id: string;
|
|
76
|
+
session_id: string;
|
|
77
|
+
/** Full final answer text. */
|
|
78
|
+
text: string;
|
|
79
|
+
evidence_items: EvidenceItem[];
|
|
80
|
+
metadata: RunMetadata;
|
|
81
|
+
}
|
|
82
|
+
export interface V3ErrorEvent {
|
|
83
|
+
type: "error";
|
|
84
|
+
error: string;
|
|
85
|
+
}
|
|
86
|
+
/** Discriminated union of all V3 SSE event shapes. */
|
|
87
|
+
export type V3SSEEvent = V3ThinkingStartEvent | V3ThinkingDeltaEvent | V3ThinkingEndEvent | V3ToolStartEvent | V3ToolEndEvent | V3ResponseDeltaEvent | V3RunCompleteEvent | V3ErrorEvent;
|
|
88
|
+
/** A pending human-approval request embedded in a V2 event. */
|
|
89
|
+
export interface ApprovalRequest {
|
|
90
|
+
/** Unique identifier for this approval gate. */
|
|
91
|
+
approval_id: string;
|
|
92
|
+
/** Task type key (see TASK_TYPE_LABELS for human-readable label). */
|
|
93
|
+
task_type: string;
|
|
94
|
+
/** Short description of what the agent wants to do. */
|
|
95
|
+
description?: string;
|
|
96
|
+
/** Tools the agent plans to call if approved. */
|
|
97
|
+
planned_tools?: string[];
|
|
98
|
+
/** Arbitrary structured context the UI may render. */
|
|
99
|
+
context?: Record<string, unknown>;
|
|
100
|
+
}
|
|
101
|
+
/** Coarse node-level event emitted by the V2 streaming endpoint. */
|
|
102
|
+
export interface V2SSEEvent {
|
|
103
|
+
/** Graph node name (e.g. "agent", "tools", "approval_wait"). */
|
|
104
|
+
node: string;
|
|
105
|
+
status: "completed" | "awaiting_approval" | "error" | (string & {});
|
|
106
|
+
/** Full answer text, present when node === "agent" and run is done. */
|
|
107
|
+
final_text?: string;
|
|
108
|
+
evidence_items?: EvidenceItem[];
|
|
109
|
+
/** Task type key for display purposes. */
|
|
110
|
+
task_type?: string;
|
|
111
|
+
approval_request?: ApprovalRequest;
|
|
112
|
+
thread_id?: string;
|
|
113
|
+
session_id?: string;
|
|
114
|
+
error?: string;
|
|
115
|
+
/** Raw tool outputs keyed by tool name. */
|
|
116
|
+
tool_results?: Record<string, unknown>;
|
|
117
|
+
/** Tools the agent plans to call next. */
|
|
118
|
+
planned_tools?: string[];
|
|
119
|
+
}
|
|
120
|
+
/** Request body sent to both /v2/agent/stream and /v3/agent/stream. */
|
|
121
|
+
export interface AgentRunRequest {
|
|
122
|
+
/** User query (1–10 000 chars). */
|
|
123
|
+
query: string;
|
|
124
|
+
/** Existing session to continue; omit to start a new session. */
|
|
125
|
+
session_id?: string;
|
|
126
|
+
/** Whether to stream the response via SSE (default: true). */
|
|
127
|
+
stream?: boolean;
|
|
128
|
+
/** Force specific tools to be called. */
|
|
129
|
+
force_tools?: string[];
|
|
130
|
+
/** Max tokens for the LLM response (default 512, max 4096). */
|
|
131
|
+
max_tokens?: number;
|
|
132
|
+
/** Sampling temperature (default 0.7, range 0–2). */
|
|
133
|
+
temperature?: number;
|
|
134
|
+
/** Max ReAct iterations (default 10, range 1–20). */
|
|
135
|
+
max_iterations?: number;
|
|
136
|
+
}
|
|
137
|
+
/** A single tool invocation record inside an AgentTrace. Matches backend ToolResultSchema. */
|
|
138
|
+
export interface ToolResult {
|
|
139
|
+
tool: string;
|
|
140
|
+
success: boolean;
|
|
141
|
+
latency_ms: number;
|
|
142
|
+
data: Record<string, unknown>;
|
|
143
|
+
error?: string;
|
|
144
|
+
}
|
|
145
|
+
/** Full reasoning trace for a single agent run. Matches backend AgentTraceSchema. */
|
|
146
|
+
export interface AgentTrace {
|
|
147
|
+
request_id: string;
|
|
148
|
+
session_id: string;
|
|
149
|
+
plan: string[];
|
|
150
|
+
plan_reason: string;
|
|
151
|
+
tool_results: ToolResult[];
|
|
152
|
+
total_latency_ms: number;
|
|
153
|
+
error?: string;
|
|
154
|
+
}
|
|
155
|
+
/** Non-streaming response returned by the agent endpoint. */
|
|
156
|
+
export interface AgentRunResponse {
|
|
157
|
+
request_id: string;
|
|
158
|
+
session_id: string;
|
|
159
|
+
text: string;
|
|
160
|
+
trace: AgentTrace;
|
|
161
|
+
/** Present in v2 stream approval events, absent in blocking run. */
|
|
162
|
+
thread_id?: string;
|
|
163
|
+
/** Present in v2 blocking run responses. */
|
|
164
|
+
graph_run_id?: string;
|
|
165
|
+
evidence_items?: EvidenceItem[];
|
|
166
|
+
metadata?: RunMetadata;
|
|
167
|
+
}
|
|
168
|
+
/** Response from POST /v2/agent/approve. */
|
|
169
|
+
export interface ApprovalResponse {
|
|
170
|
+
status: "approved" | "rejected" | "error";
|
|
171
|
+
thread_id: string;
|
|
172
|
+
session_id: string;
|
|
173
|
+
graph_run_id?: string;
|
|
174
|
+
text?: string;
|
|
175
|
+
evidence_items?: EvidenceItem[];
|
|
176
|
+
/** "approved" | "rejected" mirroring top-level status. */
|
|
177
|
+
approval_status?: string;
|
|
178
|
+
error?: string;
|
|
179
|
+
}
|
|
180
|
+
/** A reasoning/thinking step displayed inside an assistant message. */
|
|
181
|
+
export interface ThinkingStep {
|
|
182
|
+
/** Which ReAct iteration this step belongs to. */
|
|
183
|
+
iteration: number;
|
|
184
|
+
/** Accumulated thinking text for this step. */
|
|
185
|
+
content: string;
|
|
186
|
+
/** Tool calls decided at the end of this step. */
|
|
187
|
+
tool_calls?: ToolCall[];
|
|
188
|
+
}
|
|
189
|
+
/** A single tool invocation displayed inside an assistant message. */
|
|
190
|
+
export interface ToolInvocation {
|
|
191
|
+
tool: string;
|
|
192
|
+
/** Whether the tool call is still running. */
|
|
193
|
+
pending: boolean;
|
|
194
|
+
success?: boolean;
|
|
195
|
+
}
|
|
196
|
+
/** A single message in the chat history. */
|
|
197
|
+
export interface Message {
|
|
198
|
+
id: string;
|
|
199
|
+
role: "user" | "assistant";
|
|
200
|
+
/** Main text content (may be partial while streaming). */
|
|
201
|
+
content: string;
|
|
202
|
+
/** Thinking steps shown in a collapsible section. */
|
|
203
|
+
thinking?: ThinkingStep[];
|
|
204
|
+
/** Tool invocations shown inline. */
|
|
205
|
+
tools?: ToolInvocation[];
|
|
206
|
+
/** Evidence items shown after the answer. */
|
|
207
|
+
evidence?: EvidenceItem[];
|
|
208
|
+
/** Run metadata shown after the answer. */
|
|
209
|
+
metadata?: RunMetadata;
|
|
210
|
+
/** ISO-8601 timestamp. */
|
|
211
|
+
timestamp: string;
|
|
212
|
+
/** Whether streaming is still in progress. */
|
|
213
|
+
streaming?: boolean;
|
|
214
|
+
/** Error text, if this message represents a failure. */
|
|
215
|
+
error?: string;
|
|
216
|
+
}
|
|
217
|
+
export type Theme = "light" | "dark" | "system";
|
|
218
|
+
/** Global application state managed by the reducer. */
|
|
219
|
+
export interface AppState {
|
|
220
|
+
/** All messages in the current session. */
|
|
221
|
+
messages: Message[];
|
|
222
|
+
/** Whether the agent is currently processing a request. */
|
|
223
|
+
isLoading: boolean;
|
|
224
|
+
/** Current streaming text buffer (partial assistant response). */
|
|
225
|
+
streamingContent: string;
|
|
226
|
+
/** Current streaming thinking buffer. */
|
|
227
|
+
streamingThinking: string;
|
|
228
|
+
/** Pending thinking steps in the current run. */
|
|
229
|
+
pendingThinking: ThinkingStep[];
|
|
230
|
+
/** Active tool invocations in the current run. */
|
|
231
|
+
activeTools: ToolInvocation[];
|
|
232
|
+
/** Session ID from the backend (null until first run). */
|
|
233
|
+
sessionId: string | null;
|
|
234
|
+
/** Thread ID from the backend (null until first run). */
|
|
235
|
+
threadId: string | null;
|
|
236
|
+
/** Pending approval request, if any. */
|
|
237
|
+
pendingApproval: ApprovalRequest | null;
|
|
238
|
+
/** Current node/phase label shown in the status bar. */
|
|
239
|
+
statusLabel: string | null;
|
|
240
|
+
/** Last error message to surface in the UI. */
|
|
241
|
+
error: string | null;
|
|
242
|
+
/** Active color theme. */
|
|
243
|
+
theme: Theme;
|
|
244
|
+
/** Base URL of the GovOn backend. */
|
|
245
|
+
apiBase: string;
|
|
246
|
+
/** SSE protocol version in use. */
|
|
247
|
+
apiVersion: "v2" | "v3";
|
|
248
|
+
}
|
|
249
|
+
export interface SetLoadingAction {
|
|
250
|
+
type: "SET_LOADING";
|
|
251
|
+
payload: boolean;
|
|
252
|
+
}
|
|
253
|
+
export interface AddUserMessageAction {
|
|
254
|
+
type: "ADD_USER_MESSAGE";
|
|
255
|
+
payload: Pick<Message, "id" | "content" | "timestamp">;
|
|
256
|
+
}
|
|
257
|
+
/** Start a new assistant message slot for streaming. */
|
|
258
|
+
export interface StartAssistantMessageAction {
|
|
259
|
+
type: "START_ASSISTANT_MESSAGE";
|
|
260
|
+
payload: Pick<Message, "id" | "timestamp">;
|
|
261
|
+
}
|
|
262
|
+
export interface AppendStreamingContentAction {
|
|
263
|
+
type: "APPEND_STREAMING_CONTENT";
|
|
264
|
+
payload: string;
|
|
265
|
+
}
|
|
266
|
+
export interface AppendStreamingThinkingAction {
|
|
267
|
+
type: "APPEND_STREAMING_THINKING";
|
|
268
|
+
payload: string;
|
|
269
|
+
}
|
|
270
|
+
export interface StartThinkingStepAction {
|
|
271
|
+
type: "START_THINKING_STEP";
|
|
272
|
+
payload: {
|
|
273
|
+
iteration: number;
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
export interface EndThinkingStepAction {
|
|
277
|
+
type: "END_THINKING_STEP";
|
|
278
|
+
payload: {
|
|
279
|
+
iteration: number;
|
|
280
|
+
tool_calls: ToolCall[];
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
export interface MarkToolStartAction {
|
|
284
|
+
type: "MARK_TOOL_START";
|
|
285
|
+
payload: {
|
|
286
|
+
tool: string;
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
export interface MarkToolEndAction {
|
|
290
|
+
type: "MARK_TOOL_END";
|
|
291
|
+
payload: {
|
|
292
|
+
tool: string;
|
|
293
|
+
success?: boolean;
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
export interface FinalizeAssistantMessageAction {
|
|
297
|
+
type: "FINALIZE_ASSISTANT_MESSAGE";
|
|
298
|
+
payload: {
|
|
299
|
+
messageId: string;
|
|
300
|
+
content: string;
|
|
301
|
+
evidence: EvidenceItem[];
|
|
302
|
+
metadata: RunMetadata;
|
|
303
|
+
sessionId: string;
|
|
304
|
+
threadId: string;
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
export interface SetPendingApprovalAction {
|
|
308
|
+
type: "SET_PENDING_APPROVAL";
|
|
309
|
+
payload: ApprovalRequest | null;
|
|
310
|
+
}
|
|
311
|
+
export interface SetStatusLabelAction {
|
|
312
|
+
type: "SET_STATUS_LABEL";
|
|
313
|
+
payload: string | null;
|
|
314
|
+
}
|
|
315
|
+
export interface SetErrorAction {
|
|
316
|
+
type: "SET_ERROR";
|
|
317
|
+
payload: string | null;
|
|
318
|
+
}
|
|
319
|
+
export interface SetThemeAction {
|
|
320
|
+
type: "SET_THEME";
|
|
321
|
+
payload: Theme;
|
|
322
|
+
}
|
|
323
|
+
export interface SetApiBaseAction {
|
|
324
|
+
type: "SET_API_BASE";
|
|
325
|
+
payload: string;
|
|
326
|
+
}
|
|
327
|
+
export interface SetApiVersionAction {
|
|
328
|
+
type: "SET_API_VERSION";
|
|
329
|
+
payload: "v2" | "v3";
|
|
330
|
+
}
|
|
331
|
+
export interface ResetSessionAction {
|
|
332
|
+
type: "RESET_SESSION";
|
|
333
|
+
}
|
|
334
|
+
/** Discriminated union of all reducer actions. */
|
|
335
|
+
export type Action = SetLoadingAction | AddUserMessageAction | StartAssistantMessageAction | AppendStreamingContentAction | AppendStreamingThinkingAction | StartThinkingStepAction | EndThinkingStepAction | MarkToolStartAction | MarkToolEndAction | FinalizeAssistantMessageAction | SetPendingApprovalAction | SetStatusLabelAction | SetErrorAction | SetThemeAction | SetApiBaseAction | SetApiVersionAction | ResetSessionAction;
|
|
336
|
+
/**
|
|
337
|
+
* Human-readable status messages for each V2 graph node.
|
|
338
|
+
* Displayed in the status bar while the corresponding node is active.
|
|
339
|
+
*/
|
|
340
|
+
export declare const NODE_STATUS_MESSAGES: Readonly<Record<string, string>>;
|
|
341
|
+
/**
|
|
342
|
+
* Korean display labels for each task type key.
|
|
343
|
+
* Used in approval dialogs and history views.
|
|
344
|
+
*/
|
|
345
|
+
export declare const TASK_TYPE_LABELS: Readonly<Record<string, string>>;
|
|
346
|
+
/**
|
|
347
|
+
* Terminal / Ink color name for each task type's badge.
|
|
348
|
+
* Values correspond to Ink's `<Text color="...">` prop.
|
|
349
|
+
*/
|
|
350
|
+
export declare const TASK_TYPE_STYLES: Readonly<Record<string, string>>;
|
|
351
|
+
/**
|
|
352
|
+
* Human-readable display names for each tool identifier.
|
|
353
|
+
* Used in the tool-call inline UI within assistant messages.
|
|
354
|
+
*/
|
|
355
|
+
export declare const TOOL_DISPLAY_NAMES: Readonly<Record<string, string>>;
|
|
356
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["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H,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxD,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASpD,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASpD,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAItD,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* types.ts — All shared TypeScript types for the GovOn npm TUI.
|
|
3
|
+
*
|
|
4
|
+
* Covers:
|
|
5
|
+
* - V3 SSE event discriminated union (fine-grained streaming)
|
|
6
|
+
* - V2 SSE event interface (coarse node-level streaming)
|
|
7
|
+
* - Chat message model (user / assistant with thinking & tools)
|
|
8
|
+
* - ApprovalRequest / ApprovalResponse
|
|
9
|
+
* - EvidenceItem / RunMetadata
|
|
10
|
+
* - AgentRunRequest / AgentRunResponse / AgentTrace / ToolResult
|
|
11
|
+
* - Theme
|
|
12
|
+
* - AppState + Action discriminated union for the reducer
|
|
13
|
+
* - Exported const maps: NODE_STATUS_MESSAGES, TASK_TYPE_LABELS,
|
|
14
|
+
* TASK_TYPE_STYLES, TOOL_DISPLAY_NAMES
|
|
15
|
+
*/
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
// 8. Exported const maps (sourced from renderer.py and approval_ui.py)
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
/**
|
|
20
|
+
* Human-readable status messages for each V2 graph node.
|
|
21
|
+
* Displayed in the status bar while the corresponding node is active.
|
|
22
|
+
*/
|
|
23
|
+
export const NODE_STATUS_MESSAGES = {
|
|
24
|
+
session_load: "세션 로드 중…",
|
|
25
|
+
agent: "에이전트 추론 중…",
|
|
26
|
+
approval_wait: "승인 대기 중…",
|
|
27
|
+
tools: "도구 실행 중…",
|
|
28
|
+
persist: "저장 중…",
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Korean display labels for each task type key.
|
|
32
|
+
* Used in approval dialogs and history views.
|
|
33
|
+
*/
|
|
34
|
+
export const TASK_TYPE_LABELS = {
|
|
35
|
+
draft_response: "답변 초안 작성",
|
|
36
|
+
revise_response: "답변 수정",
|
|
37
|
+
lookup_stats: "통계 조회",
|
|
38
|
+
issue_detection: "이슈 탐지",
|
|
39
|
+
stats_query: "통계 조회",
|
|
40
|
+
keyword_analysis: "키워드 분석",
|
|
41
|
+
demographics_query: "인구통계 조회",
|
|
42
|
+
default: "일반 작업",
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Terminal / Ink color name for each task type's badge.
|
|
46
|
+
* Values correspond to Ink's `<Text color="...">` prop.
|
|
47
|
+
*/
|
|
48
|
+
export const TASK_TYPE_STYLES = {
|
|
49
|
+
draft_response: "cyan",
|
|
50
|
+
revise_response: "blue",
|
|
51
|
+
lookup_stats: "magenta",
|
|
52
|
+
issue_detection: "yellow",
|
|
53
|
+
stats_query: "magenta",
|
|
54
|
+
keyword_analysis: "yellow",
|
|
55
|
+
demographics_query: "blueBright",
|
|
56
|
+
default: "cyan",
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Human-readable display names for each tool identifier.
|
|
60
|
+
* Used in the tool-call inline UI within assistant messages.
|
|
61
|
+
*/
|
|
62
|
+
export const TOOL_DISPLAY_NAMES = {
|
|
63
|
+
stats_lookup: "민원 통계",
|
|
64
|
+
keyword_analyzer: "키워드 분석",
|
|
65
|
+
demographics_lookup: "인구통계",
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAyZH,8EAA8E;AAC9E,wEAAwE;AACxE,8EAA8E;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAqC;IACpE,YAAY,EAAE,UAAU;IACxB,KAAK,EAAE,YAAY;IACnB,aAAa,EAAE,UAAU;IACzB,KAAK,EAAE,UAAU;IACjB,OAAO,EAAE,OAAO;CACR,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqC;IAChE,cAAc,EAAE,UAAU;IAC1B,eAAe,EAAE,OAAO;IACxB,YAAY,EAAE,OAAO;IACrB,eAAe,EAAE,OAAO;IACxB,WAAW,EAAE,OAAO;IACpB,gBAAgB,EAAE,QAAQ;IAC1B,kBAAkB,EAAE,SAAS;IAC7B,OAAO,EAAE,OAAO;CACR,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAqC;IAChE,cAAc,EAAE,MAAM;IACtB,eAAe,EAAE,MAAM;IACvB,YAAY,EAAE,SAAS;IACvB,eAAe,EAAE,QAAQ;IACzB,WAAW,EAAE,SAAS;IACtB,gBAAgB,EAAE,QAAQ;IAC1B,kBAAkB,EAAE,YAAY;IAChC,OAAO,EAAE,MAAM;CACP,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAqC;IAClE,YAAY,EAAE,OAAO;IACrB,gBAAgB,EAAE,QAAQ;IAC1B,mBAAmB,EAAE,MAAM;CACnB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "govon",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"description": "GovOn CLI — Agentic TUI for Korean civil complaint assistance powered by React + Ink",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"govon": "./bin/govon.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "tsc && node esbuild.config.mjs",
|
|
11
|
+
"dev": "tsc --watch",
|
|
12
|
+
"typecheck": "tsc --noEmit",
|
|
13
|
+
"test": "vitest run",
|
|
14
|
+
"test:watch": "vitest"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=18"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"bin/",
|
|
21
|
+
"dist/",
|
|
22
|
+
"README.md"
|
|
23
|
+
],
|
|
5
24
|
"keywords": [
|
|
6
25
|
"govon",
|
|
7
|
-
"agentic-
|
|
8
|
-
"
|
|
9
|
-
"civil-complaint",
|
|
26
|
+
"agentic-tui",
|
|
27
|
+
"cli",
|
|
10
28
|
"korean-nlp",
|
|
11
|
-
"
|
|
29
|
+
"civil-complaint",
|
|
30
|
+
"react-ink"
|
|
12
31
|
],
|
|
13
32
|
"homepage": "https://github.com/GovOn-Org/GovOn#readme",
|
|
14
33
|
"bugs": {
|
|
@@ -20,18 +39,25 @@
|
|
|
20
39
|
"directory": "packages/npm"
|
|
21
40
|
},
|
|
22
41
|
"license": "MIT",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"cli-highlight": "^2.1.11",
|
|
44
|
+
"eventsource-parser": "^3.0.0",
|
|
45
|
+
"ink": "^5.2.0",
|
|
46
|
+
"ink-spinner": "^5.0.0",
|
|
47
|
+
"ink-text-input": "^6.0.0",
|
|
48
|
+
"marked": "^15.0.0",
|
|
49
|
+
"marked-terminal": "^7.3.0",
|
|
50
|
+
"react": "^18.3.1",
|
|
51
|
+
"yargs": "^17.7.2"
|
|
28
52
|
},
|
|
29
|
-
"
|
|
30
|
-
"node": "
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^25.5.2",
|
|
55
|
+
"@types/react": "^18.3.0",
|
|
56
|
+
"@types/yargs": "^17.0.33",
|
|
57
|
+
"esbuild": "^0.25.0",
|
|
58
|
+
"ink-testing-library": "^4.0.0",
|
|
59
|
+
"postject": "^1.0.0-alpha.6",
|
|
60
|
+
"typescript": "^5.7.0",
|
|
61
|
+
"vitest": "^3.1.0"
|
|
62
|
+
}
|
|
37
63
|
}
|
package/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# govon (npm)
|
|
2
|
-
|
|
3
|
-
npm wrapper for the [GovOn](https://github.com/umyunsang/GovOn) CLI.
|
|
4
|
-
|
|
5
|
-
GovOn is a shell-first local agent runtime for administrative support and civil complaint processing workflows.
|
|
6
|
-
|
|
7
|
-
## Requirements
|
|
8
|
-
|
|
9
|
-
- **Node.js** 18 or later
|
|
10
|
-
- **Python** 3.10 or later
|
|
11
|
-
- **pip** (Python package manager)
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install -g govon
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
After installation the Python environment is automatically verified.
|
|
20
|
-
If the `govon` Python package is not installed, install it with:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
pip install govon
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Usage
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
govon --help
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## How It Works
|
|
33
|
-
|
|
34
|
-
This package is a thin wrapper around the Python CLI (`govon`).
|
|
35
|
-
|
|
36
|
-
1. When the `govon` command is run, it checks whether Python 3.10+ is installed.
|
|
37
|
-
2. It verifies that the `govon` CLI (`pip install govon`) is installed.
|
|
38
|
-
3. If all conditions are met, execution is delegated to the Python CLI via `child_process.spawn`.
|
|
39
|
-
4. If conditions are not met, a clear installation guide message is printed and the process exits.
|
|
40
|
-
|
|
41
|
-
> Automatic Python installation is not supported due to security and permission concerns.
|
|
42
|
-
|
|
43
|
-
## License
|
|
44
|
-
|
|
45
|
-
MIT
|