@hasna/hooks 0.13.0 → 0.13.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/README.md +1 -1
- package/bin/hooks/scratch-lifecycle.js +5 -5
- package/bin/hooks/stop-review.js +2 -2
- package/bin/hooks-mcp.js +931 -73
- package/bin/index.js +1289 -427
- package/bin/native-safety-entry.js +37 -37
- package/bin/native-safety-worker.cjs +37 -37
- package/bin/serve.js +119 -119
- package/dist/index.js +1196 -338
- package/dist/native-readiness.js +11 -11
- package/dist/native-safety.js +9 -9
- package/dist/opencode-stop-plugin.js +5 -5
- package/dist/sdk/index.js +7 -7
- package/dist/storage.js +34 -34
- package/dist/sumi-stop-plugin.js +7 -7
- package/hooks/local-executors.ts +97 -12
- package/package.json +1 -1
package/bin/serve.js
CHANGED
|
@@ -731,119 +731,119 @@ function getHook(name) {
|
|
|
731
731
|
import { existsSync as existsSync2, mkdirSync, readFileSync, readdirSync, realpathSync, writeFileSync } from "fs";
|
|
732
732
|
import { basename, dirname, isAbsolute, join as join3, normalize, resolve as resolve2, sep } from "path";
|
|
733
733
|
|
|
734
|
-
//
|
|
734
|
+
// ../../../../../../home/hasna/.hasna/scratchpad/scratch/baf4a176-62b7-49a5-aab3-8dcbe08e5fc2/apps-copy/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/external.js
|
|
735
735
|
var exports_external = {};
|
|
736
736
|
__export(exports_external, {
|
|
737
|
-
|
|
738
|
-
DIRTY: () => DIRTY,
|
|
739
|
-
EMPTY_PATH: () => EMPTY_PATH,
|
|
740
|
-
INVALID: () => INVALID,
|
|
741
|
-
NEVER: () => NEVER,
|
|
742
|
-
OK: () => OK,
|
|
743
|
-
ParseStatus: () => ParseStatus,
|
|
744
|
-
Schema: () => ZodType,
|
|
745
|
-
ZodAny: () => ZodAny,
|
|
746
|
-
ZodArray: () => ZodArray,
|
|
747
|
-
ZodBigInt: () => ZodBigInt,
|
|
748
|
-
ZodBoolean: () => ZodBoolean,
|
|
749
|
-
ZodBranded: () => ZodBranded,
|
|
750
|
-
ZodCatch: () => ZodCatch,
|
|
751
|
-
ZodDate: () => ZodDate,
|
|
752
|
-
ZodDefault: () => ZodDefault,
|
|
753
|
-
ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
|
|
754
|
-
ZodEffects: () => ZodEffects,
|
|
755
|
-
ZodEnum: () => ZodEnum,
|
|
756
|
-
ZodError: () => ZodError,
|
|
757
|
-
ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
|
|
758
|
-
ZodFunction: () => ZodFunction,
|
|
759
|
-
ZodIntersection: () => ZodIntersection,
|
|
760
|
-
ZodIssueCode: () => ZodIssueCode,
|
|
761
|
-
ZodLazy: () => ZodLazy,
|
|
762
|
-
ZodLiteral: () => ZodLiteral,
|
|
763
|
-
ZodMap: () => ZodMap,
|
|
764
|
-
ZodNaN: () => ZodNaN,
|
|
765
|
-
ZodNativeEnum: () => ZodNativeEnum,
|
|
766
|
-
ZodNever: () => ZodNever,
|
|
767
|
-
ZodNull: () => ZodNull,
|
|
768
|
-
ZodNullable: () => ZodNullable,
|
|
769
|
-
ZodNumber: () => ZodNumber,
|
|
770
|
-
ZodObject: () => ZodObject,
|
|
771
|
-
ZodOptional: () => ZodOptional,
|
|
772
|
-
ZodParsedType: () => ZodParsedType,
|
|
773
|
-
ZodPipeline: () => ZodPipeline,
|
|
774
|
-
ZodPromise: () => ZodPromise,
|
|
775
|
-
ZodReadonly: () => ZodReadonly,
|
|
776
|
-
ZodRecord: () => ZodRecord,
|
|
777
|
-
ZodSchema: () => ZodType,
|
|
778
|
-
ZodSet: () => ZodSet,
|
|
779
|
-
ZodString: () => ZodString,
|
|
780
|
-
ZodSymbol: () => ZodSymbol,
|
|
781
|
-
ZodTransformer: () => ZodEffects,
|
|
782
|
-
ZodTuple: () => ZodTuple,
|
|
783
|
-
ZodType: () => ZodType,
|
|
784
|
-
ZodUndefined: () => ZodUndefined,
|
|
785
|
-
ZodUnion: () => ZodUnion,
|
|
786
|
-
ZodUnknown: () => ZodUnknown,
|
|
787
|
-
ZodVoid: () => ZodVoid,
|
|
788
|
-
addIssueToContext: () => addIssueToContext,
|
|
789
|
-
any: () => anyType,
|
|
790
|
-
array: () => arrayType,
|
|
791
|
-
bigint: () => bigIntType,
|
|
792
|
-
boolean: () => booleanType,
|
|
793
|
-
coerce: () => coerce,
|
|
794
|
-
custom: () => custom,
|
|
795
|
-
date: () => dateType,
|
|
796
|
-
datetimeRegex: () => datetimeRegex,
|
|
797
|
-
defaultErrorMap: () => en_default,
|
|
798
|
-
discriminatedUnion: () => discriminatedUnionType,
|
|
799
|
-
effect: () => effectsType,
|
|
800
|
-
enum: () => enumType,
|
|
801
|
-
function: () => functionType,
|
|
802
|
-
getErrorMap: () => getErrorMap,
|
|
803
|
-
getParsedType: () => getParsedType,
|
|
804
|
-
instanceof: () => instanceOfType,
|
|
805
|
-
intersection: () => intersectionType,
|
|
806
|
-
isAborted: () => isAborted,
|
|
807
|
-
isAsync: () => isAsync,
|
|
808
|
-
isDirty: () => isDirty,
|
|
809
|
-
isValid: () => isValid,
|
|
810
|
-
late: () => late,
|
|
811
|
-
lazy: () => lazyType,
|
|
812
|
-
literal: () => literalType,
|
|
813
|
-
makeIssue: () => makeIssue,
|
|
814
|
-
map: () => mapType,
|
|
815
|
-
nan: () => nanType,
|
|
816
|
-
nativeEnum: () => nativeEnumType,
|
|
817
|
-
never: () => neverType,
|
|
818
|
-
null: () => nullType,
|
|
819
|
-
nullable: () => nullableType,
|
|
820
|
-
number: () => numberType,
|
|
821
|
-
object: () => objectType,
|
|
822
|
-
objectUtil: () => objectUtil,
|
|
823
|
-
oboolean: () => oboolean,
|
|
824
|
-
onumber: () => onumber,
|
|
825
|
-
optional: () => optionalType,
|
|
826
|
-
ostring: () => ostring,
|
|
827
|
-
pipeline: () => pipelineType,
|
|
828
|
-
preprocess: () => preprocessType,
|
|
829
|
-
promise: () => promiseType,
|
|
830
|
-
quotelessJson: () => quotelessJson,
|
|
831
|
-
record: () => recordType,
|
|
832
|
-
set: () => setType,
|
|
833
|
-
setErrorMap: () => setErrorMap,
|
|
834
|
-
strictObject: () => strictObjectType,
|
|
835
|
-
string: () => stringType,
|
|
836
|
-
symbol: () => symbolType,
|
|
837
|
-
transformer: () => effectsType,
|
|
838
|
-
tuple: () => tupleType,
|
|
839
|
-
undefined: () => undefinedType,
|
|
840
|
-
union: () => unionType,
|
|
841
|
-
unknown: () => unknownType,
|
|
737
|
+
void: () => voidType,
|
|
842
738
|
util: () => util,
|
|
843
|
-
|
|
739
|
+
unknown: () => unknownType,
|
|
740
|
+
union: () => unionType,
|
|
741
|
+
undefined: () => undefinedType,
|
|
742
|
+
tuple: () => tupleType,
|
|
743
|
+
transformer: () => effectsType,
|
|
744
|
+
symbol: () => symbolType,
|
|
745
|
+
string: () => stringType,
|
|
746
|
+
strictObject: () => strictObjectType,
|
|
747
|
+
setErrorMap: () => setErrorMap,
|
|
748
|
+
set: () => setType,
|
|
749
|
+
record: () => recordType,
|
|
750
|
+
quotelessJson: () => quotelessJson,
|
|
751
|
+
promise: () => promiseType,
|
|
752
|
+
preprocess: () => preprocessType,
|
|
753
|
+
pipeline: () => pipelineType,
|
|
754
|
+
ostring: () => ostring,
|
|
755
|
+
optional: () => optionalType,
|
|
756
|
+
onumber: () => onumber,
|
|
757
|
+
oboolean: () => oboolean,
|
|
758
|
+
objectUtil: () => objectUtil,
|
|
759
|
+
object: () => objectType,
|
|
760
|
+
number: () => numberType,
|
|
761
|
+
nullable: () => nullableType,
|
|
762
|
+
null: () => nullType,
|
|
763
|
+
never: () => neverType,
|
|
764
|
+
nativeEnum: () => nativeEnumType,
|
|
765
|
+
nan: () => nanType,
|
|
766
|
+
map: () => mapType,
|
|
767
|
+
makeIssue: () => makeIssue,
|
|
768
|
+
literal: () => literalType,
|
|
769
|
+
lazy: () => lazyType,
|
|
770
|
+
late: () => late,
|
|
771
|
+
isValid: () => isValid,
|
|
772
|
+
isDirty: () => isDirty,
|
|
773
|
+
isAsync: () => isAsync,
|
|
774
|
+
isAborted: () => isAborted,
|
|
775
|
+
intersection: () => intersectionType,
|
|
776
|
+
instanceof: () => instanceOfType,
|
|
777
|
+
getParsedType: () => getParsedType,
|
|
778
|
+
getErrorMap: () => getErrorMap,
|
|
779
|
+
function: () => functionType,
|
|
780
|
+
enum: () => enumType,
|
|
781
|
+
effect: () => effectsType,
|
|
782
|
+
discriminatedUnion: () => discriminatedUnionType,
|
|
783
|
+
defaultErrorMap: () => en_default,
|
|
784
|
+
datetimeRegex: () => datetimeRegex,
|
|
785
|
+
date: () => dateType,
|
|
786
|
+
custom: () => custom,
|
|
787
|
+
coerce: () => coerce,
|
|
788
|
+
boolean: () => booleanType,
|
|
789
|
+
bigint: () => bigIntType,
|
|
790
|
+
array: () => arrayType,
|
|
791
|
+
any: () => anyType,
|
|
792
|
+
addIssueToContext: () => addIssueToContext,
|
|
793
|
+
ZodVoid: () => ZodVoid,
|
|
794
|
+
ZodUnknown: () => ZodUnknown,
|
|
795
|
+
ZodUnion: () => ZodUnion,
|
|
796
|
+
ZodUndefined: () => ZodUndefined,
|
|
797
|
+
ZodType: () => ZodType,
|
|
798
|
+
ZodTuple: () => ZodTuple,
|
|
799
|
+
ZodTransformer: () => ZodEffects,
|
|
800
|
+
ZodSymbol: () => ZodSymbol,
|
|
801
|
+
ZodString: () => ZodString,
|
|
802
|
+
ZodSet: () => ZodSet,
|
|
803
|
+
ZodSchema: () => ZodType,
|
|
804
|
+
ZodRecord: () => ZodRecord,
|
|
805
|
+
ZodReadonly: () => ZodReadonly,
|
|
806
|
+
ZodPromise: () => ZodPromise,
|
|
807
|
+
ZodPipeline: () => ZodPipeline,
|
|
808
|
+
ZodParsedType: () => ZodParsedType,
|
|
809
|
+
ZodOptional: () => ZodOptional,
|
|
810
|
+
ZodObject: () => ZodObject,
|
|
811
|
+
ZodNumber: () => ZodNumber,
|
|
812
|
+
ZodNullable: () => ZodNullable,
|
|
813
|
+
ZodNull: () => ZodNull,
|
|
814
|
+
ZodNever: () => ZodNever,
|
|
815
|
+
ZodNativeEnum: () => ZodNativeEnum,
|
|
816
|
+
ZodNaN: () => ZodNaN,
|
|
817
|
+
ZodMap: () => ZodMap,
|
|
818
|
+
ZodLiteral: () => ZodLiteral,
|
|
819
|
+
ZodLazy: () => ZodLazy,
|
|
820
|
+
ZodIssueCode: () => ZodIssueCode,
|
|
821
|
+
ZodIntersection: () => ZodIntersection,
|
|
822
|
+
ZodFunction: () => ZodFunction,
|
|
823
|
+
ZodFirstPartyTypeKind: () => ZodFirstPartyTypeKind,
|
|
824
|
+
ZodError: () => ZodError,
|
|
825
|
+
ZodEnum: () => ZodEnum,
|
|
826
|
+
ZodEffects: () => ZodEffects,
|
|
827
|
+
ZodDiscriminatedUnion: () => ZodDiscriminatedUnion,
|
|
828
|
+
ZodDefault: () => ZodDefault,
|
|
829
|
+
ZodDate: () => ZodDate,
|
|
830
|
+
ZodCatch: () => ZodCatch,
|
|
831
|
+
ZodBranded: () => ZodBranded,
|
|
832
|
+
ZodBoolean: () => ZodBoolean,
|
|
833
|
+
ZodBigInt: () => ZodBigInt,
|
|
834
|
+
ZodArray: () => ZodArray,
|
|
835
|
+
ZodAny: () => ZodAny,
|
|
836
|
+
Schema: () => ZodType,
|
|
837
|
+
ParseStatus: () => ParseStatus,
|
|
838
|
+
OK: () => OK,
|
|
839
|
+
NEVER: () => NEVER,
|
|
840
|
+
INVALID: () => INVALID,
|
|
841
|
+
EMPTY_PATH: () => EMPTY_PATH,
|
|
842
|
+
DIRTY: () => DIRTY,
|
|
843
|
+
BRAND: () => BRAND
|
|
844
844
|
});
|
|
845
845
|
|
|
846
|
-
//
|
|
846
|
+
// ../../../../../../home/hasna/.hasna/scratchpad/scratch/baf4a176-62b7-49a5-aab3-8dcbe08e5fc2/apps-copy/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
847
847
|
var util;
|
|
848
848
|
(function(util2) {
|
|
849
849
|
util2.assertEqual = (_) => {};
|
|
@@ -974,7 +974,7 @@ var getParsedType = (data) => {
|
|
|
974
974
|
}
|
|
975
975
|
};
|
|
976
976
|
|
|
977
|
-
//
|
|
977
|
+
// ../../../../../../home/hasna/.hasna/scratchpad/scratch/baf4a176-62b7-49a5-aab3-8dcbe08e5fc2/apps-copy/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/ZodError.js
|
|
978
978
|
var ZodIssueCode = util.arrayToEnum([
|
|
979
979
|
"invalid_type",
|
|
980
980
|
"invalid_literal",
|
|
@@ -1093,7 +1093,7 @@ ZodError.create = (issues) => {
|
|
|
1093
1093
|
return error;
|
|
1094
1094
|
};
|
|
1095
1095
|
|
|
1096
|
-
//
|
|
1096
|
+
// ../../../../../../home/hasna/.hasna/scratchpad/scratch/baf4a176-62b7-49a5-aab3-8dcbe08e5fc2/apps-copy/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/locales/en.js
|
|
1097
1097
|
var errorMap = (issue, _ctx) => {
|
|
1098
1098
|
let message;
|
|
1099
1099
|
switch (issue.code) {
|
|
@@ -1196,7 +1196,7 @@ var errorMap = (issue, _ctx) => {
|
|
|
1196
1196
|
};
|
|
1197
1197
|
var en_default = errorMap;
|
|
1198
1198
|
|
|
1199
|
-
//
|
|
1199
|
+
// ../../../../../../home/hasna/.hasna/scratchpad/scratch/baf4a176-62b7-49a5-aab3-8dcbe08e5fc2/apps-copy/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/errors.js
|
|
1200
1200
|
var overrideErrorMap = en_default;
|
|
1201
1201
|
function setErrorMap(map) {
|
|
1202
1202
|
overrideErrorMap = map;
|
|
@@ -1204,7 +1204,7 @@ function setErrorMap(map) {
|
|
|
1204
1204
|
function getErrorMap() {
|
|
1205
1205
|
return overrideErrorMap;
|
|
1206
1206
|
}
|
|
1207
|
-
//
|
|
1207
|
+
// ../../../../../../home/hasna/.hasna/scratchpad/scratch/baf4a176-62b7-49a5-aab3-8dcbe08e5fc2/apps-copy/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js
|
|
1208
1208
|
var makeIssue = (params) => {
|
|
1209
1209
|
const { data, path, errorMaps, issueData } = params;
|
|
1210
1210
|
const fullPath = [...path, ...issueData.path || []];
|
|
@@ -1310,14 +1310,14 @@ var isAborted = (x) => x.status === "aborted";
|
|
|
1310
1310
|
var isDirty = (x) => x.status === "dirty";
|
|
1311
1311
|
var isValid = (x) => x.status === "valid";
|
|
1312
1312
|
var isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
1313
|
-
//
|
|
1313
|
+
// ../../../../../../home/hasna/.hasna/scratchpad/scratch/baf4a176-62b7-49a5-aab3-8dcbe08e5fc2/apps-copy/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js
|
|
1314
1314
|
var errorUtil;
|
|
1315
1315
|
(function(errorUtil2) {
|
|
1316
1316
|
errorUtil2.errToObj = (message) => typeof message === "string" ? { message } : message || {};
|
|
1317
1317
|
errorUtil2.toString = (message) => typeof message === "string" ? message : message?.message;
|
|
1318
1318
|
})(errorUtil || (errorUtil = {}));
|
|
1319
1319
|
|
|
1320
|
-
//
|
|
1320
|
+
// ../../../../../../home/hasna/.hasna/scratchpad/scratch/baf4a176-62b7-49a5-aab3-8dcbe08e5fc2/apps-copy/node_modules/.bun/zod@3.25.76/node_modules/zod/v3/types.js
|
|
1321
1321
|
class ParseInputLazyPath {
|
|
1322
1322
|
constructor(parent, value, path, key) {
|
|
1323
1323
|
this._cachedPath = [];
|
|
@@ -8003,10 +8003,10 @@ options:
|
|
|
8003
8003
|
});
|
|
8004
8004
|
}
|
|
8005
8005
|
export {
|
|
8006
|
-
|
|
8007
|
-
SERVE_HOST,
|
|
8008
|
-
SERVE_SERVICE_NAME,
|
|
8009
|
-
handleServeRequest,
|
|
8006
|
+
startServeServer,
|
|
8010
8007
|
resolveServeOptions,
|
|
8011
|
-
|
|
8008
|
+
handleServeRequest,
|
|
8009
|
+
SERVE_SERVICE_NAME,
|
|
8010
|
+
SERVE_HOST,
|
|
8011
|
+
DEFAULT_SERVE_PORT
|
|
8012
8012
|
};
|