@quantiya/codevibe-core 2.0.85 → 2.0.86
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/index.js +534 -531
- package/dist/orchestration-shell/cli.js +290 -55
- package/dist/orchestration-shell/command-intent.d.ts +18 -0
- package/dist/orchestration-shell/gemma-intent-classifier.d.ts +48 -0
- package/dist/orchestration-shell/index.d.ts +30 -1
- package/dist/orchestration-shell/web/extract.d.ts +6 -0
- package/dist/prompt-parser.d.ts +11 -0
- package/dist/terminal-menu.d.ts +10 -0
- package/dist/tui-parser/gemma-tui-parser.d.ts +74 -0
- package/dist/tui-parser/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ParsedInteractivePrompt } from '../prompt-parser';
|
|
2
|
+
export interface TuiGemmaPort {
|
|
3
|
+
classify(req: {
|
|
4
|
+
prompt: string;
|
|
5
|
+
jsonSchema?: Record<string, unknown>;
|
|
6
|
+
maxOutputTokens: number;
|
|
7
|
+
signal?: AbortSignal;
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
text: string;
|
|
11
|
+
}>;
|
|
12
|
+
}
|
|
13
|
+
export interface RawGemmaTuiOption {
|
|
14
|
+
number: string;
|
|
15
|
+
text: string;
|
|
16
|
+
is_selected?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface RawGemmaTuiResponse {
|
|
19
|
+
is_interactive_prompt: boolean;
|
|
20
|
+
kind: 'numbered' | 'yes_no' | 'text' | 'none';
|
|
21
|
+
prompt_text: string;
|
|
22
|
+
selected_option_number?: string | null;
|
|
23
|
+
options?: RawGemmaTuiOption[];
|
|
24
|
+
requires_follow_up_text?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const TUI_PARSER_JSON_SCHEMA: Record<string, unknown>;
|
|
27
|
+
/** Deterministic pre-guard to quickly reject snapshots that cannot be interactive menus. */
|
|
28
|
+
export declare function hasInteractivePromptMarkers(text: string): boolean;
|
|
29
|
+
export declare function buildTuiParserPrompt(normalizedSnapshot: string): string;
|
|
30
|
+
export declare function parseTuiGemmaResponse(raw: string): RawGemmaTuiResponse | null;
|
|
31
|
+
/**
|
|
32
|
+
* Low-level raw structured response parser with timeout and cancellation bounds.
|
|
33
|
+
*/
|
|
34
|
+
export declare function parseRawTuiWithGemma(snapshot: string, port: TuiGemmaPort, opts?: {
|
|
35
|
+
timeoutMs?: number;
|
|
36
|
+
signal?: AbortSignal;
|
|
37
|
+
}): Promise<RawGemmaTuiResponse | null>;
|
|
38
|
+
/**
|
|
39
|
+
* Parse an interactive terminal prompt using Gemma with structured JSON.
|
|
40
|
+
* Returns `ParsedInteractivePrompt` or `null`.
|
|
41
|
+
*/
|
|
42
|
+
export declare function parseInteractivePromptWithGemma(snapshot: string, port: TuiGemmaPort, opts?: {
|
|
43
|
+
timeoutMs?: number;
|
|
44
|
+
signal?: AbortSignal;
|
|
45
|
+
}): Promise<ParsedInteractivePrompt | null>;
|
|
46
|
+
/** Check whether an option's label matches its row text without altering meaning or imposing ASCII word boundaries (Codex R51-F2). */
|
|
47
|
+
export declare function isOptionTextRowMatch(rowContent: string, label: string): boolean;
|
|
48
|
+
export interface GroundedMenuRow {
|
|
49
|
+
optionNumber: string;
|
|
50
|
+
rowText: string;
|
|
51
|
+
lineIndex: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Extract candidate option rows from snapshot and isolate the single active menu block
|
|
55
|
+
* at the bottom of the snapshot, ignoring stale options in prior scrollback blocks (Codex R52-F2).
|
|
56
|
+
*/
|
|
57
|
+
export declare function getActiveMenuBlock(snapshot: string): GroundedMenuRow[];
|
|
58
|
+
/**
|
|
59
|
+
* Structured TerminalMenu returned by Gemma TUI parser.
|
|
60
|
+
*/
|
|
61
|
+
export interface GemmaTerminalMenu {
|
|
62
|
+
prompt: ParsedInteractivePrompt;
|
|
63
|
+
selectedNumber: string;
|
|
64
|
+
identity: string;
|
|
65
|
+
snapshot: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Parse an active terminal menu using Gemma with structured JSON.
|
|
69
|
+
* Returns `GemmaTerminalMenu` or `null`.
|
|
70
|
+
*/
|
|
71
|
+
export declare function parseActiveTerminalMenuWithGemma(snapshot: string, port: TuiGemmaPort, opts?: {
|
|
72
|
+
timeoutMs?: number;
|
|
73
|
+
signal?: AbortSignal;
|
|
74
|
+
}): Promise<GemmaTerminalMenu | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { parseInteractivePromptWithGemma, parseActiveTerminalMenuWithGemma, hasInteractivePromptMarkers, buildTuiParserPrompt, parseTuiGemmaResponse, isOptionTextRowMatch, TUI_PARSER_JSON_SCHEMA, type TuiGemmaPort, type RawGemmaTuiOption, type RawGemmaTuiResponse, type GemmaTerminalMenu, } from './gemma-tui-parser';
|
package/package.json
CHANGED