agent-skill-manager 1.21.0 → 1.22.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 +23 -1
- package/dist/agent-skill-manager.js +200 -198
- package/dist/{chunk-cshq625q.js → chunk-2bvch8gs.js} +1 -1
- package/dist/{chunk-4qbqrrmk.js → chunk-thr0x97h.js} +1 -1
- package/node_modules/@balena/dockerignore/LICENSE.md +206 -0
- package/node_modules/@balena/dockerignore/README.md +261 -0
- package/node_modules/@balena/dockerignore/ignore.js +363 -0
- package/node_modules/@balena/dockerignore/index.d.ts +45 -0
- package/node_modules/@balena/dockerignore/package.json +49 -0
- package/node_modules/@grpc/grpc-js/LICENSE +201 -0
- package/node_modules/@grpc/grpc-js/README.md +84 -0
- package/node_modules/@grpc/grpc-js/build/src/admin.d.ts +11 -0
- package/node_modules/@grpc/grpc-js/build/src/admin.js +30 -0
- package/node_modules/@grpc/grpc-js/build/src/admin.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/auth-context.d.ts +5 -0
- package/node_modules/@grpc/grpc-js/build/src/auth-context.js +19 -0
- package/node_modules/@grpc/grpc-js/build/src/auth-context.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/backoff-timeout.d.ts +94 -0
- package/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js +191 -0
- package/node_modules/@grpc/grpc-js/build/src/backoff-timeout.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/call-credentials.d.ts +57 -0
- package/node_modules/@grpc/grpc-js/build/src/call-credentials.js +153 -0
- package/node_modules/@grpc/grpc-js/build/src/call-credentials.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/call-interface.d.ts +101 -0
- package/node_modules/@grpc/grpc-js/build/src/call-interface.js +100 -0
- package/node_modules/@grpc/grpc-js/build/src/call-interface.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/call-number.d.ts +1 -0
- package/node_modules/@grpc/grpc-js/build/src/call-number.js +24 -0
- package/node_modules/@grpc/grpc-js/build/src/call-number.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/call.d.ts +86 -0
- package/node_modules/@grpc/grpc-js/build/src/call.js +152 -0
- package/node_modules/@grpc/grpc-js/build/src/call.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/certificate-provider.d.ts +43 -0
- package/node_modules/@grpc/grpc-js/build/src/certificate-provider.js +141 -0
- package/node_modules/@grpc/grpc-js/build/src/certificate-provider.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/channel-credentials.d.ts +119 -0
- package/node_modules/@grpc/grpc-js/build/src/channel-credentials.js +430 -0
- package/node_modules/@grpc/grpc-js/build/src/channel-credentials.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/channel-options.d.ts +81 -0
- package/node_modules/@grpc/grpc-js/build/src/channel-options.js +73 -0
- package/node_modules/@grpc/grpc-js/build/src/channel-options.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/channel.d.ts +76 -0
- package/node_modules/@grpc/grpc-js/build/src/channel.js +68 -0
- package/node_modules/@grpc/grpc-js/build/src/channel.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/channelz.d.ts +158 -0
- package/node_modules/@grpc/grpc-js/build/src/channelz.js +598 -0
- package/node_modules/@grpc/grpc-js/build/src/channelz.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/client-interceptors.d.ts +123 -0
- package/node_modules/@grpc/grpc-js/build/src/client-interceptors.js +434 -0
- package/node_modules/@grpc/grpc-js/build/src/client-interceptors.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/client.d.ts +74 -0
- package/node_modules/@grpc/grpc-js/build/src/client.js +433 -0
- package/node_modules/@grpc/grpc-js/build/src/client.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/compression-algorithms.d.ts +5 -0
- package/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js +26 -0
- package/node_modules/@grpc/grpc-js/build/src/compression-algorithms.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/compression-filter.d.ts +28 -0
- package/node_modules/@grpc/grpc-js/build/src/compression-filter.js +295 -0
- package/node_modules/@grpc/grpc-js/build/src/compression-filter.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/connectivity-state.d.ts +7 -0
- package/node_modules/@grpc/grpc-js/build/src/connectivity-state.js +28 -0
- package/node_modules/@grpc/grpc-js/build/src/connectivity-state.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/constants.d.ts +38 -0
- package/node_modules/@grpc/grpc-js/build/src/constants.js +64 -0
- package/node_modules/@grpc/grpc-js/build/src/constants.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/control-plane-status.d.ts +5 -0
- package/node_modules/@grpc/grpc-js/build/src/control-plane-status.js +42 -0
- package/node_modules/@grpc/grpc-js/build/src/control-plane-status.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/deadline.d.ts +22 -0
- package/node_modules/@grpc/grpc-js/build/src/deadline.js +108 -0
- package/node_modules/@grpc/grpc-js/build/src/deadline.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/duration.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/duration.js +74 -0
- package/node_modules/@grpc/grpc-js/build/src/duration.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/environment.d.ts +1 -0
- package/node_modules/@grpc/grpc-js/build/src/environment.js +22 -0
- package/node_modules/@grpc/grpc-js/build/src/environment.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/error.d.ts +2 -0
- package/node_modules/@grpc/grpc-js/build/src/error.js +40 -0
- package/node_modules/@grpc/grpc-js/build/src/error.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/events.d.ts +9 -0
- package/node_modules/@grpc/grpc-js/build/src/events.js +19 -0
- package/node_modules/@grpc/grpc-js/build/src/events.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/experimental.d.ts +20 -0
- package/node_modules/@grpc/grpc-js/build/src/experimental.js +58 -0
- package/node_modules/@grpc/grpc-js/build/src/experimental.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/filter-stack.d.ts +21 -0
- package/node_modules/@grpc/grpc-js/build/src/filter-stack.js +82 -0
- package/node_modules/@grpc/grpc-js/build/src/filter-stack.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/filter.d.ts +25 -0
- package/node_modules/@grpc/grpc-js/build/src/filter.js +38 -0
- package/node_modules/@grpc/grpc-js/build/src/filter.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/channelz.d.ts +118 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/channelz.js +3 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/channelz.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.d.ts +9 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Any.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BoolValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/BytesValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.d.ts +51 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DescriptorProto.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/DoubleValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.d.ts +9 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Duration.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.d.ts +16 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js +19 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Edition.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumDescriptorProto.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.d.ts +22 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.d.ts +11 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueDescriptorProto.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.d.ts +17 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/EnumValueOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.d.ts +34 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js +10 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ExtensionRangeOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.d.ts +83 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js +56 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSet.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.d.ts +22 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FeatureSetDefaults.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.d.ts +56 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js +32 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldDescriptorProto.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.d.ts +99 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js +36 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FieldOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.d.ts +39 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorProto.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.d.ts +7 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileDescriptorSet.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.d.ts +61 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js +11 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FileOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/FloatValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js +11 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/GeneratedCodeInfo.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int32Value.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.d.ts +7 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Int64Value.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.d.ts +28 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MessageOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.d.ts +17 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodDescriptorProto.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.d.ts +21 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js +11 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/MethodOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.d.ts +9 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofDescriptorProto.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.d.ts +12 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/OneofOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.d.ts +12 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceDescriptorProto.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.d.ts +12 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/ServiceOptions.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.d.ts +20 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SourceCodeInfo.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/StringValue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.d.ts +7 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js +10 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/SymbolVisibility.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.d.ts +9 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/Timestamp.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.d.ts +6 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt32Value.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.d.ts +7 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UInt64Value.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/google/protobuf/UninterpretedOption.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.d.ts +79 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Address.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.d.ts +64 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channel.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.d.ts +24 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js +14 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelConnectivityState.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.d.ts +72 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelData.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelRef.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.d.ts +41 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTrace.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.d.ts +74 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ChannelTraceEvent.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.d.ts +159 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Channelz.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.d.ts +13 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetChannelResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.d.ts +13 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.d.ts +35 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.d.ts +29 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServerSocketsResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.d.ts +33 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.d.ts +29 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetServersResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.d.ts +25 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSocketResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.d.ts +13 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetSubchannelResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.d.ts +33 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.d.ts +29 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/GetTopChannelsResponse.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.d.ts +79 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Security.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.d.ts +41 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Server.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.d.ts +53 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerData.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/ServerRef.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.d.ts +66 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Socket.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.d.ts +146 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketData.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.d.ts +43 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOption.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.d.ts +29 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionLinger.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.d.ts +70 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.d.ts +15 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketOptionTimeout.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SocketRef.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.d.ts +66 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/Subchannel.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/grpc/channelz/v1/SubchannelRef.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/orca.d.ts +145 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/orca.js +3 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/orca.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.d.ts +40 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/AnyRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.d.ts +18 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/BoolRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.d.ts +149 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/BytesRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.d.ts +82 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/DoubleRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.d.ts +89 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/DurationRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.d.ts +48 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/EnumRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.d.ts +98 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/FieldRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.d.ts +82 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed32Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.d.ts +83 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Fixed64Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.d.ts +82 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/FloatRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.d.ts +82 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int32Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.d.ts +83 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/Int64Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.d.ts +30 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js +19 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/KnownRegex.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.d.ts +62 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/MapRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.d.ts +30 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/MessageRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.d.ts +56 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/RepeatedRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.d.ts +82 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed32Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.d.ts +83 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SFixed64Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.d.ts +82 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt32Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.d.ts +83 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/SInt64Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.d.ts +284 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/StringRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.d.ts +102 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/TimestampRules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.d.ts +82 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt32Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.d.ts +83 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/validate/UInt64Rules.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.d.ts +121 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/data/orca/v3/OrcaLoadReport.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.d.ts +36 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OpenRcaService.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.d.ts +25 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js +4 -0
- package/node_modules/@grpc/grpc-js/build/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/http_proxy.d.ts +16 -0
- package/node_modules/@grpc/grpc-js/build/src/http_proxy.js +274 -0
- package/node_modules/@grpc/grpc-js/build/src/http_proxy.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/index.d.ts +79 -0
- package/node_modules/@grpc/grpc-js/build/src/index.js +148 -0
- package/node_modules/@grpc/grpc-js/build/src/index.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/internal-channel.d.ts +124 -0
- package/node_modules/@grpc/grpc-js/build/src/internal-channel.js +605 -0
- package/node_modules/@grpc/grpc-js/build/src/internal-channel.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.d.ts +24 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js +151 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-child-handler.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.d.ts +71 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js +571 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-outlier-detection.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.d.ts +134 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js +514 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-pick-first.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.d.ts +24 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js +204 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-round-robin.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.d.ts +20 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js +392 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer-weighted-round-robin.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer.d.ts +101 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer.js +116 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancer.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancing-call.d.ts +49 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js +302 -0
- package/node_modules/@grpc/grpc-js/build/src/load-balancing-call.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/logging.d.ts +7 -0
- package/node_modules/@grpc/grpc-js/build/src/logging.js +122 -0
- package/node_modules/@grpc/grpc-js/build/src/logging.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/make-client.d.ts +71 -0
- package/node_modules/@grpc/grpc-js/build/src/make-client.js +143 -0
- package/node_modules/@grpc/grpc-js/build/src/make-client.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/metadata.d.ts +100 -0
- package/node_modules/@grpc/grpc-js/build/src/metadata.js +272 -0
- package/node_modules/@grpc/grpc-js/build/src/metadata.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/object-stream.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/build/src/object-stream.js +19 -0
- package/node_modules/@grpc/grpc-js/build/src/object-stream.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/orca.d.ts +89 -0
- package/node_modules/@grpc/grpc-js/build/src/orca.js +323 -0
- package/node_modules/@grpc/grpc-js/build/src/orca.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/picker.d.ts +95 -0
- package/node_modules/@grpc/grpc-js/build/src/picker.js +86 -0
- package/node_modules/@grpc/grpc-js/build/src/picker.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/priority-queue.d.ts +50 -0
- package/node_modules/@grpc/grpc-js/build/src/priority-queue.js +120 -0
- package/node_modules/@grpc/grpc-js/build/src/priority-queue.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-dns.d.ts +13 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-dns.js +363 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-dns.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-ip.d.ts +1 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-ip.js +106 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-ip.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-uds.d.ts +1 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-uds.js +51 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver-uds.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver.d.ts +102 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver.js +89 -0
- package/node_modules/@grpc/grpc-js/build/src/resolver.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/resolving-call.d.ts +54 -0
- package/node_modules/@grpc/grpc-js/build/src/resolving-call.js +319 -0
- package/node_modules/@grpc/grpc-js/build/src/resolving-call.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.d.ts +70 -0
- package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js +304 -0
- package/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/retrying-call.d.ts +100 -0
- package/node_modules/@grpc/grpc-js/build/src/retrying-call.js +724 -0
- package/node_modules/@grpc/grpc-js/build/src/retrying-call.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/server-call.d.ts +141 -0
- package/node_modules/@grpc/grpc-js/build/src/server-call.js +226 -0
- package/node_modules/@grpc/grpc-js/build/src/server-call.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/server-credentials.d.ts +48 -0
- package/node_modules/@grpc/grpc-js/build/src/server-credentials.js +314 -0
- package/node_modules/@grpc/grpc-js/build/src/server-credentials.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/server-interceptors.d.ts +216 -0
- package/node_modules/@grpc/grpc-js/build/src/server-interceptors.js +817 -0
- package/node_modules/@grpc/grpc-js/build/src/server-interceptors.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/server.d.ts +140 -0
- package/node_modules/@grpc/grpc-js/build/src/server.js +1608 -0
- package/node_modules/@grpc/grpc-js/build/src/server.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/service-config.d.ts +58 -0
- package/node_modules/@grpc/grpc-js/build/src/service-config.js +430 -0
- package/node_modules/@grpc/grpc-js/build/src/service-config.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.d.ts +25 -0
- package/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js +245 -0
- package/node_modules/@grpc/grpc-js/build/src/single-subchannel-channel.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/status-builder.d.ts +28 -0
- package/node_modules/@grpc/grpc-js/build/src/status-builder.js +68 -0
- package/node_modules/@grpc/grpc-js/build/src/status-builder.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/stream-decoder.d.ts +12 -0
- package/node_modules/@grpc/grpc-js/build/src/stream-decoder.js +100 -0
- package/node_modules/@grpc/grpc-js/build/src/stream-decoder.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-address.d.ts +42 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-address.js +202 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-address.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-call.d.ts +68 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-call.js +545 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-call.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-interface.d.ts +82 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js +114 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-interface.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.d.ts +40 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js +137 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel-pool.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel.d.ts +135 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel.js +397 -0
- package/node_modules/@grpc/grpc-js/build/src/subchannel.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/tls-helpers.d.ts +2 -0
- package/node_modules/@grpc/grpc-js/build/src/tls-helpers.js +34 -0
- package/node_modules/@grpc/grpc-js/build/src/tls-helpers.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/transport.d.ts +135 -0
- package/node_modules/@grpc/grpc-js/build/src/transport.js +640 -0
- package/node_modules/@grpc/grpc-js/build/src/transport.js.map +1 -0
- package/node_modules/@grpc/grpc-js/build/src/uri-parser.d.ts +13 -0
- package/node_modules/@grpc/grpc-js/build/src/uri-parser.js +125 -0
- package/node_modules/@grpc/grpc-js/build/src/uri-parser.js.map +1 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/LICENSE +201 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/README.md +140 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js +915 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js.map +1 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/index.d.ts +162 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/index.js +246 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/index.js.map +1 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/util.d.ts +27 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/util.js +89 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/build/src/util.js.map +1 -0
- package/node_modules/@grpc/grpc-js/node_modules/@grpc/proto-loader/package.json +69 -0
- package/node_modules/@grpc/grpc-js/package.json +89 -0
- package/node_modules/@grpc/grpc-js/proto/channelz.proto +564 -0
- package/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/LICENSE +202 -0
- package/node_modules/@grpc/grpc-js/proto/protoc-gen-validate/validate/validate.proto +797 -0
- package/node_modules/@grpc/grpc-js/proto/xds/LICENSE +201 -0
- package/node_modules/@grpc/grpc-js/proto/xds/xds/data/orca/v3/orca_load_report.proto +58 -0
- package/node_modules/@grpc/grpc-js/proto/xds/xds/service/orca/v3/orca.proto +36 -0
- package/node_modules/@grpc/grpc-js/src/admin.ts +45 -0
- package/node_modules/@grpc/grpc-js/src/auth-context.ts +23 -0
- package/node_modules/@grpc/grpc-js/src/backoff-timeout.ts +222 -0
- package/node_modules/@grpc/grpc-js/src/call-credentials.ts +227 -0
- package/node_modules/@grpc/grpc-js/src/call-interface.ts +208 -0
- package/node_modules/@grpc/grpc-js/src/call-number.ts +22 -0
- package/node_modules/@grpc/grpc-js/src/call.ts +218 -0
- package/node_modules/@grpc/grpc-js/src/certificate-provider.ts +176 -0
- package/node_modules/@grpc/grpc-js/src/channel-credentials.ts +523 -0
- package/node_modules/@grpc/grpc-js/src/channel-options.ts +128 -0
- package/node_modules/@grpc/grpc-js/src/channel.ts +174 -0
- package/node_modules/@grpc/grpc-js/src/channelz.ts +909 -0
- package/node_modules/@grpc/grpc-js/src/client-interceptors.ts +585 -0
- package/node_modules/@grpc/grpc-js/src/client.ts +716 -0
- package/node_modules/@grpc/grpc-js/src/compression-algorithms.ts +22 -0
- package/node_modules/@grpc/grpc-js/src/compression-filter.ts +358 -0
- package/node_modules/@grpc/grpc-js/src/connectivity-state.ts +24 -0
- package/node_modules/@grpc/grpc-js/src/constants.ts +66 -0
- package/node_modules/@grpc/grpc-js/src/control-plane-status.ts +43 -0
- package/node_modules/@grpc/grpc-js/src/deadline.ts +106 -0
- package/node_modules/@grpc/grpc-js/src/duration.ts +79 -0
- package/node_modules/@grpc/grpc-js/src/environment.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/error.ts +37 -0
- package/node_modules/@grpc/grpc-js/src/events.ts +26 -0
- package/node_modules/@grpc/grpc-js/src/experimental.ts +73 -0
- package/node_modules/@grpc/grpc-js/src/filter-stack.ts +100 -0
- package/node_modules/@grpc/grpc-js/src/filter.ts +63 -0
- package/node_modules/@grpc/grpc-js/src/generated/channelz.ts +119 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Any.ts +13 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BoolValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/BytesValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DescriptorProto.ts +59 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/DoubleValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Duration.ts +13 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Edition.ts +44 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumDescriptorProto.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumOptions.ts +26 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueDescriptorProto.ts +15 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/EnumValueOptions.ts +21 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ExtensionRangeOptions.ts +49 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSet.ts +183 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FeatureSetDefaults.ts +28 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldDescriptorProto.ts +112 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FieldOptions.ts +165 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorProto.ts +43 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileDescriptorSet.ts +11 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FileOptions.ts +76 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/FloatValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/GeneratedCodeInfo.ts +44 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int32Value.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Int64Value.ts +11 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MessageOptions.ts +32 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodDescriptorProto.ts +21 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/MethodOptions.ts +36 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofDescriptorProto.ts +13 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/OneofOptions.ts +16 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceDescriptorProto.ts +16 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/ServiceOptions.ts +16 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SourceCodeInfo.ts +26 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/StringValue.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/SymbolVisibility.ts +17 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/Timestamp.ts +13 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt32Value.ts +10 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UInt64Value.ts +11 -0
- package/node_modules/@grpc/grpc-js/src/generated/google/protobuf/UninterpretedOption.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Address.ts +89 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channel.ts +68 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelConnectivityState.ts +45 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelData.ts +76 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelRef.ts +31 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTrace.ts +45 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ChannelTraceEvent.ts +91 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Channelz.ts +178 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelRequest.ts +17 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetChannelResponse.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerRequest.ts +17 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerResponse.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsRequest.ts +39 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServerSocketsResponse.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersRequest.ts +37 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetServersResponse.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketRequest.ts +29 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSocketResponse.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelRequest.ts +17 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetSubchannelResponse.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsRequest.ts +37 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/GetTopChannelsResponse.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Security.ts +87 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Server.ts +45 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerData.ts +57 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/ServerRef.ts +31 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Socket.ts +70 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketData.ts +150 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOption.ts +47 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionLinger.ts +33 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTcpInfo.ts +74 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketOptionTimeout.ts +19 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SocketRef.ts +31 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/Subchannel.ts +70 -0
- package/node_modules/@grpc/grpc-js/src/generated/grpc/channelz/v1/SubchannelRef.ts +31 -0
- package/node_modules/@grpc/grpc-js/src/generated/orca.ts +146 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/AnyRules.ts +44 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/BoolRules.ts +22 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/BytesRules.ts +153 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/DoubleRules.ts +86 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/DurationRules.ts +93 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/EnumRules.ts +52 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/FieldRules.ts +102 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/Fixed32Rules.ts +86 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/Fixed64Rules.ts +87 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/FloatRules.ts +86 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/Int32Rules.ts +86 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/Int64Rules.ts +87 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/KnownRegex.ts +38 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/MapRules.ts +66 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/MessageRules.ts +34 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/RepeatedRules.ts +60 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/SFixed32Rules.ts +86 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/SFixed64Rules.ts +87 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/SInt32Rules.ts +86 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/SInt64Rules.ts +87 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/StringRules.ts +288 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/TimestampRules.ts +106 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/UInt32Rules.ts +86 -0
- package/node_modules/@grpc/grpc-js/src/generated/validate/UInt64Rules.ts +87 -0
- package/node_modules/@grpc/grpc-js/src/generated/xds/data/orca/v3/OrcaLoadReport.ts +113 -0
- package/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OpenRcaService.ts +43 -0
- package/node_modules/@grpc/grpc-js/src/generated/xds/service/orca/v3/OrcaLoadReportRequest.ts +29 -0
- package/node_modules/@grpc/grpc-js/src/http_proxy.ts +315 -0
- package/node_modules/@grpc/grpc-js/src/index.ts +312 -0
- package/node_modules/@grpc/grpc-js/src/internal-channel.ts +878 -0
- package/node_modules/@grpc/grpc-js/src/load-balancer-child-handler.ts +173 -0
- package/node_modules/@grpc/grpc-js/src/load-balancer-outlier-detection.ts +840 -0
- package/node_modules/@grpc/grpc-js/src/load-balancer-pick-first.ts +662 -0
- package/node_modules/@grpc/grpc-js/src/load-balancer-round-robin.ts +287 -0
- package/node_modules/@grpc/grpc-js/src/load-balancer-weighted-round-robin.ts +494 -0
- package/node_modules/@grpc/grpc-js/src/load-balancer.ts +258 -0
- package/node_modules/@grpc/grpc-js/src/load-balancing-call.ts +387 -0
- package/node_modules/@grpc/grpc-js/src/logging.ts +134 -0
- package/node_modules/@grpc/grpc-js/src/make-client.ts +238 -0
- package/node_modules/@grpc/grpc-js/src/metadata.ts +323 -0
- package/node_modules/@grpc/grpc-js/src/object-stream.ts +66 -0
- package/node_modules/@grpc/grpc-js/src/orca.ts +349 -0
- package/node_modules/@grpc/grpc-js/src/picker.ts +157 -0
- package/node_modules/@grpc/grpc-js/src/priority-queue.ts +118 -0
- package/node_modules/@grpc/grpc-js/src/resolver-dns.ts +449 -0
- package/node_modules/@grpc/grpc-js/src/resolver-ip.ts +124 -0
- package/node_modules/@grpc/grpc-js/src/resolver-uds.ts +63 -0
- package/node_modules/@grpc/grpc-js/src/resolver.ts +176 -0
- package/node_modules/@grpc/grpc-js/src/resolving-call.ts +379 -0
- package/node_modules/@grpc/grpc-js/src/resolving-load-balancer.ts +407 -0
- package/node_modules/@grpc/grpc-js/src/retrying-call.ts +924 -0
- package/node_modules/@grpc/grpc-js/src/server-call.ts +420 -0
- package/node_modules/@grpc/grpc-js/src/server-credentials.ts +352 -0
- package/node_modules/@grpc/grpc-js/src/server-interceptors.ts +1071 -0
- package/node_modules/@grpc/grpc-js/src/server.ts +2212 -0
- package/node_modules/@grpc/grpc-js/src/service-config.ts +564 -0
- package/node_modules/@grpc/grpc-js/src/single-subchannel-channel.ts +248 -0
- package/node_modules/@grpc/grpc-js/src/status-builder.ts +80 -0
- package/node_modules/@grpc/grpc-js/src/stream-decoder.ts +110 -0
- package/node_modules/@grpc/grpc-js/src/subchannel-address.ts +252 -0
- package/node_modules/@grpc/grpc-js/src/subchannel-call.ts +622 -0
- package/node_modules/@grpc/grpc-js/src/subchannel-interface.ts +176 -0
- package/node_modules/@grpc/grpc-js/src/subchannel-pool.ts +176 -0
- package/node_modules/@grpc/grpc-js/src/subchannel.ts +559 -0
- package/node_modules/@grpc/grpc-js/src/tls-helpers.ts +35 -0
- package/node_modules/@grpc/grpc-js/src/transport.ts +825 -0
- package/node_modules/@grpc/grpc-js/src/uri-parser.ts +127 -0
- package/node_modules/@grpc/proto-loader/LICENSE +201 -0
- package/node_modules/@grpc/proto-loader/README.md +140 -0
- package/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js +913 -0
- package/node_modules/@grpc/proto-loader/build/bin/proto-loader-gen-types.js.map +1 -0
- package/node_modules/@grpc/proto-loader/build/src/index.d.ts +160 -0
- package/node_modules/@grpc/proto-loader/build/src/index.js +244 -0
- package/node_modules/@grpc/proto-loader/build/src/index.js.map +1 -0
- package/node_modules/@grpc/proto-loader/build/src/util.d.ts +27 -0
- package/node_modules/@grpc/proto-loader/build/src/util.js +89 -0
- package/node_modules/@grpc/proto-loader/build/src/util.js.map +1 -0
- package/node_modules/@grpc/proto-loader/package.json +69 -0
- package/node_modules/@js-sdsl/ordered-map/CHANGELOG.md +237 -0
- package/node_modules/@js-sdsl/ordered-map/LICENSE +21 -0
- package/node_modules/@js-sdsl/ordered-map/README.md +270 -0
- package/node_modules/@js-sdsl/ordered-map/README.zh-CN.md +272 -0
- package/node_modules/@js-sdsl/ordered-map/dist/cjs/index.d.ts +402 -0
- package/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js +795 -0
- package/node_modules/@js-sdsl/ordered-map/dist/cjs/index.js.map +1 -0
- package/node_modules/@js-sdsl/ordered-map/dist/esm/index.d.ts +402 -0
- package/node_modules/@js-sdsl/ordered-map/dist/esm/index.js +975 -0
- package/node_modules/@js-sdsl/ordered-map/dist/esm/index.js.map +1 -0
- package/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.js +1157 -0
- package/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js +8 -0
- package/node_modules/@js-sdsl/ordered-map/dist/umd/ordered-map.min.js.map +1 -0
- package/node_modules/@js-sdsl/ordered-map/package.json +138 -0
- package/node_modules/@protobufjs/aspromise/LICENSE +26 -0
- package/node_modules/@protobufjs/aspromise/README.md +13 -0
- package/node_modules/@protobufjs/aspromise/index.d.ts +13 -0
- package/node_modules/@protobufjs/aspromise/index.js +52 -0
- package/node_modules/@protobufjs/aspromise/package.json +21 -0
- package/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
- package/node_modules/@protobufjs/base64/LICENSE +26 -0
- package/node_modules/@protobufjs/base64/README.md +19 -0
- package/node_modules/@protobufjs/base64/index.d.ts +32 -0
- package/node_modules/@protobufjs/base64/index.js +139 -0
- package/node_modules/@protobufjs/base64/package.json +21 -0
- package/node_modules/@protobufjs/base64/tests/index.js +46 -0
- package/node_modules/@protobufjs/codegen/LICENSE +26 -0
- package/node_modules/@protobufjs/codegen/README.md +49 -0
- package/node_modules/@protobufjs/codegen/index.d.ts +31 -0
- package/node_modules/@protobufjs/codegen/index.js +99 -0
- package/node_modules/@protobufjs/codegen/package.json +13 -0
- package/node_modules/@protobufjs/codegen/tests/index.js +13 -0
- package/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
- package/node_modules/@protobufjs/eventemitter/README.md +22 -0
- package/node_modules/@protobufjs/eventemitter/index.d.ts +43 -0
- package/node_modules/@protobufjs/eventemitter/index.js +76 -0
- package/node_modules/@protobufjs/eventemitter/package.json +21 -0
- package/node_modules/@protobufjs/eventemitter/tests/index.js +47 -0
- package/node_modules/@protobufjs/fetch/LICENSE +26 -0
- package/node_modules/@protobufjs/fetch/README.md +13 -0
- package/node_modules/@protobufjs/fetch/index.d.ts +56 -0
- package/node_modules/@protobufjs/fetch/index.js +115 -0
- package/node_modules/@protobufjs/fetch/package.json +25 -0
- package/node_modules/@protobufjs/fetch/tests/index.js +16 -0
- package/node_modules/@protobufjs/float/LICENSE +26 -0
- package/node_modules/@protobufjs/float/README.md +102 -0
- package/node_modules/@protobufjs/float/bench/index.js +87 -0
- package/node_modules/@protobufjs/float/bench/suite.js +46 -0
- package/node_modules/@protobufjs/float/index.d.ts +83 -0
- package/node_modules/@protobufjs/float/index.js +335 -0
- package/node_modules/@protobufjs/float/package.json +26 -0
- package/node_modules/@protobufjs/float/tests/index.js +100 -0
- package/node_modules/@protobufjs/inquire/.npmignore +3 -0
- package/node_modules/@protobufjs/inquire/LICENSE +26 -0
- package/node_modules/@protobufjs/inquire/README.md +13 -0
- package/node_modules/@protobufjs/inquire/index.d.ts +9 -0
- package/node_modules/@protobufjs/inquire/index.js +17 -0
- package/node_modules/@protobufjs/inquire/package.json +21 -0
- package/node_modules/@protobufjs/inquire/tests/data/array.js +1 -0
- package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +1 -0
- package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +1 -0
- package/node_modules/@protobufjs/inquire/tests/data/object.js +1 -0
- package/node_modules/@protobufjs/inquire/tests/index.js +20 -0
- package/node_modules/@protobufjs/path/LICENSE +26 -0
- package/node_modules/@protobufjs/path/README.md +19 -0
- package/node_modules/@protobufjs/path/index.d.ts +22 -0
- package/node_modules/@protobufjs/path/index.js +65 -0
- package/node_modules/@protobufjs/path/package.json +21 -0
- package/node_modules/@protobufjs/path/tests/index.js +60 -0
- package/node_modules/@protobufjs/pool/.npmignore +3 -0
- package/node_modules/@protobufjs/pool/LICENSE +26 -0
- package/node_modules/@protobufjs/pool/README.md +13 -0
- package/node_modules/@protobufjs/pool/index.d.ts +32 -0
- package/node_modules/@protobufjs/pool/index.js +48 -0
- package/node_modules/@protobufjs/pool/package.json +21 -0
- package/node_modules/@protobufjs/pool/tests/index.js +33 -0
- package/node_modules/@protobufjs/utf8/.npmignore +3 -0
- package/node_modules/@protobufjs/utf8/LICENSE +26 -0
- package/node_modules/@protobufjs/utf8/README.md +20 -0
- package/node_modules/@protobufjs/utf8/index.d.ts +24 -0
- package/node_modules/@protobufjs/utf8/index.js +105 -0
- package/node_modules/@protobufjs/utf8/package.json +21 -0
- package/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
- package/node_modules/@protobufjs/utf8/tests/index.js +57 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +16 -0
- package/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/node/assert.d.ts +912 -0
- package/node_modules/@types/node/async_hooks.d.ts +497 -0
- package/node_modules/@types/node/buffer.d.ts +2142 -0
- package/node_modules/@types/node/child_process.d.ts +1355 -0
- package/node_modules/@types/node/cluster.d.ts +414 -0
- package/node_modules/@types/node/console.d.ts +407 -0
- package/node_modules/@types/node/constants.d.ts +18 -0
- package/node_modules/@types/node/crypto.d.ts +3243 -0
- package/node_modules/@types/node/dgram.d.ts +545 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +128 -0
- package/node_modules/@types/node/dns/promises.d.ts +357 -0
- package/node_modules/@types/node/dns.d.ts +643 -0
- package/node_modules/@types/node/domain.d.ts +169 -0
- package/node_modules/@types/node/events.d.ts +623 -0
- package/node_modules/@types/node/fs/promises.d.ts +997 -0
- package/node_modules/@types/node/fs.d.ts +3723 -0
- package/node_modules/@types/node/globals.d.ts +284 -0
- package/node_modules/@types/node/globals.global.d.ts +1 -0
- package/node_modules/@types/node/http.d.ts +1358 -0
- package/node_modules/@types/node/http2.d.ts +2100 -0
- package/node_modules/@types/node/https.d.ts +391 -0
- package/node_modules/@types/node/index.d.ts +132 -0
- package/node_modules/@types/node/inspector.d.ts +2738 -0
- package/node_modules/@types/node/module.d.ts +114 -0
- package/node_modules/@types/node/net.d.ts +783 -0
- package/node_modules/@types/node/os.d.ts +455 -0
- package/node_modules/@types/node/package.json +235 -0
- package/node_modules/@types/node/path.d.ts +172 -0
- package/node_modules/@types/node/perf_hooks.d.ts +555 -0
- package/node_modules/@types/node/process.d.ts +1477 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +131 -0
- package/node_modules/@types/node/readline.d.ts +542 -0
- package/node_modules/@types/node/repl.d.ts +424 -0
- package/node_modules/@types/node/stream/consumers.d.ts +24 -0
- package/node_modules/@types/node/stream/promises.d.ts +42 -0
- package/node_modules/@types/node/stream/web.d.ts +6 -0
- package/node_modules/@types/node/stream.d.ts +1218 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/timers/promises.d.ts +68 -0
- package/node_modules/@types/node/timers.d.ts +94 -0
- package/node_modules/@types/node/tls.d.ts +1019 -0
- package/node_modules/@types/node/trace_events.d.ts +161 -0
- package/node_modules/@types/node/tty.d.ts +206 -0
- package/node_modules/@types/node/url.d.ts +798 -0
- package/node_modules/@types/node/util.d.ts +1564 -0
- package/node_modules/@types/node/v8.d.ts +378 -0
- package/node_modules/@types/node/vm.d.ts +508 -0
- package/node_modules/@types/node/wasi.d.ts +153 -0
- package/node_modules/@types/node/worker_threads.d.ts +649 -0
- package/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/ansi-regex/index.d.ts +37 -0
- package/node_modules/ansi-regex/index.js +10 -0
- package/node_modules/ansi-regex/license +9 -0
- package/node_modules/ansi-regex/package.json +55 -0
- package/node_modules/ansi-regex/readme.md +78 -0
- package/node_modules/ansi-styles/index.d.ts +345 -0
- package/node_modules/ansi-styles/index.js +163 -0
- package/node_modules/ansi-styles/license +9 -0
- package/node_modules/ansi-styles/package.json +56 -0
- package/node_modules/ansi-styles/readme.md +152 -0
- package/node_modules/argparse/LICENSE +254 -0
- package/node_modules/argparse/README.md +84 -0
- package/node_modules/argparse/argparse.js +3707 -0
- package/node_modules/argparse/lib/sub.js +67 -0
- package/node_modules/argparse/lib/textwrap.js +440 -0
- package/node_modules/argparse/package.json +31 -0
- package/node_modules/asn1/Jenkinsfile +65 -0
- package/node_modules/asn1/LICENSE +19 -0
- package/node_modules/asn1/README.md +50 -0
- package/node_modules/asn1/lib/ber/errors.js +13 -0
- package/node_modules/asn1/lib/ber/index.js +27 -0
- package/node_modules/asn1/lib/ber/reader.js +262 -0
- package/node_modules/asn1/lib/ber/types.js +36 -0
- package/node_modules/asn1/lib/ber/writer.js +317 -0
- package/node_modules/asn1/lib/index.js +20 -0
- package/node_modules/asn1/package.json +31 -0
- package/node_modules/b4a/LICENSE +201 -0
- package/node_modules/b4a/README.md +153 -0
- package/node_modules/b4a/browser.js +567 -0
- package/node_modules/b4a/index.js +188 -0
- package/node_modules/b4a/lib/ascii.js +31 -0
- package/node_modules/b4a/lib/base64.js +65 -0
- package/node_modules/b4a/lib/hex.js +51 -0
- package/node_modules/b4a/lib/latin1.js +31 -0
- package/node_modules/b4a/lib/utf16le.js +40 -0
- package/node_modules/b4a/lib/utf8.js +141 -0
- package/node_modules/b4a/package.json +49 -0
- package/node_modules/b4a/react-native.js +5 -0
- package/node_modules/bare-events/LICENSE +201 -0
- package/node_modules/bare-events/README.md +25 -0
- package/node_modules/bare-events/global.d.ts +15 -0
- package/node_modules/bare-events/global.js +5 -0
- package/node_modules/bare-events/index.d.ts +81 -0
- package/node_modules/bare-events/index.js +367 -0
- package/node_modules/bare-events/lib/errors.js +26 -0
- package/node_modules/bare-events/package.json +61 -0
- package/node_modules/bare-events/web.d.ts +79 -0
- package/node_modules/bare-events/web.js +335 -0
- package/node_modules/bare-fs/CMakeLists.txt +13 -0
- package/node_modules/bare-fs/LICENSE +201 -0
- package/node_modules/bare-fs/README.md +989 -0
- package/node_modules/bare-fs/binding.c +2889 -0
- package/node_modules/bare-fs/binding.js +1 -0
- package/node_modules/bare-fs/index.d.ts +1223 -0
- package/node_modules/bare-fs/index.js +2842 -0
- package/node_modules/bare-fs/lib/constants.d.ts +49 -0
- package/node_modules/bare-fs/lib/constants.js +49 -0
- package/node_modules/bare-fs/lib/errors.d.ts +11 -0
- package/node_modules/bare-fs/lib/errors.js +55 -0
- package/node_modules/bare-fs/package.json +74 -0
- package/node_modules/bare-fs/prebuilds/android-arm/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-ia32/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/android-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/darwin-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-arm64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/ios-x64-simulator/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/linux-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-arm64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/prebuilds/win32-x64/bare-fs.bare +0 -0
- package/node_modules/bare-fs/promises.d.ts +310 -0
- package/node_modules/bare-fs/promises.js +119 -0
- package/node_modules/bare-os/CMakeLists.txt +13 -0
- package/node_modules/bare-os/LICENSE +201 -0
- package/node_modules/bare-os/README.md +11 -0
- package/node_modules/bare-os/binding.c +1427 -0
- package/node_modules/bare-os/binding.js +1 -0
- package/node_modules/bare-os/index.d.ts +143 -0
- package/node_modules/bare-os/index.js +129 -0
- package/node_modules/bare-os/lib/constants.js +7 -0
- package/node_modules/bare-os/lib/errors.js +22 -0
- package/node_modules/bare-os/package.json +49 -0
- package/node_modules/bare-os/prebuilds/android-arm/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-ia32/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/android-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/darwin-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/darwin-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-arm64-simulator/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/ios-x64-simulator/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/linux-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/linux-x64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/win32-arm64/bare-os.bare +0 -0
- package/node_modules/bare-os/prebuilds/win32-x64/bare-os.bare +0 -0
- package/node_modules/bare-path/LICENSE +201 -0
- package/node_modules/bare-path/NOTICE +28 -0
- package/node_modules/bare-path/README.md +19 -0
- package/node_modules/bare-path/index.js +11 -0
- package/node_modules/bare-path/lib/constants.js +11 -0
- package/node_modules/bare-path/lib/posix.js +242 -0
- package/node_modules/bare-path/lib/shared.js +67 -0
- package/node_modules/bare-path/lib/win32.js +513 -0
- package/node_modules/bare-path/package.json +36 -0
- package/node_modules/bare-stream/LICENSE +201 -0
- package/node_modules/bare-stream/README.md +15 -0
- package/node_modules/bare-stream/global.js +12 -0
- package/node_modules/bare-stream/index.d.ts +235 -0
- package/node_modules/bare-stream/index.js +492 -0
- package/node_modules/bare-stream/package.json +70 -0
- package/node_modules/bare-stream/promises.js +3 -0
- package/node_modules/bare-stream/web.d.ts +152 -0
- package/node_modules/bare-stream/web.js +607 -0
- package/node_modules/bare-url/CMakeLists.txt +27 -0
- package/node_modules/bare-url/LICENSE +201 -0
- package/node_modules/bare-url/README.md +19 -0
- package/node_modules/bare-url/binding.c +186 -0
- package/node_modules/bare-url/binding.js +1 -0
- package/node_modules/bare-url/global.d.ts +12 -0
- package/node_modules/bare-url/global.js +2 -0
- package/node_modules/bare-url/index.d.ts +41 -0
- package/node_modules/bare-url/index.js +407 -0
- package/node_modules/bare-url/lib/errors.d.ts +10 -0
- package/node_modules/bare-url/lib/errors.js +33 -0
- package/node_modules/bare-url/lib/url-search-params.d.ts +23 -0
- package/node_modules/bare-url/lib/url-search-params.js +194 -0
- package/node_modules/bare-url/package.json +54 -0
- package/node_modules/bare-url/prebuilds/android-arm/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-ia32/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/android-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/darwin-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-arm64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/ios-x64-simulator/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/linux-x64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-arm64/bare-url.bare +0 -0
- package/node_modules/bare-url/prebuilds/win32-x64/bare-url.bare +0 -0
- package/node_modules/base64-js/LICENSE +21 -0
- package/node_modules/base64-js/README.md +34 -0
- package/node_modules/base64-js/base64js.min.js +1 -0
- package/node_modules/base64-js/index.d.ts +3 -0
- package/node_modules/base64-js/index.js +150 -0
- package/node_modules/base64-js/package.json +47 -0
- package/node_modules/bcrypt-pbkdf/CONTRIBUTING.md +13 -0
- package/node_modules/bcrypt-pbkdf/LICENSE +66 -0
- package/node_modules/bcrypt-pbkdf/README.md +45 -0
- package/node_modules/bcrypt-pbkdf/index.js +556 -0
- package/node_modules/bcrypt-pbkdf/package.json +15 -0
- package/node_modules/bl/.travis.yml +17 -0
- package/node_modules/bl/BufferList.js +396 -0
- package/node_modules/bl/LICENSE.md +13 -0
- package/node_modules/bl/README.md +247 -0
- package/node_modules/bl/bl.js +84 -0
- package/node_modules/bl/package.json +37 -0
- package/node_modules/bl/test/convert.js +21 -0
- package/node_modules/bl/test/indexOf.js +492 -0
- package/node_modules/bl/test/isBufferList.js +32 -0
- package/node_modules/bl/test/test.js +869 -0
- package/node_modules/buffer/AUTHORS.md +70 -0
- package/node_modules/buffer/LICENSE +21 -0
- package/node_modules/buffer/README.md +410 -0
- package/node_modules/buffer/index.d.ts +186 -0
- package/node_modules/buffer/index.js +1817 -0
- package/node_modules/buffer/package.json +96 -0
- package/node_modules/buildcheck/.eslintrc.js +5 -0
- package/node_modules/buildcheck/.github/workflows/ci.yml +88 -0
- package/node_modules/buildcheck/.github/workflows/lint.yml +27 -0
- package/node_modules/buildcheck/.gitignore +3 -0
- package/node_modules/buildcheck/LICENSE +19 -0
- package/node_modules/buildcheck/README.md +106 -0
- package/node_modules/buildcheck/deps/Find-VisualStudio.cs +250 -0
- package/node_modules/buildcheck/lib/findvs.js +361 -0
- package/node_modules/buildcheck/lib/index.js +738 -0
- package/node_modules/buildcheck/package.json +36 -0
- package/node_modules/buildcheck/test/test.js +8 -0
- package/node_modules/chownr/LICENSE +15 -0
- package/node_modules/chownr/README.md +3 -0
- package/node_modules/chownr/chownr.js +167 -0
- package/node_modules/chownr/package.json +29 -0
- package/node_modules/cliui/LICENSE.txt +14 -0
- package/node_modules/cliui/README.md +141 -0
- package/node_modules/cliui/build/index.cjs +302 -0
- package/node_modules/cliui/build/index.d.cts +43 -0
- package/node_modules/cliui/build/lib/index.js +287 -0
- package/node_modules/cliui/build/lib/string-utils.js +27 -0
- package/node_modules/cliui/index.mjs +13 -0
- package/node_modules/cliui/package.json +83 -0
- package/node_modules/color-convert/LICENSE +21 -0
- package/node_modules/color-convert/README.md +68 -0
- package/node_modules/color-convert/conversions.js +839 -0
- package/node_modules/color-convert/index.js +81 -0
- package/node_modules/color-convert/package.json +48 -0
- package/node_modules/color-convert/route.js +97 -0
- package/node_modules/color-name/LICENSE +8 -0
- package/node_modules/color-name/README.md +11 -0
- package/node_modules/color-name/index.js +152 -0
- package/node_modules/color-name/package.json +28 -0
- package/node_modules/cpu-features/.eslintrc.js +5 -0
- package/node_modules/cpu-features/.github/workflows/ci.yml +74 -0
- package/node_modules/cpu-features/.github/workflows/lint.yml +27 -0
- package/node_modules/cpu-features/LICENSE +19 -0
- package/node_modules/cpu-features/README.md +59 -0
- package/node_modules/cpu-features/binding.gyp +16 -0
- package/node_modules/cpu-features/build/Makefile +352 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/cpu_features.a.d +1 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/cpufeatures.node.d +1 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o.d +8 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o.d +12 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o.d +26 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o.d +6 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o.d +12 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o.d +11 -0
- package/node_modules/cpu-features/build/Release/.deps/Release/obj.target/cpufeatures/src/binding.o.d +183 -0
- package/node_modules/cpu-features/build/Release/cpu_features.a +0 -0
- package/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_windows.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o +0 -0
- package/node_modules/cpu-features/build/Release/obj.target/cpufeatures/src/binding.o +0 -0
- package/node_modules/cpu-features/build/binding.Makefile +6 -0
- package/node_modules/cpu-features/build/config.gypi +512 -0
- package/node_modules/cpu-features/build/cpufeatures.target.mk +192 -0
- package/node_modules/cpu-features/build/deps/cpu_features/cpu_features.Makefile +6 -0
- package/node_modules/cpu-features/build/deps/cpu_features/cpu_features.target.mk +204 -0
- package/node_modules/cpu-features/build/gyp-mac-tool +766 -0
- package/node_modules/cpu-features/buildcheck.gypi +17 -0
- package/node_modules/cpu-features/buildcheck.js +32 -0
- package/node_modules/cpu-features/deps/cpu_features/.clang-format +4 -0
- package/node_modules/cpu-features/deps/cpu_features/.dockerignore +31 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/Dockerfile +5 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/aarch64_linux_cmake.yml +30 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_freebsd_cmake.yml +22 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_bazel.yml +26 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_linux_cmake.yml +31 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_macos_cmake.yml +43 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/amd64_windows_cmake.yml +25 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/arm_linux_cmake.yml +31 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/clang_format.yml +24 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/mips_linux_cmake.yml +30 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/power_linux_cmake.yml +29 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/riscv_linux_cmake.yml +28 -0
- package/node_modules/cpu-features/deps/cpu_features/.github/workflows/s390x_linux_cmake.yml +27 -0
- package/node_modules/cpu-features/deps/cpu_features/.grenrc.yml +21 -0
- package/node_modules/cpu-features/deps/cpu_features/BUILD.bazel +329 -0
- package/node_modules/cpu-features/deps/cpu_features/CMakeLists.txt +261 -0
- package/node_modules/cpu-features/deps/cpu_features/CONTRIBUTING.md +23 -0
- package/node_modules/cpu-features/deps/cpu_features/LICENSE +230 -0
- package/node_modules/cpu-features/deps/cpu_features/README.md +272 -0
- package/node_modules/cpu-features/deps/cpu_features/WORKSPACE +19 -0
- package/node_modules/cpu-features/deps/cpu_features/bazel/ci/README.md +5 -0
- package/node_modules/cpu-features/deps/cpu_features/bazel/platforms.bzl +11 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesConfig.cmake.in +3 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/CpuFeaturesNdkCompatConfig.cmake.in +3 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/README.md +30 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/Makefile +252 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/README.md +40 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.dot +64 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/docker.svg +312 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/doc/generate_image.sh +7 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/amd64/Dockerfile +48 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/docker/toolchain/Dockerfile +34 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/CMakeLists.txt +22 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/sample/main.cpp +11 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/ci/vagrant/freebsd/Vagrantfile +107 -0
- package/node_modules/cpu-features/deps/cpu_features/cmake/googletest.CMakeLists.txt.in +15 -0
- package/node_modules/cpu-features/deps/cpu_features/cpu_features.gyp +105 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_cache_info.h +54 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpu_features_macros.h +384 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_aarch64.h +259 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_arm.h +121 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_mips.h +74 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_ppc.h +149 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_riscv.h +72 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_s390x.h +108 -0
- package/node_modules/cpu-features/deps/cpu_features/include/cpuinfo_x86.h +288 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/bit_utils.h +40 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/cpuid_x86.h +37 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/filesystem.h +39 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/hwcaps.h +240 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/stack_line_reader.h +49 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/string_view.h +110 -0
- package/node_modules/cpu-features/deps/cpu_features/include/internal/windows_utils.h +70 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/CMakeLists.txt +60 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/README.md +4 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.c +205 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/cpu-features.h +320 -0
- package/node_modules/cpu-features/deps/cpu_features/ndk_compat/ndk-compat-test.c +12 -0
- package/node_modules/cpu-features/deps/cpu_features/patches/0001-Add-Apple-Silicon-Support.patch +456 -0
- package/node_modules/cpu-features/deps/cpu_features/scripts/generate_badges.d +165 -0
- package/node_modules/cpu-features/deps/cpu_features/scripts/make_release.sh +75 -0
- package/node_modules/cpu-features/deps/cpu_features/scripts/run_integration.sh +490 -0
- package/node_modules/cpu-features/deps/cpu_features/scripts/test_integration.sh +79 -0
- package/node_modules/cpu-features/deps/cpu_features/src/copy.inl +19 -0
- package/node_modules/cpu-features/deps/cpu_features/src/define_introspection.inl +86 -0
- package/node_modules/cpu-features/deps/cpu_features/src/define_introspection_and_hwcaps.inl +26 -0
- package/node_modules/cpu-features/deps/cpu_features/src/equals.inl +22 -0
- package/node_modules/cpu-features/deps/cpu_features/src/filesystem.c +62 -0
- package/node_modules/cpu-features/deps/cpu_features/src/hwcaps.c +169 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64__base_implementation.inl +88 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_linux_or_android.c +79 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.c +82 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_aarch64_windows.c +138 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_arm_linux_or_android.c +212 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_mips_linux_or_android.c +93 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_ppc_linux.c +163 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_riscv_linux.c +111 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_s390x_linux.c +120 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86__base_implementation.inl +2055 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_freebsd.c +68 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_linux_or_android.c +58 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_macos.c +57 -0
- package/node_modules/cpu-features/deps/cpu_features/src/impl_x86_windows.c +58 -0
- package/node_modules/cpu-features/deps/cpu_features/src/stack_line_reader.c +132 -0
- package/node_modules/cpu-features/deps/cpu_features/src/string_view.c +192 -0
- package/node_modules/cpu-features/deps/cpu_features/src/utils/list_cpu_features.c +461 -0
- package/node_modules/cpu-features/deps/cpu_features/test/CMakeLists.txt +114 -0
- package/node_modules/cpu-features/deps/cpu_features/test/bit_utils_test.cc +53 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_aarch64_test.cc +396 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_arm_test.cc +384 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_mips_test.cc +176 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_ppc_test.cc +131 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_riscv_test.cc +180 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_s390x_test.cc +82 -0
- package/node_modules/cpu-features/deps/cpu_features/test/cpuinfo_x86_test.cc +1729 -0
- package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.cc +103 -0
- package/node_modules/cpu-features/deps/cpu_features/test/filesystem_for_testing.h +61 -0
- package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.cc +52 -0
- package/node_modules/cpu-features/deps/cpu_features/test/hwcaps_for_testing.h +31 -0
- package/node_modules/cpu-features/deps/cpu_features/test/stack_line_reader_test.cc +132 -0
- package/node_modules/cpu-features/deps/cpu_features/test/string_view_test.cc +202 -0
- package/node_modules/cpu-features/lib/index.js +5 -0
- package/node_modules/cpu-features/package.json +40 -0
- package/node_modules/cpu-features/src/binding.cc +151 -0
- package/node_modules/cpu-features/test/test.js +12 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/docker-modem/.eslintrc +35 -0
- package/node_modules/docker-modem/.github/FUNDING.yml +1 -0
- package/node_modules/docker-modem/.github/workflows/main.yml +63 -0
- package/node_modules/docker-modem/.travis.yml +36 -0
- package/node_modules/docker-modem/.vscode/launch.json +22 -0
- package/node_modules/docker-modem/LICENSE +201 -0
- package/node_modules/docker-modem/README.md +64 -0
- package/node_modules/docker-modem/lib/http.js +87 -0
- package/node_modules/docker-modem/lib/http_duplex.js +55 -0
- package/node_modules/docker-modem/lib/modem.js +577 -0
- package/node_modules/docker-modem/lib/ssh.js +48 -0
- package/node_modules/docker-modem/lib/utils.js +24 -0
- package/node_modules/docker-modem/package.json +32 -0
- package/node_modules/docker-modem/test/modem_test.js +248 -0
- package/node_modules/dockerode/.claude/settings.local.json +8 -0
- package/node_modules/dockerode/.eslintignore +2 -0
- package/node_modules/dockerode/.eslintrc +35 -0
- package/node_modules/dockerode/.github/FUNDING.yml +1 -0
- package/node_modules/dockerode/.github/stale.yml +20 -0
- package/node_modules/dockerode/.github/workflows/main.yml +35 -0
- package/node_modules/dockerode/.travis.yml +24 -0
- package/node_modules/dockerode/.vscode/launch.json +25 -0
- package/node_modules/dockerode/LICENSE +201 -0
- package/node_modules/dockerode/README.md +530 -0
- package/node_modules/dockerode/lib/buildkit.js +242 -0
- package/node_modules/dockerode/lib/config.js +135 -0
- package/node_modules/dockerode/lib/container.js +1085 -0
- package/node_modules/dockerode/lib/docker.js +1903 -0
- package/node_modules/dockerode/lib/exec.js +139 -0
- package/node_modules/dockerode/lib/image.js +279 -0
- package/node_modules/dockerode/lib/network.js +171 -0
- package/node_modules/dockerode/lib/node.js +135 -0
- package/node_modules/dockerode/lib/plugin.js +372 -0
- package/node_modules/dockerode/lib/proto/auth.proto +54 -0
- package/node_modules/dockerode/lib/proto/buildkit_status.proto +81 -0
- package/node_modules/dockerode/lib/secret.js +134 -0
- package/node_modules/dockerode/lib/service.js +183 -0
- package/node_modules/dockerode/lib/session.js +63 -0
- package/node_modules/dockerode/lib/task.js +97 -0
- package/node_modules/dockerode/lib/util.js +106 -0
- package/node_modules/dockerode/lib/volume.js +90 -0
- package/node_modules/dockerode/package.json +40 -0
- package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/node_modules/emoji-regex/README.md +73 -0
- package/node_modules/emoji-regex/es2015/index.js +6 -0
- package/node_modules/emoji-regex/es2015/text.js +6 -0
- package/node_modules/emoji-regex/index.d.ts +23 -0
- package/node_modules/emoji-regex/index.js +6 -0
- package/node_modules/emoji-regex/package.json +50 -0
- package/node_modules/emoji-regex/text.js +6 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +96 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/escalade/dist/index.js +22 -0
- package/node_modules/escalade/dist/index.mjs +22 -0
- package/node_modules/escalade/index.d.mts +11 -0
- package/node_modules/escalade/index.d.ts +15 -0
- package/node_modules/escalade/license +9 -0
- package/node_modules/escalade/package.json +74 -0
- package/node_modules/escalade/readme.md +211 -0
- package/node_modules/escalade/sync/index.d.mts +9 -0
- package/node_modules/escalade/sync/index.d.ts +13 -0
- package/node_modules/escalade/sync/index.js +18 -0
- package/node_modules/escalade/sync/index.mjs +18 -0
- package/node_modules/events-universal/LICENSE +201 -0
- package/node_modules/events-universal/README.md +17 -0
- package/node_modules/events-universal/bare.js +1 -0
- package/node_modules/events-universal/default.js +1 -0
- package/node_modules/events-universal/index.js +1 -0
- package/node_modules/events-universal/package.json +39 -0
- package/node_modules/events-universal/react-native.js +1 -0
- package/node_modules/fast-fifo/LICENSE +21 -0
- package/node_modules/fast-fifo/README.md +78 -0
- package/node_modules/fast-fifo/fixed-size.js +39 -0
- package/node_modules/fast-fifo/index.js +48 -0
- package/node_modules/fast-fifo/package.json +28 -0
- package/node_modules/fs-constants/LICENSE +21 -0
- package/node_modules/fs-constants/README.md +26 -0
- package/node_modules/fs-constants/browser.js +1 -0
- package/node_modules/fs-constants/index.js +1 -0
- package/node_modules/fs-constants/package.json +19 -0
- package/node_modules/fs-extra/LICENSE +15 -0
- package/node_modules/fs-extra/README.md +294 -0
- package/node_modules/fs-extra/lib/copy/copy-sync.js +176 -0
- package/node_modules/fs-extra/lib/copy/copy.js +180 -0
- package/node_modules/fs-extra/lib/copy/index.js +7 -0
- package/node_modules/fs-extra/lib/empty/index.js +39 -0
- package/node_modules/fs-extra/lib/ensure/file.js +66 -0
- package/node_modules/fs-extra/lib/ensure/index.js +23 -0
- package/node_modules/fs-extra/lib/ensure/link.js +64 -0
- package/node_modules/fs-extra/lib/ensure/symlink-paths.js +101 -0
- package/node_modules/fs-extra/lib/ensure/symlink-type.js +34 -0
- package/node_modules/fs-extra/lib/ensure/symlink.js +92 -0
- package/node_modules/fs-extra/lib/esm.mjs +68 -0
- package/node_modules/fs-extra/lib/fs/index.js +146 -0
- package/node_modules/fs-extra/lib/index.js +16 -0
- package/node_modules/fs-extra/lib/json/index.js +16 -0
- package/node_modules/fs-extra/lib/json/jsonfile.js +11 -0
- package/node_modules/fs-extra/lib/json/output-json-sync.js +12 -0
- package/node_modules/fs-extra/lib/json/output-json.js +12 -0
- package/node_modules/fs-extra/lib/mkdirs/index.js +14 -0
- package/node_modules/fs-extra/lib/mkdirs/make-dir.js +27 -0
- package/node_modules/fs-extra/lib/mkdirs/utils.js +21 -0
- package/node_modules/fs-extra/lib/move/index.js +7 -0
- package/node_modules/fs-extra/lib/move/move-sync.js +55 -0
- package/node_modules/fs-extra/lib/move/move.js +59 -0
- package/node_modules/fs-extra/lib/output-file/index.js +31 -0
- package/node_modules/fs-extra/lib/path-exists/index.js +12 -0
- package/node_modules/fs-extra/lib/remove/index.js +17 -0
- package/node_modules/fs-extra/lib/util/async.js +29 -0
- package/node_modules/fs-extra/lib/util/stat.js +159 -0
- package/node_modules/fs-extra/lib/util/utimes.js +36 -0
- package/node_modules/fs-extra/package.json +71 -0
- package/node_modules/get-caller-file/LICENSE.md +6 -0
- package/node_modules/get-caller-file/README.md +41 -0
- package/node_modules/get-caller-file/index.d.ts +2 -0
- package/node_modules/get-caller-file/index.js +22 -0
- package/node_modules/get-caller-file/index.js.map +1 -0
- package/node_modules/get-caller-file/package.json +42 -0
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/README.md +143 -0
- package/node_modules/graceful-fs/clone.js +23 -0
- package/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/graceful-fs/package.json +53 -0
- package/node_modules/graceful-fs/polyfills.js +355 -0
- package/node_modules/ieee754/LICENSE +11 -0
- package/node_modules/ieee754/README.md +51 -0
- package/node_modules/ieee754/index.d.ts +10 -0
- package/node_modules/ieee754/index.js +85 -0
- package/node_modules/ieee754/package.json +52 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/node_modules/is-fullwidth-code-point/index.js +50 -0
- package/node_modules/is-fullwidth-code-point/license +9 -0
- package/node_modules/is-fullwidth-code-point/package.json +42 -0
- package/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/node_modules/js-yaml/LICENSE +21 -0
- package/node_modules/js-yaml/README.md +247 -0
- package/node_modules/js-yaml/bin/js-yaml.js +126 -0
- package/node_modules/js-yaml/dist/js-yaml.js +3880 -0
- package/node_modules/js-yaml/dist/js-yaml.min.js +2 -0
- package/node_modules/js-yaml/dist/js-yaml.mjs +3856 -0
- package/node_modules/js-yaml/index.js +47 -0
- package/node_modules/js-yaml/lib/common.js +59 -0
- package/node_modules/js-yaml/lib/dumper.js +965 -0
- package/node_modules/js-yaml/lib/exception.js +55 -0
- package/node_modules/js-yaml/lib/loader.js +1733 -0
- package/node_modules/js-yaml/lib/schema/core.js +11 -0
- package/node_modules/js-yaml/lib/schema/default.js +22 -0
- package/node_modules/js-yaml/lib/schema/failsafe.js +17 -0
- package/node_modules/js-yaml/lib/schema/json.js +19 -0
- package/node_modules/js-yaml/lib/schema.js +121 -0
- package/node_modules/js-yaml/lib/snippet.js +101 -0
- package/node_modules/js-yaml/lib/type/binary.js +125 -0
- package/node_modules/js-yaml/lib/type/bool.js +35 -0
- package/node_modules/js-yaml/lib/type/float.js +97 -0
- package/node_modules/js-yaml/lib/type/int.js +156 -0
- package/node_modules/js-yaml/lib/type/map.js +8 -0
- package/node_modules/js-yaml/lib/type/merge.js +12 -0
- package/node_modules/js-yaml/lib/type/null.js +35 -0
- package/node_modules/js-yaml/lib/type/omap.js +44 -0
- package/node_modules/js-yaml/lib/type/pairs.js +53 -0
- package/node_modules/js-yaml/lib/type/seq.js +8 -0
- package/node_modules/js-yaml/lib/type/set.js +29 -0
- package/node_modules/js-yaml/lib/type/str.js +8 -0
- package/node_modules/js-yaml/lib/type/timestamp.js +88 -0
- package/node_modules/js-yaml/lib/type.js +66 -0
- package/node_modules/js-yaml/package.json +66 -0
- package/node_modules/jsonfile/LICENSE +15 -0
- package/node_modules/jsonfile/README.md +230 -0
- package/node_modules/jsonfile/index.js +88 -0
- package/node_modules/jsonfile/package.json +40 -0
- package/node_modules/jsonfile/utils.js +14 -0
- package/node_modules/lodash.camelcase/LICENSE +47 -0
- package/node_modules/lodash.camelcase/README.md +18 -0
- package/node_modules/lodash.camelcase/index.js +599 -0
- package/node_modules/lodash.camelcase/package.json +17 -0
- package/node_modules/long/LICENSE +202 -0
- package/node_modules/long/README.md +286 -0
- package/node_modules/long/index.d.ts +2 -0
- package/node_modules/long/index.js +1581 -0
- package/node_modules/long/package.json +58 -0
- package/node_modules/long/types.d.ts +474 -0
- package/node_modules/long/umd/index.d.ts +3 -0
- package/node_modules/long/umd/index.js +1622 -0
- package/node_modules/long/umd/package.json +3 -0
- package/node_modules/long/umd/types.d.ts +474 -0
- package/node_modules/mkdirp-classic/LICENSE +21 -0
- package/node_modules/mkdirp-classic/README.md +18 -0
- package/node_modules/mkdirp-classic/index.js +98 -0
- package/node_modules/mkdirp-classic/package.json +18 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/nan/.github/workflows/ci.yml +52 -0
- package/node_modules/nan/.pre-commit-config.yaml +8 -0
- package/node_modules/nan/CHANGELOG.md +599 -0
- package/node_modules/nan/CMakeLists.txt +138 -0
- package/node_modules/nan/LICENSE.md +9 -0
- package/node_modules/nan/README.md +456 -0
- package/node_modules/nan/doc/asyncworker.md +146 -0
- package/node_modules/nan/doc/buffers.md +54 -0
- package/node_modules/nan/doc/callback.md +76 -0
- package/node_modules/nan/doc/converters.md +41 -0
- package/node_modules/nan/doc/errors.md +226 -0
- package/node_modules/nan/doc/json.md +62 -0
- package/node_modules/nan/doc/maybe_types.md +583 -0
- package/node_modules/nan/doc/methods.md +689 -0
- package/node_modules/nan/doc/new.md +147 -0
- package/node_modules/nan/doc/node_misc.md +123 -0
- package/node_modules/nan/doc/object_wrappers.md +263 -0
- package/node_modules/nan/doc/persistent.md +296 -0
- package/node_modules/nan/doc/scopes.md +73 -0
- package/node_modules/nan/doc/script.md +58 -0
- package/node_modules/nan/doc/string_bytes.md +81 -0
- package/node_modules/nan/doc/v8_internals.md +199 -0
- package/node_modules/nan/doc/v8_misc.md +85 -0
- package/node_modules/nan/include_dirs.js +1 -0
- package/node_modules/nan/nan.h +3202 -0
- package/node_modules/nan/nan_callbacks.h +141 -0
- package/node_modules/nan/nan_callbacks_12_inl.h +690 -0
- package/node_modules/nan/nan_callbacks_pre_12_inl.h +524 -0
- package/node_modules/nan/nan_converters.h +72 -0
- package/node_modules/nan/nan_converters_43_inl.h +68 -0
- package/node_modules/nan/nan_converters_pre_43_inl.h +42 -0
- package/node_modules/nan/nan_define_own_property_helper.h +29 -0
- package/node_modules/nan/nan_implementation_12_inl.h +430 -0
- package/node_modules/nan/nan_implementation_pre_12_inl.h +263 -0
- package/node_modules/nan/nan_json.h +166 -0
- package/node_modules/nan/nan_maybe_43_inl.h +360 -0
- package/node_modules/nan/nan_maybe_pre_43_inl.h +268 -0
- package/node_modules/nan/nan_new.h +340 -0
- package/node_modules/nan/nan_object_wrap.h +156 -0
- package/node_modules/nan/nan_persistent_12_inl.h +132 -0
- package/node_modules/nan/nan_persistent_pre_12_inl.h +242 -0
- package/node_modules/nan/nan_private.h +73 -0
- package/node_modules/nan/nan_scriptorigin.h +97 -0
- package/node_modules/nan/nan_string_bytes.h +305 -0
- package/node_modules/nan/nan_typedarray_contents.h +96 -0
- package/node_modules/nan/nan_weak.h +453 -0
- package/node_modules/nan/package.json +38 -0
- package/node_modules/nan/tools/1to2.js +412 -0
- package/node_modules/nan/tools/README.md +14 -0
- package/node_modules/nan/tools/package.json +19 -0
- package/node_modules/once/LICENSE +15 -0
- package/node_modules/once/README.md +79 -0
- package/node_modules/once/once.js +42 -0
- package/node_modules/once/package.json +33 -0
- package/node_modules/protobufjs/LICENSE +39 -0
- package/node_modules/protobufjs/README.md +727 -0
- package/node_modules/protobufjs/dist/light/protobuf.js +7839 -0
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/light/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2736 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/dist/protobuf.js +9643 -0
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -0
- package/node_modules/protobufjs/dist/protobuf.min.js +8 -0
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -0
- package/node_modules/protobufjs/ext/debug/README.md +4 -0
- package/node_modules/protobufjs/ext/debug/index.js +71 -0
- package/node_modules/protobufjs/ext/descriptor/README.md +72 -0
- package/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -0
- package/node_modules/protobufjs/ext/descriptor/index.js +1162 -0
- package/node_modules/protobufjs/ext/descriptor/test.js +54 -0
- package/node_modules/protobufjs/google/LICENSE +27 -0
- package/node_modules/protobufjs/google/README.md +1 -0
- package/node_modules/protobufjs/google/api/annotations.json +83 -0
- package/node_modules/protobufjs/google/api/annotations.proto +11 -0
- package/node_modules/protobufjs/google/api/http.json +86 -0
- package/node_modules/protobufjs/google/api/http.proto +31 -0
- package/node_modules/protobufjs/google/protobuf/api.json +118 -0
- package/node_modules/protobufjs/google/protobuf/api.proto +34 -0
- package/node_modules/protobufjs/google/protobuf/descriptor.json +1382 -0
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +535 -0
- package/node_modules/protobufjs/google/protobuf/source_context.json +20 -0
- package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -0
- package/node_modules/protobufjs/google/protobuf/type.json +202 -0
- package/node_modules/protobufjs/google/protobuf/type.proto +89 -0
- package/node_modules/protobufjs/index.d.ts +2799 -0
- package/node_modules/protobufjs/index.js +4 -0
- package/node_modules/protobufjs/light.d.ts +2 -0
- package/node_modules/protobufjs/light.js +4 -0
- package/node_modules/protobufjs/minimal.d.ts +2 -0
- package/node_modules/protobufjs/minimal.js +4 -0
- package/node_modules/protobufjs/package.json +114 -0
- package/node_modules/protobufjs/scripts/postinstall.js +32 -0
- package/node_modules/protobufjs/src/common.js +399 -0
- package/node_modules/protobufjs/src/converter.js +301 -0
- package/node_modules/protobufjs/src/decoder.js +127 -0
- package/node_modules/protobufjs/src/encoder.js +100 -0
- package/node_modules/protobufjs/src/enum.js +223 -0
- package/node_modules/protobufjs/src/field.js +453 -0
- package/node_modules/protobufjs/src/index-light.js +104 -0
- package/node_modules/protobufjs/src/index-minimal.js +36 -0
- package/node_modules/protobufjs/src/index.js +12 -0
- package/node_modules/protobufjs/src/mapfield.js +126 -0
- package/node_modules/protobufjs/src/message.js +143 -0
- package/node_modules/protobufjs/src/method.js +160 -0
- package/node_modules/protobufjs/src/namespace.js +546 -0
- package/node_modules/protobufjs/src/object.js +378 -0
- package/node_modules/protobufjs/src/oneof.js +222 -0
- package/node_modules/protobufjs/src/parse.js +969 -0
- package/node_modules/protobufjs/src/reader.js +416 -0
- package/node_modules/protobufjs/src/reader_buffer.js +51 -0
- package/node_modules/protobufjs/src/root.js +404 -0
- package/node_modules/protobufjs/src/roots.js +18 -0
- package/node_modules/protobufjs/src/rpc/service.js +142 -0
- package/node_modules/protobufjs/src/rpc.js +36 -0
- package/node_modules/protobufjs/src/service.js +189 -0
- package/node_modules/protobufjs/src/tokenize.js +416 -0
- package/node_modules/protobufjs/src/type.js +615 -0
- package/node_modules/protobufjs/src/types.js +196 -0
- package/node_modules/protobufjs/src/typescript.jsdoc +15 -0
- package/node_modules/protobufjs/src/util/longbits.js +200 -0
- package/node_modules/protobufjs/src/util/minimal.js +438 -0
- package/node_modules/protobufjs/src/util.js +215 -0
- package/node_modules/protobufjs/src/verifier.js +177 -0
- package/node_modules/protobufjs/src/wrappers.js +102 -0
- package/node_modules/protobufjs/src/writer.js +465 -0
- package/node_modules/protobufjs/src/writer_buffer.js +85 -0
- package/node_modules/protobufjs/tsconfig.json +8 -0
- package/node_modules/pump/.github/FUNDING.yml +2 -0
- package/node_modules/pump/.travis.yml +5 -0
- package/node_modules/pump/LICENSE +21 -0
- package/node_modules/pump/README.md +74 -0
- package/node_modules/pump/SECURITY.md +5 -0
- package/node_modules/pump/empty.js +1 -0
- package/node_modules/pump/index.js +86 -0
- package/node_modules/pump/package.json +30 -0
- package/node_modules/pump/test-browser.js +66 -0
- package/node_modules/pump/test-node.js +53 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +106 -0
- package/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +68 -0
- package/node_modules/readable-stream/readable-browser.js +9 -0
- package/node_modules/readable-stream/readable.js +16 -0
- package/node_modules/require-directory/.jshintrc +67 -0
- package/node_modules/require-directory/.npmignore +1 -0
- package/node_modules/require-directory/.travis.yml +3 -0
- package/node_modules/require-directory/LICENSE +22 -0
- package/node_modules/require-directory/README.markdown +184 -0
- package/node_modules/require-directory/index.js +86 -0
- package/node_modules/require-directory/package.json +40 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/skillgrade/LICENSE +21 -0
- package/node_modules/skillgrade/README.md +253 -0
- package/node_modules/skillgrade/bin/skillgrade.js +2 -0
- package/node_modules/skillgrade/dist/agents/claude.d.ts +5 -0
- package/node_modules/skillgrade/dist/agents/claude.js +19 -0
- package/node_modules/skillgrade/dist/agents/codex.d.ts +5 -0
- package/node_modules/skillgrade/dist/agents/codex.js +19 -0
- package/node_modules/skillgrade/dist/agents/gemini.d.ts +5 -0
- package/node_modules/skillgrade/dist/agents/gemini.js +19 -0
- package/node_modules/skillgrade/dist/agents/registry.d.ts +14 -0
- package/node_modules/skillgrade/dist/agents/registry.js +27 -0
- package/node_modules/skillgrade/dist/analytics/engine.d.ts +19 -0
- package/node_modules/skillgrade/dist/analytics/engine.js +105 -0
- package/node_modules/skillgrade/dist/commands/init.d.ts +4 -0
- package/node_modules/skillgrade/dist/commands/init.js +335 -0
- package/node_modules/skillgrade/dist/commands/preview.d.ts +2 -0
- package/node_modules/skillgrade/dist/commands/preview.js +56 -0
- package/node_modules/skillgrade/dist/commands/run.d.ts +16 -0
- package/node_modules/skillgrade/dist/commands/run.js +302 -0
- package/node_modules/skillgrade/dist/core/config.d.ts +10 -0
- package/node_modules/skillgrade/dist/core/config.js +213 -0
- package/node_modules/skillgrade/dist/core/config.types.d.ts +88 -0
- package/node_modules/skillgrade/dist/core/config.types.js +9 -0
- package/node_modules/skillgrade/dist/core/skills.d.ts +15 -0
- package/node_modules/skillgrade/dist/core/skills.js +103 -0
- package/node_modules/skillgrade/dist/evalRunner.d.ts +26 -0
- package/node_modules/skillgrade/dist/evalRunner.js +316 -0
- package/node_modules/skillgrade/dist/graders/index.d.ts +30 -0
- package/node_modules/skillgrade/dist/graders/index.js +248 -0
- package/node_modules/skillgrade/dist/providers/docker.d.ts +32 -0
- package/node_modules/skillgrade/dist/providers/docker.js +255 -0
- package/node_modules/skillgrade/dist/providers/local.d.ts +7 -0
- package/node_modules/skillgrade/dist/providers/local.js +86 -0
- package/node_modules/skillgrade/dist/reporters/browser.d.ts +2 -0
- package/node_modules/skillgrade/dist/reporters/browser.js +90 -0
- package/node_modules/skillgrade/dist/reporters/cli.d.ts +2 -0
- package/node_modules/skillgrade/dist/reporters/cli.js +116 -0
- package/node_modules/skillgrade/dist/skillgrade.d.ts +20 -0
- package/node_modules/skillgrade/dist/skillgrade.js +179 -0
- package/node_modules/skillgrade/dist/types.d.ts +72 -0
- package/node_modules/skillgrade/dist/types.js +7 -0
- package/node_modules/skillgrade/dist/utils/cli.d.ts +56 -0
- package/node_modules/skillgrade/dist/utils/cli.js +141 -0
- package/node_modules/skillgrade/dist/utils/env.d.ts +9 -0
- package/node_modules/skillgrade/dist/utils/env.js +30 -0
- package/node_modules/skillgrade/dist/viewer.html +791 -0
- package/node_modules/skillgrade/package.json +69 -0
- package/node_modules/skillgrade/templates/eval.yaml.template +61 -0
- package/node_modules/split-ca/.gitlab-ci.yml +19 -0
- package/node_modules/split-ca/.npmignore +1 -0
- package/node_modules/split-ca/Makefile +4 -0
- package/node_modules/split-ca/README.md +51 -0
- package/node_modules/split-ca/index.js +27 -0
- package/node_modules/split-ca/package.json +38 -0
- package/node_modules/split-ca/test/certs/empty.ca +0 -0
- package/node_modules/split-ca/test/certs/garbage.ca +16 -0
- package/node_modules/split-ca/test/certs/split0.ca +18 -0
- package/node_modules/split-ca/test/certs/split1.ca +13 -0
- package/node_modules/split-ca/test/certs/test-chain.bundle +31 -0
- package/node_modules/split-ca/test/splitCa.test.js +45 -0
- package/node_modules/ssh2/.eslintignore +4 -0
- package/node_modules/ssh2/.eslintrc.js +5 -0
- package/node_modules/ssh2/.github/workflows/ci.yml +110 -0
- package/node_modules/ssh2/.github/workflows/lint.yml +27 -0
- package/node_modules/ssh2/LICENSE +19 -0
- package/node_modules/ssh2/README.md +1529 -0
- package/node_modules/ssh2/SFTP.md +413 -0
- package/node_modules/ssh2/examples/server-chat.js +238 -0
- package/node_modules/ssh2/examples/sftp-server-download-only.js +134 -0
- package/node_modules/ssh2/install.js +27 -0
- package/node_modules/ssh2/lib/Channel.js +295 -0
- package/node_modules/ssh2/lib/agent.js +1123 -0
- package/node_modules/ssh2/lib/client.js +2176 -0
- package/node_modules/ssh2/lib/http-agents.js +84 -0
- package/node_modules/ssh2/lib/index.js +44 -0
- package/node_modules/ssh2/lib/keygen.js +582 -0
- package/node_modules/ssh2/lib/protocol/Protocol.js +2136 -0
- package/node_modules/ssh2/lib/protocol/SFTP.js +4052 -0
- package/node_modules/ssh2/lib/protocol/constants.js +356 -0
- package/node_modules/ssh2/lib/protocol/crypto/binding.gyp +23 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Makefile +347 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/obj.target/sshcrypto/src/binding.o.d +273 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/.deps/Release/sshcrypto.node.d +1 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto/src/binding.o +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/binding.Makefile +6 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/gyp-mac-tool +766 -0
- package/node_modules/ssh2/lib/protocol/crypto/build/sshcrypto.target.mk +187 -0
- package/node_modules/ssh2/lib/protocol/crypto/poly1305.js +43 -0
- package/node_modules/ssh2/lib/protocol/crypto/src/binding.cc +2300 -0
- package/node_modules/ssh2/lib/protocol/crypto.js +1602 -0
- package/node_modules/ssh2/lib/protocol/handlers.js +16 -0
- package/node_modules/ssh2/lib/protocol/handlers.misc.js +1285 -0
- package/node_modules/ssh2/lib/protocol/kex.js +1908 -0
- package/node_modules/ssh2/lib/protocol/keyParser.js +1484 -0
- package/node_modules/ssh2/lib/protocol/node-fs-compat.js +115 -0
- package/node_modules/ssh2/lib/protocol/utils.js +356 -0
- package/node_modules/ssh2/lib/protocol/zlib.js +255 -0
- package/node_modules/ssh2/lib/server.js +1380 -0
- package/node_modules/ssh2/lib/utils.js +336 -0
- package/node_modules/ssh2/package.json +49 -0
- package/node_modules/ssh2/test/common.js +316 -0
- package/node_modules/ssh2/test/fixtures/bad_rsa_private_key +26 -0
- package/node_modules/ssh2/test/fixtures/https_cert.pem +33 -0
- package/node_modules/ssh2/test/fixtures/https_key.pem +52 -0
- package/node_modules/ssh2/test/fixtures/id_dsa +12 -0
- package/node_modules/ssh2/test/fixtures/id_ecdsa +5 -0
- package/node_modules/ssh2/test/fixtures/id_rsa +15 -0
- package/node_modules/ssh2/test/fixtures/id_rsa.ppk +26 -0
- package/node_modules/ssh2/test/fixtures/id_rsa_enc +30 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa +21 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc +22 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm +23 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_dsa_enc_gcm.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa +9 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc +10 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm +10 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ecdsa_enc_gcm.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519 +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_ed25519.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa +27 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc +28 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm +29 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_new_rsa_enc_gcm.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa +12 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc +15 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_dsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa +5 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_ecdsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa +27 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc +30 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.pub.result +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256 +54 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.pub +1 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.pub.result +6 -0
- package/node_modules/ssh2/test/fixtures/keyParser/openssh_old_rsa_enc_aes256.result +6 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_dsa_enc +17 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_dsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa +26 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa_enc +18 -0
- package/node_modules/ssh2/test/fixtures/keyParser/ppk_rsa_enc.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa.pub +9 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa2.pub +10 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa2.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa3.pub +11 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa3.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa4.pub +11 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa4.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa5.pub +8 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa5.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa6.pub +13 -0
- package/node_modules/ssh2/test/fixtures/keyParser/rfc4716_rsa6.pub.result +7 -0
- package/node_modules/ssh2/test/fixtures/openssh_new_rsa +27 -0
- package/node_modules/ssh2/test/fixtures/ssh_host_dsa_key +12 -0
- package/node_modules/ssh2/test/fixtures/ssh_host_ecdsa_key +5 -0
- package/node_modules/ssh2/test/fixtures/ssh_host_rsa_key +15 -0
- package/node_modules/ssh2/test/test-exec.js +578 -0
- package/node_modules/ssh2/test/test-integration-openssh.js +486 -0
- package/node_modules/ssh2/test/test-keygen.js +60 -0
- package/node_modules/ssh2/test/test-misc-client-server.js +1460 -0
- package/node_modules/ssh2/test/test-openssh.js +261 -0
- package/node_modules/ssh2/test/test-protocol-crypto.js +631 -0
- package/node_modules/ssh2/test/test-protocol-keyparser.js +177 -0
- package/node_modules/ssh2/test/test-server-hostkeys.js +138 -0
- package/node_modules/ssh2/test/test-sftp.js +842 -0
- package/node_modules/ssh2/test/test-shell.js +109 -0
- package/node_modules/ssh2/test/test-userauth-agent-openssh.js +110 -0
- package/node_modules/ssh2/test/test-userauth-agent.js +171 -0
- package/node_modules/ssh2/test/test-userauth.js +611 -0
- package/node_modules/ssh2/test/test-worker-imports.js +25 -0
- package/node_modules/ssh2/test/test.js +20 -0
- package/node_modules/ssh2/util/build_pagent.bat +2 -0
- package/node_modules/ssh2/util/pagent.c +88 -0
- package/node_modules/ssh2/util/pagent.exe +0 -0
- package/node_modules/streamx/LICENSE +21 -0
- package/node_modules/streamx/README.md +490 -0
- package/node_modules/streamx/index.js +1232 -0
- package/node_modules/streamx/package.json +36 -0
- package/node_modules/string-width/index.d.ts +29 -0
- package/node_modules/string-width/index.js +47 -0
- package/node_modules/string-width/license +9 -0
- package/node_modules/string-width/package.json +56 -0
- package/node_modules/string-width/readme.md +50 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +34 -0
- package/node_modules/strip-ansi/index.d.ts +17 -0
- package/node_modules/strip-ansi/index.js +4 -0
- package/node_modules/strip-ansi/license +9 -0
- package/node_modules/strip-ansi/package.json +54 -0
- package/node_modules/strip-ansi/readme.md +46 -0
- package/node_modules/tar-fs/.travis.yml +6 -0
- package/node_modules/tar-fs/LICENSE +21 -0
- package/node_modules/tar-fs/README.md +165 -0
- package/node_modules/tar-fs/index.js +363 -0
- package/node_modules/tar-fs/node_modules/tar-stream/LICENSE +21 -0
- package/node_modules/tar-fs/node_modules/tar-stream/README.md +168 -0
- package/node_modules/tar-fs/node_modules/tar-stream/extract.js +257 -0
- package/node_modules/tar-fs/node_modules/tar-stream/headers.js +295 -0
- package/node_modules/tar-fs/node_modules/tar-stream/index.js +2 -0
- package/node_modules/tar-fs/node_modules/tar-stream/pack.js +255 -0
- package/node_modules/tar-fs/node_modules/tar-stream/package.json +58 -0
- package/node_modules/tar-fs/node_modules/tar-stream/sandbox.js +11 -0
- package/node_modules/tar-fs/package.json +41 -0
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +346 -0
- package/node_modules/tar-stream/LICENSE +21 -0
- package/node_modules/tar-stream/README.md +183 -0
- package/node_modules/tar-stream/constants.js +14 -0
- package/node_modules/tar-stream/extract.js +406 -0
- package/node_modules/tar-stream/headers.js +321 -0
- package/node_modules/tar-stream/index.js +2 -0
- package/node_modules/tar-stream/pack.js +287 -0
- package/node_modules/tar-stream/package.json +42 -0
- package/node_modules/teex/LICENSE +21 -0
- package/node_modules/teex/README.md +31 -0
- package/node_modules/teex/example.js +16 -0
- package/node_modules/teex/index.js +52 -0
- package/node_modules/teex/package.json +26 -0
- package/node_modules/teex/test.js +68 -0
- package/node_modules/text-decoder/LICENSE +201 -0
- package/node_modules/text-decoder/README.md +36 -0
- package/node_modules/text-decoder/index.js +64 -0
- package/node_modules/text-decoder/lib/pass-through-decoder.js +19 -0
- package/node_modules/text-decoder/lib/utf8-decoder.js +185 -0
- package/node_modules/text-decoder/package.json +39 -0
- package/node_modules/tweetnacl/.npmignore +4 -0
- package/node_modules/tweetnacl/AUTHORS.md +28 -0
- package/node_modules/tweetnacl/CHANGELOG.md +221 -0
- package/node_modules/tweetnacl/LICENSE +24 -0
- package/node_modules/tweetnacl/PULL_REQUEST_TEMPLATE.md +20 -0
- package/node_modules/tweetnacl/README.md +459 -0
- package/node_modules/tweetnacl/nacl-fast.js +2388 -0
- package/node_modules/tweetnacl/nacl-fast.min.js +2 -0
- package/node_modules/tweetnacl/nacl.d.ts +98 -0
- package/node_modules/tweetnacl/nacl.js +1175 -0
- package/node_modules/tweetnacl/nacl.min.js +1 -0
- package/node_modules/tweetnacl/package.json +58 -0
- package/node_modules/universalify/LICENSE +20 -0
- package/node_modules/universalify/README.md +76 -0
- package/node_modules/universalify/index.js +24 -0
- package/node_modules/universalify/package.json +34 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/uuid/CHANGELOG.md +292 -0
- package/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/uuid/README.md +584 -0
- package/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/uuid/dist/commonjs-browser/index.js +104 -0
- package/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
- package/node_modules/uuid/dist/commonjs-browser/md5.js +200 -0
- package/node_modules/uuid/dist/commonjs-browser/native.js +10 -0
- package/node_modules/uuid/dist/commonjs-browser/nil.js +7 -0
- package/node_modules/uuid/dist/commonjs-browser/parse.js +44 -0
- package/node_modules/uuid/dist/commonjs-browser/regex.js +7 -0
- package/node_modules/uuid/dist/commonjs-browser/rng.js +23 -0
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +82 -0
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +38 -0
- package/node_modules/uuid/dist/commonjs-browser/v1.js +131 -0
- package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
- package/node_modules/uuid/dist/commonjs-browser/v3.js +11 -0
- package/node_modules/uuid/dist/commonjs-browser/v35.js +63 -0
- package/node_modules/uuid/dist/commonjs-browser/v4.js +32 -0
- package/node_modules/uuid/dist/commonjs-browser/v5.js +11 -0
- package/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
- package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
- package/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
- package/node_modules/uuid/dist/commonjs-browser/validate.js +12 -0
- package/node_modules/uuid/dist/commonjs-browser/version.js +15 -0
- package/node_modules/uuid/dist/esm-browser/index.js +14 -0
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +194 -0
- package/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +37 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +17 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +76 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +31 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +125 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +55 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +25 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/uuid/dist/esm-browser/v6.js +36 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +146 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +5 -0
- package/node_modules/uuid/dist/esm-browser/version.js +8 -0
- package/node_modules/uuid/dist/esm-node/index.js +14 -0
- package/node_modules/uuid/dist/esm-node/max.js +1 -0
- package/node_modules/uuid/dist/esm-node/md5.js +10 -0
- package/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/uuid/dist/esm-node/parse.js +37 -0
- package/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/uuid/dist/esm-node/rng.js +10 -0
- package/node_modules/uuid/dist/esm-node/sha1.js +10 -0
- package/node_modules/uuid/dist/esm-node/stringify.js +31 -0
- package/node_modules/uuid/dist/esm-node/v1.js +125 -0
- package/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
- package/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/uuid/dist/esm-node/v35.js +55 -0
- package/node_modules/uuid/dist/esm-node/v4.js +25 -0
- package/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/uuid/dist/esm-node/v6.js +32 -0
- package/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
- package/node_modules/uuid/dist/esm-node/v7.js +146 -0
- package/node_modules/uuid/dist/esm-node/validate.js +5 -0
- package/node_modules/uuid/dist/esm-node/version.js +8 -0
- package/node_modules/uuid/dist/index.js +104 -0
- package/node_modules/uuid/dist/max.js +7 -0
- package/node_modules/uuid/dist/md5-browser.js +200 -0
- package/node_modules/uuid/dist/md5.js +17 -0
- package/node_modules/uuid/dist/native-browser.js +10 -0
- package/node_modules/uuid/dist/native.js +11 -0
- package/node_modules/uuid/dist/nil.js +7 -0
- package/node_modules/uuid/dist/parse.js +44 -0
- package/node_modules/uuid/dist/regex.js +7 -0
- package/node_modules/uuid/dist/rng-browser.js +23 -0
- package/node_modules/uuid/dist/rng.js +17 -0
- package/node_modules/uuid/dist/sha1-browser.js +82 -0
- package/node_modules/uuid/dist/sha1.js +17 -0
- package/node_modules/uuid/dist/stringify.js +38 -0
- package/node_modules/uuid/dist/uuid-bin.js +75 -0
- package/node_modules/uuid/dist/v1.js +131 -0
- package/node_modules/uuid/dist/v1ToV6.js +26 -0
- package/node_modules/uuid/dist/v3.js +11 -0
- package/node_modules/uuid/dist/v35.js +63 -0
- package/node_modules/uuid/dist/v4.js +32 -0
- package/node_modules/uuid/dist/v5.js +11 -0
- package/node_modules/uuid/dist/v6.js +38 -0
- package/node_modules/uuid/dist/v6ToV1.js +26 -0
- package/node_modules/uuid/dist/v7.js +152 -0
- package/node_modules/uuid/dist/validate.js +12 -0
- package/node_modules/uuid/dist/version.js +15 -0
- package/node_modules/uuid/package.json +142 -0
- package/node_modules/uuid/wrapper.mjs +15 -0
- package/node_modules/wrap-ansi/index.js +216 -0
- package/node_modules/wrap-ansi/license +9 -0
- package/node_modules/wrap-ansi/package.json +62 -0
- package/node_modules/wrap-ansi/readme.md +91 -0
- package/node_modules/wrappy/LICENSE +15 -0
- package/node_modules/wrappy/README.md +36 -0
- package/node_modules/wrappy/package.json +29 -0
- package/node_modules/wrappy/wrappy.js +33 -0
- package/node_modules/y18n/LICENSE +13 -0
- package/node_modules/y18n/README.md +127 -0
- package/node_modules/y18n/build/index.cjs +203 -0
- package/node_modules/y18n/build/lib/cjs.js +6 -0
- package/node_modules/y18n/build/lib/index.js +174 -0
- package/node_modules/y18n/build/lib/platform-shims/node.js +19 -0
- package/node_modules/y18n/index.mjs +8 -0
- package/node_modules/y18n/package.json +70 -0
- package/node_modules/yargs/LICENSE +21 -0
- package/node_modules/yargs/README.md +204 -0
- package/node_modules/yargs/browser.d.ts +5 -0
- package/node_modules/yargs/browser.mjs +7 -0
- package/node_modules/yargs/build/index.cjs +1 -0
- package/node_modules/yargs/build/lib/argsert.js +62 -0
- package/node_modules/yargs/build/lib/command.js +449 -0
- package/node_modules/yargs/build/lib/completion-templates.js +48 -0
- package/node_modules/yargs/build/lib/completion.js +243 -0
- package/node_modules/yargs/build/lib/middleware.js +88 -0
- package/node_modules/yargs/build/lib/parse-command.js +32 -0
- package/node_modules/yargs/build/lib/typings/common-types.js +9 -0
- package/node_modules/yargs/build/lib/typings/yargs-parser-types.js +1 -0
- package/node_modules/yargs/build/lib/usage.js +584 -0
- package/node_modules/yargs/build/lib/utils/apply-extends.js +59 -0
- package/node_modules/yargs/build/lib/utils/is-promise.js +5 -0
- package/node_modules/yargs/build/lib/utils/levenshtein.js +34 -0
- package/node_modules/yargs/build/lib/utils/maybe-async-result.js +17 -0
- package/node_modules/yargs/build/lib/utils/obj-filter.js +10 -0
- package/node_modules/yargs/build/lib/utils/process-argv.js +17 -0
- package/node_modules/yargs/build/lib/utils/set-blocking.js +12 -0
- package/node_modules/yargs/build/lib/utils/which-module.js +10 -0
- package/node_modules/yargs/build/lib/validation.js +305 -0
- package/node_modules/yargs/build/lib/yargs-factory.js +1512 -0
- package/node_modules/yargs/build/lib/yerror.js +9 -0
- package/node_modules/yargs/helpers/helpers.mjs +10 -0
- package/node_modules/yargs/helpers/index.js +14 -0
- package/node_modules/yargs/helpers/package.json +3 -0
- package/node_modules/yargs/index.cjs +53 -0
- package/node_modules/yargs/index.mjs +8 -0
- package/node_modules/yargs/lib/platform-shims/browser.mjs +95 -0
- package/node_modules/yargs/lib/platform-shims/esm.mjs +73 -0
- package/node_modules/yargs/locales/be.json +46 -0
- package/node_modules/yargs/locales/cs.json +51 -0
- package/node_modules/yargs/locales/de.json +46 -0
- package/node_modules/yargs/locales/en.json +55 -0
- package/node_modules/yargs/locales/es.json +46 -0
- package/node_modules/yargs/locales/fi.json +49 -0
- package/node_modules/yargs/locales/fr.json +53 -0
- package/node_modules/yargs/locales/hi.json +49 -0
- package/node_modules/yargs/locales/hu.json +46 -0
- package/node_modules/yargs/locales/id.json +50 -0
- package/node_modules/yargs/locales/it.json +46 -0
- package/node_modules/yargs/locales/ja.json +51 -0
- package/node_modules/yargs/locales/ko.json +49 -0
- package/node_modules/yargs/locales/nb.json +44 -0
- package/node_modules/yargs/locales/nl.json +49 -0
- package/node_modules/yargs/locales/nn.json +44 -0
- package/node_modules/yargs/locales/pirate.json +13 -0
- package/node_modules/yargs/locales/pl.json +49 -0
- package/node_modules/yargs/locales/pt.json +45 -0
- package/node_modules/yargs/locales/pt_BR.json +48 -0
- package/node_modules/yargs/locales/ru.json +51 -0
- package/node_modules/yargs/locales/th.json +46 -0
- package/node_modules/yargs/locales/tr.json +48 -0
- package/node_modules/yargs/locales/uk_UA.json +51 -0
- package/node_modules/yargs/locales/uz.json +52 -0
- package/node_modules/yargs/locales/zh_CN.json +48 -0
- package/node_modules/yargs/locales/zh_TW.json +51 -0
- package/node_modules/yargs/package.json +123 -0
- package/node_modules/yargs/yargs +9 -0
- package/node_modules/yargs/yargs.mjs +10 -0
- package/node_modules/yargs-parser/LICENSE.txt +14 -0
- package/node_modules/yargs-parser/README.md +518 -0
- package/node_modules/yargs-parser/browser.js +29 -0
- package/node_modules/yargs-parser/build/index.cjs +1050 -0
- package/node_modules/yargs-parser/build/lib/index.js +62 -0
- package/node_modules/yargs-parser/build/lib/string-utils.js +65 -0
- package/node_modules/yargs-parser/build/lib/tokenize-arg-string.js +40 -0
- package/node_modules/yargs-parser/build/lib/yargs-parser-types.js +12 -0
- package/node_modules/yargs-parser/build/lib/yargs-parser.js +1045 -0
- package/node_modules/yargs-parser/package.json +92 -0
- package/package.json +7 -2
- package/scripts/postinstall.cjs +85 -0
|
@@ -1,127 +1,127 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as h0,b as k$,c as
|
|
3
|
-
`)}}e.defaultYaml={explicit:!1,version:"1.2"};e.defaultTags={"!!":"tag:yaml.org,2002:"};
|
|
4
|
-
`)?
|
|
2
|
+
import{a as h0,b as k$,c as bZ,d as xZ}from"./chunk-1becp2v6.js";import{A as SZ,B as l,C as z4,D as yZ,F as kZ,G as fZ,H as zZ,I as J4,J as hZ,e as r,f as z0,g as L4,i,j as IZ,k as Z4,l as MZ,m as jZ,n as Q4,o as NZ,p as W,q as DZ,r as o5,s as RZ,t as X4,u as wZ,v as PZ,w as CZ,z as EZ}from"./chunk-2bvch8gs.js";import{K as v,L as R,M as h,N as OZ,O as E,P as AZ,Q as f$,R as I8,S as u$,T as WZ,U as X0,V as g,W as TZ}from"./chunk-a26gjzjk.js";var f=R((I6)=>{var U9=Symbol.for("yaml.alias"),N4=Symbol.for("yaml.document"),s$=Symbol.for("yaml.map"),D4=Symbol.for("yaml.pair"),W9=Symbol.for("yaml.scalar"),t$=Symbol.for("yaml.seq"),K0=Symbol.for("yaml.node.type"),B6=($)=>!!$&&typeof $==="object"&&$[K0]===U9,_6=($)=>!!$&&typeof $==="object"&&$[K0]===N4,L6=($)=>!!$&&typeof $==="object"&&$[K0]===s$,F6=($)=>!!$&&typeof $==="object"&&$[K0]===D4,R4=($)=>!!$&&typeof $==="object"&&$[K0]===W9,O6=($)=>!!$&&typeof $==="object"&&$[K0]===t$;function w4($){if($&&typeof $==="object")switch($[K0]){case s$:case t$:return!0}return!1}function A6($){if($&&typeof $==="object")switch($[K0]){case U9:case s$:case W9:case t$:return!0}return!1}var T6=($)=>(R4($)||w4($))&&!!$.anchor;I6.ALIAS=U9;I6.DOC=N4;I6.MAP=s$;I6.NODE_TYPE=K0;I6.PAIR=D4;I6.SCALAR=W9;I6.SEQ=t$;I6.hasAnchor=T6;I6.isAlias=B6;I6.isCollection=w4;I6.isDocument=_6;I6.isMap=L6;I6.isNode=A6;I6.isPair=F6;I6.isScalar=R4;I6.isSeq=O6});var U$=R((v6)=>{var m=f(),n=Symbol("break visit"),P4=Symbol("skip children"),Y0=Symbol("remove node");function r$($,q){let Z=C4(q);if(m.isDocument($)){if(o0(null,$.contents,Z,Object.freeze([$]))===Y0)$.contents=null}else o0(null,$,Z,Object.freeze([]))}r$.BREAK=n;r$.SKIP=P4;r$.REMOVE=Y0;function o0($,q,Z,Q){let X=E4($,q,Z,Q);if(m.isNode(X)||m.isPair(X))return S4($,Q,X),o0($,X,Z,Q);if(typeof X!=="symbol"){if(m.isCollection(q)){Q=Object.freeze(Q.concat(q));for(let z=0;z<q.items.length;++z){let J=o0(z,q.items[z],Z,Q);if(typeof J==="number")z=J-1;else if(J===n)return n;else if(J===Y0)q.items.splice(z,1),z-=1}}else if(m.isPair(q)){Q=Object.freeze(Q.concat(q));let z=o0("key",q.key,Z,Q);if(z===n)return n;else if(z===Y0)q.key=null;let J=o0("value",q.value,Z,Q);if(J===n)return n;else if(J===Y0)q.value=null}}return X}async function e$($,q){let Z=C4(q);if(m.isDocument($)){if(await a0(null,$.contents,Z,Object.freeze([$]))===Y0)$.contents=null}else await a0(null,$,Z,Object.freeze([]))}e$.BREAK=n;e$.SKIP=P4;e$.REMOVE=Y0;async function a0($,q,Z,Q){let X=await E4($,q,Z,Q);if(m.isNode(X)||m.isPair(X))return S4($,Q,X),a0($,X,Z,Q);if(typeof X!=="symbol"){if(m.isCollection(q)){Q=Object.freeze(Q.concat(q));for(let z=0;z<q.items.length;++z){let J=await a0(z,q.items[z],Z,Q);if(typeof J==="number")z=J-1;else if(J===n)return n;else if(J===Y0)q.items.splice(z,1),z-=1}}else if(m.isPair(q)){Q=Object.freeze(Q.concat(q));let z=await a0("key",q.key,Z,Q);if(z===n)return n;else if(z===Y0)q.key=null;let J=await a0("value",q.value,Z,Q);if(J===n)return n;else if(J===Y0)q.value=null}}return X}function C4($){if(typeof $==="object"&&($.Collection||$.Node||$.Value))return Object.assign({Alias:$.Node,Map:$.Node,Scalar:$.Node,Seq:$.Node},$.Value&&{Map:$.Value,Scalar:$.Value,Seq:$.Value},$.Collection&&{Map:$.Collection,Seq:$.Collection},$);return $}function E4($,q,Z,Q){if(typeof Z==="function")return Z($,q,Q);if(m.isMap(q))return Z.Map?.($,q,Q);if(m.isSeq(q))return Z.Seq?.($,q,Q);if(m.isPair(q))return Z.Pair?.($,q,Q);if(m.isScalar(q))return Z.Scalar?.($,q,Q);if(m.isAlias(q))return Z.Alias?.($,q,Q);return}function S4($,q,Z){let Q=q[q.length-1];if(m.isCollection(Q))Q.items[$]=Z;else if(m.isPair(Q))if($==="key")Q.key=Z;else Q.value=Z;else if(m.isDocument(Q))Q.contents=Z;else{let X=m.isAlias(Q)?"alias":"scalar";throw Error(`Cannot replace node with ${X} parent`)}}v6.visit=r$;v6.visitAsync=e$});var H9=R((c6)=>{var b4=f(),m6=U$(),p6={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},d6=($)=>$.replace(/[!,[\]{}]/g,(q)=>p6[q]);class e{constructor($,q){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,$),this.tags=Object.assign({},e.defaultTags,q)}clone(){let $=new e(this.yaml,this.tags);return $.docStart=this.docStart,$}atDocument(){let $=new e(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},e.defaultTags);break}return $}add($,q){if(this.atNextDocument)this.yaml={explicit:e.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},e.defaultTags),this.atNextDocument=!1;let Z=$.trim().split(/[ \t]+/),Q=Z.shift();switch(Q){case"%TAG":{if(Z.length!==2){if(q(0,"%TAG directive should contain exactly two parts"),Z.length<2)return!1}let[X,z]=Z;return this.tags[X]=z,!0}case"%YAML":{if(this.yaml.explicit=!0,Z.length!==1)return q(0,"%YAML directive should contain exactly one part"),!1;let[X]=Z;if(X==="1.1"||X==="1.2")return this.yaml.version=X,!0;else{let z=/^\d+\.\d+$/.test(X);return q(6,`Unsupported YAML version ${X}`,z),!1}}default:return q(0,`Unknown directive ${Q}`,!0),!1}}tagName($,q){if($==="!")return"!";if($[0]!=="!")return q(`Not a valid tag: ${$}`),null;if($[1]==="<"){let z=$.slice(2,-1);if(z==="!"||z==="!!")return q(`Verbatim tags aren't resolved, so ${$} is invalid.`),null;if($[$.length-1]!==">")q("Verbatim tags must end with a >");return z}let[,Z,Q]=$.match(/^(.*!)([^!]*)$/s);if(!Q)q(`The ${$} tag has no suffix`);let X=this.tags[Z];if(X)try{return X+decodeURIComponent(Q)}catch(z){return q(String(z)),null}if(Z==="!")return $;return q(`Could not resolve tag: ${$}`),null}tagString($){for(let[q,Z]of Object.entries(this.tags))if($.startsWith(Z))return q+d6($.substring(Z.length));return $[0]==="!"?$:`!<${$}>`}toString($){let q=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],Z=Object.entries(this.tags),Q;if($&&Z.length>0&&b4.isNode($.contents)){let X={};m6.visit($.contents,(z,J)=>{if(b4.isNode(J)&&J.tag)X[J.tag]=!0}),Q=Object.keys(X)}else Q=[];for(let[X,z]of Z){if(X==="!!"&&z==="tag:yaml.org,2002:")continue;if(!$||Q.some((J)=>J.startsWith(z)))q.push(`%TAG ${X} ${z}`)}return q.join(`
|
|
3
|
+
`)}}e.defaultYaml={explicit:!1,version:"1.2"};e.defaultTags={"!!":"tag:yaml.org,2002:"};c6.Directives=e});var $q=R((a6)=>{var x4=f(),n6=U$();function i6($){if(/[\x00-\x19\s,[\]{}]/.test($)){let Z=`Anchor must not contain whitespace or control characters: ${JSON.stringify($)}`;throw Error(Z)}return!0}function y4($){let q=new Set;return n6.visit($,{Value(Z,Q){if(Q.anchor)q.add(Q.anchor)}}),q}function k4($,q){for(let Z=1;;++Z){let Q=`${$}${Z}`;if(!q.has(Q))return Q}}function o6($,q){let Z=[],Q=new Map,X=null;return{onAnchor:(z)=>{Z.push(z),X??(X=y4($));let J=k4(q,X);return X.add(J),J},setAnchors:()=>{for(let z of Z){let J=Q.get(z);if(typeof J==="object"&&J.anchor&&(x4.isScalar(J.node)||x4.isCollection(J.node)))J.node.anchor=J.anchor;else{let G=Error("Failed to resolve repeated object (this should not happen)");throw G.source=z,G}}},sourceObjects:Q}}a6.anchorIsValid=i6;a6.anchorNames=y4;a6.createNodeAnchors=o6;a6.findNewAnchor=k4});var V9=R(($3)=>{function W$($,q,Z,Q){if(Q&&typeof Q==="object")if(Array.isArray(Q))for(let X=0,z=Q.length;X<z;++X){let J=Q[X],G=W$($,Q,String(X),J);if(G===void 0)delete Q[X];else if(G!==J)Q[X]=G}else if(Q instanceof Map)for(let X of Array.from(Q.keys())){let z=Q.get(X),J=W$($,Q,X,z);if(J===void 0)Q.delete(X);else if(J!==z)Q.set(X,J)}else if(Q instanceof Set)for(let X of Array.from(Q)){let z=W$($,Q,X,X);if(z===void 0)Q.delete(X);else if(z!==X)Q.delete(X),Q.add(z)}else for(let[X,z]of Object.entries(Q)){let J=W$($,Q,X,z);if(J===void 0)delete Q[X];else if(J!==z)Q[X]=J}return $.call(q,Z,Q)}$3.applyReviver=W$});var _0=R((Q3)=>{var Z3=f();function f4($,q,Z){if(Array.isArray($))return $.map((Q,X)=>f4(Q,String(X),Z));if($&&typeof $.toJSON==="function"){if(!Z||!Z3.hasAnchor($))return $.toJSON(q,Z);let Q={aliasCount:0,count:1,res:void 0};Z.anchors.set($,Q),Z.onCreate=(z)=>{Q.res=z,delete Z.onCreate};let X=$.toJSON(q,Z);if(Z.onCreate)Z.onCreate(X);return X}if(typeof $==="bigint"&&!Z?.keep)return Number($);return $}Q3.toJS=f4});var qq=R((G3)=>{var z3=V9(),h4=f(),J3=_0();class v4{constructor($){Object.defineProperty(this,h4.NODE_TYPE,{value:$})}clone(){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)$.range=this.range.slice();return $}toJS($,{mapAsMap:q,maxAliasCount:Z,onAnchor:Q,reviver:X}={}){if(!h4.isDocument($))throw TypeError("A document argument is required");let z={anchors:new Map,doc:$,keep:!0,mapAsMap:q===!0,mapKeyWarned:!1,maxAliasCount:typeof Z==="number"?Z:100},J=J3.toJS(this,"",z);if(typeof Q==="function")for(let{count:G,res:Y}of z.anchors.values())Q(Y,G);return typeof X==="function"?z3.applyReviver(X,{"":J},"",J):J}}G3.NodeBase=v4});var H$=R((K3)=>{var U3=$q(),W3=U$(),s0=f(),H3=qq(),V3=_0();class g4 extends H3.NodeBase{constructor($){super(s0.ALIAS);this.source=$,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve($,q){let Z;if(q?.aliasResolveCache)Z=q.aliasResolveCache;else if(Z=[],W3.visit($,{Node:(X,z)=>{if(s0.isAlias(z)||s0.hasAnchor(z))Z.push(z)}}),q)q.aliasResolveCache=Z;let Q=void 0;for(let X of Z){if(X===this)break;if(X.anchor===this.source)Q=X}return Q}toJSON($,q){if(!q)return{source:this.source};let{anchors:Z,doc:Q,maxAliasCount:X}=q,z=this.resolve(Q,q);if(!z){let G=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(G)}let J=Z.get(z);if(!J)V3.toJS(z,null,q),J=Z.get(z);if(J?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(X>=0){if(J.count+=1,J.aliasCount===0)J.aliasCount=Zq(Q,z,Z);if(J.count*J.aliasCount>X)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return J.res}toString($,q,Z){let Q=`*${this.source}`;if($){if(U3.anchorIsValid(this.source),$.options.verifyAliasOrder&&!$.anchors.has(this.source)){let X=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(X)}if($.implicitKey)return`${Q} `}return Q}}function Zq($,q,Z){if(s0.isAlias(q)){let Q=q.resolve($),X=Z&&Q&&Z.get(Q);return X?X.count*X.aliasCount:0}else if(s0.isCollection(q)){let Q=0;for(let X of q.items){let z=Zq($,X,Z);if(z>Q)Q=z}return Q}else if(s0.isPair(q)){let Q=Zq($,q.key,Z),X=Zq($,q.value,Z);return Math.max(Q,X)}return 1}K3.Alias=g4});var u=R((A3)=>{var _3=f(),L3=qq(),F3=_0(),O3=($)=>!$||typeof $!=="function"&&typeof $!=="object";class C0 extends L3.NodeBase{constructor($){super(_3.SCALAR);this.value=$}toJSON($,q){return q?.keep?this.value:F3.toJS(this.value,$,q)}toString(){return String(this.value)}}C0.BLOCK_FOLDED="BLOCK_FOLDED";C0.BLOCK_LITERAL="BLOCK_LITERAL";C0.PLAIN="PLAIN";C0.QUOTE_DOUBLE="QUOTE_DOUBLE";C0.QUOTE_SINGLE="QUOTE_SINGLE";A3.Scalar=C0;A3.isScalarValue=O3});var V$=R((R3)=>{var M3=H$(),E0=f(),u4=u(),j3="tag:yaml.org,2002:";function N3($,q,Z){if(q){let Q=Z.filter((z)=>z.tag===q),X=Q.find((z)=>!z.format)??Q[0];if(!X)throw Error(`Tag ${q} not found`);return X}return Z.find((Q)=>Q.identify?.($)&&!Q.format)}function D3($,q,Z){if(E0.isDocument($))$=$.contents;if(E0.isNode($))return $;if(E0.isPair($)){let H=Z.schema[E0.MAP].createNode?.(Z.schema,null,Z);return H.items.push($),H}if($ instanceof String||$ instanceof Number||$ instanceof Boolean||typeof BigInt<"u"&&$ instanceof BigInt)$=$.valueOf();let{aliasDuplicateObjects:Q,onAnchor:X,onTagObj:z,schema:J,sourceObjects:G}=Z,Y=void 0;if(Q&&$&&typeof $==="object")if(Y=G.get($),Y)return Y.anchor??(Y.anchor=X($)),new M3.Alias(Y.anchor);else Y={anchor:null,node:null},G.set($,Y);if(q?.startsWith("!!"))q=j3+q.slice(2);let U=N3($,q,J.tags);if(!U){if($&&typeof $.toJSON==="function")$=$.toJSON();if(!$||typeof $!=="object"){let H=new u4.Scalar($);if(Y)Y.node=H;return H}U=$ instanceof Map?J[E0.MAP]:(Symbol.iterator in Object($))?J[E0.SEQ]:J[E0.MAP]}if(z)z(U),delete Z.onTagObj;let V=U?.createNode?U.createNode(Z.schema,$,Z):typeof U?.nodeClass?.from==="function"?U.nodeClass.from(Z.schema,$,Z):new u4.Scalar($);if(q)V.tag=q;else if(!U.default)V.tag=U.tag;if(Y)Y.node=V;return V}R3.createNode=D3});var Qq=R((E3)=>{var P3=V$(),U0=f(),C3=qq();function K9($,q,Z){let Q=Z;for(let X=q.length-1;X>=0;--X){let z=q[X];if(typeof z==="number"&&Number.isInteger(z)&&z>=0){let J=[];J[z]=Q,Q=J}else Q=new Map([[z,Q]])}return P3.createNode(Q,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:$,sourceObjects:new Map})}var m4=($)=>$==null||typeof $==="object"&&!!$[Symbol.iterator]().next().done;class p4 extends C3.NodeBase{constructor($,q){super($);Object.defineProperty(this,"schema",{value:q,configurable:!0,enumerable:!1,writable:!0})}clone($){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if($)q.schema=$;if(q.items=q.items.map((Z)=>U0.isNode(Z)||U0.isPair(Z)?Z.clone($):Z),this.range)q.range=this.range.slice();return q}addIn($,q){if(m4($))this.add(q);else{let[Z,...Q]=$,X=this.get(Z,!0);if(U0.isCollection(X))X.addIn(Q,q);else if(X===void 0&&this.schema)this.set(Z,K9(this.schema,Q,q));else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${Q}`)}}deleteIn($){let[q,...Z]=$;if(Z.length===0)return this.delete(q);let Q=this.get(q,!0);if(U0.isCollection(Q))return Q.deleteIn(Z);else throw Error(`Expected YAML collection at ${q}. Remaining path: ${Z}`)}getIn($,q){let[Z,...Q]=$,X=this.get(Z,!0);if(Q.length===0)return!q&&U0.isScalar(X)?X.value:X;else return U0.isCollection(X)?X.getIn(Q,q):void 0}hasAllNullValues($){return this.items.every((q)=>{if(!U0.isPair(q))return!1;let Z=q.value;return Z==null||$&&U0.isScalar(Z)&&Z.value==null&&!Z.commentBefore&&!Z.comment&&!Z.tag})}hasIn($){let[q,...Z]=$;if(Z.length===0)return this.has(q);let Q=this.get(q,!0);return U0.isCollection(Q)?Q.hasIn(Z):!1}setIn($,q){let[Z,...Q]=$;if(Q.length===0)this.set(Z,q);else{let X=this.get(Z,!0);if(U0.isCollection(X))X.setIn(Q,q);else if(X===void 0&&this.schema)this.set(Z,K9(this.schema,Q,q));else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${Q}`)}}}E3.Collection=p4;E3.collectionFromPath=K9;E3.isEmptyPath=m4});var K$=R((f3)=>{var y3=($)=>$.replace(/^(?!$)(?: $)?/gm,"#");function B9($,q){if(/^\n+$/.test($))return $.substring(1);return q?$.replace(/^(?! *$)/gm,q):$}var k3=($,q,Z)=>$.endsWith(`
|
|
4
|
+
`)?B9(Z,q):Z.includes(`
|
|
5
5
|
`)?`
|
|
6
|
-
`+
|
|
7
|
-
`){if(Z==="block")
|
|
8
|
-
`&&_!=="\t"){let
|
|
9
|
-
`&&
|
|
10
|
-
${q}${$.slice(0,
|
|
11
|
-
${q}${$.slice(
|
|
12
|
-
`);Q=q,X=q+1,z=$[X]}return Q}
|
|
13
|
-
`){if(z-J>Q)return!0;if(J=z+1,X-J<=Q)return!1}return!0}function
|
|
6
|
+
`+B9(Z,q):($.endsWith(" ")?"":" ")+Z;f3.indentComment=B9;f3.lineComment=k3;f3.stringifyComment=y3});var c4=R((m3)=>{function u3($,q,Z="flow",{indentAtStart:Q,lineWidth:X=80,minContentWidth:z=20,onFold:J,onOverflow:G}={}){if(!X||X<0)return $;if(X<z)z=0;let Y=Math.max(1+z,1+X-q.length);if($.length<=Y)return $;let U=[],V={},H=X-q.length;if(typeof Q==="number")if(Q>X-Math.max(2,z))U.push(0);else H=X-Q;let K=void 0,_=void 0,L=!1,B=-1,F=-1,O=-1;if(Z==="block"){if(B=d4($,B,q.length),B!==-1)H=B+Y}for(let M;M=$[B+=1];){if(Z==="quoted"&&M==="\\"){switch(F=B,$[B+1]){case"x":B+=3;break;case"u":B+=5;break;case"U":B+=9;break;default:B+=1}O=B}if(M===`
|
|
7
|
+
`){if(Z==="block")B=d4($,B,q.length);H=B+q.length+Y,K=void 0}else{if(M===" "&&_&&_!==" "&&_!==`
|
|
8
|
+
`&&_!=="\t"){let j=$[B+1];if(j&&j!==" "&&j!==`
|
|
9
|
+
`&&j!=="\t")K=B}if(B>=H)if(K)U.push(K),H=K+Y,K=void 0;else if(Z==="quoted"){while(_===" "||_==="\t")_=M,M=$[B+=1],L=!0;let j=B>O+1?B-2:F-1;if(V[j])return $;U.push(j),V[j]=!0,H=j+Y,K=void 0}else L=!0}_=M}if(L&&G)G();if(U.length===0)return $;if(J)J();let A=$.slice(0,U[0]);for(let M=0;M<U.length;++M){let j=U[M],I=U[M+1]||$.length;if(j===0)A=`
|
|
10
|
+
${q}${$.slice(0,I)}`;else{if(Z==="quoted"&&V[j])A+=`${$[j]}\\`;A+=`
|
|
11
|
+
${q}${$.slice(j+1,I)}`}}return A}function d4($,q,Z){let Q=q,X=q+1,z=$[X];while(z===" "||z==="\t")if(q<X+Z)z=$[++q];else{do z=$[++q];while(z&&z!==`
|
|
12
|
+
`);Q=q,X=q+1,z=$[X]}return Q}m3.FOLD_BLOCK="block";m3.FOLD_FLOW="flow";m3.FOLD_QUOTED="quoted";m3.foldFlowLines=u3});var _$=R((a3)=>{var J0=u(),L0=c4(),zq=($,q)=>({indentAtStart:q?$.indent.length:$.indentAtStart,lineWidth:$.options.lineWidth,minContentWidth:$.options.minContentWidth}),Jq=($)=>/^(%|---|\.\.\.)/m.test($);function n3($,q,Z){if(!q||q<0)return!1;let Q=q-Z,X=$.length;if(X<=Q)return!1;for(let z=0,J=0;z<X;++z)if($[z]===`
|
|
13
|
+
`){if(z-J>Q)return!0;if(J=z+1,X-J<=Q)return!1}return!0}function B$($,q){let Z=JSON.stringify($);if(q.options.doubleQuotedAsJSON)return Z;let{implicitKey:Q}=q,X=q.options.doubleQuotedMinMultiLineLength,z=q.indent||(Jq($)?" ":""),J="",G=0;for(let Y=0,U=Z[Y];U;U=Z[++Y]){if(U===" "&&Z[Y+1]==="\\"&&Z[Y+2]==="n")J+=Z.slice(G,Y)+"\\ ",Y+=1,G=Y,U="\\";if(U==="\\")switch(Z[Y+1]){case"u":{J+=Z.slice(G,Y);let V=Z.substr(Y+2,4);switch(V){case"0000":J+="\\0";break;case"0007":J+="\\a";break;case"000b":J+="\\v";break;case"001b":J+="\\e";break;case"0085":J+="\\N";break;case"00a0":J+="\\_";break;case"2028":J+="\\L";break;case"2029":J+="\\P";break;default:if(V.substr(0,2)==="00")J+="\\x"+V.substr(2);else J+=Z.substr(Y,6)}Y+=5,G=Y+1}break;case"n":if(Q||Z[Y+2]==='"'||Z.length<X)Y+=1;else{J+=Z.slice(G,Y)+`
|
|
14
14
|
|
|
15
15
|
`;while(Z[Y+2]==="\\"&&Z[Y+3]==="n"&&Z[Y+4]!=='"')J+=`
|
|
16
|
-
`,Y+=2;if(J+=z,Z[Y+2]===" ")J+="\\";Y+=1,G=Y+1}break;default:Y+=1}}return J=G?J+Z.slice(G):Z,Q?J:L0.foldFlowLines(J,z,L0.FOLD_QUOTED,zq(q,!1))}function
|
|
17
|
-
`)||/[ \t]\n|\n[ \t]/.test($))return
|
|
18
|
-
${Z}`)+"'";return q.implicitKey?Q:L0.foldFlowLines(Q,Z,L0.FOLD_FLOW,zq(q,!1))}function t0($,q){let{singleQuote:Z}=q.options,Q;if(Z===!1)Q=
|
|
16
|
+
`,Y+=2;if(J+=z,Z[Y+2]===" ")J+="\\";Y+=1,G=Y+1}break;default:Y+=1}}return J=G?J+Z.slice(G):Z,Q?J:L0.foldFlowLines(J,z,L0.FOLD_QUOTED,zq(q,!1))}function _9($,q){if(q.options.singleQuote===!1||q.implicitKey&&$.includes(`
|
|
17
|
+
`)||/[ \t]\n|\n[ \t]/.test($))return B$($,q);let Z=q.indent||(Jq($)?" ":""),Q="'"+$.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
18
|
+
${Z}`)+"'";return q.implicitKey?Q:L0.foldFlowLines(Q,Z,L0.FOLD_FLOW,zq(q,!1))}function t0($,q){let{singleQuote:Z}=q.options,Q;if(Z===!1)Q=B$;else{let X=$.includes('"'),z=$.includes("'");if(X&&!z)Q=_9;else if(z&&!X)Q=B$;else Q=Z?_9:B$}return Q($,q)}var L9;try{L9=new RegExp(`(^|(?<!
|
|
19
19
|
))
|
|
20
20
|
+(?!
|
|
21
|
-
|$)`,"g")}catch{
|
|
21
|
+
|$)`,"g")}catch{L9=/\n+(?!\n|$)/g}function Xq({comment:$,type:q,value:Z},Q,X,z){let{blockQuote:J,commentString:G,lineWidth:Y}=Q.options;if(!J||/\n[\t ]+$/.test(Z))return t0(Z,Q);let U=Q.indent||(Q.forceBlockIndent||Jq(Z)?" ":""),V=J==="literal"?!0:J==="folded"||q===J0.Scalar.BLOCK_FOLDED?!1:q===J0.Scalar.BLOCK_LITERAL?!0:!n3(Z,Y,U.length);if(!Z)return V?`|
|
|
22
22
|
`:`>
|
|
23
|
-
`;let H,
|
|
24
|
-
`&&
|
|
23
|
+
`;let H,K;for(K=Z.length;K>0;--K){let I=Z[K-1];if(I!==`
|
|
24
|
+
`&&I!=="\t"&&I!==" ")break}let _=Z.substring(K),L=_.indexOf(`
|
|
25
25
|
`);if(L===-1)H="-";else if(Z===_||L!==_.length-1){if(H="+",z)z()}else H="";if(_){if(Z=Z.slice(0,-_.length),_[_.length-1]===`
|
|
26
|
-
`)_=_.slice(0,-1);_=_.replace(
|
|
27
|
-
`)O=F;else break}let A=Z.substring(0,O<F?O+1:F);if(A)Z=Z.substring(A.length),A=A.replace(/\n+/g,`$&${U}`);let
|
|
28
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${U}`),D=!1,x=zq(Q,!0);if(J!=="folded"&&q!==J0.Scalar.BLOCK_FOLDED)x.onOverflow=()=>{D=!0};let P=L0.foldFlowLines(`${A}${
|
|
29
|
-
${U}${P}`}return Z=Z.replace(/\n+/g,`$&${U}`),`|${
|
|
30
|
-
${U}${A}${Z}${_}`}function
|
|
26
|
+
`)_=_.slice(0,-1);_=_.replace(L9,`$&${U}`)}let B=!1,F,O=-1;for(F=0;F<Z.length;++F){let I=Z[F];if(I===" ")B=!0;else if(I===`
|
|
27
|
+
`)O=F;else break}let A=Z.substring(0,O<F?O+1:F);if(A)Z=Z.substring(A.length),A=A.replace(/\n+/g,`$&${U}`);let j=(B?U?"2":"1":"")+H;if($){if(j+=" "+G($.replace(/ ?[\r\n]+/g," ")),X)X()}if(!V){let I=Z.replace(/\n+/g,`
|
|
28
|
+
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${U}`),D=!1,x=zq(Q,!0);if(J!=="folded"&&q!==J0.Scalar.BLOCK_FOLDED)x.onOverflow=()=>{D=!0};let P=L0.foldFlowLines(`${A}${I}${_}`,U,L0.FOLD_BLOCK,x);if(!D)return`>${j}
|
|
29
|
+
${U}${P}`}return Z=Z.replace(/\n+/g,`$&${U}`),`|${j}
|
|
30
|
+
${U}${A}${Z}${_}`}function i3($,q,Z,Q){let{type:X,value:z}=$,{actualString:J,implicitKey:G,indent:Y,indentStep:U,inFlow:V}=q;if(G&&z.includes(`
|
|
31
31
|
`)||V&&/[[\]{},]/.test(z))return t0(z,q);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(z))return G||V||!z.includes(`
|
|
32
32
|
`)?t0(z,q):Xq($,q,Z,Q);if(!G&&!V&&X!==J0.Scalar.PLAIN&&z.includes(`
|
|
33
33
|
`))return Xq($,q,Z,Q);if(Jq(z)){if(Y==="")return q.forceBlockIndent=!0,Xq($,q,Z,Q);else if(G&&Y===U)return t0(z,q)}let H=z.replace(/\n+/g,`$&
|
|
34
|
-
${Y}`);if(J){let
|
|
35
|
-
${q.indent}${G}`}
|
|
36
|
-
${G}:`}else if(F=`${F}:`,
|
|
34
|
+
${Y}`);if(J){let K=(B)=>B.default&&B.tag!=="tag:yaml.org,2002:str"&&B.test?.test(H),{compat:_,tags:L}=q.doc.schema;if(L.some(K)||_?.some(K))return t0(z,q)}return G?H:L0.foldFlowLines(H,Y,L0.FOLD_FLOW,zq(q,!1))}function o3($,q,Z,Q){let{implicitKey:X,inFlow:z}=q,J=typeof $.value==="string"?$:Object.assign({},$,{value:String($.value)}),{type:G}=$;if(G!==J0.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(J.value))G=J0.Scalar.QUOTE_DOUBLE}let Y=(V)=>{switch(V){case J0.Scalar.BLOCK_FOLDED:case J0.Scalar.BLOCK_LITERAL:return X||z?t0(J.value,q):Xq(J,q,Z,Q);case J0.Scalar.QUOTE_DOUBLE:return B$(J.value,q);case J0.Scalar.QUOTE_SINGLE:return _9(J.value,q);case J0.Scalar.PLAIN:return i3(J,q,Z,Q);default:return null}},U=Y(G);if(U===null){let{defaultKeyType:V,defaultStringType:H}=q.options,K=X&&V||H;if(U=Y(K),U===null)throw Error(`Unsupported default string type ${K}`)}return U}a3.stringifyString=o3});var L$=R((X7)=>{var t3=$q(),F0=f(),r3=K$(),e3=_$();function $7($,q){let Z=Object.assign({blockQuote:!0,commentString:r3.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},$.schema.toStringOptions,q),Q;switch(Z.collectionStyle){case"block":Q=!1;break;case"flow":Q=!0;break;default:Q=null}return{anchors:new Set,doc:$,flowCollectionPadding:Z.flowCollectionPadding?" ":"",indent:"",indentStep:typeof Z.indent==="number"?" ".repeat(Z.indent):" ",inFlow:Q,options:Z}}function q7($,q){if(q.tag){let X=$.filter((z)=>z.tag===q.tag);if(X.length>0)return X.find((z)=>z.format===q.format)??X[0]}let Z=void 0,Q;if(F0.isScalar(q)){Q=q.value;let X=$.filter((z)=>z.identify?.(Q));if(X.length>1){let z=X.filter((J)=>J.test);if(z.length>0)X=z}Z=X.find((z)=>z.format===q.format)??X.find((z)=>!z.format)}else Q=q,Z=$.find((X)=>X.nodeClass&&Q instanceof X.nodeClass);if(!Z){let X=Q?.constructor?.name??(Q===null?"null":typeof Q);throw Error(`Tag not resolved for ${X} value`)}return Z}function Z7($,q,{anchors:Z,doc:Q}){if(!Q.directives)return"";let X=[],z=(F0.isScalar($)||F0.isCollection($))&&$.anchor;if(z&&t3.anchorIsValid(z))Z.add(z),X.push(`&${z}`);let J=$.tag??(q.default?null:q.tag);if(J)X.push(Q.directives.tagString(J));return X.join(" ")}function Q7($,q,Z,Q){if(F0.isPair($))return $.toString(q,Z,Q);if(F0.isAlias($)){if(q.doc.directives)return $.toString(q);if(q.resolvedAliases?.has($))throw TypeError("Cannot stringify circular structure without alias nodes");else{if(q.resolvedAliases)q.resolvedAliases.add($);else q.resolvedAliases=new Set([$]);$=$.resolve(q.doc)}}let X=void 0,z=F0.isNode($)?$:q.doc.createNode($,{onTagObj:(Y)=>X=Y});X??(X=q7(q.doc.schema.tags,z));let J=Z7(z,X,q);if(J.length>0)q.indentAtStart=(q.indentAtStart??0)+J.length+1;let G=typeof X.stringify==="function"?X.stringify(z,q,Z,Q):F0.isScalar(z)?e3.stringifyString(z,q,Z,Q):z.toString(q,Z,Q);if(!J)return G;return F0.isScalar(z)||G[0]==="{"||G[0]==="["?`${J} ${G}`:`${J}
|
|
35
|
+
${q.indent}${G}`}X7.createStringifyContext=$7;X7.stringify=Q7});var i4=R((Y7)=>{var B0=f(),l4=u(),n4=L$(),F$=K$();function G7({key:$,value:q},Z,Q,X){let{allNullValues:z,doc:J,indent:G,indentStep:Y,options:{commentString:U,indentSeq:V,simpleKeys:H}}=Z,K=B0.isNode($)&&$.comment||null;if(H){if(K)throw Error("With simple keys, key nodes cannot have comments");if(B0.isCollection($)||!B0.isNode($)&&typeof $==="object")throw Error("With simple keys, collection cannot be used as a key value")}let _=!H&&(!$||K&&q==null&&!Z.inFlow||B0.isCollection($)||(B0.isScalar($)?$.type===l4.Scalar.BLOCK_FOLDED||$.type===l4.Scalar.BLOCK_LITERAL:typeof $==="object"));Z=Object.assign({},Z,{allNullValues:!1,implicitKey:!_&&(H||!z),indent:G+Y});let L=!1,B=!1,F=n4.stringify($,Z,()=>L=!0,()=>B=!0);if(!_&&!Z.inFlow&&F.length>1024){if(H)throw Error("With simple keys, single line scalar must not span more than 1024 characters");_=!0}if(Z.inFlow){if(z||q==null){if(L&&Q)Q();return F===""?"?":_?`? ${F}`:F}}else if(z&&!H||q==null&&_){if(F=`? ${F}`,K&&!L)F+=F$.lineComment(F,Z.indent,U(K));else if(B&&X)X();return F}if(L)K=null;if(_){if(K)F+=F$.lineComment(F,Z.indent,U(K));F=`? ${F}
|
|
36
|
+
${G}:`}else if(F=`${F}:`,K)F+=F$.lineComment(F,Z.indent,U(K));let O,A,M;if(B0.isNode(q))O=!!q.spaceBefore,A=q.commentBefore,M=q.comment;else if(O=!1,A=null,M=null,q&&typeof q==="object")q=J.createNode(q);if(Z.implicitKey=!1,!_&&!K&&B0.isScalar(q))Z.indentAtStart=F.length+1;if(B=!1,!V&&Y.length>=2&&!Z.inFlow&&!_&&B0.isSeq(q)&&!q.flow&&!q.tag&&!q.anchor)Z.indent=Z.indent.substring(2);let j=!1,I=n4.stringify(q,Z,()=>j=!0,()=>B=!0),D=" ";if(K||O||A){if(D=O?`
|
|
37
37
|
`:"",A){let x=U(A);D+=`
|
|
38
|
-
${F$.indentComment(x,Z.indent)}`}if(
|
|
38
|
+
${F$.indentComment(x,Z.indent)}`}if(I===""&&!Z.inFlow){if(D===`
|
|
39
39
|
`&&M)D=`
|
|
40
40
|
|
|
41
41
|
`}else D+=`
|
|
42
|
-
${Z.indent}`}else if(!_&&
|
|
43
|
-
`),k=P!==-1,
|
|
44
|
-
${Z.indent}`}}else if(
|
|
45
|
-
`)D="";if(F+=D+
|
|
46
|
-
${Y}${
|
|
42
|
+
${Z.indent}`}else if(!_&&B0.isCollection(q)){let x=I[0],P=I.indexOf(`
|
|
43
|
+
`),k=P!==-1,T=Z.inFlow??q.flow??q.items.length===0;if(k||!T){let N=!1;if(k&&(x==="&"||x==="!")){let C=I.indexOf(" ");if(x==="&"&&C!==-1&&C<P&&I[C+1]==="!")C=I.indexOf(" ",C+1);if(C===-1||P<C)N=!0}if(!N)D=`
|
|
44
|
+
${Z.indent}`}}else if(I===""||I[0]===`
|
|
45
|
+
`)D="";if(F+=D+I,Z.inFlow){if(j&&Q)Q()}else if(M&&!j)F+=F$.lineComment(F,Z.indent,U(M));else if(B&&X)X();return F}Y7.stringifyPair=G7});var F9=R((V7)=>{var o4=h("process");function W7($,...q){if($==="debug")console.log(...q)}function H7($,q){if($==="debug"||$==="warn")if(typeof o4.emitWarning==="function")o4.emitWarning(q);else console.warn(q)}V7.debug=W7;V7.warn=H7});var Uq=R((L7)=>{var O$=f(),a4=u(),Gq="<<",Yq={identify:($)=>$===Gq||typeof $==="symbol"&&$.description===Gq,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new a4.Scalar(Symbol(Gq)),{addToJSMap:s4}),stringify:()=>Gq},_7=($,q)=>(Yq.identify(q)||O$.isScalar(q)&&(!q.type||q.type===a4.Scalar.PLAIN)&&Yq.identify(q.value))&&$?.doc.schema.tags.some((Z)=>Z.tag===Yq.tag&&Z.default);function s4($,q,Z){if(Z=$&&O$.isAlias(Z)?Z.resolve($.doc):Z,O$.isSeq(Z))for(let Q of Z.items)O9($,q,Q);else if(Array.isArray(Z))for(let Q of Z)O9($,q,Q);else O9($,q,Z)}function O9($,q,Z){let Q=$&&O$.isAlias(Z)?Z.resolve($.doc):Z;if(!O$.isMap(Q))throw Error("Merge sources must be maps or map aliases");let X=Q.toJSON(null,$,Map);for(let[z,J]of X)if(q instanceof Map){if(!q.has(z))q.set(z,J)}else if(q instanceof Set)q.add(z);else if(!Object.prototype.hasOwnProperty.call(q,z))Object.defineProperty(q,z,{value:J,writable:!0,enumerable:!0,configurable:!0});return q}L7.addMergeToJSMap=s4;L7.isMergeKey=_7;L7.merge=Yq});var T9=R((N7)=>{var T7=F9(),t4=Uq(),I7=L$(),r4=f(),A9=_0();function M7($,q,{key:Z,value:Q}){if(r4.isNode(Z)&&Z.addToJSMap)Z.addToJSMap($,q,Q);else if(t4.isMergeKey($,Z))t4.addMergeToJSMap($,q,Q);else{let X=A9.toJS(Z,"",$);if(q instanceof Map)q.set(X,A9.toJS(Q,X,$));else if(q instanceof Set)q.add(X);else{let z=j7(Z,X,$),J=A9.toJS(Q,z,$);if(z in q)Object.defineProperty(q,z,{value:J,writable:!0,enumerable:!0,configurable:!0});else q[z]=J}}return q}function j7($,q,Z){if(q===null)return"";if(typeof q!=="object")return String(q);if(r4.isNode($)&&Z?.doc){let Q=I7.createStringifyContext(Z.doc,{});Q.anchors=new Set;for(let z of Z.anchors.keys())Q.anchors.add(z.anchor);Q.inFlow=!0,Q.inStringifyKey=!0;let X=$.toString(Q);if(!Z.mapKeyWarned){let z=JSON.stringify(X);if(z.length>40)z=z.substring(0,36)+'..."';T7.warn(Z.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${z}. Set mapAsMap: true to use object keys.`),Z.mapKeyWarned=!0}return X}return JSON.stringify(q)}N7.addPairToJSMap=M7});var O0=R((C7)=>{var e4=V$(),R7=i4(),w7=T9(),Wq=f();function P7($,q,Z){let Q=e4.createNode($,void 0,Z),X=e4.createNode(q,void 0,Z);return new Hq(Q,X)}class Hq{constructor($,q=null){Object.defineProperty(this,Wq.NODE_TYPE,{value:Wq.PAIR}),this.key=$,this.value=q}clone($){let{key:q,value:Z}=this;if(Wq.isNode(q))q=q.clone($);if(Wq.isNode(Z))Z=Z.clone($);return new Hq(q,Z)}toJSON($,q){let Z=q?.mapAsMap?new Map:{};return w7.addPairToJSMap(q,Z,this)}toString($,q,Z){return $?.doc?R7.stringifyPair(this,$,q,Z):JSON.stringify(this)}}C7.Pair=Hq;C7.createPair=P7});var I9=R((k7)=>{var S0=f(),$1=L$(),Vq=K$();function b7($,q,Z){return(q.inFlow??$.flow?y7:x7)($,q,Z)}function x7({comment:$,items:q},Z,{blockItemPrefix:Q,flowChars:X,itemIndent:z,onChompKeep:J,onComment:G}){let{indent:Y,options:{commentString:U}}=Z,V=Object.assign({},Z,{indent:z,type:null}),H=!1,K=[];for(let L=0;L<q.length;++L){let B=q[L],F=null;if(S0.isNode(B)){if(!H&&B.spaceBefore)K.push("");if(Kq(Z,K,B.commentBefore,H),B.comment)F=B.comment}else if(S0.isPair(B)){let A=S0.isNode(B.key)?B.key:null;if(A){if(!H&&A.spaceBefore)K.push("");Kq(Z,K,A.commentBefore,H)}}H=!1;let O=$1.stringify(B,V,()=>F=null,()=>H=!0);if(F)O+=Vq.lineComment(O,z,U(F));if(H&&F)H=!1;K.push(Q+O)}let _;if(K.length===0)_=X.start+X.end;else{_=K[0];for(let L=1;L<K.length;++L){let B=K[L];_+=B?`
|
|
46
|
+
${Y}${B}`:`
|
|
47
47
|
`}}if($){if(_+=`
|
|
48
|
-
`+Vq.indentComment(U($),Y),G)G()}else if(H&&J)J();return _}function
|
|
49
|
-
`)),L<$.length-1)O+=",";else if(q.options.trailingComma){if(q.options.lineWidth>0)U||(U=H.reduce((A,M)=>A+M.length+2,2)+(O.length+2)>q.options.lineWidth);if(U)O+=","}if(F)O+=Vq.lineComment(O,Q,G(F));H.push(O),V=H.length}let{start:
|
|
50
|
-
${z}${X}${
|
|
48
|
+
`+Vq.indentComment(U($),Y),G)G()}else if(H&&J)J();return _}function y7({items:$},q,{flowChars:Z,itemIndent:Q}){let{indent:X,indentStep:z,flowCollectionPadding:J,options:{commentString:G}}=q;Q+=z;let Y=Object.assign({},q,{indent:Q,inFlow:!0,type:null}),U=!1,V=0,H=[];for(let L=0;L<$.length;++L){let B=$[L],F=null;if(S0.isNode(B)){if(B.spaceBefore)H.push("");if(Kq(q,H,B.commentBefore,!1),B.comment)F=B.comment}else if(S0.isPair(B)){let A=S0.isNode(B.key)?B.key:null;if(A){if(A.spaceBefore)H.push("");if(Kq(q,H,A.commentBefore,!1),A.comment)U=!0}let M=S0.isNode(B.value)?B.value:null;if(M){if(M.comment)F=M.comment;if(M.commentBefore)U=!0}else if(B.value==null&&A?.comment)F=A.comment}if(F)U=!0;let O=$1.stringify(B,Y,()=>F=null);if(U||(U=H.length>V||O.includes(`
|
|
49
|
+
`)),L<$.length-1)O+=",";else if(q.options.trailingComma){if(q.options.lineWidth>0)U||(U=H.reduce((A,M)=>A+M.length+2,2)+(O.length+2)>q.options.lineWidth);if(U)O+=","}if(F)O+=Vq.lineComment(O,Q,G(F));H.push(O),V=H.length}let{start:K,end:_}=Z;if(H.length===0)return K+_;else{if(!U){let L=H.reduce((B,F)=>B+F.length+2,2);U=q.options.lineWidth>0&&L>q.options.lineWidth}if(U){let L=K;for(let B of H)L+=B?`
|
|
50
|
+
${z}${X}${B}`:`
|
|
51
51
|
`;return`${L}
|
|
52
|
-
${X}${_}`}else return`${
|
|
53
|
-
`:" ")}return
|
|
52
|
+
${X}${_}`}else return`${K}${J}${H.join(" ")}${J}${_}`}}function Kq({indent:$,options:{commentString:q}},Z,Q,X){if(Q&&X)Q=Q.replace(/^\n+/,"");if(Q){let z=Vq.indentComment(q(Q),$);Z.push(z.trimStart())}}k7.stringifyCollection=b7});var T0=R((m7)=>{var h7=I9(),v7=T9(),g7=Qq(),A0=f(),Bq=O0(),u7=u();function A$($,q){let Z=A0.isScalar(q)?q.value:q;for(let Q of $)if(A0.isPair(Q)){if(Q.key===q||Q.key===Z)return Q;if(A0.isScalar(Q.key)&&Q.key.value===Z)return Q}return}class q1 extends g7.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor($){super(A0.MAP,$);this.items=[]}static from($,q,Z){let{keepUndefined:Q,replacer:X}=Z,z=new this($),J=(G,Y)=>{if(typeof X==="function")Y=X.call(q,G,Y);else if(Array.isArray(X)&&!X.includes(G))return;if(Y!==void 0||Q)z.items.push(Bq.createPair(G,Y,Z))};if(q instanceof Map)for(let[G,Y]of q)J(G,Y);else if(q&&typeof q==="object")for(let G of Object.keys(q))J(G,q[G]);if(typeof $.sortMapEntries==="function")z.items.sort($.sortMapEntries);return z}add($,q){let Z;if(A0.isPair($))Z=$;else if(!$||typeof $!=="object"||!("key"in $))Z=new Bq.Pair($,$?.value);else Z=new Bq.Pair($.key,$.value);let Q=A$(this.items,Z.key),X=this.schema?.sortMapEntries;if(Q){if(!q)throw Error(`Key ${Z.key} already set`);if(A0.isScalar(Q.value)&&u7.isScalarValue(Z.value))Q.value.value=Z.value;else Q.value=Z.value}else if(X){let z=this.items.findIndex((J)=>X(Z,J)<0);if(z===-1)this.items.push(Z);else this.items.splice(z,0,Z)}else this.items.push(Z)}delete($){let q=A$(this.items,$);if(!q)return!1;return this.items.splice(this.items.indexOf(q),1).length>0}get($,q){let Q=A$(this.items,$)?.value;return(!q&&A0.isScalar(Q)?Q.value:Q)??void 0}has($){return!!A$(this.items,$)}set($,q){this.add(new Bq.Pair($,q),!0)}toJSON($,q,Z){let Q=Z?new Z:q?.mapAsMap?new Map:{};if(q?.onCreate)q.onCreate(Q);for(let X of this.items)v7.addPairToJSMap(q,Q,X);return Q}toString($,q,Z){if(!$)return JSON.stringify(this);for(let Q of this.items)if(!A0.isPair(Q))throw Error(`Map items must all be pairs; found ${JSON.stringify(Q)} instead`);if(!$.allNullValues&&this.hasAllNullValues(!1))$=Object.assign({},$,{allNullValues:!0});return h7.stringifyCollection(this,$,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:$.indent||"",onChompKeep:Z,onComment:q})}}m7.YAMLMap=q1;m7.findPair=A$});var r0=R((n7)=>{var c7=f(),Z1=T0(),l7={collection:"map",default:!0,nodeClass:Z1.YAMLMap,tag:"tag:yaml.org,2002:map",resolve($,q){if(!c7.isMap($))q("Expected a mapping for this tag");return $},createNode:($,q,Z)=>Z1.YAMLMap.from($,q,Z)};n7.map=l7});var I0=R((e7)=>{var o7=V$(),a7=I9(),s7=Qq(),Lq=f(),t7=u(),r7=_0();class Q1 extends s7.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor($){super(Lq.SEQ,$);this.items=[]}add($){this.items.push($)}delete($){let q=_q($);if(typeof q!=="number")return!1;return this.items.splice(q,1).length>0}get($,q){let Z=_q($);if(typeof Z!=="number")return;let Q=this.items[Z];return!q&&Lq.isScalar(Q)?Q.value:Q}has($){let q=_q($);return typeof q==="number"&&q<this.items.length}set($,q){let Z=_q($);if(typeof Z!=="number")throw Error(`Expected a valid index, not ${$}.`);let Q=this.items[Z];if(Lq.isScalar(Q)&&t7.isScalarValue(q))Q.value=q;else this.items[Z]=q}toJSON($,q){let Z=[];if(q?.onCreate)q.onCreate(Z);let Q=0;for(let X of this.items)Z.push(r7.toJS(X,String(Q++),q));return Z}toString($,q,Z){if(!$)return JSON.stringify(this);return a7.stringifyCollection(this,$,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:($.indent||"")+" ",onChompKeep:Z,onComment:q})}static from($,q,Z){let{replacer:Q}=Z,X=new this($);if(q&&Symbol.iterator in Object(q)){let z=0;for(let J of q){if(typeof Q==="function"){let G=q instanceof Set?J:String(z++);J=Q.call(q,G,J)}X.items.push(o7.createNode(J,void 0,Z))}}return X}}function _q($){let q=Lq.isScalar($)?$.value:$;if(q&&typeof q==="string")q=Number(q);return typeof q==="number"&&Number.isInteger(q)&&q>=0?q:null}e7.YAMLSeq=Q1});var e0=R((QQ)=>{var qQ=f(),X1=I0(),ZQ={collection:"seq",default:!0,nodeClass:X1.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve($,q){if(!qQ.isSeq($))q("Expected a sequence for this tag");return $},createNode:($,q,Z)=>X1.YAMLSeq.from($,q,Z)};QQ.seq=ZQ});var T$=R((GQ)=>{var zQ=_$(),JQ={identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify($,q,Z,Q){return q=Object.assign({actualString:!0},q),zQ.stringifyString($,q,Z,Q)}};GQ.string=JQ});var Fq=R((UQ)=>{var z1=u(),J1={identify:($)=>$==null,createNode:()=>new z1.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new z1.Scalar(null),stringify:({source:$},q)=>typeof $==="string"&&J1.test.test($)?$:q.options.nullStr};UQ.nullTag=J1});var M9=R((VQ)=>{var HQ=u(),G1={identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:($)=>new HQ.Scalar($[0]==="t"||$[0]==="T"),stringify({source:$,value:q},Z){if($&&G1.test.test($)){let Q=$[0]==="t"||$[0]==="T";if(q===Q)return $}return q?Z.options.trueStr:Z.options.falseStr}};VQ.boolTag=G1});var $$=R((_Q)=>{function BQ({format:$,minFractionDigits:q,tag:Z,value:Q}){if(typeof Q==="bigint")return String(Q);let X=typeof Q==="number"?Q:Number(Q);if(!isFinite(X))return isNaN(X)?".nan":X<0?"-.inf":".inf";let z=Object.is(Q,-0)?"-0":JSON.stringify(Q);if(!$&&q&&(!Z||Z==="tag:yaml.org,2002:float")&&/^\d/.test(z)){let J=z.indexOf(".");if(J<0)J=z.length,z+=".";let G=q-(z.length-J-1);while(G-- >0)z+="0"}return z}_Q.stringifyNumber=BQ});var N9=R((IQ)=>{var FQ=u(),j9=$$(),OQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:j9.stringifyNumber},AQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($),stringify($){let q=Number($.value);return isFinite(q)?q.toExponential():j9.stringifyNumber($)}},TQ={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve($){let q=new FQ.Scalar(parseFloat($)),Z=$.indexOf(".");if(Z!==-1&&$[$.length-1]==="0")q.minFractionDigits=$.length-Z-1;return q},stringify:j9.stringifyNumber};IQ.float=TQ;IQ.floatExp=AQ;IQ.floatNaN=OQ});var R9=R((PQ)=>{var Y1=$$(),Oq=($)=>typeof $==="bigint"||Number.isInteger($),D9=($,q,Z,{intAsBigInt:Q})=>Q?BigInt($):parseInt($.substring(q),Z);function U1($,q,Z){let{value:Q}=$;if(Oq(Q)&&Q>=0)return Z+Q.toString(q);return Y1.stringifyNumber($)}var DQ={identify:($)=>Oq($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:($,q,Z)=>D9($,2,8,Z),stringify:($)=>U1($,8,"0o")},RQ={identify:Oq,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:($,q,Z)=>D9($,0,10,Z),stringify:Y1.stringifyNumber},wQ={identify:($)=>Oq($)&&$>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:($,q,Z)=>D9($,2,16,Z),stringify:($)=>U1($,16,"0x")};PQ.int=RQ;PQ.intHex=wQ;PQ.intOct=DQ});var W1=R((vQ)=>{var bQ=r0(),xQ=Fq(),yQ=e0(),kQ=T$(),fQ=M9(),w9=N9(),P9=R9(),hQ=[bQ.map,yQ.seq,kQ.string,xQ.nullTag,fQ.boolTag,P9.intOct,P9.int,P9.intHex,w9.floatNaN,w9.floatExp,w9.float];vQ.schema=hQ});var V1=R((nQ)=>{var uQ=u(),mQ=r0(),pQ=e0();function H1($){return typeof $==="bigint"||Number.isInteger($)}var Aq=({value:$})=>JSON.stringify($),dQ=[{identify:($)=>typeof $==="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:($)=>$,stringify:Aq},{identify:($)=>$==null,createNode:()=>new uQ.Scalar(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Aq},{identify:($)=>typeof $==="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:($)=>$==="true",stringify:Aq},{identify:H1,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:($,q,{intAsBigInt:Z})=>Z?BigInt($):parseInt($,10),stringify:({value:$})=>H1($)?$.toString():JSON.stringify($)},{identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:($)=>parseFloat($),stringify:Aq}],cQ={default:!0,tag:"",test:/^/,resolve($,q){return q(`Unresolved plain scalar ${JSON.stringify($)}`),$}},lQ=[mQ.map,pQ.seq].concat(dQ,cQ);nQ.schema=lQ});var E9=R((sQ)=>{var I$=h("buffer"),C9=u(),oQ=_$(),aQ={identify:($)=>$ instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve($,q){if(typeof I$.Buffer==="function")return I$.Buffer.from($,"base64");else if(typeof atob==="function"){let Z=atob($.replace(/[\n\r]/g,"")),Q=new Uint8Array(Z.length);for(let X=0;X<Z.length;++X)Q[X]=Z.charCodeAt(X);return Q}else return q("This environment does not support reading binary tags; either Buffer or atob is required"),$},stringify({comment:$,type:q,value:Z},Q,X,z){if(!Z)return"";let J=Z,G;if(typeof I$.Buffer==="function")G=J instanceof I$.Buffer?J.toString("base64"):I$.Buffer.from(J.buffer).toString("base64");else if(typeof btoa==="function"){let Y="";for(let U=0;U<J.length;++U)Y+=String.fromCharCode(J[U]);G=btoa(Y)}else throw Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(q??(q=C9.Scalar.BLOCK_LITERAL),q!==C9.Scalar.QUOTE_DOUBLE){let Y=Math.max(Q.options.lineWidth-Q.indent.length,Q.options.minContentWidth),U=Math.ceil(G.length/Y),V=Array(U);for(let H=0,K=0;H<U;++H,K+=Y)V[H]=G.substr(K,Y);G=V.join(q===C9.Scalar.BLOCK_LITERAL?`
|
|
53
|
+
`:" ")}return oQ.stringifyString({comment:$,type:q,value:G},Q,X,z)}};sQ.binary=aQ});var Iq=R((qX)=>{var Tq=f(),S9=O0(),rQ=u(),eQ=I0();function K1($,q){if(Tq.isSeq($))for(let Z=0;Z<$.items.length;++Z){let Q=$.items[Z];if(Tq.isPair(Q))continue;else if(Tq.isMap(Q)){if(Q.items.length>1)q("Each pair must have its own sequence indicator");let X=Q.items[0]||new S9.Pair(new rQ.Scalar(null));if(Q.commentBefore)X.key.commentBefore=X.key.commentBefore?`${Q.commentBefore}
|
|
54
54
|
${X.key.commentBefore}`:Q.commentBefore;if(Q.comment){let z=X.value??X.key;z.comment=z.comment?`${Q.comment}
|
|
55
|
-
${z.comment}`:Q.comment}Q=X}$.items[Z]=Iq.isPair(Q)?Q:new P9.Pair(Q)}else q("Expected a sequence for this tag");return $}function W1($,q,Z){let{replacer:Q}=Z,X=new sQ.YAMLSeq($);X.tag="tag:yaml.org,2002:pairs";let z=0;if(q&&Symbol.iterator in Object(q))for(let J of q){if(typeof Q==="function")J=Q.call(q,String(z++),J);let G,Y;if(Array.isArray(J))if(J.length===2)G=J[0],Y=J[1];else throw TypeError(`Expected [key, value] tuple: ${J}`);else if(J&&J instanceof Object){let U=Object.keys(J);if(U.length===1)G=U[0],Y=J[G];else throw TypeError(`Expected tuple with one key, not ${U.length} keys`)}else G=J;X.items.push(P9.createPair(G,Y,Z))}return X}var tQ={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:U1,createNode:W1};rQ.createPairs=W1;rQ.pairs=tQ;rQ.resolvePairs=U1});var E9=R((XX)=>{var H1=f(),C9=_0(),M$=I0(),ZX=T0(),V1=Tq();class b0 extends ZX.YAMLSeq{constructor(){super();this.add=M$.YAMLMap.prototype.add.bind(this),this.delete=M$.YAMLMap.prototype.delete.bind(this),this.get=M$.YAMLMap.prototype.get.bind(this),this.has=M$.YAMLMap.prototype.has.bind(this),this.set=M$.YAMLMap.prototype.set.bind(this),this.tag=b0.tag}toJSON($,q){if(!q)return super.toJSON($);let Z=new Map;if(q?.onCreate)q.onCreate(Z);for(let Q of this.items){let X,z;if(H1.isPair(Q))X=C9.toJS(Q.key,"",q),z=C9.toJS(Q.value,X,q);else X=C9.toJS(Q,"",q);if(Z.has(X))throw Error("Ordered maps must not include duplicate keys");Z.set(X,z)}return Z}static from($,q,Z){let Q=V1.createPairs($,q,Z),X=new this;return X.items=Q.items,X}}b0.tag="tag:yaml.org,2002:omap";var QX={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:b0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,q){let Z=V1.resolvePairs($,q),Q=[];for(let{key:X}of Z.items)if(H1.isScalar(X))if(Q.includes(X.value))q(`Ordered maps must not include duplicate keys: ${X.value}`);else Q.push(X.value);return Object.assign(new b0,Z)},createNode:($,q,Z)=>b0.from($,q,Z)};XX.YAMLOMap=b0;XX.omap=QX});var F1=R((GX)=>{var B1=u();function K1({value:$,source:q},Z){if(q&&($?_1:L1).test.test(q))return q;return $?Z.options.trueStr:Z.options.falseStr}var _1={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new B1.Scalar(!0),stringify:K1},L1={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new B1.Scalar(!1),stringify:K1};GX.falseTag=L1;GX.trueTag=_1});var O1=R((KX)=>{var WX=u(),S9=$$(),HX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:S9.stringifyNumber},VX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let q=Number($.value);return isFinite(q)?q.toExponential():S9.stringifyNumber($)}},BX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let q=new WX.Scalar(parseFloat($.replace(/_/g,""))),Z=$.indexOf(".");if(Z!==-1){let Q=$.substring(Z+1).replace(/_/g,"");if(Q[Q.length-1]==="0")q.minFractionDigits=Q.length}return q},stringify:S9.stringifyNumber};KX.float=BX;KX.floatExp=VX;KX.floatNaN=HX});var I1=R((MX)=>{var A1=$$(),j$=($)=>typeof $==="bigint"||Number.isInteger($);function Mq($,q,Z,{intAsBigInt:Q}){let X=$[0];if(X==="-"||X==="+")q+=1;if($=$.substring(q).replace(/_/g,""),Q){switch(Z){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let J=BigInt($);return X==="-"?BigInt(-1)*J:J}let z=parseInt($,Z);return X==="-"?-1*z:z}function b9($,q,Z){let{value:Q}=$;if(j$(Q)){let X=Q.toString(q);return Q<0?"-"+Z+X.substr(1):Z+X}return A1.stringifyNumber($)}var OX={identify:j$,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,q,Z)=>Mq($,2,2,Z),stringify:($)=>b9($,2,"0b")},AX={identify:j$,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,q,Z)=>Mq($,1,8,Z),stringify:($)=>b9($,8,"0")},IX={identify:j$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,q,Z)=>Mq($,0,10,Z),stringify:A1.stringifyNumber},TX={identify:j$,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,q,Z)=>Mq($,2,16,Z),stringify:($)=>b9($,16,"0x")};MX.int=IX;MX.intBin=OX;MX.intHex=TX;MX.intOct=AX});var x9=R((PX)=>{var Dq=f(),jq=O0(),Nq=I0();class x0 extends Nq.YAMLMap{constructor($){super($);this.tag=x0.tag}add($){let q;if(Dq.isPair($))q=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)q=new jq.Pair($.key,null);else q=new jq.Pair($,null);if(!Nq.findPair(this.items,q.key))this.items.push(q)}get($,q){let Z=Nq.findPair(this.items,$);return!q&&Dq.isPair(Z)?Dq.isScalar(Z.key)?Z.key.value:Z.key:Z}set($,q){if(typeof q!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof q}`);let Z=Nq.findPair(this.items,$);if(Z&&!q)this.items.splice(this.items.indexOf(Z),1);else if(!Z&&q)this.items.push(new jq.Pair($))}toJSON($,q){return super.toJSON($,q,Set)}toString($,q,Z){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),q,Z);else throw Error("Set items must all have null values")}static from($,q,Z){let{replacer:Q}=Z,X=new this($);if(q&&Symbol.iterator in Object(q))for(let z of q){if(typeof Q==="function")z=Q.call(q,z,z);X.items.push(jq.createPair(z,null,Z))}return X}}x0.tag="tag:yaml.org,2002:set";var wX={collection:"map",identify:($)=>$ instanceof Set,nodeClass:x0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,q,Z)=>x0.from($,q,Z),resolve($,q){if(Dq.isMap($))if($.hasAllNullValues(!0))return Object.assign(new x0,$);else q("Set items must all have null values");else q("Expected a mapping for this tag");return $}};PX.YAMLSet=x0;PX.set=wX});var k9=R((yX)=>{var SX=$$();function y9($,q){let Z=$[0],Q=Z==="-"||Z==="+"?$.substring(1):$,X=(J)=>q?BigInt(J):Number(J),z=Q.replace(/_/g,"").split(":").reduce((J,G)=>J*X(60)+X(G),X(0));return Z==="-"?X(-1)*z:z}function T1($){let{value:q}=$,Z=(J)=>J;if(typeof q==="bigint")Z=(J)=>BigInt(J);else if(isNaN(q)||!isFinite(q))return SX.stringifyNumber($);let Q="";if(q<0)Q="-",q*=Z(-1);let X=Z(60),z=[q%X];if(q<60)z.unshift(0);else if(q=(q-z[0])/X,z.unshift(q%X),q>=60)q=(q-z[0])/X,z.unshift(q);return Q+z.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var bX={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,q,{intAsBigInt:Z})=>y9($,Z),stringify:T1},xX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>y9($,!1),stringify:T1},M1={identify:($)=>$ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve($){let q=$.match(M1.test);if(!q)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,Z,Q,X,z,J,G]=q.map(Number),Y=q[7]?Number((q[7]+"00").substr(1,3)):0,U=Date.UTC(Z,Q-1,X,z||0,J||0,G||0,Y),V=q[8];if(V&&V!=="Z"){let H=y9(V,!1);if(Math.abs(H)<30)H*=60;U-=60000*H}return new Date(U)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};yX.floatTime=xX;yX.intTime=bX;yX.timestamp=M1});var N1=R((oX)=>{var vX=r0(),gX=Fq(),uX=e0(),mX=I$(),pX=w9(),j1=F1(),f9=O1(),Rq=I1(),dX=Uq(),cX=E9(),lX=Tq(),nX=x9(),h9=k9(),iX=[vX.map,uX.seq,mX.string,gX.nullTag,j1.trueTag,j1.falseTag,Rq.intBin,Rq.intOct,Rq.int,Rq.intHex,f9.floatNaN,f9.floatExp,f9.float,pX.binary,dX.merge,cX.omap,lX.pairs,nX.set,h9.intTime,h9.floatTime,h9.timestamp];oX.schema=iX});var y1=R((Qz)=>{var P1=r0(),sX=Fq(),C1=e0(),tX=I$(),rX=A9(),v9=T9(),g9=j9(),eX=J1(),$z=Y1(),E1=w9(),N$=Uq(),S1=E9(),b1=Tq(),D1=N1(),x1=x9(),wq=k9(),R1=new Map([["core",eX.schema],["failsafe",[P1.map,C1.seq,tX.string]],["json",$z.schema],["yaml11",D1.schema],["yaml-1.1",D1.schema]]),w1={binary:E1.binary,bool:rX.boolTag,float:v9.float,floatExp:v9.floatExp,floatNaN:v9.floatNaN,floatTime:wq.floatTime,int:g9.int,intHex:g9.intHex,intOct:g9.intOct,intTime:wq.intTime,map:P1.map,merge:N$.merge,null:sX.nullTag,omap:S1.omap,pairs:b1.pairs,seq:C1.seq,set:x1.set,timestamp:wq.timestamp},qz={"tag:yaml.org,2002:binary":E1.binary,"tag:yaml.org,2002:merge":N$.merge,"tag:yaml.org,2002:omap":S1.omap,"tag:yaml.org,2002:pairs":b1.pairs,"tag:yaml.org,2002:set":x1.set,"tag:yaml.org,2002:timestamp":wq.timestamp};function Zz($,q,Z){let Q=R1.get(q);if(Q&&!$)return Z&&!Q.includes(N$.merge)?Q.concat(N$.merge):Q.slice();let X=Q;if(!X)if(Array.isArray($))X=[];else{let z=Array.from(R1.keys()).filter((J)=>J!=="yaml11").map((J)=>JSON.stringify(J)).join(", ");throw Error(`Unknown schema "${q}"; use one of ${z} or define customTags array`)}if(Array.isArray($))for(let z of $)X=X.concat(z);else if(typeof $==="function")X=$(X.slice());if(Z)X=X.concat(N$.merge);return X.reduce((z,J)=>{let G=typeof J==="string"?w1[J]:J;if(!G){let Y=JSON.stringify(J),U=Object.keys(w1).map((V)=>JSON.stringify(V)).join(", ");throw Error(`Unknown custom tag ${Y}; use one of ${U}`)}if(!z.includes(G))z.push(G);return z},[])}Qz.coreKnownTags=qz;Qz.getTags=Zz});var p9=R((Wz)=>{var u9=f(),Jz=r0(),Gz=e0(),Yz=I$(),Pq=y1(),Uz=($,q)=>$.key<q.key?-1:$.key>q.key?1:0;class m9{constructor({compat:$,customTags:q,merge:Z,resolveKnownTags:Q,schema:X,sortMapEntries:z,toStringDefaults:J}){this.compat=Array.isArray($)?Pq.getTags($,"compat"):$?Pq.getTags(null,$):null,this.name=typeof X==="string"&&X||"core",this.knownTags=Q?Pq.coreKnownTags:{},this.tags=Pq.getTags(q,this.name,Z),this.toStringOptions=J??null,Object.defineProperty(this,u9.MAP,{value:Jz.map}),Object.defineProperty(this,u9.SCALAR,{value:Yz.string}),Object.defineProperty(this,u9.SEQ,{value:Gz.seq}),this.sortMapEntries=typeof z==="function"?z:z===!0?Uz:null}clone(){let $=Object.create(m9.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}Wz.Schema=m9});var k1=R((Kz)=>{var Vz=f(),d9=L$(),D$=B$();function Bz($,q){let Z=[],Q=q.directives===!0;if(q.directives!==!1&&$.directives){let Y=$.directives.toString($);if(Y)Z.push(Y),Q=!0;else if($.directives.docStart)Q=!0}if(Q)Z.push("---");let X=d9.createStringifyContext($,q),{commentString:z}=X.options;if($.commentBefore){if(Z.length!==1)Z.unshift("");let Y=z($.commentBefore);Z.unshift(D$.indentComment(Y,""))}let J=!1,G=null;if($.contents){if(Vz.isNode($.contents)){if($.contents.spaceBefore&&Q)Z.push("");if($.contents.commentBefore){let V=z($.contents.commentBefore);Z.push(D$.indentComment(V,""))}X.forceBlockIndent=!!$.comment,G=$.contents.comment}let Y=G?void 0:()=>J=!0,U=d9.stringify($.contents,X,()=>G=null,Y);if(G)U+=D$.lineComment(U,"",z(G));if((U[0]==="|"||U[0]===">")&&Z[Z.length-1]==="---")Z[Z.length-1]=`--- ${U}`;else Z.push(U)}else Z.push(d9.stringify($.contents,X));if($.directives?.docEnd)if($.comment){let Y=z($.comment);if(Y.includes(`
|
|
55
|
+
${z.comment}`:Q.comment}Q=X}$.items[Z]=Tq.isPair(Q)?Q:new S9.Pair(Q)}else q("Expected a sequence for this tag");return $}function B1($,q,Z){let{replacer:Q}=Z,X=new eQ.YAMLSeq($);X.tag="tag:yaml.org,2002:pairs";let z=0;if(q&&Symbol.iterator in Object(q))for(let J of q){if(typeof Q==="function")J=Q.call(q,String(z++),J);let G,Y;if(Array.isArray(J))if(J.length===2)G=J[0],Y=J[1];else throw TypeError(`Expected [key, value] tuple: ${J}`);else if(J&&J instanceof Object){let U=Object.keys(J);if(U.length===1)G=U[0],Y=J[G];else throw TypeError(`Expected tuple with one key, not ${U.length} keys`)}else G=J;X.items.push(S9.createPair(G,Y,Z))}return X}var $X={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:K1,createNode:B1};qX.createPairs=B1;qX.pairs=$X;qX.resolvePairs=K1});var x9=R((GX)=>{var _1=f(),b9=_0(),M$=T0(),zX=I0(),L1=Iq();class b0 extends zX.YAMLSeq{constructor(){super();this.add=M$.YAMLMap.prototype.add.bind(this),this.delete=M$.YAMLMap.prototype.delete.bind(this),this.get=M$.YAMLMap.prototype.get.bind(this),this.has=M$.YAMLMap.prototype.has.bind(this),this.set=M$.YAMLMap.prototype.set.bind(this),this.tag=b0.tag}toJSON($,q){if(!q)return super.toJSON($);let Z=new Map;if(q?.onCreate)q.onCreate(Z);for(let Q of this.items){let X,z;if(_1.isPair(Q))X=b9.toJS(Q.key,"",q),z=b9.toJS(Q.value,X,q);else X=b9.toJS(Q,"",q);if(Z.has(X))throw Error("Ordered maps must not include duplicate keys");Z.set(X,z)}return Z}static from($,q,Z){let Q=L1.createPairs($,q,Z),X=new this;return X.items=Q.items,X}}b0.tag="tag:yaml.org,2002:omap";var JX={collection:"seq",identify:($)=>$ instanceof Map,nodeClass:b0,default:!1,tag:"tag:yaml.org,2002:omap",resolve($,q){let Z=L1.resolvePairs($,q),Q=[];for(let{key:X}of Z.items)if(_1.isScalar(X))if(Q.includes(X.value))q(`Ordered maps must not include duplicate keys: ${X.value}`);else Q.push(X.value);return Object.assign(new b0,Z)},createNode:($,q,Z)=>b0.from($,q,Z)};GX.YAMLOMap=b0;GX.omap=JX});var I1=R((WX)=>{var F1=u();function O1({value:$,source:q},Z){if(q&&($?A1:T1).test.test(q))return q;return $?Z.options.trueStr:Z.options.falseStr}var A1={identify:($)=>$===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new F1.Scalar(!0),stringify:O1},T1={identify:($)=>$===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new F1.Scalar(!1),stringify:O1};WX.falseTag=T1;WX.trueTag=A1});var M1=R((FX)=>{var KX=u(),y9=$$(),BX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:($)=>$.slice(-3).toLowerCase()==="nan"?NaN:$[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:y9.stringifyNumber},_X={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:($)=>parseFloat($.replace(/_/g,"")),stringify($){let q=Number($.value);return isFinite(q)?q.toExponential():y9.stringifyNumber($)}},LX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve($){let q=new KX.Scalar(parseFloat($.replace(/_/g,""))),Z=$.indexOf(".");if(Z!==-1){let Q=$.substring(Z+1).replace(/_/g,"");if(Q[Q.length-1]==="0")q.minFractionDigits=Q.length}return q},stringify:y9.stringifyNumber};FX.float=LX;FX.floatExp=_X;FX.floatNaN=BX});var N1=R((DX)=>{var j1=$$(),j$=($)=>typeof $==="bigint"||Number.isInteger($);function Mq($,q,Z,{intAsBigInt:Q}){let X=$[0];if(X==="-"||X==="+")q+=1;if($=$.substring(q).replace(/_/g,""),Q){switch(Z){case 2:$=`0b${$}`;break;case 8:$=`0o${$}`;break;case 16:$=`0x${$}`;break}let J=BigInt($);return X==="-"?BigInt(-1)*J:J}let z=parseInt($,Z);return X==="-"?-1*z:z}function k9($,q,Z){let{value:Q}=$;if(j$(Q)){let X=Q.toString(q);return Q<0?"-"+Z+X.substr(1):Z+X}return j1.stringifyNumber($)}var IX={identify:j$,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:($,q,Z)=>Mq($,2,2,Z),stringify:($)=>k9($,2,"0b")},MX={identify:j$,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:($,q,Z)=>Mq($,1,8,Z),stringify:($)=>k9($,8,"0")},jX={identify:j$,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:($,q,Z)=>Mq($,0,10,Z),stringify:j1.stringifyNumber},NX={identify:j$,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:($,q,Z)=>Mq($,2,16,Z),stringify:($)=>k9($,16,"0x")};DX.int=jX;DX.intBin=IX;DX.intHex=NX;DX.intOct=MX});var f9=R((SX)=>{var Dq=f(),jq=O0(),Nq=T0();class x0 extends Nq.YAMLMap{constructor($){super($);this.tag=x0.tag}add($){let q;if(Dq.isPair($))q=$;else if($&&typeof $==="object"&&"key"in $&&"value"in $&&$.value===null)q=new jq.Pair($.key,null);else q=new jq.Pair($,null);if(!Nq.findPair(this.items,q.key))this.items.push(q)}get($,q){let Z=Nq.findPair(this.items,$);return!q&&Dq.isPair(Z)?Dq.isScalar(Z.key)?Z.key.value:Z.key:Z}set($,q){if(typeof q!=="boolean")throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof q}`);let Z=Nq.findPair(this.items,$);if(Z&&!q)this.items.splice(this.items.indexOf(Z),1);else if(!Z&&q)this.items.push(new jq.Pair($))}toJSON($,q){return super.toJSON($,q,Set)}toString($,q,Z){if(!$)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},$,{allNullValues:!0}),q,Z);else throw Error("Set items must all have null values")}static from($,q,Z){let{replacer:Q}=Z,X=new this($);if(q&&Symbol.iterator in Object(q))for(let z of q){if(typeof Q==="function")z=Q.call(q,z,z);X.items.push(jq.createPair(z,null,Z))}return X}}x0.tag="tag:yaml.org,2002:set";var EX={collection:"map",identify:($)=>$ instanceof Set,nodeClass:x0,default:!1,tag:"tag:yaml.org,2002:set",createNode:($,q,Z)=>x0.from($,q,Z),resolve($,q){if(Dq.isMap($))if($.hasAllNullValues(!0))return Object.assign(new x0,$);else q("Set items must all have null values");else q("Expected a mapping for this tag");return $}};SX.YAMLSet=x0;SX.set=EX});var v9=R((hX)=>{var yX=$$();function h9($,q){let Z=$[0],Q=Z==="-"||Z==="+"?$.substring(1):$,X=(J)=>q?BigInt(J):Number(J),z=Q.replace(/_/g,"").split(":").reduce((J,G)=>J*X(60)+X(G),X(0));return Z==="-"?X(-1)*z:z}function D1($){let{value:q}=$,Z=(J)=>J;if(typeof q==="bigint")Z=(J)=>BigInt(J);else if(isNaN(q)||!isFinite(q))return yX.stringifyNumber($);let Q="";if(q<0)Q="-",q*=Z(-1);let X=Z(60),z=[q%X];if(q<60)z.unshift(0);else if(q=(q-z[0])/X,z.unshift(q%X),q>=60)q=(q-z[0])/X,z.unshift(q);return Q+z.map((J)=>String(J).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}var kX={identify:($)=>typeof $==="bigint"||Number.isInteger($),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:($,q,{intAsBigInt:Z})=>h9($,Z),stringify:D1},fX={identify:($)=>typeof $==="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:($)=>h9($,!1),stringify:D1},R1={identify:($)=>$ instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve($){let q=$.match(R1.test);if(!q)throw Error("!!timestamp expects a date, starting with yyyy-mm-dd");let[,Z,Q,X,z,J,G]=q.map(Number),Y=q[7]?Number((q[7]+"00").substr(1,3)):0,U=Date.UTC(Z,Q-1,X,z||0,J||0,G||0,Y),V=q[8];if(V&&V!=="Z"){let H=h9(V,!1);if(Math.abs(H)<30)H*=60;U-=60000*H}return new Date(U)},stringify:({value:$})=>$?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""};hX.floatTime=fX;hX.intTime=kX;hX.timestamp=R1});var P1=R((tX)=>{var mX=r0(),pX=Fq(),dX=e0(),cX=T$(),lX=E9(),w1=I1(),g9=M1(),Rq=N1(),nX=Uq(),iX=x9(),oX=Iq(),aX=f9(),u9=v9(),sX=[mX.map,dX.seq,cX.string,pX.nullTag,w1.trueTag,w1.falseTag,Rq.intBin,Rq.intOct,Rq.int,Rq.intHex,g9.floatNaN,g9.floatExp,g9.float,lX.binary,nX.merge,iX.omap,oX.pairs,aX.set,u9.intTime,u9.floatTime,u9.timestamp];tX.schema=sX});var v1=R((Jz)=>{var b1=r0(),eX=Fq(),x1=e0(),$z=T$(),qz=M9(),m9=N9(),p9=R9(),Zz=W1(),Qz=V1(),y1=E9(),N$=Uq(),k1=x9(),f1=Iq(),C1=P1(),h1=f9(),wq=v9(),E1=new Map([["core",Zz.schema],["failsafe",[b1.map,x1.seq,$z.string]],["json",Qz.schema],["yaml11",C1.schema],["yaml-1.1",C1.schema]]),S1={binary:y1.binary,bool:qz.boolTag,float:m9.float,floatExp:m9.floatExp,floatNaN:m9.floatNaN,floatTime:wq.floatTime,int:p9.int,intHex:p9.intHex,intOct:p9.intOct,intTime:wq.intTime,map:b1.map,merge:N$.merge,null:eX.nullTag,omap:k1.omap,pairs:f1.pairs,seq:x1.seq,set:h1.set,timestamp:wq.timestamp},Xz={"tag:yaml.org,2002:binary":y1.binary,"tag:yaml.org,2002:merge":N$.merge,"tag:yaml.org,2002:omap":k1.omap,"tag:yaml.org,2002:pairs":f1.pairs,"tag:yaml.org,2002:set":h1.set,"tag:yaml.org,2002:timestamp":wq.timestamp};function zz($,q,Z){let Q=E1.get(q);if(Q&&!$)return Z&&!Q.includes(N$.merge)?Q.concat(N$.merge):Q.slice();let X=Q;if(!X)if(Array.isArray($))X=[];else{let z=Array.from(E1.keys()).filter((J)=>J!=="yaml11").map((J)=>JSON.stringify(J)).join(", ");throw Error(`Unknown schema "${q}"; use one of ${z} or define customTags array`)}if(Array.isArray($))for(let z of $)X=X.concat(z);else if(typeof $==="function")X=$(X.slice());if(Z)X=X.concat(N$.merge);return X.reduce((z,J)=>{let G=typeof J==="string"?S1[J]:J;if(!G){let Y=JSON.stringify(J),U=Object.keys(S1).map((V)=>JSON.stringify(V)).join(", ");throw Error(`Unknown custom tag ${Y}; use one of ${U}`)}if(!z.includes(G))z.push(G);return z},[])}Jz.coreKnownTags=Xz;Jz.getTags=zz});var l9=R((Kz)=>{var d9=f(),Uz=r0(),Wz=e0(),Hz=T$(),Pq=v1(),Vz=($,q)=>$.key<q.key?-1:$.key>q.key?1:0;class c9{constructor({compat:$,customTags:q,merge:Z,resolveKnownTags:Q,schema:X,sortMapEntries:z,toStringDefaults:J}){this.compat=Array.isArray($)?Pq.getTags($,"compat"):$?Pq.getTags(null,$):null,this.name=typeof X==="string"&&X||"core",this.knownTags=Q?Pq.coreKnownTags:{},this.tags=Pq.getTags(q,this.name,Z),this.toStringOptions=J??null,Object.defineProperty(this,d9.MAP,{value:Uz.map}),Object.defineProperty(this,d9.SCALAR,{value:Hz.string}),Object.defineProperty(this,d9.SEQ,{value:Wz.seq}),this.sortMapEntries=typeof z==="function"?z:z===!0?Vz:null}clone(){let $=Object.create(c9.prototype,Object.getOwnPropertyDescriptors(this));return $.tags=this.tags.slice(),$}}Kz.Schema=c9});var g1=R((Fz)=>{var _z=f(),n9=L$(),D$=K$();function Lz($,q){let Z=[],Q=q.directives===!0;if(q.directives!==!1&&$.directives){let Y=$.directives.toString($);if(Y)Z.push(Y),Q=!0;else if($.directives.docStart)Q=!0}if(Q)Z.push("---");let X=n9.createStringifyContext($,q),{commentString:z}=X.options;if($.commentBefore){if(Z.length!==1)Z.unshift("");let Y=z($.commentBefore);Z.unshift(D$.indentComment(Y,""))}let J=!1,G=null;if($.contents){if(_z.isNode($.contents)){if($.contents.spaceBefore&&Q)Z.push("");if($.contents.commentBefore){let V=z($.contents.commentBefore);Z.push(D$.indentComment(V,""))}X.forceBlockIndent=!!$.comment,G=$.contents.comment}let Y=G?void 0:()=>J=!0,U=n9.stringify($.contents,X,()=>G=null,Y);if(G)U+=D$.lineComment(U,"",z(G));if((U[0]==="|"||U[0]===">")&&Z[Z.length-1]==="---")Z[Z.length-1]=`--- ${U}`;else Z.push(U)}else Z.push(n9.stringify($.contents,X));if($.directives?.docEnd)if($.comment){let Y=z($.comment);if(Y.includes(`
|
|
56
56
|
`))Z.push("..."),Z.push(D$.indentComment(Y,""));else Z.push(`... ${Y}`)}else Z.push("...");else{let Y=$.comment;if(Y&&J)Y=Y.replace(/^\n+/,"");if(Y){if((!J||G)&&Z[Z.length-1]!=="")Z.push("");Z.push(D$.indentComment(z(Y),""))}}return Z.join(`
|
|
57
57
|
`)+`
|
|
58
|
-
`}
|
|
58
|
+
`}Fz.stringifyDocument=Lz});var R$=R((Rz)=>{var Az=H$(),q$=Qq(),$0=f(),Tz=O0(),Iz=_0(),Mz=l9(),jz=g1(),i9=$q(),Nz=V9(),Dz=V$(),o9=H9();class a9{constructor($,q,Z){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,$0.NODE_TYPE,{value:$0.DOC});let Q=null;if(typeof q==="function"||Array.isArray(q))Q=q;else if(Z===void 0&&q)Z=q,q=void 0;let X=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},Z);this.options=X;let{version:z}=X;if(Z?._directives){if(this.directives=Z._directives.atDocument(),this.directives.yaml.explicit)z=this.directives.yaml.version}else this.directives=new o9.Directives({version:z});this.setSchema(z,Z),this.contents=$===void 0?null:this.createNode($,Q,Z)}clone(){let $=Object.create(a9.prototype,{[$0.NODE_TYPE]:{value:$0.DOC}});if($.commentBefore=this.commentBefore,$.comment=this.comment,$.errors=this.errors.slice(),$.warnings=this.warnings.slice(),$.options=Object.assign({},this.options),this.directives)$.directives=this.directives.clone();if($.schema=this.schema.clone(),$.contents=$0.isNode(this.contents)?this.contents.clone($.schema):this.contents,this.range)$.range=this.range.slice();return $}add($){if(Z$(this.contents))this.contents.add($)}addIn($,q){if(Z$(this.contents))this.contents.addIn($,q)}createAlias($,q){if(!$.anchor){let Z=i9.anchorNames(this);$.anchor=!q||Z.has(q)?i9.findNewAnchor(q||"a",Z):q}return new Az.Alias($.anchor)}createNode($,q,Z){let Q=void 0;if(typeof q==="function")$=q.call({"":$},"",$),Q=q;else if(Array.isArray(q)){let B=(O)=>typeof O==="number"||O instanceof String||O instanceof Number,F=q.filter(B).map(String);if(F.length>0)q=q.concat(F);Q=q}else if(Z===void 0&&q)Z=q,q=void 0;let{aliasDuplicateObjects:X,anchorPrefix:z,flow:J,keepUndefined:G,onTagObj:Y,tag:U}=Z??{},{onAnchor:V,setAnchors:H,sourceObjects:K}=i9.createNodeAnchors(this,z||"a"),_={aliasDuplicateObjects:X??!0,keepUndefined:G??!1,onAnchor:V,onTagObj:Y,replacer:Q,schema:this.schema,sourceObjects:K},L=Dz.createNode($,U,_);if(J&&$0.isCollection(L))L.flow=!0;return H(),L}createPair($,q,Z={}){let Q=this.createNode($,null,Z),X=this.createNode(q,null,Z);return new Tz.Pair(Q,X)}delete($){return Z$(this.contents)?this.contents.delete($):!1}deleteIn($){if(q$.isEmptyPath($)){if(this.contents==null)return!1;return this.contents=null,!0}return Z$(this.contents)?this.contents.deleteIn($):!1}get($,q){return $0.isCollection(this.contents)?this.contents.get($,q):void 0}getIn($,q){if(q$.isEmptyPath($))return!q&&$0.isScalar(this.contents)?this.contents.value:this.contents;return $0.isCollection(this.contents)?this.contents.getIn($,q):void 0}has($){return $0.isCollection(this.contents)?this.contents.has($):!1}hasIn($){if(q$.isEmptyPath($))return this.contents!==void 0;return $0.isCollection(this.contents)?this.contents.hasIn($):!1}set($,q){if(this.contents==null)this.contents=q$.collectionFromPath(this.schema,[$],q);else if(Z$(this.contents))this.contents.set($,q)}setIn($,q){if(q$.isEmptyPath($))this.contents=q;else if(this.contents==null)this.contents=q$.collectionFromPath(this.schema,Array.from($),q);else if(Z$(this.contents))this.contents.setIn($,q)}setSchema($,q={}){if(typeof $==="number")$=String($);let Z;switch($){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new o9.Directives({version:"1.1"});Z={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=$;else this.directives=new o9.Directives({version:$});Z={resolveKnownTags:!0,schema:"core"};break;case null:if(this.directives)delete this.directives;Z=null;break;default:{let Q=JSON.stringify($);throw Error(`Expected '1.1', '1.2' or null as first argument, but found: ${Q}`)}}if(q.schema instanceof Object)this.schema=q.schema;else if(Z)this.schema=new Mz.Schema(Object.assign(Z,q));else throw Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:$,jsonArg:q,mapAsMap:Z,maxAliasCount:Q,onAnchor:X,reviver:z}={}){let J={anchors:new Map,doc:this,keep:!$,mapAsMap:Z===!0,mapKeyWarned:!1,maxAliasCount:typeof Q==="number"?Q:100},G=Iz.toJS(this.contents,q??"",J);if(typeof X==="function")for(let{count:Y,res:U}of J.anchors.values())X(U,Y);return typeof z==="function"?Nz.applyReviver(z,{"":G},"",G):G}toJSON($,q){return this.toJS({json:!0,jsonArg:$,mapAsMap:!1,onAnchor:q})}toString($={}){if(this.errors.length>0)throw Error("Document with errors cannot be stringified");if("indent"in $&&(!Number.isInteger($.indent)||Number($.indent)<=0)){let q=JSON.stringify($.indent);throw Error(`"indent" option must be a positive integer, not ${q}`)}return jz.stringifyDocument(this,$)}}function Z$($){if($0.isCollection($))return!0;throw Error("Expected a YAML collection as document contents")}Rz.Document=a9});var w$=R((Cz)=>{class Cq extends Error{constructor($,q,Z,Q){super();this.name=$,this.code=Z,this.message=Q,this.pos=q}}class u1 extends Cq{constructor($,q,Z){super("YAMLParseError",$,q,Z)}}class m1 extends Cq{constructor($,q,Z){super("YAMLWarning",$,q,Z)}}var Pz=($,q)=>(Z)=>{if(Z.pos[0]===-1)return;Z.linePos=Z.pos.map((G)=>q.linePos(G));let{line:Q,col:X}=Z.linePos[0];Z.message+=` at line ${Q}, column ${X}`;let z=X-1,J=$.substring(q.lineStarts[Q-1],q.lineStarts[Q]).replace(/[\n\r]+$/,"");if(z>=60&&J.length>80){let G=Math.min(z-39,J.length-79);J="…"+J.substring(G),z-=G-1}if(J.length>80)J=J.substring(0,79)+"…";if(Q>1&&/^ *$/.test(J.substring(0,z))){let G=$.substring(q.lineStarts[Q-2],q.lineStarts[Q-1]);if(G.length>80)G=G.substring(0,79)+`…
|
|
59
59
|
`;J=G+J}if(/[^ ]/.test(J)){let G=1,Y=Z.linePos[1];if(Y?.line===Q&&Y.col>X)G=Math.max(1,Math.min(Y.col-X,80-z));let U=" ".repeat(z)+"^".repeat(G);Z.message+=`:
|
|
60
60
|
|
|
61
61
|
${J}
|
|
62
62
|
${U}
|
|
63
|
-
`}};
|
|
64
|
-
`))return!0;if($.end){for(let q of $.end)if(q.type==="newline")return!0}return!1;case"flow-collection":for(let q of $.items){for(let Z of q.start)if(Z.type==="newline")return!0;if(q.sep){for(let Z of q.sep)if(Z.type==="newline")return!0}if(
|
|
65
|
-
`+
|
|
66
|
-
`+M.comment;else A.comment=M.comment;let
|
|
67
|
-
`+D.comment;else U.comment=D.comment;H=D.end;continue}if(!J&&Z.options.strict&&
|
|
68
|
-
`+x;else P.comment=x;D.comment=D.comment.substring(x.length+1)}}}if(!J&&!
|
|
69
|
-
`+k.comment;else P.comment=k.comment;let
|
|
70
|
-
`+F.comment;else U.comment=F.comment;U.range=[Q.offset,
|
|
71
|
-
`.repeat(Math.max(1,J.length-1)):"",F=Q+X.length;if(q.source)F+=q.source.length;return{value:
|
|
72
|
-
`;for(let
|
|
73
|
-
`;else if(F.length>Y||O[0]==="\t"){if(
|
|
74
|
-
`;else if(!_&&
|
|
75
|
-
`)
|
|
76
|
-
|
|
77
|
-
`;H+=
|
|
78
|
-
`,_=!0}else if(O==="")if(
|
|
63
|
+
`}};Cz.YAMLError=Cq;Cz.YAMLParseError=u1;Cz.YAMLWarning=m1;Cz.prettifyError=Pz});var P$=R((kz)=>{function yz($,{flow:q,indicator:Z,next:Q,offset:X,onError:z,parentIndent:J,startOnNewline:G}){let Y=!1,U=G,V=G,H="",K="",_=!1,L=!1,B=null,F=null,O=null,A=null,M=null,j=null,I=null;for(let P of $){if(L){if(P.type!=="space"&&P.type!=="newline"&&P.type!=="comma")z(P.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");L=!1}if(B){if(U&&P.type!=="comment"&&P.type!=="newline")z(B,"TAB_AS_INDENT","Tabs are not allowed as indentation");B=null}switch(P.type){case"space":if(!q&&(Z!=="doc-start"||Q?.type!=="flow-collection")&&P.source.includes("\t"))B=P;V=!0;break;case"comment":{if(!V)z(P,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let k=P.source.substring(1)||" ";if(!H)H=k;else H+=K+k;K="",U=!1;break}case"newline":if(U){if(H)H+=P.source;else if(!j||Z!=="seq-item-ind")Y=!0}else K+=P.source;if(U=!0,_=!0,F||O)A=P;V=!0;break;case"anchor":if(F)z(P,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(P.source.endsWith(":"))z(P.offset+P.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0);F=P,I??(I=P.offset),U=!1,V=!1,L=!0;break;case"tag":{if(O)z(P,"MULTIPLE_TAGS","A node can have at most one tag");O=P,I??(I=P.offset),U=!1,V=!1,L=!0;break}case Z:if(F||O)z(P,"BAD_PROP_ORDER",`Anchors and tags must be after the ${P.source} indicator`);if(j)z(P,"UNEXPECTED_TOKEN",`Unexpected ${P.source} in ${q??"collection"}`);j=P,U=Z==="seq-item-ind"||Z==="explicit-key-ind",V=!1;break;case"comma":if(q){if(M)z(P,"UNEXPECTED_TOKEN",`Unexpected , in ${q}`);M=P,U=!1,V=!1;break}default:z(P,"UNEXPECTED_TOKEN",`Unexpected ${P.type} token`),U=!1,V=!1}}let D=$[$.length-1],x=D?D.offset+D.source.length:X;if(L&&Q&&Q.type!=="space"&&Q.type!=="newline"&&Q.type!=="comma"&&(Q.type!=="scalar"||Q.source!==""))z(Q.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");if(B&&(U&&B.indent<=J||Q?.type==="block-map"||Q?.type==="block-seq"))z(B,"TAB_AS_INDENT","Tabs are not allowed as indentation");return{comma:M,found:j,spaceBefore:Y,comment:H,hasNewline:_,anchor:F,tag:O,newlineAfterProp:A,end:x,start:I??x}}kz.resolveProps=yz});var Eq=R((hz)=>{function s9($){if(!$)return null;switch($.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if($.source.includes(`
|
|
64
|
+
`))return!0;if($.end){for(let q of $.end)if(q.type==="newline")return!0}return!1;case"flow-collection":for(let q of $.items){for(let Z of q.start)if(Z.type==="newline")return!0;if(q.sep){for(let Z of q.sep)if(Z.type==="newline")return!0}if(s9(q.key)||s9(q.value))return!0}return!1;default:return!0}}hz.containsNewline=s9});var t9=R((mz)=>{var gz=Eq();function uz($,q,Z){if(q?.type==="flow-collection"){let Q=q.end[0];if(Q.indent===$&&(Q.source==="]"||Q.source==="}")&&gz.containsNewline(q))Z(Q,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}mz.flowIndentCheck=uz});var r9=R((cz)=>{var p1=f();function dz($,q,Z){let{uniqueKeys:Q}=$.options;if(Q===!1)return!1;let X=typeof Q==="function"?Q:(z,J)=>z===J||p1.isScalar(z)&&p1.isScalar(J)&&z.value===J.value;return q.some((z)=>X(z.key,Z))}cz.mapIncludes=dz});var i1=R((sz)=>{var d1=O0(),nz=T0(),c1=P$(),iz=Eq(),l1=t9(),oz=r9(),n1="All mapping items must start at the same column";function az({composeNode:$,composeEmptyNode:q},Z,Q,X,z){let G=new(z?.nodeClass??nz.YAMLMap)(Z.schema);if(Z.atRoot)Z.atRoot=!1;let Y=Q.offset,U=null;for(let V of Q.items){let{start:H,key:K,sep:_,value:L}=V,B=c1.resolveProps(H,{indicator:"explicit-key-ind",next:K??_?.[0],offset:Y,onError:X,parentIndent:Q.indent,startOnNewline:!0}),F=!B.found;if(F){if(K){if(K.type==="block-seq")X(Y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in K&&K.indent!==Q.indent)X(Y,"BAD_INDENT",n1)}if(!B.anchor&&!B.tag&&!_){if(U=B.end,B.comment)if(G.comment)G.comment+=`
|
|
65
|
+
`+B.comment;else G.comment=B.comment;continue}if(B.newlineAfterProp||iz.containsNewline(K))X(K??H[H.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else if(B.found?.indent!==Q.indent)X(Y,"BAD_INDENT",n1);Z.atKey=!0;let O=B.end,A=K?$(Z,K,B,X):q(Z,O,H,null,B,X);if(Z.schema.compat)l1.flowIndentCheck(Q.indent,K,X);if(Z.atKey=!1,oz.mapIncludes(Z,G.items,A))X(O,"DUPLICATE_KEY","Map keys must be unique");let M=c1.resolveProps(_??[],{indicator:"map-value-ind",next:L,offset:A.range[2],onError:X,parentIndent:Q.indent,startOnNewline:!K||K.type==="block-scalar"});if(Y=M.end,M.found){if(F){if(L?.type==="block-map"&&!M.hasNewline)X(Y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(Z.options.strict&&B.start<M.found.offset-1024)X(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}let j=L?$(Z,L,M,X):q(Z,Y,_,null,M,X);if(Z.schema.compat)l1.flowIndentCheck(Q.indent,L,X);Y=j.range[2];let I=new d1.Pair(A,j);if(Z.options.keepSourceTokens)I.srcToken=V;G.items.push(I)}else{if(F)X(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(M.comment)if(A.comment)A.comment+=`
|
|
66
|
+
`+M.comment;else A.comment=M.comment;let j=new d1.Pair(A);if(Z.options.keepSourceTokens)j.srcToken=V;G.items.push(j)}}if(U&&U<Y)X(U,"IMPOSSIBLE","Map comment with trailing content");return G.range=[Q.offset,Y,U??Y],G}sz.resolveBlockMap=az});var o1=R((ZJ)=>{var rz=I0(),ez=P$(),$J=t9();function qJ({composeNode:$,composeEmptyNode:q},Z,Q,X,z){let G=new(z?.nodeClass??rz.YAMLSeq)(Z.schema);if(Z.atRoot)Z.atRoot=!1;if(Z.atKey)Z.atKey=!1;let Y=Q.offset,U=null;for(let{start:V,value:H}of Q.items){let K=ez.resolveProps(V,{indicator:"seq-item-ind",next:H,offset:Y,onError:X,parentIndent:Q.indent,startOnNewline:!0});if(!K.found)if(K.anchor||K.tag||H)if(H?.type==="block-seq")X(K.end,"BAD_INDENT","All sequence items must start at the same column");else X(Y,"MISSING_CHAR","Sequence item without - indicator");else{if(U=K.end,K.comment)G.comment=K.comment;continue}let _=H?$(Z,H,K,X):q(Z,K.end,V,null,K,X);if(Z.schema.compat)$J.flowIndentCheck(Q.indent,H,X);Y=_.range[2],G.items.push(_)}return G.range=[Q.offset,Y,U??Y],G}ZJ.resolveBlockSeq=qJ});var Q$=R((zJ)=>{function XJ($,q,Z,Q){let X="";if($){let z=!1,J="";for(let G of $){let{source:Y,type:U}=G;switch(U){case"space":z=!0;break;case"comment":{if(Z&&!z)Q(G,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");let V=Y.substring(1)||" ";if(!X)X=V;else X+=J+V;J="";break}case"newline":if(X)J+=Y;z=!0;break;default:Q(G,"UNEXPECTED_TOKEN",`Unexpected ${U} at node end`)}q+=Y.length}}return{comment:X,offset:q}}zJ.resolveEnd=XJ});var t1=R((BJ)=>{var GJ=f(),YJ=O0(),a1=T0(),UJ=I0(),WJ=Q$(),s1=P$(),HJ=Eq(),VJ=r9(),e9="Block collections are not allowed within flow collections",$2=($)=>$&&($.type==="block-map"||$.type==="block-seq");function KJ({composeNode:$,composeEmptyNode:q},Z,Q,X,z){let J=Q.start.source==="{",G=J?"flow map":"flow sequence",U=new(z?.nodeClass??(J?a1.YAMLMap:UJ.YAMLSeq))(Z.schema);U.flow=!0;let V=Z.atRoot;if(V)Z.atRoot=!1;if(Z.atKey)Z.atKey=!1;let H=Q.offset+Q.start.source.length;for(let F=0;F<Q.items.length;++F){let O=Q.items[F],{start:A,key:M,sep:j,value:I}=O,D=s1.resolveProps(A,{flow:G,indicator:"explicit-key-ind",next:M??j?.[0],offset:H,onError:X,parentIndent:Q.indent,startOnNewline:!1});if(!D.found){if(!D.anchor&&!D.tag&&!j&&!I){if(F===0&&D.comma)X(D.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${G}`);else if(F<Q.items.length-1)X(D.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${G}`);if(D.comment)if(U.comment)U.comment+=`
|
|
67
|
+
`+D.comment;else U.comment=D.comment;H=D.end;continue}if(!J&&Z.options.strict&&HJ.containsNewline(M))X(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(F===0){if(D.comma)X(D.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${G}`)}else{if(!D.comma)X(D.start,"MISSING_CHAR",`Missing , between ${G} items`);if(D.comment){let x="";$:for(let P of A)switch(P.type){case"comma":case"space":break;case"comment":x=P.source.substring(1);break $;default:break $}if(x){let P=U.items[U.items.length-1];if(GJ.isPair(P))P=P.value??P.key;if(P.comment)P.comment+=`
|
|
68
|
+
`+x;else P.comment=x;D.comment=D.comment.substring(x.length+1)}}}if(!J&&!j&&!D.found){let x=I?$(Z,I,D,X):q(Z,D.end,j,null,D,X);if(U.items.push(x),H=x.range[2],$2(I))X(x.range,"BLOCK_IN_FLOW",e9)}else{Z.atKey=!0;let x=D.end,P=M?$(Z,M,D,X):q(Z,x,A,null,D,X);if($2(M))X(P.range,"BLOCK_IN_FLOW",e9);Z.atKey=!1;let k=s1.resolveProps(j??[],{flow:G,indicator:"map-value-ind",next:I,offset:P.range[2],onError:X,parentIndent:Q.indent,startOnNewline:!1});if(k.found){if(!J&&!D.found&&Z.options.strict){if(j)for(let C of j){if(C===k.found)break;if(C.type==="newline"){X(C,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(D.start<k.found.offset-1024)X(k.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(I)if("source"in I&&I.source?.[0]===":")X(I,"MISSING_CHAR",`Missing space after : in ${G}`);else X(k.start,"MISSING_CHAR",`Missing , or : between ${G} items`);let T=I?$(Z,I,k,X):k.found?q(Z,k.end,j,null,k,X):null;if(T){if($2(I))X(T.range,"BLOCK_IN_FLOW",e9)}else if(k.comment)if(P.comment)P.comment+=`
|
|
69
|
+
`+k.comment;else P.comment=k.comment;let N=new YJ.Pair(P,T);if(Z.options.keepSourceTokens)N.srcToken=O;if(J){let C=U;if(VJ.mapIncludes(Z,C.items,P))X(x,"DUPLICATE_KEY","Map keys must be unique");C.items.push(N)}else{let C=new a1.YAMLMap(Z.schema);C.flow=!0,C.items.push(N);let S=(T??P).range;C.range=[P.range[0],S[1],S[2]],U.items.push(C)}H=T?T.range[2]:k.end}}let K=J?"}":"]",[_,...L]=Q.end,B=H;if(_?.source===K)B=_.offset+_.source.length;else{let F=G[0].toUpperCase()+G.substring(1),O=V?`${F} must end with a ${K}`:`${F} in block collection must be sufficiently indented and end with a ${K}`;if(X(H,V?"MISSING_CHAR":"BAD_INDENT",O),_&&_.source.length!==1)L.unshift(_)}if(L.length>0){let F=WJ.resolveEnd(L,B,Z.options.strict,X);if(F.comment)if(U.comment)U.comment+=`
|
|
70
|
+
`+F.comment;else U.comment=F.comment;U.range=[Q.offset,B,F.offset]}else U.range=[Q.offset,B,B];return U}BJ.resolveFlowCollection=KJ});var r1=R((NJ)=>{var LJ=f(),FJ=u(),OJ=T0(),AJ=I0(),TJ=i1(),IJ=o1(),MJ=t1();function q2($,q,Z,Q,X,z){let J=Z.type==="block-map"?TJ.resolveBlockMap($,q,Z,Q,z):Z.type==="block-seq"?IJ.resolveBlockSeq($,q,Z,Q,z):MJ.resolveFlowCollection($,q,Z,Q,z),G=J.constructor;if(X==="!"||X===G.tagName)return J.tag=G.tagName,J;if(X)J.tag=X;return J}function jJ($,q,Z,Q,X){let z=Q.tag,J=!z?null:q.directives.tagName(z.source,(K)=>X(z,"TAG_RESOLVE_FAILED",K));if(Z.type==="block-seq"){let{anchor:K,newlineAfterProp:_}=Q,L=K&&z?K.offset>z.offset?K:z:K??z;if(L&&(!_||_.offset<L.offset))X(L,"MISSING_CHAR","Missing newline after block sequence props")}let G=Z.type==="block-map"?"map":Z.type==="block-seq"?"seq":Z.start.source==="{"?"map":"seq";if(!z||!J||J==="!"||J===OJ.YAMLMap.tagName&&G==="map"||J===AJ.YAMLSeq.tagName&&G==="seq")return q2($,q,Z,X,J);let Y=q.schema.tags.find((K)=>K.tag===J&&K.collection===G);if(!Y){let K=q.schema.knownTags[J];if(K?.collection===G)q.schema.tags.push(Object.assign({},K,{default:!1})),Y=K;else{if(K)X(z,"BAD_COLLECTION_TYPE",`${K.tag} used for ${G} collection, but expects ${K.collection??"scalar"}`,!0);else X(z,"TAG_RESOLVE_FAILED",`Unresolved tag: ${J}`,!0);return q2($,q,Z,X,J)}}let U=q2($,q,Z,X,J,Y),V=Y.resolve?.(U,(K)=>X(z,"TAG_RESOLVE_FAILED",K),q.options)??U,H=LJ.isNode(V)?V:new FJ.Scalar(V);if(H.range=U.range,H.tag=J,Y?.format)H.format=Y.format;return H}NJ.composeCollection=jJ});var Q2=R((CJ)=>{var Z2=u();function RJ($,q,Z){let Q=q.offset,X=wJ(q,$.options.strict,Z);if(!X)return{value:"",type:null,comment:"",range:[Q,Q,Q]};let z=X.mode===">"?Z2.Scalar.BLOCK_FOLDED:Z2.Scalar.BLOCK_LITERAL,J=q.source?PJ(q.source):[],G=J.length;for(let B=J.length-1;B>=0;--B){let F=J[B][1];if(F===""||F==="\r")G=B;else break}if(G===0){let B=X.chomp==="+"&&J.length>0?`
|
|
71
|
+
`.repeat(Math.max(1,J.length-1)):"",F=Q+X.length;if(q.source)F+=q.source.length;return{value:B,type:z,comment:X.comment,range:[Q,F,F]}}let Y=q.indent+X.indent,U=q.offset+X.length,V=0;for(let B=0;B<G;++B){let[F,O]=J[B];if(O===""||O==="\r"){if(X.indent===0&&F.length>Y)Y=F.length}else{if(F.length<Y)Z(U+F.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator");if(X.indent===0)Y=F.length;if(V=B,Y===0&&!$.atRoot)Z(U,"BAD_INDENT","Block scalar values in collections must be indented");break}U+=F.length+O.length+1}for(let B=J.length-1;B>=G;--B)if(J[B][0].length>Y)G=B+1;let H="",K="",_=!1;for(let B=0;B<V;++B)H+=J[B][0].slice(Y)+`
|
|
72
|
+
`;for(let B=V;B<G;++B){let[F,O]=J[B];U+=F.length+O.length+1;let A=O[O.length-1]==="\r";if(A)O=O.slice(0,-1);if(O&&F.length<Y){let j=`Block scalar lines must not be less indented than their ${X.indent?"explicit indentation indicator":"first line"}`;Z(U-O.length-(A?2:1),"BAD_INDENT",j),F=""}if(z===Z2.Scalar.BLOCK_LITERAL)H+=K+F.slice(Y)+O,K=`
|
|
73
|
+
`;else if(F.length>Y||O[0]==="\t"){if(K===" ")K=`
|
|
74
|
+
`;else if(!_&&K===`
|
|
75
|
+
`)K=`
|
|
76
|
+
|
|
77
|
+
`;H+=K+F.slice(Y)+O,K=`
|
|
78
|
+
`,_=!0}else if(O==="")if(K===`
|
|
79
79
|
`)H+=`
|
|
80
|
-
`;else
|
|
81
|
-
`;else H+=
|
|
82
|
-
`+J[
|
|
80
|
+
`;else K=`
|
|
81
|
+
`;else H+=K+O,K=" ",_=!1}switch(X.chomp){case"-":break;case"+":for(let B=G;B<J.length;++B)H+=`
|
|
82
|
+
`+J[B][0].slice(Y);if(H[H.length-1]!==`
|
|
83
83
|
`)H+=`
|
|
84
84
|
`;break;default:H+=`
|
|
85
|
-
`}let L=Q+X.length+q.source.length;return{value:H,type:z,comment:X.comment,range:[Q,L,L]}}function
|
|
85
|
+
`}let L=Q+X.length+q.source.length;return{value:H,type:z,comment:X.comment,range:[Q,L,L]}}function wJ({offset:$,props:q},Z,Q){if(q[0].type!=="block-scalar-header")return Q(q[0],"IMPOSSIBLE","Block scalar header not found"),null;let{source:X}=q[0],z=X[0],J=0,G="",Y=-1;for(let K=1;K<X.length;++K){let _=X[K];if(!G&&(_==="-"||_==="+"))G=_;else{let L=Number(_);if(!J&&L)J=L;else if(Y===-1)Y=$+K}}if(Y!==-1)Q(Y,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${X}`);let U=!1,V="",H=X.length;for(let K=1;K<q.length;++K){let _=q[K];switch(_.type){case"space":U=!0;case"newline":H+=_.source.length;break;case"comment":if(Z&&!U)Q(_,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");H+=_.source.length,V=_.source.substring(1);break;case"error":Q(_,"UNEXPECTED_TOKEN",_.message),H+=_.source.length;break;default:{let L=`Unexpected token in block scalar header: ${_.type}`;Q(_,"UNEXPECTED_TOKEN",L);let B=_.source;if(B&&typeof B==="string")H+=B.length}}}return{mode:z,indent:J,chomp:G,comment:V,length:H}}function PJ($){let q=$.split(/\n( *)/),Z=q[0],Q=Z.match(/^( *)/),z=[Q?.[1]?[Q[1],Z.slice(Q[1].length)]:["",Z]];for(let J=1;J<q.length;J+=2)z.push([q[J],q[J+1]]);return z}CJ.resolveBlockScalar=RJ});var z2=R((gJ)=>{var X2=u(),SJ=Q$();function bJ($,q,Z){let{offset:Q,type:X,source:z,end:J}=$,G,Y,U=(K,_,L)=>Z(Q+K,_,L);switch(X){case"scalar":G=X2.Scalar.PLAIN,Y=xJ(z,U);break;case"single-quoted-scalar":G=X2.Scalar.QUOTE_SINGLE,Y=yJ(z,U);break;case"double-quoted-scalar":G=X2.Scalar.QUOTE_DOUBLE,Y=kJ(z,U);break;default:return Z($,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${X}`),{value:"",type:null,comment:"",range:[Q,Q+z.length,Q+z.length]}}let V=Q+z.length,H=SJ.resolveEnd(J,V,q,Z);return{value:Y,type:G,comment:H.comment,range:[Q,V,H.offset]}}function xJ($,q){let Z="";switch($[0]){case"\t":Z="a tab character";break;case",":Z="flow indicator character ,";break;case"%":Z="directive indicator character %";break;case"|":case">":{Z=`block scalar indicator ${$[0]}`;break}case"@":case"`":{Z=`reserved character ${$[0]}`;break}}if(Z)q(0,"BAD_SCALAR_START",`Plain value cannot start with ${Z}`);return e1($)}function yJ($,q){if($[$.length-1]!=="'"||$.length===1)q($.length,"MISSING_CHAR","Missing closing 'quote");return e1($.slice(1,-1)).replace(/''/g,"'")}function e1($){let q,Z;try{q=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
86
86
|
`,"sy"),Z=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
87
87
|
`,"sy")}catch{q=/(.*?)[ \t]*\r?\n/sy,Z=/[ \t]*(.*?)[ \t]*\r?\n/sy}let Q=q.exec($);if(!Q)return $;let X=Q[1],z=" ",J=q.lastIndex;Z.lastIndex=J;while(Q=Z.exec($)){if(Q[1]==="")if(z===`
|
|
88
88
|
`)X+=z;else z=`
|
|
89
|
-
`;else X+=z+Q[1],z=" ";J=Z.lastIndex}let G=/[ \t]*(.*)/sy;return G.lastIndex=J,Q=G.exec($),X+z+(Q?.[1]??"")}function
|
|
89
|
+
`;else X+=z+Q[1],z=" ";J=Z.lastIndex}let G=/[ \t]*(.*)/sy;return G.lastIndex=J,Q=G.exec($),X+z+(Q?.[1]??"")}function kJ($,q){let Z="";for(let Q=1;Q<$.length-1;++Q){let X=$[Q];if(X==="\r"&&$[Q+1]===`
|
|
90
90
|
`)continue;if(X===`
|
|
91
|
-
`){let{fold:z,offset:J}=
|
|
91
|
+
`){let{fold:z,offset:J}=fJ($,Q);Z+=z,Q=J}else if(X==="\\"){let z=$[++Q],J=hJ[z];if(J)Z+=J;else if(z===`
|
|
92
92
|
`){z=$[Q+1];while(z===" "||z==="\t")z=$[++Q+1]}else if(z==="\r"&&$[Q+1]===`
|
|
93
|
-
`){z=$[++Q+1];while(z===" "||z==="\t")z=$[++Q+1]}else if(z==="x"||z==="u"||z==="U"){let G={x:2,u:4,U:8}[z];Z+=
|
|
93
|
+
`){z=$[++Q+1];while(z===" "||z==="\t")z=$[++Q+1]}else if(z==="x"||z==="u"||z==="U"){let G={x:2,u:4,U:8}[z];Z+=vJ($,Q+1,G,q),Q+=G}else{let G=$.substr(Q-1,2);q(Q-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${G}`),Z+=G}}else if(X===" "||X==="\t"){let z=Q,J=$[Q+1];while(J===" "||J==="\t")J=$[++Q+1];if(J!==`
|
|
94
94
|
`&&!(J==="\r"&&$[Q+2]===`
|
|
95
|
-
`))Z+=Q>z?$.slice(z,Q+1):X}else Z+=X}if($[$.length-1]!=='"'||$.length===1)q($.length,"MISSING_CHAR",'Missing closing "quote');return Z}function
|
|
95
|
+
`))Z+=Q>z?$.slice(z,Q+1):X}else Z+=X}if($[$.length-1]!=='"'||$.length===1)q($.length,"MISSING_CHAR",'Missing closing "quote');return Z}function fJ($,q){let Z="",Q=$[q+1];while(Q===" "||Q==="\t"||Q===`
|
|
96
96
|
`||Q==="\r"){if(Q==="\r"&&$[q+2]!==`
|
|
97
97
|
`)break;if(Q===`
|
|
98
98
|
`)Z+=`
|
|
99
|
-
`;q+=1,Q=$[q+1]}if(!Z)Z=" ";return{fold:Z,offset:q}}var
|
|
100
|
-
`,r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function
|
|
99
|
+
`;q+=1,Q=$[q+1]}if(!Z)Z=" ";return{fold:Z,offset:q}}var hJ={"0":"\x00",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
100
|
+
`,r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function vJ($,q,Z,Q){let X=$.substr(q,Z),J=X.length===Z&&/^[0-9a-fA-F]+$/.test(X)?parseInt(X,16):NaN;if(isNaN(J)){let G=$.substr(q-2,Z+2);return Q(q-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${G}`),G}return String.fromCodePoint(J)}gJ.resolveFlowScalar=bJ});var q5=R((nJ)=>{var y0=f(),$5=u(),mJ=Q2(),pJ=z2();function dJ($,q,Z,Q){let{value:X,type:z,comment:J,range:G}=q.type==="block-scalar"?mJ.resolveBlockScalar($,q,Q):pJ.resolveFlowScalar(q,$.options.strict,Q),Y=Z?$.directives.tagName(Z.source,(H)=>Q(Z,"TAG_RESOLVE_FAILED",H)):null,U;if($.options.stringKeys&&$.atKey)U=$.schema[y0.SCALAR];else if(Y)U=cJ($.schema,X,Y,Z,Q);else if(q.type==="scalar")U=lJ($,X,q,Q);else U=$.schema[y0.SCALAR];let V;try{let H=U.resolve(X,(K)=>Q(Z??q,"TAG_RESOLVE_FAILED",K),$.options);V=y0.isScalar(H)?H:new $5.Scalar(H)}catch(H){let K=H instanceof Error?H.message:String(H);Q(Z??q,"TAG_RESOLVE_FAILED",K),V=new $5.Scalar(X)}if(V.range=G,V.source=X,z)V.type=z;if(Y)V.tag=Y;if(U.format)V.format=U.format;if(J)V.comment=J;return V}function cJ($,q,Z,Q,X){if(Z==="!")return $[y0.SCALAR];let z=[];for(let G of $.tags)if(!G.collection&&G.tag===Z)if(G.default&&G.test)z.push(G);else return G;for(let G of z)if(G.test?.test(q))return G;let J=$.knownTags[Z];if(J&&!J.collection)return $.tags.push(Object.assign({},J,{default:!1,test:void 0})),J;return X(Q,"TAG_RESOLVE_FAILED",`Unresolved tag: ${Z}`,Z!=="tag:yaml.org,2002:str"),$[y0.SCALAR]}function lJ({atKey:$,directives:q,schema:Z},Q,X,z){let J=Z.tags.find((G)=>(G.default===!0||$&&G.default==="key")&&G.test?.test(Q))||Z[y0.SCALAR];if(Z.compat){let G=Z.compat.find((Y)=>Y.default&&Y.test?.test(Q))??Z[y0.SCALAR];if(J.tag!==G.tag){let Y=q.tagString(J.tag),U=q.tagString(G.tag),V=`Value may be parsed as either ${Y} or ${U}`;z(X,"TAG_RESOLVE_FAILED",V,!0)}}return J}nJ.composeScalar=dJ});var Z5=R((aJ)=>{function oJ($,q,Z){if(q){Z??(Z=q.length);for(let Q=Z-1;Q>=0;--Q){let X=q[Q];switch(X.type){case"space":case"comment":case"newline":$-=X.source.length;continue}X=q[++Q];while(X?.type==="space")$+=X.source.length,X=q[++Q];break}}return $}aJ.emptyScalarPosition=oJ});var z5=R((XG)=>{var tJ=H$(),rJ=f(),eJ=r1(),Q5=q5(),$G=Q$(),qG=Z5(),ZG={composeNode:X5,composeEmptyNode:J2};function X5($,q,Z,Q){let X=$.atKey,{spaceBefore:z,comment:J,anchor:G,tag:Y}=Z,U,V=!0;switch(q.type){case"alias":if(U=QG($,q,Q),G||Y)Q(q,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":if(U=Q5.composeScalar($,q,Y,Q),G)U.anchor=G.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":try{if(U=eJ.composeCollection(ZG,$,q,Z,Q),G)U.anchor=G.source.substring(1)}catch(H){let K=H instanceof Error?H.message:String(H);Q(q,"RESOURCE_EXHAUSTION",K)}break;default:{let H=q.type==="error"?q.message:`Unsupported token (type: ${q.type})`;Q(q,"UNEXPECTED_TOKEN",H),V=!1}}if(U??(U=J2($,q.offset,void 0,null,Z,Q)),G&&U.anchor==="")Q(G,"BAD_ALIAS","Anchor cannot be an empty string");if(X&&$.options.stringKeys&&(!rJ.isScalar(U)||typeof U.value!=="string"||U.tag&&U.tag!=="tag:yaml.org,2002:str"))Q(Y??q,"NON_STRING_KEY","With stringKeys, all keys must be strings");if(z)U.spaceBefore=!0;if(J)if(q.type==="scalar"&&q.source==="")U.comment=J;else U.commentBefore=J;if($.options.keepSourceTokens&&V)U.srcToken=q;return U}function J2($,q,Z,Q,{spaceBefore:X,comment:z,anchor:J,tag:G,end:Y},U){let V={type:"scalar",offset:qG.emptyScalarPosition(q,Z,Q),indent:-1,source:""},H=Q5.composeScalar($,V,G,U);if(J){if(H.anchor=J.source.substring(1),H.anchor==="")U(J,"BAD_ALIAS","Anchor cannot be an empty string")}if(X)H.spaceBefore=!0;if(z)H.comment=z,H.range[2]=Y;return H}function QG({options:$},{offset:q,source:Z,end:Q},X){let z=new tJ.Alias(Z.substring(1));if(z.source==="")X(q,"BAD_ALIAS","Alias cannot be an empty string");if(z.source.endsWith(":"))X(q+Z.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);let J=q+Z.length,G=$G.resolveEnd(Q,J,$.strict,X);if(z.range=[q,J,G.offset],G.comment)z.comment=G.comment;return z}XG.composeEmptyNode=J2;XG.composeNode=X5});var G5=R((HG)=>{var GG=R$(),J5=z5(),YG=Q$(),UG=P$();function WG($,q,{offset:Z,start:Q,value:X,end:z},J){let G=Object.assign({_directives:q},$),Y=new GG.Document(void 0,G),U={atKey:!1,atRoot:!0,directives:Y.directives,options:Y.options,schema:Y.schema},V=UG.resolveProps(Q,{indicator:"doc-start",next:X??z?.[0],offset:Z,onError:J,parentIndent:0,startOnNewline:!0});if(V.found){if(Y.directives.docStart=!0,X&&(X.type==="block-map"||X.type==="block-seq")&&!V.hasNewline)J(V.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}Y.contents=X?J5.composeNode(U,X,V,J):J5.composeEmptyNode(U,V.end,Q,null,V,J);let H=Y.contents.range[2],K=YG.resolveEnd(z,H,!1,J);if(K.comment)Y.comment=K.comment;return Y.range=[Z,H,K.offset],Y}HG.composeDoc=WG});var G2=R((OG)=>{var KG=h("process"),BG=H9(),_G=R$(),C$=w$(),Y5=f(),LG=G5(),FG=Q$();function E$($){if(typeof $==="number")return[$,$+1];if(Array.isArray($))return $.length===2?$:[$[0],$[1]];let{offset:q,source:Z}=$;return[q,q+(typeof Z==="string"?Z.length:1)]}function U5($){let q="",Z=!1,Q=!1;for(let X=0;X<$.length;++X){let z=$[X];switch(z[0]){case"#":q+=(q===""?"":Q?`
|
|
101
101
|
|
|
102
102
|
`:`
|
|
103
|
-
`)+(z.substring(1)||" "),Z=!0,Q=!1;break;case"%":if($[X+1]?.[0]!=="#")X+=1;Z=!1;break;default:if(!Z)Q=!0;Z=!1}}return{comment:q,afterEmptyLine:Q}}class
|
|
104
|
-
${Z}`:Z;else if(Q||$.directives.docStart||!X)$.commentBefore=Z;else if(
|
|
103
|
+
`)+(z.substring(1)||" "),Z=!0,Q=!1;break;case"%":if($[X+1]?.[0]!=="#")X+=1;Z=!1;break;default:if(!Z)Q=!0;Z=!1}}return{comment:q,afterEmptyLine:Q}}class W5{constructor($={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(q,Z,Q,X)=>{let z=E$(q);if(X)this.warnings.push(new C$.YAMLWarning(z,Z,Q));else this.errors.push(new C$.YAMLParseError(z,Z,Q))},this.directives=new BG.Directives({version:$.version||"1.2"}),this.options=$}decorate($,q){let{comment:Z,afterEmptyLine:Q}=U5(this.prelude);if(Z){let X=$.contents;if(q)$.comment=$.comment?`${$.comment}
|
|
104
|
+
${Z}`:Z;else if(Q||$.directives.docStart||!X)$.commentBefore=Z;else if(Y5.isCollection(X)&&!X.flow&&X.items.length>0){let z=X.items[0];if(Y5.isPair(z))z=z.key;let J=z.commentBefore;z.commentBefore=J?`${Z}
|
|
105
105
|
${J}`:Z}else{let z=X.commentBefore;X.commentBefore=z?`${Z}
|
|
106
|
-
${z}`:Z}}if(q)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:
|
|
107
|
-
${q.comment}`:q.comment}this.doc.range[2]=q.offset;break}default:this.errors.push(new C$.YAMLParseError(E$($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,q=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let Z=Object.assign({_directives:this.directives},this.options),Q=new
|
|
106
|
+
${z}`:Z}}if(q)Array.prototype.push.apply($.errors,this.errors),Array.prototype.push.apply($.warnings,this.warnings);else $.errors=this.errors,$.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:U5(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose($,q=!1,Z=-1){for(let Q of $)yield*this.next(Q);yield*this.end(q,Z)}*next($){if(KG.env.LOG_STREAM)console.dir($,{depth:null});switch($.type){case"directive":this.directives.add($.source,(q,Z,Q)=>{let X=E$($);X[0]+=q,this.onError(X,"BAD_DIRECTIVE",Z,Q)}),this.prelude.push($.source),this.atDirectives=!0;break;case"document":{let q=LG.composeDoc(this.options,this.directives,$,this.onError);if(this.atDirectives&&!q.directives.docStart)this.onError($,"MISSING_CHAR","Missing directives-end/doc-start indicator line");if(this.decorate(q,!1),this.doc)yield this.doc;this.doc=q,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push($.source);break;case"error":{let q=$.source?`${$.message}: ${JSON.stringify($.source)}`:$.message,Z=new C$.YAMLParseError(E$($),"UNEXPECTED_TOKEN",q);if(this.atDirectives||!this.doc)this.errors.push(Z);else this.doc.errors.push(Z);break}case"doc-end":{if(!this.doc){this.errors.push(new C$.YAMLParseError(E$($),"UNEXPECTED_TOKEN","Unexpected doc-end without preceding document"));break}this.doc.directives.docEnd=!0;let q=FG.resolveEnd($.end,$.offset+$.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),q.comment){let Z=this.doc.comment;this.doc.comment=Z?`${Z}
|
|
107
|
+
${q.comment}`:q.comment}this.doc.range[2]=q.offset;break}default:this.errors.push(new C$.YAMLParseError(E$($),"UNEXPECTED_TOKEN",`Unsupported token ${$.type}`))}}*end($=!1,q=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if($){let Z=Object.assign({_directives:this.directives},this.options),Q=new _G.Document(void 0,Z);if(this.atDirectives)this.onError(q,"MISSING_CHAR","Missing directives-end indicator line");Q.range=[0,q,q],this.decorate(Q,!1),yield Q}}}OG.Composer=W5});var K5=R((wG)=>{var TG=Q2(),IG=z2(),MG=w$(),H5=_$();function jG($,q=!0,Z){if($){let Q=(X,z,J)=>{let G=typeof X==="number"?X:Array.isArray(X)?X[0]:X.offset;if(Z)Z(G,z,J);else throw new MG.YAMLParseError([G,G+1],z,J)};switch($.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return IG.resolveFlowScalar($,q,Q);case"block-scalar":return TG.resolveBlockScalar({options:{strict:q}},$,Q)}}return null}function NG($,q){let{implicitKey:Z=!1,indent:Q,inFlow:X=!1,offset:z=-1,type:J="PLAIN"}=q,G=H5.stringifyString({type:J,value:$},{implicitKey:Z,indent:Q>0?" ".repeat(Q):"",inFlow:X,options:{blockQuote:!0,lineWidth:-1}}),Y=q.end??[{type:"newline",offset:-1,indent:Q,source:`
|
|
108
108
|
`}];switch(G[0]){case"|":case">":{let U=G.indexOf(`
|
|
109
109
|
`),V=G.substring(0,U),H=G.substring(U+1)+`
|
|
110
|
-
`,
|
|
111
|
-
`});return{type:"block-scalar",offset:z,indent:Q,props:
|
|
110
|
+
`,K=[{type:"block-scalar-header",offset:z,indent:Q,source:V}];if(!V5(K,Y))K.push({type:"newline",offset:-1,indent:Q,source:`
|
|
111
|
+
`});return{type:"block-scalar",offset:z,indent:Q,props:K,source:H}}case'"':return{type:"double-quoted-scalar",offset:z,indent:Q,source:G,end:Y};case"'":return{type:"single-quoted-scalar",offset:z,indent:Q,source:G,end:Y};default:return{type:"scalar",offset:z,indent:Q,source:G,end:Y}}}function DG($,q,Z={}){let{afterKey:Q=!1,implicitKey:X=!1,inFlow:z=!1,type:J}=Z,G="indent"in $?$.indent:null;if(Q&&typeof G==="number")G+=2;if(!J)switch($.type){case"single-quoted-scalar":J="QUOTE_SINGLE";break;case"double-quoted-scalar":J="QUOTE_DOUBLE";break;case"block-scalar":{let U=$.props[0];if(U.type!=="block-scalar-header")throw Error("Invalid block scalar header");J=U.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:J="PLAIN"}let Y=H5.stringifyString({type:J,value:q},{implicitKey:X||G===null,indent:G!==null&&G>0?" ".repeat(G):"",inFlow:z,options:{blockQuote:!0,lineWidth:-1}});switch(Y[0]){case"|":case">":RG($,Y);break;case'"':Y2($,Y,"double-quoted-scalar");break;case"'":Y2($,Y,"single-quoted-scalar");break;default:Y2($,Y,"scalar")}}function RG($,q){let Z=q.indexOf(`
|
|
112
112
|
`),Q=q.substring(0,Z),X=q.substring(Z+1)+`
|
|
113
|
-
`;if($.type==="block-scalar"){let z=$.props[0];if(z.type!=="block-scalar-header")throw Error("Invalid block scalar header");z.source=Q,$.source=X}else{let{offset:z}=$,J="indent"in $?$.indent:-1,G=[{type:"block-scalar-header",offset:z,indent:J,source:Q}];if(!
|
|
114
|
-
`});for(let Y of Object.keys($))if(Y!=="type"&&Y!=="offset")delete $[Y];Object.assign($,{type:"block-scalar",indent:J,props:G,source:X})}}function
|
|
115
|
-
`};delete $.items,Object.assign($,{type:Z,source:q,end:[X]});break}default:{let Q="indent"in $?$.indent:-1,X="end"in $&&Array.isArray($.end)?$.end.filter((z)=>z.type==="space"||z.type==="comment"||z.type==="newline"):[];for(let z of Object.keys($))if(z!=="type"&&z!=="offset")delete $[z];Object.assign($,{type:Z,indent:Q,source:q,end:X})}}}
|
|
113
|
+
`;if($.type==="block-scalar"){let z=$.props[0];if(z.type!=="block-scalar-header")throw Error("Invalid block scalar header");z.source=Q,$.source=X}else{let{offset:z}=$,J="indent"in $?$.indent:-1,G=[{type:"block-scalar-header",offset:z,indent:J,source:Q}];if(!V5(G,"end"in $?$.end:void 0))G.push({type:"newline",offset:-1,indent:J,source:`
|
|
114
|
+
`});for(let Y of Object.keys($))if(Y!=="type"&&Y!=="offset")delete $[Y];Object.assign($,{type:"block-scalar",indent:J,props:G,source:X})}}function V5($,q){if(q)for(let Z of q)switch(Z.type){case"space":case"comment":$.push(Z);break;case"newline":return $.push(Z),!0}return!1}function Y2($,q,Z){switch($.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":$.type=Z,$.source=q;break;case"block-scalar":{let Q=$.props.slice(1),X=q.length;if($.props[0].type==="block-scalar-header")X-=$.props[0].source.length;for(let z of Q)z.offset+=X;delete $.props,Object.assign($,{type:Z,source:q,end:Q});break}case"block-map":case"block-seq":{let X={type:"newline",offset:$.offset+q.length,indent:$.indent,source:`
|
|
115
|
+
`};delete $.items,Object.assign($,{type:Z,source:q,end:[X]});break}default:{let Q="indent"in $?$.indent:-1,X="end"in $&&Array.isArray($.end)?$.end.filter((z)=>z.type==="space"||z.type==="comment"||z.type==="newline"):[];for(let z of Object.keys($))if(z!=="type"&&z!=="offset")delete $[z];Object.assign($,{type:Z,indent:Q,source:q,end:X})}}}wG.createScalarToken=NG;wG.resolveAsScalar=jG;wG.setScalarValue=DG});var B5=R((bG)=>{var SG=($)=>("type"in $)?bq($):Sq($);function bq($){switch($.type){case"block-scalar":{let q="";for(let Z of $.props)q+=bq(Z);return q+$.source}case"block-map":case"block-seq":{let q="";for(let Z of $.items)q+=Sq(Z);return q}case"flow-collection":{let q=$.start.source;for(let Z of $.items)q+=Sq(Z);for(let Z of $.end)q+=Z.source;return q}case"document":{let q=Sq($);if($.end)for(let Z of $.end)q+=Z.source;return q}default:{let q=$.source;if("end"in $&&$.end)for(let Z of $.end)q+=Z.source;return q}}}function Sq({start:$,key:q,sep:Z,value:Q}){let X="";for(let z of $)X+=z.source;if(q)X+=bq(q);if(Z)for(let z of Z)X+=z.source;if(Q)X+=bq(Q);return X}bG.stringify=SG});var F5=R((kG)=>{var U2=Symbol("break visit"),yG=Symbol("skip children"),_5=Symbol("remove item");function k0($,q){if("type"in $&&$.type==="document")$={start:$.start,value:$.value};L5(Object.freeze([]),$,q)}k0.BREAK=U2;k0.SKIP=yG;k0.REMOVE=_5;k0.itemAtPath=($,q)=>{let Z=$;for(let[Q,X]of q){let z=Z?.[Q];if(z&&"items"in z)Z=z.items[X];else return}return Z};k0.parentCollection=($,q)=>{let Z=k0.itemAtPath($,q.slice(0,-1)),Q=q[q.length-1][0],X=Z?.[Q];if(X&&"items"in X)return X;throw Error("Parent collection not found")};function L5($,q,Z){let Q=Z(q,$);if(typeof Q==="symbol")return Q;for(let X of["key","value"]){let z=q[X];if(z&&"items"in z){for(let J=0;J<z.items.length;++J){let G=L5(Object.freeze($.concat([[X,J]])),z.items[J],Z);if(typeof G==="number")J=G-1;else if(G===U2)return U2;else if(G===_5)z.items.splice(J,1),J-=1}if(typeof Q==="function"&&X==="key")Q=Q(q,$)}}return typeof Q==="function"?Q(q,$):Q}kG.visit=k0});var xq=R((dG)=>{var W2=K5(),hG=B5(),vG=F5(),H2="\uFEFF",V2="\x02",K2="\x18",B2="\x1F",gG=($)=>!!$&&("items"in $),uG=($)=>!!$&&($.type==="scalar"||$.type==="single-quoted-scalar"||$.type==="double-quoted-scalar"||$.type==="block-scalar");function mG($){switch($){case H2:return"<BOM>";case V2:return"<DOC>";case K2:return"<FLOW_END>";case B2:return"<SCALAR>";default:return JSON.stringify($)}}function pG($){switch($){case H2:return"byte-order-mark";case V2:return"doc-mode";case K2:return"flow-error-end";case B2:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
116
116
|
`:case`\r
|
|
117
|
-
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}
|
|
118
|
-
`:case"\r":case"\t":return!0;default:return!1}}var
|
|
119
|
-
\r `),
|
|
117
|
+
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch($[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}dG.createScalarToken=W2.createScalarToken;dG.resolveAsScalar=W2.resolveAsScalar;dG.setScalarValue=W2.setScalarValue;dG.stringify=hG.stringify;dG.visit=vG.visit;dG.BOM=H2;dG.DOCUMENT=V2;dG.FLOW_END=K2;dG.SCALAR=B2;dG.isCollection=gG;dG.isScalar=uG;dG.prettyToken=mG;dG.tokenType=pG});var L2=R((zY)=>{var S$=xq();function G0($){switch($){case void 0:case" ":case`
|
|
118
|
+
`:case"\r":case"\t":return!0;default:return!1}}var O5=new Set("0123456789ABCDEFabcdef"),QY=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),yq=new Set(",[]{}"),XY=new Set(` ,[]{}
|
|
119
|
+
\r `),_2=($)=>!$||XY.has($);class A5{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex($,q=!1){if($){if(typeof $!=="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+$:$,this.lineEndPos=null}this.atEnd=!q;let Z=this.next??"stream";while(Z&&(q||this.hasChars(1)))Z=yield*this.parseNext(Z)}atLineEnd(){let $=this.pos,q=this.buffer[$];while(q===" "||q==="\t")q=this.buffer[++$];if(!q||q==="#"||q===`
|
|
120
120
|
`)return!0;if(q==="\r")return this.buffer[$+1]===`
|
|
121
121
|
`;return!1}charAt($){return this.buffer[this.pos+$]}continueScalar($){let q=this.buffer[$];if(this.indentNext>0){let Z=0;while(q===" ")q=this.buffer[++Z+$];if(q==="\r"){let Q=this.buffer[Z+$+1];if(Q===`
|
|
122
122
|
`||!Q&&!this.atEnd)return $+Z+1}return q===`
|
|
123
123
|
`||Z>=this.indentNext||!q&&!this.atEnd?$+Z:-1}if(q==="-"||q==="."){let Z=this.buffer.substr($,3);if((Z==="---"||Z==="...")&&G0(this.buffer[$+3]))return-1}return $}getLine(){let $=this.lineEndPos;if(typeof $!=="number"||$!==-1&&$<this.pos)$=this.buffer.indexOf(`
|
|
124
|
-
`,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let $=this.getLine();if($===null)return this.setNext("stream");if($[0]===S$.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let q=$.length,Z=$.indexOf("#");while(Z!==-1){let X=$[Z-1];if(X===" "||X==="\t"){q=Z-1;break}else Z=$.indexOf("#",Z+1)}while(!0){let X=$[q-1];if(X===" "||X==="\t")q-=1;else break}let Q=(yield*this.pushCount(q))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-Q),this.pushNewline(),"stream"}if(this.atLineEnd()){let q=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-q),yield*this.pushNewline(),"stream"}return yield S$.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let q=this.peek(3);if((q==="---"||q==="...")&&G0(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,q==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!G0(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,q]=this.peek(2);if(!q&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&G0(q)){let Z=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=Z,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let q=yield*this.pushIndicators();switch($[q]){case"#":yield*this.pushCount($.length-q);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(
|
|
124
|
+
`,this.pos),this.lineEndPos=$;if($===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[$-1]==="\r")$-=1;return this.buffer.substring(this.pos,$)}hasChars($){return this.pos+$<=this.buffer.length}setNext($){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=$,null}peek($){return this.buffer.substr(this.pos,$)}*parseNext($){switch($){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let $=this.getLine();if($===null)return this.setNext("stream");if($[0]===S$.BOM)yield*this.pushCount(1),$=$.substring(1);if($[0]==="%"){let q=$.length,Z=$.indexOf("#");while(Z!==-1){let X=$[Z-1];if(X===" "||X==="\t"){q=Z-1;break}else Z=$.indexOf("#",Z+1)}while(!0){let X=$[q-1];if(X===" "||X==="\t")q-=1;else break}let Q=(yield*this.pushCount(q))+(yield*this.pushSpaces(!0));return yield*this.pushCount($.length-Q),this.pushNewline(),"stream"}if(this.atLineEnd()){let q=yield*this.pushSpaces(!0);return yield*this.pushCount($.length-q),yield*this.pushNewline(),"stream"}return yield S$.DOCUMENT,yield*this.parseLineStart()}*parseLineStart(){let $=this.charAt(0);if(!$&&!this.atEnd)return this.setNext("line-start");if($==="-"||$==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");let q=this.peek(3);if((q==="---"||q==="...")&&G0(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,q==="---"?"doc":"stream"}if(this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!G0(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){let[$,q]=this.peek(2);if(!q&&!this.atEnd)return this.setNext("block-start");if(($==="-"||$==="?"||$===":")&&G0(q)){let Z=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=Z,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);let $=this.getLine();if($===null)return this.setNext("doc");let q=yield*this.pushIndicators();switch($[q]){case"#":yield*this.pushCount($.length-q);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(_2),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return q+=yield*this.parseBlockScalarHeader(),q+=yield*this.pushSpaces(!0),yield*this.pushCount($.length-q),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let $,q,Z=-1;do{if($=yield*this.pushNewline(),$>0)q=yield*this.pushSpaces(!1),this.indentValue=Z=q;else q=0;q+=yield*this.pushSpaces(!0)}while($+q>0);let Q=this.getLine();if(Q===null)return this.setNext("flow");if(Z!==-1&&Z<this.indentNext&&Q[0]!=="#"||Z===0&&(Q.startsWith("---")||Q.startsWith("..."))&&G0(Q[3])){if(!(Z===this.indentNext-1&&this.flowLevel===1&&(Q[0]==="]"||Q[0]==="}")))return this.flowLevel=0,yield S$.FLOW_END,yield*this.parseLineStart()}let X=0;while(Q[X]===",")X+=yield*this.pushCount(1),X+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(X+=yield*this.pushIndicators(),Q[X]){case void 0:return"flow";case"#":return yield*this.pushCount(Q.length-X),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(_2),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{let z=this.charAt(1);if(this.flowKey||G0(z)||z===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){let $=this.charAt(0),q=this.buffer.indexOf($,this.pos+1);if($==="'")while(q!==-1&&this.buffer[q+1]==="'")q=this.buffer.indexOf("'",q+2);else while(q!==-1){let X=0;while(this.buffer[q-1-X]==="\\")X+=1;if(X%2===0)break;q=this.buffer.indexOf('"',q+1)}let Z=this.buffer.substring(0,q),Q=Z.indexOf(`
|
|
125
125
|
`,this.pos);if(Q!==-1){while(Q!==-1){let X=this.continueScalar(Q+1);if(X===-1)break;Q=Z.indexOf(`
|
|
126
126
|
`,X)}if(Q!==-1)q=Q-(Z[Q-1]==="\r"?2:1)}if(q===-1){if(!this.atEnd)return this.setNext("quoted-scalar");q=this.buffer.length}return yield*this.pushToIndex(q+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let $=this.pos;while(!0){let q=this.buffer[++$];if(q==="+")this.blockScalarKeep=!0;else if(q>"0"&&q<="9")this.blockScalarIndent=Number(q)-1;else if(q!=="-")break}return yield*this.pushUntil((q)=>G0(q)||q==="#")}*parseBlockScalar(){let $=this.pos-1,q=0,Z;$:for(let X=this.pos;Z=this.buffer[X];++X)switch(Z){case" ":q+=1;break;case`
|
|
127
127
|
`:$=X,q=0;break;case"\r":{let z=this.buffer[X+1];if(!z&&!this.atEnd)return this.setNext("block-scalar");if(z===`
|
|
@@ -131,34 +131,34 @@ ${q.comment}`:q.comment}this.doc.range[2]=q.offset;break}default:this.errors.pus
|
|
|
131
131
|
`&&X>=this.pos&&X+1+q>J)$=X;else break}while(!0);return yield S$.SCALAR,yield*this.pushToIndex($+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){let $=this.flowLevel>0,q=this.pos-1,Z=this.pos-1,Q;while(Q=this.buffer[++Z])if(Q===":"){let X=this.buffer[Z+1];if(G0(X)||$&&yq.has(X))break;q=Z}else if(G0(Q)){let X=this.buffer[Z+1];if(Q==="\r")if(X===`
|
|
132
132
|
`)Z+=1,Q=`
|
|
133
133
|
`,X=this.buffer[Z+1];else q=Z;if(X==="#"||$&&yq.has(X))break;if(Q===`
|
|
134
|
-
`){let z=this.continueScalar(Z+1);if(z===-1)break;Z=Math.max(Z,z-2)}}else{if($&&yq.has(Q))break;q=Z}if(!Q&&!this.atEnd)return this.setNext("plain-scalar");return yield S$.SCALAR,yield*this.pushToIndex(q+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,q){let Z=this.buffer.slice(this.pos,$);if(Z)return yield Z,this.pos+=Z.length,Z.length;else if(q)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(
|
|
134
|
+
`){let z=this.continueScalar(Z+1);if(z===-1)break;Z=Math.max(Z,z-2)}}else{if($&&yq.has(Q))break;q=Z}if(!Q&&!this.atEnd)return this.setNext("plain-scalar");return yield S$.SCALAR,yield*this.pushToIndex(q+1,!0),$?"flow":"doc"}*pushCount($){if($>0)return yield this.buffer.substr(this.pos,$),this.pos+=$,$;return 0}*pushToIndex($,q){let Z=this.buffer.slice(this.pos,$);if(Z)return yield Z,this.pos+=Z.length,Z.length;else if(q)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(_2))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{let $=this.flowLevel>0,q=this.charAt(1);if(G0(q)||$&&yq.has(q)){if(!$)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=!1;return(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let $=this.pos+2,q=this.buffer[$];while(!G0(q)&&q!==">")q=this.buffer[++$];return yield*this.pushToIndex(q===">"?$+1:$,!1)}else{let $=this.pos+1,q=this.buffer[$];while(q)if(QY.has(q))q=this.buffer[++$];else if(q==="%"&&O5.has(this.buffer[$+1])&&O5.has(this.buffer[$+2]))q=this.buffer[$+=3];else break;return yield*this.pushToIndex($,!1)}}*pushNewline(){let $=this.buffer[this.pos];if($===`
|
|
135
135
|
`)return yield*this.pushCount(1);else if($==="\r"&&this.charAt(1)===`
|
|
136
|
-
`)return yield*this.pushCount(2);else return 0}*pushSpaces($){let q=this.pos-1,Z;do Z=this.buffer[++q];while(Z===" "||$&&Z==="\t");let Q=q-this.pos;if(Q>0)yield this.buffer.substr(this.pos,Q),this.pos=q;return Q}*pushUntil($){let q=this.pos,Z=this.buffer[q];while(!$(Z))Z=this.buffer[++q];return yield*this.pushToIndex(q,!1)}}
|
|
136
|
+
`)return yield*this.pushCount(2);else return 0}*pushSpaces($){let q=this.pos-1,Z;do Z=this.buffer[++q];while(Z===" "||$&&Z==="\t");let Q=q-this.pos;if(Q>0)yield this.buffer.substr(this.pos,Q),this.pos=q;return Q}*pushUntil($){let q=this.pos,Z=this.buffer[q];while(!$(Z))Z=this.buffer[++q];return yield*this.pushToIndex(q,!1)}}zY.Lexer=A5});var F2=R((GY)=>{class T5{constructor(){this.lineStarts=[],this.addNewLine=($)=>this.lineStarts.push($),this.linePos=($)=>{let q=0,Z=this.lineStarts.length;while(q<Z){let X=q+Z>>1;if(this.lineStarts[X]<$)q=X+1;else Z=X}if(this.lineStarts[q]===$)return{line:q+1,col:1};if(q===0)return{line:0,col:$};let Q=this.lineStarts[q-1];return{line:q,col:$-Q+1}}}}GY.LineCounter=T5});var O2=R((HY)=>{var UY=h("process"),I5=xq(),WY=L2();function M0($,q){for(let Z=0;Z<$.length;++Z)if($[Z].type===q)return!0;return!1}function M5($){for(let q=0;q<$.length;++q)switch($[q].type){case"space":case"comment":case"newline":break;default:return q}return-1}function N5($){switch($?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function kq($){switch($.type){case"document":return $.start;case"block-map":{let q=$.items[$.items.length-1];return q.sep??q.start}case"block-seq":return $.items[$.items.length-1].start;default:return[]}}function X$($){if($.length===0)return[];let q=$.length;$:while(--q>=0)switch($[q].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break $}while($[++q]?.type==="space");return $.splice(q,$.length)}function j5($){if($.start.type==="flow-seq-start"){for(let q of $.items)if(q.sep&&!q.value&&!M0(q.start,"explicit-key-ind")&&!M0(q.sep,"map-value-ind")){if(q.key)q.value=q.key;if(delete q.key,N5(q.value))if(q.value.end)Array.prototype.push.apply(q.value.end,q.sep);else q.value.end=q.sep;else Array.prototype.push.apply(q.start,q.sep);delete q.sep}}}class D5{constructor($){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new WY.Lexer,this.onNewLine=$}*parse($,q=!1){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(let Z of this.lexer.lex($,q))yield*this.next(Z);if(!q)yield*this.end()}*next($){if(this.source=$,UY.env.LOG_TOKENS)console.log("|",I5.prettyToken($));if(this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=$.length;return}let q=I5.tokenType($);if(!q){let Z=`Not a YAML token: ${$}`;yield*this.pop({type:"error",offset:this.offset,message:Z,source:$}),this.offset+=$.length}else if(q==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=q,yield*this.step(),q){case"newline":if(this.atNewLine=!0,this.indent=0,this.onNewLine)this.onNewLine(this.offset+$.length);break;case"space":if(this.atNewLine&&$[0]===" ")this.indent+=$.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=$.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=$.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){let $=this.peek(1);if(this.type==="doc-end"&&$?.type!=="doc-end"){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!$)return yield*this.stream();switch($.type){case"document":return yield*this.document($);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar($);case"block-scalar":return yield*this.blockScalar($);case"block-map":return yield*this.blockMap($);case"block-seq":return yield*this.blockSequence($);case"flow-collection":return yield*this.flowCollection($);case"doc-end":return yield*this.documentEnd($)}yield*this.pop()}peek($){return this.stack[this.stack.length-$]}*pop($){let q=$??this.stack.pop();if(!q)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield q;else{let Z=this.peek(1);if(q.type==="block-scalar")q.indent="indent"in Z?Z.indent:0;else if(q.type==="flow-collection"&&Z.type==="document")q.indent=0;if(q.type==="flow-collection")j5(q);switch(Z.type){case"document":Z.value=q;break;case"block-scalar":Z.props.push(q);break;case"block-map":{let Q=Z.items[Z.items.length-1];if(Q.value){Z.items.push({start:[],key:q,sep:[]}),this.onKeyLine=!0;return}else if(Q.sep)Q.value=q;else{Object.assign(Q,{key:q,sep:[]}),this.onKeyLine=!Q.explicitKey;return}break}case"block-seq":{let Q=Z.items[Z.items.length-1];if(Q.value)Z.items.push({start:[],value:q});else Q.value=q;break}case"flow-collection":{let Q=Z.items[Z.items.length-1];if(!Q||Q.value)Z.items.push({start:[],key:q,sep:[]});else if(Q.sep)Q.value=q;else Object.assign(Q,{key:q,sep:[]});return}default:yield*this.pop(),yield*this.pop(q)}if((Z.type==="document"||Z.type==="block-map"||Z.type==="block-seq")&&(q.type==="block-map"||q.type==="block-seq")){let Q=q.items[q.items.length-1];if(Q&&!Q.sep&&!Q.value&&Q.start.length>0&&M5(Q.start)===-1&&(q.indent===0||Q.start.every((X)=>X.type!=="comment"||X.indent<q.indent))){if(Z.type==="document")Z.end=Q.start;else Z.items.push({start:Q.start});q.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{let $={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")$.start.push(this.sourceToken);this.stack.push($);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document($){if($.value)return yield*this.lineEnd($);switch(this.type){case"doc-start":{if(M5($.start)!==-1)yield*this.pop(),yield*this.step();else $.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":$.start.push(this.sourceToken);return}let q=this.startBlockValue($);if(q)this.stack.push(q);else yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar($){if(this.type==="map-value-ind"){let q=kq(this.peek(2)),Z=X$(q),Q;if($.end)Q=$.end,Q.push(this.sourceToken),delete $.end;else Q=[this.sourceToken];let X={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:Z,key:$,sep:Q}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=X}else yield*this.lineEnd($)}*blockScalar($){switch(this.type){case"space":case"comment":case"newline":$.props.push(this.sourceToken);return;case"scalar":if($.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let q=this.source.indexOf(`
|
|
137
137
|
`)+1;while(q!==0)this.onNewLine(this.offset+q),q=this.source.indexOf(`
|
|
138
|
-
`,q)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let q=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,q.value){let Z="end"in q.value?q.value.end:void 0;if((Array.isArray(Z)?Z[Z.length-1]:void 0)?.type==="comment")Z?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)$.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else{if(this.atIndentedComment(q.start,$.indent)){let Q=$.items[$.items.length-2]?.value?.end;if(Array.isArray(Q)){Array.prototype.push.apply(Q,q.start),Q.push(this.sourceToken),$.items.pop();return}}q.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let Z=!this.onKeyLine&&this.indent===$.indent,Q=Z&&(q.sep||q.explicitKey)&&this.type!=="seq-item-ind",X=[];if(Q&&q.sep&&!q.value){let z=[];for(let J=0;J<q.sep.length;++J){let G=q.sep[J];switch(G.type){case"newline":z.push(J);break;case"space":break;case"comment":if(G.indent>$.indent)z.length=0;break;default:z.length=0}}if(z.length>=2)X=q.sep.splice(z[1])}switch(this.type){case"anchor":case"tag":if(Q||q.value)X.push(this.sourceToken),$.items.push({start:X}),this.onKeyLine=!0;else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"explicit-key-ind":if(!q.sep&&!q.explicitKey)q.start.push(this.sourceToken),q.explicitKey=!0;else if(Q||q.value)X.push(this.sourceToken),$.items.push({start:X,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(q.explicitKey)if(!q.sep)if(M0(q.start,"newline"))Object.assign(q,{key:null,sep:[this.sourceToken]});else{let z=X$(q.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]})}else if(q.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(M0(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]});else if(
|
|
138
|
+
`,q)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap($){let q=$.items[$.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,q.value){let Z="end"in q.value?q.value.end:void 0;if((Array.isArray(Z)?Z[Z.length-1]:void 0)?.type==="comment")Z?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)$.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else{if(this.atIndentedComment(q.start,$.indent)){let Q=$.items[$.items.length-2]?.value?.end;if(Array.isArray(Q)){Array.prototype.push.apply(Q,q.start),Q.push(this.sourceToken),$.items.pop();return}}q.start.push(this.sourceToken)}return}if(this.indent>=$.indent){let Z=!this.onKeyLine&&this.indent===$.indent,Q=Z&&(q.sep||q.explicitKey)&&this.type!=="seq-item-ind",X=[];if(Q&&q.sep&&!q.value){let z=[];for(let J=0;J<q.sep.length;++J){let G=q.sep[J];switch(G.type){case"newline":z.push(J);break;case"space":break;case"comment":if(G.indent>$.indent)z.length=0;break;default:z.length=0}}if(z.length>=2)X=q.sep.splice(z[1])}switch(this.type){case"anchor":case"tag":if(Q||q.value)X.push(this.sourceToken),$.items.push({start:X}),this.onKeyLine=!0;else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"explicit-key-ind":if(!q.sep&&!q.explicitKey)q.start.push(this.sourceToken),q.explicitKey=!0;else if(Q||q.value)X.push(this.sourceToken),$.items.push({start:X,explicitKey:!0});else this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]});this.onKeyLine=!0;return;case"map-value-ind":if(q.explicitKey)if(!q.sep)if(M0(q.start,"newline"))Object.assign(q,{key:null,sep:[this.sourceToken]});else{let z=X$(q.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:null,sep:[this.sourceToken]}]})}else if(q.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(M0(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:X,key:null,sep:[this.sourceToken]}]});else if(N5(q.key)&&!M0(q.sep,"newline")){let z=X$(q.start),J=q.key,G=q.sep;G.push(this.sourceToken),delete q.key,delete q.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:z,key:J,sep:G}]})}else if(X.length>0)q.sep=q.sep.concat(X,this.sourceToken);else q.sep.push(this.sourceToken);else if(!q.sep)Object.assign(q,{key:null,sep:[this.sourceToken]});else if(q.value||Q)$.items.push({start:X,key:null,sep:[this.sourceToken]});else if(M0(q.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]});else q.sep.push(this.sourceToken);this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let z=this.flowScalar(this.type);if(Q||q.value)$.items.push({start:X,key:z,sep:[]}),this.onKeyLine=!0;else if(q.sep)this.stack.push(z);else Object.assign(q,{key:z,sep:[]}),this.onKeyLine=!0;return}default:{let z=this.startBlockValue($);if(z){if(z.type==="block-seq"){if(!q.explicitKey&&q.sep&&!M0(q.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else if(Z)$.items.push({start:X});this.stack.push(z);return}}}}yield*this.pop(),yield*this.step()}*blockSequence($){let q=$.items[$.items.length-1];switch(this.type){case"newline":if(q.value){let Z="end"in q.value?q.value.end:void 0;if((Array.isArray(Z)?Z[Z.length-1]:void 0)?.type==="comment")Z?.push(this.sourceToken);else $.items.push({start:[this.sourceToken]})}else q.start.push(this.sourceToken);return;case"space":case"comment":if(q.value)$.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(q.start,$.indent)){let Q=$.items[$.items.length-2]?.value?.end;if(Array.isArray(Q)){Array.prototype.push.apply(Q,q.start),Q.push(this.sourceToken),$.items.pop();return}}q.start.push(this.sourceToken)}return;case"anchor":case"tag":if(q.value||this.indent<=$.indent)break;q.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==$.indent)break;if(q.value||M0(q.start,"seq-item-ind"))$.items.push({start:[this.sourceToken]});else q.start.push(this.sourceToken);return}if(this.indent>$.indent){let Z=this.startBlockValue($);if(Z){this.stack.push(Z);return}}yield*this.pop(),yield*this.step()}*flowCollection($){let q=$.items[$.items.length-1];if(this.type==="flow-error-end"){let Z;do yield*this.pop(),Z=this.peek(1);while(Z?.type==="flow-collection")}else if($.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!q||q.sep)$.items.push({start:[this.sourceToken]});else q.start.push(this.sourceToken);return;case"map-value-ind":if(!q||q.value)$.items.push({start:[],key:null,sep:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else Object.assign(q,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!q||q.value)$.items.push({start:[this.sourceToken]});else if(q.sep)q.sep.push(this.sourceToken);else q.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{let Q=this.flowScalar(this.type);if(!q||q.value)$.items.push({start:[],key:Q,sep:[]});else if(q.sep)this.stack.push(Q);else Object.assign(q,{key:Q,sep:[]});return}case"flow-map-end":case"flow-seq-end":$.end.push(this.sourceToken);return}let Z=this.startBlockValue($);if(Z)this.stack.push(Z);else yield*this.pop(),yield*this.step()}else{let Z=this.peek(2);if(Z.type==="block-map"&&(this.type==="map-value-ind"&&Z.indent===$.indent||this.type==="newline"&&!Z.items[Z.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&Z.type!=="flow-collection"){let Q=kq(Z),X=X$(Q);j5($);let z=$.end.splice(1,$.end.length);z.push(this.sourceToken);let J={type:"block-map",offset:$.offset,indent:$.indent,items:[{start:X,key:$,sep:z}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=J}else yield*this.lineEnd($)}}flowScalar($){if(this.onNewLine){let q=this.source.indexOf(`
|
|
139
139
|
`)+1;while(q!==0)this.onNewLine(this.offset+q),q=this.source.indexOf(`
|
|
140
|
-
`,q)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let q=kq($),Z=X$(q);return Z.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let q=kq($),Z=X$(q);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,q){if(this.type!=="comment")return!1;if(this.indent<=q)return!1;return $.every((Z)=>Z.type==="newline"||Z.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}
|
|
141
|
-
`).length})}catch{}}}catch{continue}}}return await Z($,""),q}class
|
|
142
|
-
`;X.write(H),G=V}return Y(),new Promise((U)=>{let V="",H=null;function
|
|
143
|
-
`){Q.searchActive=!1,Y();return}if(F===""||F==="\b"){if(Q.filter.length>0)Q.filter=Q.filter.slice(0,-1),Q.applyFilter(q);else Q.searchActive=!1;Y();return}if(F==="\x03"){
|
|
144
|
-
`:_(Q.getSelectedIndices());break;case"\x1B":if(Q.filter!=="")Q.filter="",Q.applyFilter(q),Y();else _([]);break;case"":case"\b":if(Q.filter.length>0)Q.filter=Q.filter.slice(0,-1),Q.applyFilter(q),Y();break;case"\x03":
|
|
140
|
+
`,q)+1}return{type:$,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue($){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;let q=kq($),Z=X$(q);return Z.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;let q=kq($),Z=X$(q);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:Z,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment($,q){if(this.type!=="comment")return!1;if(this.indent<=q)return!1;return $.every((Z)=>Z.type==="newline"||Z.type==="space")}*documentEnd($){if(this.type!=="doc-mode"){if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd($){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:if($.end)$.end.push(this.sourceToken);else $.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}HY.Parser=D5});var E5=R((TY)=>{var R5=G2(),KY=R$(),b$=w$(),BY=F9(),_Y=f(),LY=F2(),w5=O2();function P5($){let q=$.prettyErrors!==!1;return{lineCounter:$.lineCounter||q&&new LY.LineCounter||null,prettyErrors:q}}function FY($,q={}){let{lineCounter:Z,prettyErrors:Q}=P5(q),X=new w5.Parser(Z?.addNewLine),z=new R5.Composer(q),J=Array.from(z.compose(X.parse($)));if(Q&&Z)for(let G of J)G.errors.forEach(b$.prettifyError($,Z)),G.warnings.forEach(b$.prettifyError($,Z));if(J.length>0)return J;return Object.assign([],{empty:!0},z.streamInfo())}function C5($,q={}){let{lineCounter:Z,prettyErrors:Q}=P5(q),X=new w5.Parser(Z?.addNewLine),z=new R5.Composer(q),J=null;for(let G of z.compose(X.parse($),!0,$.length))if(!J)J=G;else if(J.options.logLevel!=="silent"){J.errors.push(new b$.YAMLParseError(G.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}if(Q&&Z)J.errors.forEach(b$.prettifyError($,Z)),J.warnings.forEach(b$.prettifyError($,Z));return J}function OY($,q,Z){let Q=void 0;if(typeof q==="function")Q=q;else if(Z===void 0&&q&&typeof q==="object")Z=q;let X=C5($,Z);if(!X)return null;if(X.warnings.forEach((z)=>BY.warn(X.options.logLevel,z)),X.errors.length>0)if(X.options.logLevel!=="silent")throw X.errors[0];else X.errors=[];return X.toJS(Object.assign({reviver:Q},Z))}function AY($,q,Z){let Q=null;if(typeof q==="function"||Array.isArray(q))Q=q;else if(Z===void 0&&q)Z=q;if(typeof Z==="string")Z=Z.length;if(typeof Z==="number"){let X=Math.round(Z);Z=X<1?void 0:X>8?{indent:8}:{indent:X}}if($===void 0){let{keepUndefined:X}=Z??q??{};if(!X)return}if(_Y.isDocument($)&&!Q)return $.toString(Z);return new KY.Document($,Q,Z).toString(Z)}TY.parse=OY;TY.parseAllDocuments=FY;TY.parseDocument=C5;TY.stringify=AY});import{execFile as aZ}from"child_process";import{promisify as sZ}from"util";import{mkdtemp as H4,readdir as tZ,readFile as J9,rm as i$,cp as rZ,access as z9,stat as eZ,lstat as $6,symlink as q6,mkdir as Z6}from"fs/promises";import{join as V0,resolve as V4,relative as Q6,basename as X6}from"path";import{homedir as K4}from"os";import{tmpdir as B4}from"os";import{readdir as pZ,readFile as dZ,stat as cZ}from"fs/promises";import{join as lZ}from"path";var nZ=new Set([".png",".jpg",".jpeg",".gif",".ico",".bmp",".webp",".mp3",".mp4",".wav",".avi",".mov",".zip",".tar",".gz",".bz2",".7z",".exe",".dll",".so",".dylib",".woff",".woff2",".ttf",".eot",".pdf",".doc",".docx"]),iZ=524288;async function l$($){let q=[];async function Z(Q,X){let z;try{z=await pZ(Q)}catch{return}for(let J of z){if(J===".git"||J==="node_modules")continue;let G=lZ(Q,J),Y=X?`${X}/${J}`:J;try{let U=await cZ(G);if(U.isDirectory())await Z(G,Y);else if(U.isFile()){let V=J.includes(".")?`.${J.split(".").pop().toLowerCase()}`:"";if(nZ.has(V))continue;if(U.size>iZ)continue;try{let H=await dZ(G,"utf-8");q.push({relPath:Y,content:H,lineCount:H.split(`
|
|
141
|
+
`).length})}catch{}}}catch{continue}}}return await Z($,""),q}class W4{selected;cursor;scrollOffset;pageSize;itemCount;filter;searchActive;filteredMap;constructor($,q){this.selected=$.map((Z)=>Z.checked),this.cursor=1,this.scrollOffset=0,this.pageSize=q,this.itemCount=$.length,this.filter="",this.searchActive=!1,this.filteredMap=$.map((Z,Q)=>Q)}get totalRows(){return this.filteredMap.length+1}applyFilter($){if(this.filter==="")this.filteredMap=$.map((q,Z)=>Z);else{let q=this.filter.toLowerCase();this.filteredMap=[];for(let Z=0;Z<$.length;Z++)if(($[Z].label.toLowerCase()+" "+($[Z].hint?.toLowerCase()??"")).includes(q))this.filteredMap.push(Z)}if(this.cursor>=this.totalRows)this.cursor=Math.max(0,this.totalRows-1);if(this.scrollOffset>0&&this.scrollOffset>=this.totalRows)this.scrollOffset=Math.max(0,this.totalRows-this.pageSize)}cursorToOriginalIndex(){if(this.cursor===0)return-1;return this.filteredMap[this.cursor-1]??-1}toggleCurrent(){if(this.cursor===0)this.toggleAll();else{let $=this.cursorToOriginalIndex();if($>=0)this.selected[$]=!this.selected[$]}}toggleAll(){let $=this.filteredMap,Z=!$.every((Q)=>this.selected[Q]);for(let Q of $)this.selected[Q]=Z}moveUp(){if(this.cursor>0)this.cursor--;else this.cursor=this.totalRows-1;this.adjustScroll()}moveDown(){if(this.cursor<this.totalRows-1)this.cursor++;else this.cursor=0;this.adjustScroll()}getSelectedIndices(){let $=[];for(let q=0;q<this.selected.length;q++)if(this.selected[q])$.push(q);return $}getVisibleRange(){let $=this.scrollOffset,q=Math.min(this.scrollOffset+this.pageSize,this.totalRows);return{start:$,end:q}}adjustScroll(){if(this.cursor<this.scrollOffset)this.scrollOffset=this.cursor;else if(this.cursor>=this.scrollOffset+this.pageSize)this.scrollOffset=this.cursor-this.pageSize+1}}function oZ($,q,Z){let Q=[];if($.searchActive||$.filter!==""){let U=W.cyan("/"),V=$.filter,H=$.searchActive?W.cyan("█"):"";if(Q.push(` ${U}${V}${H}`),$.filteredMap.length===0)Q.push(W.dim(" No matches found"));Q.push("")}let{start:X,end:z}=$.getVisibleRange();if(X>0)Q.push(W.dim(` ... ${X} more above`));for(let U=X;U<z;U++){let H=U===$.cursor?W.cyan(">"):" ";if(U===0){let K=$.filteredMap,L=K.length>0&&K.every((F)=>$.selected[F])?W.green("[*]"):"[ ]",B=$.filter!==""?`Select All Matching (${$.filteredMap.length})`:"Select All / Deselect All";Q.push(`${H} ${L} ${W.bold(B)}`)}else{let K=$.filteredMap[U-1],_=q[K],B=$.selected[K]?W.green("[*]"):"[ ]",F=`${H} ${B} `,O=7,A=W.bold(_.label),M=_.label.length;if(_.hint){let j=Z-7-M-2;if(j>10){let I=Q9(_.hint,j);Q.push(`${F}${A} ${W.dim(I)}`)}else{let I=Q9(_.label,Z-7);Q.push(`${F}${W.bold(I)}`)}}else{let j=Q9(_.label,Z-7);Q.push(`${F}${W.bold(j)}`)}}}let J=$.totalRows-z;if(J>0)Q.push(W.dim(` ... ${J} more below`));let G=$.getSelectedIndices().length,Y=$.filter!==""?` matching: ${$.filteredMap.length}/${$.itemCount}`:"";if(Q.push(""),$.searchActive)Q.push(W.dim(` ${G} of ${$.itemCount} selected${Y} | Type to filter Esc Clear Enter Done searching`));else Q.push(W.dim(` ${G} of ${$.itemCount} selected${Y} | `+"↑/↓ Navigate Space Toggle a All / Search Enter Confirm Esc Cancel"));return Q}function Q9($,q){if(q<=0)return"";if($.length<=q)return $;if(q<=3)return $.slice(0,q);return $.slice(0,q-3)+"..."}async function d0($){let{items:q}=$,Z=$.pageSize??Math.min(q.length+1,15),Q=new W4(q,Z),X=process.stderr,z=process.stdin,J=X.columns||80;if(typeof z.setRawMode==="function")z.setRawMode(!0);z.resume(),z.setEncoding("utf-8"),X.write("\x1B[?25l");let G=0;function Y(){let U=oZ(Q,q,J);if(G>0)X.write(`\x1B[${G}F`);let V=Math.max(U.length,G),H="";for(let K=0;K<V;K++)H+=`\x1B[2K${K<U.length?U[K]:""}
|
|
142
|
+
`;X.write(H),G=V}return Y(),new Promise((U)=>{let V="",H=null;function K(){if(z.removeListener("data",B),typeof z.setRawMode==="function")z.setRawMode(!1);if(z.pause(),X.write("\x1B[?25h"),H)clearTimeout(H)}function _(F){K(),U(F)}function L(F){if(Q.searchActive){if(F==="\x1B"){Q.searchActive=!1,Q.filter="",Q.applyFilter(q),Y();return}if(F==="\r"||F===`
|
|
143
|
+
`){Q.searchActive=!1,Y();return}if(F===""||F==="\b"){if(Q.filter.length>0)Q.filter=Q.filter.slice(0,-1),Q.applyFilter(q);else Q.searchActive=!1;Y();return}if(F==="\x03"){K(),process.kill(process.pid,"SIGINT");return}if(F==="\x1B[A"){Q.moveUp(),Y();return}if(F==="\x1B[B"){Q.moveDown(),Y();return}if(F===" "){Q.toggleCurrent(),Y();return}if(F.length===1&&F>=" "&&F<="~"){Q.filter+=F,Q.applyFilter(q),Y();return}return}switch(F){case"\x1B[A":case"k":Q.moveUp(),Y();break;case"\x1B[B":case"j":Q.moveDown(),Y();break;case" ":Q.toggleCurrent(),Y();break;case"a":Q.toggleAll(),Y();break;case"/":Q.searchActive=!0,Y();break;case"\r":case`
|
|
144
|
+
`:_(Q.getSelectedIndices());break;case"\x1B":if(Q.filter!=="")Q.filter="",Q.applyFilter(q),Y();else _([]);break;case"":case"\b":if(Q.filter.length>0)Q.filter=Q.filter.slice(0,-1),Q.applyFilter(q),Y();break;case"\x03":K(),process.kill(process.pid,"SIGINT");break}}function B(F){if(V.length>0){if(V+=F,H)clearTimeout(H);if(V.length>=3&&V[1]==="["){let A=V.slice(0,3),M=V.slice(3);if(V="",L(A),M)B(M);return}let O=V;V="",L("\x1B");for(let A=1;A<O.length;A++)L(O[A]);return}for(let O=0;O<F.length;O++){let A=F[O];if(A==="\x1B"){let M=F.slice(O);if(M.length>=3&&M[1]==="[")L(M.slice(0,3)),O+=2;else if(M.length>=2){V=M,H=setTimeout(()=>{let j=V;V="",L("\x1B");for(let I=1;I<j.length;I++)L(j[I])},50);return}else{V="\x1B",H=setTimeout(()=>{V="",L("\x1B")},50);return}}else L(A)}}z.on("data",B)})}var R0=sZ(aZ),z6=/^[a-zA-Z0-9_-]+$/,J6=/^[a-zA-Z0-9._-]+$/,G6=/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/,_4=128,Y6=/^https?:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\/tree\/(.+))?\/?$/;function U6($){return $.startsWith("/")||$.startsWith("./")||$.startsWith(".\\")||$.startsWith("../")||$.startsWith("..\\")||$.startsWith("~/")||$.startsWith("~\\")||$==="~"||$==="."||$===".."||/^[a-zA-Z]:[/\\]/.test($)}function W6($){let q;if($==="~")q=K4();else if($.startsWith("~/")||$.startsWith("~\\"))q=V4(K4(),$.slice(2));else q=V4($);let Z=X6(q);return E(`install: parsed local source -> path=${q}`),{owner:"local",repo:Z,ref:null,subpath:null,cloneUrl:"",sshCloneUrl:"",isLocal:!0,localPath:q}}function c0($){if(U6($))return W6($);let q=Y6.exec($);if(q){let[,H,K,_]=q,L=K.endsWith(".git")?K.slice(0,-4):K;$=`github:${H}/${L}${_?`#${_}`:""}`}if(!$.startsWith("github:"))throw Error(`Invalid source format. Got: "${$}"
|
|
145
145
|
Supported formats:
|
|
146
146
|
github:owner/repo[#ref]
|
|
147
147
|
github:owner/repo#ref:path
|
|
148
148
|
https://github.com/owner/repo
|
|
149
149
|
https://github.com/owner/repo/tree/branch/path/to/skill
|
|
150
150
|
/path/to/local/skill
|
|
151
|
-
./relative/path/to/skill`);let Z=$.slice(7),Q=Z.indexOf("#"),X,z=null,J=null;if(Q!==-1){X=Z.slice(0,Q);let H=Z.slice(Q+1);if(!H)throw Error("Invalid source: ref cannot be empty after #");let
|
|
152
|
-
`)){let z=X.match(/\trefs\/(?:heads|tags)\/(.+)$/);if(z)Z.add(z[1])}let Q=$.ref.split("/");for(let X=1;X<Q.length;X++){let z=Q.slice(0,X).join("/");if(Z.has(z)){let J=Q.slice(X).join("/");return E(`install: resolved ref="${z}" subpath="${J}"`),{...$,ref:z,subpath:J||null}}}}catch(q){E(`install: ls-remote failed, treating entire ref as branch: ${q}`)}return $}function w0($){if(!$)throw Error("Invalid skill name: name cannot be empty");if($.includes("\x00"))throw Error("Invalid skill name: contains unsafe characters (null byte)");if($.includes(".."))throw Error("Invalid skill name: contains unsafe characters (..)");if($.includes("/")||$.includes("\\"))throw Error("Invalid skill name: contains unsafe characters (path separator)");if($.startsWith("."))throw Error("Invalid skill name: must not start with a dot");if($.length>
|
|
151
|
+
./relative/path/to/skill`);let Z=$.slice(7),Q=Z.indexOf("#"),X,z=null,J=null;if(Q!==-1){X=Z.slice(0,Q);let H=Z.slice(Q+1);if(!H)throw Error("Invalid source: ref cannot be empty after #");let K=H.indexOf(":");if(K!==-1){if(z=H.slice(0,K),!z)throw Error("Invalid source: ref cannot be empty before :");J=H.slice(K+1)||null}else z=H}else{let H=Z.indexOf(":");if(H!==-1)X=Z.slice(0,H),J=Z.slice(H+1)||null;else X=Z}let G=X.indexOf("/");if(G===-1)throw Error(`Invalid source: format must be github:owner/repo. Got: "${$}"`);let Y=X.slice(0,G),U=X.slice(G+1);if(!Y)throw Error("Invalid source: owner cannot be empty");if(!U)throw Error("Invalid source: repo cannot be empty");if(!z6.test(Y))throw Error(`Invalid source: owner contains invalid characters: "${Y}". Allowed: [a-zA-Z0-9_-]`);if(!J6.test(U))throw Error(`Invalid source: repo contains invalid characters: "${U}". Allowed: [a-zA-Z0-9._-]`);let V={owner:Y,repo:U,ref:z,subpath:J,cloneUrl:`https://github.com/${Y}/${U}.git`,sshCloneUrl:`git@github.com:${Y}/${U}.git`};return E(`install: parsed source -> owner=${Y} repo=${U} ref=${z} subpath=${J}`),V}async function G9($){if($.subpath!==null||!$.ref||!$.ref.includes("/"))return $;try{let{stdout:q}=await R0("git",["ls-remote","--heads","--tags",$.cloneUrl],{timeout:15000}),Z=new Set;for(let X of q.split(`
|
|
152
|
+
`)){let z=X.match(/\trefs\/(?:heads|tags)\/(.+)$/);if(z)Z.add(z[1])}let Q=$.ref.split("/");for(let X=1;X<Q.length;X++){let z=Q.slice(0,X).join("/");if(Z.has(z)){let J=Q.slice(X).join("/");return E(`install: resolved ref="${z}" subpath="${J}"`),{...$,ref:z,subpath:J||null}}}}catch(q){E(`install: ls-remote failed, treating entire ref as branch: ${q}`)}return $}function w0($){if(!$)throw Error("Invalid skill name: name cannot be empty");if($.includes("\x00"))throw Error("Invalid skill name: contains unsafe characters (null byte)");if($.includes(".."))throw Error("Invalid skill name: contains unsafe characters (..)");if($.includes("/")||$.includes("\\"))throw Error("Invalid skill name: contains unsafe characters (path separator)");if($.startsWith("."))throw Error("Invalid skill name: must not start with a dot");if($.length>_4)throw Error(`Invalid skill name: exceeds maximum length of ${_4} characters`);if(!G6.test($))throw Error(`Invalid skill name: "${$}" does not match allowed pattern [a-zA-Z0-9][a-zA-Z0-9._-]*`);return $}function H6($){let q=$.split(/[/\\]/).filter(Boolean),Z=q.length>0?q[q.length-1]:$;return w0(Z)}function F4($){let q=new Map;for(let Z of $){let Q=H6(Z),X=q.get(Q);if(X)X.push(Z);else q.set(Q,[Z])}return[...q.entries()].filter(([,Z])=>Z.length>1).map(([Z,Q])=>({name:Z,paths:Q}))}async function l0(){try{await R0("git",["--version"]),E("install: git available")}catch{throw Error("git is required for installing skills. Install git from https://git-scm.com")}}function V6($){if($.killed)return!1;let q=($.stderr||$.message||"").toLowerCase();return q.includes("authentication failed")||q.includes("could not read username")||q.includes("repository not found")||q.includes("returned error: 403")||q.includes("returned error: 401")||q.includes("terminal prompts disabled")||q.includes("permission denied")}function n$($){return $.killed?"Clone timed out after 60 seconds":`Clone failed: ${$.stderr||$.message}`}async function X9($,q,Z){if(q!==null&&/^[0-9a-f]{40}$/i.test(q))return await R0("git",["clone","--no-checkout",$,Z],{timeout:60000}),await R0("git",["checkout",q],{cwd:Z,timeout:30000}),Z;let X=["clone","--depth","1"];if(q)X.push("--branch",q);return X.push($,Z),await R0("git",X,{timeout:60000}),Z}async function n0($,q="auto"){E(`install: cloning ${$.owner}/${$.repo}${$.ref?` (ref: ${$.ref})`:""} (transport: ${q})`);let Z=await H4(V0(B4(),"asm-install-"));if(q==="ssh"||q==="https"){let Q=q==="ssh"?$.sshCloneUrl:$.cloneUrl;try{return await X9(Q,$.ref,Z)}catch(X){throw await Q0(Z),Error(n$(X))}}try{return await X9($.cloneUrl,$.ref,Z)}catch(Q){if(!V6(Q))throw await Q0(Z),Error(n$(Q));E("install: HTTPS clone failed with auth error, retrying with SSH..."),await Q0(Z);let X=await H4(V0(B4(),"asm-install-"));try{return await X9($.sshCloneUrl,$.ref,X)}catch(z){throw await Q0(X),Error(`Clone failed with both transports:
|
|
153
153
|
HTTPS: ${n$(Q)}
|
|
154
|
-
SSH: ${n$(z)}`)}}}async function P0($){let q=V0($,"SKILL.md"),Z;try{Z=await
|
|
155
|
-
`);for(let J=0;J<z.length;J++)for(let{category:G,pattern:Y}of
|
|
156
|
-
Use --force to overwrite.`)}catch(Z){if(Z.message?.includes("--force"))throw Z;E(`install: target ${$} — no conflict`)}}import{readFile as
|
|
157
|
-
`),Z=!1,Q=!1;for(let X of q){if(X.trim()==="---")if(!Z){Z=!0;continue}else{Q=!0;continue}if(Q&&X.trim().length>0)return!0}return!1}function
|
|
154
|
+
SSH: ${n$(z)}`)}}}async function P0($){let q=V0($,"SKILL.md"),Z;try{Z=await J9(q,"utf-8")}catch{throw Error("Not a valid skill: SKILL.md not found in repository root")}let Q=r(Z),X=$.split(/[/\\]/).pop()||"unknown",z=Q.name||X,J=z0(Q);return E(`install: validated skill "${z}" v${J}`),{name:z,version:J,description:(Q.description||"").replace(/\s*\n\s*/g," ").trim(),effort:Q.effort||Q["metadata.effort"]||void 0}}async function o$($,q=3){let Z=[];async function Q(X,z,J){let G;try{G=await tZ(X)}catch{return}for(let Y of G){if(Y===".git"||Y==="node_modules")continue;let U=V0(X,Y);try{if(!(await eZ(U)).isDirectory())continue}catch{continue}let V=z?`${z}/${Y}`:Y,H=J+1,K=V0(U,"SKILL.md");try{let _=await J9(K,"utf-8"),L=r(_);Z.push({relPath:V,name:L.name||Y,version:z0(L),description:(L.description||"").replace(/\s*\n\s*/g," ").trim(),effort:L.effort||L["metadata.effort"]||void 0,license:(L.license||"").trim(),creator:(L["metadata.creator"]||"").trim(),compatibility:(L.compatibility||"").trim(),allowedTools:L4(L)})}catch{if(H<q)await Q(U,V,H)}}}return await Q($,"",0),Z.sort((X,z)=>X.name.localeCompare(z.name)),Z}var K6=[{category:"Shell commands",pattern:/\b(bash|sh\s+-c)\b/},{category:"Shell commands",pattern:/\bexec\(/},{category:"Shell commands",pattern:/\bchild_process\b/},{category:"Shell commands",pattern:/\bBun\.spawn\b/},{category:"Code execution",pattern:/\beval\(/},{category:"Code execution",pattern:/\bFunction\(/},{category:"Code execution",pattern:/\bnew\s+Function\b/},{category:"Credentials",pattern:/\b(API_KEY|SECRET|TOKEN|PASSWORD)\s*[=:]/},{category:"External URLs",pattern:/https?:\/\//}];async function O4($){let q=[],Z=await l$($);for(let{relPath:Q,content:X}of Z){let z=X.split(`
|
|
155
|
+
`);for(let J=0;J<z.length;J++)for(let{category:G,pattern:Y}of K6)if(Y.test(z[J])){let U=z[J].trim();q.push({category:G,file:Q,line:J+1,match:U.length>100?U.slice(0,100)+"…":U})}}return q}async function a$($){let q=$.source.isLocal?`local:${$.source.localPath}`:`github:${$.source.owner}/${$.source.repo}${$.source.ref?`#${$.source.ref}`:""}${$.source.subpath?`:${$.source.subpath}`:""}`;if($.force)try{await z9($.targetDir),await i$($.targetDir,{recursive:!0,force:!0})}catch{}let Z=$.sourceDir;try{await rZ(Z,$.targetDir,{recursive:!0})}catch(G){throw Error(`Failed to install: ${G.message}`)}let Q=V0($.targetDir,".git");try{await i$(Q,{recursive:!0,force:!0})}catch{}E(`install: copied files to ${$.targetDir}`);let X=V0($.targetDir,"SKILL.md");try{await z9(X)}catch{throw Error("Installation verification failed: SKILL.md not found at target")}let z=await J9(X,"utf-8"),J=r(z);return{success:!0,path:$.targetDir,name:J.name||$.skillName,version:z0(J),provider:$.providerLabel,source:q}}async function A4($,q){let Z=await a$($);for(let Q of q){if(Q.name===$.providerName)continue;let X=$.scope==="project"?Q.project:Q.global,z=X0(X),J=V0(z,$.skillName);await Z6(z,{recursive:!0});try{if((await $6(J)).isSymbolicLink())await i$(J);else{E(`install: skipping ${J} — existing non-symlink directory`);continue}}catch{}let G=Q6(z,$.targetDir);await q6(G,J,"dir"),E(`install: symlinked ${J} -> ${G}`)}return Z.provider=`All (${q.map((Q)=>Q.label).join(", ")})`,Z}async function Q0($){try{await i$($,{recursive:!0,force:!0})}catch{}}async function T4(){try{await R0("npx",["--version"]),E("install: npx available")}catch{throw Error("npx is required for Vercel method installation. Install Node.js from https://nodejs.org")}}async function I4($,q){let Z=["--yes","skills","add",$];if(q)Z.push("--skill",q);E(`install: running npx ${Z.join(" ")}`);try{let Q=await R0("npx",Z,{timeout:120000});return{stdout:Q.stdout,stderr:Q.stderr}}catch(Q){let X=Q.stderr||Q.message||"";throw Error(`npx skills add failed: ${X}`)}}function M4($){if($.isLocal)return $.localPath;let q=`https://github.com/${$.owner}/${$.repo}`;if($.ref)return`${q}/tree/${$.ref}${$.subpath?`/${$.subpath}`:""}`;return q}async function i0($,q,Z){let Q=$.providers.filter((_)=>_.enabled);if(q==="all"){if(Q.length===0)throw Error("No providers are enabled. Enable a provider in your config.");return{provider:Q.find((L)=>L.name==="agents")||Q[0],allProviders:Q}}if(q){let _=$.providers.find((L)=>L.name===q);if(!_){let L=$.providers.map((B)=>B.name).join(", ");throw Error(`Unknown provider: "${q}". Valid providers: ${L}, all`)}if(!_.enabled)throw Error(`Provider "${q}" is disabled. Enable it in your config or choose another provider.`);return{provider:_,allProviders:null}}if(Q.length===1)return{provider:Q[0],allProviders:null};if(!Z){if(Q.length===0)throw Error("No providers are enabled. Enable a provider in your config.");let _=Q.map((L)=>L.name).join(", ");throw Error(`--tool (or --provider) is required in non-interactive mode. Available: ${_}, all`)}let X=$.preferences.selectedTools,J=X&&X.length>0?new Set(X):null,G=$.providers.map((_)=>({label:`${_.label} (${_.name})`,hint:_.global,checked:J?J.has(_.name):_.name==="agents"})),Y=await d0({items:G});if(Y.length===0)throw Error("No tools selected. Aborting.");let U=Y.map((_)=>$.providers[_]),V=U.map((_)=>_.name),{saveSelectedTools:H}=await import("./chunk-a26gjzjk.js");if(await H(V),U.length===1)return{provider:U[0],allProviders:null};return{provider:U.find((_)=>_.name==="agents")||U[0],allProviders:U}}function Y9($,q,Z,Q,X,z,J="global"){let G=J==="project"?X.project:X.global,Y=X0(G),U=V0(Y,Q);return{source:$,tempDir:q,sourceDir:Z,targetDir:U,skillName:Q,force:z,providerName:X.name,providerLabel:X.label,scope:J}}async function j4($,q){try{if(await z9($),E(`install: target ${$} — conflict (exists)${q?", force overwrite":""}`),!q)throw Error(`Skill already exists at: ${$}
|
|
156
|
+
Use --force to overwrite.`)}catch(Z){if(Z.message?.includes("--force"))throw Z;E(`install: target ${$} — no conflict`)}}import{readFile as UU}from"fs/promises";import{join as WU}from"path";var DY=G2(),RY=R$(),wY=l9(),A2=w$(),PY=H$(),j0=f(),CY=O0(),EY=u(),SY=T0(),bY=I0(),P_=xq(),xY=L2(),yY=F2(),kY=O2(),fq=E5(),S5=U$();var fY=DY.Composer,hY=RY.Document,vY=wY.Schema,gY=A2.YAMLError,uY=A2.YAMLParseError,mY=A2.YAMLWarning,pY=PY.Alias,dY=j0.isAlias,cY=j0.isCollection,lY=j0.isDocument,nY=j0.isMap,iY=j0.isNode,oY=j0.isPair,aY=j0.isScalar,sY=j0.isSeq,tY=CY.Pair,rY=EY.Scalar,eY=SY.YAMLMap,$U=bY.YAMLSeq;var qU=xY.Lexer,ZU=yY.LineCounter,QU=kY.Parser,x$=fq.parse,XU=fq.parseAllDocuments,zU=fq.parseDocument,JU=fq.stringify,GU=S5.visit,YU=S5.visitAsync;var b5=500;function HU($){let q=$.split(`
|
|
157
|
+
`),Z=!1,Q=!1;for(let X of q){if(X.trim()==="---")if(!Z){Z=!0;continue}else{Q=!0;continue}if(Q&&X.trim().length>0)return!0}return!1}function VU($){let q=$.split(`
|
|
158
158
|
`),Z=-1;for(let Q=0;Q<q.length;Q++)if(q[Q].trim()==="---")if(Z===-1)Z=Q+1;else return q.slice(Z,Q).join(`
|
|
159
|
-
`);return null}function
|
|
159
|
+
`);return null}function KU($){let q=VU($);if(q===null)return null;try{return x$(q),null}catch(Z){return Z.message||"invalid YAML"}}async function x5($){let q=[];if(!$.description||$.description.trim()==="")q.push({category:"missing-description",message:"Skill has no description in SKILL.md frontmatter"});if(!$.version||$.version==="0.0.0")q.push({category:"missing-version",message:"Skill has no version (or default 0.0.0) in SKILL.md frontmatter"});try{let Q=WU($.path,"SKILL.md"),X=await UU(Q,"utf-8");if(!HU(X))q.push({category:"empty-body",message:"SKILL.md contains only frontmatter with no body content"});let z=KU(X);if(z)q.push({category:"invalid-yaml",message:`SKILL.md has invalid YAML frontmatter: ${z}`})}catch{}let Z=$.fileCount;if(Z!==void 0&&Z>b5)q.push({category:"high-file-count",message:`Skill has ${Z} files (threshold: ${b5})`});return q}import{join as IU}from"path";import{homedir as MU}from"os";import{readFile as BU,writeFile as _U,mkdir as LU}from"fs/promises";import{dirname as FU}from"path";async function OU($){try{let q=await BU($,"utf-8"),Z=JSON.parse(q);if(!Z.fetched_at||Z.data===void 0||Z.data===null)return null;return Z}catch{return null}}async function AU($,q,Z){let Q={fetched_at:new Date().toISOString(),ttl_seconds:Z,data:q};try{await LU(FU($),{recursive:!0}),await _U($,JSON.stringify(Q,null,2),"utf-8"),E(`http: wrote cache -> ${$}`)}catch(X){E(`http: failed to write cache: ${X}`)}}function TU($){let q=new Date($.fetched_at).getTime();return(Date.now()-q)/1000<$.ttl_seconds}async function y5($,q,Z={}){let Q=Z.ttl??3600,X=Z.noCache??!1,z=await OU(q);if(z&&!X&&TU(z))return E(`http: cache hit (fresh) -> ${q}`),z.data;try{E(`http: fetching -> ${$}`);let J=await fetch($);if(!J.ok)throw Error(`HTTP ${J.status}: ${J.statusText}`);let G=await J.json();return await AU(q,G,Q),G}catch(J){if(E(`http: fetch failed: ${J}`),z)return E(`http: using stale cache as fallback -> ${q}`),z.data;return null}}var jU=/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,NU=/^[a-zA-Z0-9_-]+$/,h5=/^https:\/\/github\.com\/[a-zA-Z0-9_-]+\/[a-zA-Z0-9._-]+$/,DU=/^[0-9a-f]{40}$/,RU=/^\d+\.\d+\.\d+(-[a-zA-Z0-9.]+)?(\+[a-zA-Z0-9.]+)?$/,wU=/^[a-z0-9-]+$/,PU=/^sha256:[0-9a-f]{64}$/,k5=["pass","warning","dangerous"];function hq($){let q=[];if(!$||typeof $!=="object"||Array.isArray($))return[{field:"(root)",message:"manifest must be a non-null object"}];let Z=$,Q=new Set(["name","author","description","repository","commit","skill_path","version","license","tags","security_verdict","published_at","checksum"]);for(let J of Object.keys(Z))if(!Q.has(J))q.push({field:J,message:`unknown property "${J}" is not allowed`});let X=[{field:"name",pattern:jU,maxLength:128},{field:"author",pattern:NU,maxLength:39},{field:"description",maxLength:256},{field:"repository",pattern:h5},{field:"commit",pattern:DU},{field:"published_at"}];for(let{field:J,pattern:G,maxLength:Y}of X){let U=Z[J];if(U===void 0||U===null){q.push({field:J,message:`required field "${J}" is missing`});continue}if(typeof U!=="string"){q.push({field:J,message:`"${J}" must be a string`});continue}if(U.length===0){q.push({field:J,message:`"${J}" must not be empty`});continue}if(Y&&U.length>Y)q.push({field:J,message:`"${J}" exceeds maximum length of ${Y}`});if(G&&!G.test(U))q.push({field:J,message:`"${J}" does not match required pattern`})}let z=Z.security_verdict;if(z===void 0||z===null)q.push({field:"security_verdict",message:'required field "security_verdict" is missing'});else if(typeof z!=="string"||!k5.includes(z))q.push({field:"security_verdict",message:`"security_verdict" must be one of: ${k5.join(", ")}`});if(typeof Z.published_at==="string"&&Z.published_at.length>0){if(!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/.test(Z.published_at))q.push({field:"published_at",message:'"published_at" must be a valid ISO 8601 date-time'})}if(Z.version!==void 0){if(typeof Z.version!=="string"||!RU.test(Z.version))q.push({field:"version",message:'"version" must be a valid semver string'})}if(Z.license!==void 0){if(typeof Z.license!=="string")q.push({field:"license",message:'"license" must be a string'});else if(Z.license.length>64)q.push({field:"license",message:'"license" exceeds maximum length of 64'})}if(Z.tags!==void 0)if(!Array.isArray(Z.tags))q.push({field:"tags",message:'"tags" must be an array'});else{if(Z.tags.length>10)q.push({field:"tags",message:'"tags" has more than 10 items'});let J=new Set;for(let G=0;G<Z.tags.length;G++){let Y=Z.tags[G];if(typeof Y!=="string"){q.push({field:`tags[${G}]`,message:"tag must be a string"});continue}if(Y.length>32)q.push({field:`tags[${G}]`,message:`tag "${Y}" exceeds maximum length of 32`});if(!wU.test(Y))q.push({field:`tags[${G}]`,message:`tag "${Y}" does not match pattern (lowercase alphanumeric and hyphens)`});if(J.has(Y))q.push({field:`tags[${G}]`,message:`duplicate tag "${Y}"`});J.add(Y)}}if(Z.checksum!==void 0){if(typeof Z.checksum!=="string"||!PU.test(Z.checksum))q.push({field:"checksum",message:'"checksum" must match pattern sha256:<64-hex-chars>'})}if(Z.skill_path!==void 0){if(typeof Z.skill_path!=="string")q.push({field:"skill_path",message:'"skill_path" must be a string'});else if(Z.skill_path.length===0)q.push({field:"skill_path",message:'"skill_path" must not be empty'});else if(Z.skill_path.length>256)q.push({field:"skill_path",message:'"skill_path" exceeds maximum length of 256'});else if(/\.\.|^\//.test(Z.skill_path))q.push({field:"skill_path",message:'"skill_path" must not contain ".." or start with "/"'})}return q}function CU($,q){let Z=$.length,Q=q.length;if(Z===0)return Q;if(Q===0)return Z;let X=Array(Q+1),z=Array(Q+1);for(let J=0;J<=Q;J++)X[J]=J;for(let J=1;J<=Z;J++){z[0]=J;for(let G=1;G<=Q;G++){let Y=$[J-1]===q[G-1]?0:1;z[G]=Math.min(X[G]+1,z[G-1]+1,X[G-1]+Y)}[X,z]=[z,X]}return X[Q]}function EU($,q,Z=2){let Q=[];for(let X of q){if($===X)continue;let z=CU($,X);if(z<=Z)Q.push({existingName:X,distance:z})}return Q.sort((X,z)=>X.distance-z.distance)}var T2=process.env.ASM_REGISTRY_URL??"https://raw.githubusercontent.com/luongnv89/asm-registry/main/index.json",SU=process.env.ASM_REGISTRY_CACHE??IU(MU(),".config","agent-skill-manager","registry-cache.json"),bU=3600;function I2($){if($.startsWith("github:")||$.startsWith("http://")||$.startsWith("https://")||$.startsWith("/")||$.startsWith("./")||$.startsWith("../")||$.startsWith("~/")||$==="~"||$==="."||$==="..")return!1;let q=($.match(/\//g)||[]).length;if(q>1)return!1;if(q===1){let[Z,Q]=$.split("/");return/^[a-zA-Z0-9_-]+$/.test(Z)&&/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/.test(Q)}return/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/.test($)}function M2($){if(!I2($))return!1;return $.includes("/")}async function j2($){let q=await y5(T2,SU,{ttl:bU,noCache:$?.noCache});if(!q)return null;if(typeof q!=="object"||!Array.isArray(q.manifests)||typeof q.generated_at!=="string")return E("registry: fetched index has invalid structure — discarding"),null;let Z=[];for(let Q of q.manifests){let X=hq(Q);if(X.length>0){E(`registry: dropping invalid manifest entry (${Q?.name??"unknown"}): ${X.map((z)=>z.message).join(", ")}`);continue}if(!h5.test(Q.repository)){E(`registry: dropping manifest with unexpected repository URL: ${Q.repository}`);continue}Z.push(Q)}return{generated_at:q.generated_at,manifests:Z}}function xU($,q){return q.manifests.filter((Z)=>Z.name.toLowerCase()===$.toLowerCase())}function yU($,q,Z){return Z.manifests.find((Q)=>Q.author.toLowerCase()===$.toLowerCase()&&Q.name.toLowerCase()===q.toLowerCase())??null}function f5($,q,Z=5){return EU($,q.manifests.map((X)=>X.name),3).slice(0,Z).map((X)=>X.existingName)}async function v5($,q){let Z=await j2(q);if(!Z)return E("registry: failed to fetch index — skipping registry resolution"),{resolved:null,multipleMatches:[],suggestions:[]};if(M2($)){let[z,J]=$.split("/"),G=yU(z,J,Z);if(G)return{resolved:{manifest:G,source:"registry"},multipleMatches:[],suggestions:[]};let Y=f5(J,Z);return{resolved:null,multipleMatches:[],suggestions:Y}}let Q=xU($,Z);if(Q.length===1)return{resolved:{manifest:Q[0],source:"registry"},multipleMatches:[],suggestions:[]};if(Q.length>1)return{resolved:null,multipleMatches:Q,suggestions:[]};let X=f5($,Z);return{resolved:null,multipleMatches:[],suggestions:X}}function g5($){let q=$.filter((Z)=>Z.provider!=="plugin").map((Z)=>({name:Z.name,version:Z.version,dirName:Z.dirName,provider:Z.provider,scope:Z.scope,path:Z.path,isSymlink:Z.isSymlink,symlinkTarget:Z.symlinkTarget,effort:Z.effort}));return{version:1,exportedAt:new Date().toISOString(),skills:q}}import{readFile as kU,access as m5,mkdir as fU,cp as u5,rm as hU,symlink as vU}from"fs/promises";import{join as p5,basename as gU}from"path";function uU($){let q=[];if(typeof $!=="object"||$===null||Array.isArray($))return{valid:!1,errors:["Manifest must be a JSON object."]};let Z=$;if(Z.version!==1)q.push(`Unsupported manifest version: ${JSON.stringify(Z.version)}. Expected 1.`);if(typeof Z.exportedAt!=="string")q.push("Missing or invalid 'exportedAt' field.");if(!Array.isArray(Z.skills))return q.push("Missing or invalid 'skills' array."),{valid:!1,errors:q};for(let Q=0;Q<Z.skills.length;Q++){let X=Z.skills[Q];if(typeof X!=="object"||X===null){q.push(`skills[${Q}]: must be an object.`);continue}let z=X;if(typeof z.name!=="string"||!z.name)q.push(`skills[${Q}]: missing or empty 'name'.`);if(typeof z.dirName!=="string"||!z.dirName)q.push(`skills[${Q}]: missing or empty 'dirName'.`);if(typeof z.provider!=="string"||!z.provider)q.push(`skills[${Q}]: missing or empty 'provider'.`);if(z.scope!=="global"&&z.scope!=="project")q.push(`skills[${Q}]: invalid 'scope' "${String(z.scope)}". Must be "global" or "project".`)}return{valid:q.length===0,errors:q}}async function d5($){let q;try{q=await kU($,"utf-8")}catch(X){if(X?.code==="ENOENT")throw Error(`Manifest file not found: ${$}`);throw Error(`Failed to read manifest file: ${X.message}`)}let Z;try{Z=JSON.parse(q)}catch{throw Error("Manifest file is not valid JSON.")}let Q=uU(Z);if(!Q.valid)throw Error(`Invalid manifest:
|
|
160
160
|
${Q.errors.join(`
|
|
161
|
-
`)}`);return Z}async function
|
|
161
|
+
`)}`);return Z}async function mU($){try{return await m5($),!0}catch{return!1}}function pU($,q){return $.providers.find((Z)=>Z.name===q&&Z.enabled)}function dU($,q,Z,Q){let X=pU($,q);if(!X)return null;let z=Z==="global"?X.global:X.project,J=X0(z),G=gU(Q);if(!G||G==="."||G==="..")return null;return p5(J,G)}function cU($,q){let Z=$.find((Q)=>Q.dirName===q.dirName&&Q.provider===q.provider);if(Z)return Z;return $.find((Q)=>Q.dirName===q.dirName)||null}async function c5($,q,Z){let Q=Z?.config??await g(),X=Z?.installedSkills??await i(Q,"both"),z=[];for(let U of $.skills){if(q.scopeFilter!=="both"&&U.scope!==q.scopeFilter){E(`import: skipping "${U.name}" — scope "${U.scope}" filtered out`);continue}let V=dU(Q,U.provider,U.scope,U.dirName);if(!V){z.push({skillName:U.name,provider:U.provider,scope:U.scope,status:"failed",reason:`Provider "${U.provider}" not found or not enabled.`});continue}let H=await mU(V);if(H&&!q.force){z.push({skillName:U.name,provider:U.provider,scope:U.scope,status:"skipped",reason:"Already installed.",path:V});continue}if(q.dryRun){z.push({skillName:U.name,provider:U.provider,scope:U.scope,status:"dry-run",reason:H?"Would overwrite (--force).":"Would install.",path:V});continue}let K=cU(X,U);if(!K){z.push({skillName:U.name,provider:U.provider,scope:U.scope,status:"failed",reason:"No installed source found. Install the skill first with: asm install <source>"});continue}try{if(await fU(p5(V,".."),{recursive:!0}),H)await hU(V,{recursive:!0,force:!0});if(U.isSymlink&&U.symlinkTarget)try{await m5(U.symlinkTarget),await vU(U.symlinkTarget,V),E(`import: symlinked "${U.name}" -> ${U.symlinkTarget} at ${V}`)}catch{await u5(K.realPath,V,{recursive:!0}),E(`import: symlink target unreachable, copied "${U.name}" from ${K.realPath} to ${V}`)}else await u5(K.realPath,V,{recursive:!0}),E(`import: copied "${U.name}" from ${K.realPath} to ${V}`);z.push({skillName:U.name,provider:U.provider,scope:U.scope,status:"installed",path:V})}catch(_){z.push({skillName:U.name,provider:U.provider,scope:U.scope,status:"failed",reason:`Copy failed: ${_.message}`})}}let J=z.filter((U)=>U.status==="installed").length,G=z.filter((U)=>U.status==="skipped").length,Y=z.filter((U)=>U.status==="failed").length;return{total:z.length,installed:J,skipped:G,failed:Y,results:z}}import{mkdir as lU,writeFile as nU,access as iU}from"fs/promises";import{join as oU}from"path";function aU($){return`---
|
|
162
162
|
name: ${$}
|
|
163
163
|
description: ""
|
|
164
164
|
license: ""
|
|
@@ -179,61 +179,62 @@ as instructions for when and how to use this skill.
|
|
|
179
179
|
## Instructions
|
|
180
180
|
|
|
181
181
|
- Step-by-step instructions for the agent
|
|
182
|
-
`}async function
|
|
183
|
-
`)}import{access as
|
|
184
|
-
`,"utf-8"),E(`bundle: saved to ${Z}`),Z}async function
|
|
182
|
+
`}async function l5($,q){await lU(q,{recursive:!0});let Z=oU(q,"SKILL.md"),Q=aU($);await nU(Z,Q,"utf-8")}async function n5($){try{return await iU($),!0}catch{return!1}}import{readdir as sU,stat as tU}from"fs/promises";import{join as rU}from"path";async function eU($){let q=0;try{let Q=(await sU($,{recursive:!0})).map(async(z)=>{try{let J=await tU(rU($,z));if(J.isFile())return J.size}catch{}return 0});q=(await Promise.all(Q)).reduce((z,J)=>z+J,0)}catch{}return q}async function a5($,q){let Z={},Q={global:0,project:0},X={},z=$.map(async(Y)=>{Z[Y.provider]=(Z[Y.provider]||0)+1,Q[Y.scope]++;let U=await eU(Y.path);return X[Y.path]=U,U}),G=(await Promise.all(z)).reduce((Y,U)=>Y+U,0);return{totalSkills:$.length,byProvider:Z,byScope:Q,totalDiskBytes:G,perSkillDiskBytes:X,duplicateGroups:q.duplicateGroups.length,duplicateInstances:q.totalDuplicateInstances}}function $W($){if($<1024)return`${$} B`;if($<1048576)return`${($/1024).toFixed(1)} KB`;if($<1073741824)return`${($/1048576).toFixed(1)} MB`;return`${($/1073741824).toFixed(1)} GB`}function N2($,q,Z=20){let Q=Math.round($/q*Z),X=Z-Q;return W.green("#".repeat(Q))+W.dim("-".repeat(X))}var i5={claude:"Claude Code",codex:"Codex",openclaw:"OpenClaw",agents:"Agents"};function s5($){let q=[];q.push(""),q.push(W.blueBold(" Skill Statistics")),q.push(W.dim(" "+"-".repeat(20))),q.push(""),q.push(` ${W.bold("Total:")} ${W.cyan(String($.totalSkills))} skills`),q.push(` ${W.bold("Disk:")} ${W.cyan($W($.totalDiskBytes))}`),q.push(""),q.push(W.bold(" By Tool"));let Z=Object.entries($.byProvider).sort((Y,U)=>U[1]-Y[1]),Q=Math.max(...Z.map(([,Y])=>Y)),X=Math.max(...Z.map(([Y])=>(i5[Y]||Y).length));for(let[Y,U]of Z){let V=i5[Y]||Y,H=o5(Y,V.padEnd(X)),K=String(U).padStart(4);q.push(` ${H} ${K} ${N2(U,Q)}`)}q.push(""),q.push(W.bold(" By Scope"));let z=Math.max($.byScope.global,$.byScope.project),J=String($.byScope.global).padStart(4),G=String($.byScope.project).padStart(4);if(q.push(` ${"global ".padEnd(X)} ${J} ${N2($.byScope.global,z)}`),q.push(` ${"project".padEnd(X)} ${G} ${N2($.byScope.project,z)}`),q.push(""),q.push(W.bold(" Duplicates")),$.duplicateGroups>0)q.push(` ${W.yellow(`${$.duplicateGroups} group(s), ${$.duplicateInstances} total instance(s)`)}`),q.push(W.dim(` Run ${W.bold("asm audit")} to review`));else q.push(` ${W.green("None")}`);return q.push(""),q.join(`
|
|
183
|
+
`)}import{access as qW,lstat as D2,mkdir as ZW,readdir as QW,readFile as t5,rm as XW,symlink as zW}from"fs/promises";import{join as vq}from"path";async function R2($){let q;try{q=await D2($)}catch{throw Error(`Path does not exist: ${$}`)}if(!q.isDirectory())throw Error(`Path is not a directory: ${$}`);let Z=vq($,"SKILL.md"),Q;try{Q=await t5(Z,"utf-8")}catch{throw Error(`No SKILL.md found in ${$}`)}let X=r(Q);if(!X.name)throw Error(`Invalid SKILL.md in ${$}: missing "name" in frontmatter`);return{name:X.name,version:z0(X)}}async function r5($,q,Z,Q){let X=vq(q,Z),z=!1;try{await qW(X),z=!0}catch{}if(z){if(!Q)throw Error(`Target already exists: ${X}. Use --force to overwrite.`);await XW(X,{recursive:!0,force:!0})}await ZW(q,{recursive:!0}),await zW($,X,"dir")}async function w2($){let q;try{q=await D2($)}catch{throw Error(`Path does not exist: ${$}`)}if(!q.isDirectory())throw Error(`Path is not a directory: ${$}`);let Z=await QW($),Q=[];for(let X of Z){if(X.startsWith(".")||X==="node_modules")continue;let z=vq($,X);try{if(!(await D2(z)).isDirectory())continue}catch{continue}let J=vq(z,"SKILL.md");try{let G=await t5(J,"utf-8"),Y=r(G);if(Y.name)Q.push({absPath:z,dirName:X,name:Y.name,version:z0(Y)})}catch{}}return Q.sort((X,z)=>X.name.localeCompare(z.name)),Q}import{readFile as JW,writeFile as GW,readdir as YW,access as UW,mkdir as WW,rm as HW}from"fs/promises";import{join as y$,resolve as VW}from"path";import{homedir as KW}from"os";var f0=y$(KW(),".config","agent-skill-manager","bundles");function BW($){let q=[];if(typeof $!=="object"||$===null||Array.isArray($))return{valid:!1,errors:["Bundle must be a JSON object."]};let Z=$;if(Z.version!==1)q.push(`Unsupported bundle version: ${JSON.stringify(Z.version)}. Expected 1.`);if(typeof Z.name!=="string"||!Z.name)q.push("Missing or empty 'name' field.");if(typeof Z.description!=="string"||!Z.description)q.push("Missing or empty 'description' field.");if(typeof Z.author!=="string"||!Z.author)q.push("Missing or empty 'author' field.");if(typeof Z.createdAt!=="string")q.push("Missing or invalid 'createdAt' field.");if(!Array.isArray(Z.skills))return q.push("Missing or invalid 'skills' array."),{valid:!1,errors:q};if(Z.skills.length===0)q.push("Bundle must contain at least one skill.");for(let Q=0;Q<Z.skills.length;Q++){let X=Z.skills[Q];if(typeof X!=="object"||X===null){q.push(`skills[${Q}]: must be an object.`);continue}let z=X;if(typeof z.name!=="string"||!z.name)q.push(`skills[${Q}]: missing or empty 'name'.`);if(typeof z.installUrl!=="string"||!z.installUrl)q.push(`skills[${Q}]: missing or empty 'installUrl'.`)}if(Z.tags!==void 0){if(!Array.isArray(Z.tags))q.push("'tags' must be an array of strings if provided.");else if(Z.tags.some((Q)=>typeof Q!=="string"))q.push("'tags' must contain only strings.")}return{valid:q.length===0,errors:q}}function e5($,q,Z,Q,X){return{version:1,name:$,description:q,author:Z,createdAt:new Date().toISOString(),skills:Q,tags:X}}async function $8($,q){let Z=q??await h0(),Q=Z.skills[$.name]||Z.skills[$.dirName],X;if($.isSymlink&&$.symlinkTarget)X=$.symlinkTarget;else if(Q?.source)X=Q.source;else X=$.path;return{name:$.name,installUrl:X,description:$.description||void 0,version:$.version||void 0}}async function _W(){await WW(f0,{recursive:!0})}function C2($){let q=$.toLowerCase().replace(/[^a-z0-9._-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"");if(q=q.replace(/^\.+|\.+$/g,""),!q||q==="."||q==="..")throw Error("Invalid bundle name: results in an empty filename after sanitization.");return q}async function q8($){await _W();let q=`${C2($.name)}.json`,Z=y$(f0,q);return await GW(Z,JSON.stringify($,null,2)+`
|
|
184
|
+
`,"utf-8"),E(`bundle: saved to ${Z}`),Z}async function P2($){let q;try{q=await JW($,"utf-8")}catch(X){if(X?.code==="ENOENT")throw Error(`Bundle file not found: ${$}`);throw Error(`Failed to read bundle file: ${X.message}`)}let Z;try{Z=JSON.parse(q)}catch{throw Error("Bundle file is not valid JSON.")}let Q=BW(Z);if(!Q.valid)throw Error(`Invalid bundle:
|
|
185
185
|
${Q.errors.join(`
|
|
186
|
-
`)}`);return Z}async function
|
|
187
|
-
`);for(let G=0;G<J.length;G++){let Y=J[G],U=Y.trim();for(let V of
|
|
188
|
-
`)}function
|
|
189
|
-
About to publish "${
|
|
186
|
+
`)}`);return Z}async function E2($){if($.includes("/")||$.includes("\\")||$.endsWith(".json")){let Q=VW($);return P2(Q)}let q=`${C2($)}.json`,Z=y$(f0,q);return P2(Z)}async function Z8(){let $=[];try{await UW(f0)}catch{return $}let q;try{q=await YW(f0)}catch{return $}for(let Z of q){if(!Z.endsWith(".json"))continue;let Q=y$(f0,Z);try{let X=await P2(Q);$.push(X)}catch{E(`bundle: skipping invalid file ${Q}`)}}return $.sort((Z,Q)=>Z.name.localeCompare(Q.name)),$}async function Q8($){let q=`${C2($)}.json`,Z=y$(f0,q);try{return await HW(Z),E(`bundle: removed ${Z}`),!0}catch(Q){if(Q?.code==="ENOENT")return!1;throw Q}}import{readFile as DW,realpath as RW}from"fs/promises";import{join as wW,resolve as PW,relative as CW}from"path";var J8=[{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bcurl\b/,severity:"critical",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bwget\b/,severity:"critical",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bfetch\s*\(/,severity:"warning",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\baxios\b/,severity:"warning",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bhttp\.request\b/,severity:"warning",permissionType:"network"},{category:"Network requests",description:"Commands or APIs that download or upload data over the network",pattern:/\bXMLHttpRequest\b/,severity:"warning",permissionType:"network"},{category:"External URLs",description:"Hardcoded URLs that may indicate data exfiltration or remote payload loading",pattern:/https?:\/\/(?!github\.com|localhost|127\.0\.0\.1|example\.com)/,severity:"warning",permissionType:"network"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bexec\s*\(/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bexecSync\b/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bchild_process\b/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bspawn\s*\(/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bBun\.spawn\b/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\bshelljs\b/,severity:"critical",permissionType:"shell"},{category:"Shell execution",description:"Commands that execute shell processes or arbitrary system commands",pattern:/\b(?:bash|sh|zsh)\s+-c\b/,severity:"critical",permissionType:"shell"},{category:"Dynamic code execution",description:"Patterns that execute dynamically constructed code at runtime",pattern:/\beval\s*\(/,severity:"critical",permissionType:"code-execution"},{category:"Dynamic code execution",description:"Patterns that execute dynamically constructed code at runtime",pattern:/\bnew\s+Function\b/,severity:"critical",permissionType:"code-execution"},{category:"Dynamic code execution",description:"Patterns that execute dynamically constructed code at runtime",pattern:/\bFunction\s*\(/,severity:"critical",permissionType:"code-execution"},{category:"Dynamic code execution",description:"Patterns that execute dynamically constructed code at runtime",pattern:/\bimport\s*\(\s*[^'"]/,severity:"warning",permissionType:"code-execution"},{category:"File system access",description:"Operations that read, write, or modify files on disk",pattern:/\bfs\.(?:write|append|unlink|rm|mkdir|rename)\b/,severity:"warning",permissionType:"filesystem"},{category:"File system access",description:"Operations that read, write, or modify files on disk",pattern:/\bwriteFile(?:Sync)?\b/,severity:"warning",permissionType:"filesystem"},{category:"File system access",description:"Operations that read, write, or modify files on disk",pattern:/\brm\s+-rf?\b/,severity:"critical",permissionType:"filesystem"},{category:"File system access",description:"Operations that read, write, or modify files on disk",pattern:/\bchmod\b/,severity:"warning",permissionType:"filesystem"},{category:"Embedded credentials",description:"Hardcoded secrets, API keys, tokens, or passwords",pattern:/\b(?:API_KEY|SECRET_KEY|ACCESS_TOKEN|PRIVATE_KEY)\s*[=:]/,severity:"critical"},{category:"Embedded credentials",description:"Hardcoded secrets, API keys, tokens, or passwords",pattern:/\bPASSWORD\s*[=:]/,severity:"critical"},{category:"Embedded credentials",description:"Hardcoded secrets, API keys, tokens, or passwords",pattern:/(?:sk|pk)[-_](?:live|test)[-_][a-zA-Z0-9]{20,}/,severity:"critical"},{category:"Environment variable access",description:"Reading environment variables which may contain secrets or configuration",pattern:/\bprocess\.env\b/,severity:"info",permissionType:"environment"},{category:"Environment variable access",description:"Reading environment variables which may contain secrets or configuration",pattern:/\bBun\.env\b/,severity:"info",permissionType:"environment"},{category:"Obfuscation patterns",description:"Base64 encoding, hex strings, or other obfuscation techniques",pattern:/\batob\s*\(/,severity:"warning"},{category:"Obfuscation patterns",description:"Base64 encoding, hex strings, or other obfuscation techniques",pattern:/\bBuffer\.from\s*\([^,]+,\s*['"]base64['"]\)/,severity:"warning"},{category:"Obfuscation patterns",description:"Base64 encoding, hex strings, or other obfuscation techniques",pattern:/\\x[0-9a-fA-F]{2}(?:\\x[0-9a-fA-F]{2}){5,}/,severity:"warning"}];async function LW($,q){let Z={owner:$,repo:q,profileUrl:`https://github.com/${$}`,reposUrl:`https://github.com/${$}?tab=repositories`,isOrganization:null,publicRepos:null,accountAge:null,fetchError:null};try{let Q=await fetch(`https://api.github.com/users/${$}`,{headers:{Accept:"application/vnd.github.v3+json","User-Agent":"agent-skill-manager"},signal:AbortSignal.timeout(1e4)});if(!Q.ok)return Z.fetchError=`GitHub API returned ${Q.status}`,Z;let X=await Q.json();if(Z.isOrganization=X.type==="Organization",Z.publicRepos=typeof X.public_repos==="number"?X.public_repos:null,typeof X.created_at==="string"){let z=new Date(X.created_at),J=new Date,G=Math.floor((J.getTime()-z.getTime())/31557600000),Y=Math.floor((J.getTime()-z.getTime())%31557600000/2630016000.0000005);Z.accountAge=G>0?`${G}y ${Y}m`:`${Y}m`}E(`security-audit: source analysis for ${$} -> repos=${Z.publicRepos}, org=${Z.isOrganization}, age=${Z.accountAge}`)}catch(Q){Z.fetchError=Q.message||"Failed to fetch GitHub profile",E(`security-audit: source analysis failed -> ${Z.fetchError}`)}return Z}function FW($){let q=new Map;for(let{relPath:X,content:z}of $){let J=z.split(`
|
|
187
|
+
`);for(let G=0;G<J.length;G++){let Y=J[G],U=Y.trim();for(let V of J8)if(V.pattern.test(Y)){let H=V.category;if(!q.has(H))q.set(H,{description:V.description,matches:[]});let K=U.length>120?U.slice(0,120)+"...":U;q.get(H).matches.push({file:X,line:G+1,match:K,severity:V.severity})}}}let Z=[];for(let[X,z]of q)Z.push({category:X,description:z.description,matches:z.matches});let Q={critical:0,warning:1,info:2};return Z.sort((X,z)=>{let J=Math.min(...X.matches.map((Y)=>Q[Y.severity])),G=Math.min(...z.matches.map((Y)=>Q[Y.severity]));return J-G}),Z}function OW($){let q=new Map;for(let z of $)for(let J of z.matches)for(let G of J8)if(G.permissionType&&G.category===z.category&&G.pattern.test(J.match)){let Y=G.permissionType;if(!q.has(Y))q.set(Y,{evidence:[],categories:new Set});let U=q.get(Y);U.evidence.push({file:J.file,line:J.line,match:J.match}),U.categories.add(z.category);break}let Z={filesystem:"Skill reads, writes, or modifies files on disk. Verify it only accesses intended paths.",shell:"Skill executes shell commands or spawns processes. This allows arbitrary system access.",network:"Skill makes network requests or downloads external content. Data may be sent to remote servers.","code-execution":"Skill dynamically constructs and executes code. This can bypass static analysis.",environment:"Skill reads environment variables, which may contain secrets or API keys."},Q=[];for(let[z,J]of q)Q.push({type:z,evidence:J.evidence,reason:Z[z]});let X={shell:0,"code-execution":1,network:2,filesystem:3,environment:4};return Q.sort((z,J)=>(X[z.type]??99)-(X[J.type]??99)),Q}function AW($,q,Z){let Q=0,X=0;for(let Y of $)for(let U of Y.matches){if(U.severity==="critical")Q++;if(U.severity==="warning")X++}let z=q.some((Y)=>Y.type==="shell"),J=q.some((Y)=>Y.type==="code-execution"),G=q.some((Y)=>Y.type==="network");if(z&&G)return{verdict:"dangerous",reason:"Skill has both shell execution and network access -- potential data exfiltration risk."};if(J&&G)return{verdict:"dangerous",reason:"Skill has dynamic code execution and network access -- potential remote code execution risk."};if(Q>=10)return{verdict:"dangerous",reason:`${Q} critical findings detected. High concentration of risky patterns.`};if(z||J)return{verdict:"warning",reason:z?"Skill executes shell commands. Review commands carefully before installing.":"Skill uses dynamic code execution. Review usage carefully."};if(Q>0)return{verdict:"warning",reason:`${Q} critical finding${Q>1?"s":""} detected. Manual review recommended.`};if(X>0)return{verdict:"caution",reason:`${X} warning${X>1?"s":""} found. Generally acceptable but worth reviewing.`};if(Z&&Z.publicRepos!==null&&Z.publicRepos<3)return{verdict:"caution",reason:"No code issues found, but the author has very few public repositories."};return{verdict:"safe",reason:"No suspicious patterns detected."}}async function N0($,q,Z,Q){E(`security-audit: scanning ${$}`);let X=await l$($),z=X.reduce((H,K)=>H+K.lineCount,0),J=null;if(Z&&Q)J=await LW(Z,Q);let G=FW(X),Y=OW(G),{verdict:U,reason:V}=AW(G,Y,J);return{scannedAt:new Date().toISOString(),skillName:q,skillPath:$,source:J,codeScans:G,permissions:Y,totalFiles:X.length,totalLines:z,verdict:U,verdictReason:V}}var b=W,v0=56,TW={"Shell execution":"shell","Dynamic code execution":"code-execution","Network requests":"network","External URLs":"network","File system access":"filesystem","Environment variable access":"environment","Embedded credentials":"credentials","Obfuscation patterns":"obfuscation"},X8={critical:0,warning:1,info:2};function IW($){switch($){case"safe":return b.bgGreen(" SAFE ");case"caution":return b.bgCyan(" CAUTION ");case"warning":return b.bgYellow(" WARNING ");case"dangerous":return b.bgRed(" DANGEROUS ")}}function MW($){switch($){case"safe":return b.green;case"caution":return b.cyan;case"warning":return b.yellow;case"dangerous":return b.red}}function z$($){switch($){case"critical":return b.red("!!");case"warning":return b.yellow(" !");case"info":return b.dim(" i")}}function S2($,q){return $.length>q?$.slice(0,q-3)+"...":$}function gq($){return $.toLocaleString("en-US")}function G8($){return $.replace(/\x1b\[[0-9;]*m/g,"")}function z8($){return G8($).length}function jW($){let q=new Map;for(let Z of $){let Q=`${Z.file}:${Z.line}`,X=q.get(Q);if(!X||X8[Z.severity]<X8[X.severity])q.set(Q,Z)}return Array.from(q.values())}function NW($){let q=new Map;for(let Z of $){let Q=q.get(Z.file);if(!Q)Q={file:Z.file,entries:[]},q.set(Z.file,Q);Q.entries.push({line:Z.line,match:Z.match,severity:Z.severity})}return Array.from(q.values())}function uq($){let q=[],Z=IW($.verdict),Q=G8(Z),X=` ${b.bold($.skillName)}`,z=` ${$.skillName}`,J=v0-4,G=Math.max(1,J-z.length-Q.length);if(q.push(""),q.push(b.dim(" +-- ")+b.bold("Security Audit")+b.dim(" "+"-".repeat(v0-19)+"+")),q.push(b.dim(" |")+X+" ".repeat(G)+Z+b.dim("|")),q.push(b.dim(" |")+b.dim(` ${gq($.totalFiles)} files | ${gq($.totalLines)} lines`)+" ".repeat(Math.max(1,J-` ${gq($.totalFiles)} files | ${gq($.totalLines)} lines`.length))+b.dim("|")),q.push(b.dim(" +"+"-".repeat(v0-2)+"+")),$.source){let H=$.source;if(H.fetchError)q.push(` ${b.yellow("!")} Could not fetch profile: ${H.fetchError}`);else{let K=[];if(K.push(`${H.owner} ${H.isOrganization?b.cyan("(org)"):b.dim("(user)")}`),H.publicRepos!==null){let _=H.publicRepos,L=_<3?b.yellow(`${_} repos`):_<10?b.cyan(`${_} repos`):b.green(`${_} repos`);K.push(L)}if(H.accountAge)K.push(H.accountAge);q.push(` ${b.dim("Author:")} ${K.join(b.dim(" | "))}`)}}if(q.push(""),$.codeScans.length===0)q.push(` ${b.green("*")} ${b.green("No suspicious patterns detected.")}`);else{let H=MW($.verdict),K=$.verdict==="dangerous"||$.verdict==="warning"?z$("critical"):$.verdict==="caution"?z$("warning"):z$("info");q.push(` ${K} ${H($.verdictReason)}`);let _=0,L=0,B=0;for(let M of $.codeScans)for(let j of M.matches)if(j.severity==="critical")_++;else if(j.severity==="warning")L++;else B++;let F=[];if(_>0)F.push(b.red(`${_} critical`));if(L>0)F.push(b.yellow(`${L} warning`));if(B>0)F.push(b.dim(`${B} info`));let O=$.permissions.map((M)=>M.type),A=O.length>0?b.dim(`Perms: ${O.join(", ")}`):"";q.push(` ${F.join(b.dim(" | "))} ${A}`)}if(q.push(""),$.codeScans.length>0){q.push(` ${b.bold("Findings")}`),q.push(b.dim(" "+"=".repeat(v0-2)));for(let H of $.codeScans){let K=jW(H.matches),_=K.filter((T)=>T.severity==="critical").length,L=K.filter((T)=>T.severity==="warning").length,B=K.filter((T)=>T.severity==="info").length,F=_>0?z$("critical"):L>0?z$("warning"):z$("info"),O=[];if(_>0)O.push(b.red(`${_} critical`));if(L>0)O.push(b.yellow(`${L} warning`));if(B>0)O.push(b.dim(`${B} info`));let A=TW[H.category],M=A?b.dim(`PERM: ${A}`):"",j=` ${F} ${b.bold(H.category)} (${O.join(", ")})`;if(M){let T=z8(j),N=z8(M),C=Math.max(2,v0-T-N);q.push(j+" ".repeat(C)+M)}else q.push(j);let I=NW(K),D=Math.min(24,Math.max(...I.map((T)=>T.file.length))),x=0,P=3;for(let T of I){if(x>=P)break;let N=S2(T.file,24),C=b.dim(N.padEnd(D));if(T.entries.length===1){let S=T.entries[0],y=S2(S.match,50);q.push(` ${C} :${S.line} ${b.dim("--")} ${S.severity==="critical"?y:b.dim(y)}`),x++}else if(T.entries.length<=3){let S=T.entries.map((c)=>`:${c.line}`).join(", "),y=S2(T.entries[0].match,40);q.push(` ${C} ${S} ${b.dim("--")} ${b.dim(y)}`),x++}else{let y=T.entries.slice(0,3).map((p)=>`:${p.line}`).join(", "),c=T.entries.length-3;q.push(` ${C} ${y} ${b.dim(`(+${c} more)`)}`),x++}}let k=I.length-Math.min(I.length,P);if(k>0){let T=K.length-I.slice(0,P).reduce((N,C)=>N+C.entries.length,0);if(T>0)q.push(` ${b.dim(`... ${T} more in ${k} file${k>1?"s":""}`)}`)}q.push("")}}q.push(b.dim(" "+"=".repeat(v0-2)));let Y=new Date($.scannedAt),U=`${Y.getFullYear()}-${String(Y.getMonth()+1).padStart(2,"0")}-${String(Y.getDate()).padStart(2,"0")} ${String(Y.getHours()).padStart(2,"0")}:${String(Y.getMinutes()).padStart(2,"0")}`,V=$.source&&!$.source.fetchError?`github.com/${$.source.owner}`:"";if(V){let H=Math.max(2,v0-2-U.length-V.length);q.push(b.dim(` ${U}${" ".repeat(H)}${V}`))}else q.push(b.dim(` ${U}`));return q.push(""),q.join(`
|
|
188
|
+
`)}function b2($){return JSON.stringify($,null,2)}function mq($){return $.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,"").replace(/\x1b\][^\x07]*\x07/g,"").replace(/\x1b[^[\]]/g,"").replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,"")}function EW($){return $.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/</g,"<").replace(/>/g,">").replace(/\|/g,"\\|")}function x2($){return EW(mq($))}var g0="luongnv89/asm-registry";async function SW($){let q=wW($,"SKILL.md"),Z;try{Z=await DW(q,"utf-8")}catch{throw Error(`No SKILL.md found in ${$}. Run "asm init" to create one.`)}let Q=r(Z);if(!Q.name)throw Error("SKILL.md is missing required field: name");if(!Q.description)throw Error("SKILL.md is missing required field: description");let X=z0(Q),z=Q.tags?Q.tags.split(/[\s,]+/).map((J)=>J.trim().toLowerCase()).filter(Boolean):[];return{name:Q.name,description:Q.description.replace(/\s*\n\s*/g," ").trim(),version:X,license:Q.license||"MIT",creator:Q.creator||"",tags:z}}async function bW($){if(await Bun.spawn(["git","rev-parse","--git-dir"],{cwd:$,stdout:"pipe",stderr:"pipe"}).exited!==0)throw Error(`${$} is not inside a git repository.`)}async function xW($){let q=Bun.spawn(["git","rev-parse","HEAD"],{cwd:$,stdout:"pipe",stderr:"pipe"}),Z=await new Response(q.stdout).text();if(await q.exited!==0)throw Error("Failed to get HEAD commit. Is this a git repository?");return Z.trim()}async function yW($){let q=Bun.spawn(["git","rev-parse","--show-toplevel"],{cwd:$,stdout:"pipe",stderr:"pipe"}),Z=await new Response(q.stdout).text();if(await q.exited!==0)throw Error("Failed to determine git repository root.");return Z.trim()}async function kW($){let q=Bun.spawn(["git","remote","get-url","origin"],{cwd:$,stdout:"pipe",stderr:"pipe"}),Z=await new Response(q.stdout).text();if(await q.exited!==0)throw Error("No remote origin found. Add one with: git remote add origin <url>");let X=Z.trim(),z=X.match(/^git@github\.com:([a-zA-Z0-9_-]+)\/([a-zA-Z0-9._-]+?)(?:\.git)?$/);if(z)return`https://github.com/${z[1]}/${z[2]}`;return X.replace(/\.git$/,"")}async function fW(){if(await Bun.spawn(["gh","--version"],{stdout:"pipe",stderr:"pipe"}).exited!==0)return{available:!1,authenticated:!1,login:null};if(await Bun.spawn(["gh","auth","status"],{stdout:"pipe",stderr:"pipe"}).exited!==0)return{available:!0,authenticated:!1,login:null};let X=Bun.spawn(["gh","api","user","--jq",".login"],{stdout:"pipe",stderr:"pipe"}),z=await new Response(X.stdout).text();return{available:!0,authenticated:!0,login:await X.exited===0?z.trim():null}}function hW($){switch($){case"safe":case"caution":return"pass";case"warning":return"warning";case"dangerous":return"dangerous"}}function Y8($){let q={name:$.metadata.name,author:$.author,description:$.metadata.description,repository:$.repository,commit:$.commit,security_verdict:$.securityVerdict,published_at:new Date().toISOString()};if($.skillPath)q.skill_path=$.skillPath;if($.metadata.version&&$.metadata.version!=="0.0.0"&&/^\d+\.\d+\.\d+/.test($.metadata.version))q.version=$.metadata.version;if($.metadata.license)q.license=$.metadata.license;if($.metadata.tags&&$.metadata.tags.length>0)q.tags=$.metadata.tags.slice(0,10);return q}function vW($){let q=Y8({metadata:$.metadata,author:$.metadata.creator||"unknown",commit:$.commit,repository:$.repository,securityVerdict:$.registryVerdict}),Z=hq(q);if(Z.length>0)return{success:!1,manifest:q,prUrl:null,error:`Manifest validation failed: ${Z.map((Q)=>`${Q.field}: ${Q.message}`).join("; ")}`,securityVerdict:$.registryVerdict,securityReport:$.securityReport};return{success:!0,manifest:q,prUrl:null,error:null,securityVerdict:$.registryVerdict,securityReport:$.securityReport,fallback:!0,fallbackReason:$.fallbackReason}}async function U8($){let q=PW($.path);E(`publish: starting for ${q}`),await bW(q);let Z=await SW(q);E(`publish: parsed metadata for "${Z.name}"`);let X=await($._auditFn??N0)(q,Z.name),z=hW(X.verdict);if(z==="dangerous")return{success:!1,manifest:null,prUrl:null,error:`Security audit verdict: dangerous. ${X.verdictReason}`,securityVerdict:z,securityReport:X};if(z==="warning"&&!$.force)return{success:!1,manifest:null,prUrl:null,error:"Security audit verdict: warning. Use --force to override warnings.",securityVerdict:z,securityReport:X};let J=await xW(q),G=await kW(q),Y=await yW(q),U=await RW(q),V=CW(Y,U),H=V&&V!=="."?V:void 0,_=await($._checkGhCliFn??fW)();if(!_.available||!_.authenticated){let s=!_.available?"gh CLI not found":"gh CLI not authenticated";return vW({metadata:Z,commit:J,repository:G,registryVerdict:z,securityReport:X,fallbackReason:s})}if(!_.login)throw Error("Could not determine GitHub username. The gh CLI is authenticated but the API call failed. Check your network connection and try again.");let L=_.login,B=Y8({metadata:Z,author:L,commit:J,repository:G,skillPath:H,securityVerdict:z}),F=hq(B);if(F.length>0)return{success:!1,manifest:B,prUrl:null,error:`Manifest validation failed: ${F.map((s)=>`${s.field}: ${s.message}`).join("; ")}`,securityVerdict:z,securityReport:X};if($.dryRun)return{success:!0,manifest:B,prUrl:null,error:null,securityVerdict:z,securityReport:X};if(!$.yes){if(!process.stdin.isTTY)return{success:!1,manifest:B,prUrl:null,error:"Cannot prompt for confirmation in non-interactive mode. Use --yes to skip.",securityVerdict:z,securityReport:X};let s=mq(Z.name),d$=mq(L);process.stderr.write(`
|
|
189
|
+
About to publish "${s}" by ${d$} to ${g0}.
|
|
190
190
|
Security verdict: ${z}
|
|
191
191
|
|
|
192
|
-
Proceed? [y/N] `);let
|
|
193
|
-
`))process.stdin.removeListener("data",
|
|
194
|
-
`,
|
|
195
|
-
`),Z0=Bun.spawn(["gh","pr","create","--repo",g0,"--head",`${L}:${A}`,"--title",m$,"--body",H0],{stdout:"pipe",stderr:"pipe"}),m0=await new Response(Z0.stdout).text(),p$=await new Response(Z0.stderr).text(),Y$=await Z0.exited,p0=null;if(Y$===0)p0=m0.trim();else{let
|
|
192
|
+
Proceed? [y/N] `);let Z9=await new Promise((Y4)=>{let c$="",U4=(mZ)=>{if(c$+=mZ.toString(),c$.includes(`
|
|
193
|
+
`))process.stdin.removeListener("data",U4),process.stdin.pause(),Y4(c$.trim())};process.stdin.resume(),process.stdin.on("data",U4)});if(Z9.toLowerCase()!=="y"&&Z9.toLowerCase()!=="yes")return{success:!1,manifest:B,prUrl:null,error:"Publish aborted by user.",securityVerdict:z,securityReport:X}}E(`publish: forking ${g0}`),await Bun.spawn(["gh","repo","fork",g0,"--clone=false"],{stdout:"pipe",stderr:"pipe"}).exited;let A=`publish/${L}/${Z.name}`,M=`manifests/${L}/${Z.name}.json`,j=JSON.stringify(B,null,2)+`
|
|
194
|
+
`,I=Buffer.from(j,"utf-8").toString("base64"),D=Bun.spawn(["gh","api",`repos/${L}/asm-registry/git/refs/heads/main`,"--jq",".object.sha"],{stdout:"pipe",stderr:"pipe"}),x=await new Response(D.stdout).text();if(await D.exited!==0)return{success:!1,manifest:B,prUrl:null,error:`Failed to read fork's main branch. Ensure the fork exists at ${L}/asm-registry.`,securityVerdict:z,securityReport:X};let k=x.trim();if(await Bun.spawn(["gh","api",`repos/${L}/asm-registry/git/refs`,"-X","POST","-f",`ref=refs/heads/${A}`,"-f",`sha=${k}`],{stdout:"pipe",stderr:"pipe"}).exited!==0)await Bun.spawn(["gh","api",`repos/${L}/asm-registry/git/refs/heads/${A}`,"-X","PATCH","-f",`sha=${k}`,"-f","force=true"],{stdout:"pipe",stderr:"pipe"}).exited;let C=Bun.spawn(["gh","api",`repos/${L}/asm-registry/contents/${M}`,"-X","PUT","-f",`message=Publish ${L}/${Z.name}`,"-f",`content=${I}`,"-f",`branch=${A}`],{stdout:"pipe",stderr:"pipe"}),S=await new Response(C.stderr).text();if(await C.exited!==0){let s=Bun.spawn(["gh","api",`repos/${L}/asm-registry/contents/${M}?ref=${A}`,"-q",".sha"],{stdout:"pipe",stderr:"pipe"}),d$=(await new Response(s.stdout).text()).trim();if(await s.exited===0&&d$){if(await Bun.spawn(["gh","api",`repos/${L}/asm-registry/contents/${M}`,"-X","PUT","-f",`message=Update ${L}/${Z.name}`,"-f",`content=${I}`,"-f",`branch=${A}`,"-f",`sha=${d$}`],{stdout:"pipe",stderr:"pipe"}).exited!==0)return{success:!1,manifest:B,prUrl:null,error:"Failed to write manifest to registry fork.",securityVerdict:z,securityReport:X}}else return{success:!1,manifest:B,prUrl:null,error:`Failed to write manifest to registry fork. ${S}`,securityVerdict:z,securityReport:X}}let c=x2(Z.name),p=x2(Z.description),t=x2(Z.license),m$=`Publish ${L}/${mq(Z.name)}`,H0=[`## Skill: ${c}`,"",`**Author:** ${L}`,`**Version:** ${Z.version}`,`**Description:** ${p}`,`**License:** ${t}`,`**Repository:** ${G}`,`**Commit:** \`${J}\``,`**Security verdict:** ${z}`,"","---","","*This PR was generated by `asm publish`.*"].join(`
|
|
195
|
+
`),Z0=Bun.spawn(["gh","pr","create","--repo",g0,"--head",`${L}:${A}`,"--title",m$,"--body",H0],{stdout:"pipe",stderr:"pipe"}),m0=await new Response(Z0.stdout).text(),p$=await new Response(Z0.stderr).text(),Y$=await Z0.exited,p0=null;if(Y$===0)p0=m0.trim();else{let s=p$.match(/https:\/\/github\.com\/[^\s]+\/pull\/\d+/);if(s)p0=s[0]}if(!p0)return{success:!1,manifest:B,prUrl:null,error:`Failed to create PR against ${g0}. ${p$}`,securityVerdict:z,securityReport:X};return{success:!0,manifest:B,prUrl:p0,error:null,securityVerdict:z,securityReport:X}}function W8($){let q=$.manifest;if(!q)return"";return["",` gh CLI is unavailable (${$.fallbackReason}).`," To publish manually:","",` 1. Fork ${g0} on GitHub`,` 2. Create branch: publish/${q.author}/${q.name}`,` 3. Add file: manifests/${q.author}/${q.name}.json`," 4. Paste the manifest below into that file",` 5. Open a PR against ${g0}`,"",' Run "asm doctor" to fix your environment.',""," Generated manifest:",JSON.stringify(q,null,2).split(`
|
|
196
196
|
`).map((Q)=>` ${Q}`).join(`
|
|
197
197
|
`)].join(`
|
|
198
|
-
`)}import{execFile as
|
|
199
|
-
`)[0];if(!X)return null;let z=X.split(/\s+/)[0];return z&&/^[0-9a-f]{40}$/.test(z)?z:null}catch(Z){return E(`updater: git ls-remote failed for ${$}: ${Z}`),null}}function
|
|
200
|
-
`)}function
|
|
201
|
-
`)[0],X=Q.match(/(\d+\.\d+\.\d+)/);return{name:"GitHub CLI available",status:"pass",message:X?X[1]:Q}}catch{return{name:"GitHub CLI available",status:"fail",message:"gh not found",fix:"Install GitHub CLI: https://cli.github.com"}}}async function
|
|
202
|
-
`);if(Q.length<2)return{name:"Disk space",status:"warn",message:"Could not parse df output"};let X=Q[1].split(/\s+/),z=parseInt(X[3],10);if(isNaN(z))return{name:"Disk space",status:"warn",message:"Could not parse available space"};let J=z/1024,G=J/1024;if(J>100)return{name:"Disk space",status:"pass",message:`OK (${G>=1?`${G.toFixed(1)} GB free`:`${Math.round(J)} MB free`})`};return{name:"Disk space",status:"fail",message:`${Math.round(J)} MB free (requires > 100 MB)`,fix:"Free disk space in home directory"}}catch{return{name:"Disk space",status:"warn",message:"Could not check disk space"}}}async function
|
|
203
|
-
`)}function
|
|
198
|
+
`)}import{execFile as gW}from"child_process";import{promisify as uW}from"util";import{rm as pq,rename as H8,cp as V8,access as mW,mkdir as pW}from"fs/promises";import{join as dq}from"path";import{homedir as K8}from"os";var y2=uW(gW);async function dW($,q,Z){let Q=Array($.length),X=0;async function z(){while(X<$.length){let G=X++;Q[G]=await Z($[G])}}let J=[];for(let G=0;G<Math.min(q,$.length);G++)J.push(z());return await Promise.all(J),Q}async function cW($,q){try{let Z=["ls-remote",$];if(q)Z.push(q);else Z.push("HEAD");let{stdout:Q}=await y2("git",Z,{timeout:1e4}),X=Q.split(`
|
|
199
|
+
`)[0];if(!X)return null;let z=X.split(/\s+/)[0];return z&&/^[0-9a-f]{40}$/.test(z)?z:null}catch(Z){return E(`updater: git ls-remote failed for ${$}: ${Z}`),null}}function k2($){if($.sourceType)return $.sourceType;if($.source.startsWith("local:"))return"local";return"github"}function B8($){if($.startsWith("github:")){let q=$.slice(7),Z=q.indexOf("#");if(Z!==-1)q=q.slice(0,Z);return`https://github.com/${q}.git`}if($.startsWith("file://"))return $;return null}function lW($){if(!$.startsWith("github:"))return null;let q=$.slice(7),Z=q.indexOf("#");if(Z!==-1)q=q.slice(0,Z);let Q=q.split("/");if(Q.length<2||!Q[0]||!Q[1])return null;return{owner:Q[0],repo:Q[1]}}async function f2($){let q=$?.readLockFn??h0,Z=$?.fetchRegistryIndexFn??j2,Q=$?.lock??await q(),X=Object.entries(Q.skills);if(X.length===0)return{entries:[],outdatedCount:0,upToDateCount:0,untrackedCount:0,errorCount:0};let z=null;if(X.some(([,Y])=>k2(Y)==="registry"||Y.registryName))z=await Z();let G=await dW(X,5,async([Y,U])=>{let V=k2(U);if(!U.commitHash||U.commitHash==="unknown")return{name:Y,installedCommit:U.commitHash||"unknown",latestCommit:"unknown",source:U.source,sourceType:V,status:"untracked"};if(V==="local")return{name:Y,installedCommit:U.commitHash,latestCommit:U.commitHash,source:U.source,sourceType:V,status:"up-to-date"};if(V==="registry"&&z){let L=U.registryName||Y,B=z.manifests.find((F)=>F.name.toLowerCase()===L.toLowerCase());if(B){let F=B.commit!==U.commitHash;return{name:Y,installedCommit:W0(U.commitHash),latestCommit:W0(B.commit),source:U.source,sourceType:V,status:F?"outdated":"up-to-date"}}}let H=B8(U.source);if(!H)return{name:Y,installedCommit:W0(U.commitHash),latestCommit:"unknown",source:U.source,sourceType:V,status:"error",error:"Cannot determine remote URL"};let K=await cW(H,U.ref);if(!K)return{name:Y,installedCommit:W0(U.commitHash),latestCommit:"unknown",source:U.source,sourceType:V,status:"error",error:"Failed to fetch remote commit"};let _=K!==U.commitHash;return{name:Y,installedCommit:W0(U.commitHash),latestCommit:W0(K),source:U.source,sourceType:V,status:_?"outdated":"up-to-date"}});return{entries:G,outdatedCount:G.filter((Y)=>Y.status==="outdated").length,upToDateCount:G.filter((Y)=>Y.status==="up-to-date").length,untrackedCount:G.filter((Y)=>Y.status==="untracked").length,errorCount:G.filter((Y)=>Y.status==="error").length}}async function nW($,q,Z,Q){if(k2(q)==="local")return{name:$,status:"skipped",reason:"Local skill (not updatable)"};let z=B8(q.source);if(!z)return{name:$,status:"failed",reason:"Cannot determine remote URL"};let J=dq(K8(),".config","agent-skill-manager",".tmp",`${$}-${Date.now()}`);try{let G=dq(K8(),".config","agent-skill-manager",".tmp");await pW(G,{recursive:!0}),E(`updater: cloning latest ${$} to ${J}`);let Y=["clone","--depth","1"];if(q.ref&&q.ref!=="HEAD")Y.push("--branch",q.ref);Y.push(z,J);try{await y2("git",Y,{timeout:60000})}catch(I){return{name:$,status:"failed",reason:`Clone failed: ${I.stderr||I.message}`}}let U=null;try{let{stdout:I}=await y2("git",["rev-parse","HEAD"],{cwd:J,timeout:5000});U=I.trim()}catch{return{name:$,status:"failed",reason:"Could not read new commit"}}if(U===q.commitHash)return{name:$,status:"skipped",reason:"Already up to date"};E(`updater: running security audit on ${$}`);let V="safe";try{let I=Q?.auditFn??N0,D=lW(q.source);if(V=(await I(J,$,D?.owner,D?.repo)).verdict,V==="dangerous")return{name:$,status:"skipped",reason:"Security audit: dangerous — update blocked",securityVerdict:V};if(V==="warning"||V==="caution"){if(!Z)return{name:$,status:"skipped",reason:`Security audit: ${V} — use --yes to override`,securityVerdict:V};E(`updater: security audit ${V} for ${$} — proceeding (--yes)`)}}catch(I){return E(`updater: security audit failed for ${$}: ${I.message}`),{name:$,status:"failed",reason:`Security audit failed — skipping update: ${I.message}`}}let H=Q?.loadConfigFn??g,K=Q?.resolveProviderPathFn??X0,L=(await H()).providers.find((I)=>I.name===q.provider),B=L?L.global:`~/.${q.provider}/skills`,F=K(B),O=dq(F,$),A=dq(J,".git");try{await pq(A,{recursive:!0,force:!0})}catch{}try{await mW(O)}catch{let I=Q?.writeLockEntryFn??k$;return await V8(J,O,{recursive:!0}),await I($,{...q,commitHash:U,installedAt:new Date().toISOString()}),{name:$,status:"updated",oldCommit:W0(q.commitHash),newCommit:W0(U),securityVerdict:V}}let M=`${O}.bak-${Date.now()}`;try{await H8(O,M),await V8(J,O,{recursive:!0}),await pq(M,{recursive:!0,force:!0})}catch(I){try{await pq(O,{recursive:!0,force:!0}),await H8(M,O)}catch{}return{name:$,status:"failed",reason:`Atomic swap failed: ${I.message}`}}return await(Q?.writeLockEntryFn??k$)($,{...q,commitHash:U,installedAt:new Date().toISOString()}),{name:$,status:"updated",oldCommit:W0(q.commitHash),newCommit:W0(U),securityVerdict:V}}finally{try{await pq(J,{recursive:!0,force:!0})}catch{}}}async function _8($,q,Z){let Q=Z?.readLockFn??h0,X=Z?.checkOutdatedFn??f2,z=Z?.updateSkillFn??nW,J=await Q(),G=await X({lock:J}),Y=G.entries.filter((H)=>H.status==="outdated"),U=[];if($&&$.length>0){let H=new Set($.map((K)=>K.toLowerCase()));Y=Y.filter((K)=>H.has(K.name.toLowerCase()));for(let K of $)if(!Y.find((_)=>_.name.toLowerCase()===K.toLowerCase()))if(!G.entries.find((L)=>L.name.toLowerCase()===K.toLowerCase()))E(`updater: skill "${K}" not found in lock file`),U.push(K);else E(`updater: skill "${K}" is already up to date`)}if(Y.length===0)return{results:[],updatedCount:0,skippedCount:0,failedCount:0,...U.length>0?{warnings:U}:{}};let V=[];for(let H of Y){let K=J.skills[H.name];if(!K)continue;let _=await z(H.name,K,q);V.push(_)}return{results:V,updatedCount:V.filter((H)=>H.status==="updated").length,skippedCount:V.filter((H)=>H.status==="skipped").length,failedCount:V.filter((H)=>H.status==="failed").length,...U.length>0?{warnings:U}:{}}}function W0($){if(!$||$==="unknown")return"unknown";return $.slice(0,7)}function L8($,q){if($.entries.length===0)return"No skills installed.";let Z=(H)=>H,Q=q?W.red:Z,X=q?W.green:Z,z=q?W.yellow:Z,J=q?W.dim:Z,G=`${"Skill".padEnd(22)}${"Installed".padEnd(14)}${"Latest".padEnd(14)}Source`,Y="─".repeat(60),U=[G,Y];for(let H of $.entries){let K=H.name.padEnd(22),_=H.installedCommit.padEnd(14),L,B;switch(H.status){case"outdated":L=Q(H.latestCommit.padEnd(14)),B=H.sourceType;break;case"up-to-date":L=X(H.latestCommit.padEnd(14)),B=J("(up to date)");break;case"untracked":L=z("untracked".padEnd(14)),B=z("untracked");break;case"error":L=J("error".padEnd(14)),B=J(H.error||"error");break}U.push(`${K}${_}${L}${B}`)}U.push("");let V=[];if($.outdatedCount>0)V.push(Q(`${$.outdatedCount} outdated`));if($.upToDateCount>0)V.push(X(`${$.upToDateCount} up to date`));if($.untrackedCount>0)V.push(z(`${$.untrackedCount} untracked`));if($.errorCount>0)V.push(J(`${$.errorCount} error`));return U.push(V.join(", ")),U.join(`
|
|
200
|
+
`)}function F8($){return JSON.stringify({skills:$.entries.map((q)=>({name:q.name,installed:q.installedCommit,latest:q.latestCommit,source:q.sourceType,status:q.status,...q.error?{error:q.error}:{}})),summary:{outdated:$.outdatedCount,upToDate:$.upToDateCount,untracked:$.untrackedCount,errors:$.errorCount}},null,2)}function O8($){return JSON.stringify({results:$.results.map((q)=>({name:q.name,status:q.status,...q.reason?{reason:q.reason}:{},...q.oldCommit?{oldCommit:q.oldCommit}:{},...q.newCommit?{newCommit:q.newCommit}:{},...q.securityVerdict?{securityVerdict:q.securityVerdict}:{}})),summary:{updated:$.updatedCount,skipped:$.skippedCount,failed:$.failedCount}},null,2)}import{execFile as zH}from"child_process";import{promisify as JH}from"util";import{access as A8,readFile as M8,readdir as GH,writeFile as YH,rm as UH,stat as j8}from"fs/promises";import{join as h2}from"path";import{homedir as WH}from"os";import{constants as T8}from"fs";import{access as iW,realpath as oW,stat as aW}from"fs/promises";import{constants as sW}from"fs";import{delimiter as tW,resolve as rW,sep as eW}from"path";var $H="asm";function qH($){if(!$)return[];let q=new Set,Z=[];for(let Q of $.split(tW)){let X=Q.trim();if(!X)continue;let z=X.endsWith(eW)?X.slice(0,-1):X;if(q.has(z))continue;q.add(z),Z.push(z)}return Z}async function ZH($){try{if(!(await aW($)).isFile())return!1}catch{return!1}try{return await iW($,sW.X_OK),!0}catch{return!1}}async function QH($){try{return await oW($)}catch{return $}}async function XH($=process.env.PATH){let q=new Set,Z=[];for(let Q of qH($)){let X=rW(Q,$H);if(!await ZH(X))continue;let z=await QH(X);if(q.has(z))continue;q.add(z),Z.push({path:X,realPath:z})}return Z}async function cq($=process.env.PATH){let q=await XH($);if(q.length===0)return{resolved:null,shadowed:[]};let[Z,...Q]=q;return{resolved:Z,shadowed:Q}}var J$=JH(zH);async function HH($){let q=$?.execFn??J$;try{let{stdout:Z}=await q("git",["--version"],{timeout:5000});return{name:"Git available",status:"pass",message:Z.trim().replace("git version ","")}}catch{return{name:"Git available",status:"fail",message:"git not found",fix:"Install git: https://git-scm.com/downloads"}}}async function VH($){let q=$?.execFn??J$;try{let{stdout:Z}=await q("git",["--version"],{timeout:5000}),Q=Z.match(/(\d+)\.(\d+)/);if(!Q)return{name:"Git version",status:"warn",message:"Could not parse git version",fix:"Upgrade git: https://git-scm.com/downloads"};let X=parseInt(Q[1],10),z=parseInt(Q[2],10);if(X>2||X===2&&z>=20)return{name:"Git version",status:"pass",message:`${X}.${z} (>= 2.20)`};return{name:"Git version",status:"fail",message:`${X}.${z} (requires >= 2.20)`,fix:"Upgrade git: https://git-scm.com/downloads"}}catch{return{name:"Git version",status:"pass",message:"Skipped — git not available"}}}async function KH($){let q=$?.execFn??J$;try{let{stdout:Z}=await q("gh",["--version"],{timeout:5000}),Q=Z.trim().split(`
|
|
201
|
+
`)[0],X=Q.match(/(\d+\.\d+\.\d+)/);return{name:"GitHub CLI available",status:"pass",message:X?X[1]:Q}}catch{return{name:"GitHub CLI available",status:"fail",message:"gh not found",fix:"Install GitHub CLI: https://cli.github.com"}}}async function BH($){let q=$?.execFn??J$;try{let{stdout:Z}=await q("gh",["auth","status"],{timeout:1e4}),Q=Z.match(/Logged in to .+ account (\S+)/);return{name:"GitHub CLI authenticated",status:"pass",message:Q?Q[1]:"authenticated"}}catch(Z){let X=(Z?.stderr??"").match(/Logged in to .+ account (\S+)/);if(X)return{name:"GitHub CLI authenticated",status:"pass",message:X[1]};return{name:"GitHub CLI authenticated",status:"fail",message:"Not authenticated",fix:"Run: gh auth login"}}}async function _H($){let q=$?.execFn??J$;try{let{stdout:Z}=await q("node",["--version"],{timeout:5000}),Q=Z.trim().replace(/^v/,"");if(parseInt(Q.split(".")[0],10)>=18)return{name:"Node.js version",status:"pass",message:Q};return{name:"Node.js version",status:"fail",message:`${Q} (requires >= 18.0)`,fix:"Upgrade Node.js: https://nodejs.org"}}catch{return{name:"Node.js version",status:"fail",message:"node not found",fix:"Install Node.js >= 18: https://nodejs.org"}}}async function LH($){try{let q=h2($,".asm-doctor-write-test");return await YH(q,"test","utf-8"),await UH(q),{writable:!0,exists:!0}}catch{}try{return await A8($,T8.W_OK),{writable:!0,exists:!0}}catch{}try{return await A8($,T8.F_OK),{writable:!1,exists:!0}}catch{return{writable:!0,exists:!1}}}async function FH($){let q=$.providers.filter((z)=>z.enabled),Z=0,Q=0;for(let z of q){let J=X0(z.global);if(Q++,(await LH(J)).writable)Z++}if(Z===Q)return{name:"Agent directories writable",status:"pass",message:`${Z}/${Q} providers`};let X=Q-Z;return{name:"Agent directories writable",status:"warn",message:`${Z}/${Q} providers (${X} not writable)`,fix:"Fix permissions on agent skill directories"}}async function OH(){let $=f$();try{let q=await M8($,"utf-8"),Z=JSON.parse(q),Q=[];if(Z.version===void 0)Q.push("version");if(!Array.isArray(Z.providers))Q.push("providers");if(Q.length>0)return{name:"Config file valid",status:"fail",message:`Missing required fields: ${Q.join(", ")}`,fix:"Run: asm init"};return{name:"Config file valid",status:"pass",message:"OK"}}catch(q){if(q?.code==="ENOENT")return{name:"Config file valid",status:"pass",message:"No config file (using defaults)"};return{name:"Config file valid",status:"fail",message:"Corrupted or unreadable config",fix:"Run: asm init, or delete corrupted config"}}}async function AH(){let $=I8();try{let q=await M8($,"utf-8"),Z=JSON.parse(q);if(Z.version!==1||typeof Z.skills!=="object")return{name:"Lock file integrity",status:"fail",message:"Invalid lock file schema",fix:"Run: asm install to regenerate"};let Q=Z.skills,X=Object.entries(Q),z=["source","installedAt","provider"],J=[];for(let[G,Y]of X){if(typeof Y!=="object"||Y===null){J.push(G);continue}let U=Y;for(let V of z)if(!U[V]){J.push(G);break}}if(J.length>0)return{name:"Lock file integrity",status:"warn",message:`${X.length} skills tracked, ${J.length} with missing fields`,fix:"Run: asm install to regenerate"};return{name:"Lock file integrity",status:"pass",message:`${X.length} skills tracked`}}catch(q){if(q?.code==="ENOENT")return{name:"Lock file integrity",status:"pass",message:"No lock file (first-time user)"};return{name:"Lock file integrity",status:"fail",message:"Corrupted lock file",fix:"Run: asm install to regenerate"}}}async function TH(){try{let $=await fetch(T2,{method:"HEAD",signal:AbortSignal.timeout(5000)});if($.ok)return{name:"Registry reachable",status:"pass",message:"OK"};return{name:"Registry reachable",status:"fail",message:`HTTP ${$.status}`,fix:"Check network connection or proxy settings"}}catch{return{name:"Registry reachable",status:"fail",message:"Network error",fix:"Check network connection or proxy settings"}}}async function IH($,q){let Z=Object.entries(q.skills);if(Z.length===0)return{name:"Installed skills intact",status:"pass",message:"No skills in lock file"};let Q=[];for(let[J,G]of Z){let Y=$.providers.find((H)=>H.name===G.provider);if(!Y){Q.push(J);continue}let U=X0(Y.global),V=h2(U,J);try{if(!(await j8(V)).isDirectory())Q.push(J)}catch{Q.push(J)}}if(Q.length===0)return{name:"Installed skills intact",status:"pass",message:`${Z.length} skills verified`};let X=Q[0],z=Q.length>1?` (+${Q.length-1} more)`:"";return{name:"Installed skills intact",status:"fail",message:`Missing: ${X}${z}`,fix:`Run: asm update ${X}`}}async function MH($,q){let Z=new Set(Object.keys(q.skills)),Q=[];for(let X of $.providers.filter((z)=>z.enabled)){let z=X0(X.global);try{let J=await GH(z);for(let G of J)try{if((await j8(h2(z,G))).isDirectory()&&!Z.has(G))Q.push(G)}catch{}}catch{}}if(Q.length===0)return{name:"No orphaned skills",status:"pass",message:"OK"};return{name:"No orphaned skills",status:"warn",message:`${Q.length} skill(s) without lock entries`,fix:"Run: asm list to review"}}async function jH($){let q=$?.execFn??J$;try{let{stdout:Z}=await q("df",["-Pk",WH()],{timeout:5000}),Q=Z.trim().split(`
|
|
202
|
+
`);if(Q.length<2)return{name:"Disk space",status:"warn",message:"Could not parse df output"};let X=Q[1].split(/\s+/),z=parseInt(X[3],10);if(isNaN(z))return{name:"Disk space",status:"warn",message:"Could not parse available space"};let J=z/1024,G=J/1024;if(J>100)return{name:"Disk space",status:"pass",message:`OK (${G>=1?`${G.toFixed(1)} GB free`:`${Math.round(J)} MB free`})`};return{name:"Disk space",status:"fail",message:`${Math.round(J)} MB free (requires > 100 MB)`,fix:"Free disk space in home directory"}}catch{return{name:"Disk space",status:"warn",message:"Could not check disk space"}}}async function NH(){try{let $=await cq();if($.shadowed.length===0){if(!$.resolved)return{name:"No PATH shadowing",status:"pass",message:"asm not yet on PATH"};return{name:"No PATH shadowing",status:"pass",message:`single install at ${$.resolved.path}`}}let q=$.resolved,Z=$.shadowed[0].path,Q=$.shadowed.length>1?` (+${$.shadowed.length-1} more)`:"";return{name:"No PATH shadowing",status:"warn",message:`resolved ${q.path}, shadowed ${Z}${Q}`,fix:"Remove the duplicate install (e.g. `bun remove -g agent-skill-manager` or `npm uninstall -g agent-skill-manager`) and keep only one."}}catch($){return{name:"No PATH shadowing",status:"warn",message:`Could not scan PATH: ${$?.message??$}`}}}async function N8(){let $=await g(),q=await h0(),Q=(await Promise.allSettled([HH(),VH(),KH(),BH(),_H(),FH($),OH(),AH(),TH(),IH($,q),MH($,q),jH(),NH()])).map((G,Y)=>{if(G.status==="fulfilled")return G.value;return{name:["Git available","Git version","GitHub CLI available","GitHub CLI authenticated","Node.js version","Agent directories writable","Config file valid","Lock file integrity","Registry reachable","Installed skills intact","No orphaned skills","Disk space","No PATH shadowing"][Y],status:"fail",message:`Check threw: ${G.reason}`}}),X=Q.filter((G)=>G.status==="pass").length,z=Q.filter((G)=>G.status==="warn").length,J=Q.filter((G)=>G.status==="fail").length;return{checks:Q,passed:X,warnings:z,failures:J}}var DH={pass:"✅",warn:"⚠️ ",fail:"❌"};function D8($){let q=["Checking your environment...",""];for(let Z of $.checks){let X=` ${DH[Z.status]} ${Z.name}${Z.message?` (${Z.message})`:""}`;if(q.push(X),Z.fix&&Z.status!=="pass"){let z;if(Z.fix.startsWith("Run: "))z=Z.fix;else if(/^[a-z/~]/.test(Z.fix))z=`Run: ${Z.fix}`;else z=`Fix: ${Z.fix}`;q.push(` → ${z}`)}}return q.push(""),q.push(`${$.passed} passed, ${$.warnings} warning${$.warnings!==1?"s":""}, ${$.failures} error${$.failures!==1?"s":""}`),q.join(`
|
|
203
|
+
`)}function R8($){return JSON.stringify({checks:$.checks.map((q)=>({name:q.name,status:q.status,message:q.message,...q.fix?{fix:q.fix}:{}})),summary:{passed:$.passed,warnings:$.warnings,failures:$.failures}},null,2)}import{readFile as g2,writeFile as RH,stat as C8,copyFile as wH}from"fs/promises";import{join as E8,resolve as S8,basename as u2,isAbsolute as b8}from"path";var w8=["name","description","version","license","creator","compatibility","allowed-tools","effort","tags","metadata"],P8=["add","analyze","audit","build","check","configure","convert","create","debug","deploy","detect","edit","evaluate","explain","export","extract","fetch","find","fix","format","generate","identify","improve","index","inspect","install","list","manage","migrate","optimize","parse","plan","prepare","publish","refactor","remove","rename","report","research","review","run","scaffold","scan","score","search","set","setup","show","summarize","sync","test","transform","translate","update","validate","verify","write"],PH=["confirm","confirmation","error","errors","fail","failure","caution","warning","prerequisite","prerequisites","requires","requirements","rollback","dry-run","dry run","safety","validate","validation","check","backup"],CH=["acceptance criteria","expected output","expected result","edge case","edge cases","test","tests","testing","verify","verification","assert","example input","example output","given","then"],EH=["reference","references","see","template","templates","script","scripts","helper","helpers","link"],SH=["when to use","quick start","overview","instructions","steps","workflow","phases","progressive"];function x8($){let q=$.split(`
|
|
204
204
|
`);if(q.length===0||q[0].trim()!=="---")return{rawFrontmatter:null,body:$};for(let Z=1;Z<q.length;Z++)if(q[Z].trim()==="---"){let Q=q.slice(1,Z).join(`
|
|
205
205
|
`),X=q.slice(Z+1).join(`
|
|
206
206
|
`);return{rawFrontmatter:Q,body:X}}return{rawFrontmatter:q.slice(1).join(`
|
|
207
|
-
`),body:""}}function
|
|
208
|
-
`).length}function g4($){if(!$)return 0;return $.split(/\s+/).map((q)=>q.trim()).filter(Boolean).length}function LH($,q=1){return($.match(/^#{1,6}\s+\S/gm)||[]).length>=q}function cq($,q){let Z=$.toLowerCase();return q.filter((Q)=>Z.includes(Q))}function FH($){return/```[\s\S]+?```/m.test($)}function OH($){return/^\s*[-*]\s+\S/m.test($)||/^\s*\d+\.\s+\S/m.test($)}function AH($,q,Z){let Q=[],X=[],z=0;if(Z!==null)z+=2,Q.push("Has YAML frontmatter block.");else Q.push("SKILL.md has no YAML frontmatter."),X.push("Add a YAML frontmatter block delimited by `---` with at least `name` and `description` fields.");let J=Boolean($.name&&$.name.trim()),G=Boolean($.description&&$.description.trim());if(J)z+=1.5;else Q.push("Missing required field: name."),X.push("Add `name:` to frontmatter (use the skill directory name).");if(G)z+=1.5;else Q.push("Missing required field: description."),X.push("Add a one-line `description:` to frontmatter.");let Y=z0($);if(Y&&Y!=="0.0.0")z+=1;else Q.push("Missing or default version."),X.push("Set `metadata.version` (or top-level `version`) using semver (e.g. 0.1.0).");if(Boolean($.creator||$["metadata.creator"]))z+=1;else Q.push("Missing `creator`."),X.push("Add a `creator` field so users know who authored and maintains the skill.");if(Boolean($.license))z+=1;else Q.push("Missing `license`."),X.push("Add a `license` field (e.g. `license: MIT`).");let B=q.trim().length>=20,_=LH(q,1);if(B)z+=1,Q.push("Body has meaningful content.");else Q.push("Body content is too short (<20 chars of instructions)."),X.push("Flesh out the markdown body with at least one paragraph of instructions for the agent.");if(_)z+=1,Q.push("Body uses markdown headings.");else Q.push("Body has no markdown headings."),X.push("Add section headings (e.g. `## When to Use`, `## Instructions`) so the agent can navigate the skill quickly.");return{id:"structure",name:"Structure & completeness",score:Math.round(z),max:10,findings:Q,suggestions:X}}function IH($,q){let Z=[],Q=[],X=0,z=($.description||"").trim();if(!z)return Z.push("No description."),Q.push("Write a one-sentence description that says specifically what the skill does and when to use it."),{id:"description",name:"Description quality",score:0,max:10,findings:Z,suggestions:Q};let J=g4(z);if(Z.push(`Description is ${J} words.`),J>=8&&J<=40)X+=4;else if(J>=5&&J<8)X+=2,Q.push("Lengthen the description slightly so it names both the action and the trigger (aim for 8–20 words).");else if(J>=41&&J<=60)X+=2,Q.push("Trim the description — aim for under 40 words. Move the long version to the markdown body.");else if(J>60)X+=0,Q.push("Description is too long. Keep it under 40 words; put detail in the body.");else X+=0,Q.push("Description is too short. Aim for 8–20 words.");let G=z.split(/\s+/)[0]?.toLowerCase().replace(/[^\w-]/g,"");if(Boolean(G&&(N8.includes(G)||N8.includes(G.replace(/s$/,"")))))X+=3,Z.push("Starts with an action verb.");else Z.push(`Does not start with a recognized action verb (got "${G??""}").`),Q.push('Start the description with an imperative action verb (e.g. "Generate...", "Analyze...", "Review...").');if(/\buse when\b|\btrigger\b|\bwhen\b|\bfor\b/i.test(z)||/\b(before|after|during)\b/i.test(z))X+=3,Z.push("Mentions a trigger or use-case signal.");else Z.push("No explicit trigger / use-case phrase."),Q.push('Name the trigger in the description — e.g. "Use when...", "for reviewing...", "before publishing...".');return{id:"description",name:"Description quality",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function TH($,q){let Z=[],Q=[],X=0,z=cq(q,_H);if(z.length>=2)X+=3,Z.push(`Progressive disclosure cues present: ${z.slice(0,3).join(", ")}.`);else if(z.length===1)X+=1,Q.push('Add clearer section labels — e.g. "## When to Use" and "## Instructions" — to support progressive disclosure.');else Q.push('Structure the body with "## When to Use" and "## Instructions" sections so the agent reads only what it needs.');if(OH(q))X+=2,Z.push("Uses lists or numbered steps.");else Z.push("No lists or steps detected."),Q.push("Use bulleted or numbered steps to narrow the agent's degrees of freedom.");let J=FH(q),G=/\bexample\b/i.test(q);if(J&&G)X+=2,Z.push("Includes example code block.");else if(J||G)X+=1,Q.push('Back up examples with fenced code blocks labelled under "## Example" so the agent sees concrete input/output.');else Q.push('Add an "## Example" section with a fenced code block showing the desired output.');let Y=(q.match(/^\s*[-*0-9.]*\s*(Do|Use|Run|Call|Check|Validate|Return|Emit|Write|Read|Ask|Confirm|Avoid|Never|Always)\b/gim)||[]).length;if(Y>=3)X+=2,Z.push(`Uses imperative voice (${Y} cues).`);else if(Y>=1)X+=1,Q.push("Favor imperative voice (Do / Use / Avoid / Never) to narrow the agent's choices.");else Q.push('Rewrite instructions in the imperative mood — e.g. "Run `git status` first" instead of "you might want to run".');let U=g4(q);if(U>=80&&U<=3000)X+=1,Z.push(`Body length within healthy range (${U} words).`);else if(U<80)Z.push(`Body is very short (${U} words).`),Q.push("Expand the instructions; an underspecified skill gives the agent too much freedom.");else Z.push(`Body is very long (${U} words).`),Q.push("Split large content into referenced files; keep SKILL.md focused under ~3000 words.");return{id:"prompt-engineering",name:"Prompt engineering",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function MH($,q){let Z=[],Q=[],X=0,z=g4(q);if(Z.push(`Body is ${z} words.`),z>=120&&z<=1500)X+=4;else if(z>=60&&z<120)X+=2,Q.push("Expand instructions slightly — too little context can push the agent to improvise.");else if(z>1500&&z<=3000)X+=2,Q.push("Consider moving large sections into referenced files (e.g. `references/*.md`) and linking them instead of inlining.");else if(z>3000)X+=0,Q.push("Body is over 3000 words — split long content into referenced files or templates.");let J=cq(q,KH);if(J.length>=2)X+=3,Z.push(`References external files or links (${J.slice(0,3).join(", ")}).`);else if(J.length===1)X+=1,Q.push('Link out to supporting files (e.g. "see `references/examples.md`") instead of inlining them.');else Q.push('Offload verbose content to referenced files and link to them ("see `./templates/x.md`").');let Y=(q.match(/```[\s\S]+?```/g)||[]).filter((U)=>E8(U)>60);if(Y.length===0)X+=2,Z.push("No oversized code blocks.");else Z.push(`${Y.length} code block(s) longer than 60 lines.`),Q.push("Move large code blocks into referenced template files; link to them from SKILL.md.");if(/\btoken\b|\bbudget\b|\bcontext window\b/i.test(q))X+=1,Z.push("Mentions tokens/budget/context window.");return{id:"context-efficiency",name:"Context efficiency",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function jH($,q){let Z=[],Q=[],X=0,z=cq(q,VH);if(z.length>=4)X+=4,Z.push(`Covers multiple safety cues (${z.slice(0,4).join(", ")}).`);else if(z.length>=2)X+=2,Z.push(`Mentions a few safety cues: ${z.join(", ")}.`),Q.push("Add explicit error-handling and confirmation steps so the agent knows how to recover from failures.");else if(z.length===1)X+=1,Q.push('Expand the safety section — include prerequisites, validation steps, and what to do "on error".');else Q.push("Describe prerequisites, confirmation prompts, and error-handling steps to reduce blast radius.");let J=/\b(rm\s|delete|remove|drop|force|overwrite|destructive)\b/i.test(q),G=/\bconfirm\b|\bdry-?run\b|\bare you sure\b|\bbackup\b/i.test(q);if(J&&G)X+=3,Z.push("Destructive actions paired with confirmation/dry-run.");else if(J)Z.push("References destructive actions without explicit confirmation/dry-run."),Q.push("Pair any destructive command with an explicit confirmation prompt, dry-run flag, or backup step.");else X+=1.5;if(/\bprerequisit/i.test(q)||/\brequire/i.test(q)||/\bdepend/i.test(q))X+=3,Z.push("Declares prerequisites or requirements.");else Z.push("No prerequisites / requirements section."),Q.push('Add a "## Prerequisites" block listing required tools, credentials, and environment state.');return{id:"safety",name:"Safety & guardrails",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function NH($,q){let Z=[],Q=[],X=0,z=cq(q,BH);if(z.length>=4)X+=5,Z.push(`Many testability cues present (${z.slice(0,4).join(", ")}).`);else if(z.length>=2)X+=3,Z.push(`Some testability cues: ${z.join(", ")}.`),Q.push('Add an "## Acceptance Criteria" block listing verifiable outputs or checklist items.');else if(z.length===1)X+=1,Q.push('Add concrete "expected output" examples so the agent can self-check.');else Q.push('Add a "## Acceptance Criteria" section with testable statements (e.g. "produces a JSON report with overall_score").');if(/expected\s+(output|result|response)/i.test(q))X+=3,Z.push("Describes expected output/result.");else Q.push('Include an "Expected output" example so reviewers and the agent can verify correctness.');if(/\bedge case|gotcha|pitfall|limitation/i.test(q))X+=2,Z.push("Mentions edge cases or limitations.");else Q.push('Add a short "Edge cases" list to describe inputs the skill should reject or handle carefully.');return{id:"testability",name:"Testability",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function DH($,q){let Z=[],Q=[],X=0,z=($.name||"").trim();if(z){let Y=/^[a-z][a-z0-9-]*$/.test(z),U=z.length<=40;if(Y&&U)X+=4,Z.push(`name "${z}" follows kebab-case convention.`);else{if(!Y)Z.push(`name "${z}" is not lowercase kebab-case.`),Q.push(`Rename to lowercase kebab-case (e.g. "${z.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}").`);if(!U)Z.push(`name is ${z.length} chars; keep it <= 40.`)}}else Q.push("Add a kebab-case `name` (e.g. `my-skill`).");let J=q.match(/^#{1,6}\s+(.+)$/gm)||[];if(J.length>0)if(J.filter((V)=>/^#{1,6}\s+([A-Z][a-z]+|Use|How|When|Workflow|Instructions|Examples|Steps|Acceptance)/.test(V)).length/J.length>=0.5)X+=3,Z.push("Most headings use action/imperative labels.");else X+=1,Q.push("Rename body headings to action-oriented labels (e.g. `## Instructions`, `## When to Use`).");if(!/(?:\s\s|\bTODO\b|\bFIXME\b|\?{2,})/.test($.description||""))X+=2,Z.push("Description looks clean (no TODO/FIXME/stray noise).");else Q.push("Clean up description — remove TODOs, FIXMEs, double spaces, or trailing punctuation.");return{id:"naming",name:"Naming & conventions",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function v4($){let{content:q,skillPath:Z,skillMdPath:Q}=$,X=r(q),{rawFrontmatter:z,body:J}=C8(q),G=[AH(X,J,z),IH(X,J),TH(X,J),MH(X,J),jH(X,J),NH(X,J),DH(X,J)];if(X.name&&h4(Z)===X.name){let L=G.find((K)=>K.id==="naming");if(L.score<L.max)L.score=Math.min(L.max,L.score+1),L.findings.push("Directory name matches frontmatter `name`.")}let Y=G.reduce((L,K)=>L+K.score,0),U=G.reduce((L,K)=>L+K.max,0),V=Math.round(Y/U*100),H="F";if(V>=90)H="A";else if(V>=80)H="B";else if(V>=65)H="C";else if(V>=50)H="D";let B=[],_=[...G].sort((L,K)=>L.score/L.max-K.score/K.max);for(let L of _){for(let K of L.suggestions){if(B.length>=3)break;if(!B.includes(K))B.push(K)}if(B.length>=3)break}return{skillPath:Z,skillMdPath:Q,evaluatedAt:new Date().toISOString(),categories:G,overallScore:V,grade:H,topSuggestions:B,frontmatter:X}}async function S8($){let q=P8($)?$:w8($),Z;try{Z=await D8(q)}catch{throw Error(`Skill path does not exist: ${q}`)}let Q,X;if(Z.isFile())return Q=q,X=await f4(Q,"utf-8"),v4({content:X,skillPath:h4(q)==="SKILL.md"?h4(q):q,skillMdPath:Q});if(!Z.isDirectory())throw Error(`Skill path is not a directory or file: ${q}`);Q=R8(q,"SKILL.md");try{X=await f4(Q,"utf-8")}catch{throw Error(`SKILL.md not found in ${q}. Run "asm init" to create one.`)}return v4({content:X,skillPath:q,skillMdPath:Q})}function RH($){if($<=20)return"low";if($<=80)return"medium";if($<=250)return"high";return"max"}function wH($){let q=$.split(`
|
|
209
|
-
`),Z=[],Q=[],X=0;while(X<q.length){let U=q[X];if(!U.trim()){X++;continue}let H=U.match(/^([A-Za-z_][\w-]*):\s*(.*)$/);if(!H)return{newFrontmatter:$,changed:!1};let
|
|
210
|
-
`)})}else Z.push({key:
|
|
211
|
-
`),changed:G}}function
|
|
207
|
+
`),body:""}}function y8($){if(!$)return 0;return $.split(`
|
|
208
|
+
`).length}function p2($){if(!$)return 0;return $.split(/\s+/).map((q)=>q.trim()).filter(Boolean).length}function bH($,q=1){return($.match(/^#{1,6}\s+\S/gm)||[]).length>=q}function lq($,q){let Z=$.toLowerCase();return q.filter((Q)=>Z.includes(Q))}function xH($){return/```[\s\S]+?```/m.test($)}function yH($){return/^\s*[-*]\s+\S/m.test($)||/^\s*\d+\.\s+\S/m.test($)}function kH($,q,Z){let Q=[],X=[],z=0;if(Z!==null)z+=2,Q.push("Has YAML frontmatter block.");else Q.push("SKILL.md has no YAML frontmatter."),X.push("Add a YAML frontmatter block delimited by `---` with at least `name` and `description` fields.");let J=Boolean($.name&&$.name.trim()),G=Boolean($.description&&$.description.trim());if(J)z+=1.5;else Q.push("Missing required field: name."),X.push("Add `name:` to frontmatter (use the skill directory name).");if(G)z+=1.5;else Q.push("Missing required field: description."),X.push("Add a one-line `description:` to frontmatter.");let Y=z0($);if(Y&&Y!=="0.0.0")z+=1;else Q.push("Missing or default version."),X.push("Set `metadata.version` (or top-level `version`) using semver (e.g. 0.1.0).");if(Boolean($.creator||$["metadata.creator"]))z+=1;else Q.push("Missing `creator`."),X.push("Add a `creator` field so users know who authored and maintains the skill.");if(Boolean($.license))z+=1;else Q.push("Missing `license`."),X.push("Add a `license` field (e.g. `license: MIT`).");let K=q.trim().length>=20,_=bH(q,1);if(K)z+=1,Q.push("Body has meaningful content.");else Q.push("Body content is too short (<20 chars of instructions)."),X.push("Flesh out the markdown body with at least one paragraph of instructions for the agent.");if(_)z+=1,Q.push("Body uses markdown headings.");else Q.push("Body has no markdown headings."),X.push("Add section headings (e.g. `## When to Use`, `## Instructions`) so the agent can navigate the skill quickly.");return{id:"structure",name:"Structure & completeness",score:Math.round(z),max:10,findings:Q,suggestions:X}}function fH($,q){let Z=[],Q=[],X=0,z=($.description||"").trim();if(!z)return Z.push("No description."),Q.push("Write a one-sentence description that says specifically what the skill does and when to use it."),{id:"description",name:"Description quality",score:0,max:10,findings:Z,suggestions:Q};let J=p2(z);if(Z.push(`Description is ${J} words.`),J>=8&&J<=40)X+=4;else if(J>=5&&J<8)X+=2,Q.push("Lengthen the description slightly so it names both the action and the trigger (aim for 8–20 words).");else if(J>=41&&J<=60)X+=2,Q.push("Trim the description — aim for under 40 words. Move the long version to the markdown body.");else if(J>60)X+=0,Q.push("Description is too long. Keep it under 40 words; put detail in the body.");else X+=0,Q.push("Description is too short. Aim for 8–20 words.");let G=z.split(/\s+/)[0]?.toLowerCase().replace(/[^\w-]/g,"");if(Boolean(G&&(P8.includes(G)||P8.includes(G.replace(/s$/,"")))))X+=3,Z.push("Starts with an action verb.");else Z.push(`Does not start with a recognized action verb (got "${G??""}").`),Q.push('Start the description with an imperative action verb (e.g. "Generate...", "Analyze...", "Review...").');if(/\buse when\b|\btrigger\b|\bwhen\b|\bfor\b/i.test(z)||/\b(before|after|during)\b/i.test(z))X+=3,Z.push("Mentions a trigger or use-case signal.");else Z.push("No explicit trigger / use-case phrase."),Q.push('Name the trigger in the description — e.g. "Use when...", "for reviewing...", "before publishing...".');return{id:"description",name:"Description quality",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function hH($,q){let Z=[],Q=[],X=0,z=lq(q,SH);if(z.length>=2)X+=3,Z.push(`Progressive disclosure cues present: ${z.slice(0,3).join(", ")}.`);else if(z.length===1)X+=1,Q.push('Add clearer section labels — e.g. "## When to Use" and "## Instructions" — to support progressive disclosure.');else Q.push('Structure the body with "## When to Use" and "## Instructions" sections so the agent reads only what it needs.');if(yH(q))X+=2,Z.push("Uses lists or numbered steps.");else Z.push("No lists or steps detected."),Q.push("Use bulleted or numbered steps to narrow the agent's degrees of freedom.");let J=xH(q),G=/\bexample\b/i.test(q);if(J&&G)X+=2,Z.push("Includes example code block.");else if(J||G)X+=1,Q.push('Back up examples with fenced code blocks labelled under "## Example" so the agent sees concrete input/output.');else Q.push('Add an "## Example" section with a fenced code block showing the desired output.');let Y=(q.match(/^\s*[-*0-9.]*\s*(Do|Use|Run|Call|Check|Validate|Return|Emit|Write|Read|Ask|Confirm|Avoid|Never|Always)\b/gim)||[]).length;if(Y>=3)X+=2,Z.push(`Uses imperative voice (${Y} cues).`);else if(Y>=1)X+=1,Q.push("Favor imperative voice (Do / Use / Avoid / Never) to narrow the agent's choices.");else Q.push('Rewrite instructions in the imperative mood — e.g. "Run `git status` first" instead of "you might want to run".');let U=p2(q);if(U>=80&&U<=3000)X+=1,Z.push(`Body length within healthy range (${U} words).`);else if(U<80)Z.push(`Body is very short (${U} words).`),Q.push("Expand the instructions; an underspecified skill gives the agent too much freedom.");else Z.push(`Body is very long (${U} words).`),Q.push("Split large content into referenced files; keep SKILL.md focused under ~3000 words.");return{id:"prompt-engineering",name:"Prompt engineering",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function vH($,q){let Z=[],Q=[],X=0,z=p2(q);if(Z.push(`Body is ${z} words.`),z>=120&&z<=1500)X+=4;else if(z>=60&&z<120)X+=2,Q.push("Expand instructions slightly — too little context can push the agent to improvise.");else if(z>1500&&z<=3000)X+=2,Q.push("Consider moving large sections into referenced files (e.g. `references/*.md`) and linking them instead of inlining.");else if(z>3000)X+=0,Q.push("Body is over 3000 words — split long content into referenced files or templates.");let J=lq(q,EH);if(J.length>=2)X+=3,Z.push(`References external files or links (${J.slice(0,3).join(", ")}).`);else if(J.length===1)X+=1,Q.push('Link out to supporting files (e.g. "see `references/examples.md`") instead of inlining them.');else Q.push('Offload verbose content to referenced files and link to them ("see `./templates/x.md`").');let Y=(q.match(/```[\s\S]+?```/g)||[]).filter((U)=>y8(U)>60);if(Y.length===0)X+=2,Z.push("No oversized code blocks.");else Z.push(`${Y.length} code block(s) longer than 60 lines.`),Q.push("Move large code blocks into referenced template files; link to them from SKILL.md.");if(/\btoken\b|\bbudget\b|\bcontext window\b/i.test(q))X+=1,Z.push("Mentions tokens/budget/context window.");return{id:"context-efficiency",name:"Context efficiency",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function gH($,q){let Z=[],Q=[],X=0,z=lq(q,PH);if(z.length>=4)X+=4,Z.push(`Covers multiple safety cues (${z.slice(0,4).join(", ")}).`);else if(z.length>=2)X+=2,Z.push(`Mentions a few safety cues: ${z.join(", ")}.`),Q.push("Add explicit error-handling and confirmation steps so the agent knows how to recover from failures.");else if(z.length===1)X+=1,Q.push('Expand the safety section — include prerequisites, validation steps, and what to do "on error".');else Q.push("Describe prerequisites, confirmation prompts, and error-handling steps to reduce blast radius.");let J=/\b(rm\s|delete|remove|drop|force|overwrite|destructive)\b/i.test(q),G=/\bconfirm\b|\bdry-?run\b|\bare you sure\b|\bbackup\b/i.test(q);if(J&&G)X+=3,Z.push("Destructive actions paired with confirmation/dry-run.");else if(J)Z.push("References destructive actions without explicit confirmation/dry-run."),Q.push("Pair any destructive command with an explicit confirmation prompt, dry-run flag, or backup step.");else X+=1.5;if(/\bprerequisit/i.test(q)||/\brequire/i.test(q)||/\bdepend/i.test(q))X+=3,Z.push("Declares prerequisites or requirements.");else Z.push("No prerequisites / requirements section."),Q.push('Add a "## Prerequisites" block listing required tools, credentials, and environment state.');return{id:"safety",name:"Safety & guardrails",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function uH($,q){let Z=[],Q=[],X=0,z=lq(q,CH);if(z.length>=4)X+=5,Z.push(`Many testability cues present (${z.slice(0,4).join(", ")}).`);else if(z.length>=2)X+=3,Z.push(`Some testability cues: ${z.join(", ")}.`),Q.push('Add an "## Acceptance Criteria" block listing verifiable outputs or checklist items.');else if(z.length===1)X+=1,Q.push('Add concrete "expected output" examples so the agent can self-check.');else Q.push('Add a "## Acceptance Criteria" section with testable statements (e.g. "produces a JSON report with overall_score").');if(/expected\s+(output|result|response)/i.test(q))X+=3,Z.push("Describes expected output/result.");else Q.push('Include an "Expected output" example so reviewers and the agent can verify correctness.');if(/\bedge case|gotcha|pitfall|limitation/i.test(q))X+=2,Z.push("Mentions edge cases or limitations.");else Q.push('Add a short "Edge cases" list to describe inputs the skill should reject or handle carefully.');return{id:"testability",name:"Testability",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function mH($,q){let Z=[],Q=[],X=0,z=($.name||"").trim();if(z){let Y=/^[a-z][a-z0-9-]*$/.test(z),U=z.length<=40;if(Y&&U)X+=4,Z.push(`name "${z}" follows kebab-case convention.`);else{if(!Y)Z.push(`name "${z}" is not lowercase kebab-case.`),Q.push(`Rename to lowercase kebab-case (e.g. "${z.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}").`);if(!U)Z.push(`name is ${z.length} chars; keep it <= 40.`)}}else Q.push("Add a kebab-case `name` (e.g. `my-skill`).");let J=q.match(/^#{1,6}\s+(.+)$/gm)||[];if(J.length>0)if(J.filter((V)=>/^#{1,6}\s+([A-Z][a-z]+|Use|How|When|Workflow|Instructions|Examples|Steps|Acceptance)/.test(V)).length/J.length>=0.5)X+=3,Z.push("Most headings use action/imperative labels.");else X+=1,Q.push("Rename body headings to action-oriented labels (e.g. `## Instructions`, `## When to Use`).");if(!/(?:\s\s|\bTODO\b|\bFIXME\b|\?{2,})/.test($.description||""))X+=2,Z.push("Description looks clean (no TODO/FIXME/stray noise).");else Q.push("Clean up description — remove TODOs, FIXMEs, double spaces, or trailing punctuation.");return{id:"naming",name:"Naming & conventions",score:Math.min(10,Math.round(X)),max:10,findings:Z,suggestions:Q}}function m2($){let{content:q,skillPath:Z,skillMdPath:Q}=$,X=r(q),{rawFrontmatter:z,body:J}=x8(q),G=[kH(X,J,z),fH(X,J),hH(X,J),vH(X,J),gH(X,J),uH(X,J),mH(X,J)];if(X.name&&u2(Z)===X.name){let L=G.find((B)=>B.id==="naming");if(L.score<L.max)L.score=Math.min(L.max,L.score+1),L.findings.push("Directory name matches frontmatter `name`.")}let Y=G.reduce((L,B)=>L+B.score,0),U=G.reduce((L,B)=>L+B.max,0),V=Math.round(Y/U*100),H="F";if(V>=90)H="A";else if(V>=80)H="B";else if(V>=65)H="C";else if(V>=50)H="D";let K=[],_=[...G].sort((L,B)=>L.score/L.max-B.score/B.max);for(let L of _){for(let B of L.suggestions){if(K.length>=3)break;if(!K.includes(B))K.push(B)}if(K.length>=3)break}return{skillPath:Z,skillMdPath:Q,evaluatedAt:new Date().toISOString(),categories:G,overallScore:V,grade:H,topSuggestions:K,frontmatter:X}}async function k8($){let q=b8($)?$:S8($),Z;try{Z=await C8(q)}catch{throw Error(`Skill path does not exist: ${q}`)}let Q,X;if(Z.isFile())return Q=q,X=await g2(Q,"utf-8"),m2({content:X,skillPath:u2(q)==="SKILL.md"?u2(q):q,skillMdPath:Q});if(!Z.isDirectory())throw Error(`Skill path is not a directory or file: ${q}`);Q=E8(q,"SKILL.md");try{X=await g2(Q,"utf-8")}catch{throw Error(`SKILL.md not found in ${q}. Run "asm init" to create one.`)}return m2({content:X,skillPath:q,skillMdPath:Q})}function pH($){if($<=20)return"low";if($<=80)return"medium";if($<=250)return"high";return"max"}function dH($){let q=$.split(`
|
|
209
|
+
`),Z=[],Q=[],X=0;while(X<q.length){let U=q[X];if(!U.trim()){X++;continue}let H=U.match(/^([A-Za-z_][\w-]*):\s*(.*)$/);if(!H)return{newFrontmatter:$,changed:!1};let K=H[1],_=H[2];if(_===""||_===">"||_==="|"){let L=[U];X++;while(X<q.length){let B=q[X];if(B.trim()===""){L.push(B),X++;continue}if(/^\s+/.test(B))L.push(B),X++;else break}Q.push({key:K,text:L.join(`
|
|
210
|
+
`)})}else Z.push({key:K,text:U}),X++}let z=(U)=>{let V=w8.indexOf(U);return V===-1?w8.length+1:V},J=[...Z].sort((U,V)=>{let H=z(U.key),K=z(V.key);if(H!==K)return H-K;return Z.indexOf(U)-Z.indexOf(V)}),G=J.some((U,V)=>U!==Z[V]);return{newFrontmatter:[...J.map((U)=>U.text),...Q.map((U)=>U.text)].join(`
|
|
211
|
+
`),changed:G}}function cH($,q={}){let Z=[],Q=[],X=$.replace(/\r\n/g,`
|
|
212
212
|
`);if(X!==$)Z.push({id:"normalise-line-endings",description:"Convert CRLF line endings to LF."});let z=X.split(`
|
|
213
213
|
`),J=z.map((F)=>F.replace(/[ \t]+$/g,""));if(J.some((F,O)=>F!==z[O]))Z.push({id:"strip-trailing-whitespace",description:"Strip trailing whitespace from lines."});X=J.join(`
|
|
214
|
-
`);let{rawFrontmatter:G,body:Y}=
|
|
214
|
+
`);let{rawFrontmatter:G,body:Y}=x8(X),U=r(X);if(G===null)return Q.push({id:"missing-frontmatter",description:"SKILL.md has no frontmatter — not auto-fixable (requires author decisions)."}),{newContent:X,applied:Z,skipped:Q};let V=G;if(!Boolean(U.version||U["metadata.version"]))V=v2(V,"version","0.1.0"),Z.push({id:"add-missing-version",description:"Add `version: 0.1.0`."});if(!Boolean(U.creator||U["metadata.creator"])){let F=q.gitAuthor?.trim();if(F)V=v2(V,"creator",F),Z.push({id:"add-missing-creator",description:`Add \`creator: ${F}\` from git config.`});else Q.push({id:"add-missing-creator",description:"Missing `creator` — no git user.name found to fill in safely."})}if(!U.effort){let F=pH(y8(Y));V=v2(V,"effort",F),Z.push({id:"infer-missing-effort",description:`Infer \`effort: ${F}\` from body size.`})}if(!U.description)Q.push({id:"missing-description",description:"Missing `description` — content-level fix, left to the author."});let _=dH(V);if(_.changed)Z.push({id:"reorder-frontmatter",description:"Reorder frontmatter fields to canonical order."}),V=_.newFrontmatter;let L=Y.replace(/^\n+/,""),B=`---
|
|
215
215
|
${V.replace(/^\n+|\n+$/g,"")}
|
|
216
216
|
---
|
|
217
217
|
|
|
218
|
-
${L}`;if(!
|
|
219
|
-
`))
|
|
220
|
-
`;if(
|
|
221
|
-
`));return{newContent:
|
|
218
|
+
${L}`;if(!B.endsWith(`
|
|
219
|
+
`))B+=`
|
|
220
|
+
`;if(B===$.replace(/\r\n/g,`
|
|
221
|
+
`));return{newContent:B,applied:Z,skipped:Q}}function v2($,q,Z){if(new RegExp(`^${q}:\\s*`,"m").test($))return $;let X=/[:#{}\[\],&*?|<>=!%@`"']/.test(Z)?JSON.stringify(Z):Z,z=$.length===0||$.endsWith(`
|
|
222
222
|
`)?"":`
|
|
223
223
|
`;return`${$}${z}${q}: ${X}
|
|
224
|
-
`}function
|
|
224
|
+
`}function lH($,q,Z="SKILL.md"){if($===q)return"";let Q=$.split(`
|
|
225
225
|
`),X=q.split(`
|
|
226
|
-
`),z=[`--- a/${Z}`,`+++ b/${Z}`],J=0;while(J<Q.length&&J<X.length&&Q[J]===X[J])J++;let G=0;while(G<Q.length-J&&G<X.length-J&&Q[Q.length-1-G]===X[X.length-1-G])G++;let Y=Q.slice(J,Q.length-G),U=X.slice(J,X.length-G),V=J+1,H=J+1;z.push(`@@ -${V},${Y.length} +${H},${U.length} @@`);let
|
|
227
|
-
`)}async function
|
|
228
|
-
`)}function
|
|
226
|
+
`),z=[`--- a/${Z}`,`+++ b/${Z}`],J=0;while(J<Q.length&&J<X.length&&Q[J]===X[J])J++;let G=0;while(G<Q.length-J&&G<X.length-J&&Q[Q.length-1-G]===X[X.length-1-G])G++;let Y=Q.slice(J,Q.length-G),U=X.slice(J,X.length-G),V=J+1,H=J+1;z.push(`@@ -${V},${Y.length} +${H},${U.length} @@`);let K=Q.slice(Math.max(0,J-3),J).map((L)=>` ${L}`),_=Q.slice(Q.length-G,Math.min(Q.length,Q.length-G+3)).map((L)=>` ${L}`);z.push(...K);for(let L of Y)z.push(`-${L}`);for(let L of U)z.push(`+${L}`);return z.push(..._),z.join(`
|
|
227
|
+
`)}async function f8($,q){let Z=b8($)?$:S8($),Q,X=await C8(Z).catch(()=>null);if(!X)throw Error(`Skill path does not exist: ${Z}`);if(X.isFile())Q=Z;else if(X.isDirectory())Q=E8(Z,"SKILL.md");else throw Error(`Skill path is not a directory or file: ${Z}`);let z;try{z=await g2(Q,"utf-8")}catch{throw Error(`SKILL.md not found at ${Q}.`)}let J=cH(z,{gitAuthor:q.gitAuthor}),G=lH(z,J.newContent),Y=null;if(!q.dryRun&&J.newContent!==z)Y=`${Q}.bak`,await wH(Q,Y),await RH(Q,J.newContent,"utf-8");return{report:m2({content:q.dryRun?z:J.newContent,skillPath:Z,skillMdPath:Q}),applied:J.applied,skipped:J.skipped,diff:G,dryRun:q.dryRun,backupPath:Y,skillMdPath:Q}}async function h8(){try{let $=Bun.spawn(["git","config","--global","--get","user.name"],{stdout:"pipe",stderr:"pipe"}),q=await new Response($.stdout).text();if(await $.exited!==0)return null;let Q=q.trim();return Q?Q:null}catch{return null}}function nH($,q,Z=20){let Q=Math.round($/q*Z);return"█".repeat(Q)+"░".repeat(Math.max(0,Z-Q))}function d2($){let q=[];q.push(`Skill evaluation: ${$.skillPath}`),q.push(`SKILL.md: ${$.skillMdPath}`),q.push(""),q.push(`Overall score: ${$.overallScore}/100 (${$.grade})`),q.push(""),q.push("Categories:");for(let Z of $.categories)q.push(` ${Z.name.padEnd(28)} ${String(Z.score).padStart(2)}/${Z.max} ${nH(Z.score,Z.max)}`);if(q.push(""),$.topSuggestions.length>0){q.push("Top suggestions:");for(let Z of $.topSuggestions)q.push(` • ${Z}`)}else q.push("No suggestions — skill looks great.");return q.join(`
|
|
228
|
+
`)}function v8($){return JSON.stringify($,null,2)}function g8($){let q=[];if($.applied.length===0&&$.skipped.length===0)return q.push("No fixes needed — SKILL.md is already clean."),q.join(`
|
|
229
229
|
`);if($.applied.length>0){q.push(`${$.dryRun?"Would apply":"Applied"} ${$.applied.length} fix(es):`);for(let Z of $.applied)q.push(` • ${Z.description}`)}if($.skipped.length>0){q.push(""),q.push(`Skipped ${$.skipped.length} issue(s) (not auto-fixable):`);for(let Z of $.skipped)q.push(` • ${Z.description}`)}if($.diff)q.push(""),q.push("Diff:"),q.push($.diff);if(!$.dryRun&&$.backupPath)q.push(""),q.push(`Backup: ${$.backupPath}`);return q.join(`
|
|
230
|
-
`)}function m4($,q=null){return{skill_path:$.skillPath,skill_md_path:$.skillMdPath,overall_score:$.overallScore,grade:$.grade,categories:$.categories.map((Z)=>({id:Z.id,name:Z.name,score:Z.score,max:Z.max,findings:Z.findings,suggestions:Z.suggestions})),top_suggestions:$.topSuggestions,fix:q?{dry_run:q.dryRun,applied:q.applied,skipped:q.skipped,backup_path:q.backupPath,diff:q.diff}:null}}function f8($){if($ instanceof Error)return $.message;if(typeof $==="string")return $;try{return JSON.stringify($)}catch{return String($)}}function h8($,q,Z,Q,X){let z={severity:"error",message:Q,code:X};return{providerId:$.id,providerVersion:$.version,schemaVersion:$.schemaVersion,score:0,passed:!1,categories:[],findings:[z],raw:void 0,startedAt:q,durationMs:Z}}async function h$($,q,Z={}){let Q=new Date().toISOString(),X=performance.now(),z={id:$.id,version:$.version,schemaVersion:$.schemaVersion},J=new AbortController;if(Z.signal)if(Z.signal.aborted)J.abort(Z.signal.reason);else Z.signal.addEventListener("abort",()=>J.abort(Z.signal?.reason));let G=null;if(typeof Z.timeoutMs==="number"&&Z.timeoutMs>0)G=setTimeout(()=>J.abort(Error("timeout")),Z.timeoutMs);let Y={...Z,signal:J.signal};try{let U=await Promise.race([$.run(q,Y).then((B)=>({kind:"ok",value:B})),new Promise((B)=>{if(J.signal.aborted){B({kind:"timeout"});return}J.signal.addEventListener("abort",()=>B({kind:"timeout"}))})]),V=Math.max(0,Math.round(performance.now()-X));if(U.kind==="timeout"){let B=J.signal.reason,_=B instanceof Error&&B.message==="timeout"?`provider timed out after ${Z.timeoutMs}ms`:`provider aborted: ${f8(B)}`;return h8(z,Q,V,_,B instanceof Error&&B.message==="timeout"?"timeout":"aborted")}let H=U.value;return{...H,providerId:z.id,providerVersion:z.version,schemaVersion:H.schemaVersion??z.schemaVersion,startedAt:Q,durationMs:V}}catch(U){let V=Math.max(0,Math.round(performance.now()-X));return h8(z,Q,V,f8(U),"provider-threw")}finally{if(G)clearTimeout(G)}}var SH=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;function D0($){if(typeof $!=="string")return null;let q=SH.exec($.trim());if(!q)return null;let[,Z,Q,X,z]=q;return{major:Number(Z),minor:Number(Q),patch:Number(X),prerelease:z?z.split("."):[]}}function G$($,q){if($.major!==q.major)return $.major-q.major;if($.minor!==q.minor)return $.minor-q.minor;if($.patch!==q.patch)return $.patch-q.patch;if($.prerelease.length===0&&q.prerelease.length>0)return 1;if($.prerelease.length>0&&q.prerelease.length===0)return-1;let Z=Math.max($.prerelease.length,q.prerelease.length);for(let Q=0;Q<Z;Q++){let X=$.prerelease[Q],z=q.prerelease[Q];if(X===void 0)return-1;if(z===void 0)return 1;let J=/^\d+$/.test(X),G=/^\d+$/.test(z);if(J&&G){let Y=Number(X)-Number(z);if(Y!==0)return Y}else if(J&&!G)return-1;else if(!J&&G)return 1;else if(X<z)return-1;else if(X>z)return 1}return 0}function p4($,q){let Z=D0($);if(!Z)throw Error(`invalid semver: ${q} "${$}"`);return Z}function d4($,q){if(typeof q!=="string"||q.trim().length===0)throw Error(`invalid semver range: ${JSON.stringify(q)}`);let Z=D0($);if(!Z)return!1;let Q=q.trim();if(Q==="*"||Q==="x"||Q==="X")return!0;if(Q.startsWith("^")){let J=p4(Q.slice(1),"range base");if(G$(Z,J)<0)return!1;if(J.major>0)return Z.major===J.major;if(J.minor>0)return Z.major===0&&Z.minor===J.minor;return Z.major===0&&Z.minor===0&&Z.patch===J.patch}if(Q.startsWith("~")){let J=p4(Q.slice(1),"range base");if(G$(Z,J)<0)return!1;return Z.major===J.major&&Z.minor===J.minor}let X=Q.startsWith("=")?Q.slice(1).trim():Q,z=D0(X);if(!z)throw Error(`invalid semver range: ${JSON.stringify(q)}`);return G$(Z,z)===0}var lq=new Map;function c4($){if(!$||typeof $.id!=="string"||$.id.length===0)throw Error("register: provider.id is required");if(p4($.version,`provider ${$.id} version`),typeof $.schemaVersion!=="number"||!Number.isInteger($.schemaVersion))throw Error(`register: provider ${$.id} schemaVersion must be an integer`);let q=lq.get($.id)??[];if(q.some((Z)=>Z.version===$.version))throw Error(`register: provider ${$.id}@${$.version} already registered`);q.push($),lq.set($.id,q)}function v$($,q){if(typeof $!=="string"||$.length===0)throw Error("resolve: id is required");let Z=lq.get($);if(!Z||Z.length===0)throw Error(`resolve: provider "${$}" is not registered`);let Q=Z.filter((X)=>d4(X.version,q));if(Q.length===0){let X=Z.map((z)=>z.version).join(", ");throw Error(`resolve: no version of "${$}" satisfies "${q}" (have: ${X})`)}return Q.sort((X,z)=>G$(D0(z.version),D0(X.version))),Q[0]}function v8(){let $=[];for(let q of lq.values())for(let Z of q)$.push(Z);return $}import{stat as bH}from"fs/promises";var g8="quality",u8="1.0.0",m8=1;function xH($){return $.topSuggestions.map((q)=>({severity:"info",message:q}))}function yH($){return $.categories.map((q)=>({id:q.id,name:q.name,score:q.score,max:q.max}))}var p8={id:g8,version:u8,schemaVersion:m8,description:"Static linter for SKILL.md structure, description, and safety.",async applicable($){try{if(!(await bH($.skillMdPath)).isFile())return{ok:!1,reason:`${$.skillMdPath} is not a file`};return{ok:!0}}catch{return{ok:!1,reason:`SKILL.md not found at ${$.skillMdPath}`}}},async run($,q){let Z=await S8($.skillPath);return{providerId:g8,providerVersion:u8,schemaVersion:m8,score:Z.overallScore,passed:Z.grade!=="F",categories:yH(Z),findings:xH(Z),raw:Z,startedAt:"",durationMs:0}}};import{stat as lH}from"fs/promises";import{join as nH}from"path";async function d8($){if(!$)return"";let q=$.getReader(),Z=[];while(!0){let{value:J,done:G}=await q.read();if(G)break;if(J)Z.push(J)}let Q=Z.reduce((J,G)=>J+G.byteLength,0),X=new Uint8Array(Q),z=0;for(let J of Z)X.set(J,z),z+=J.byteLength;return new TextDecoder("utf-8").decode(X)}var nq=async($,q={})=>{let Z={...process.env,...q.env??{}};return typeof globalThis.Bun<"u"?kH($,q,Z):fH($,q,Z)};async function kH($,q,Z){let Q=Bun.spawn($,{cwd:q.cwd,env:Z,stdout:"pipe",stderr:"pipe"}),X=!1,z=!1,J=null;if(typeof q.timeoutMs==="number"&&q.timeoutMs>0)J=setTimeout(()=>{X=!0;try{Q.kill("SIGTERM")}catch{}},q.timeoutMs);let G=()=>{z=!0;try{Q.kill("SIGTERM")}catch{}};if(q.signal)if(q.signal.aborted)G();else q.signal.addEventListener("abort",G,{once:!0});try{let[Y,U,V]=await Promise.all([d8(Q.stdout),d8(Q.stderr),Q.exited]);return{exitCode:typeof V==="number"?V:null,stdout:Y,stderr:U,timedOut:X,aborted:z}}finally{if(J)clearTimeout(J);if(q.signal)q.signal.removeEventListener("abort",G)}}async function fH($,q,Z){let{spawn:Q}=await import("child_process"),[X,...z]=$;if(!X)return{exitCode:null,stdout:"",stderr:"empty argv",timedOut:!1,aborted:!1};let J=Q(X,z,{cwd:q.cwd,env:Z,stdio:["ignore","pipe","pipe"]}),G=!1,Y=!1,U=null;if(typeof q.timeoutMs==="number"&&q.timeoutMs>0)U=setTimeout(()=>{G=!0;try{J.kill("SIGTERM")}catch{}},q.timeoutMs);let V=()=>{Y=!0;try{J.kill("SIGTERM")}catch{}};if(q.signal)if(q.signal.aborted)V();else q.signal.addEventListener("abort",V,{once:!0});let H=new TextDecoder("utf-8"),B=new TextDecoder("utf-8"),_="",L="";J.stdout?.on("data",(K)=>{_+=typeof K==="string"?K:H.decode(K,{stream:!0})}),J.stderr?.on("data",(K)=>{L+=typeof K==="string"?K:B.decode(K,{stream:!0})});try{return await new Promise((F,O)=>{J.on("error",(A)=>{J.stdout?.removeAllListeners("data"),J.stderr?.removeAllListeners("data"),O(A)}),J.on("close",(A)=>{_+=H.decode(),L+=B.decode(),F({exitCode:A,stdout:_,stderr:L,timedOut:G,aborted:Y})})})}finally{if(U)clearTimeout(U);if(q.signal)q.signal.removeEventListener("abort",V)}}function hH($){if(typeof $!=="number"||!Number.isFinite($))return 0;let q=Math.round($*100);if(q<0)return 0;if(q>100)return 100;return q}function vH($){return $.split(/[-_]+/).map((q)=>q.length>0?q[0].toUpperCase()+q.slice(1):"").join(" ")}function gH($,q){let Z=typeof $.id==="string"&&$.id.length>0?$.id:`task-${q+1}`,Q=vH(Z);if(typeof $.passing==="number"&&typeof $.trials==="number"&&$.trials>0)return{id:Z,name:Q,score:Math.max(0,Math.min($.passing,$.trials)),max:$.trials};let X=typeof $.passRate==="number"?$.passRate:0;return{id:Z,name:Q,score:Math.max(0,Math.min(10,Math.round(X*10))),max:10}}function uH($){let q=[];for(let Z of $){let Q=typeof Z.id==="string"?Z.id:void 0,X=Array.isArray(Z.graders)?Z.graders:[];if(X.length===0){q.push({severity:Z.passed===!1?"warning":"info",message:`task ${Q??"(unnamed)"} ${Z.passed===!1?"failed":"passed"}`,categoryId:Q});continue}for(let z of X){let J=typeof z.message==="string"&&z.message.length>0?z.message:`grader ${z.id??"(unnamed)"} ${z.passed?"passed":"failed"}`;q.push({severity:z.passed===!1?"warning":"info",message:J,categoryId:Q,code:typeof z.id==="string"?`grader:${z.id}`:void 0})}}return q}function c8($,q){let Z=$&&typeof $==="object"?$:{},Q=Array.isArray(Z.tasks)?Z.tasks:[],X=Q.map(gH),z=uH(Q),J=hH(Z.passRate),G;if(typeof Z.passed==="boolean")G=Z.passed;else if(typeof Z.passRate==="number")G=Z.passRate>=q.thresholdFraction;else G=!1;return{providerId:q.providerId,providerVersion:q.providerVersion,schemaVersion:q.schemaVersion,score:J,passed:G,categories:X,findings:z,raw:Z,startedAt:"",durationMs:0}}var mH=/^(>=|<=|>|<|=)(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)$/;function pH($){let q=mH.exec($);if(!q)return null;let[,Z,Q]=q,X=D0(Q);if(!X)return null;return{op:Z,major:X.major,minor:X.minor,patch:X.patch,prerelease:X.prerelease}}function dH($,q){if(!$)return!1;let Z=G$($,{major:q.major,minor:q.minor,patch:q.patch,prerelease:q.prerelease});switch(q.op){case">=":return Z>=0;case">":return Z>0;case"<=":return Z<=0;case"<":return Z<0;case"=":return Z===0}}function l8($,q){if(!q||q.trim().length===0)return!0;let Z=q.trim();if(Z==="*"||Z==="x"||Z==="X")return!0;let Q=D0($);if(!Q)return!1;let X=Z.split(/\s+/);for(let z of X){if(z.length===0)continue;let J=pH(z);if(J){if(!dH(Q,J))return!1;continue}try{if(!d4($,z))return!1;continue}catch{throw Error(`invalid externalRequires range clause: ${JSON.stringify(z)} in ${JSON.stringify(q)}`)}}return!0}import{createRequire as cH}from"module";function n8($=import.meta.url){try{return cH($).resolve("skillgrade/bin/skillgrade.js")}catch{return null}}var l4="skillgrade",n4="1.0.0",i4=1,iH=">=0.1.3 <0.3.0",oH=0.8,aH="smoke",sH="docker",tH=async($)=>{try{return(await lH($)).isFile()}catch{return!1}};function g$($,q){return{providerId:l4,providerVersion:n4,schemaVersion:i4,score:0,passed:!1,categories:[],findings:[$],raw:q,startedAt:"",durationMs:0}}function rH($){let q=$.toLowerCase();if(q.includes("api key")||q.includes("anthropic_api_key")||q.includes("openai_api_key")||q.includes("unauthorized")||q.includes("401"))return{code:"missing-api-key",hint:"set ANTHROPIC_API_KEY or OPENAI_API_KEY in your environment"};if(q.includes("docker")&&(q.includes("not found")||q.includes("cannot connect")||q.includes("unavailable")||q.includes("is not running")))return{code:"docker-unavailable",hint:"start Docker or pass --provider local"};return{code:"skillgrade-nonzero-exit",hint:"check skillgrade logs above for details"}}async function eH($,q,Z){let Q;try{Q=await $([q,"--version"],{timeoutMs:5000,signal:Z})}catch{return null}if(Q.exitCode!==0)return null;let X=`${Q.stdout}
|
|
231
|
-
|
|
232
|
-
${
|
|
233
|
-
|
|
234
|
-
`)
|
|
235
|
-
|
|
236
|
-
|
|
230
|
+
`)}function c2($,q=null){return{skill_path:$.skillPath,skill_md_path:$.skillMdPath,overall_score:$.overallScore,grade:$.grade,categories:$.categories.map((Z)=>({id:Z.id,name:Z.name,score:Z.score,max:Z.max,findings:Z.findings,suggestions:Z.suggestions})),top_suggestions:$.topSuggestions,fix:q?{dry_run:q.dryRun,applied:q.applied,skipped:q.skipped,backup_path:q.backupPath,diff:q.diff}:null}}function u8($){if($ instanceof Error)return $.message;if(typeof $==="string")return $;try{return JSON.stringify($)}catch{return String($)}}function m8($,q,Z,Q,X){let z={severity:"error",message:Q,code:X};return{providerId:$.id,providerVersion:$.version,schemaVersion:$.schemaVersion,score:0,passed:!1,categories:[],findings:[z],raw:void 0,startedAt:q,durationMs:Z}}async function h$($,q,Z={}){let Q=new Date().toISOString(),X=performance.now(),z={id:$.id,version:$.version,schemaVersion:$.schemaVersion},J=new AbortController;if(Z.signal)if(Z.signal.aborted)J.abort(Z.signal.reason);else Z.signal.addEventListener("abort",()=>J.abort(Z.signal?.reason));let G=null;if(typeof Z.timeoutMs==="number"&&Z.timeoutMs>0)G=setTimeout(()=>J.abort(Error("timeout")),Z.timeoutMs);let Y={...Z,signal:J.signal};try{let U=await Promise.race([$.run(q,Y).then((K)=>({kind:"ok",value:K})),new Promise((K)=>{if(J.signal.aborted){K({kind:"timeout"});return}J.signal.addEventListener("abort",()=>K({kind:"timeout"}))})]),V=Math.max(0,Math.round(performance.now()-X));if(U.kind==="timeout"){let K=J.signal.reason,_=K instanceof Error&&K.message==="timeout"?`provider timed out after ${Z.timeoutMs}ms`:`provider aborted: ${u8(K)}`;return m8(z,Q,V,_,K instanceof Error&&K.message==="timeout"?"timeout":"aborted")}let H=U.value;return{...H,providerId:z.id,providerVersion:z.version,schemaVersion:H.schemaVersion??z.schemaVersion,startedAt:Q,durationMs:V}}catch(U){let V=Math.max(0,Math.round(performance.now()-X));return m8(z,Q,V,u8(U),"provider-threw")}finally{if(G)clearTimeout(G)}}var iH=/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/;function D0($){if(typeof $!=="string")return null;let q=iH.exec($.trim());if(!q)return null;let[,Z,Q,X,z]=q;return{major:Number(Z),minor:Number(Q),patch:Number(X),prerelease:z?z.split("."):[]}}function G$($,q){if($.major!==q.major)return $.major-q.major;if($.minor!==q.minor)return $.minor-q.minor;if($.patch!==q.patch)return $.patch-q.patch;if($.prerelease.length===0&&q.prerelease.length>0)return 1;if($.prerelease.length>0&&q.prerelease.length===0)return-1;let Z=Math.max($.prerelease.length,q.prerelease.length);for(let Q=0;Q<Z;Q++){let X=$.prerelease[Q],z=q.prerelease[Q];if(X===void 0)return-1;if(z===void 0)return 1;let J=/^\d+$/.test(X),G=/^\d+$/.test(z);if(J&&G){let Y=Number(X)-Number(z);if(Y!==0)return Y}else if(J&&!G)return-1;else if(!J&&G)return 1;else if(X<z)return-1;else if(X>z)return 1}return 0}function l2($,q){let Z=D0($);if(!Z)throw Error(`invalid semver: ${q} "${$}"`);return Z}function n2($,q){if(typeof q!=="string"||q.trim().length===0)throw Error(`invalid semver range: ${JSON.stringify(q)}`);let Z=D0($);if(!Z)return!1;let Q=q.trim();if(Q==="*"||Q==="x"||Q==="X")return!0;if(Q.startsWith("^")){let J=l2(Q.slice(1),"range base");if(G$(Z,J)<0)return!1;if(J.major>0)return Z.major===J.major;if(J.minor>0)return Z.major===0&&Z.minor===J.minor;return Z.major===0&&Z.minor===0&&Z.patch===J.patch}if(Q.startsWith("~")){let J=l2(Q.slice(1),"range base");if(G$(Z,J)<0)return!1;return Z.major===J.major&&Z.minor===J.minor}let X=Q.startsWith("=")?Q.slice(1).trim():Q,z=D0(X);if(!z)throw Error(`invalid semver range: ${JSON.stringify(q)}`);return G$(Z,z)===0}var nq=new Map;function i2($){if(!$||typeof $.id!=="string"||$.id.length===0)throw Error("register: provider.id is required");if(l2($.version,`provider ${$.id} version`),typeof $.schemaVersion!=="number"||!Number.isInteger($.schemaVersion))throw Error(`register: provider ${$.id} schemaVersion must be an integer`);let q=nq.get($.id)??[];if(q.some((Z)=>Z.version===$.version))throw Error(`register: provider ${$.id}@${$.version} already registered`);q.push($),nq.set($.id,q)}function v$($,q){if(typeof $!=="string"||$.length===0)throw Error("resolve: id is required");let Z=nq.get($);if(!Z||Z.length===0)throw Error(`resolve: provider "${$}" is not registered`);let Q=Z.filter((X)=>n2(X.version,q));if(Q.length===0){let X=Z.map((z)=>z.version).join(", ");throw Error(`resolve: no version of "${$}" satisfies "${q}" (have: ${X})`)}return Q.sort((X,z)=>G$(D0(z.version),D0(X.version))),Q[0]}function p8(){let $=[];for(let q of nq.values())for(let Z of q)$.push(Z);return $}import{stat as oH}from"fs/promises";var d8="quality",c8="1.0.0",l8=1;function aH($){return $.topSuggestions.map((q)=>({severity:"info",message:q}))}function sH($){return $.categories.map((q)=>({id:q.id,name:q.name,score:q.score,max:q.max}))}var n8={id:d8,version:c8,schemaVersion:l8,description:"Static linter for SKILL.md structure, description, and safety.",async applicable($){try{if(!(await oH($.skillMdPath)).isFile())return{ok:!1,reason:`${$.skillMdPath} is not a file`};return{ok:!0}}catch{return{ok:!1,reason:`SKILL.md not found at ${$.skillMdPath}`}}},async run($,q){let Z=await k8($.skillPath);return{providerId:d8,providerVersion:c8,schemaVersion:l8,score:Z.overallScore,passed:Z.grade!=="F",categories:sH(Z),findings:aH(Z),raw:Z,startedAt:"",durationMs:0}}};import{stat as GV}from"fs/promises";import{join as YV}from"path";async function i8($){if(!$)return"";let q=$.getReader(),Z=[];while(!0){let{value:J,done:G}=await q.read();if(G)break;if(J)Z.push(J)}let Q=Z.reduce((J,G)=>J+G.byteLength,0),X=new Uint8Array(Q),z=0;for(let J of Z)X.set(J,z),z+=J.byteLength;return new TextDecoder("utf-8").decode(X)}var iq=async($,q={})=>{let Z={...process.env,...q.env??{}};return typeof globalThis.Bun<"u"?tH($,q,Z):rH($,q,Z)};async function tH($,q,Z){let Q=Bun.spawn($,{cwd:q.cwd,env:Z,stdout:"pipe",stderr:"pipe"}),X=!1,z=!1,J=null;if(typeof q.timeoutMs==="number"&&q.timeoutMs>0)J=setTimeout(()=>{X=!0;try{Q.kill("SIGTERM")}catch{}},q.timeoutMs);let G=()=>{z=!0;try{Q.kill("SIGTERM")}catch{}};if(q.signal)if(q.signal.aborted)G();else q.signal.addEventListener("abort",G,{once:!0});try{let[Y,U,V]=await Promise.all([i8(Q.stdout),i8(Q.stderr),Q.exited]);return{exitCode:typeof V==="number"?V:null,stdout:Y,stderr:U,timedOut:X,aborted:z}}finally{if(J)clearTimeout(J);if(q.signal)q.signal.removeEventListener("abort",G)}}async function rH($,q,Z){let{spawn:Q}=await import("child_process"),[X,...z]=$;if(!X)return{exitCode:null,stdout:"",stderr:"empty argv",timedOut:!1,aborted:!1};let J=Q(X,z,{cwd:q.cwd,env:Z,stdio:["ignore","pipe","pipe"]}),G=!1,Y=!1,U=null;if(typeof q.timeoutMs==="number"&&q.timeoutMs>0)U=setTimeout(()=>{G=!0;try{J.kill("SIGTERM")}catch{}},q.timeoutMs);let V=()=>{Y=!0;try{J.kill("SIGTERM")}catch{}};if(q.signal)if(q.signal.aborted)V();else q.signal.addEventListener("abort",V,{once:!0});let H=new TextDecoder("utf-8"),K=new TextDecoder("utf-8"),_="",L="";J.stdout?.on("data",(B)=>{_+=typeof B==="string"?B:H.decode(B,{stream:!0})}),J.stderr?.on("data",(B)=>{L+=typeof B==="string"?B:K.decode(B,{stream:!0})});try{return await new Promise((F,O)=>{J.on("error",(A)=>{J.stdout?.removeAllListeners("data"),J.stderr?.removeAllListeners("data"),O(A)}),J.on("close",(A)=>{_+=H.decode(),L+=K.decode(),F({exitCode:A,stdout:_,stderr:L,timedOut:G,aborted:Y})})})}finally{if(U)clearTimeout(U);if(q.signal)q.signal.removeEventListener("abort",V)}}function eH($){if(typeof $!=="number"||!Number.isFinite($))return 0;let q=Math.round($*100);if(q<0)return 0;if(q>100)return 100;return q}function $V($){return $.split(/[-_]+/).map((q)=>q.length>0?q[0].toUpperCase()+q.slice(1):"").join(" ")}function qV($,q){let Z=typeof $.id==="string"&&$.id.length>0?$.id:`task-${q+1}`,Q=$V(Z);if(typeof $.passing==="number"&&typeof $.trials==="number"&&$.trials>0)return{id:Z,name:Q,score:Math.max(0,Math.min($.passing,$.trials)),max:$.trials};let X=typeof $.passRate==="number"?$.passRate:0;return{id:Z,name:Q,score:Math.max(0,Math.min(10,Math.round(X*10))),max:10}}function ZV($){let q=[];for(let Z of $){let Q=typeof Z.id==="string"?Z.id:void 0,X=Array.isArray(Z.graders)?Z.graders:[];if(X.length===0){q.push({severity:Z.passed===!1?"warning":"info",message:`task ${Q??"(unnamed)"} ${Z.passed===!1?"failed":"passed"}`,categoryId:Q});continue}for(let z of X){let J=typeof z.message==="string"&&z.message.length>0?z.message:`grader ${z.id??"(unnamed)"} ${z.passed?"passed":"failed"}`;q.push({severity:z.passed===!1?"warning":"info",message:J,categoryId:Q,code:typeof z.id==="string"?`grader:${z.id}`:void 0})}}return q}function o8($,q){let Z=$&&typeof $==="object"?$:{},Q=Array.isArray(Z.tasks)?Z.tasks:[],X=Q.map(qV),z=ZV(Q),J=eH(Z.passRate),G;if(typeof Z.passed==="boolean")G=Z.passed;else if(typeof Z.passRate==="number")G=Z.passRate>=q.thresholdFraction;else G=!1;return{providerId:q.providerId,providerVersion:q.providerVersion,schemaVersion:q.schemaVersion,score:J,passed:G,categories:X,findings:z,raw:Z,startedAt:"",durationMs:0}}var QV=/^(>=|<=|>|<|=)(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)$/;function XV($){let q=QV.exec($);if(!q)return null;let[,Z,Q]=q,X=D0(Q);if(!X)return null;return{op:Z,major:X.major,minor:X.minor,patch:X.patch,prerelease:X.prerelease}}function zV($,q){if(!$)return!1;let Z=G$($,{major:q.major,minor:q.minor,patch:q.patch,prerelease:q.prerelease});switch(q.op){case">=":return Z>=0;case">":return Z>0;case"<=":return Z<=0;case"<":return Z<0;case"=":return Z===0}}function a8($,q){if(!q||q.trim().length===0)return!0;let Z=q.trim();if(Z==="*"||Z==="x"||Z==="X")return!0;let Q=D0($);if(!Q)return!1;let X=Z.split(/\s+/);for(let z of X){if(z.length===0)continue;let J=XV(z);if(J){if(!zV(Q,J))return!1;continue}try{if(!n2($,z))return!1;continue}catch{throw Error(`invalid externalRequires range clause: ${JSON.stringify(z)} in ${JSON.stringify(q)}`)}}return!0}import{createRequire as JV}from"module";function s8($=import.meta.url){try{return JV($).resolve("skillgrade/bin/skillgrade.js")}catch{return null}}function oq($){return[$.headline,""," Fix options:"," 1. Reinstall agent-skill-manager (bundles skillgrade):"," npm install -g agent-skill-manager"," 2. Install skillgrade manually:"," npm install -g skillgrade"," 3. Point ASM_SKILLGRADE_BIN at a local skillgrade binary:"," export ASM_SKILLGRADE_BIN=/path/to/skillgrade",""," Docs: https://github.com/luongnv89/agent-skill-manager/blob/main/docs/skillgrade-integration.md#troubleshooting",""," Then re-run:",` asm eval ${$.skillPath} ${$.rerunArgs}`].join(`
|
|
231
|
+
`)}var o2="skillgrade",a2="1.0.0",s2=1,UV=">=0.1.3 <0.3.0",WV=0.8,HV="smoke",VV="docker",KV=async($)=>{try{return(await GV($)).isFile()}catch{return!1}};function g$($,q){return{providerId:o2,providerVersion:a2,schemaVersion:s2,score:0,passed:!1,categories:[],findings:[$],raw:q,startedAt:"",durationMs:0}}function BV($){let q=$.toLowerCase();if(q.includes("api key")||q.includes("anthropic_api_key")||q.includes("openai_api_key")||q.includes("unauthorized")||q.includes("401"))return{code:"missing-api-key",hint:"set ANTHROPIC_API_KEY or OPENAI_API_KEY in your environment"};if(q.includes("docker")&&(q.includes("not found")||q.includes("cannot connect")||q.includes("unavailable")||q.includes("is not running")))return{code:"docker-unavailable",hint:"start Docker or pass --provider local"};return{code:"skillgrade-nonzero-exit",hint:"check skillgrade logs above for details"}}async function _V($,q,Z){let Q;try{Q=await $([q,"--version"],{timeoutMs:5000,signal:Z})}catch{return null}if(Q.exitCode!==0)return null;let X=`${Q.stdout}
|
|
232
|
+
${Q.stderr}`,z=/(?:^|[^\w.-])v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)(?=$|[^\w.-])/m.exec(X);return z?z[1]:null}function LV($){return YV($.skillPath,"eval.yaml")}function FV($,q){return[$,"run","--ci","--threshold",String(q.thresholdFraction),"--preset",q.preset,"--provider",q.provider,"--json"]}function OV($){let q=typeof $.threshold==="number"&&Number.isFinite($.threshold)?$.threshold>1?$.threshold/100:$.threshold:WV,Z=$.preset==="smoke"||$.preset==="reliable"||$.preset==="regression"?$.preset:HV,Q=$.provider==="docker"||$.provider==="local"?$.provider:VV;return{thresholdFraction:q,preset:Z,provider:Q}}function AV($={}){let q=$.spawn??iq,Z=$.fileExists??KV,Q=$.binary??"skillgrade",X=$.externalRequires??UV;return{id:o2,version:a2,schemaVersion:s2,description:"Runtime eval via skillgrade: runs task prompts through LLM judges and computes a pass rate.",externalRequires:{binary:Q,semverRange:X,installHint:"skillgrade ships with agent-skill-manager — reinstall (npm install -g agent-skill-manager) or install skillgrade manually (npm install -g skillgrade)"},async applicable(z,J){let G=await _V(q,Q,J.signal);if(G===null)return{ok:!1,reason:oq({headline:`${Q} not installed or unreachable`,skillPath:z.skillPath,rerunArgs:"--runtime"})};try{if(!a8(G,X))return{ok:!1,reason:`${Q} ${G} is outside required range "${X}" — upgrade or downgrade the binary`}}catch(U){return{ok:!1,reason:`invalid externalRequires "${X}": ${U?.message??String(U)}`}}let Y=LV(z);if(!await Z(Y))return{ok:!1,reason:`no eval.yaml at ${Y} — run: asm eval ${z.skillPath} --runtime init`};return{ok:!0}},async run(z,J){let G=OV(J),Y=FV(Q,G),U={cwd:z.skillPath,signal:J.signal};if(typeof J.timeoutMs==="number"&&J.timeoutMs>0)U.timeoutMs=J.timeoutMs;let V;try{V=await q(Y,U)}catch(K){return g$({severity:"error",message:`failed to spawn ${Q}: ${K?.message??String(K)}`,code:K?.code==="ENOENT"?"binary-missing":"spawn-failed"})}if(V.timedOut)return g$({severity:"error",message:"skillgrade run timed out",code:"timeout"});if(V.aborted)return g$({severity:"error",message:"skillgrade run aborted",code:"aborted"});if(V.exitCode!==0){let{code:K,hint:_}=BV(V.stderr),L=V.stderr.trim().slice(0,2000);return g$({severity:"error",message:`skillgrade exited ${V.exitCode}: ${_}${L.length>0?`
|
|
233
|
+
${L}`:""}`,code:K},{exitCode:V.exitCode,stderr:V.stderr})}let H;try{H=JSON.parse(V.stdout)}catch(K){return g$({severity:"error",message:`skillgrade stdout was not valid JSON: ${K?.message??String(K)}`,code:"skillgrade-bad-json"},{stdout:V.stdout,stderr:V.stderr})}return o8(H,{providerId:o2,providerVersion:a2,schemaVersion:s2,thresholdFraction:G.thresholdFraction})}}}function aq(){let $=process.env.ASM_SKILLGRADE_BIN?.trim();if($)return $;let q=s8();if(q!==null)return q;return}var t8=aq(),r8=AV(t8!==void 0?{binary:t8}:{});function e8(){i2(n8),i2(r8)}import{readFile as TV}from"fs/promises";import{join as IV}from"path";import{homedir as MV}from"os";function t2(){return{defaults:{threshold:70,timeoutMs:60000},providers:{}}}function jV(){return IV(MV(),".asm","config.yml")}async function r2($=jV()){let q;try{q=await TV($,"utf-8")}catch(Q){if(Q?.code==="ENOENT")return t2();throw Q}if(q.trim().length===0)return t2();let Z=x$(q);return NV(Z)}function NV($){let q=t2();if(!$||typeof $!=="object")return q;let Q=$.eval;if(!Q||typeof Q!=="object")return q;let X=Q,z={defaults:{threshold:q.defaults.threshold,timeoutMs:q.defaults.timeoutMs},providers:{}},J=X.defaults;if(J&&typeof J==="object"){let Y=J;if(typeof Y.threshold==="number"&&Number.isFinite(Y.threshold))z.defaults.threshold=Y.threshold;if(typeof Y.timeoutMs==="number"&&Number.isFinite(Y.timeoutMs))z.defaults.timeoutMs=Y.timeoutMs}let G=X.providers;if(G&&typeof G==="object"&&!Array.isArray(G)){for(let[Y,U]of Object.entries(G))if(U&&typeof U==="object"&&!Array.isArray(U))z.providers[Y]={...U}}return z}var DV="skillgrade",RV=30000;async function e2($){let q=$.spawn??iq,Z=$.binary??DV,Q=$.timeoutMs??RV,X;try{X=await q([Z,"init"],{cwd:$.skillPath,timeoutMs:Q,signal:$.signal})}catch(z){return{ok:!1,message:z?.code==="ENOENT"?oq({headline:`${Z} not installed`,skillPath:$.skillPath,rerunArgs:"--runtime init"}):`failed to spawn ${Z}: ${z?.message??String(z)}`,exitCode:null,stdout:"",stderr:z?.message??String(z)}}if(X.timedOut)return{ok:!1,message:`${Z} init timed out after ${Q}ms`,exitCode:X.exitCode,stdout:X.stdout,stderr:X.stderr};if(X.aborted)return{ok:!1,message:`${Z} init aborted`,exitCode:X.exitCode,stdout:X.stdout,stderr:X.stderr};if(X.exitCode!==0){let z=X.stderr.trim().length>0?X.stderr.trim():X.stdout.trim().length>0?X.stdout.trim():"no stderr output";return{ok:!1,message:`${Z} init failed (exit ${X.exitCode}): ${z}`,exitCode:X.exitCode,stdout:X.stdout,stderr:X.stderr}}return{ok:!0,message:`eval.yaml scaffolded in ${$.skillPath}`,exitCode:0,stdout:X.stdout,stderr:X.stderr}}var wV={bold:($)=>$,dim:($)=>$,red:($)=>$,green:($)=>$,yellow:($)=>$,cyan:($)=>$},PV={bold:($)=>`\x1B[1m${$}\x1B[0m`,dim:($)=>`\x1B[2m${$}\x1B[0m`,red:($)=>`\x1B[31m${$}\x1B[0m`,green:($)=>`\x1B[32m${$}\x1B[0m`,yellow:($)=>`\x1B[33m${$}\x1B[0m`,cyan:($)=>`\x1B[36m${$}\x1B[0m`};function sq($){if($>0)return`+${$}`;if($<0)return`${$}`;return"±0"}function tq($){return $.code?`code:${$.code}`:`msg:${$.message}`}function CV($,q){let Z=new Set($.map(tq)),Q=new Set(q.map(tq)),X=$.filter((J)=>!Q.has(tq(J)));return{added:q.filter((J)=>!Z.has(tq(J))),removed:X}}function EV($,q){let Z=new Map($.map((G)=>[G.id,G])),Q=new Map(q.map((G)=>[G.id,G])),X=[];for(let[G,Y]of Z){let U=Q.get(G);if(!U)continue;if(Y.score!==U.score||Y.max!==U.max)X.push({id:G,name:U.name,beforeScore:Y.score,afterScore:U.score,beforeMax:Y.max,afterMax:U.max})}let z=q.filter((G)=>!Z.has(G.id)),J=$.filter((G)=>!Q.has(G.id));return{changed:X,added:z,removed:J}}function $Z($){return`${$.providerId}@${$.providerVersion}`}function qZ($,q,Z){let Q=$.severity==="error"?Z.red("error"):$.severity==="warning"?Z.yellow("warn"):Z.dim("info"),X=$.code?` (${Z.dim($.code)})`:"";return` ${q} [${Q}]${X} ${$.message}`}function QZ($,q,Z={}){let Q=Z.useColor===!1?wV:PV,X=Z.beforeLabel??$Z($),z=Z.afterLabel??$Z(q),J=[];if(J.push(Q.bold("Compare: ")+`${X} → ${z}`),$.schemaVersion!==q.schemaVersion)J.push(Q.yellow(` ! schema version mismatch: ${$.schemaVersion} → ${q.schemaVersion}`));J.push("");let G=q.score-$.score,Y=sq(G),U=G>0?Q.green(Y):G<0?Q.red(Y):Q.dim(Y);if(J.push(`${Q.bold("Score:")} ${$.score}/100 → ${q.score}/100 (${U})`),$.passed!==q.passed){let _=$.passed?Q.green("PASS"):Q.red("FAIL"),L=q.passed?Q.green("PASS"):Q.red("FAIL"),B=q.passed?Q.green("(regression fixed)"):Q.red("(regression introduced)");J.push(`${Q.bold("Verdict:")} ${_} → ${L} ${B}`)}else{let _=q.passed?Q.green("PASS"):Q.red("FAIL");J.push(`${Q.bold("Verdict:")} ${_} (unchanged)`)}if($.durationMs>0||q.durationMs>0)J.push(Q.dim(` duration: ${$.durationMs}ms → ${q.durationMs}ms`));let V=EV($.categories,q.categories);if(V.changed.length>0||V.added.length>0||V.removed.length>0){J.push(""),J.push(Q.bold("Categories:"));for(let _ of V.changed){let L=_.afterScore-_.beforeScore,B=L>0?Q.green(sq(L)):L<0?Q.red(sq(L)):Q.dim(sq(L));J.push(` ${_.name} (${Q.dim(_.id)}): ${_.beforeScore}/${_.beforeMax} → ${_.afterScore}/${_.afterMax} (${B})`)}for(let _ of V.added)J.push(` ${Q.green("+")} ${_.name} (${Q.dim(_.id)}): ${_.score}/${_.max} ${Q.green("(new)")}`);for(let _ of V.removed)J.push(` ${Q.red("-")} ${_.name} (${Q.dim(_.id)}): ${_.score}/${_.max} ${Q.red("(removed)")}`)}let H=CV($.findings,q.findings);if(H.added.length>0||H.removed.length>0){J.push(""),J.push(Q.bold("Findings:"));for(let _ of H.removed)J.push(qZ(_,Q.red("-"),Q));for(let _ of H.added)J.push(qZ(_,Q.green("+"),Q))}if(G===0&&$.passed===q.passed&&$.schemaVersion===q.schemaVersion&&V.changed.length===0&&V.added.length===0&&V.removed.length===0&&H.added.length===0&&H.removed.length===0)J.push(""),J.push(Q.dim("No differences between versions."));return J.join(`
|
|
234
|
+
`)}function XZ($){if(typeof $!=="string"||$.trim().length===0)throw Error('--compare requires two provider specs (e.g. "quality@1.0.0,quality@1.0.0")');let q=$.split(",").map((X)=>X.trim()).filter((X)=>X.length>0);if(q.length!==2)throw Error(`--compare requires exactly two specs separated by a comma (got ${q.length})`);let Z=ZZ(q[0],!0),Q=ZZ(q[1],!1,Z.id);return[Z,Q]}function ZZ($,q,Z){let Q=$.indexOf("@");if(Q<0){if(q||!Z)throw Error(`--compare spec "${$}" must be of the form id@version`);return{id:Z,version:$}}let X=$.slice(0,Q).trim(),z=$.slice(Q+1).trim();if(X.length===0||z.length===0)throw Error(`--compare spec "${$}" must be of the form id@version with both id and version`);return{id:X,version:z}}var o={SKILL_NOT_FOUND:"SKILL_NOT_FOUND",AUDIT_FAILED:"AUDIT_FAILED",INSTALL_FAILED:"INSTALL_FAILED",PUBLISH_FAILED:"PUBLISH_FAILED",NETWORK_ERROR:"NETWORK_ERROR",INVALID_ARGUMENT:"INVALID_ARGUMENT",UNKNOWN_ERROR:"UNKNOWN_ERROR"};function u0(){let{log:$,info:q}=console,Z=(...Q)=>process.stderr.write(Q.map(String).join(" ")+`
|
|
235
|
+
`);return console.log=Z,console.info=Z,()=>{console.log=$,console.info=q}}function JZ($){return{timestamp:new Date().toISOString(),asm_version:zZ,duration_ms:Math.round(performance.now()-$)}}function d($,q,Z){let Q={version:1,command:$,status:"ok",data:q,meta:JZ(Z)},X=process.stdout.isTTY?2:0;return JSON.stringify(Q,null,X)}function a($,q,Z,Q,X){let z={version:1,command:$,status:"error",error:{code:q,message:Z,...X!==void 0?{details:X}:{}},meta:JZ(Q)},J=process.stdout.isTTY?2:0;return JSON.stringify(z,null,J)}import{writeFile as dV,mkdir as cV,unlink as lV,readFile as nV}from"fs/promises";import{join as q4}from"path";import{readdir as SV,readFile as bV}from"fs/promises";import{join as xV}from"path";function $4($){let q=new Set,Z=$.toLowerCase().split(/[\s\-_.,;:()[\]{}"']+/);for(let Q of Z)if(Q.length>=2)q.add(Q);return q}var yV=10,kV=5,fV=3,hV=1;function vV($,q){let Z=$4($),Q=$4(q.name),X=$4(q.description),z=0;for(let J of Z){if(Q.has(J))z+=yV;if(X.has(J))z+=fV;if(q.name.toLowerCase().includes(J))z+=kV;if(q.description.toLowerCase().includes(J))z+=hV}return z}async function GZ($){let q=new Map,Z;try{Z=await SV($)}catch{return q}for(let Q of Z){if(!Q.endsWith(".json"))continue;let X=xV($,Q);try{let z=await bV(X,"utf-8"),J=JSON.parse(z);for(let G of J.skills){if(!("license"in G))G.license="";if(!("creator"in G))G.creator="";if(!("compatibility"in G))G.compatibility="";if(!("allowedTools"in G))G.allowedTools=[];if(!("verified"in G))G.verified=!1}q.set(`${J.owner}/${J.repo}`,J)}catch{}}return q}async function rq(){let $=await GZ(WZ()),q=await GZ(u$()),Z=new Map($);for(let[Q,X]of q)Z.set(Q,X);return Array.from(Z.values())}var gV=["license","creator","version"];function YZ($){return gV.includes($)}function UZ($,q){return $[q]||""}function uV($,q){if(q.has)for(let Z of q.has){if(!YZ(Z))continue;if(!UZ($,Z))return!1}if(q.missing)for(let Z of q.missing){if(!YZ(Z))continue;if(UZ($,Z))return!1}return!0}function HZ($){let q=[];if(!$.license)q.push("license");if(!$.creator)q.push("creator");if(!$.version||$.version==="0.0.0")q.push("version");return q}async function eq($,q=20,Z){let Q=await rq(),X=[],z=!$&&Z;for(let J of Q)for(let G of J.skills){if(Z&&!uV(G,Z))continue;let Y=z?1:vV($,G);if(Y>0)X.push({skill:G,repo:{owner:J.owner,repo:J.repo},score:Y})}return X.sort((J,G)=>G.score-J.score),X.slice(0,q)}async function VZ(){return(await rq()).reduce((q,Z)=>q+Z.skillCount,0)}var mV=[{label:"obfuscation:atob",pattern:/\batob\s*\(/},{label:"obfuscation:base64",pattern:/(?:^|[=:\s])[A-Za-z0-9+/]{40,}={1,2}(?:\s|$)/m},{label:"obfuscation:hex-escape",pattern:/\\x[0-9a-fA-F]{2}(?:\\x[0-9a-fA-F]{2}){3,}/},{label:"credential-leak:api-key",pattern:/\bAPI_KEY\s*=\s*['"][^'"]+['"]/},{label:"credential-leak:secret",pattern:/\bSECRET_KEY\s*=\s*['"][^'"]+['"]/},{label:"credential-leak:password",pattern:/\bPASSWORD\s*=\s*['"][^'"]+['"]/}];function KZ($,q){let Z=[];if(!$.name||!$.name.trim())Z.push("missing frontmatter field: name");if(!$.description||!$.description.trim())Z.push("missing frontmatter field: description");if(pV(q).trim().length<20)Z.push("SKILL.md body too short (less than 20 chars of instructions)");for(let{label:X,pattern:z}of mV)if(z.test(q))Z.push(`malicious pattern detected: ${X}`);return{verified:Z.length===0,reasons:Z}}function pV($){let q=$.trimStart();if(!q.startsWith("---"))return q;let Z=q.indexOf(`
|
|
236
|
+
---`,3);if(Z===-1)return"";return q.slice(Z+4)}async function iV(){let $=u$();return await cV($,{recursive:!0}),$}async function BZ($){await l0();let q;try{q=c0($)}catch(Q){return{success:!1,repoIndex:null,error:Q.message}}if(q.isLocal)return{success:!1,repoIndex:null,error:"Local paths are not supported for indexing. Use a GitHub source instead."};E(`ingester: cloning ${q.owner}/${q.repo}`);let Z=null;try{Z=await n0(q),E(`ingester: discovering skills in ${Z}`);let Q=await o$(Z);E(`ingester: found ${Q.length} skills`);let X=[];for(let Y of Q){let U=q4(Z,Y.relPath,"SKILL.md"),V="";try{V=await nV(U,"utf-8")}catch{E(`ingester: could not read SKILL.md at ${U}`)}let H=KZ(Y,V);if(!H.verified)E(`ingester: ${Y.name} not verified: ${H.reasons.join(", ")}`);X.push({name:Y.name,description:Y.description,version:Y.version,license:Y.license,creator:Y.creator,compatibility:Y.compatibility,allowedTools:Y.allowedTools,installUrl:`github:${q.owner}/${q.repo}${q.ref?`#${q.ref}`:""}${Y.relPath?`:${Y.relPath}`:""}`,relPath:Y.relPath,verified:H.verified})}let z={repoUrl:q.cloneUrl,owner:q.owner,repo:q.repo,updatedAt:new Date().toISOString(),skillCount:X.length,skills:X},J=await iV(),G=q4(J,`${q.owner}_${q.repo}.json`);return await dV(G,JSON.stringify(z,null,2)+`
|
|
237
|
+
`,"utf-8"),E(`ingester: wrote index to ${G}`),{success:!0,repoIndex:z}}catch(Q){return{success:!1,repoIndex:null,error:Q.message}}finally{if(Z)await Q0(Z)}}async function _Z(){return(await rq()).map((q)=>({owner:q.owner,repo:q.repo,skillCount:q.skillCount,updatedAt:q.updatedAt})).sort((q,Z)=>Z.skillCount-q.skillCount)}async function LZ($,q){let Z=u$(),Q=q4(Z,`${$}_${q}.json`);try{return await lV(Q),!0}catch{return!1}}import{join as oV}from"path";function aV($){switch($){case"dangerous":return 3;case"warning":return 2;case"caution":return 1;default:return 0}}function G4($){return{verdict:$.every((q)=>q.verdict==="safe")?"safe":$.some((q)=>q.verdict==="dangerous")?"dangerous":"warning",findings:$.map((q)=>({skill:q.skillName,verdict:q.verdict,verdict_reason:q.verdictReason,total_files:q.totalFiles,total_lines:q.totalLines})),risk_score:$.reduce((q,Z)=>q+aV(Z.verdict),0)}}function sV($){let q=$.slice(2),Z={command:null,subcommand:null,positional:[],flags:{help:!1,version:!1,json:!1,yes:!1,noColor:!1,scope:"both",sort:"name",provider:null,name:null,force:!1,path:null,all:!1,verbose:!1,flat:!1,transport:"auto",method:"default",installed:!1,available:!1,has:[],missing:[],dryRun:!1,machine:!1,noCache:!1,fix:!1,runtime:!1,preset:null,threshold:null,compare:null}},Q=0;while(Q<q.length){let X=q[Q];if(X==="--help"||X==="-h")Z.flags.help=!0;else if(X==="--version"||X==="-v")Z.flags.version=!0;else if(X==="--json")Z.flags.json=!0;else if(X==="--yes"||X==="-y")Z.flags.yes=!0;else if(X==="--no-color")Z.flags.noColor=!0;else if(X==="--scope"||X==="-s"){Q++;let z=q[Q];if(z==="global"||z==="project"||z==="both")Z.flags.scope=z;else w(`Invalid scope: "${z}". Must be global, project, or both.`),process.exit(2)}else if(X==="--sort"){Q++;let z=q[Q];if(z==="name"||z==="version"||z==="location")Z.flags.sort=z;else w(`Invalid sort: "${z}". Must be name, version, or location.`),process.exit(2)}else if(X==="--provider"||X==="-p"||X==="--tool")Q++,Z.flags.provider=q[Q]||null;else if(X==="--name")Q++,Z.flags.name=q[Q]||null;else if(X==="--force"||X==="-f")Z.flags.force=!0;else if(X==="--path")Q++,Z.flags.path=q[Q]||null;else if(X==="--all")Z.flags.all=!0;else if(X==="--verbose"||X==="-V")Z.flags.verbose=!0;else if(X==="--flat")Z.flags.flat=!0;else if(X==="--installed")Z.flags.installed=!0;else if(X==="--available")Z.flags.available=!0;else if(X==="--transport"||X==="-t"){Q++;let z=q[Q];if(z==="https"||z==="ssh"||z==="auto")Z.flags.transport=z;else w(`Invalid transport: "${z}". Must be https, ssh, or auto.`),process.exit(2)}else if(X==="--method"||X==="-m"){Q++;let z=q[Q];if(z==="default"||z==="vercel")Z.flags.method=z;else w(`Invalid method: "${z}". Must be default or vercel.`),process.exit(2)}else if(X==="--skill")Q++,Z.flags.path=q[Q]||null;else if(X==="--dry-run")Z.flags.dryRun=!0;else if(X==="--fix")Z.flags.fix=!0;else if(X==="--machine")Z.flags.machine=!0;else if(X==="--no-cache")Z.flags.noCache=!0;else if(X==="--has"){if(Q++,q[Q])Z.flags.has.push(q[Q])}else if(X==="--missing"){if(Q++,q[Q])Z.flags.missing.push(q[Q])}else if(X==="--runtime")Z.flags.runtime=!0;else if(X==="--preset")Q++,Z.flags.preset=q[Q]||null;else if(X==="--threshold"){Q++;let z=q[Q];if(z===void 0)w("--threshold requires a numeric value"),process.exit(2);let J=Number(z);if(!Number.isFinite(J))w(`Invalid --threshold: "${z}". Must be a number (e.g. 0.8 or 80).`),process.exit(2);Z.flags.threshold=J}else if(X==="--compare")Q++,Z.flags.compare=q[Q]||null;else if(X.startsWith("-"))w(`Unknown option: ${X}`),console.error('Run "asm --help" for usage.'),process.exit(2);else if(!Z.command)Z.command=X;else if(!Z.subcommand)Z.subcommand=X;else Z.positional.push(X);Q++}return Z}function w($){console.error(W.red(`Error: ${$}`))}function tV(){console.log(`${W.blueBold("agent-skill-manager")} (${W.bold("asm")}) ${J4}
|
|
237
238
|
|
|
238
239
|
Interactive TUI and CLI for managing installed skills for AI coding agents.
|
|
239
240
|
|
|
@@ -278,7 +279,7 @@ ${W.bold("Global Options:")}
|
|
|
278
279
|
--sort <field> Sort by: name, version, or location (default: name)
|
|
279
280
|
--flat Show one row per tool instance (list, search)
|
|
280
281
|
-y, --yes Skip confirmation prompts
|
|
281
|
-
-V, --verbose Show debug output`)}function
|
|
282
|
+
-V, --verbose Show debug output`)}function rV(){console.log(`${W.bold("Usage:")} asm list [options]
|
|
282
283
|
|
|
283
284
|
List all discovered skills. By default, skills installed across multiple
|
|
284
285
|
tools are grouped into a single row with tool badges.
|
|
@@ -300,7 +301,7 @@ ${W.bold("Examples:")}
|
|
|
300
301
|
asm list -s project ${W.dim("Only project-scoped skills")}
|
|
301
302
|
asm list --sort version ${W.dim("Sort by version")}
|
|
302
303
|
asm list --json ${W.dim("Output as JSON")}
|
|
303
|
-
asm list --machine ${W.dim("Machine-readable v1 envelope output")}`)}function
|
|
304
|
+
asm list --machine ${W.dim("Machine-readable v1 envelope output")}`)}function eV(){console.log(`${W.bold("Usage:")} asm search <query> [options]
|
|
304
305
|
|
|
305
306
|
Search both installed skills and the skill index. Results show installation
|
|
306
307
|
status and include copy-paste install commands for available skills.
|
|
@@ -323,7 +324,7 @@ ${W.bold("Examples:")}
|
|
|
323
324
|
asm search "test" --installed ${W.dim("Search installed skills only")}
|
|
324
325
|
asm search "test" --available ${W.dim("Search available skills only")}
|
|
325
326
|
asm search openspec --json ${W.dim("Output matches as JSON")}
|
|
326
|
-
asm search openspec --machine ${W.dim("Machine-readable v1 envelope output")}`)}function
|
|
327
|
+
asm search openspec --machine ${W.dim("Machine-readable v1 envelope output")}`)}function $K(){console.log(`${W.bold("Usage:")} asm inspect <skill-name> [options]
|
|
327
328
|
|
|
328
329
|
Show detailed information for a skill. The <skill-name> is the directory name.
|
|
329
330
|
Shows version, description, file count, and all provider installations.
|
|
@@ -337,7 +338,7 @@ ${W.bold("Options:")}
|
|
|
337
338
|
${W.bold("Examples:")}
|
|
338
339
|
asm inspect code-review ${W.dim("Show details for code-review")}
|
|
339
340
|
asm inspect code-review --json ${W.dim("Output as JSON")}
|
|
340
|
-
asm inspect code-review -s global ${W.dim("Global installations only")}`)}function
|
|
341
|
+
asm inspect code-review -s global ${W.dim("Global installations only")}`)}function qK(){console.log(`${W.bold("Usage:")} asm uninstall <skill-name> [options]
|
|
341
342
|
|
|
342
343
|
Remove a skill and its associated rule files. Shows a removal plan
|
|
343
344
|
before proceeding and asks for confirmation.
|
|
@@ -351,7 +352,7 @@ ${W.bold("Options:")}
|
|
|
351
352
|
${W.bold("Examples:")}
|
|
352
353
|
asm uninstall code-review ${W.dim("Remove with confirmation")}
|
|
353
354
|
asm uninstall code-review -y ${W.dim("Remove without confirmation")}
|
|
354
|
-
asm uninstall code-review -s project ${W.dim("Remove project copy only")}`)}function
|
|
355
|
+
asm uninstall code-review -s project ${W.dim("Remove project copy only")}`)}function ZK(){console.log(`${W.bold("Usage:")} asm audit [subcommand] [options]
|
|
355
356
|
|
|
356
357
|
Detect duplicate skills or run security audits on installed/remote skills.
|
|
357
358
|
|
|
@@ -377,7 +378,7 @@ ${W.bold("Examples:")}
|
|
|
377
378
|
asm audit security code-review --json ${W.dim("Output audit as JSON")}
|
|
378
379
|
asm audit security code-review --machine ${W.dim("Machine-readable v1 envelope output")}
|
|
379
380
|
asm audit security https://github.com/user/skills/tree/main/skills/agent-config
|
|
380
|
-
${W.dim("Audit a skill from a subfolder URL")}`)}function
|
|
381
|
+
${W.dim("Audit a skill from a subfolder URL")}`)}function QK(){console.log(`${W.bold("Usage:")} asm publish [path] [options]
|
|
381
382
|
|
|
382
383
|
Validate a skill, run a security audit, generate a registry manifest,
|
|
383
384
|
and open a PR against the asm-registry.
|
|
@@ -400,7 +401,7 @@ ${W.bold("Examples:")}
|
|
|
400
401
|
asm publish --dry-run ${W.dim("Preview manifest without side effects")}
|
|
401
402
|
asm publish --force ${W.dim("Override warning-level security findings")}
|
|
402
403
|
asm publish --json ${W.dim("Output as JSON")}
|
|
403
|
-
asm publish --machine ${W.dim("Machine-readable v1 envelope output")}`)}function
|
|
404
|
+
asm publish --machine ${W.dim("Machine-readable v1 envelope output")}`)}function XK(){console.log(`${W.bold("Usage:")} asm outdated [options]
|
|
404
405
|
|
|
405
406
|
Show which installed skills have newer versions available.
|
|
406
407
|
|
|
@@ -413,7 +414,7 @@ ${W.bold("Options:")}
|
|
|
413
414
|
${W.bold("Examples:")}
|
|
414
415
|
asm outdated ${W.dim("Show outdated skills")}
|
|
415
416
|
asm outdated --json ${W.dim("Output as JSON")}
|
|
416
|
-
asm outdated --machine ${W.dim("Machine-readable output")}`)}function
|
|
417
|
+
asm outdated --machine ${W.dim("Machine-readable output")}`)}function zK(){console.log(`${W.bold("Usage:")} asm update [name...] [options]
|
|
417
418
|
|
|
418
419
|
Update outdated skills to their latest version with security re-audit.
|
|
419
420
|
|
|
@@ -431,7 +432,7 @@ ${W.bold("Examples:")}
|
|
|
431
432
|
asm update ${W.dim("Update all outdated skills")}
|
|
432
433
|
asm update code-review ${W.dim("Update a specific skill")}
|
|
433
434
|
asm update --yes ${W.dim("Skip confirmation prompts")}
|
|
434
|
-
asm update --json ${W.dim("Output as JSON")}`)}function
|
|
435
|
+
asm update --json ${W.dim("Output as JSON")}`)}function JK(){console.log(`${W.bold("Usage:")} asm config <subcommand>
|
|
435
436
|
|
|
436
437
|
Manage configuration. Config is stored at ~/.config/agent-skill-manager/.
|
|
437
438
|
|
|
@@ -447,18 +448,18 @@ ${W.bold("Options:")}
|
|
|
447
448
|
${W.bold("Examples:")}
|
|
448
449
|
asm config show ${W.dim("View current config")}
|
|
449
450
|
asm config edit ${W.dim("Edit in $EDITOR")}
|
|
450
|
-
asm config reset -y ${W.dim("Reset without confirmation")}`)}async function
|
|
451
|
-
${W.yellow(`${J.length} skill${J.length===1?"":"s"} with warnings -- use --json for details`)}`;console.log(z)}else console.log(
|
|
452
|
-
`)),$.flags.flat)console.log(
|
|
453
|
-
${W.bold("Proceed with removal?")} [y/N] `);let G=await q0();if(G.toLowerCase()!=="y"&&G.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let J=await
|
|
451
|
+
asm config reset -y ${W.dim("Reset without confirmation")}`)}async function vZ($){for(let q of $)q.warnings=await x5(q)}async function GK($){if($.flags.help){rV();return}let q=performance.now(),Z=await g(),Q=await i(Z,$.flags.scope);if($.flags.provider&&$.command==="list")Q=Q.filter((z)=>z.provider===$.flags.provider);await vZ(Q);let X=Z4(Q,$.flags.sort);if($.flags.machine){let z=X.map((J)=>({name:J.name,version:J.version,description:J.description,scope:J.scope,provider:J.provider,path:J.path}));console.log(d("list",z,q));return}if($.flags.json)console.log(l(X));else if($.flags.flat){let z=X4(X),J=X.filter((G)=>G.warnings&&G.warnings.length>0);if(J.length>0)z+=`
|
|
452
|
+
${W.yellow(`${J.length} skill${J.length===1?"":"s"} with warnings -- use --json for details`)}`;console.log(z)}else console.log(wZ(X))}async function YK($){if($.flags.help){eV();return}let q=$.flags.machine?u0():void 0,Z=performance.now(),Q=$.subcommand;if(!Q){if($.flags.machine)q?.(),console.log(a("search",o.INVALID_ARGUMENT,"Missing required argument: <query>",Z)),process.exit(2);w("Missing required argument: <query>"),console.error('Run "asm search --help" for usage.'),process.exit(2)}let X=!$.flags.available,z=!$.flags.installed,J=[];if(X){let V=await g(),H=await i(V,$.flags.scope);if($.flags.provider)H=H.filter((_)=>_.provider===$.flags.provider);let K=IZ(H,Q);J=Z4(K,$.flags.sort)}let G=[];if(z){if(G=await eq(Q),J.length>0){let V=new Set(J.map((H)=>H.name.toLowerCase()));G=G.filter((H)=>!V.has(H.skill.name.toLowerCase()))}}if($.flags.machine){q?.();let V=J.map((K)=>({name:K.name,description:K.description,source:"installed",url:null,match_count:1})),H=G.map((K)=>({name:K.skill.name,description:K.skill.description,source:"index",url:K.skill.installUrl,match_count:1}));console.log(d("search",[...V,...H],Z));return}if($.flags.json){let V=J.map((K)=>({name:K.name,description:K.description,version:K.version,scope:K.scope,provider:K.provider,status:"installed"})),H=G.map((K)=>({name:K.skill.name,description:K.skill.description,version:K.skill.version,repo:`${K.repo.owner}/${K.repo.repo}`,installCommand:`asm install ${K.skill.installUrl}`,status:"available"}));console.log(l([...V,...H]));return}let Y=J.length>0,U=G.length>0;if(!Y&&!U){console.error(`No skills matching "${Q}".`),console.error(W.dim("Try ingesting more repos with: asm index ingest <repo>"));return}if(Y)if(console.error(W.bold(`Installed skills matching "${Q}":
|
|
453
|
+
`)),$.flags.flat)console.log(X4(J));else console.log(PZ(J,Q));if(U){if(Y)console.error("");let V=CZ(G.map((H)=>({name:H.skill.name,version:H.skill.version,description:H.skill.description,verified:H.skill.verified,repoLabel:`${H.repo.owner}/${H.repo.repo}`,installUrl:H.skill.installUrl})),Q);console.error(V)}}async function UK($){if($.flags.help){$K();return}let q=$.subcommand;if(!q)w("Missing required argument: <skill-name>"),console.error('Run "asm inspect --help" for usage.'),process.exit(2);let Z=await g(),X=(await i(Z,$.flags.scope)).filter((z)=>z.dirName===q);if(X.length===0)w(`Skill "${q}" not found.`),console.error(W.dim(`Try ${W.bold("asm list")} to see all skills or ${W.bold(`asm search "${q}"`)} to search.`)),process.exit(1);if(await vZ(X),$.flags.json)console.log(l(X.length===1?X[0]:X));else console.log(await EZ(X))}async function WK($){if($.flags.help){qK();return}let q=$.subcommand;if(!q)w("Missing required argument: <skill-name>"),console.error('Run "asm uninstall --help" for usage.'),process.exit(2);let Z=await g(),Q=await i(Z,$.flags.scope),X=jZ(q,Q,Z),z=await NZ(X);if(z.length===0)w(`Skill "${q}" not found or nothing to remove.`),process.exit(1);console.error(W.bold("Removal plan:"));for(let G of z)console.error(` ${W.red("•")} ${RZ(G)}`);if(!$.flags.yes){if(!process.stdin.isTTY)w("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`
|
|
454
|
+
${W.bold("Proceed with removal?")} [y/N] `);let G=await q0();if(G.toLowerCase()!=="y"&&G.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let J=await Q4(X);for(let G of J)console.error(G);try{await bZ(q)}catch{}console.error(W.green(`
|
|
454
455
|
Done.`))}function q0(){return new Promise(($)=>{let q="",Z=!1;function Q(){process.stdin.removeListener("data",z),process.stdin.removeListener("end",J),process.stdin.pause(),clearTimeout(G)}function X(Y){if(Z)return;Z=!0,Q(),$(Y)}function z(Y){if(q+=Y,q.includes(`
|
|
455
|
-
`))X(q.trim())}function J(){X(q.trim())}let G=setTimeout(()=>{X(q.trim())},30000);process.stdin.setEncoding("utf-8"),process.stdin.on("data",z),process.stdin.on("end",J),process.stdin.resume()})}async function
|
|
456
|
-
Auto-removing duplicates...`));for(let J of z.duplicateGroups){let G=
|
|
457
|
-
Done.`))}}async function
|
|
458
|
-
Usage: asm audit security <name|github:owner/repo> [--all]`),process.exit(2)}else if(Z.startsWith("github:")||Z.startsWith("https://github.com/"))await
|
|
459
|
-
`);let J=[];for(let G of z){console.error(` Scanning ${W.bold(G.name)}...`);let Y=await N0(G.realPath,G.name);J.push(Y)}if($.flags.machine)console.log(d("audit security",
|
|
460
|
-
Summary:`)),G.dangerous>0)console.log(` ${W.red(`${G.dangerous} dangerous`)}`);if(G.warning>0)console.log(` ${W.yellow(`${G.warning} warning`)}`);if(G.caution>0)console.log(` ${G.caution} caution`);if(G.safe>0)console.log(` ${W.green(`${G.safe} safe`)}`);console.log("")}}async function
|
|
461
|
-
`);let G=await N0(J.realPath,J.name);if($.flags.machine)console.log(d("audit security",
|
|
456
|
+
`))X(q.trim())}function J(){X(q.trim())}let G=setTimeout(()=>{X(q.trim())},30000);process.stdin.setEncoding("utf-8"),process.stdin.on("data",z),process.stdin.on("end",J),process.stdin.resume()})}async function HK($){if($.flags.help){ZK();return}let q=performance.now(),Z=$.subcommand??"duplicates";if(Z==="security"){await VK($,q);return}if(Z!=="duplicates")w(`Unknown audit subcommand: "${Z}". Use: duplicates, security`),process.exit(2);let Q=await g(),X=await i(Q,"both"),z=z4(X);if($.flags.machine){let J={duplicate_groups:z.duplicateGroups.map((G)=>({name:G.key,count:G.instances.length,instances:G.instances.map((Y)=>({path:Y.path,scope:Y.scope,provider:Y.provider}))})),total_duplicates:z.duplicateGroups.length};console.log(d("audit duplicates",J,q));return}if($.flags.json){console.log(fZ(z));return}if(console.log(kZ(z)),$.flags.yes&&z.duplicateGroups.length>0){console.error(W.bold(`
|
|
457
|
+
Auto-removing duplicates...`));for(let J of z.duplicateGroups){let G=yZ(J.instances),Y=G[0].path;for(let U=1;U<G.length;U++){let V=G[U],H=MZ(V,Q),K=await Q4(H,Y);for(let _ of K)console.error(_)}}console.error(W.green(`
|
|
458
|
+
Done.`))}}async function VK($,q){let Z=$.positional[0];if($.flags.all)await KK($,q);else if(!Z){if($.flags.machine)console.log(a("audit security",o.INVALID_ARGUMENT,"Missing target. Provide a skill name, GitHub source, or use --all.",q)),process.exit(2);w(`Missing target. Provide a skill name, GitHub source, or use --all.
|
|
459
|
+
Usage: asm audit security <name|github:owner/repo> [--all]`),process.exit(2)}else if(Z.startsWith("github:")||Z.startsWith("https://github.com/"))await BK($,Z,q);else await _K($,Z,q)}async function KK($,q){let Z=await g(),Q=await i(Z,$.flags.scope);if(Q.length===0){if($.flags.machine)console.log(d("audit security",[],q));else if($.flags.json)console.log("[]");else console.log("No skills found to audit.");return}let X=new Set,z=Q.filter((G)=>{if(X.has(G.realPath))return!1;return X.add(G.realPath),!0});console.error(`Auditing ${z.length} skill${z.length>1?"s":""}...
|
|
460
|
+
`);let J=[];for(let G of z){console.error(` Scanning ${W.bold(G.name)}...`);let Y=await N0(G.realPath,G.name);J.push(Y)}if($.flags.machine)console.log(d("audit security",G4(J),q));else if($.flags.json)console.log(JSON.stringify(J,null,2));else{for(let Y of J)console.log(uq(Y));let G={safe:0,caution:0,warning:0,dangerous:0};for(let Y of J)G[Y.verdict]++;if(console.log(W.bold(`
|
|
461
|
+
Summary:`)),G.dangerous>0)console.log(` ${W.red(`${G.dangerous} dangerous`)}`);if(G.warning>0)console.log(` ${W.yellow(`${G.warning} warning`)}`);if(G.caution>0)console.log(` ${G.caution} caution`);if(G.safe>0)console.log(` ${W.green(`${G.safe} safe`)}`);console.log("")}}async function BK($,q,Z){let Q=null;try{let X=c0(q);if(X.isLocal)throw Error("Local paths are not supported for remote security audits. Use: asm audit security <installed-skill-name>");await l0(),X=await G9(X),console.error(`Cloning ${q} for audit...`),Q=await n0(X,$.flags.transport);let{join:z}=await import("path"),J=X.subpath?z(Q,X.subpath):Q,{name:G}=await P0(J),Y=await N0(J,G,X.owner,X.repo);if($.flags.machine)console.log(d("audit security",G4([Y]),Z));else if($.flags.json)console.log(b2(Y));else console.log(uq(Y))}catch(X){if($.flags.machine)console.log(a("audit security",o.AUDIT_FAILED,X.message,Z)),process.exit(1);w(X.message),process.exit(1)}finally{if(Q)await Q0(Q)}}async function _K($,q,Z){let Q=await g(),z=(await i(Q,$.flags.scope)).filter((Y)=>Y.dirName===q);if(z.length===0){if($.flags.machine)console.log(a("audit security",o.SKILL_NOT_FOUND,`Skill "${q}" not found.`,Z)),process.exit(1);w(`Skill "${q}" not found. Use "asm list" to see installed skills.`),process.exit(1)}let J=z[0];console.error(`Auditing installed skill: ${W.bold(J.name)}...
|
|
462
|
+
`);let G=await N0(J.realPath,J.name);if($.flags.machine)console.log(d("audit security",G4([G]),Z));else if($.flags.json)console.log(b2(G));else console.log(uq(G))}async function LK($){if($.flags.help){JK();return}let q=$.subcommand;if(!q)w("Missing subcommand. Use: show, path, reset, or edit."),console.error('Run "asm config --help" for usage.'),process.exit(2);switch(q){case"show":{let Z=await g();console.log(l(Z));break}case"path":{console.log(f$());break}case"reset":{if(!$.flags.yes){if(!process.stdin.isTTY)w("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);process.stderr.write(`${W.bold("Reset config to defaults?")} [y/N] `);let Q=await q0();if(Q.toLowerCase()!=="y"&&Q.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let Z=AZ();await TZ(Z),console.error(W.green("Config reset to defaults."));break}case"edit":{let Z=process.env.VISUAL||process.env.EDITOR||"vi",[Q,X]=hZ(Z),z=f$();await g();let{spawn:J}=await import("child_process");await new Promise((G,Y)=>{let U=J(Q,[...X,z],{stdio:"inherit"});U.on("close",()=>G()),U.on("error",Y)});break}default:w(`Unknown config subcommand: "${q}". Use: show, path, reset, or edit.`),process.exit(2)}}function FK(){console.log(`${W.bold("Usage:")} asm install <source> [options]
|
|
462
463
|
|
|
463
464
|
Install a skill from a GitHub repository, the curated registry, or a local path.
|
|
464
465
|
|
|
@@ -530,27 +531,27 @@ ${W.bold("Subfolder URL:")}
|
|
|
530
531
|
${W.bold("Vercel skills CLI:")}
|
|
531
532
|
asm install github:user/skills --method vercel --skill my-skill
|
|
532
533
|
asm install https://github.com/user/skills -m vercel --skill my-skill -y
|
|
533
|
-
${W.dim("Delegates to npx skills add for Vercel tracking, then registers in asm")}`)}async function
|
|
534
|
-
${W.bold("Install preview:")}`),console.info(` ${W.bold("Name:")} ${J.name}`),console.info(` ${W.bold("Version:")} ${J.version}`),J.description)console.info(` ${W.bold("Description:")} ${W.dim(J.description)}`);if(J.effort)console.info(` ${W.bold("Effort:")} ${
|
|
535
|
-
${W.bold("Security warnings:")}`);let
|
|
536
|
-
${F} ${W.dim(`(${L.length} match${L.length>1?"es":""})`)}`);for(let O of L.slice(0,5))console.info(` ${W.dim(`${O.file}:${O.line}`)} -- ${O.match}`);if(L.length>5)console.info(W.dim(` ... and ${L.length-5} more`))}}}}async function
|
|
537
|
-
${W.cyan(`[Step ${G}/${J}]`)} ${W.bold(V)}`},U=()=>{if(X)Q0(X).finally(()=>process.exit(1));else process.exit(1)};process.on("SIGINT",U),process.on("SIGTERM",U);try{if(
|
|
538
|
-
${W.cyan("●")} Resolving "${W.bold(Q)}" from registry...`);let{resolved:
|
|
539
|
-
${W.yellow("⚠")} Multiple skills found for "${W.bold(Q)}":`);let S=
|
|
540
|
-
Select a skill [1-${S.length}]: `;process.stderr.write(y);let c=await new Promise((H0)=>{let Z0="",m0=!1,p$=setTimeout(()=>{if(!m0)m0=!0,process.stdin.removeListener("data",Y$),H0(Z0.trim())},30000);function Y$(p0){if(Z0=p0.toString().trim(),!m0)m0=!0,clearTimeout(p$),process.stdin.removeListener("data",Y$),H0(Z0)}process.stdin.setEncoding("utf-8"),process.stdin.on("data",Y$)}),p=parseInt(c,10);if(isNaN(p)||p<1||p>S.length)w("Invalid selection. Aborting."),process.exit(2);let t=S[p-1];z="registry";let m$=t.repository.replace("https://github.com/","");Q=t.skill_path?`github:${m$}#${t.commit}:${t.skill_path}`:`github:${m$}#${t.commit}`,console.info(` ${W.green("✓")} Selected: ${W.bold(`${t.author}/${t.name}`)} @ ${t.commit.slice(0,7)}`)}else if(
|
|
541
|
-
Did you mean: ${C.map((S)=>W.cyan(S)).join(", ")}?`);process.exit(1)}else console.info(` ${W.dim("Not found in registry — trying existing sources...")}`),z="pre-indexed"}console.info(Y("Parsing source"));let V=c0(Q),H=!!V.isLocal;if(H){let
|
|
542
|
-
`);for(let y=0;y<
|
|
534
|
+
${W.dim("Delegates to npx skills add for Vercel tracking, then registers in asm")}`)}async function OK($,q,Z,Q,X,z,J,G,Y="global"){let U=await P0(Q),V=await O4(Q),H=Q===Z?null:Q.split(/[/\\]/).pop(),K=X||H||q.repo,_=w0(K),L=G.find((D)=>D.name.toLowerCase()===U.name.toLowerCase()&&D.provider===J.name),B,F=!!L;if(L)if(L.version===U.version)B=$.flags.force?"REINSTALL":`UPDATE: ${L.version} (same version)`;else B=`UPDATE: ${L.version} → ${U.version}`;else B="NEW";let O=Y9(q,Z,Q,_,J,$.flags.force||F,Y),A=V.some((D)=>["Shell commands","Code execution","Credentials"].includes(D.category)),M=V.some((D)=>["External URLs"].includes(D.category)),j=A?"high":M?"medium":"safe",I=A?W.red("[!] High Risk"):M?W.yellow("[~] Medium Risk"):W.green("[ok] Safe");return{metadata:U,skillName:_,warnings:V,installStatus:B,riskLevel:j,riskLabel:I,plan:O}}function AK($,q,Z,Q,X,z){let{metadata:J,warnings:G,installStatus:Y,riskLabel:U,plan:V}=$;if(X&&z){let H=W.dim(`[${z.index}/${z.total}]`),K=Y==="NEW"?W.green(`[${Y}]`):W.yellow(`[${Y}]`);console.info(`${H} ${W.bold(J.name)} v${J.version} ${K} ${U}`)}else{let H=Y==="NEW"?W.green(`[${Y}]`):W.yellow(`[${Y}]`);if(console.info(` ${W.bold(J.name)} v${J.version} ${H}`),console.info(`
|
|
535
|
+
${W.bold("Install preview:")}`),console.info(` ${W.bold("Name:")} ${J.name}`),console.info(` ${W.bold("Version:")} ${J.version}`),J.description)console.info(` ${W.bold("Description:")} ${W.dim(J.description)}`);if(J.effort)console.info(` ${W.bold("Effort:")} ${DZ(J.effort)}`);if(console.info(` ${W.bold("Source:")} ${q}`),Q)console.info(` ${W.bold("Tool:")} All (${Q.map((K)=>K.label).join(", ")})`),console.info(` ${W.bold("Primary:")} ${Z.label} (${Z.name})`),console.info(` ${W.bold("Symlinks:")} ${Q.filter((K)=>K.name!==Z.name).map((K)=>K.label).join(", ")}`);else console.info(` ${W.bold("Tool:")} ${Z.label} (${Z.name})`);if(console.info(` ${W.bold("Scope:")} ${V.scope==="project"?"Project":"Global"}`),console.info(` ${W.bold("Target:")} ${V.targetDir}`),console.info(` ${W.bold("Status:")} ${H}`),console.info(` ${W.bold("Risk:")} ${U}`),G.length>0){console.info(`
|
|
536
|
+
${W.bold("Security warnings:")}`);let K=new Map;for(let _ of G){let L=K.get(_.category)||[];L.push(_),K.set(_.category,L)}for(let[_,L]of K){let F=["Shell commands","Code execution","Credentials"].includes(_)?W.red(`[${_}]`):W.yellow(`[${_}]`);console.info(`
|
|
537
|
+
${F} ${W.dim(`(${L.length} match${L.length>1?"es":""})`)}`);for(let O of L.slice(0,5))console.info(` ${W.dim(`${O.file}:${O.line}`)} -- ${O.match}`);if(L.length>5)console.info(W.dim(` ... and ${L.length-5} more`))}}}}async function TK($,q){if(q)return await A4($,q);return await a$($)}async function IK($){if($.flags.help){FK();return}let q=$.flags.machine?u0():void 0,Z=performance.now(),Q=$.subcommand;if(!Q)w("Missing required argument: <source>"),console.error('Run "asm install --help" for usage.'),process.exit(2);let X=null,z="github",J=8,G=0,Y=(V)=>{return G++,`
|
|
538
|
+
${W.cyan(`[Step ${G}/${J}]`)} ${W.bold(V)}`},U=()=>{if(X)Q0(X).finally(()=>process.exit(1));else process.exit(1)};process.on("SIGINT",U),process.on("SIGTERM",U);try{if(I2(Q)){console.info(`
|
|
539
|
+
${W.cyan("●")} Resolving "${W.bold(Q)}" from registry...`);let{resolved:T,multipleMatches:N,suggestions:C}=await v5(Q,{noCache:$.flags.noCache});if(T){z="registry";let S=T.manifest,y=S.repository.replace("https://github.com/","");Q=S.skill_path?`github:${y}#${S.commit}:${S.skill_path}`:`github:${y}#${S.commit}`,console.info(` ${W.green("✓")} Resolved: ${W.bold(`${S.author}/${S.name}`)} @ ${S.commit.slice(0,7)}`)}else if(N.length>0){console.info(`
|
|
540
|
+
${W.yellow("⚠")} Multiple skills found for "${W.bold(Q)}":`);let S=N.slice(0,5);for(let H0=0;H0<S.length;H0++){let Z0=S[H0];console.info(` ${W.cyan(`${H0+1}.`)} ${W.bold(`${Z0.author}/${Z0.name}`)} — ${Z0.description}`)}if(!process.stdin.isTTY)w(`Ambiguous skill name "${Q}". Use a scoped name: asm install author/name`),process.exit(2);let y=`
|
|
541
|
+
Select a skill [1-${S.length}]: `;process.stderr.write(y);let c=await new Promise((H0)=>{let Z0="",m0=!1,p$=setTimeout(()=>{if(!m0)m0=!0,process.stdin.removeListener("data",Y$),H0(Z0.trim())},30000);function Y$(p0){if(Z0=p0.toString().trim(),!m0)m0=!0,clearTimeout(p$),process.stdin.removeListener("data",Y$),H0(Z0)}process.stdin.setEncoding("utf-8"),process.stdin.on("data",Y$)}),p=parseInt(c,10);if(isNaN(p)||p<1||p>S.length)w("Invalid selection. Aborting."),process.exit(2);let t=S[p-1];z="registry";let m$=t.repository.replace("https://github.com/","");Q=t.skill_path?`github:${m$}#${t.commit}:${t.skill_path}`:`github:${m$}#${t.commit}`,console.info(` ${W.green("✓")} Selected: ${W.bold(`${t.author}/${t.name}`)} @ ${t.commit.slice(0,7)}`)}else if(M2(Q)){if(w(`Skill "${Q}" not found in the registry.`),C.length>0)console.error(`
|
|
542
|
+
Did you mean: ${C.map((S)=>W.cyan(S)).join(", ")}?`);process.exit(1)}else console.info(` ${W.dim("Not found in registry — trying existing sources...")}`),z="pre-indexed"}console.info(Y("Parsing source"));let V=c0(Q),H=!!V.isLocal;if(H){let T=V.localPath;console.info(` ${W.dim(`local: ${T}`)}`);let{stat:N}=await import("fs/promises");try{if(!(await N(T)).isDirectory())throw Error(`Path is not a directory: ${T}`)}catch(C){if(C.code==="ENOENT")throw Error(`Path does not exist: ${T}`);throw C}}else await l0(),V=await G9(V),console.info(` ${W.dim(Q)}`);if($.flags.method==="vercel"){console.info(Y("Installing via Vercel skills CLI")),await T4();let T=M4(V),N=$.flags.path||null;console.info(` ${W.dim(`npx skills add ${T}${N?` --skill ${N}`:""}`)}`);let{stdout:C,stderr:S}=await I4(T,N);if(C.trim())console.info(` ${W.dim(C.trim())}`);if(S.trim())console.error(` ${W.dim(S.trim())}`);console.info(` ${W.green("✓")} Vercel skills CLI install completed`),$.flags.force=!0,console.info(` ${W.dim("Continuing with asm install to register in local inventory...")}`)}console.info(Y("Selecting provider"));let K=await g(),{provider:_,allProviders:L}=await i0(K,$.flags.provider,!!process.stdin.isTTY);console.info(Y("Selecting scope"));let B;if($.flags.scope==="global"||$.flags.scope==="project")B=$.flags.scope,console.info(` ${W.dim(`scope: ${B}`)}${B==="global"?` (${_.global})`:` (${_.project})`}`);else if(!process.stdin.isTTY||$.flags.yes)B="global",console.info(` ${W.dim("scope: global (default)")} (${_.global})`);else{let T=[{label:`Global (${_.global})`,hint:"Available in all projects",checked:!0},{label:`Project (${_.project})`,hint:"Available only in this project",checked:!1}];console.info("");let N=await d0({items:T});if(N.length===0)throw Error("No scope selected. Aborting.");B=N[0]===0?"global":"project",console.info(` Selected: ${W.bold(B)} ${W.dim(`(${B==="global"?_.global:_.project})`)}`)}if(H)console.info(Y("Reading local source")),console.info(` ${W.dim(V.localPath)}`),X=null;else{console.info(Y("Cloning repository"));let T=$.flags.transport,N=T==="ssh"?V.sshCloneUrl:T==="https"?V.cloneUrl:`${V.cloneUrl} ${W.dim("(auto)")}`;console.info(` ${N}${V.ref?` ${W.dim(`(ref: ${V.ref})`)}`:""}${V.subpath?` ${W.dim(`(path: ${V.subpath})`)}`:""}`),X=await n0(V,T)}let F=H?V.localPath:X;console.info(Y("Scanning for skills"));let{join:O}=await import("path"),A=[],M=$.flags.path||V.subpath,j=[];if(M){let T=O(F,M);try{await P0(T)}catch{throw Error(`No SKILL.md found at path "${M}" in the repository.`)}console.info(` Found skill at ${W.bold(M)}`),j=[{skillDir:T,nameOverride:$.flags.name}]}else{let T=!1;try{await P0(F),T=!0}catch{}if(T){let N=await P0(F);console.info(` Found: ${W.bold(N.name)} v${N.version}`),j=[{skillDir:F,nameOverride:$.flags.name}]}else{console.info(" No SKILL.md at root. Scanning subdirectories...");let N=await o$(F);if(N.length===0)throw Error("No skills found in this repository. Skills must have a SKILL.md file.");console.info(` Found ${W.bold(String(N.length))} skill(s):
|
|
543
|
+
`);for(let y=0;y<N.length;y++){let c=W.cyan(` ${String(y+1).padStart(String(N.length).length)})`);if(console.info(`${c} ${W.bold(N[y].name)} ${W.dim(`v${N[y].version}`)} ${W.dim(`(${N[y].relPath})`)}`),N[y].description)console.info(` ${W.dim(N[y].description)}`)}console.info(Y("Selecting skills")),G--;let C;if($.flags.all&&($.flags.yes||!process.stdin.isTTY))C=N.map((y)=>y.relPath),console.info(` Selected all ${W.bold(String(C.length))} skills`);else if(process.stdin.isTTY)if(N.length===1)C=[N[0].relPath],console.info(` Auto-selected: ${W.bold(N[0].name)} ${W.dim(`v${N[0].version}`)}`);else{let y=N.map((p)=>({label:p.name,hint:`v${p.version}${p.description?" "+p.description:""}`,checked:!!$.flags.all}));console.info("");let c=await d0({items:y});if(c.length===0)throw Error("No skills selected. Aborting.");C=c.map((p)=>N[p].relPath),console.info(` Selected ${W.bold(String(C.length))} skill(s)`)}else{w(`Repository contains ${N.length} skills. Use --path <subdir> to pick one or --all to install all.
|
|
543
544
|
Available skills:
|
|
544
|
-
${
|
|
545
|
-
`)}`),process.exit(2);return}let S=
|
|
545
|
+
${N.map((y)=>` --path ${y.relPath}`).join(`
|
|
546
|
+
`)}`),process.exit(2);return}let S=F4(C);if(S.length>0){let y=S.map((p)=>` - ${p.name}: ${p.paths.map((t)=>`"${t}"`).join(", ")}`).join(`
|
|
546
547
|
`),c=Error(`Duplicate skill names detected in selection:
|
|
547
548
|
${y}
|
|
548
|
-
Choose one path per skill name or install with --path.`);throw c.duplicates=S,c}
|
|
549
|
-
${W.red("[!]")} ${W.bold(`Install ${
|
|
550
|
-
${W.bold(`Install ${
|
|
551
|
-
${W.yellow(`${k.length} skill(s) failed to install:`)}`);for(let
|
|
549
|
+
Choose one path per skill name or install with --path.`);throw c.duplicates=S,c}j=C.map((y)=>({skillDir:O(F,y),nameOverride:C.length===1?$.flags.name:null})),G++}}console.info(Y("Inspecting skills"));let I=await i(K,"both"),D=[],x=j.length>1;for(let T=0;T<j.length;T++){let{skillDir:N,nameOverride:C}=j[T],S=await OK($,V,F,N,C,K,_,I,B);D.push(S),AK(S,Q,_,L,x,x?{index:T+1,total:j.length}:void 0)}if(x){if(console.info(""),console.info(` ${W.bold("Install settings:")}`),console.info(` ${W.bold("Source:")} ${Q}`),L)console.info(` ${W.bold("Tool:")} All (${L.map((y)=>y.label).join(", ")})`);else console.info(` ${W.bold("Tool:")} ${_.label} (${_.name})`);console.info(` ${W.bold("Scope:")} ${B==="project"?"Project":"Global"}`);let T=D.filter((y)=>y.riskLevel==="high").length,N=D.filter((y)=>y.riskLevel==="medium").length,C=D.filter((y)=>y.riskLevel==="safe").length,S=[];if(C>0)S.push(W.green(`${C} Safe`));if(N>0)S.push(W.yellow(`${N} Medium Risk`));if(T>0)S.push(W.red(`${T} High Risk`));console.info(` ${W.bold("Risk:")} ${S.join(", ")}`)}if(console.info(Y("Installing")),!$.flags.yes){let T=D.some((y)=>y.riskLevel==="high");if(!process.stdin.isTTY)w("Cannot prompt for confirmation in non-interactive mode. Use --yes to skip."),process.exit(2);let N=x?`${D.length} skills`:`"${D[0].metadata.name}"`,C=T?`
|
|
550
|
+
${W.red("[!]")} ${W.bold(`Install ${N}? Some have high-risk patterns.`)} [y/N] `:`
|
|
551
|
+
${W.bold(`Install ${N}?`)} [Y/n] `;process.stderr.write(C);let S=await q0();if(T){if(S.toLowerCase()!=="y"&&S.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}else if(S.toLowerCase()==="n"||S.toLowerCase()==="no")console.error("Aborted."),process.exit(0)}let P=X?await xZ(X):null,k=[];for(let T=0;T<D.length;T++){let N=D[T],C=x?W.dim(`[${T+1}/${D.length}]`)+" ":" ";try{console.info(`${C}Installing ${W.bold(N.metadata.name)}...`);let S=await TK(N.plan,L);A.push(S),console.info(`${C}${W.green("✓")} ${N.metadata.name} installed to ${W.dim(N.plan.targetDir)}`);try{let y=H?`local:${V.localPath}`:`github:${V.owner}/${V.repo}`,c=H?"local":z==="registry"?"registry":"github";await k$(S.name,{source:y,commitHash:P||"unknown",ref:V.ref||"main",installedAt:new Date().toISOString(),provider:N.plan.providerName,sourceType:c,...z==="registry"?{registryName:S.name}:{}})}catch{}}catch(S){k.push({name:N.metadata.name,error:S.message}),console.error(`${C}${W.red("✗")} ${W.bold(N.metadata.name)} — ${W.red(S.message)}`)}}if(process.removeListener("SIGINT",U),process.removeListener("SIGTERM",U),k.length>0){console.error(`
|
|
552
|
+
${W.yellow(`${k.length} skill(s) failed to install:`)}`);for(let T of k)console.error(` ${W.red("✗")} ${T.name}: ${T.error}`)}if($.flags.machine){q?.();let T=A.map((N)=>({name:N.name,path:N.path,version:N.version,provider:N.provider,source:N.source,resolution_source:z}));console.log(d("install",T.length===1?T[0]:T,Z))}else if($.flags.json){let T=A.map((N)=>({...N,resolutionSource:z}));console.log(JSON.stringify(T.length===1?T[0]:T,null,2))}else if(A.length===1)console.error(W.green(`
|
|
552
553
|
Done! Installed "${A[0].name}" to ${A[0].path}`));else if(A.length>0)console.error(`
|
|
553
|
-
${W.green(`Done! Installed ${A.length} skill(s) successfully.`)}`)}catch(V){if(process.removeListener("SIGINT",U),process.removeListener("SIGTERM",U),$.flags.machine)q?.(),console.log(
|
|
554
|
+
${W.green(`Done! Installed ${A.length} skill(s) successfully.`)}`)}catch(V){if(process.removeListener("SIGINT",U),process.removeListener("SIGTERM",U),$.flags.machine)q?.(),console.log(a("install",o.INSTALL_FAILED,V.message,Z,V?.duplicates?{duplicates:V.duplicates}:void 0));else if($.flags.json){let H={success:!1,error:V.message};if(V?.duplicates)H.duplicates=V.duplicates;console.log(JSON.stringify(H,null,2))}else w(V.message);process.exit(1)}finally{if(X)await Q0(X);q?.()}}function MK(){console.log(`${W.bold("Usage:")} asm export [options]
|
|
554
555
|
|
|
555
556
|
Export skill inventory as a portable JSON manifest. Useful for backup,
|
|
556
557
|
sharing, or scripting.
|
|
@@ -563,7 +564,7 @@ ${W.bold("Options:")}
|
|
|
563
564
|
${W.bold("Examples:")}
|
|
564
565
|
asm export ${W.dim("Export all skills")}
|
|
565
566
|
asm export -s global ${W.dim("Export global skills only")}
|
|
566
|
-
asm export > skills.json ${W.dim("Save to file")}`)}async function
|
|
567
|
+
asm export > skills.json ${W.dim("Save to file")}`)}async function jK($){if($.flags.help){MK();return}let q=await g(),Z=await i(q,$.flags.scope),Q=g5(Z);console.log(JSON.stringify(Q,null,2))}function NK(){console.log(`${W.bold("Usage:")} asm import <file> [options]
|
|
567
568
|
|
|
568
569
|
Import skills from a previously exported JSON manifest. Recreates skill
|
|
569
570
|
installations based on the manifest metadata.
|
|
@@ -585,9 +586,9 @@ ${W.bold("Examples:")}
|
|
|
585
586
|
asm import skills.json --force ${W.dim("Overwrite existing skills")}
|
|
586
587
|
asm import skills.json -s global ${W.dim("Import only global skills")}
|
|
587
588
|
asm export > backup.json ${W.dim("Export first, then import later")}
|
|
588
|
-
asm import backup.json ${W.dim("Restore from backup")}`)}async function
|
|
589
|
-
${W.bold("Proceed?")} [y/N] `);let Y=await q0();if(Y.toLowerCase()!=="y"&&Y.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let G=await
|
|
590
|
-
Nothing to import after scope filtering (--scope ${$.flags.scope}). All skills in the manifest were excluded.`);return}console.error("");for(let Y of G.results){let U=Y.status==="installed"?W.green("+++"):Y.status==="skipped"?W.yellow("---"):Y.status==="dry-run"?W.cyan("~~~"):W.red("!!!"),V=Y.reason?` ${W.dim(Y.reason)}`:"",H=Y.path?` ${W.dim(Y.path)}`:"";console.error(` ${U} ${Y.skillName} (${Y.provider}/${Y.scope})${V}${H}`)}if(console.error(""),console.error(`${W.bold("Summary:")} ${G.total} total, ${W.green(String(G.installed))} installed, ${W.yellow(String(G.skipped))} skipped, ${W.red(String(G.failed))} failed`),G.failed>0)process.exitCode=1}function
|
|
589
|
+
asm import backup.json ${W.dim("Restore from backup")}`)}async function DK($){if($.flags.help){NK();return}let q=$.subcommand;if(!q)w("Missing required argument: <file>"),console.error('Run "asm import --help" for usage.'),process.exit(2);let{resolve:Z}=await import("path"),Q=Z(q),X;try{X=await d5(Q)}catch(Y){w(Y.message),process.exit(1)}let z=X.skills.length;if(z===0){if($.flags.json)console.log(JSON.stringify({total:0,installed:0,skipped:0,failed:0,results:[]},null,2));else console.log("Manifest contains no skills. Nothing to import.");return}let J=$.flags.scope==="both"?"all scopes":$.flags.scope;if(console.error(`${W.bold("Importing")} ${z} skill${z>1?"s":""} from ${W.dim(Q)}`),console.error(` Scope filter: ${J}`),$.flags.force)console.error(` ${W.yellow("Force mode: existing skills will be overwritten")}`);if(!$.flags.yes&&process.stdin.isTTY){process.stderr.write(`
|
|
590
|
+
${W.bold("Proceed?")} [y/N] `);let Y=await q0();if(Y.toLowerCase()!=="y"&&Y.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let G=await c5(X,{force:$.flags.force,dryRun:!1,scopeFilter:$.flags.scope});if($.flags.json){console.log(JSON.stringify(G,null,2));return}if(G.total===0){console.error(`
|
|
591
|
+
Nothing to import after scope filtering (--scope ${$.flags.scope}). All skills in the manifest were excluded.`);return}console.error("");for(let Y of G.results){let U=Y.status==="installed"?W.green("+++"):Y.status==="skipped"?W.yellow("---"):Y.status==="dry-run"?W.cyan("~~~"):W.red("!!!"),V=Y.reason?` ${W.dim(Y.reason)}`:"",H=Y.path?` ${W.dim(Y.path)}`:"";console.error(` ${U} ${Y.skillName} (${Y.provider}/${Y.scope})${V}${H}`)}if(console.error(""),console.error(`${W.bold("Summary:")} ${G.total} total, ${W.green(String(G.installed))} installed, ${W.yellow(String(G.skipped))} skipped, ${W.red(String(G.failed))} failed`),G.failed>0)process.exitCode=1}function RK(){console.log(`${W.bold("Usage:")} asm init <name> [options]
|
|
591
592
|
|
|
592
593
|
Scaffold a new skill directory with a SKILL.md template. Creates a
|
|
593
594
|
ready-to-edit skill in the target tool's skill folder.
|
|
@@ -602,8 +603,8 @@ ${W.bold("Options:")}
|
|
|
602
603
|
${W.bold("Examples:")}
|
|
603
604
|
asm init my-skill ${W.dim("Scaffold (interactive tool)")}
|
|
604
605
|
asm init my-skill -p claude ${W.dim("Scaffold in Claude Code")}
|
|
605
|
-
asm init my-skill --path ./skills ${W.dim("Scaffold in custom directory")}`)}async function
|
|
606
|
-
${W.bold("Overwrite?")} [y/N] `);let X=await q0();if(X.toLowerCase()!=="y"&&X.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}}await
|
|
606
|
+
asm init my-skill --path ./skills ${W.dim("Scaffold in custom directory")}`)}async function wK($){if($.flags.help){RK();return}let q=$.subcommand;if(!q)w("Missing required argument: <name>"),console.error('Run "asm init --help" for usage.'),process.exit(2);let Z=w0(q),Q;if($.flags.path){let{resolve:X}=await import("path");Q=X($.flags.path)}else{let X=await g(),{provider:z}=await i0(X,$.flags.provider,!!process.stdin.isTTY),{join:J}=await import("path"),{resolveProviderPath:G}=await import("./chunk-a26gjzjk.js"),Y=G(X.providers.find((U)=>U.name===z.name).global);Q=J(Y,Z)}if(await n5(Q)){if(!$.flags.force){if(!process.stdin.isTTY)w(`Directory already exists: ${Q}. Use --force to overwrite.`),process.exit(2);process.stderr.write(`${W.yellow(`Directory already exists: ${Q}`)}
|
|
607
|
+
${W.bold("Overwrite?")} [y/N] `);let X=await q0();if(X.toLowerCase()!=="y"&&X.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}}await l5(Z,Q),console.error(W.green(`Done! Created skill "${Z}" at ${Q}`))}function PK(){console.log(`${W.bold("Usage:")} asm stats [options]
|
|
607
608
|
|
|
608
609
|
Show aggregate skill metrics with provider distribution charts,
|
|
609
610
|
scope breakdown, disk usage, and duplicate summary.
|
|
@@ -617,7 +618,7 @@ ${W.bold("Options:")}
|
|
|
617
618
|
${W.bold("Examples:")}
|
|
618
619
|
asm stats ${W.dim("Show full dashboard")}
|
|
619
620
|
asm stats -s global ${W.dim("Global skills only")}
|
|
620
|
-
asm stats --json ${W.dim("Output raw data as JSON")}`)}async function
|
|
621
|
+
asm stats --json ${W.dim("Output raw data as JSON")}`)}async function CK($){if($.flags.help){PK();return}let q=await g(),Z=await i(q,$.flags.scope);if(Z.length===0){console.log("No skills found.");return}let Q=z4(Z),X=await a5(Z,Q);if($.flags.json)if(!$.flags.verbose){let{perSkillDiskBytes:z,...J}=X;console.log(l(J))}else console.log(l(X));else console.log(s5(X))}function EK(){console.log(`${W.bold("Usage:")} asm doctor [options]
|
|
621
622
|
|
|
622
623
|
Run environment health checks and diagnostics. Validates all
|
|
623
624
|
prerequisites for using asm — git, GitHub CLI, Node.js, config,
|
|
@@ -632,7 +633,7 @@ ${W.bold("Options:")}
|
|
|
632
633
|
${W.bold("Examples:")}
|
|
633
634
|
asm doctor ${W.dim("Run all health checks")}
|
|
634
635
|
asm doctor --json ${W.dim("Output as JSON")}
|
|
635
|
-
asm doctor --machine ${W.dim("Machine-readable v1 envelope output")}`)}async function
|
|
636
|
+
asm doctor --machine ${W.dim("Machine-readable v1 envelope output")}`)}async function SK($){if($.flags.help){EK();return}let q=performance.now(),Z=await N8();if($.flags.machine){let Q={checks:Z.checks.map((X)=>({name:X.name,status:X.status,message:X.message,...X.fix?{fix:X.fix}:{}})),passed:Z.passed,warnings:Z.warnings,failures:Z.failures};console.log(d("doctor",Q,q))}else if($.flags.json)console.log(R8(Z));else console.log(D8(Z));if(Z.failures>0)process.exit(1)}function bK(){console.log(`${W.bold("Usage:")} asm eval <skill-path> [options]
|
|
636
637
|
|
|
637
638
|
Evaluate a skill's SKILL.md against best practices and produce a scored quality
|
|
638
639
|
report. Categories: structure, description quality, prompt engineering, context
|
|
@@ -649,6 +650,7 @@ ${W.bold("Options:")}
|
|
|
649
650
|
--fix Apply deterministic auto-fixes to SKILL.md (creates .bak)
|
|
650
651
|
--dry-run With --fix, preview the diff without writing
|
|
651
652
|
--runtime Run the skillgrade runtime provider (LLM-judge evals)
|
|
653
|
+
Auto-scaffolds eval.yaml if missing
|
|
652
654
|
--runtime init Scaffold eval.yaml via \`skillgrade init\`
|
|
653
655
|
--preset <name> Skillgrade preset: smoke | reliable | regression
|
|
654
656
|
--threshold <n> Pass threshold (0..1 fraction or 0..100 integer)
|
|
@@ -671,7 +673,7 @@ ${W.bold("Examples:")}
|
|
|
671
673
|
asm eval ./my-skill --runtime --preset reliable --threshold 0.9
|
|
672
674
|
asm eval ./my-skill --compare quality@1.0.0,quality@1.0.0
|
|
673
675
|
${W.dim("Diff two provider versions (upgrade safety)")}
|
|
674
|
-
asm eval-providers list ${W.dim("List registered eval providers")}`)}var
|
|
676
|
+
asm eval-providers list ${W.dim("List registered eval providers")}`)}var FZ=!1;function q9(){if(FZ)return;e8(),FZ=!0}function xK($){let q=$.findings.find((Z)=>Z.severity==="error"&&(Z.code==="provider-threw"||Z.code==="timeout"||Z.code==="aborted"));if(q)throw Error(q.message)}async function yK($){if($.flags.help){bK();return}let q=$.flags.machine?u0():void 0,Z=performance.now(),Q=$.subcommand;if(!Q){if($.flags.machine)q?.(),console.log(a("eval",o.INVALID_ARGUMENT,"Missing required argument: <skill-path>",Z)),process.exit(2);w("Missing required argument: <skill-path>"),console.error('Run "asm eval --help" for usage.'),process.exit(2)}try{if($.flags.compare!==null){let[U,V]=XZ($.flags.compare);q9();let{resolve:H}=await import("path"),K=H(Q),_={skillPath:K,skillMdPath:H(K,"SKILL.md")},L=v$(U.id,U.version),B=v$(V.id,V.version),F={};try{let I=(await r2()).defaults.timeoutMs;if(typeof I==="number"&&I>0)F.timeoutMs=I}catch(j){throw Error(`failed to load ~/.asm/config.yml: ${j?.message??String(j)}`)}if($.flags.preset)F.preset=$.flags.preset;if($.flags.provider)F.provider=$.flags.provider;if($.flags.threshold!==null)F.threshold=$.flags.threshold;let O=await h$(L,_,F),A=await h$(B,_,F);if($.flags.machine)q?.(),console.log(d("eval",{before:{provider_id:O.providerId,provider_version:O.providerVersion,schema_version:O.schemaVersion,score:O.score,passed:O.passed,categories:O.categories,findings:O.findings},after:{provider_id:A.providerId,provider_version:A.providerVersion,schema_version:A.schemaVersion,score:A.score,passed:A.passed,categories:A.categories,findings:A.findings}},Z)),process.exit(A.passed?0:1);if($.flags.json)console.log(JSON.stringify({before:O,after:A},null,2)),process.exit(A.passed?0:1);let M=QZ(O,A,{useColor:!$.flags.noColor});console.log(M),process.exit(A.passed?0:1)}if($.flags.fix){let U=await h8(),V=await f8(Q,{dryRun:$.flags.dryRun,gitAuthor:U});if($.flags.machine){q?.(),console.log(d("eval",c2(V.report,V),Z));return}if($.flags.json){console.log(JSON.stringify({report:V.report,fix:{dryRun:V.dryRun,applied:V.applied,skipped:V.skipped,backupPath:V.backupPath,diff:V.diff}},null,2));return}console.log(d2(V.report)),console.log(""),console.log(g8(V));return}if($.flags.runtime){let{resolve:U}=await import("path"),V=U(Q);if($.positional[0]==="init"){let O=aq(),A=await e2({skillPath:V,...O!==void 0?{binary:O}:{}});if($.flags.machine)q?.(),console.log(d("eval",{action:"scaffold",ok:A.ok,exit_code:A.exitCode,message:A.message},Z)),process.exit(A.ok?0:1);if($.flags.json)console.log(JSON.stringify(A,null,2)),process.exit(A.ok?0:1);if(A.ok)console.log(A.message);else w(A.message);process.exit(A.ok?0:1)}if($.flags.provider!==null&&$.flags.provider!=="docker"&&$.flags.provider!=="local")w(`Invalid --provider for --runtime: "${$.flags.provider}". Must be docker or local.`),process.exit(2);if($.flags.preset!==null&&$.flags.preset!=="smoke"&&$.flags.preset!=="reliable"&&$.flags.preset!=="regression")w(`Invalid --preset: "${$.flags.preset}". Must be smoke, reliable, or regression.`),process.exit(2);q9();let H=v$("skillgrade","^1.0.0"),K={skillPath:V,skillMdPath:U(V,"SKILL.md")},_={};try{let O=await r2(),A=O.providers.skillgrade;if(A){if(typeof A.preset==="string")_.preset=A.preset;if(typeof A.threshold==="number")_.threshold=A.threshold;if(A.provider==="docker"||A.provider==="local")_.provider=A.provider}let M=O.defaults.timeoutMs;if(typeof M==="number"&&M>0)_.timeoutMs=M}catch(O){throw Error(`failed to load ~/.asm/config.yml: ${O?.message??String(O)}`)}if($.flags.preset)_.preset=$.flags.preset;if($.flags.provider)_.provider=$.flags.provider;if($.flags.threshold!==null)_.threshold=$.flags.threshold;let L=await H.applicable(K,_);if(!L.ok){let{stat:O}=await import("fs/promises"),A=U(V,"eval.yaml"),M=!1;try{M=!(await O(A)).isFile()}catch{M=!0}if(M){if((L.reason??"").includes("no eval.yaml")){if(!$.flags.json&&!$.flags.machine)console.log(`No eval.yaml found at ${A} — initializing via skillgrade init...`);let I=aq(),D=await e2({skillPath:V,...I!==void 0?{binary:I}:{}});if(!D.ok){if($.flags.machine)q?.(),console.log(a("eval",o.INVALID_ARGUMENT,D.message,Z)),process.exit(1);w(D.message),process.exit(1)}if(!$.flags.json&&!$.flags.machine)console.log(D.message);L=await H.applicable(K,_)}}}if(!L.ok){if($.flags.machine)q?.(),console.log(a("eval",o.INVALID_ARGUMENT,L.reason??"skillgrade provider not applicable",Z)),process.exit(1);w(L.reason??"skillgrade provider not applicable"),process.exit(1)}let B=await h$(H,K,_);if($.flags.machine)q?.(),console.log(d("eval",{provider_id:B.providerId,provider_version:B.providerVersion,schema_version:B.schemaVersion,score:B.score,passed:B.passed,categories:B.categories,findings:B.findings},Z)),process.exit(B.passed?0:1);if($.flags.json)console.log(JSON.stringify(B,null,2)),process.exit(B.passed?0:1);let F=B.passed?W.green("PASS"):W.red("FAIL");if(console.log(`${W.bold("Skillgrade runtime:")} ${F} score=${B.score}/100`),B.categories.length>0){console.log(""),console.log(W.bold("Tasks:"));for(let O of B.categories)console.log(` ${O.name}: ${O.score}/${O.max} (${O.id})`)}if(B.findings.length>0){console.log(""),console.log(W.bold("Findings:"));for(let O of B.findings){let A=O.severity==="error"?W.red(O.severity):O.severity==="warning"?W.yellow(O.severity):W.dim(O.severity);console.log(` [${A}] ${O.message}`)}}process.exit(B.passed?0:1)}q9();let X=v$("quality","^1.0.0"),{resolve:z}=await import("path"),J=z(Q),G=await h$(X,{skillPath:J,skillMdPath:z(J,"SKILL.md")});xK(G);let Y=G.raw;if($.flags.machine){q?.(),console.log(d("eval",c2(Y,null),Z));return}if($.flags.json){console.log(v8(Y));return}console.log(d2(Y))}catch(X){if($.flags.machine)q?.(),console.log(a("eval",o.SKILL_NOT_FOUND,X?.message??String(X),Z)),process.exit(1);w(X?.message??String(X)),process.exit(1)}}function kK(){console.log(`${W.bold("Usage:")} asm eval-providers <subcommand> [options]
|
|
675
677
|
|
|
676
678
|
Manage evaluation providers registered with the ${W.bold("asm eval")} framework.
|
|
677
679
|
Providers implement the ${W.bold("EvalProvider")} contract (see src/eval/types.ts) and
|
|
@@ -687,7 +689,7 @@ ${W.bold("Options:")}
|
|
|
687
689
|
|
|
688
690
|
${W.bold("Examples:")}
|
|
689
691
|
asm eval-providers list ${W.dim("Show registered providers")}
|
|
690
|
-
asm eval-providers list --json ${W.dim("Machine-readable listing")}`)}async function
|
|
692
|
+
asm eval-providers list --json ${W.dim("Machine-readable listing")}`)}async function fK($){if($.flags.help){kK();return}let q=$.subcommand;if(!q)w("Missing subcommand. Use: list"),console.error('Run "asm eval-providers --help" for usage.'),process.exit(2);switch(q){case"list":{q9();let Z=p8();if($.flags.json){console.log(l(Z.map((G)=>({id:G.id,version:G.version,schemaVersion:G.schemaVersion,description:G.description,requires:G.requires??[]}))));return}if(Z.length===0){console.log("No eval providers registered.");return}let Q=["id","version","schemaVersion","description","requires"],X=Z.map((G)=>[G.id,G.version,String(G.schemaVersion),G.description,G.requires&&G.requires.length>0?G.requires.join(","):"-"]),z=Q.map((G,Y)=>Math.max(G.length,...X.map((U)=>U[Y].length))),J=(G)=>G.map((Y,U)=>Y.padEnd(z[U])).join(" ");console.log(W.bold(J(Q))),console.log(z.map((G)=>"-".repeat(G)).join(" "));for(let G of X)console.log(J(G));return}default:w(`Unknown eval-providers subcommand: "${q}". Use: list`),console.error('Run "asm eval-providers --help" for usage.'),process.exit(2)}}function hK(){console.log(`${W.bold("Usage:")} asm link <path> [<path2> ...] [options]
|
|
691
693
|
|
|
692
694
|
Symlink a local skill directory into an agent's skill folder. Useful
|
|
693
695
|
for local development — changes to the source are reflected immediately.
|
|
@@ -711,13 +713,13 @@ ${W.bold("Examples:")}
|
|
|
711
713
|
asm link ./my-skill -p claude ${W.dim("Link to Claude Code")}
|
|
712
714
|
asm link ./my-skill --name alias ${W.dim("Link with custom name")}
|
|
713
715
|
asm link ./my-skills-folder ${W.dim("Link all skills in folder")}
|
|
714
|
-
asm link ./skill1 ./skill2 ./skill3 -p claude ${W.dim("Link multiple skills at once")}`)}async function
|
|
715
|
-
${W.bold("Overwrite?")} [y/N] `);let X=await q0();if(X.toLowerCase()!=="y"&&X.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0);return!0}async function
|
|
716
|
-
${
|
|
717
|
-
Done! Linked ${
|
|
718
|
-
${W.bold(`Link ${G.length} skill(s)?`)} [Y/n] `);let L=await q0();if(L.toLowerCase()==="n"||L.toLowerCase()==="no")console.error("Aborted."),process.exit(0)}let
|
|
719
|
-
${
|
|
720
|
-
Done! Linked ${
|
|
716
|
+
asm link ./skill1 ./skill2 ./skill3 -p claude ${W.dim("Link multiple skills at once")}`)}async function vK($,q){if(q)return!0;let{access:Z}=await import("fs/promises"),Q=!1;try{await Z($),Q=!0}catch{}if(!Q)return!1;if(!process.stdin.isTTY)throw Error(`Target already exists: ${$}. Use --force to overwrite.`);process.stderr.write(`${W.yellow(`Target already exists: ${$}`)}
|
|
717
|
+
${W.bold("Overwrite?")} [y/N] `);let X=await q0();if(X.toLowerCase()!=="y"&&X.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0);return!0}async function $9($,q,Z,Q){let{join:X}=await import("path"),z=X(q,Z),J=await vK(z,Q);return await r5($,q,Z,J),{name:Z,symlinkPath:z,targetPath:$}}async function gK($){if($.flags.help){hK();return}let q=[];if($.subcommand)q.push($.subcommand);if(q.push(...$.positional),q.length===0)w("Missing required argument: <path>"),console.error('Run "asm link --help" for usage.'),process.exit(2);if(q.length>1){if($.flags.name)w("--name cannot be used when linking multiple paths. Link each skill individually to use --name."),process.exit(2);let L=await g(),{provider:B}=await i0(L,$.flags.provider,!!process.stdin.isTTY),{resolveProviderPath:F}=await import("./chunk-a26gjzjk.js"),O=F(L.providers.find((D)=>D.name===B.name).global),{resolve:A,basename:M}=await import("path"),j=[],I=[];for(let D of q){let x=A(D),P=!1;try{await R2(x),P=!0}catch{}if(P){let k=M(x);try{let T=await $9(x,O,k,!!$.flags.force);if(j.push(T),!$.flags.json)console.error(W.green(` Linked "${T.name}" -> ${T.targetPath}`))}catch(T){let N=T instanceof Error?T.message:String(T);if(I.push({name:k,error:N}),!$.flags.json)console.error(W.red(` Failed to link "${k}": ${N}`))}}else{let k=[];try{k=await w2(x)}catch(T){let N=T instanceof Error?T.message:String(T);if(I.push({name:D,error:N}),!$.flags.json)console.error(W.red(` Failed to process "${D}": ${N}`));continue}if(k.length===0){let T=`No SKILL.md found in ${x} or its immediate subdirectories.`;if(I.push({name:D,error:T}),!$.flags.json)console.error(W.red(` ${T}`));continue}for(let T of k)try{let N=await $9(T.absPath,O,T.dirName,!!$.flags.force);if(j.push(N),!$.flags.json)console.error(W.green(` Linked "${N.name}" -> ${N.targetPath}`))}catch(N){let C=N instanceof Error?N.message:String(N);if(I.push({name:T.name,error:C}),!$.flags.json)console.error(W.red(` Failed to link "${T.name}": ${C}`))}}}if($.flags.json)console.log(l({success:I.length===0,linked:j,failures:I}));else if(I.length>0)console.error(W.yellow(`
|
|
718
|
+
${j.length} linked, ${I.length} failed.`));else console.error(W.green(`
|
|
719
|
+
Done! Linked ${j.length} skill(s) successfully.`));if(I.length>0)process.exit(1);return}let Z=q[0],{resolve:Q,basename:X}=await import("path"),z=Q(Z),J=!1;try{await R2(z),J=!0}catch{}let G=[];if(!J){if(G=await w2(z),G.length===0)w(`No SKILL.md found in ${z} or its immediate subdirectories.`),process.exit(1);if($.flags.name&&G.length>1)w(`--name cannot be used when linking multiple skills (found ${G.length} skills). Link each skill individually to use --name.`),process.exit(2)}let Y=await g(),{provider:U}=await i0(Y,$.flags.provider,!!process.stdin.isTTY),{resolveProviderPath:V}=await import("./chunk-a26gjzjk.js"),H=V(Y.providers.find((L)=>L.name===U.name).global);if(J){let L=$.flags.name?w0($.flags.name):X(z),B;try{B=await $9(z,H,L,!!$.flags.force)}catch(F){let O=F instanceof Error?F.message:String(F);if($.flags.json)console.log(l({success:!1,error:O}));else w(O);process.exit(2)}if($.flags.json)console.log(l({success:!0,...B}));else console.error(W.green(`Done! Linked "${B.name}" -> ${B.targetPath}`)),console.error(` Symlink: ${B.symlinkPath}`),console.error(W.dim(` If you move or delete the source, run "asm uninstall ${B.name}" to clean up.`));return}console.error(`Found ${W.bold(String(G.length))} skill(s) in ${z}:`);for(let L of G)console.error(` ${W.bold(L.name)} ${W.dim(`v${L.version}`)} ${W.dim(`(${L.dirName}/)`)}`);if(process.stdin.isTTY&&!$.flags.force){process.stderr.write(`
|
|
720
|
+
${W.bold(`Link ${G.length} skill(s)?`)} [Y/n] `);let L=await q0();if(L.toLowerCase()==="n"||L.toLowerCase()==="no")console.error("Aborted."),process.exit(0)}let K=[],_=[];for(let L of G){let B=$.flags.name&&G.length===1?w0($.flags.name):L.dirName;try{let F=await $9(L.absPath,H,B,!!$.flags.force);if(K.push(F),!$.flags.json)console.error(W.green(` Linked "${F.name}" -> ${F.targetPath}`))}catch(F){let O=F instanceof Error?F.message:String(F);if(_.push({name:L.name,error:O}),!$.flags.json)console.error(W.red(` Failed to link "${L.name}": ${O}`))}}if($.flags.json)console.log(l({success:_.length===0,linked:K,failures:_}));else if(_.length>0)console.error(W.yellow(`
|
|
721
|
+
${K.length} linked, ${_.length} failed.`));else console.error(W.green(`
|
|
722
|
+
Done! Linked ${K.length} skill(s) successfully.`));if(_.length>0)process.exit(1)}function uK(){console.log(`${W.bold("Usage:")} asm index <subcommand> [options]
|
|
721
723
|
|
|
722
724
|
Manage the skill index for searching available skills from indexed repos.
|
|
723
725
|
|
|
@@ -741,10 +743,10 @@ ${W.bold("Examples:")}
|
|
|
741
743
|
asm index search marketing --has license ${W.dim("Only with license")}
|
|
742
744
|
asm index search "" --missing creator ${W.dim("Skills missing creator")}
|
|
743
745
|
asm index list ${W.dim("List indexed repos")}
|
|
744
|
-
asm index remove obra/superpowers ${W.dim("Remove from index")}`)}async function
|
|
745
|
-
`));for(let J of z){let G=J.skill.verified?W.blue(" [verified]"):"";console.error(`${W.cyan(J.skill.name)} ${W.dim(`v${J.skill.version}`)}${G} ${W.dim(`[${J.repo.owner}/${J.repo.repo}]`)}`);for(let U of
|
|
746
|
-
`)}}break}case"list":{let Z=await
|
|
747
|
-
`));for(let X of Z)console.error(`${W.cyan(`${X.owner}/${X.repo}`)} - ${X.skillCount} skills ${W.dim(`(${new Date(X.updatedAt).toLocaleDateString()})`)}`)}break}case"remove":{let Z=$.positional[0];if(!Z)w("Missing required argument: <owner/repo>"),console.error('Run "asm index --help" for usage.'),process.exit(2);let[Q,X]=Z.split("/");if(!Q||!X)w("Invalid format. Use: <owner/repo>"),process.exit(2);if(!$.flags.yes&&process.stdin.isTTY){process.stderr.write(`${W.bold("Remove")} ${W.cyan(`${Q}/${X}`)} ${W.bold("from index?")} [y/N] `);let J=await q0();if(J.toLowerCase()!=="y"&&J.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}if(await
|
|
746
|
+
asm index remove obra/superpowers ${W.dim("Remove from index")}`)}async function mK($){if($.flags.help){uK();return}let q=$.subcommand;if(!q)w("Missing subcommand. Use: ingest, search, list, or remove"),console.error('Run "asm index --help" for usage.'),process.exit(2);switch(q){case"ingest":{let Z=$.positional[0];if(!Z)w("Missing required argument: <repo>"),console.error('Run "asm index --help" for usage.'),process.exit(2);console.error(W.blueBold(`Ingesting ${Z}...`));let Q=await BZ(Z);if(!Q.success)w(`Failed to ingest: ${Q.error}`),process.exit(1);if(Q.repoIndex)if($.flags.json)console.log(l({success:!0,owner:Q.repoIndex.owner,repo:Q.repoIndex.repo,skillCount:Q.repoIndex.skillCount,updatedAt:Q.repoIndex.updatedAt}));else console.error(W.green(`Successfully indexed ${Q.repoIndex.owner}/${Q.repoIndex.repo}`)),console.error(` Skills found: ${Q.repoIndex.skillCount}`);break}case"search":{let Z=$.positional.join(" ");if(!Z&&$.flags.has.length===0&&$.flags.missing.length===0)w("Missing required argument: <query>"),console.error('Run "asm index --help" for usage.'),process.exit(2);let Q={};if($.flags.has.length>0)Q.has=$.flags.has;if($.flags.missing.length>0)Q.missing=$.flags.missing;let z=Q.has||Q.missing?await eq(Z||"",20,Q):await eq(Z);if(z.length===0){if($.flags.json)console.log(l([]));else console.info("No skills found matching your query."),console.error(W.dim("Try ingesting more repos with: asm index ingest <repo>"));return}if($.flags.json)console.log(l(z.map((J)=>({name:J.skill.name,description:J.skill.description,version:J.skill.version,license:J.skill.license||"",creator:J.skill.creator||"",compatibility:J.skill.compatibility||"",allowedTools:J.skill.allowedTools||[],verified:J.skill.verified===!0,installUrl:J.skill.installUrl,installCommand:`asm install ${J.skill.installUrl}`,repo:`${J.repo.owner}/${J.repo.repo}`}))));else{console.error(W.bold(`Found ${z.length} skills:
|
|
747
|
+
`));for(let J of z){let G=J.skill.verified?W.blue(" [verified]"):"";console.error(`${W.cyan(J.skill.name)} ${W.dim(`v${J.skill.version}`)}${G} ${W.dim(`[${J.repo.owner}/${J.repo.repo}]`)}`);for(let U of SZ(J.skill.description,80))console.error(` ${U}`);let Y=HZ(J.skill);if(Y.length>0)console.error(` ${W.yellow(`⚠ Missing: ${Y.join(", ")}`)}`);console.error(` ${W.green(`asm install ${J.skill.installUrl}`)}
|
|
748
|
+
`)}}break}case"list":{let Z=await _Z();if(Z.length===0){if($.flags.json)console.log(l([]));else console.info("No repositories indexed."),console.error(W.dim("Add repos with: asm index ingest <repo>"));return}let Q=await VZ();if($.flags.json)console.log(l(Z));else{console.error(W.bold(`Indexed Repositories (${Q} total skills):
|
|
749
|
+
`));for(let X of Z)console.error(`${W.cyan(`${X.owner}/${X.repo}`)} - ${X.skillCount} skills ${W.dim(`(${new Date(X.updatedAt).toLocaleDateString()})`)}`)}break}case"remove":{let Z=$.positional[0];if(!Z)w("Missing required argument: <owner/repo>"),console.error('Run "asm index --help" for usage.'),process.exit(2);let[Q,X]=Z.split("/");if(!Q||!X)w("Invalid format. Use: <owner/repo>"),process.exit(2);if(!$.flags.yes&&process.stdin.isTTY){process.stderr.write(`${W.bold("Remove")} ${W.cyan(`${Q}/${X}`)} ${W.bold("from index?")} [y/N] `);let J=await q0();if(J.toLowerCase()!=="y"&&J.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}if(await LZ(Q,X))console.error(W.green(`Removed ${Q}/${X} from index`));else w(`Repository not found in index: ${Q}/${X}`),process.exit(1);break}default:w(`Unknown subcommand: "${q}"`),console.error('Run "asm index --help" for usage.'),process.exit(2)}}function pK(){console.log(`${W.bold("Usage:")} asm bundle <subcommand> [options]
|
|
748
750
|
|
|
749
751
|
Create, install, and manage curated skill bundles. A bundle is a reusable
|
|
750
752
|
recipe of skills for a particular workflow, domain, or project setup.
|
|
@@ -770,14 +772,14 @@ ${W.bold("Examples:")}
|
|
|
770
772
|
asm bundle list ${W.dim("Show all saved bundles")}
|
|
771
773
|
asm bundle list --json ${W.dim("List bundles as JSON")}
|
|
772
774
|
asm bundle show my-workflow ${W.dim("Show bundle details")}
|
|
773
|
-
asm bundle remove my-workflow ${W.dim("Remove a saved bundle")}`)}async function
|
|
774
|
-
`));let F=await d0({items:
|
|
775
|
-
${W.bold("Description")} (optional, press Enter to skip): `);let
|
|
776
|
-
${W.bold("Install all skills from this bundle?")} [y/N] `);let H=await q0();if(H.toLowerCase()!=="y"&&H.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let X=[],z=await
|
|
777
|
-
Installing ${W.bold(H.name)}...`);try{if(H.installUrl.startsWith("github:")||H.installUrl.startsWith("https://github.com/"))await l0();let _=c0(H.installUrl),L=!!_.isLocal,
|
|
778
|
-
`));for(let Q of Z){let X=Q.tags&&Q.tags.length>0?` ${W.dim(`[${Q.tags.join(", ")}]`)}`:"";if(console.error(` ${W.cyan(Q.name)} ${W.dim(`(${Q.skills.length} skills)`)}${X}`),Q.description)console.error(` ${W.dim(Q.description)}`);if(Q.author)console.error(` ${W.dim(`by ${Q.author}`)}`)}}break}case"show":{let Z=$.positional[0];if(!Z)w("Missing required argument: <name|file>"),console.error("Usage: asm bundle show <name|file>"),process.exit(2);let Q;try{Q=await
|
|
779
|
-
${W.bold(`Skills (${Q.skills.length})`)}:`);for(let X of Q.skills){let z=X.version?` v${X.version}`:"";if(console.error(` ${W.cyan(X.name)}${W.dim(z)}`),X.description)console.error(` ${W.dim(X.description)}`);console.error(` ${W.dim(`install: ${X.installUrl}`)}`)}}break}case"remove":{let Z=$.positional[0];if(!Z)w("Missing required argument: <name>"),console.error("Usage: asm bundle remove <name>"),process.exit(2);if(!$.flags.yes&&process.stdin.isTTY){process.stderr.write(`${W.bold("Remove bundle")} ${W.cyan(Z)}${W.bold("?")} [y/N] `);let X=await q0();if(X.toLowerCase()!=="y"&&X.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let Q;try{Q=await
|
|
780
|
-
`)),console.log(JSON.stringify(X.manifest,null,2));return}if(X.prUrl)console.error(W.green("Published successfully!")),console.error(""),console.error(` PR: ${X.prUrl}`),console.error(` Manifest: manifests/${X.manifest?.author}/${X.manifest?.name}.json`),console.error(` Security: ${X.securityVerdict}`),console.error(""),console.error(W.dim("The registry maintainers will review your submission."))}catch(X){let z={success:!1,manifest:null,prUrl:null,error:X.message,securityVerdict:"pass",securityReport:{scannedAt:new Date().toISOString(),skillName:"",skillPath:"",source:null,codeScans:[],permissions:[],totalFiles:0,totalLines:0,verdict:"safe",verdictReason:""}};if($.flags.machine)q?.(),console.log(
|
|
775
|
+
asm bundle remove my-workflow ${W.dim("Remove a saved bundle")}`)}async function dK($){if($.flags.help){pK();return}let q=$.subcommand;if(!q)w("Missing subcommand. Use: create, install, list, show, or remove"),console.error('Run "asm bundle --help" for usage.'),process.exit(2);switch(q){case"create":{let Z=$.positional[0];if(!Z)w("Missing required argument: <name>"),console.error("Usage: asm bundle create <name>"),process.exit(2);let Q=await g(),X=await i(Q,$.flags.scope);if(X.length===0)w("No skills found to include in the bundle."),process.exit(1);let z=new Set,J=X.filter((B)=>{let F=B.name.toLowerCase();if(z.has(F))return!1;return z.add(F),!0}),G=J;if(process.stdin.isTTY&&!$.flags.yes){let B=J.map((O)=>({label:`${O.name} v${O.version}`,hint:O.description?O.description.slice(0,60)+(O.description.length>60?"...":""):`(${O.provider}/${O.scope})`,checked:!0}));console.error(W.bold(`Select skills for bundle "${Z}":
|
|
776
|
+
`));let F=await d0({items:B});if(F.length===0)w("No skills selected. Bundle not created."),process.exit(1);G=F.map((O)=>J[O])}let{readLock:Y}=await import("./chunk-1becp2v6.js"),U=await Y(),V=await Promise.all(G.map((B)=>$8(B,U))),H=`Bundle of ${V.length} skills`,K="unknown";try{let{execSync:B}=await import("child_process"),F=B("git config user.name",{encoding:"utf-8"}).trim();if(F)K=F}catch{}if(process.stdin.isTTY&&!$.flags.yes){process.stderr.write(`
|
|
777
|
+
${W.bold("Description")} (optional, press Enter to skip): `);let B=await q0();if(B.trim())H=B.trim();process.stderr.write(`${W.bold("Author")} (optional, press Enter to skip): `);let F=await q0();if(F.trim())K=F.trim()}let _=e5(Z,H,K,V),L=await q8(_);if($.flags.json)console.log(JSON.stringify(_,null,2));else console.error(W.green(`Bundle "${Z}" created with ${V.length} skill(s).`)),console.error(` Saved to: ${W.dim(L)}`);break}case"install":{let Z=$.positional[0];if(!Z)w("Missing required argument: <name|file>"),console.error("Usage: asm bundle install <name|file>"),process.exit(2);let Q;try{Q=await E2(Z)}catch(H){w(H.message),process.exit(1)}if(console.error(`${W.bold("Bundle:")} ${Q.name} (${Q.skills.length} skills)`),Q.description)console.error(` ${W.dim(Q.description)}`);console.error("");for(let H of Q.skills){let K=H.version?` v${H.version}`:"";console.error(` ${W.cyan(H.name)}${W.dim(K)} ${W.dim(`-> ${H.installUrl}`)}`)}if(!$.flags.yes&&process.stdin.isTTY){process.stderr.write(`
|
|
778
|
+
${W.bold("Install all skills from this bundle?")} [y/N] `);let H=await q0();if(H.toLowerCase()!=="y"&&H.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let X=[],z=await g(),{provider:J}=await i0(z,$.flags.provider,!1),G=$.flags.scope==="global"||$.flags.scope==="project"?$.flags.scope:"global";for(let H of Q.skills){console.error(`
|
|
779
|
+
Installing ${W.bold(H.name)}...`);try{if(H.installUrl.startsWith("github:")||H.installUrl.startsWith("https://github.com/"))await l0();let _=c0(H.installUrl),L=!!_.isLocal,B=null;try{let F,O;if(!L)B=await n0(_,$.flags.transport),F=B,O=_.subpath?oV(B,_.subpath):B;else F=_.localPath,O=_.localPath;let A=await P0(O),M=w0(H.name||A.name||_.repo),j=Y9(_,F,O,M,J,$.flags.force,G);try{await j4(j.targetDir,j.force)}catch(I){if(I.message?.includes("--force")){X.push({name:H.name,status:"skipped",reason:"Already installed. Use --force to overwrite."}),console.error(` ${W.dim("---")} ${H.name} skipped (already installed)`);continue}throw I}await a$(j),X.push({name:H.name,status:"installed"}),console.error(` ${W.green("+++")} ${H.name} installed`)}finally{if(B)await Q0(B)}}catch(K){X.push({name:H.name,status:"failed",reason:K.message}),console.error(` ${W.red("!!!")} ${H.name}: ${K.message}`)}}let Y=X.filter((H)=>H.status==="installed").length,U=X.filter((H)=>H.status==="skipped").length,V=X.filter((H)=>H.status==="failed").length;if($.flags.json)console.log(JSON.stringify({bundleName:Q.name,total:X.length,installed:Y,skipped:U,failed:V,results:X},null,2));else console.error(""),console.error(`${W.bold("Summary:")} ${X.length} total, ${W.green(String(Y))} installed, `+(U>0?`${W.dim(String(U))} skipped, `:"")+`${W.red(String(V))} failed`);if(V>0)process.exitCode=1;break}case"list":{let Z=await Z8();if(Z.length===0){if($.flags.json)console.log("[]");else console.log("No bundles found."),console.error(W.dim("Create one with: asm bundle create <name>"));return}if($.flags.json)console.log(JSON.stringify(Z,null,2));else{console.error(W.bold(`Saved Bundles (${Z.length}):
|
|
780
|
+
`));for(let Q of Z){let X=Q.tags&&Q.tags.length>0?` ${W.dim(`[${Q.tags.join(", ")}]`)}`:"";if(console.error(` ${W.cyan(Q.name)} ${W.dim(`(${Q.skills.length} skills)`)}${X}`),Q.description)console.error(` ${W.dim(Q.description)}`);if(Q.author)console.error(` ${W.dim(`by ${Q.author}`)}`)}}break}case"show":{let Z=$.positional[0];if(!Z)w("Missing required argument: <name|file>"),console.error("Usage: asm bundle show <name|file>"),process.exit(2);let Q;try{Q=await E2(Z)}catch(X){w(X.message),process.exit(1)}if($.flags.json)console.log(JSON.stringify(Q,null,2));else{if(console.error(W.bold(`Bundle: ${Q.name}`)),Q.description)console.error(` ${Q.description}`);if(Q.author)console.error(` ${W.dim(`Author: ${Q.author}`)}`);if(console.error(` ${W.dim(`Created: ${new Date(Q.createdAt).toLocaleString()}`)}`),Q.tags&&Q.tags.length>0)console.error(` ${W.dim(`Tags: ${Q.tags.join(", ")}`)}`);console.error(`
|
|
781
|
+
${W.bold(`Skills (${Q.skills.length})`)}:`);for(let X of Q.skills){let z=X.version?` v${X.version}`:"";if(console.error(` ${W.cyan(X.name)}${W.dim(z)}`),X.description)console.error(` ${W.dim(X.description)}`);console.error(` ${W.dim(`install: ${X.installUrl}`)}`)}}break}case"remove":{let Z=$.positional[0];if(!Z)w("Missing required argument: <name>"),console.error("Usage: asm bundle remove <name>"),process.exit(2);if(!$.flags.yes&&process.stdin.isTTY){process.stderr.write(`${W.bold("Remove bundle")} ${W.cyan(Z)}${W.bold("?")} [y/N] `);let X=await q0();if(X.toLowerCase()!=="y"&&X.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}let Q;try{Q=await Q8(Z)}catch(X){w(X.message),process.exit(1)}if(Q)console.error(W.green(`Bundle "${Z}" removed.`));else w(`Bundle "${Z}" not found.`),process.exit(1);break}default:w(`Unknown subcommand: "${q}". Use: create, install, list, show, or remove`),console.error('Run "asm bundle --help" for usage.'),process.exit(2)}}async function cK($){if($.flags.help){QK();return}let q=$.flags.machine?u0():void 0,Z=performance.now(),Q=$.subcommand||".";try{let X=await U8({path:Q,dryRun:$.flags.dryRun,force:$.flags.force,yes:$.flags.yes});if($.flags.machine){if(q?.(),!X.success)console.log(a("publish",o.PUBLISH_FAILED,X.error||"Publish failed",Z,{manifest:X.manifest,security_verdict:X.securityVerdict,fallback:X.fallback??!1})),process.exit(1);console.log(d("publish",{manifest:X.manifest,pr_url:X.prUrl,status:X.securityVerdict},Z));return}if($.flags.json){if(console.log(JSON.stringify({success:X.success,manifest:X.manifest,pr_url:X.prUrl,error:X.error,security_verdict:X.securityVerdict},null,2)),!X.success)process.exit(1);return}if(!X.success)w(X.error||"Publish failed."),process.exit(1);if(X.fallback){console.log(W.yellow("Manifest generated (gh CLI unavailable):")),console.log(W8(X));return}if($.flags.dryRun){console.error(W.dim(`Dry run — no PR created.
|
|
782
|
+
`)),console.log(JSON.stringify(X.manifest,null,2));return}if(X.prUrl)console.error(W.green("Published successfully!")),console.error(""),console.error(` PR: ${X.prUrl}`),console.error(` Manifest: manifests/${X.manifest?.author}/${X.manifest?.name}.json`),console.error(` Security: ${X.securityVerdict}`),console.error(""),console.error(W.dim("The registry maintainers will review your submission."))}catch(X){let z={success:!1,manifest:null,prUrl:null,error:X.message,securityVerdict:"pass",securityReport:{scannedAt:new Date().toISOString(),skillName:"",skillPath:"",source:null,codeScans:[],permissions:[],totalFiles:0,totalLines:0,verdict:"safe",verdictReason:""}};if($.flags.machine)q?.(),console.log(a("publish",o.PUBLISH_FAILED,X.message,Z)),process.exit(1);if($.flags.json)console.log(JSON.stringify({success:!1,manifest:null,pr_url:null,error:X.message,security_verdict:null},null,2)),process.exit(1);w(X.message),process.exit(1)}}async function lK($){if($.flags.help){XK();return}let q=$.flags.machine?u0():void 0,Z=performance.now();try{let Q=await f2();if($.flags.machine){q?.();let z=Q.entries.map((J)=>({name:J.name,installed_commit:J.installedCommit,latest_commit:J.latestCommit,source:J.sourceType,status:J.status}));console.log(d("outdated",z,Z));return}if($.flags.json){console.log(F8(Q));return}let X=!$.flags.noColor&&process.stdout.isTTY!==!1;if(console.log(L8(Q,X)),Q.outdatedCount>0)process.exitCode=1}catch(Q){if($.flags.machine)q?.(),console.log(a("outdated",o.UNKNOWN_ERROR,Q.message,Z)),process.exit(1);w(Q.message),process.exit(1)}}async function nK($){if($.flags.help){zK();return}let q=$.flags.machine?u0():void 0,Z=performance.now(),Q=[];if($.subcommand)Q.push($.subcommand);Q.push(...$.positional);try{let X=await _8(Q.length>0?Q:null,$.flags.yes);if($.flags.machine){q?.();let J=X.results.map((G)=>({name:G.name,status:G.status,reason:G.reason||null,old_commit:G.oldCommit||null,new_commit:G.newCommit||null,security_verdict:G.securityVerdict||null}));console.log(d("update",J,Z));return}if($.flags.json){console.log(O8(X));return}if(X.results.length>0)console.error(W.yellow("Note: project-scoped skill detection is not yet supported. All updates target the global skill path."));if(X.warnings&&X.warnings.length>0)for(let J of X.warnings)console.error(W.yellow(`Warning: skill "${J}" not found in lock file — skipped`));if(X.results.length===0){console.log("All skills are up to date.");return}for(let J of X.results)switch(J.status){case"updated":if(console.log(`${W.green("✓")} ${J.name} ${W.dim(J.oldCommit||"")} → ${J.newCommit||""}`),J.securityVerdict==="warning")console.error(W.yellow(` ⚠ Security audit returned warning for ${J.name} — updated because --yes was supplied`));break;case"skipped":console.log(`${W.yellow("○")} ${J.name} ${W.dim(J.reason||"skipped")}`);break;case"failed":console.log(`${W.red("✗")} ${J.name} ${W.dim(J.reason||"failed")}`);break}console.log("");let z=[];if(X.updatedCount>0)z.push(W.green(`${X.updatedCount} updated`));if(X.skippedCount>0)z.push(W.yellow(`${X.skippedCount} skipped`));if(X.failedCount>0)z.push(W.red(`${X.failedCount} failed`));if(console.log(z.join(", ")),X.failedCount>0)process.exitCode=1}catch(X){if($.flags.machine)q?.(),console.log(a("update",o.UNKNOWN_ERROR,X.message,Z)),process.exit(1);w(X.message),process.exit(1)}}async function gZ($){let q=sV($);if(q.flags.json&&q.flags.machine)w("--json and --machine are mutually exclusive. Use one or the other."),process.exit(2);if(q.flags.machine)q.flags.yes=!0;if(q.flags.noColor)globalThis.__CLI_NO_COLOR=!0;if(q.flags.verbose)OZ(!0);if(q.flags.version){console.log(`asm ${J4}`);let Z=await cq();if(q.flags.verbose&&Z.resolved){if(console.log(` path: ${Z.resolved.path}`),Z.resolved.realPath!==Z.resolved.path)console.log(` real: ${Z.resolved.realPath}`)}if(Z.shadowed.length>0&&Z.resolved){console.error(""),console.error(W.yellow(`Warning: ${Z.shadowed.length+1} \`asm\` binaries on PATH — you may be running a shadowed install.`)),console.error(` resolved: ${Z.resolved.path}`);for(let Q of Z.shadowed)console.error(` shadowed: ${Q.path}`);console.error(W.dim(" Pick one package manager (npm OR bun) and remove the other install.")),console.error(W.dim(" See: https://github.com/luongnv89/agent-skill-manager#troubleshooting"))}return}if(!q.command&&q.flags.help){tV();return}if(!q.command)return;switch(q.command){case"list":await GK(q);break;case"search":await YK(q);break;case"inspect":await UK(q);break;case"uninstall":await WK(q);break;case"audit":await HK(q);break;case"install":await IK(q);break;case"config":await LK(q);break;case"export":await jK(q);break;case"import":await DK(q);break;case"init":await wK(q);break;case"stats":await CK(q);break;case"link":await gK(q);break;case"index":await mK(q);break;case"bundle":await dK(q);break;case"publish":await cK(q);break;case"outdated":await lK(q);break;case"update":await nK(q);break;case"doctor":await SK(q);break;case"eval":await yK(q);break;case"eval-providers":await fK(q);break;default:w(`Unknown command: "${q.command}"`),console.error('Run "asm --help" for usage.'),process.exit(2)}}function uZ($){let q=$.slice(2);if(q.length===0)return!1;let Z=["list","search","inspect","uninstall","audit","config","install","export","import","init","stats","link","index","bundle","publish","outdated","update","doctor","eval","eval-providers"],Q=q[0];if(Z.includes(Q))return!0;if(Q==="--help"||Q==="-h")return!0;if(Q==="--version"||Q==="-v")return!0;if(Q.startsWith("-")||Q.length>0)return!0;return!1}if(uZ(process.argv))await gZ(process.argv);else if(!(typeof globalThis.Bun<"u")){let{spawn:q}=await import("child_process"),Z=q("bun",[process.argv[1],...process.argv.slice(2)],{stdio:"inherit"});Z.on("error",()=>{console.error(`The interactive TUI requires Bun (https://bun.sh).
|
|
781
783
|
Install it with: curl -fsSL https://bun.sh/install | bash
|
|
782
784
|
|
|
783
|
-
`+"CLI commands (list, search, inspect, etc.) work with Node.js — run: asm --help"),process.exit(1)}),Z.on("exit",(Q)=>process.exit(Q??0))}else await import("./chunk-
|
|
785
|
+
`+"CLI commands (list, search, inspect, etc.) work with Node.js — run: asm --help"),process.exit(1)}),Z.on("exit",(Q)=>process.exit(Q??0))}else await import("./chunk-thr0x97h.js");
|