glitchgrab 1.22.0 → 1.23.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/dist/index.d.mts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +1099 -282
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1104 -283
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -114,7 +114,7 @@ interface UseGlitchgrabReturn {
|
|
|
114
114
|
* Fixes grammar / clarity only — never invents details or changes meaning.
|
|
115
115
|
* Returns the polished text, or the original text on any failure (never throws).
|
|
116
116
|
*/
|
|
117
|
-
enhanceText: (text: string) => Promise<string>;
|
|
117
|
+
enhanceText: (text: string, screenshot?: string | null) => Promise<string>;
|
|
118
118
|
/** The token being used */
|
|
119
119
|
token: string;
|
|
120
120
|
/** The base URL of the Glitchgrab API */
|
|
@@ -294,12 +294,20 @@ declare function captureContext(visitedPages: string[]): CapturedContext;
|
|
|
294
294
|
* Never throws — returns null on failure.
|
|
295
295
|
*/
|
|
296
296
|
declare function sendReport(payload: ReportPayload, baseUrl?: string): Promise<ReportResult | null>;
|
|
297
|
+
interface EnhanceContext {
|
|
298
|
+
url?: string;
|
|
299
|
+
visitedPages?: string[];
|
|
300
|
+
breadcrumbs?: Array<{
|
|
301
|
+
type: string;
|
|
302
|
+
message: string;
|
|
303
|
+
}>;
|
|
304
|
+
}
|
|
297
305
|
/**
|
|
298
306
|
* Polish raw description text via the Glitchgrab AI enhance endpoint.
|
|
299
307
|
* Returns the polished text on success, or the original text on any failure.
|
|
300
308
|
* Never throws.
|
|
301
309
|
*/
|
|
302
|
-
declare function enhanceText(text: string, token: string, baseUrl?: string): Promise<string>;
|
|
310
|
+
declare function enhanceText(text: string, token: string, baseUrl?: string, screenshot?: string | null, context?: EnhanceContext | null): Promise<string>;
|
|
303
311
|
|
|
304
312
|
declare function computeSignature(params: {
|
|
305
313
|
errorMessage: string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -114,7 +114,7 @@ interface UseGlitchgrabReturn {
|
|
|
114
114
|
* Fixes grammar / clarity only — never invents details or changes meaning.
|
|
115
115
|
* Returns the polished text, or the original text on any failure (never throws).
|
|
116
116
|
*/
|
|
117
|
-
enhanceText: (text: string) => Promise<string>;
|
|
117
|
+
enhanceText: (text: string, screenshot?: string | null) => Promise<string>;
|
|
118
118
|
/** The token being used */
|
|
119
119
|
token: string;
|
|
120
120
|
/** The base URL of the Glitchgrab API */
|
|
@@ -294,12 +294,20 @@ declare function captureContext(visitedPages: string[]): CapturedContext;
|
|
|
294
294
|
* Never throws — returns null on failure.
|
|
295
295
|
*/
|
|
296
296
|
declare function sendReport(payload: ReportPayload, baseUrl?: string): Promise<ReportResult | null>;
|
|
297
|
+
interface EnhanceContext {
|
|
298
|
+
url?: string;
|
|
299
|
+
visitedPages?: string[];
|
|
300
|
+
breadcrumbs?: Array<{
|
|
301
|
+
type: string;
|
|
302
|
+
message: string;
|
|
303
|
+
}>;
|
|
304
|
+
}
|
|
297
305
|
/**
|
|
298
306
|
* Polish raw description text via the Glitchgrab AI enhance endpoint.
|
|
299
307
|
* Returns the polished text on success, or the original text on any failure.
|
|
300
308
|
* Never throws.
|
|
301
309
|
*/
|
|
302
|
-
declare function enhanceText(text: string, token: string, baseUrl?: string): Promise<string>;
|
|
310
|
+
declare function enhanceText(text: string, token: string, baseUrl?: string, screenshot?: string | null, context?: EnhanceContext | null): Promise<string>;
|
|
303
311
|
|
|
304
312
|
declare function computeSignature(params: {
|
|
305
313
|
errorMessage: string | undefined;
|