@posthog/agent 2.3.449 → 2.3.454

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.449",
3
+ "version": "2.3.454",
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": {
@@ -10,30 +10,30 @@ describe("buildExitPlanModePermissionOptions", () => {
10
10
  expect(options[options.length - 1].optionId).toBe("reject_with_feedback");
11
11
  });
12
12
 
13
- it("promotes the previous mode to the first position with a continue label", () => {
14
- const options = buildExitPlanModePermissionOptions("default");
15
- expect(options[0]).toMatchObject({
16
- optionId: "default",
17
- name: "Yes, continue manually approving edits",
18
- });
19
- expect(options[options.length - 1].optionId).toBe("reject_with_feedback");
20
- });
21
-
22
- it("relabels the auto option when it is the previous mode", () => {
23
- const options = buildExitPlanModePermissionOptions("auto");
24
- expect(options[0]).toMatchObject({
25
- optionId: "auto",
26
- name: 'Yes, continue in "auto" mode',
27
- });
28
- });
29
-
30
- it("relabels the acceptEdits option when it is the previous mode", () => {
31
- const options = buildExitPlanModePermissionOptions("acceptEdits");
32
- expect(options[0]).toMatchObject({
33
- optionId: "acceptEdits",
34
- name: "Yes, continue auto-accepting edits",
35
- });
36
- });
13
+ it.each([
14
+ {
15
+ previousMode: "default",
16
+ expectedName: "Yes, continue manually approving edits",
17
+ },
18
+ {
19
+ previousMode: "auto",
20
+ expectedName: 'Yes, continue in "auto" mode',
21
+ },
22
+ {
23
+ previousMode: "acceptEdits",
24
+ expectedName: "Yes, continue auto-accepting edits",
25
+ },
26
+ ])(
27
+ "promotes the $previousMode mode to the first position with a continue label",
28
+ ({ previousMode, expectedName }) => {
29
+ const options = buildExitPlanModePermissionOptions(previousMode);
30
+ expect(options[0]).toMatchObject({
31
+ optionId: previousMode,
32
+ name: expectedName,
33
+ });
34
+ expect(options[options.length - 1].optionId).toBe("reject_with_feedback");
35
+ },
36
+ );
37
37
 
38
38
  it("ignores an unknown previous mode", () => {
39
39
  const options = buildExitPlanModePermissionOptions("plan");