@oked/claude-agent-sdk 0.6.12 → 0.6.13
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/index.js +6 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* errors and receipts that do not verify deny; backend-unreachable degrades
|
|
16
16
|
* per tier (`degradedDecision`); any unexpected error denies. Never let an agent proceed when in doubt.
|
|
17
17
|
*/
|
|
18
|
-
import { OKedClient, classify, describe, describeFields, degradedDecision, OKedAuthError, OKedBackendUnreachableError, OKedReceiptError, DEFAULT_APPROVAL_TIMEOUT_MS, } from "@oked/sdk";
|
|
18
|
+
import { OKedClient, classify, describe, describeFields, lookupPrTitle, degradedDecision, OKedAuthError, OKedBackendUnreachableError, OKedReceiptError, DEFAULT_APPROVAL_TIMEOUT_MS, } from "@oked/sdk";
|
|
19
19
|
import { readFileSync } from "node:fs";
|
|
20
20
|
import { dirname, join } from "node:path";
|
|
21
21
|
import { fileURLToPath } from "node:url";
|
|
@@ -81,8 +81,11 @@ export const okedPreToolUseHook = async (rawInput) => {
|
|
|
81
81
|
log("OKED_API_KEY not set - deferring to the agent's built-in permission flow.");
|
|
82
82
|
return ask();
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
const
|
|
84
|
+
// A PR card names the PR. Ask GitHub for the title when the command does not say it.
|
|
85
|
+
const first = describeFields(toolName, toolInput, { cwd: input.cwd }) ?? undefined;
|
|
86
|
+
const prTitle = await lookupPrTitle(first);
|
|
87
|
+
const description = describe(toolName, toolInput, { cwd: input.cwd, prTitle });
|
|
88
|
+
const fields = prTitle ? describeFields(toolName, toolInput, { cwd: input.cwd, prTitle }) ?? undefined : first;
|
|
86
89
|
log(`${toolName}: "${description}" - ${tier}`);
|
|
87
90
|
log("Requesting approval... (check your phone)");
|
|
88
91
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oked/claude-agent-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.13",
|
|
4
4
|
"description": "OKed for the Claude Agent SDK. A ready-made PreToolUse hook that gates sensitive tool calls behind a human approval push to your phone.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@oked/sdk": "0.6.
|
|
35
|
+
"@oked/sdk": "0.6.13"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@anthropic-ai/claude-agent-sdk": "^0.1.0",
|