@hasna/hooks 0.11.0 → 0.11.2
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/bin/hooks-mcp.js +2 -2
- package/bin/index.js +31 -26
- package/bin/native-safety-entry.js +7 -2
- package/bin/serve.js +9 -9
- package/dist/index.js +13 -13
- package/dist/sdk/index.js +1 -1
- package/hooks/hook-trash-guard/src/binary.ts +6 -2
- package/package.json +1 -1
package/bin/hooks-mcp.js
CHANGED
|
@@ -1419,7 +1419,7 @@ var init_redact = __esm(() => {
|
|
|
1419
1419
|
];
|
|
1420
1420
|
});
|
|
1421
1421
|
|
|
1422
|
-
//
|
|
1422
|
+
// ../../../../codex0157-source-repair/isolated-build/repo/apps/hooks/node_modules/@hasna/contracts/dist/client/transport.js
|
|
1423
1423
|
import { isIP } from "net";
|
|
1424
1424
|
import { spawnSync } from "child_process";
|
|
1425
1425
|
import { closeSync as closeSync22, fstatSync as fstatSync22, openSync as openSync22, readFileSync as readFileSync22 } from "fs";
|
|
@@ -3340,7 +3340,7 @@ function writeHookSettingsPreimage(path, settings, before) {
|
|
|
3340
3340
|
// src/lib/claude-skills-coordination.ts
|
|
3341
3341
|
import { createHash as createHash6 } from "crypto";
|
|
3342
3342
|
|
|
3343
|
-
//
|
|
3343
|
+
// ../../../../../../../../.bun/install/cache/@hasna/skills@0.9.17@@@1/dist/index.js
|
|
3344
3344
|
import { existsSync as existsSync10 } from "fs";
|
|
3345
3345
|
import { homedir as homedir5 } from "os";
|
|
3346
3346
|
import { join as join9, resolve as resolve3 } from "path";
|
package/bin/index.js
CHANGED
|
@@ -2516,7 +2516,7 @@ var init_codex_settings = __esm(() => {
|
|
|
2516
2516
|
snapshots = new WeakMap;
|
|
2517
2517
|
});
|
|
2518
2518
|
|
|
2519
|
-
//
|
|
2519
|
+
// ../../../../../../../../.bun/install/cache/@hasna/skills@0.9.17@@@1/dist/index.js
|
|
2520
2520
|
import { existsSync as existsSync10 } from "fs";
|
|
2521
2521
|
import { homedir as homedir6 } from "os";
|
|
2522
2522
|
import { join as join10, resolve as resolve4 } from "path";
|
|
@@ -35248,7 +35248,7 @@ var init_codex_safety_check = __esm(() => {
|
|
|
35248
35248
|
init_native_safety();
|
|
35249
35249
|
init_native_readiness_command();
|
|
35250
35250
|
init_native_safety2();
|
|
35251
|
-
versions = new Set(["codex-cli 0.153.0", "codex-cli 0.154.0", "codex-cli 0.155.0", "codex-cli 0.155.1", "codex-cli 0.156.1"]);
|
|
35251
|
+
versions = new Set(["codex-cli 0.153.0", "codex-cli 0.154.0", "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"]);
|
|
35252
35252
|
CodexSafetyError = class CodexSafetyError extends Error {
|
|
35253
35253
|
code;
|
|
35254
35254
|
constructor(code2) {
|
|
@@ -35489,7 +35489,7 @@ var init_codex_safety_trust = __esm(() => {
|
|
|
35489
35489
|
};
|
|
35490
35490
|
});
|
|
35491
35491
|
|
|
35492
|
-
//
|
|
35492
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/commander@12.1.0/node_modules/commander/lib/error.js
|
|
35493
35493
|
var require_error = __commonJS((exports) => {
|
|
35494
35494
|
class CommanderError extends Error {
|
|
35495
35495
|
constructor(exitCode, code2, message) {
|
|
@@ -35513,7 +35513,7 @@ var require_error = __commonJS((exports) => {
|
|
|
35513
35513
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
35514
35514
|
});
|
|
35515
35515
|
|
|
35516
|
-
//
|
|
35516
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/commander@12.1.0/node_modules/commander/lib/argument.js
|
|
35517
35517
|
var require_argument = __commonJS((exports) => {
|
|
35518
35518
|
var { InvalidArgumentError } = require_error();
|
|
35519
35519
|
|
|
@@ -35592,7 +35592,7 @@ var require_argument = __commonJS((exports) => {
|
|
|
35592
35592
|
exports.humanReadableArgName = humanReadableArgName;
|
|
35593
35593
|
});
|
|
35594
35594
|
|
|
35595
|
-
//
|
|
35595
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/commander@12.1.0/node_modules/commander/lib/help.js
|
|
35596
35596
|
var require_help = __commonJS((exports) => {
|
|
35597
35597
|
var { humanReadableArgName } = require_argument();
|
|
35598
35598
|
|
|
@@ -35841,7 +35841,7 @@ var require_help = __commonJS((exports) => {
|
|
|
35841
35841
|
exports.Help = Help;
|
|
35842
35842
|
});
|
|
35843
35843
|
|
|
35844
|
-
//
|
|
35844
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/commander@12.1.0/node_modules/commander/lib/option.js
|
|
35845
35845
|
var require_option = __commonJS((exports) => {
|
|
35846
35846
|
var { InvalidArgumentError } = require_error();
|
|
35847
35847
|
|
|
@@ -35992,7 +35992,7 @@ var require_option = __commonJS((exports) => {
|
|
|
35992
35992
|
exports.DualOptions = DualOptions;
|
|
35993
35993
|
});
|
|
35994
35994
|
|
|
35995
|
-
//
|
|
35995
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/commander@12.1.0/node_modules/commander/lib/suggestSimilar.js
|
|
35996
35996
|
var require_suggestSimilar = __commonJS((exports) => {
|
|
35997
35997
|
var maxDistance = 3;
|
|
35998
35998
|
function editDistance(a, b) {
|
|
@@ -36065,7 +36065,7 @@ var require_suggestSimilar = __commonJS((exports) => {
|
|
|
36065
36065
|
exports.suggestSimilar = suggestSimilar;
|
|
36066
36066
|
});
|
|
36067
36067
|
|
|
36068
|
-
//
|
|
36068
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/commander@12.1.0/node_modules/commander/lib/command.js
|
|
36069
36069
|
var require_command = __commonJS((exports) => {
|
|
36070
36070
|
var EventEmitter = __require("events").EventEmitter;
|
|
36071
36071
|
var childProcess = __require("child_process");
|
|
@@ -37308,7 +37308,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
37308
37308
|
exports.Command = Command;
|
|
37309
37309
|
});
|
|
37310
37310
|
|
|
37311
|
-
//
|
|
37311
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/commander@12.1.0/node_modules/commander/index.js
|
|
37312
37312
|
var require_commander = __commonJS((exports) => {
|
|
37313
37313
|
var { Argument } = require_argument();
|
|
37314
37314
|
var { Command } = require_command();
|
|
@@ -37328,7 +37328,7 @@ var require_commander = __commonJS((exports) => {
|
|
|
37328
37328
|
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
37329
37329
|
});
|
|
37330
37330
|
|
|
37331
|
-
//
|
|
37331
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/cli-spinners@2.9.2/node_modules/cli-spinners/spinners.json
|
|
37332
37332
|
var require_spinners = __commonJS((exports, module) => {
|
|
37333
37333
|
module.exports = {
|
|
37334
37334
|
dots: {
|
|
@@ -38954,7 +38954,7 @@ var require_spinners = __commonJS((exports, module) => {
|
|
|
38954
38954
|
};
|
|
38955
38955
|
});
|
|
38956
38956
|
|
|
38957
|
-
//
|
|
38957
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/cli-spinners@2.9.2/node_modules/cli-spinners/index.js
|
|
38958
38958
|
var require_cli_spinners = __commonJS((exports, module) => {
|
|
38959
38959
|
var spinners = Object.assign({}, require_spinners());
|
|
38960
38960
|
var spinnersList = Object.keys(spinners);
|
|
@@ -39138,7 +39138,7 @@ var init_profiles = __esm(() => {
|
|
|
39138
39138
|
init_app_home();
|
|
39139
39139
|
});
|
|
39140
39140
|
|
|
39141
|
-
//
|
|
39141
|
+
// ../../../../codex0157-source-repair/isolated-build/repo/apps/hooks/node_modules/@hasna/contracts/dist/client/transport.js
|
|
39142
39142
|
import { isIP as isIP2 } from "net";
|
|
39143
39143
|
import { spawnSync as spawnSync2 } from "child_process";
|
|
39144
39144
|
import { closeSync as closeSync22, fstatSync as fstatSync22, openSync as openSync22, readFileSync as readFileSync22 } from "fs";
|
|
@@ -43627,7 +43627,7 @@ async function verifyClaudeSafetyConfiguration(options = {}, dependencies = {})
|
|
|
43627
43627
|
// src/cli/index.tsx
|
|
43628
43628
|
init_codex_safety_trust();
|
|
43629
43629
|
|
|
43630
|
-
//
|
|
43630
|
+
// ../../../../../../../repos/clones/hasna/apps/apps/events/dist/commander.js
|
|
43631
43631
|
import { chmod, mkdir, readFile as readFile2, rename, writeFile } from "fs/promises";
|
|
43632
43632
|
import { Buffer as Buffer2 } from "buffer";
|
|
43633
43633
|
import { existsSync as existsSync22 } from "fs";
|
|
@@ -45283,7 +45283,7 @@ function replaySummary(events2, deliveries, nextCursor) {
|
|
|
45283
45283
|
// src/cli/index.tsx
|
|
45284
45284
|
import { render } from "ink";
|
|
45285
45285
|
|
|
45286
|
-
//
|
|
45286
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/commander@12.1.0/node_modules/commander/esm.mjs
|
|
45287
45287
|
var import__ = __toESM(require_commander(), 1);
|
|
45288
45288
|
var {
|
|
45289
45289
|
program: program2,
|
|
@@ -45309,11 +45309,11 @@ import { fileURLToPath as fileURLToPath6 } from "url";
|
|
|
45309
45309
|
import { useState as useState7 } from "react";
|
|
45310
45310
|
import { Box as Box8, Text as Text10, useApp, useInput as useInput5 } from "ink";
|
|
45311
45311
|
|
|
45312
|
-
//
|
|
45312
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/ink-select-input@6.2.0+fa875fef9f949ebd/node_modules/ink-select-input/build/Indicator.js
|
|
45313
45313
|
import React from "react";
|
|
45314
45314
|
import { Box, Text } from "ink";
|
|
45315
45315
|
|
|
45316
|
-
//
|
|
45316
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/is-unicode-supported@2.1.0/node_modules/is-unicode-supported/index.js
|
|
45317
45317
|
import process3 from "process";
|
|
45318
45318
|
function isUnicodeSupported() {
|
|
45319
45319
|
const { env } = process3;
|
|
@@ -45324,7 +45324,7 @@ function isUnicodeSupported() {
|
|
|
45324
45324
|
return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
|
|
45325
45325
|
}
|
|
45326
45326
|
|
|
45327
|
-
//
|
|
45327
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/figures@6.1.0/node_modules/figures/index.js
|
|
45328
45328
|
var common2 = {
|
|
45329
45329
|
circleQuestionMark: "(?)",
|
|
45330
45330
|
questionMarkPrefix: "(?)",
|
|
@@ -45600,23 +45600,23 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
|
|
|
45600
45600
|
var figures_default = figures;
|
|
45601
45601
|
var replacements = Object.entries(specialMainSymbols);
|
|
45602
45602
|
|
|
45603
|
-
//
|
|
45603
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/ink-select-input@6.2.0+fa875fef9f949ebd/node_modules/ink-select-input/build/Indicator.js
|
|
45604
45604
|
function Indicator({ isSelected = false }) {
|
|
45605
45605
|
return React.createElement(Box, { marginRight: 1 }, isSelected ? React.createElement(Text, { color: "blue" }, figures_default.pointer) : React.createElement(Text, null, " "));
|
|
45606
45606
|
}
|
|
45607
45607
|
var Indicator_default = Indicator;
|
|
45608
|
-
//
|
|
45608
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/ink-select-input@6.2.0+fa875fef9f949ebd/node_modules/ink-select-input/build/Item.js
|
|
45609
45609
|
import * as React2 from "react";
|
|
45610
45610
|
import { Text as Text2 } from "ink";
|
|
45611
45611
|
function Item({ isSelected = false, label }) {
|
|
45612
45612
|
return React2.createElement(Text2, { color: isSelected ? "blue" : undefined }, label);
|
|
45613
45613
|
}
|
|
45614
45614
|
var Item_default = Item;
|
|
45615
|
-
//
|
|
45615
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/ink-select-input@6.2.0+fa875fef9f949ebd/node_modules/ink-select-input/build/SelectInput.js
|
|
45616
45616
|
import { isDeepStrictEqual } from "util";
|
|
45617
45617
|
import React3, { useState, useEffect, useRef, useCallback } from "react";
|
|
45618
45618
|
|
|
45619
|
-
//
|
|
45619
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/to-rotated@1.0.0/node_modules/to-rotated/index.js
|
|
45620
45620
|
function toRotated(array3, steps) {
|
|
45621
45621
|
if (!Array.isArray(array3)) {
|
|
45622
45622
|
throw new TypeError(`Expected an array, got \`${typeof array3}\`.`);
|
|
@@ -45638,7 +45638,7 @@ function toRotated(array3, steps) {
|
|
|
45638
45638
|
];
|
|
45639
45639
|
}
|
|
45640
45640
|
|
|
45641
|
-
//
|
|
45641
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/ink-select-input@6.2.0+fa875fef9f949ebd/node_modules/ink-select-input/build/SelectInput.js
|
|
45642
45642
|
import { Box as Box2, useInput } from "ink";
|
|
45643
45643
|
function SelectInput({ items = [], isFocused = true, initialIndex = 0, indicatorComponent = Indicator_default, itemComponent = Item_default, limit: customLimit, onSelect, onHighlight }) {
|
|
45644
45644
|
const hasLimit = typeof customLimit === "number" && items.length > customLimit;
|
|
@@ -45934,7 +45934,7 @@ function HookSelect({
|
|
|
45934
45934
|
import { useState as useState4, useEffect as useEffect3 } from "react";
|
|
45935
45935
|
import { Box as Box6, Text as Text7, useInput as useInput4 } from "ink";
|
|
45936
45936
|
|
|
45937
|
-
//
|
|
45937
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/ink-text-input@6.0.0+fa875fef9f949ebd/node_modules/ink-text-input/build/index.js
|
|
45938
45938
|
import React5, { useState as useState3, useEffect as useEffect2 } from "react";
|
|
45939
45939
|
import { Text as Text6, useInput as useInput3 } from "ink";
|
|
45940
45940
|
import chalk from "chalk";
|
|
@@ -46112,7 +46112,7 @@ function SearchView({
|
|
|
46112
46112
|
import { useState as useState6, useEffect as useEffect5 } from "react";
|
|
46113
46113
|
import { Box as Box7, Text as Text9 } from "ink";
|
|
46114
46114
|
|
|
46115
|
-
//
|
|
46115
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/ink-spinner@5.0.0+fa875fef9f949ebd/node_modules/ink-spinner/build/index.js
|
|
46116
46116
|
var import_cli_spinners = __toESM(require_cli_spinners(), 1);
|
|
46117
46117
|
import React7, { useState as useState5, useEffect as useEffect4 } from "react";
|
|
46118
46118
|
import { Text as Text8 } from "ink";
|
|
@@ -46635,14 +46635,19 @@ function inspectTrashBinary(env = process.env) {
|
|
|
46635
46635
|
reject("unsafe_interpreter");
|
|
46636
46636
|
continue;
|
|
46637
46637
|
}
|
|
46638
|
+
const remaining = deadline - Date.now();
|
|
46639
|
+
if (remaining <= 0) {
|
|
46640
|
+
reject("identity_failed");
|
|
46641
|
+
break;
|
|
46642
|
+
}
|
|
46638
46643
|
const probe = spawnSync(candidate, ["--identity"], {
|
|
46639
46644
|
encoding: "utf8",
|
|
46640
|
-
timeout:
|
|
46645
|
+
timeout: remaining,
|
|
46641
46646
|
maxBuffer: 2048,
|
|
46642
46647
|
env: { PATH: pathValue },
|
|
46643
46648
|
stdio: ["ignore", "pipe", "pipe"]
|
|
46644
46649
|
});
|
|
46645
|
-
if (probe.error || probe.status !== 0) {
|
|
46650
|
+
if (probe.error || probe.status !== 0 || Date.now() >= deadline) {
|
|
46646
46651
|
reject("identity_failed");
|
|
46647
46652
|
continue;
|
|
46648
46653
|
}
|
|
@@ -170,14 +170,19 @@ function inspectTrashBinary(env = process.env) {
|
|
|
170
170
|
reject("unsafe_interpreter");
|
|
171
171
|
continue;
|
|
172
172
|
}
|
|
173
|
+
const remaining = deadline - Date.now();
|
|
174
|
+
if (remaining <= 0) {
|
|
175
|
+
reject("identity_failed");
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
173
178
|
const probe = spawnSync(candidate, ["--identity"], {
|
|
174
179
|
encoding: "utf8",
|
|
175
|
-
timeout:
|
|
180
|
+
timeout: remaining,
|
|
176
181
|
maxBuffer: 2048,
|
|
177
182
|
env: { PATH: pathValue },
|
|
178
183
|
stdio: ["ignore", "pipe", "pipe"]
|
|
179
184
|
});
|
|
180
|
-
if (probe.error || probe.status !== 0) {
|
|
185
|
+
if (probe.error || probe.status !== 0 || Date.now() >= deadline) {
|
|
181
186
|
reject("identity_failed");
|
|
182
187
|
continue;
|
|
183
188
|
}
|
package/bin/serve.js
CHANGED
|
@@ -676,7 +676,7 @@ function getHook(name) {
|
|
|
676
676
|
import { existsSync as existsSync2, mkdirSync, readFileSync, readdirSync, realpathSync, writeFileSync } from "fs";
|
|
677
677
|
import { basename, dirname, isAbsolute, join as join3, normalize, resolve as resolve2, sep } from "path";
|
|
678
678
|
|
|
679
|
-
//
|
|
679
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
680
680
|
var exports_external = {};
|
|
681
681
|
__export(exports_external, {
|
|
682
682
|
void: () => voidType,
|
|
@@ -788,7 +788,7 @@ __export(exports_external, {
|
|
|
788
788
|
BRAND: () => BRAND
|
|
789
789
|
});
|
|
790
790
|
|
|
791
|
-
//
|
|
791
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
792
792
|
var util;
|
|
793
793
|
(function(util2) {
|
|
794
794
|
util2.assertEqual = (_) => {};
|
|
@@ -919,7 +919,7 @@ var getParsedType = (data) => {
|
|
|
919
919
|
}
|
|
920
920
|
};
|
|
921
921
|
|
|
922
|
-
//
|
|
922
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
923
923
|
var ZodIssueCode = util.arrayToEnum([
|
|
924
924
|
"invalid_type",
|
|
925
925
|
"invalid_literal",
|
|
@@ -1038,7 +1038,7 @@ ZodError.create = (issues) => {
|
|
|
1038
1038
|
return error;
|
|
1039
1039
|
};
|
|
1040
1040
|
|
|
1041
|
-
//
|
|
1041
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
1042
1042
|
var errorMap = (issue, _ctx) => {
|
|
1043
1043
|
let message;
|
|
1044
1044
|
switch (issue.code) {
|
|
@@ -1141,7 +1141,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
1141
1141
|
};
|
|
1142
1142
|
var en_default = errorMap;
|
|
1143
1143
|
|
|
1144
|
-
//
|
|
1144
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
1145
1145
|
var overrideErrorMap = en_default;
|
|
1146
1146
|
function setErrorMap(map) {
|
|
1147
1147
|
overrideErrorMap = map;
|
|
@@ -1149,7 +1149,7 @@ function setErrorMap(map) {
|
|
|
1149
1149
|
function getErrorMap() {
|
|
1150
1150
|
return overrideErrorMap;
|
|
1151
1151
|
}
|
|
1152
|
-
//
|
|
1152
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
1153
1153
|
var makeIssue = (params) => {
|
|
1154
1154
|
const { data, path, errorMaps, issueData } = params;
|
|
1155
1155
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -1255,14 +1255,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
1255
1255
|
var isDirty = (x) => x.status === "dirty";
|
|
1256
1256
|
var isValid = (x) => x.status === "valid";
|
|
1257
1257
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
1258
|
-
//
|
|
1258
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
1259
1259
|
var errorUtil;
|
|
1260
1260
|
(function(errorUtil2) {
|
|
1261
1261
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
1262
1262
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
1263
1263
|
})(errorUtil || (errorUtil = {}));
|
|
1264
1264
|
|
|
1265
|
-
//
|
|
1265
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
1266
1266
|
class ParseInputLazyPath {
|
|
1267
1267
|
constructor(parent, value, path, key) {
|
|
1268
1268
|
this._cachedPath = [];
|
|
@@ -5362,7 +5362,7 @@ import { readFileSync as readFileSync5 } from "fs";
|
|
|
5362
5362
|
import { dirname as dirname4, join as join8 } from "path";
|
|
5363
5363
|
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
5364
5364
|
|
|
5365
|
-
//
|
|
5365
|
+
// ../../../../codex0157-source-repair/isolated-build/repo/apps/hooks/node_modules/@hasna/contracts/dist/client/transport.js
|
|
5366
5366
|
import { spawnSync } from "child_process";
|
|
5367
5367
|
import { closeSync as closeSync2, fstatSync as fstatSync2, openSync as openSync2, readFileSync as readFileSync22 } from "fs";
|
|
5368
5368
|
import { O_NOFOLLOW as O_NOFOLLOW2, O_NONBLOCK as O_NONBLOCK2, O_RDONLY as O_RDONLY2 } from "constants";
|
package/dist/index.js
CHANGED
|
@@ -581,7 +581,7 @@ var init_redact = __esm(() => {
|
|
|
581
581
|
];
|
|
582
582
|
});
|
|
583
583
|
|
|
584
|
-
//
|
|
584
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
585
585
|
var util, objectUtil, ZodParsedType, getParsedType = (data) => {
|
|
586
586
|
const t = typeof data;
|
|
587
587
|
switch (t) {
|
|
@@ -712,7 +712,7 @@ var init_util = __esm(() => {
|
|
|
712
712
|
]);
|
|
713
713
|
});
|
|
714
714
|
|
|
715
|
-
//
|
|
715
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
716
716
|
var ZodIssueCode, quotelessJson = (obj) => {
|
|
717
717
|
const json = JSON.stringify(obj, null, 2);
|
|
718
718
|
return json.replace(/"([^"]+)":/g, "$1:");
|
|
@@ -833,7 +833,7 @@ var init_ZodError = __esm(() => {
|
|
|
833
833
|
};
|
|
834
834
|
});
|
|
835
835
|
|
|
836
|
-
//
|
|
836
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
837
837
|
var errorMap = (issue, _ctx) => {
|
|
838
838
|
let message;
|
|
839
839
|
switch (issue.code) {
|
|
@@ -940,7 +940,7 @@ var init_en = __esm(() => {
|
|
|
940
940
|
en_default = errorMap;
|
|
941
941
|
});
|
|
942
942
|
|
|
943
|
-
//
|
|
943
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
944
944
|
function setErrorMap(map) {
|
|
945
945
|
overrideErrorMap = map;
|
|
946
946
|
}
|
|
@@ -953,7 +953,7 @@ var init_errors = __esm(() => {
|
|
|
953
953
|
overrideErrorMap = en_default;
|
|
954
954
|
});
|
|
955
955
|
|
|
956
|
-
//
|
|
956
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
957
957
|
function addIssueToContext(ctx, issueData) {
|
|
958
958
|
const overrideMap = getErrorMap();
|
|
959
959
|
const issue = makeIssue({
|
|
@@ -1058,10 +1058,10 @@ var init_parseUtil = __esm(() => {
|
|
|
1058
1058
|
});
|
|
1059
1059
|
});
|
|
1060
1060
|
|
|
1061
|
-
//
|
|
1061
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/typeAliases.js
|
|
1062
1062
|
var init_typeAliases = () => {};
|
|
1063
1063
|
|
|
1064
|
-
//
|
|
1064
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
1065
1065
|
var errorUtil;
|
|
1066
1066
|
var init_errorUtil = __esm(() => {
|
|
1067
1067
|
(function(errorUtil2) {
|
|
@@ -1070,7 +1070,7 @@ var init_errorUtil = __esm(() => {
|
|
|
1070
1070
|
})(errorUtil || (errorUtil = {}));
|
|
1071
1071
|
});
|
|
1072
1072
|
|
|
1073
|
-
//
|
|
1073
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
1074
1074
|
class ParseInputLazyPath {
|
|
1075
1075
|
constructor(parent, value, path, key) {
|
|
1076
1076
|
this._cachedPath = [];
|
|
@@ -4421,7 +4421,7 @@ var init_types = __esm(() => {
|
|
|
4421
4421
|
NEVER = INVALID;
|
|
4422
4422
|
});
|
|
4423
4423
|
|
|
4424
|
-
//
|
|
4424
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
4425
4425
|
var exports_external = {};
|
|
4426
4426
|
__export(exports_external, {
|
|
4427
4427
|
void: () => voidType,
|
|
@@ -4541,7 +4541,7 @@ var init_external = __esm(() => {
|
|
|
4541
4541
|
init_ZodError();
|
|
4542
4542
|
});
|
|
4543
4543
|
|
|
4544
|
-
//
|
|
4544
|
+
// ../../../../../../../repos/clones/hasna/apps/node_modules/.bun/zod@3.25.76/node_modules/zod/index.js
|
|
4545
4545
|
var init_zod = __esm(() => {
|
|
4546
4546
|
init_external();
|
|
4547
4547
|
init_external();
|
|
@@ -5101,7 +5101,7 @@ var init_profiles = __esm(() => {
|
|
|
5101
5101
|
init_app_home();
|
|
5102
5102
|
});
|
|
5103
5103
|
|
|
5104
|
-
//
|
|
5104
|
+
// ../../../../codex0157-source-repair/isolated-build/repo/apps/hooks/node_modules/@hasna/contracts/dist/client/transport.js
|
|
5105
5105
|
import { isIP } from "net";
|
|
5106
5106
|
import { spawnSync } from "child_process";
|
|
5107
5107
|
import { closeSync as closeSync22, fstatSync as fstatSync22, openSync as openSync22, readFileSync as readFileSync22 } from "fs";
|
|
@@ -8106,7 +8106,7 @@ function writeHookSettingsPreimage(path, settings, before) {
|
|
|
8106
8106
|
// src/lib/claude-skills-coordination.ts
|
|
8107
8107
|
import { createHash as createHash6 } from "crypto";
|
|
8108
8108
|
|
|
8109
|
-
//
|
|
8109
|
+
// ../../../../../../../../.bun/install/cache/@hasna/skills@0.9.17@@@1/dist/index.js
|
|
8110
8110
|
import { existsSync as existsSync10 } from "fs";
|
|
8111
8111
|
import { homedir as homedir5 } from "os";
|
|
8112
8112
|
import { join as join9, resolve as resolve3 } from "path";
|
|
@@ -41351,7 +41351,7 @@ async function verifyNativeSafetyCommand(command, home = homedir7()) {
|
|
|
41351
41351
|
}
|
|
41352
41352
|
|
|
41353
41353
|
// src/lib/codex-safety-check.ts
|
|
41354
|
-
var versions = new Set(["codex-cli 0.153.0", "codex-cli 0.154.0", "codex-cli 0.155.0", "codex-cli 0.155.1", "codex-cli 0.156.1"]);
|
|
41354
|
+
var versions = new Set(["codex-cli 0.153.0", "codex-cli 0.154.0", "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"]);
|
|
41355
41355
|
var matcher = "^(Bash|apply_patch|ApplyPatch|functions\\.apply_patch)$";
|
|
41356
41356
|
|
|
41357
41357
|
class CodexSafetyError extends Error {
|
package/dist/sdk/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
//
|
|
2
|
+
// ../../../../codex0157-source-repair/isolated-build/repo/apps/hooks/node_modules/@hasna/contracts/dist/client/transport.js
|
|
3
3
|
import { isIP } from "net";
|
|
4
4
|
import { spawnSync } from "child_process";
|
|
5
5
|
import { closeSync as closeSync2, fstatSync as fstatSync2, openSync as openSync2, readFileSync as readFileSync2 } from "fs";
|
|
@@ -136,11 +136,15 @@ export function inspectTrashBinary(env: NodeJS.ProcessEnv = process.env): TrashB
|
|
|
136
136
|
typeof manifest.bin?.trash !== "string" || realpathSync(resolve(packageRoot, manifest.bin.trash)) !== executable) { reject("unrecognized_package"); continue; }
|
|
137
137
|
try { if (!safeScriptInterpreter(executable, pathValue)) { reject("unsafe_interpreter"); continue; } }
|
|
138
138
|
catch { reject("unsafe_interpreter"); continue; }
|
|
139
|
+
const remaining = deadline - Date.now();
|
|
140
|
+
if (remaining <= 0) { reject("identity_failed"); break; }
|
|
139
141
|
const probe = spawnSync(candidate, ["--identity"], {
|
|
140
|
-
|
|
142
|
+
// A valid cold start may take over 500 ms. Keep the shared search
|
|
143
|
+
// deadline instead of cutting off each eligible candidate early.
|
|
144
|
+
encoding: "utf8", timeout: remaining, maxBuffer: 2_048,
|
|
141
145
|
env: { PATH: pathValue }, stdio: ["ignore", "pipe", "pipe"],
|
|
142
146
|
});
|
|
143
|
-
if (probe.error || probe.status !== 0) { reject("identity_failed"); continue; }
|
|
147
|
+
if (probe.error || probe.status !== 0 || Date.now() >= deadline) { reject("identity_failed"); continue; }
|
|
144
148
|
const identity = JSON.parse(probe.stdout);
|
|
145
149
|
if (identity.name === "@hasna/trash" && identity.version === manifest.version &&
|
|
146
150
|
identity.guardProtocol === "hasna.trash.guard.v1") return { ok: true, path: candidate, version: manifest.version };
|
package/package.json
CHANGED