pi-langfuse 1.5.18 → 1.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 +6 -0
- package/README_CN.md +6 -0
- package/index.ts +52 -49
- package/package.json +3 -3
- package/src/handlers/agent.ts +102 -1
- package/src/handlers/cache.ts +147 -0
- package/src/handlers/generation.ts +39 -2
- package/src/handlers/session.ts +90 -0
- package/src/handlers/system-state.ts +186 -0
- package/src/handlers/tool.ts +1 -1
- package/src/handlers/turn.ts +1 -1
- package/src/langfuse.ts +76 -20
- package/src/observation.ts +1 -1
- package/src/state.ts +18 -3
- package/src/types.ts +21 -2
- package/src/utils.ts +75 -0
- package/types/langfuse-runtime-shims.d.ts +0 -49
- package/types/node-shims.d.ts +0 -29
- package/types/pi-coding-agent.d.ts +0 -16
package/types/node-shims.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
declare module "node:fs" {
|
|
2
|
-
export function mkdirSync(path: string, options?: { recursive?: boolean }): void;
|
|
3
|
-
export function readFileSync(path: string, encoding: string): string;
|
|
4
|
-
export function existsSync(path: string): boolean;
|
|
5
|
-
export function writeFileSync(path: string, data: string, encoding: string): void;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
declare module "node:crypto" {
|
|
9
|
-
export function randomUUID(): string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module "node:os" {
|
|
13
|
-
export function homedir(): string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare module "node:path" {
|
|
17
|
-
export function resolve(...paths: string[]): string;
|
|
18
|
-
export function dirname(path: string): string;
|
|
19
|
-
export function basename(path: string, suffix?: string): string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare module "node:url" {
|
|
23
|
-
export function fileURLToPath(url: string | URL): string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare const process: {
|
|
27
|
-
cwd(): string;
|
|
28
|
-
env: Record<string, string | undefined>;
|
|
29
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
declare module "@earendil-works/pi-coding-agent" {
|
|
2
|
-
export interface ExtensionContext {
|
|
3
|
-
sessionManager?: {
|
|
4
|
-
getSessionId?: () => unknown;
|
|
5
|
-
getSessionFile?: () => unknown;
|
|
6
|
-
};
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface ExtensionAPI {
|
|
10
|
-
on(event: string, handler: (event: any, ctx: any) => unknown): void;
|
|
11
|
-
registerCommand(
|
|
12
|
-
name: string,
|
|
13
|
-
options: { description?: string; handler: (args: string, ctx: any) => unknown },
|
|
14
|
-
): void;
|
|
15
|
-
}
|
|
16
|
-
}
|