@hasna/hooks 0.12.23 → 0.13.0
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 -0
- package/bin/hooks/scratch-lifecycle.js +5 -5
- package/bin/hooks/stop-review.js +2 -2
- package/bin/hooks-mcp.js +1246 -1134
- package/bin/index.js +2160 -1836
- package/bin/native-safety-entry.js +37 -37
- package/bin/native-safety-worker.cjs +37 -37
- package/bin/serve.js +115 -111
- package/dist/index.js +1633 -1453
- package/dist/lib/installer.d.ts +44 -5
- package/dist/lib/manifest.d.ts +21 -0
- package/dist/lib/native-target.d.ts +11 -2
- package/dist/lib/registry.d.ts +12 -0
- package/dist/lib/target-adapters.d.ts +151 -0
- package/dist/lib/targets.d.ts +99 -0
- 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/package.json +1 -1
package/bin/serve.js
CHANGED
|
@@ -734,113 +734,113 @@ import { basename, dirname, isAbsolute, join as join3, normalize, resolve as res
|
|
|
734
734
|
// ../../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
|
-
util: () => util,
|
|
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,
|
|
737
|
+
BRAND: () => BRAND,
|
|
842
738
|
DIRTY: () => DIRTY,
|
|
843
|
-
|
|
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,
|
|
842
|
+
util: () => util,
|
|
843
|
+
void: () => voidType
|
|
844
844
|
});
|
|
845
845
|
|
|
846
846
|
// ../../node_modules/.bun/zod@3.25.76/node_modules/zod/v3/helpers/util.js
|
|
@@ -4785,6 +4785,8 @@ var manifestSchema = exports_external.object({
|
|
|
4785
4785
|
script_kind: exports_external.enum(["inline", "file"]).optional(),
|
|
4786
4786
|
args: exports_external.array(exports_external.string()).optional(),
|
|
4787
4787
|
nativeTargetDispatch: exports_external.boolean().optional(),
|
|
4788
|
+
requires_final_message: exports_external.boolean().optional(),
|
|
4789
|
+
requires_block: exports_external.boolean().optional(),
|
|
4788
4790
|
timeout_ms: exports_external.number().int().positive().optional(),
|
|
4789
4791
|
env: exports_external.record(exports_external.string(), exports_external.string()).optional()
|
|
4790
4792
|
});
|
|
@@ -5507,6 +5509,8 @@ function resolveHookMeta(name) {
|
|
|
5507
5509
|
matcher: "",
|
|
5508
5510
|
tags: ["custom"],
|
|
5509
5511
|
nativeTargetDispatch: manifest.nativeTargetDispatch,
|
|
5512
|
+
requiresFinalMessage: manifest.requires_final_message,
|
|
5513
|
+
requiresBlock: manifest.requires_block,
|
|
5510
5514
|
timeoutSeconds: manifest.timeout_ms === undefined ? undefined : Math.ceil(manifest.timeout_ms / 1000)
|
|
5511
5515
|
};
|
|
5512
5516
|
}
|
|
@@ -7999,10 +8003,10 @@ options:
|
|
|
7999
8003
|
});
|
|
8000
8004
|
}
|
|
8001
8005
|
export {
|
|
8002
|
-
|
|
8003
|
-
resolveServeOptions,
|
|
8004
|
-
handleServeRequest,
|
|
8005
|
-
SERVE_SERVICE_NAME,
|
|
8006
|
+
DEFAULT_SERVE_PORT,
|
|
8006
8007
|
SERVE_HOST,
|
|
8007
|
-
|
|
8008
|
+
SERVE_SERVICE_NAME,
|
|
8009
|
+
handleServeRequest,
|
|
8010
|
+
resolveServeOptions,
|
|
8011
|
+
startServeServer
|
|
8008
8012
|
};
|