@bilalimamoglu/sift 0.2.3 → 0.3.1
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 +264 -46
- package/dist/cli.js +5996 -1266
- package/dist/index.d.ts +25 -2
- package/dist/index.js +4063 -827
- package/package.json +4 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
type ProviderName = "openai" | "openai-compatible";
|
|
1
|
+
type ProviderName = "openai" | "openai-compatible" | "openrouter";
|
|
2
|
+
type NativeProviderName = "openai" | "openrouter";
|
|
3
|
+
interface ProviderProfile {
|
|
4
|
+
model?: string;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
}
|
|
8
|
+
type ProviderProfiles = Partial<Record<NativeProviderName, ProviderProfile>>;
|
|
2
9
|
type OutputFormat = "brief" | "bullets" | "json" | "verdict";
|
|
3
10
|
type DetailLevel = "standard" | "focused" | "verbose";
|
|
11
|
+
type Goal = "summarize" | "diagnose";
|
|
12
|
+
type RawSliceStrategy = "none" | "bucket_evidence" | "traceback_window" | "head_tail";
|
|
4
13
|
type ResponseMode = "text" | "json";
|
|
5
14
|
type JsonResponseFormatMode = "auto" | "on" | "off";
|
|
6
15
|
type PromptPolicyName = "test-status" | "audit-critical" | "diff-summary" | "build-failure" | "log-errors" | "infra-risk" | "typecheck-summary" | "lint-failures";
|
|
@@ -39,12 +48,14 @@ interface SiftConfig {
|
|
|
39
48
|
input: InputConfig;
|
|
40
49
|
runtime: RuntimeConfig;
|
|
41
50
|
presets: Record<string, PresetDefinition>;
|
|
51
|
+
providerProfiles?: ProviderProfiles;
|
|
42
52
|
}
|
|
43
53
|
interface PartialSiftConfig {
|
|
44
54
|
provider?: Partial<ProviderConfig>;
|
|
45
55
|
input?: Partial<InputConfig>;
|
|
46
56
|
runtime?: Partial<RuntimeConfig>;
|
|
47
57
|
presets?: Record<string, PresetDefinition>;
|
|
58
|
+
providerProfiles?: ProviderProfiles;
|
|
48
59
|
}
|
|
49
60
|
interface GenerateInput {
|
|
50
61
|
model: string;
|
|
@@ -70,12 +81,20 @@ interface RunRequest {
|
|
|
70
81
|
format: OutputFormat;
|
|
71
82
|
stdin: string;
|
|
72
83
|
config: SiftConfig;
|
|
84
|
+
goal?: Goal;
|
|
73
85
|
dryRun?: boolean;
|
|
74
86
|
showRaw?: boolean;
|
|
87
|
+
includeTestIds?: boolean;
|
|
75
88
|
detail?: DetailLevel;
|
|
76
89
|
presetName?: string;
|
|
77
90
|
policyName?: PromptPolicyName;
|
|
78
91
|
outputContract?: string;
|
|
92
|
+
analysisContext?: string;
|
|
93
|
+
testStatusContext?: {
|
|
94
|
+
resolvedTests?: string[];
|
|
95
|
+
remainingTests?: string[];
|
|
96
|
+
remainingSubsetAvailable?: boolean;
|
|
97
|
+
};
|
|
79
98
|
fallbackJson?: unknown;
|
|
80
99
|
}
|
|
81
100
|
interface PreparedInput {
|
|
@@ -110,9 +129,13 @@ declare function looksInteractivePrompt(windowText: string): boolean;
|
|
|
110
129
|
declare function normalizeChildExitCode(status: number | null, signal: NodeJS.Signals | null): number;
|
|
111
130
|
interface ExecRequest extends Omit<RunRequest, "stdin"> {
|
|
112
131
|
command?: string[];
|
|
132
|
+
cwd?: string;
|
|
133
|
+
diff?: boolean;
|
|
113
134
|
failOn?: boolean;
|
|
114
135
|
showRaw?: boolean;
|
|
115
136
|
shellCommand?: string;
|
|
137
|
+
skipCacheWrite?: boolean;
|
|
138
|
+
watch?: boolean;
|
|
116
139
|
}
|
|
117
140
|
declare function buildCommandPreview(request: ExecRequest): string;
|
|
118
141
|
declare function getExecSuccessShortcut(args: {
|
|
@@ -137,4 +160,4 @@ interface ResolveOptions {
|
|
|
137
160
|
}
|
|
138
161
|
declare function resolveConfig(options?: ResolveOptions): SiftConfig;
|
|
139
162
|
|
|
140
|
-
export { BoundedCapture, type DetailLevel, type ExecRequest, type GenerateInput, type GenerateResult, type InputConfig, type JsonResponseFormatMode, type LLMProvider, type OutputFormat, type PartialSiftConfig, type PreparedInput, type PresetDefinition, type PromptPolicyName, type ProviderConfig, type ProviderName, type ResolveOptions, type ResponseMode, type RunRequest, type RuntimeConfig, type SiftConfig, type UsageInfo, buildCommandPreview, getExecSuccessShortcut, looksInteractivePrompt, mergeDefined, normalizeChildExitCode, resolveConfig, runExec, runSift };
|
|
163
|
+
export { BoundedCapture, type DetailLevel, type ExecRequest, type GenerateInput, type GenerateResult, type Goal, type InputConfig, type JsonResponseFormatMode, type LLMProvider, type NativeProviderName, type OutputFormat, type PartialSiftConfig, type PreparedInput, type PresetDefinition, type PromptPolicyName, type ProviderConfig, type ProviderName, type ProviderProfile, type ProviderProfiles, type RawSliceStrategy, type ResolveOptions, type ResponseMode, type RunRequest, type RuntimeConfig, type SiftConfig, type UsageInfo, buildCommandPreview, getExecSuccessShortcut, looksInteractivePrompt, mergeDefined, normalizeChildExitCode, resolveConfig, runExec, runSift };
|