@oked/claude-code 0.6.11 → 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/hook.js +7 -3
- package/package.json +2 -2
package/dist/hook.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { OKedClient, classify, describe, describeFields, applyRules, degradedDecision, OKedAuthError, OKedBackendUnreachableError, OKedHttpError, OKedReceiptError, OKedTooManyPendingError, shortReceiptId, } from "@oked/sdk";
|
|
2
|
+
import { OKedClient, classify, describe, describeFields, lookupPrTitle, applyRules, degradedDecision, OKedAuthError, OKedBackendUnreachableError, OKedHttpError, OKedReceiptError, OKedTooManyPendingError, shortReceiptId, } from "@oked/sdk";
|
|
3
3
|
import { CLIENT_ID } from "./version.js";
|
|
4
4
|
import { appendReceipt } from "./receipts.js";
|
|
5
5
|
import { logDecision, errorInfo } from "./hook-log.js";
|
|
@@ -54,7 +54,7 @@ async function main() {
|
|
|
54
54
|
// and only the once/day send actually waits.
|
|
55
55
|
if (client.apiKey)
|
|
56
56
|
await client.heartbeat();
|
|
57
|
-
|
|
57
|
+
let fields = describeFields(toolName, toolInput, { cwd: input.cwd }) ?? undefined;
|
|
58
58
|
// safe/warning normally short-circuit locally with no network call. But a
|
|
59
59
|
// user rule can escalate (or auto-decide) such an action, and rules live
|
|
60
60
|
// server-side. Consult the locally-cached rules: if one matches this action,
|
|
@@ -92,8 +92,12 @@ async function main() {
|
|
|
92
92
|
respond("ask", "OKed: this device is not paired. Run `oked init`.", ctx);
|
|
93
93
|
return;
|
|
94
94
|
}
|
|
95
|
+
// A PR card names the PR. Ask GitHub for the title when the command does not say it.
|
|
96
|
+
const prTitle = await lookupPrTitle(fields);
|
|
97
|
+
if (prTitle)
|
|
98
|
+
fields = describeFields(toolName, toolInput, { cwd: input.cwd, prTitle }) ?? undefined;
|
|
95
99
|
// Generate human-readable description
|
|
96
|
-
const description = describe(toolName, toolInput, { cwd: input.cwd });
|
|
100
|
+
const description = describe(toolName, toolInput, { cwd: input.cwd, prTitle });
|
|
97
101
|
log(`${toolName}: "${description}" - ${tier}`);
|
|
98
102
|
log("Requesting approval... (check your phone)");
|
|
99
103
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oked/claude-code",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.13",
|
|
4
4
|
"description": "OKed for Claude Code - zero-code human approval for sensitive actions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@oked/sdk": "0.6.
|
|
47
|
+
"@oked/sdk": "0.6.13"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"typescript": "^5.6.0"
|