@cortexkit/pi-antigravity-auth 1.1.0 → 2.0.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/convert.d.ts +11 -3
- package/dist/convert.d.ts.map +1 -1
- package/dist/credential-cache.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +312 -1793
- package/dist/index.js.map +4 -4
- package/dist/stream.d.ts +10 -3
- package/dist/stream.d.ts.map +1 -1
- package/package.json +6 -8
package/dist/convert.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import type { Context } from
|
|
1
|
+
import type { Context } from '@earendil-works/pi-ai';
|
|
2
2
|
/** Gemini `contents` part shapes. */
|
|
3
3
|
type GeminiPart = {
|
|
4
4
|
text: string;
|
|
5
|
+
thought?: boolean;
|
|
6
|
+
thoughtSignature?: string;
|
|
5
7
|
} | {
|
|
6
8
|
inlineData: {
|
|
7
9
|
mimeType: string;
|
|
@@ -11,16 +13,18 @@ type GeminiPart = {
|
|
|
11
13
|
functionCall: {
|
|
12
14
|
name: string;
|
|
13
15
|
args: Record<string, unknown>;
|
|
16
|
+
id: string;
|
|
14
17
|
};
|
|
15
18
|
thoughtSignature?: string;
|
|
16
19
|
} | {
|
|
17
20
|
functionResponse: {
|
|
18
21
|
name: string;
|
|
19
22
|
response: Record<string, unknown>;
|
|
23
|
+
id: string;
|
|
20
24
|
};
|
|
21
25
|
};
|
|
22
26
|
interface GeminiContent {
|
|
23
|
-
role:
|
|
27
|
+
role: 'user' | 'model';
|
|
24
28
|
parts: GeminiPart[];
|
|
25
29
|
}
|
|
26
30
|
interface GeminiTool {
|
|
@@ -37,10 +41,14 @@ export interface GeminiRequest {
|
|
|
37
41
|
parts: GeminiPart[];
|
|
38
42
|
};
|
|
39
43
|
}
|
|
44
|
+
export interface BuildGeminiRequestOptions {
|
|
45
|
+
provider?: string;
|
|
46
|
+
model?: string;
|
|
47
|
+
}
|
|
40
48
|
/**
|
|
41
49
|
* Convert a pi `Context` into a Gemini `generateContent` request body
|
|
42
50
|
* (the inner `request` object of the Antigravity envelope).
|
|
43
51
|
*/
|
|
44
|
-
export declare function buildGeminiRequest(context: Context): GeminiRequest;
|
|
52
|
+
export declare function buildGeminiRequest(context: Context, options?: BuildGeminiRequestOptions): GeminiRequest;
|
|
45
53
|
export {};
|
|
46
54
|
//# sourceMappingURL=convert.d.ts.map
|
package/dist/convert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../src/convert.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,OAAO,EAMR,MAAM,uBAAuB,CAAA;AAE9B,qCAAqC;AACrC,KAAK,UAAU,GACX;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,UAAU,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAClD;IACE,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAA;IACzE,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,GACD;IACE,gBAAgB,EAAE;QAChB,IAAI,EAAE,MAAM,CAAA;QACZ,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;QACjC,EAAE,EAAE,MAAM,CAAA;KACX,CAAA;CACF,CAAA;AAEL,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;IACtB,KAAK,EAAE,UAAU,EAAE,CAAA;CACpB;AAED,UAAU,UAAU;IAClB,oBAAoB,EAAE,KAAK,CAAC;QAC1B,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,UAAU,CAAC,EAAE,OAAO,CAAA;KACrB,CAAC,CAAA;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,aAAa,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,UAAU,EAAE,CAAA;IACpB,iBAAiB,CAAC,EAAE;QAAE,KAAK,EAAE,UAAU,EAAE,CAAA;KAAE,CAAA;CAC5C;AAwED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAiGD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,OAAO,EAChB,OAAO,CAAC,EAAE,yBAAyB,GAClC,aAAa,CAef"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-cache.d.ts","sourceRoot":"","sources":["../src/credential-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,wBAAgB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"credential-cache.d.ts","sourceRoot":"","sources":["../src/credential-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,IAAI,CASN;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAExE"}
|
package/dist/index.d.ts
CHANGED