@oked/hook-core 0.6.25 → 0.6.27
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/README.md +1 -1
- package/dist/decide.d.ts +9 -3
- package/dist/decide.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Decisions are made in Telegram or on the [web dashboard](https://oked.ai/dashboa
|
|
|
31
31
|
|
|
32
32
|
`classify()` knows Claude Code names (`Bash`, `Write`, `Edit`, `mcp__server__tool`). Host packages map their own names onto those before calling `decide()`. Unknown names stay unknown, and the classifier treats an unknown tool as `review` (approval required). `mapPatch()` and `mapFileDelete()` turn patches and deletes into the same effect classes the bash classifier already uses.
|
|
33
33
|
|
|
34
|
-
`findClaudeOkedHooks()` reports an existing `oked-hook` entry in Claude settings. A host that also loads those files uses it so one action is not asked twice. The Claude Code plugin uses the same check. When that plugin is enabled and its hook file is installed, the settings hook returns allow and the plugin is the only gate. When the
|
|
34
|
+
`findClaudeOkedHooks()` reports an existing `oked-hook` entry in Claude settings. A host that also loads those files uses it so one action is not asked twice. The Claude Code plugin uses the same check. When that plugin is enabled and its hook file is installed, the settings hook returns allow and the plugin is the only gate. When the settings hook is the one that will run, the plugin returns no permission decision, so it does not approve the call.
|
|
35
35
|
|
|
36
36
|
## Troubleshooting
|
|
37
37
|
|
package/dist/decide.d.ts
CHANGED
|
@@ -31,11 +31,17 @@ export interface DecideOptions {
|
|
|
31
31
|
*/
|
|
32
32
|
invalidKeyReason?: (status: number) => string;
|
|
33
33
|
/**
|
|
34
|
-
* When set to a non-empty string, this key is
|
|
35
|
-
*
|
|
36
|
-
*
|
|
34
|
+
* When set to a non-empty string, this key is the one the client sends.
|
|
35
|
+
* The Claude Code plugin passes the plugin API key field and does not
|
|
36
|
+
* read a key from the machine. Other hosts omit it and use the usual lookup.
|
|
37
37
|
*/
|
|
38
38
|
apiKey?: string;
|
|
39
|
+
/**
|
|
40
|
+
* GitHub token for a pull request title. When set, the title comes from
|
|
41
|
+
* the GitHub API. When omitted, hosts that ship the gh helper may run gh.
|
|
42
|
+
* The Claude Code plugin passes its GitHub token field, or omits this.
|
|
43
|
+
*/
|
|
44
|
+
githubToken?: string;
|
|
39
45
|
log?: (msg: string) => void;
|
|
40
46
|
/**
|
|
41
47
|
* When set, overrides Claude Code sandbox detection.
|
package/dist/decide.js
CHANGED
|
@@ -98,7 +98,7 @@ export async function decide(call, options) {
|
|
|
98
98
|
log(options.unpairedLog);
|
|
99
99
|
return finish(unpaired, options.unpairedReason, ctx);
|
|
100
100
|
}
|
|
101
|
-
const prTitle = await lookupPrTitle(fields);
|
|
101
|
+
const prTitle = await lookupPrTitle(fields, 3000, options.githubToken);
|
|
102
102
|
if (prTitle)
|
|
103
103
|
fields = describeFields(toolName, toolInput, { ...describeCtx, prTitle }) ?? undefined;
|
|
104
104
|
const description = describe(toolName, toolInput, { ...describeCtx, prTitle });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oked/hook-core",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.27",
|
|
4
4
|
"description": "Shared OKed approval gate for coding-agent hooks. Builds the request, waits for a decision, checks the receipt, and fails closed.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@oked/sdk": "0.6.
|
|
50
|
+
"@oked/sdk": "0.6.27"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/node": "^26.6.5",
|