@posthog/agent 2.3.80 → 2.3.84
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/dist/agent.js +12 -2
- package/dist/agent.js.map +1 -1
- package/dist/posthog-api.js +1 -1
- package/dist/posthog-api.js.map +1 -1
- package/dist/server/agent-server.js +12 -2
- package/dist/server/agent-server.js.map +1 -1
- package/dist/server/bin.cjs +12 -2
- package/dist/server/bin.cjs.map +1 -1
- package/package.json +1 -1
- package/src/adapters/claude/claude-agent.ts +6 -1
package/dist/agent.js
CHANGED
|
@@ -281,7 +281,7 @@ import { v7 as uuidv7 } from "uuid";
|
|
|
281
281
|
// package.json
|
|
282
282
|
var package_default = {
|
|
283
283
|
name: "@posthog/agent",
|
|
284
|
-
version: "2.3.
|
|
284
|
+
version: "2.3.84",
|
|
285
285
|
repository: "https://github.com/PostHog/code",
|
|
286
286
|
description: "TypeScript agent framework wrapping Claude Agent SDK with Git-based task execution for PostHog",
|
|
287
287
|
exports: {
|
|
@@ -2632,6 +2632,13 @@ var GATEWAY_TO_SDK_MODEL = {
|
|
|
2632
2632
|
function toSdkModelId(modelId) {
|
|
2633
2633
|
return GATEWAY_TO_SDK_MODEL[modelId] ?? modelId;
|
|
2634
2634
|
}
|
|
2635
|
+
var MODELS_WITH_1M_CONTEXT = /* @__PURE__ */ new Set([
|
|
2636
|
+
"claude-opus-4-6",
|
|
2637
|
+
"claude-sonnet-4-6"
|
|
2638
|
+
]);
|
|
2639
|
+
function supports1MContext(modelId) {
|
|
2640
|
+
return MODELS_WITH_1M_CONTEXT.has(modelId);
|
|
2641
|
+
}
|
|
2635
2642
|
var MODELS_WITH_EFFORT = /* @__PURE__ */ new Set([
|
|
2636
2643
|
"claude-opus-4-5",
|
|
2637
2644
|
"claude-opus-4-6",
|
|
@@ -3185,7 +3192,7 @@ var SettingsManager = class {
|
|
|
3185
3192
|
};
|
|
3186
3193
|
|
|
3187
3194
|
// src/adapters/claude/claude-agent.ts
|
|
3188
|
-
var SESSION_VALIDATION_TIMEOUT_MS =
|
|
3195
|
+
var SESSION_VALIDATION_TIMEOUT_MS = 3e4;
|
|
3189
3196
|
var MAX_TITLE_LENGTH = 256;
|
|
3190
3197
|
var LOCAL_ONLY_COMMANDS = /* @__PURE__ */ new Set(["/context", "/heapdump", "/extra-usage"]);
|
|
3191
3198
|
function sanitizeTitle(text2) {
|
|
@@ -3802,6 +3809,9 @@ var ClaudeAcpAgent = class extends BaseAcpAgent {
|
|
|
3802
3809
|
if (!isResume && resolvedSdkModel !== DEFAULT_MODEL) {
|
|
3803
3810
|
await this.session.query.setModel(resolvedSdkModel);
|
|
3804
3811
|
}
|
|
3812
|
+
if (supports1MContext(resolvedModelId)) {
|
|
3813
|
+
options.betas = ["context-1m-2025-08-07"];
|
|
3814
|
+
}
|
|
3805
3815
|
const availableModes2 = getAvailableModes();
|
|
3806
3816
|
const modes = {
|
|
3807
3817
|
currentModeId: permissionMode,
|