@zhushanwen/pi-unified-hooks 0.1.2 → 0.2.0

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": "@zhushanwen/pi-unified-hooks",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Unified hooks extension - collect scattered hooks in one place for easy maintenance",
5
5
  "main": "index.ts",
6
6
  "type": "module",
@@ -16,8 +16,7 @@
16
16
  ],
17
17
  "license": "MIT",
18
18
  "peerDependencies": {
19
- "typebox": "*",
20
- "@mariozechner/pi-coding-agent": "*"
19
+ "@earendil-works/pi-coding-agent": "*"
21
20
  },
22
21
  "devDependencies": {
23
22
  "vitest": "^4.1.8"
@@ -1,7 +1,7 @@
1
1
  // src/__tests__/session-start-handler.test.ts
2
2
  import { describe, expect, it, vi } from "vitest";
3
3
 
4
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
4
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
5
5
 
6
6
  import type { HookContext } from "../hooks/tool-error-handler.ts";
7
7
 
@@ -1,7 +1,7 @@
1
1
  // src/__tests__/tool-error-handler.test.ts
2
2
  import { describe, expect, it, vi } from "vitest";
3
3
 
4
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
4
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
5
5
 
6
6
  import { setupToolErrorHandler, type HookContext } from "../hooks/tool-error-handler.ts";
7
7
 
@@ -6,7 +6,7 @@
6
6
  * prompting the AI to add timeout or use async mode.
7
7
  */
8
8
 
9
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
9
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
10
10
 
11
11
  /**
12
12
  * Commands that indicate network activity.
@@ -12,7 +12,7 @@ import * as fs from "node:fs";
12
12
  import * as os from "node:os";
13
13
  import * as path from "node:path";
14
14
 
15
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
15
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
16
16
 
17
17
  /** Minimal agent info extracted from .md frontmatter */
18
18
  interface AgentEntry {
@@ -8,7 +8,7 @@
8
8
  * Python (pytest, unittest), Java (maven, gradle), Go, Rust, .NET, Ruby.
9
9
  */
10
10
 
11
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
11
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
12
12
 
13
13
  /**
14
14
  * Patterns that indicate test execution.
@@ -5,12 +5,12 @@
5
5
  * specific error patterns with contextual recovery.
6
6
  */
7
7
 
8
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
8
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
9
9
 
10
10
  /**
11
11
  * Subset of `ToolExecutionEndEvent` fields used by this hook.
12
12
  * Local interface because the SDK's full event type is not re-exported
13
- * by the CI ambient type stubs in `shared/types/mariozechner/index.d.ts`.
13
+ * by the CI ambient type stubs.
14
14
  *
15
15
  * `result` 形如 `{ content: Array<{ type: "text", text: string }>, isError: boolean }`
16
16
  * (Pi 框架在 tool execute throw 时塞入 error content)。SDK 事件结构里没有独立
package/src/index.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Each hook is a self-contained module that can be enabled/disabled independently.
6
6
  */
7
7
 
8
- import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
8
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
9
9
 
10
10
  // Re-export hook modules for easy access
11
11