@benjamolina/pi-antigravity-guard 0.5.0 → 0.6.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/README.md +30 -14
- package/dist/accounts.d.ts +94 -0
- package/dist/accounts.js +953 -0
- package/dist/auth-http.d.ts +2 -1
- package/dist/auth-http.js +4 -2
- package/dist/catalog.d.ts +268 -0
- package/dist/catalog.js +265 -1
- package/dist/commands.d.ts +13 -0
- package/dist/commands.js +97 -0
- package/dist/context.d.ts +12 -2
- package/dist/context.js +291 -34
- package/dist/extension.d.ts +2 -2
- package/dist/extension.js +3 -3
- package/dist/project.d.ts +1 -0
- package/dist/project.js +1 -1
- package/dist/provider.d.ts +26 -1
- package/dist/provider.js +621 -23
- package/dist/response.d.ts +8 -0
- package/dist/response.js +59 -0
- package/dist/stream.d.ts +33 -2
- package/dist/stream.js +236 -27
- package/dist/tool-context.d.ts +2 -1
- package/dist/tool-context.js +79 -19
- package/dist/tool-schema.d.ts +2 -0
- package/dist/tool-schema.js +29 -27
- package/package.json +2 -2
package/dist/provider.d.ts
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
|
|
2
|
+
import { type ResolveSharedGuardPathsOptions, type SessionSignatureCache, type SharedGuardConfig } from "@benjamolina/antigravity-guard-core";
|
|
3
|
+
import { type PiAccountPool } from "./accounts.ts";
|
|
4
|
+
export interface PiGuardRuntimeOptions extends ResolveSharedGuardPathsOptions {
|
|
5
|
+
fetch?: typeof globalThis.fetch;
|
|
6
|
+
now?: () => number;
|
|
7
|
+
sleep?: (ms: number, signal: AbortSignal) => Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
export interface PiGuardRuntime {
|
|
10
|
+
getVersion(): string;
|
|
11
|
+
getUserAgent(): string;
|
|
12
|
+
getConfig(): SharedGuardConfig;
|
|
13
|
+
getAccountPool(): PiAccountPool;
|
|
14
|
+
getSignatureCache(): SessionSignatureCache;
|
|
15
|
+
refreshSession(cwd?: string): Promise<void>;
|
|
16
|
+
shutdown(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function createPiGuardRuntime(options?: PiGuardRuntimeOptions): PiGuardRuntime;
|
|
19
|
+
export type ProviderRegistrationHost = Pick<ExtensionAPI, "registerProvider"> & {
|
|
20
|
+
registerCommand?: ExtensionAPI["registerCommand"];
|
|
21
|
+
registerTool?: ExtensionAPI["registerTool"];
|
|
22
|
+
sendMessage?: ExtensionAPI["sendMessage"];
|
|
23
|
+
on?: (event: "session_start" | "session_shutdown", handler: (event: unknown, ctx?: {
|
|
24
|
+
cwd?: string;
|
|
25
|
+
}) => Promise<void> | void) => void;
|
|
26
|
+
};
|
|
27
|
+
export declare function registerAntigravityProvider(pi: ProviderRegistrationHost, options?: PiGuardRuntimeOptions): PiGuardRuntime;
|
|
3
28
|
export declare function parseProviderApiKey(value: string): {
|
|
4
29
|
token: string;
|
|
5
30
|
projectId: string;
|