Skip to content

Commit 9222c50

Browse files
authored
fix(ci): build harness before publishing agent (#3618)
1 parent c688e59 commit 9222c50

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

.github/workflows/agent-release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
- name: Build enricher (agent dependency)
5858
run: pnpm --filter @posthog/enricher run build
5959

60+
- name: Build harness (agent dependency)
61+
run: pnpm --filter @posthog/harness run build
62+
6063
- name: Build the package
6164
run: pnpm --filter agent run build
6265

packages/agent/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
"@posthog/shared": "workspace:*",
146146
"@posthog/git": "workspace:*",
147147
"@posthog/enricher": "workspace:*",
148+
"@posthog/harness": "workspace:*",
148149
"@types/bun": "latest",
149150
"@types/tar": "^6.1.13",
150151
"msw": "^2.12.7",
@@ -167,7 +168,6 @@
167168
"@opentelemetry/resources": "^2.0.0",
168169
"@opentelemetry/sdk-logs": "^0.208.0",
169170
"@opentelemetry/semantic-conventions": "^1.28.0",
170-
"@posthog/harness": "workspace:*",
171171
"@types/jsonwebtoken": "^9.0.10",
172172
"commander": "^14.0.2",
173173
"fflate": "^0.8.2",

packages/agent/src/pi/rpc-client.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,17 @@ import {
1111
RpcClient,
1212
type RpcClientOptions,
1313
} from "@earendil-works/pi-coding-agent";
14-
import type { PosthogProviderOptions } from "@posthog/harness/extensions/posthog-provider/provider";
1514
import { safePiEnvironment } from "./rpc-environment";
1615
import type { PiModelOption, PiThinkingLevel } from "./types";
1716

1817
export type PiRpcClient = RpcClient;
1918

19+
export interface PiRpcProviderOptions {
20+
region?: "us" | "eu" | "dev";
21+
apiKey: string;
22+
baseUrl?: string;
23+
}
24+
2025
export async function getAvailableModelsWithThinkingLevels(
2126
client: PiRpcClient,
2227
): Promise<PiModelOption[]> {
@@ -70,7 +75,7 @@ function attachJsonlReader(
7075
class SecurePiRpcClient extends RpcClient {
7176
constructor(
7277
private readonly secureOptions: RpcClientOptions,
73-
private readonly providerOptions: PosthogProviderOptions,
78+
private readonly providerOptions: PiRpcProviderOptions,
7479
) {
7580
super(secureOptions);
7681
}
@@ -164,7 +169,7 @@ export function getPiRpcClientProcess(
164169

165170
export type PiRpcClientOptions = Pick<RpcClientOptions, "cwd" | "model"> & {
166171
sessionFile?: string;
167-
providerOptions: PosthogProviderOptions & { apiKey: string };
172+
providerOptions: PiRpcProviderOptions;
168173
};
169174

170175
export function createPiRpcClient(options: PiRpcClientOptions): PiRpcClient {

pnpm-lock.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)