@oked/claude-code 0.1.3 → 0.1.4
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/cli.js +13 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, chmodSync } from "fs";
|
|
3
3
|
import { hostname } from "os";
|
|
4
4
|
import { join, dirname } from "path";
|
|
5
|
+
import { fileURLToPath } from "url";
|
|
5
6
|
import { spawn } from "child_process";
|
|
6
7
|
import { OKedClient, loadOKedConfig, OKED_CONFIG_PATH } from "@oked/sdk";
|
|
7
8
|
const MCP_TOOL_MATCHER = "mcp__.*";
|
|
@@ -17,7 +18,18 @@ const HOOK_CONFIG = {
|
|
|
17
18
|
],
|
|
18
19
|
};
|
|
19
20
|
const DEFAULT_BACKEND_URL = process.env.OKED_BACKEND_URL || "https://api.oked.ai";
|
|
20
|
-
|
|
21
|
+
// Derived from this package's package.json at runtime so the version the
|
|
22
|
+
// backend sees (client_version) can never drift from what's actually shipped.
|
|
23
|
+
// From dist/cli.js, package.json sits one dir up at the package root.
|
|
24
|
+
const CLIENT_VERSION = (() => {
|
|
25
|
+
try {
|
|
26
|
+
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
27
|
+
return JSON.parse(readFileSync(pkgPath, "utf-8")).version ?? "0.0.0";
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return "0.0.0";
|
|
31
|
+
}
|
|
32
|
+
})();
|
|
21
33
|
function getSettingsPath() {
|
|
22
34
|
return join(process.cwd(), ".claude", "settings.json");
|
|
23
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oked/claude-code",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "OKed for Claude Code - zero-code human approval for sensitive actions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@oked/sdk": "0.1.
|
|
46
|
+
"@oked/sdk": "0.1.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"typescript": "^5.6.0"
|