@posthog/agent 2.3.62 → 2.3.67

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/agent",
3
- "version": "2.3.62",
3
+ "version": "2.3.67",
4
4
  "repository": "https://github.com/PostHog/code",
5
5
  "description": "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
6
6
  "exports": {
@@ -107,11 +107,11 @@
107
107
  "access": "public"
108
108
  },
109
109
  "scripts": {
110
- "build": "rm -rf dist && tsup",
110
+ "build": "node ../../scripts/rimraf.mjs dist && tsup",
111
111
  "dev": "tsup --watch",
112
112
  "test": "vitest run",
113
113
  "test:watch": "vitest",
114
114
  "typecheck": "pnpm exec tsc --noEmit",
115
- "clean": "rm -rf dist .turbo"
115
+ "clean": "node ../../scripts/rimraf.mjs dist .turbo"
116
116
  }
117
117
  }
@@ -1,3 +1,4 @@
1
+ import * as path from "node:path";
1
2
  import type { PromptRequest } from "@agentclientprotocol/sdk";
2
3
  import type { SDKUserMessage } from "@anthropic-ai/claude-agent-sdk";
3
4
  import type { ContentBlockParam } from "@anthropic-ai/sdk/resources";
@@ -12,12 +13,11 @@ function formatUriAsLink(uri: string): string {
12
13
  try {
13
14
  if (uri.startsWith("file://")) {
14
15
  const filePath = uri.slice(7);
15
- const name = filePath.split("/").pop() || filePath;
16
+ const name = path.basename(filePath) || filePath;
16
17
  return `[@${name}](${uri})`;
17
18
  }
18
19
  if (uri.startsWith("zed://")) {
19
- const parts = uri.split("/");
20
- const name = parts[parts.length - 1] || uri;
20
+ const name = path.basename(uri) || uri;
21
21
  return `[@${name}](${uri})`;
22
22
  }
23
23
  return uri;