@hasna/hooks 0.12.0 → 0.12.1
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/bin/index.js +3 -2
- package/dist/index.js +2 -1
- package/dist/lib/codex-safety-check.d.ts +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -331,7 +331,7 @@ architecture (arm64 or x64); script launchers are refused before execution. When
|
|
|
331
331
|
Codex is installed through npm, pass the platform package's native binary rather
|
|
332
332
|
than its JavaScript launcher. Executable ownership, permissions, ancestry and
|
|
333
333
|
bytes are checked. Supported protocol versions are 0.153.0, 0.154.0,
|
|
334
|
-
0.154.0-alpha.6.1, 0.155.0, 0.155.1, 0.156.1, 0.157.0, 0.157.1, 0.158.0 and 0.159.
|
|
334
|
+
0.154.0-alpha.6.1, 0.155.0, 0.155.1, 0.156.1, 0.157.0, 0.157.1, 0.158.0, 0.159.0 and 0.159.2;
|
|
335
335
|
other versions refuse pending compatibility validation. Updating Codex can
|
|
336
336
|
therefore require a compatible Hooks release before native safety verification
|
|
337
337
|
and trust provisioning succeed. Keep existing hook definitions and trust intact
|
package/bin/index.js
CHANGED
|
@@ -35385,13 +35385,14 @@ async function verifyCodexNativeSafety(options = {}, dependencies = {}) {
|
|
|
35385
35385
|
await rpc.close();
|
|
35386
35386
|
}
|
|
35387
35387
|
}
|
|
35388
|
-
var versions, matcher = "^(Bash|apply_patch|ApplyPatch|functions\\.apply_patch)$", CodexSafetyError, digest3 = (bytes) => createHash21("sha256").update(bytes).digest("hex");
|
|
35388
|
+
var SUPPORTED_CODEX_SAFETY_VERSIONS, versions, matcher = "^(Bash|apply_patch|ApplyPatch|functions\\.apply_patch)$", CodexSafetyError, digest3 = (bytes) => createHash21("sha256").update(bytes).digest("hex");
|
|
35389
35389
|
var init_codex_safety_check = __esm(() => {
|
|
35390
35390
|
init_native_safety();
|
|
35391
35391
|
init_native_readiness_command();
|
|
35392
35392
|
init_native_safety2();
|
|
35393
35393
|
init_native_readiness();
|
|
35394
|
-
|
|
35394
|
+
SUPPORTED_CODEX_SAFETY_VERSIONS = ["codex-cli 0.153.0", "codex-cli 0.154.0", "codex-cli 0.154.0-alpha.6.1", "codex-cli 0.155.0", "codex-cli 0.155.1", "codex-cli 0.156.1", "codex-cli 0.157.0", "codex-cli 0.157.1", "codex-cli 0.158.0", "codex-cli 0.159.0", "codex-cli 0.159.2"];
|
|
35395
|
+
versions = new Set(SUPPORTED_CODEX_SAFETY_VERSIONS);
|
|
35395
35396
|
CodexSafetyError = class CodexSafetyError extends Error {
|
|
35396
35397
|
code;
|
|
35397
35398
|
constructor(code2) {
|
package/dist/index.js
CHANGED
|
@@ -41384,7 +41384,8 @@ async function verifyNativeSafetyCommand(command, home = homedir7()) {
|
|
|
41384
41384
|
}
|
|
41385
41385
|
|
|
41386
41386
|
// src/lib/codex-safety-check.ts
|
|
41387
|
-
var
|
|
41387
|
+
var SUPPORTED_CODEX_SAFETY_VERSIONS = ["codex-cli 0.153.0", "codex-cli 0.154.0", "codex-cli 0.154.0-alpha.6.1", "codex-cli 0.155.0", "codex-cli 0.155.1", "codex-cli 0.156.1", "codex-cli 0.157.0", "codex-cli 0.157.1", "codex-cli 0.158.0", "codex-cli 0.159.0", "codex-cli 0.159.2"];
|
|
41388
|
+
var versions = new Set(SUPPORTED_CODEX_SAFETY_VERSIONS);
|
|
41388
41389
|
var matcher = "^(Bash|apply_patch|ApplyPatch|functions\\.apply_patch)$";
|
|
41389
41390
|
|
|
41390
41391
|
class CodexSafetyError extends Error {
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { verifyNativeSafetyCommand } from "../native-safety.js";
|
|
2
|
+
/** Exact `codex --version` outputs whose app-server protocol was measured
|
|
3
|
+
* against the real native binary. Anything else refuses as native_unsupported. */
|
|
4
|
+
export declare const SUPPORTED_CODEX_SAFETY_VERSIONS: readonly ["codex-cli 0.153.0", "codex-cli 0.154.0", "codex-cli 0.154.0-alpha.6.1", "codex-cli 0.155.0", "codex-cli 0.155.1", "codex-cli 0.156.1", "codex-cli 0.157.0", "codex-cli 0.157.1", "codex-cli 0.158.0", "codex-cli 0.159.0", "codex-cli 0.159.2"];
|
|
2
5
|
export type CodexSafetyCode = "native_unavailable" | "native_unsafe_executable" | "native_executable_required" | "native_unsupported" | "native_failed" | "native_discovery_failed" | "hooks_disabled" | "guard_missing" | "guard_ambiguous" | "guard_definition_invalid" | "guard_disabled" | "guard_untrusted" | "guard_changed" | "guard_failed";
|
|
3
6
|
export declare class CodexSafetyError extends Error {
|
|
4
7
|
readonly code: CodexSafetyCode;
|
package/package.json
CHANGED