Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/agent-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ jobs:
- name: Build enricher (agent dependency)
run: pnpm --filter @posthog/enricher run build

- name: Build harness (agent dependency)
run: pnpm --filter @posthog/harness run build

- name: Build the package
run: pnpm --filter agent run build

Expand Down
2 changes: 1 addition & 1 deletion packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
"@posthog/shared": "workspace:*",
"@posthog/git": "workspace:*",
"@posthog/enricher": "workspace:*",
"@posthog/harness": "workspace:*",
"@types/bun": "latest",
"@types/tar": "^6.1.13",
"msw": "^2.12.7",
Expand All @@ -167,7 +168,6 @@
"@opentelemetry/resources": "^2.0.0",
"@opentelemetry/sdk-logs": "^0.208.0",
"@opentelemetry/semantic-conventions": "^1.28.0",
"@posthog/harness": "workspace:*",
"@types/jsonwebtoken": "^9.0.10",
"commander": "^14.0.2",
"fflate": "^0.8.2",
Expand Down
11 changes: 8 additions & 3 deletions packages/agent/src/pi/rpc-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ import {
RpcClient,
type RpcClientOptions,
} from "@earendil-works/pi-coding-agent";
import type { PosthogProviderOptions } from "@posthog/harness/extensions/posthog-provider/provider";
import { safePiEnvironment } from "./rpc-environment";
import type { PiModelOption, PiThinkingLevel } from "./types";

export type PiRpcClient = RpcClient;

export interface PiRpcProviderOptions {
region?: "us" | "eu" | "dev";
apiKey: string;
baseUrl?: string;
}

export async function getAvailableModelsWithThinkingLevels(
client: PiRpcClient,
): Promise<PiModelOption[]> {
Expand Down Expand Up @@ -70,7 +75,7 @@ function attachJsonlReader(
class SecurePiRpcClient extends RpcClient {
constructor(
private readonly secureOptions: RpcClientOptions,
private readonly providerOptions: PosthogProviderOptions,
private readonly providerOptions: PiRpcProviderOptions,
) {
super(secureOptions);
}
Expand Down Expand Up @@ -164,7 +169,7 @@ export function getPiRpcClientProcess(

export type PiRpcClientOptions = Pick<RpcClientOptions, "cwd" | "model"> & {
sessionFile?: string;
providerOptions: PosthogProviderOptions & { apiKey: string };
providerOptions: PiRpcProviderOptions;
};

export function createPiRpcClient(options: PiRpcClientOptions): PiRpcClient {
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading